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

Disable Strict Forbidden File Verification option always causes trigger

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • gerrit-trigger-plugin
    • None
    • Jenkins 1.642.1, gerrit-trigger-plugin 2.18.3
      Jenkins 2.7, gerrit-trigger-plugin 2.23.3
      Jenkins 2.46.3, gerrit-trigger-plugin 2.24.0

      The Disable Strict Forbidden File Verification option appears have a bug when the Fobidden File path is contained within the trigger file path.

      According to the in job config help regarding this option:

      • Enabling this option will allow an event to trigger a build if the event contains BOTH one or more wanted file paths AND one or more forbidden file paths.
      • In other words, with this option, the build will not get triggered if the change contains only forbidden files, otherwise it will get triggered.

      I have done some testing and found that the behavior is as described unless the path in forbidden file path field is a subset of the path in the file path field.

      File.isInteresting(...) (FilePath.java line 97) doesn't exclude forbidden paths from its search, so if the forbidden path is contained in files it will cause foundInterestingTopicOrFile to be true and cause a trigger even though it's a forbidden file path.

      See also GerritProject.isInteresting(...) method (GerritProject.java line 215).

            rsandell rsandell
            jajax Joseph Ajax
            Votes:
            7 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: