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

[poll] Working Directory does not exist - After disconnecting node

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • git-plugin
    • None

      I marked this as major because it can have a significant impact on a server with a large number of jobs.

       

      To reproduce:

      0) Create an agent with label "mylabel"

      1) create a pipeline job that uses GitSCM checkout with PathRestriction defined (see example in attached txt file)

      2) Let the job poll SCM and run as expected on the first agent.

      3) Disconnect the first agent. Important: Must click "Disconnect" and not "mark agent offline" and not "Delete agent"

      4) Create a new agent, give it label "mylabel" so that the pipeline job will run on it

      5) Trigger an SCM polling for the job.

       

      Current behavior: SCM polling will print a log like this:

      Started on Feb 11, 2021, 10:20:26 AM
      Using strategy: Default
      [poll] Last Built Revision: Revision aa393fc20a15761337c08e4209431dbafefa3072 (refs/remotes/origin/master)
      [poll] Working Directory does not exist
      Done. Took 2 ms
      Changes found

      Then, it will proceed to build the job (even though there were no new changes in SCM. This is a huge problem if you have 100's of such jobs, because they will all try to build at the same time, even though there were no new SCM changes.

       

      Expected behavior: SCM polling should run successfully, detect no changes, and do nothing.

       

      Note that this issue only happens when there is a PathRestriction defined for the GitSCM. It behaves as expected for jobs which do not have a PathRestriction defined.

            Unassigned Unassigned
            intelmatt Matt G
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: