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

github multibranch builds fail to build with latest branch api update

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: branch-api-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.138.3 on Ubuntu
      git plugin 3.9.1 and branch api plugin 2.1.1 is broken.
      git plugin 3.9.0 and branch api plugin 2.0.21 is ok.
    • Similar Issues:
    • Released As:
      branch-api 2.5.4

      Description

      The latest updates broke github multibranch builds.

      The branches are being discovered, but all automaticdiscovery of all new changes on all branches results in the following typical log entries:

      Checking pull-requests...
       
      Checking pull request #3
      ‘Jenkinsfile’ found
      Met criteria
      Changes detected: PR-3 (null → 24d2f4cb5debd9b3f6f8c86383eb077be0dee0c4+517f061b1a7db844659ca98d1b61a7dcd0b6fb82)
      No automatic builds for PR-3

      These builds should have triggered.  Backing out to the last stable set of plugins fixes the problem.

        Attachments

          Issue Links

            Activity

            Hide
            alt_jmellor John Mellor added a comment -

            Instead of suggesting that people apply the workaround, having to fix hundreds of thousands of jobs worldwide, how about just reverting the breaking change?  I alone have 3570 jobs to inspect and make a code change to because of this error.  How do I get back to the point of NOT having to make this change, and simply have the github functionality work as expected?

             

            Show
            alt_jmellor John Mellor added a comment - Instead of suggesting that people apply the workaround, having to fix hundreds of thousands of jobs worldwide, how about just reverting the breaking change?  I alone have 3570 jobs to inspect and make a code change to because of this error.  How do I get back to the point of NOT having to make this change, and simply have the github functionality work as expected?  
            Hide
            batmat Baptiste Mathus added a comment -

            John Mellor we understand your frustration, but please be more careful with your phrasing, and be respectful of people time here. This is not a customer support channel.

            Show
            batmat Baptiste Mathus added a comment - John Mellor we understand your frustration, but please be more careful with your phrasing, and be respectful of people time here. This is not a customer support channel.
            Hide
            dnusbaum Devin Nusbaum added a comment -

            Version 2.5.4 of Branch API plugin was just released. This version undeprecates the original property (and two others that were deprecated at the same time) and disables the automatic migration going forward (but does not try to reverse it automatically to avoid making things worse).

            Show
            dnusbaum Devin Nusbaum added a comment - Version 2.5.4 of Branch API plugin was just released. This version undeprecates the original property (and two others that were deprecated at the same time) and disables the automatic migration going forward (but does not try to reverse it automatically to avoid making things worse).
            Hide
            kivagant Eugene G added a comment - - edited

            I upgraded Branch API plugin from 2.1.2 to 2.5.4 and still see the same message in the logs:

              Checking branch dummy
                  ‘Jenkinsfile’ found
                Met criteria
            Changes detected: dummy (null → cd9913c17e529deb34a84ae6f3d21ab647fedd52)
            No automatic build triggered for dummy
            

            Build strategies for GitHub Organization contain "Change requests" strategy and "Ignore rebuilding merge branches when only the target branch changed" flag is enabled.
            "Discover branches" strategy has "Exclude branches that are also filed as PRs" value but there's no PR for the "dummy" branch that I created. Pull Requests trigger builds as expected, but new branches are ignored.

            Update: I just added another rule into the "Build strategies" section of the GitHub Organization properties. The "Named branches" rule with "*" wildcard triggered all the builds even though I still see that "null → something" in the logs.

               Checking branch dummy
                  ‘Jenkinsfile’ found
                Met criteria
            Changes detected: dummy (null → cd9913c17e529deb34a84ae6f3d21ab647fedd52)
            Scheduled build for branch: dummy
            

            Show
            kivagant Eugene G added a comment - - edited I upgraded Branch API plugin from 2.1.2 to 2.5.4 and still see the same message in the logs: Checking branch dummy ‘Jenkinsfile’ found Met criteria Changes detected: dummy ( null → cd9913c17e529deb34a84ae6f3d21ab647fedd52) No automatic build triggered for dummy Build strategies for GitHub Organization contain "Change requests" strategy and "Ignore rebuilding merge branches when only the target branch changed" flag is enabled. "Discover branches" strategy has "Exclude branches that are also filed as PRs" value but there's no PR for the "dummy" branch that I created. Pull Requests trigger builds as expected, but new branches are ignored. Update: I just added another rule into the "Build strategies" section of the GitHub Organization properties. The "Named branches" rule with "*" wildcard triggered all the builds even though I still see that "null → something" in the logs. Checking branch dummy ‘Jenkinsfile’ found Met criteria Changes detected: dummy ( null → cd9913c17e529deb34a84ae6f3d21ab647fedd52) Scheduled build for branch: dummy
            Hide
            prod_sr Pedro added a comment - - edited

            As far as I understand, "Automatic Branch Project Triggering" should not be appearing on the settings anymore. But I'm still seeing that option on my instance, as shown below:


            And as some here have commented, I'm not able to see the "Build Strategies" section under Projects. Currently on Jenkins 2.289.1, Branch API v2.6.4.

            Excuse me if this is not the proper way to comment on an old thread, but what has been shown here solves a constraint I'm having and I'm not able to apply it because I'm not able to see it.

            UPDATE: Checked the documentation here and found that I was missing the Basic Branch Build Strategies plugin.

            Show
            prod_sr Pedro added a comment - - edited As far as I understand, "Automatic Branch Project Triggering" should not be appearing on the settings anymore. But I'm still seeing that option on my instance, as shown below: And as some here have commented, I'm not able to see the "Build Strategies" section under Projects. Currently on Jenkins 2.289.1, Branch API v2.6.4. Excuse me if this is not the proper way to comment on an old thread, but what has been shown here solves a constraint I'm having and I'm not able to apply it because I'm not able to see it. UPDATE: Checked the documentation here and found that I was missing the Basic Branch Build Strategies plugin.

              People

              Assignee:
              dnusbaum Devin Nusbaum
              Reporter:
              alt_jmellor John Mellor
              Votes:
              8 Vote for this issue
              Watchers:
              25 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: