• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin
    • None
    • Jenkins 2.46.2, Git-plugin 3.2

      This is related to -JENKINS-15961-

      I am using the Folders plugin in Jenkins to organize jobs and within a folder, I have a Pipeline job configured for 'Pipeline Script from SCM'. This job is pretty standard and there are no additional behaviors or options configured outside of the repo URL. I have checked the box for 'GitHub hook trigger for GITScm polling' under 'Build Triggers' so that when there is a push to the repo added in the pipeline job, the job gets built.

      In the folder, I configure a Pipeline Library. Currently, this library isn't versioned and everything just pulls the 'master' branch to use. When I push changes to the library, this also triggers the pipeline job within the folder which I don't want. 

       

      Observed Behavior:

      • using the 'Modern SCM' retrieval method, If I check the box for 'Ignore on push notifications' for the Pipeline Library, pushing to the library repo triggers the pipeline job. 
      • using the 'Legacy SCM' retrieval method, if I add the additional parameter for 'Don't trigger a build on commit notifications', pushing to the library repo triggers the pipeline job. 

      Expected behavior:

      • the pushes to the library should not trigger the pipeline job

       

      Does this have something to do with the polling logic seeing that the Pipeline Library ref has been updated rather than the push notification triggering the build? The pipeline job seems to trigger as soon as I merge something into the Library even with the ignore option on. 

          [JENKINS-45630] Ignore Push Notification Doesn't Work

          Alvin Huang added a comment - - edited

          From looking through more issues this seems to be related to JENKINS-39615 but I am not setting anything for polling.

          Looks like the polling logic is finding an updated ref in the pipeline library but I am unclear why it isn't just polling the repo(s) in the job but also checking the pipeline library up one level in the folder. 

          Alvin Huang added a comment - - edited From looking through more issues this seems to be related to  JENKINS-39615 but I am not setting anything for polling. Looks like the polling logic is finding an updated ref in the pipeline library but I am unclear why it isn't just polling the repo(s) in the job but also checking the pipeline library up one level in the folder. 

          Mark Waite added a comment -

          Most pipeline uses consider their pipeline libraries a critical part of their delivery pipeline. When a change happens in the pipeline library, they want to know that the change did not harm the pipeline. One of the best ways to do that is to run the pipeline.

          If requests to ignore notifications for the pipeline library are not being honored, that seems like a bug, but will need more investigation to duplicate the bug.

          Mark Waite added a comment - Most pipeline uses consider their pipeline libraries a critical part of their delivery pipeline. When a change happens in the pipeline library, they want to know that the change did not harm the pipeline. One of the best ways to do that is to run the pipeline. If requests to ignore notifications for the pipeline library are not being honored, that seems like a bug, but will need more investigation to duplicate the bug.

          Alvin Huang added a comment -

          Agreed-- in general that is the case and it's good to get that instant feedback. However, if there are longer tests that we want to run overnight but also utilize functions in the pipeline library, there may be cases where we want to ignore the library changes throughout the day (even if that means we won't see it until the morning), and then trigger them manually/via cron at the end of the day. 

           

          I see in the polling logs:

          Started on Jul 18, 2017 8:48:15 PM
          Started by event from <ip> ⇒ https://jenkins.....com/github-webhook/ on Tue Jul 18 20:48:15 UTC 2017
          Using strategy: Default
          [poll] Last Built Revision: Revision 8f0c2ae48024fd9a58a3202b557d33afb44e4705 (master)
          using GIT_ASKPASS to set credentials <cred>
           > git ls-remote -h https://github.....com/ahuang/pipelinelibrary.git # timeout=10
          Found 57 remote heads on https://github.....com/ahuang/pipelinelibrary.git
          [poll] Latest remote head revision on refs/heads/master is: f770d4ff256113bb8721a24ff717ea5ccc997c97
          Using strategy: Default
          [poll] Last Built Revision: Revision f662798bad94ef48734e4211c48b56f39fcb8091 (refs/remotes/origin/pipelinejob)
          using GIT_ASKPASS to set credentials <cred>
           > git ls-remote -h https://github.....com/ahuang/testrepo.git # timeout=10
          Found 3 remote heads on https://github.....com/ahuang/testrepo.git
          [poll] Latest remote head revision on refs/heads/pipelinejob is: f662798bad94ef48734e4211c48b56f39fcb8091 - already built by 15
          Done. Took 0.82 sec
          Changes found

           

          So it seems like the polling logic is getting the pipeline library change. So the ignore push notifications isn't the same as ignoring the pipeline library from the polling logic. 

          Alvin Huang added a comment - Agreed-- in general that is the case and it's good to get that instant feedback. However, if there are longer tests that we want to run overnight but also utilize functions in the pipeline library, there may be cases where we want to ignore the library changes throughout the day (even if that means we won't see it until the morning), and then trigger them manually/via cron at the end of the day.    I see in the polling logs: Started on Jul 18, 2017 8:48:15 PM Started by event from <ip> ⇒ https: //jenkins.....com/github-webhook/ on Tue Jul 18 20:48:15 UTC 2017 Using strategy: Default [poll] Last Built Revision: Revision 8f0c2ae48024fd9a58a3202b557d33afb44e4705 (master) using GIT_ASKPASS to set credentials <cred> > git ls-remote -h https: //github.....com/ahuang/pipelinelibrary.git # timeout=10 Found 57 remote heads on https: //github.....com/ahuang/pipelinelibrary.git [poll] Latest remote head revision on refs/heads/master is: f770d4ff256113bb8721a24ff717ea5ccc997c97 Using strategy: Default [poll] Last Built Revision: Revision f662798bad94ef48734e4211c48b56f39fcb8091 (refs/remotes/origin/pipelinejob) using GIT_ASKPASS to set credentials <cred> > git ls-remote -h https: //github.....com/ahuang/testrepo.git # timeout=10 Found 3 remote heads on https: //github.....com/ahuang/testrepo.git [poll] Latest remote head revision on refs/heads/pipelinejob is: f662798bad94ef48734e4211c48b56f39fcb8091 - already built by 15 Done. Took 0.82 sec Changes found   So it seems like the polling logic is getting the pipeline library change. So the ignore push notifications isn't the same as ignoring the pipeline library from the polling logic. 

            Unassigned Unassigned
            ahuang Alvin Huang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: