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

Build downstream project that are not downstream

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • None
    • Jenkins 1.583

      In all my projects I can see the incorrect behaviour that I try to describe below.

      Project X has version 1.0.0-SNAPSHOT, project Y depends on project X and it has set: "Build whenever a SNAPSHOT dependency is built".
      Project Y is corretly reported in project X "Downstream project".
      Project X is updated to version 1.0.0, but its "Downstream project" is not updated, this is incorrect for two reason:
      1. at this moment, Y is not a downstream project of X, because it depends on X:1.0.0-SNAPSHOT not on X:1.0.0;
      2. in any case, "downstream project" can't contains Y when X is in a release version, because X - Y relation is due to "Build whenever a SNAPSHOT dependency is built".

      Worse, when the version of project X is reset to a snapshot one, for example to 2.0.0-SNAPSHOT, project Y si rebuild, but at this time it depends on X:1.0.0, not on X:2.0.0-SNAPSHOT,
      I suppose, this is due to the incorrect information on "downstream project".

          [JENKINS-25321] Build downstream project that are not downstream

          Daniel Beck added a comment -

          Shouldn't Project Y build automatically triggered by the SCM change that changes the dependency to 1.0.0 from 1.0.0-SNAPSHOT?

          Only snapshot dependencies are assumed to change what they're referencing.

          Daniel Beck added a comment - Shouldn't Project Y build automatically triggered by the SCM change that changes the dependency to 1.0.0 from 1.0.0-SNAPSHOT? Only snapshot dependencies are assumed to change what they're referencing.

          Yes, if I change the dependency of Y project to X project form 1.0.0-SNAPSHOT to 1.0.0, project Y has to build automatically trigger by the SCM change.
          But I think that is not correct
          1. to see Y as a downstream project of X if it depends on version 1.0.0 of X, because the relation is for "Build whenever a SNAPSHOT dependency is built";
          2. to build project Y, as "downstream project" of project X, when I update the version of project X from 1.0.0 to 2.0.0-SNAPSHOT, because project Y depends on version 1.0.0 of X, not on 2.0.0-SNAPSHOT.

          I am not interested on what is "assumed to", but that the information and the behaviour are correct.

          Massimo Fabriani added a comment - Yes, if I change the dependency of Y project to X project form 1.0.0-SNAPSHOT to 1.0.0, project Y has to build automatically trigger by the SCM change. But I think that is not correct 1. to see Y as a downstream project of X if it depends on version 1.0.0 of X, because the relation is for "Build whenever a SNAPSHOT dependency is built"; 2. to build project Y, as "downstream project" of project X, when I update the version of project X from 1.0.0 to 2.0.0-SNAPSHOT, because project Y depends on version 1.0.0 of X, not on 2.0.0-SNAPSHOT. I am not interested on what is "assumed to", but that the information and the behaviour are correct.

          Daniel Beck added a comment -

          To clarify, Y is still considered downstream of X after X's version was set to 1.0.0, and Y has been built once with the new dependency to X 1.0.0?

          Also, Y with the dependency to X 1.0.0 (built at least once since the dependency was changed) is still triggered by builds of X 2.0.0-SNAPSHOT if "Build whenever a SNAPSHOT dependency is built" is set?

          Daniel Beck added a comment - To clarify, Y is still considered downstream of X after X's version was set to 1.0.0, and Y has been built once with the new dependency to X 1.0.0? Also, Y with the dependency to X 1.0.0 (built at least once since the dependency was changed) is still triggered by builds of X 2.0.0-SNAPSHOT if "Build whenever a SNAPSHOT dependency is built" is set?

          Yes, exactly.

          Massimo Fabriani added a comment - Yes, exactly.

            Unassigned Unassigned
            maxfab Massimo Fabriani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: