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

Swarm integration with Jenkins fails to queue multiple jobs

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • p4-plugin
    • None

      The first job is queued and starts immediately (Jenkins was idle), the second job is queued and waits (jenkins is busy with the first request) and the third trigger never queues, it is completely ignored. Jenkins is capable of doing both behaviors, either ignore an incoming trigger if it is busy, or the other behavior is to queue as many jobs as there are triggers.

      However, one needs to properly invoke Jenkins to get the desired behavior. The P4 plugin requires invoking Jenkins with the a command that does not seem to support this multiple queueing (using review/build). I am able to create a Jenkins test job, unrelated to Swarm, that properly queue multiple jobs, but the command has to be different (using “buildWithParameters”).

       

      As per the attached screen shot, Build 1998 is added and is in progress, build 1999 is added to the queue, and then any additional request coming from Swarm gets ignored.

          [JENKINS-47688] Swarm integration with Jenkins fails to queue multiple jobs

          Kevin Park added a comment - - edited

          There is the problem that the test results for the second review did not get recorded in Swarm. Here's what is happening on our side:

           

          1-User starts a review "v1" - this trigger a Jenkins build with pass and fail URL linked to the v1 review.

          2-User updates the files with "v2" before the "v1" review Jenkins job completes. This queues a Jenkins job properly with pass and fail URL linked to the v2 review.

          3-User updates the files with "v3" before "v1" and "v2" Jenkins jobs completed. This does not get queued in Jenkins and gets ignored.

           

          Now...

          4-Jenkins job v1 completes. But the review is now at v3, so the results from v1 do not get recorded in swarm. Swarm actually returns "Not Allowed". I think this is correct behavior.

          5-Jenkins job v2 also completes and once again gets ignored, because we are at v3. This is still correct behavior.

          6-Nothing else happens, results are never recorded, since the v3 review was not queued in Jenkins.

           

          Depending on the timing, for example if the first review was done a long time ago and unrelated reviews queued in Jenkins are responsible for the 3rd review to fail queueing, then instead of having no result recorded, one may simply have older, stale results recorded.

          Kevin Park added a comment - - edited There is the problem that the test results for the second review did not get recorded in Swarm. Here's what is happening on our side:   1-User starts a review "v1" - this trigger a Jenkins build with pass and fail URL linked to the v1 review. 2-User updates the files with "v2" before the "v1" review Jenkins job completes. This queues a Jenkins job properly with pass and fail URL linked to the v2 review. 3-User updates the files with "v3" before "v1" and "v2" Jenkins jobs completed. This does not get queued in Jenkins and gets ignored.   Now... 4-Jenkins job v1 completes. But the review is now at v3, so the results from v1 do not get recorded in swarm. Swarm actually returns "Not Allowed". I think this is correct behavior. 5-Jenkins job v2 also completes and once again gets ignored, because we are at v3. This is still correct behavior. 6-Nothing else happens, results are never recorded, since the v3 review was not queued in Jenkins.   Depending on the timing, for example if the first review was done a long time ago and unrelated reviews queued in Jenkins are responsible for the 3rd review to fail queueing, then instead of having no result recorded, one may simply have older, stale results recorded.

          Paul Allen added a comment -

          Related to JENKINS-41849

          Paul Allen added a comment - Related to JENKINS-41849

            Unassigned Unassigned
            s3037560 Kevin Park
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: