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

earliest git hash passed by parameterized build trigger when downstream job was triggered multiple times

      Job A triggers job B and passes its git hash along. Job A is fast but job B is slow. So there are times when job A finishes and triggers job B while job B is still running and processing the earlier git hash. When job B finishes its current run, the next run would be triggered by multiple runs of job A. The parameterized trigger passes the git hash from the earliest trigger by job A. As a result, git hashes from the later triggers are never processed by job B. The parameterized trigger should pass the git hash from the latest trigger by job A.

          [JENKINS-15160] earliest git hash passed by parameterized build trigger when downstream job was triggered multiple times

          Code changed in jenkins
          User: cjo9900
          Path:
          src/main/java/hudson/plugins/git/GitRevisionBuildParameters.java
          src/main/java/hudson/plugins/git/RevisionParameterAction.java
          src/main/resources/hudson/plugins/git/GitRevisionBuildParameters/config.jelly
          src/main/resources/hudson/plugins/git/GitRevisionBuildParameters/help-combineQueuedCommits.html
          src/test/java/hudson/plugins/git/RevisionParameterActionTest.java
          http://jenkins-ci.org/commit/git-plugin/e442a7904904256ff9aa79e885c085cacd514ede
          Log:
          JENKINS-15160 add support for combining git hashs when passed downstream

          Don't combine with manually started builds

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: cjo9900 Path: src/main/java/hudson/plugins/git/GitRevisionBuildParameters.java src/main/java/hudson/plugins/git/RevisionParameterAction.java src/main/resources/hudson/plugins/git/GitRevisionBuildParameters/config.jelly src/main/resources/hudson/plugins/git/GitRevisionBuildParameters/help-combineQueuedCommits.html src/test/java/hudson/plugins/git/RevisionParameterActionTest.java http://jenkins-ci.org/commit/git-plugin/e442a7904904256ff9aa79e885c085cacd514ede Log: JENKINS-15160 add support for combining git hashs when passed downstream Don't combine with manually started builds

          Code changed in jenkins
          User: Nicolas De loof
          Path:
          src/main/java/hudson/plugins/git/GitRevisionBuildParameters.java
          src/main/java/hudson/plugins/git/RevisionParameterAction.java
          src/main/resources/hudson/plugins/git/GitRevisionBuildParameters/config.jelly
          src/main/resources/hudson/plugins/git/GitRevisionBuildParameters/help-combineQueuedCommits.html
          src/test/java/hudson/plugins/git/RevisionParameterActionTest.java
          http://jenkins-ci.org/commit/git-plugin/17132ba7e8b2323cdb5b09ee363afbe9c3042b65
          Log:
          Merge pull request #107 from cjo9900/JENKINS-15160

          Jenkins 15160

          Compare: https://github.com/jenkinsci/git-plugin/compare/513d89b4a8a9...17132ba7e8b2

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De loof Path: src/main/java/hudson/plugins/git/GitRevisionBuildParameters.java src/main/java/hudson/plugins/git/RevisionParameterAction.java src/main/resources/hudson/plugins/git/GitRevisionBuildParameters/config.jelly src/main/resources/hudson/plugins/git/GitRevisionBuildParameters/help-combineQueuedCommits.html src/test/java/hudson/plugins/git/RevisionParameterActionTest.java http://jenkins-ci.org/commit/git-plugin/17132ba7e8b2323cdb5b09ee363afbe9c3042b65 Log: Merge pull request #107 from cjo9900/ JENKINS-15160 Jenkins 15160 Compare: https://github.com/jenkinsci/git-plugin/compare/513d89b4a8a9...17132ba7e8b2

          hlau added a comment -

          Many thanks. Fix Version/s for this bug says None. Which version contains the fix?

          hlau added a comment - Many thanks. Fix Version/s for this bug says None. Which version contains the fix?

          Gergely Nagy added a comment - - edited

          Should combineQueuedCommits=true result in a single long downstream build (even if its upstream ran multiple times)? If so, it does not appear to work for me.

          My simple test with Jenkins 1.480.2 (LTE), Git plugin 1.1.26, Paramtrigger plugin: 2.16:

          1) new job: try-combinecommits-downstream
          scm: a tiny git repo
          build step: shell "sleep 120"

          2) new job: try-combinecommits-base,
          scm: the same repo, trigger by push notification
          build step: shell "sleep 10"
          trigger parametrized build: try-combinecommits-downstream,
          param: Git SHA1
          combineQueuedCommits: yes

          3) a simple bash loop to pushed dummy changes dozens of times

          Result: the short upstream job triggers the downsteam one for each build, flooding the queue - no sign of "combining" them, ie. to pick the last build. I'd expect a second trigger should remove the first one off the queue.

          Do I miss anything? Thanks.

          Gergely Nagy added a comment - - edited Should combineQueuedCommits=true result in a single long downstream build (even if its upstream ran multiple times)? If so, it does not appear to work for me. My simple test with Jenkins 1.480.2 (LTE), Git plugin 1.1.26, Paramtrigger plugin: 2.16: 1) new job: try-combinecommits-downstream scm: a tiny git repo build step: shell "sleep 120" 2) new job: try-combinecommits-base, scm: the same repo, trigger by push notification build step: shell "sleep 10" trigger parametrized build: try-combinecommits-downstream, param: Git SHA1 combineQueuedCommits: yes 3) a simple bash loop to pushed dummy changes dozens of times Result: the short upstream job triggers the downsteam one for each build, flooding the queue - no sign of "combining" them, ie. to pick the last build. I'd expect a second trigger should remove the first one off the queue. Do I miss anything? Thanks.

          Gergely Nagy added a comment -

          combineQueuedCommits=true does not seem to work => reopening.
          See my previous comment.

          Gergely Nagy added a comment - combineQueuedCommits=true does not seem to work => reopening. See my previous comment.

          cjo9900 added a comment -

          Apologies, looks like I missed passing that flag to the Action that is created, so it never took effect.

          https://github.com/jenkinsci/git-plugin/pull/129

          cjo9900 added a comment - Apologies, looks like I missed passing that flag to the Action that is created, so it never took effect. https://github.com/jenkinsci/git-plugin/pull/129

          Code changed in jenkins
          User: cjo9900
          Path:
          src/main/java/hudson/plugins/git/GitRevisionBuildParameters.java
          http://jenkins-ci.org/commit/git-plugin/951517ccd2b99a8a4464b444e03976a1ff958239
          Log:
          [FIXED JENKINS-15160] Pass combineCommits to action

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: cjo9900 Path: src/main/java/hudson/plugins/git/GitRevisionBuildParameters.java http://jenkins-ci.org/commit/git-plugin/951517ccd2b99a8a4464b444e03976a1ff958239 Log: [FIXED JENKINS-15160] Pass combineCommits to action

          Code changed in jenkins
          User: Nicolas De loof
          Path:
          src/main/java/hudson/plugins/git/GitRevisionBuildParameters.java
          http://jenkins-ci.org/commit/git-plugin/1349eaba9c5767e9bf52ab27b6c31681f0c13733
          Log:
          Merge pull request #129 from cjo9900/JENKINS-15160-2

          [FIXED JENKINS-15160] Pass combineCommits to action

          Compare: https://github.com/jenkinsci/git-plugin/compare/c72b83216954...1349eaba9c57


          You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
          For more options, visit https://groups.google.com/groups/opt_out.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De loof Path: src/main/java/hudson/plugins/git/GitRevisionBuildParameters.java http://jenkins-ci.org/commit/git-plugin/1349eaba9c5767e9bf52ab27b6c31681f0c13733 Log: Merge pull request #129 from cjo9900/ JENKINS-15160 -2 [FIXED JENKINS-15160] Pass combineCommits to action Compare: https://github.com/jenkinsci/git-plugin/compare/c72b83216954...1349eaba9c57 – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .

          Gergely Nagy added a comment - - edited

          Thank you very much for this - it would fix an important regression for me (my long running tests are flooding the queue with the current version - this started to happen with the latest upgrade).
          Any way to release it soon?

          Gergely Nagy added a comment - - edited Thank you very much for this - it would fix an important regression for me (my long running tests are flooding the queue with the current version - this started to happen with the latest upgrade). Any way to release it soon?

          hlau added a comment -

          Indeed I'm also still having this problem. Have to manually kill some of the jobs in the long queue. Quite a hassle. Please release the fix soon.

          hlau added a comment - Indeed I'm also still having this problem. Have to manually kill some of the jobs in the long queue. Quite a hassle. Please release the fix soon.

            cjo9900 cjo9900
            hlau hlau
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: