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

After build failure, polling stops with "P4: Polling error; no previous change."

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • p4-plugin
    • Jenkins 2.263.3 (Windows)
      P4 Plugin 1.11.2

      Sometimes when a job fails, it will stop polling Perforce for new changes and need to be manually kicked. This obviously greatly affects our CI pipeline.

      This is found in the p4 polling log:

      Started on Feb 2, 2021, 9:54:00 AM
      Executor number at runtime: 0
      P4: Polling on: master with:Mainline-EC2AMAZ-AAAAAAA
      P4: Polling: No changes in previous build.
      P4: Polling error; no previous change.
      Done. Took 5 ms
      No changes
      

      When this happens, the previous build will not have any changes listed, despite its p4 polling log declaring that it found changes. Perhaps the job is failing to record what changes it found?

      Here is our pipeline. Of special note, we use a "staticSpec()" workspace and specify a custom "syncID" attribute. This is because we have multiple jobs sharing a same workspace per node (to take advantage of build object caching).

      node('mainline') {
          stage('Sync') {
              dir ("C:\\Mainline") {
                  checkout perforce(
                      credential: 'P4Account',
                      filter: [
                          pathFilter('//depot/tests'),
                          pathFilter('//depot/docs'),
                      ],
                      populate: syncOnly(
                          force: false, have: true, modtime: false,
                          parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4'],
                          pin: '', quiet: true, revert: false
                      ),
                      workspace: staticSpec(
                          charset: 'none',
                          name: "Mainline-${env.COMPUTERNAME}",
                          syncID: "Mainline-${env.COMPUTERNAME}-${env.JOB_NAME}",
                          pinHost: false
                      )
                  )
              }
          }
      }
      

            stuartrowe Stuart Rowe
            jayspang Jay Spang
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: