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

Upstream build points to wrong revision if there is more than one revision triggered the job

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I'm having a setup with two matrix job: an upstream job, which compiles my binaries and a downstream job, which executes the test suite using the binaries from the upstream job.
      The test job is much slower than the build job obviously.
      I noticed the following scenarion:
      In my upstream job I got two commit with only a small timegap, so the two build job was queued after each other, and after that, I got one test job queued, having by triggered both upstream job:
      Started by upstream project php-src-trunk-matrix-build build number 87

      Started by upstream project php-src-trunk-matrix-build build number 88

      when the downstream build started, the copy artifact plugin copied the artifacts from the upstream build #87, not from #88, but the same SCM(subversion btw.) version was used as in upstream #88 which means that it run a different version of the binary and the testsuite, hence my testsuite failed.

      Is there a chance that copyartifact could watch out for multiple triggers and use the latest build version number?

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/test/java/hudson/plugins/copyartifact/TriggeredBuildSelectorTest.java
            src/test/java/hudson/plugins/copyartifact/testutils/FileWriteBuilder.java
            http://jenkins-ci.org/commit/copyartifact-plugin/1addda5e035e2d352f1fc9bf899474a1972fc637
            Log:
            JENKINS-11655 Added tests for the upstream selecting feature of TriggeredBuildSelector. Though existing tests of TriggeredBuildSelector are in CopyArtifactTest, I created a new test class as adding tests are so complicated and large.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/test/java/hudson/plugins/copyartifact/TriggeredBuildSelectorTest.java src/test/java/hudson/plugins/copyartifact/testutils/FileWriteBuilder.java http://jenkins-ci.org/commit/copyartifact-plugin/1addda5e035e2d352f1fc9bf899474a1972fc637 Log: JENKINS-11655 Added tests for the upstream selecting feature of TriggeredBuildSelector. Though existing tests of TriggeredBuildSelector are in CopyArtifactTest, I created a new test class as adding tests are so complicated and large.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/hudson/plugins/copyartifact/TriggeredBuildSelector.java
            src/main/resources/hudson/plugins/copyartifact/Messages.properties
            src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/config.jelly
            src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/global.jelly
            src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/help-globalUpstreamFilterStrategy.html
            src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/help-upstreamFilterStrategy.html
            src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/help-useNewest.html
            http://jenkins-ci.org/commit/copyartifact-plugin/a99e78e65f4dc102f6706ab14f25d49d204646e2
            Log:
            JENKINS-11655 Added global configuration to specify the default behavior.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/hudson/plugins/copyartifact/TriggeredBuildSelector.java src/main/resources/hudson/plugins/copyartifact/Messages.properties src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/config.jelly src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/global.jelly src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/help-globalUpstreamFilterStrategy.html src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/help-upstreamFilterStrategy.html src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/help-useNewest.html http://jenkins-ci.org/commit/copyartifact-plugin/a99e78e65f4dc102f6706ab14f25d49d204646e2 Log: JENKINS-11655 Added global configuration to specify the default behavior.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/hudson/plugins/copyartifact/TriggeredBuildSelector.java
            src/test/java/hudson/plugins/copyartifact/TriggeredBuildSelectorTest.java
            http://jenkins-ci.org/commit/copyartifact-plugin/6f80d6ca29c6c336c4b7a0eb60aa3a41ddfa1df5
            Log:
            JENKINS-11655 Updates tests against adding globalUpstreamFilterStrategy

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/hudson/plugins/copyartifact/TriggeredBuildSelector.java src/test/java/hudson/plugins/copyartifact/TriggeredBuildSelectorTest.java http://jenkins-ci.org/commit/copyartifact-plugin/6f80d6ca29c6c336c4b7a0eb60aa3a41ddfa1df5 Log: JENKINS-11655 Updates tests against adding globalUpstreamFilterStrategy
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/hudson/plugins/copyartifact/TriggeredBuildSelector.java
            src/main/resources/hudson/plugins/copyartifact/Messages.properties
            src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/config.jelly
            src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/global.jelly
            src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/help-globalUpstreamFilterStrategy.html
            src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/help-upstreamFilterStrategy.html
            src/test/java/hudson/plugins/copyartifact/TriggeredBuildSelectorTest.java
            src/test/java/hudson/plugins/copyartifact/testutils/FileWriteBuilder.java
            http://jenkins-ci.org/commit/copyartifact-plugin/e894206e94ca67b6067990febeb860672dc30bb1
            Log:
            Merge pull request #39 from ikedam/feature/JENKINS-11655_NewestUpstream

            JENKINS-11655 Use the newest upstream

            Compare: https://github.com/jenkinsci/copyartifact-plugin/compare/b33ceb5d1cd5...e894206e94ca

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/hudson/plugins/copyartifact/TriggeredBuildSelector.java src/main/resources/hudson/plugins/copyartifact/Messages.properties src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/config.jelly src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/global.jelly src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/help-globalUpstreamFilterStrategy.html src/main/resources/hudson/plugins/copyartifact/TriggeredBuildSelector/help-upstreamFilterStrategy.html src/test/java/hudson/plugins/copyartifact/TriggeredBuildSelectorTest.java src/test/java/hudson/plugins/copyartifact/testutils/FileWriteBuilder.java http://jenkins-ci.org/commit/copyartifact-plugin/e894206e94ca67b6067990febeb860672dc30bb1 Log: Merge pull request #39 from ikedam/feature/ JENKINS-11655 _NewestUpstream JENKINS-11655 Use the newest upstream Compare: https://github.com/jenkinsci/copyartifact-plugin/compare/b33ceb5d1cd5...e894206e94ca
            Hide
            ikedam ikedam added a comment -

            Released the fix in copyartifact 1.31.
            It will be available in a day.

            Show
            ikedam ikedam added a comment - Released the fix in copyartifact 1.31. It will be available in a day.

              People

              • Assignee:
                ikedam ikedam
                Reporter:
                tyrael Ferenc Kovacs
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: