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

Polling builds project regardless of changes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: perforce-plugin
    • Labels:
      None
    • Environment:
      Windows 2000, Hudson 1.349, P4V client P4/NTX86/2008.2/189013 (2009/02/18)
    • Similar Issues:

      Description

      I configured Hudson job to poll Perforce for changes to only build changed modules, however, after polling Hudson, continues with a complete build even when nothing has changed. This causes all sub-modules to cascade build when nothing has changed.

      When looking at the details of the job, Hudson reports:
      No changes from last build.
      Started by an SCM change

      Then looking at the console, I can see the complete build has executed.

      Screenshot of Perforce configuration:
      http://screencast.com/t/ZGI3NGI1MG

      Screenshot of Hudson job details:
      http://screencast.com/t/OGQyZGFiND

      Screenshot of Hudson job changes (from last build):
      http://screencast.com/t/NDU5OWQ5YmM

      Screenshot of Hudson console showing complete build:
      http://screencast.com/t/ODUxYTgx

        Attachments

          Activity

          Hide
          rpetti Rob Petti added a comment -

          I have a feeling the polling function isn't actually saving the new workspace before checking for changes. Client specs don't normally change that frequently, so I've never noticed it before. I'll take a look and try to get a fix in before the next release tomorrow.

          Reusing a client workspace between jobs is definitely something you shouldn't do, because that could easily result in an inconsistent sync. Though in your case it only works because your paths don't overlap. I would highly recommend using a different client workspace for each build. If two of those builds happen to run at the same time, or even if a build runs while a poll is running for another job, you can get some seriously messed up results...

          Show
          rpetti Rob Petti added a comment - I have a feeling the polling function isn't actually saving the new workspace before checking for changes. Client specs don't normally change that frequently, so I've never noticed it before. I'll take a look and try to get a fix in before the next release tomorrow. Reusing a client workspace between jobs is definitely something you shouldn't do, because that could easily result in an inconsistent sync. Though in your case it only works because your paths don't overlap. I would highly recommend using a different client workspace for each build. If two of those builds happen to run at the same time, or even if a build runs while a poll is running for another job, you can get some seriously messed up results...
          Hide
          rshelley rshelley added a comment -

          Ah, that would make some sense then. It would almost make more sense, in that case, to prohibit the re-use of a workspace between jobs that have different views. Any way, I'll add new views for each job and that should fix it. Thanks!

          Show
          rshelley rshelley added a comment - Ah, that would make some sense then. It would almost make more sense, in that case, to prohibit the re-use of a workspace between jobs that have different views. Any way, I'll add new views for each job and that should fix it. Thanks!
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : rpetti
          Path:
          trunk/hudson/plugins/perforce/src/main/webapp/help/p4Client.html
          http://jenkins-ci.org/commit/28528
          Log:
          JENKINS-5915 modifying documentation to make it more clear that reusing a client workspace for multiple jobs is a bad idea.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : rpetti Path: trunk/hudson/plugins/perforce/src/main/webapp/help/p4Client.html http://jenkins-ci.org/commit/28528 Log: JENKINS-5915 modifying documentation to make it more clear that reusing a client workspace for multiple jobs is a bad idea.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : rpetti
          Path:
          trunk/hudson/plugins/perforce/src/main/java/hudson/plugins/perforce/PerforceSCM.java
          http://jenkins-ci.org/commit/28527
          Log:
          [FIXED JENKINS-5915] let polling save the new client workspace if it's changed, so it can check for new changes against the proper view spec.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : rpetti Path: trunk/hudson/plugins/perforce/src/main/java/hudson/plugins/perforce/PerforceSCM.java http://jenkins-ci.org/commit/28527 Log: [FIXED JENKINS-5915] let polling save the new client workspace if it's changed, so it can check for new changes against the proper view spec.
          Hide
          rshelley rshelley added a comment -

          Thanks for looking into this promptly. Working much better with separate workspaces.

          Show
          rshelley rshelley added a comment - Thanks for looking into this promptly. Working much better with separate workspaces.

            People

            • Assignee:
              rpetti Rob Petti
              Reporter:
              rshelley rshelley
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: