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

Branch API 2.0.0 event processing doesn't consistently mangle names

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • branch-api-plugin
    • None

      When events relate to SCMHead instances where the head.getName() != NameMangler.apply(head.getName()) then some events may end up being ignored

          [JENKINS-41125] Branch API 2.0.0 event processing doesn't consistently mangle names

          Ryan Campbell added a comment -

          Isn't this really a bug? What is the user impact? Isn't it that:

          • If users upgrade to Branch API 2.0.0, some jobs with "/" in their names will not be triggered by webhooks
            ?

          Ryan Campbell added a comment - Isn't this really a bug? What is the user impact? Isn't it that: If users upgrade to Branch API 2.0.0, some jobs with "/" in their names will not be triggered by webhooks ?

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/test/java/integration/EventsTest.java
          http://jenkins-ci.org/commit/branch-api-plugin/0b62336040b914aba504557f48ee0a8113bdcb61
          Log:
          JENKINS-41125 Add test cases to verify

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/test/java/integration/EventsTest.java http://jenkins-ci.org/commit/branch-api-plugin/0b62336040b914aba504557f48ee0a8113bdcb61 Log: JENKINS-41125 Add test cases to verify

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/main/java/jenkins/branch/MultiBranchProject.java
          http://jenkins-ci.org/commit/branch-api-plugin/d73add2b2b8e7eefc3b10871ae7b4a49850ec99c
          Log:
          [FIXED JENKINS-41125] Events that update a branch with slashes now trigger builds again

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/jenkins/branch/MultiBranchProject.java http://jenkins-ci.org/commit/branch-api-plugin/d73add2b2b8e7eefc3b10871ae7b4a49850ec99c Log: [FIXED JENKINS-41125] Events that update a branch with slashes now trigger builds again

          Ryan Campbell added a comment -

          I think the bug summary is hiding the real issue here. Here's my understanding of the issue:

          Summary: Branches or pull requests with slashes in the name are not triggered

          Steps to reproduce:

          • Create a multi-branch project for a GitHub project
          • Create a branch with a slash "/" in the name (common for Git-flow style projects)

          Result:

          • The build will not be triggered

          Expected result:

          • the build will be triggered

          User Impact: Any branches with slashes in the name will mysteriously stop building and I won't know why.

          Is the above correct?

          Ryan Campbell added a comment - I think the bug summary is hiding the real issue here. Here's my understanding of the issue: Summary: Branches or pull requests with slashes in the name are not triggered Steps to reproduce: Create a multi-branch project for a GitHub project Create a branch with a slash "/" in the name (common for Git-flow style projects) Result: The build will not be triggered Expected result: the build will be triggered User Impact: Any branches with slashes in the name will mysteriously stop building and I won't know why. Is the above correct?

          Ryan Campbell added a comment -

          Fixed in branch-api-plugin 2.0.1

          Ryan Campbell added a comment - Fixed in branch-api-plugin 2.0.1

          Ryan Campbell added a comment -

          Mic confirms the fix.

          Ryan Campbell added a comment - Mic confirms the fix.

            stephenconnolly Stephen Connolly
            stephenconnolly Stephen Connolly
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: