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

Workflow and svn polling

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: pipeline
    • Labels:
      None
    • Similar Issues:

      Description

      When pulling my workflow script from a svn repo I get two builds triggered for one revision change if build runs longer then pull interval,

      To reproduce:

      Create workflow job with a standard svn pull configured in job, for my test I set to every minute

      Sample Job DSL
      ---------------------------------------

      node ('master') { 
      checkout changelog: false, poll: false, scm: [ $class: "SubversionSCM", locations: [[ remote:'SVNURL/trunk/flow']] ] 
      load 'flow/Test.groovy' 
      }()
      

      Sample Test.groovy
      ---------------------------

      { -> 
      node() { 
      ws() { 
      checkout changelog: true, poll: true, scm: [$class: "SubversionSCM", locations: [[remote: 'SVNURL/trunk']]] 
      sleep 300 
      } 
      } 
      }
      

      Note: I pull my workflow scripts from the same repo as my build.

      Any scheduled poll that happens before build completion will trigger another job,

      Looking at the polling log it seems it is comparing against the last completed build and not the in progress.

      Notes:

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/scm/SubversionStepTest.java
            http://jenkins-ci.org/commit/workflow-scm-step-plugin/4d4783967c042584537aa82e22bfdb602aa93101
            Log:
            JENKINS-32214 Reproduced potentially undesirable polling semantics in test.
            Originally-Committed-As: 89ec825e92169b99abeedf64ee1a99c9a79c2624

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/scm/SubversionStepTest.java http://jenkins-ci.org/commit/workflow-scm-step-plugin/4d4783967c042584537aa82e22bfdb602aa93101 Log: JENKINS-32214 Reproduced potentially undesirable polling semantics in test. Originally-Committed-As: 89ec825e92169b99abeedf64ee1a99c9a79c2624
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/scm/SubversionStepTest.java
            http://jenkins-ci.org/commit/workflow-scm-step-plugin/936db2be4612fe1ac5aa5e7d05334d3b68155998
            Log:
            [FIXED JENKINS-32214] WorkflowJob.poll should give preference to any SCMRevisionState from the latest running build.
            Originally-Committed-As: 05e46bc4c66a5e0db4f5cced25f824d022b1d95a

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/scm/SubversionStepTest.java http://jenkins-ci.org/commit/workflow-scm-step-plugin/936db2be4612fe1ac5aa5e7d05334d3b68155998 Log: [FIXED JENKINS-32214] WorkflowJob.poll should give preference to any SCMRevisionState from the latest running build. Originally-Committed-As: 05e46bc4c66a5e0db4f5cced25f824d022b1d95a
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/scm/SubversionStepTest.java
            http://jenkins-ci.org/commit/workflow-scm-step-plugin/ad9e8f6be50d4f29e71a46b594bca68c5c874726
            Log:
            JENKINS-32214 WorkflowJob.poll reworked to consider polling baselines from any running build or prior polling.
            Originally-Committed-As: c12abe251d9ad396966460bfb8d7bf9469eb6064

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/scm/SubversionStepTest.java http://jenkins-ci.org/commit/workflow-scm-step-plugin/ad9e8f6be50d4f29e71a46b594bca68c5c874726 Log: JENKINS-32214 WorkflowJob.poll reworked to consider polling baselines from any running build or prior polling. Originally-Committed-As: c12abe251d9ad396966460bfb8d7bf9469eb6064
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            job/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java
            http://jenkins-ci.org/commit/workflow-job-plugin/7d44f65c3e0d06110627f3bbb0765f14e319f27a
            Log:
            [FIXED JENKINS-32214] WorkflowJob.poll should give preference to any SCMRevisionState from the latest running build.
            Originally-Committed-As: 05e46bc4c66a5e0db4f5cced25f824d022b1d95a

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: job/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java http://jenkins-ci.org/commit/workflow-job-plugin/7d44f65c3e0d06110627f3bbb0765f14e319f27a Log: [FIXED JENKINS-32214] WorkflowJob.poll should give preference to any SCMRevisionState from the latest running build. Originally-Committed-As: 05e46bc4c66a5e0db4f5cced25f824d022b1d95a
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            job/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java
            http://jenkins-ci.org/commit/workflow-job-plugin/77999f564410f4408a75994fe8ba96f68de40cde
            Log:
            JENKINS-32214 WorkflowJob.poll reworked to consider polling baselines from any running build or prior polling.
            Originally-Committed-As: c12abe251d9ad396966460bfb8d7bf9469eb6064

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: job/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java http://jenkins-ci.org/commit/workflow-job-plugin/77999f564410f4408a75994fe8ba96f68de40cde Log: JENKINS-32214 WorkflowJob.poll reworked to consider polling baselines from any running build or prior polling. Originally-Committed-As: c12abe251d9ad396966460bfb8d7bf9469eb6064

              People

              Assignee:
              jglick Jesse Glick
              Reporter:
              owood Owen Wood
              Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: