Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-4004

Updating configuration of multi-configuration jobs causes dependency loss


    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • matrix-project-plugin
    • None
    • Platform: All, OS: All

      To reproduce:

      Create up a Hudson multi-configuration job, called "Test Job 1". In the Configuration Matrix check "Axes" and
      enter e.g. "CLIENT" in the "Name" field and "foo bar" in the "Values" field. In the build steps, add an "Execute shell"
      step and enter a simple shell script, e.g. "echo `date` $CLIENT > dummy-artifact.txt"-

      Create a new Hudson job, called "Test Job 2", by copying "Test Job 1".

      Go back to the configuration of "Test Job 1", and under "Post-build Actions", check "Build other projects", and enter
      "Test Job 2" in the "Projects to build" text field. Save the configuration.

      You will now see that "Test Job 2" is a downstream project of "Test Job 1".

      Click "Build Now" of Test Job 1 to test the build triggers. Both configurations of Test Job 1 should be built, and then
      both configurations of Test Job 2.

      Now, go to the Configure page for Test Job 2. Verify that under "Build triggers", "Test Job 1" is listed under "Build
      after other projects are built", but don't touch this value. Instead, go to (for example) the Description field there
      and write anything. "Gazonk" is a good value. Click "Save".

      EXPECTED RESULT: The description of "Test Job 2" reads "Gazonk". The main page of "Test Job 2" still lists "Test Job
      1" as an upstream project, and the main page of "Test Job 1" lists "Test Job 2" as a downstream project.

      OBSERVED RESULT: The description of "Test Job 2" reads "Gazonk" as expected. But the build
      triggers/dependencies of "Test Job 1" and "Test Job 2" are gone. From now on, building Test Job 1 will not trigger a
      build of Test Job 2, even though the only thing that was changed was the Description field of Test Job 2.

      Re-adding "Test Job 2" as a downstream to "Test Job 1" solves the problem, but the build trigger goes away the
      next time the configuration of "Test Job 2" is changed (but NOT when the configuration of Test Job 1 is changed).
      Description was chosen as an example here because it should be unrelated to most other configuration items, but
      the problems happen with other (if not all) configuration fields as well.

      Reproduced on Hudson v.1.311 (Linux) and v.1.314 (Mac OS X)

            Unassigned Unassigned
            pajp pajp
            0 Vote for this issue
            0 Start watching this issue