Rescue errors in metadata_cascades_for_dep to prevent PR message loss#14905
Open
yeikel wants to merge 1 commit intodependabot:mainfrom
Open
Rescue errors in metadata_cascades_for_dep to prevent PR message loss#14905yeikel wants to merge 1 commit intodependabot:mainfrom
yeikel wants to merge 1 commit intodependabot:mainfrom
Conversation
0636bf6 to
f6ae25e
Compare
1 task
f6ae25e to
cd291c0
Compare
5b97ec4 to
afa8d6b
Compare
When metadata_cascades_for_dep encounters a network error (e.g., GitHub API timeout), it now gracefully handles the failure by returning an empty string and logging the error via suppress_error. This allows the PR message to be assembled without the metadata cascade sections (changelog, commits, releases) but still includes the important intro line and message content. Previously, any error in metadata fetching would propagate up to pr_message's top-level rescue, causing the entire PR body to be discarded and replaced with just the header and footer. Fixes dependabot#14904
afa8d6b to
44dd26c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are you trying to accomplish?
When
metadata_cascades_for_depencounters a network error (e.g., GitHub API timeout), it now gracefully handles the failure by returning an empty string and logging the error viasuppress_error. This allows the PR message to be assembled without the metadata cascade sections (changelog, commits, releases) but still includes the important intro line and message content.Previously, any error in metadata fetching would propagate up to pr_message's top-level rescue, causing the entire PR body to be discarded and replaced with just the header and footer (or an empty string)
Fixes #14904
Anything you want to highlight for special attention from reviewers?
No
How will you know you've accomplished your goal?
The existing and new tests pass
Checklist