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

AccuRev plugin repeatedly restarts "quiet period"

    XMLWordPrintable

Details

    Description

      If the time between AccuRev SCM polls is less than the project's "Quiet Period", then the project will get stuck waiting for the "quiet period" to elapse and never start building.
      e.g. "SCM polling" every 5 minutes and a "quiet time" of 15 minutes.

      I have a project stored in AccuRev with the SCM polling interval set to "* * * * *", i.e. to poll every minute.
      In an attempt to workaround JENKINS-8273, I tried setting the "quiet period" to a 90 seconds in order to ensure that two consecutive "changes found" poll results would only result in one build (which is, after all, the whole point behind the "quiet period").

      What I found instead was that, after doing an AccuRev "promote" to trigger a change, the AccuRev plugin (correctly) detected the change and a build was queued with a "quiet time" of 90 seconds (as expected).
      About 1 minute later (when the "quiet time" had dropped to about 30 seconds remaining), AccuRev polled the stream again (as expected).
      However, even though no further changes had been promoted in the meantime, the "quiet time" was reset back to 90 seconds, seemingly as if new (fresh) changes had been found (there were no new changes, it was simply finding the original "promote" operation, i.e. nothing new).

      What I expected to happen is that the lack of new (fresh) promotes would mean that the "quiet time" would steadily count down to 0 and the build would then start. What actually happened is that the "quiet time" never dropped much below 30 seconds, as it was reset every time a new SCM poll happened.

      Attachments

        Issue Links

          Activity

            pjdarton pjdarton added a comment - - edited

            I suspect that this is related to JENKINS-9000, but I would guess that this one will be a lot easier to reproduce, and hence a lot easier to fix, and I would be unsurprised if fixing this one also fixes JENKIS-9000.

            pjdarton pjdarton added a comment - - edited I suspect that this is related to JENKINS-9000 , but I would guess that this one will be a lot easier to reproduce, and hence a lot easier to fix, and I would be unsurprised if fixing this one also fixes JENKIS-9000.
            pjdarton pjdarton added a comment -

            My guess is that the plugin isn't distinguishing between "changes submitted since the last build snapshot was taken" (which should result in the plugin ensuring that a build is placed in the queue if no build is currently queued) and "changes submitted since the last SCM poll was done" (which should result in a build being queued if none is already queued, and to reset the quiet time on any existing queued build).

            pjdarton pjdarton added a comment - My guess is that the plugin isn't distinguishing between "changes submitted since the last build snapshot was taken" (which should result in the plugin ensuring that a build is placed in the queue if no build is currently queued) and "changes submitted since the last SCM poll was done" (which should result in a build being queued if none is already queued, and to reset the quiet time on any existing queued build).
            pjdarton pjdarton added a comment -

            I think I've found & fixed it (but don't have commit access to repository).
            The plugin (which uses the "old" polling mechanism) wasn't checking to see if there was already a build pending before saying "yes, start another one". I added a check for that and now "quiet periods" work ok.

            "14.dont-trigger-a-build-if-already-queued-up.zip" is a git patch file, zipped.
            "accurev.hpi" is a build I made which is 0.6.13 + JENKINS-8935 + these changes.

            pjdarton pjdarton added a comment - I think I've found & fixed it (but don't have commit access to repository). The plugin (which uses the "old" polling mechanism) wasn't checking to see if there was already a build pending before saying "yes, start another one". I added a check for that and now "quiet periods" work ok. "14.dont-trigger-a-build-if-already-queued-up.zip" is a git patch file, zipped. "accurev.hpi" is a build I made which is 0.6.13 + JENKINS-8935 + these changes.

            resolved in v0.6.15

            helterscelter helter scelter added a comment - resolved in v0.6.15

            People

              helterscelter helter scelter
              pjdarton pjdarton
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: