github-branch-source-plugin icon indicating copy to clipboard operation
github-branch-source-plugin copied to clipboard

[JENKINS-73791] Prevent PR 404 on details to break Branches scan

Open Dohbedoh opened this issue 1 year ago • 5 comments

Description

JENKINS-73791: The retrieval of branches can fail the entire Branch Scanning if a BranchDiscoveryTrait strategy that involves checking on PRs is used while some PR parts cannot be retrieved with a 404 FileNotFoundException.

This is an extension of JENKINS-56996 / https://github.com/jenkinsci/github-branch-source-plugin/pull/224.

Submitter checklist

  • [x] Link to JIRA ticket in description, if appropriate.
  • [x] Change is code complete and matches issue description
  • [x] Automated tests have been added to exercise the changes
  • [ ] Reviewer's manual test instructions provided in PR description. See Reviewer's first task below.

Reviewer checklist

  • [ ] Run the changes and verify that the change matches the issue description
  • [ ] Reviewed the code
  • [ ] Verified that the appropriate tests have been written or valid explanation given

Documentation changes

  • [ ] Link to jenkins.io PR, or an explanation for why no doc changes are needed

Users/aliases to notify

@jenkinsci/github-branch-source-plugin-developers

Dohbedoh avatar Sep 19 '24 05:09 Dohbedoh

First commit to reproduce the failure. Second commit coming soon to demonstrate the fix.

Dohbedoh avatar Sep 19 '24 05:09 Dohbedoh

@dwnusbaum @jeromepochat @rsandell Can we merge this ?

Dohbedoh avatar Nov 15 '24 00:11 Dohbedoh

LGTM

BorisYaoA avatar Mar 27 '25 17:03 BorisYaoA

Does #840 not cover this case?

jglick avatar Mar 27 '25 20:03 jglick

@jglick Nope. That https://github.com/jenkinsci/github-branch-source-plugin/pull/840 is for the Organization Scan. This here is for Branch Indexing.

Dohbedoh avatar Apr 22 '25 02:04 Dohbedoh

NOTE: Copilot is also an example that interrupts branch indexing. It will be handled specifically at https://github.com/jenkinsci/github-branch-source-plugin/pull/864.

Dohbedoh avatar Jul 18 '25 02:07 Dohbedoh