Skip to content

Rescue errors in metadata_cascades_for_dep to prevent PR message loss#14905

Open
yeikel wants to merge 1 commit intodependabot:mainfrom
yeikel:rescue-metadata-cascade-errors
Open

Rescue errors in metadata_cascades_for_dep to prevent PR message loss#14905
yeikel wants to merge 1 commit intodependabot:mainfrom
yeikel:rescue-metadata-cascade-errors

Conversation

@yeikel
Copy link
Copy Markdown
Contributor

@yeikel yeikel commented May 4, 2026

What are you trying to accomplish?

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 (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

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@yeikel yeikel force-pushed the rescue-metadata-cascade-errors branch from 0636bf6 to f6ae25e Compare May 4, 2026 17:17
@yeikel yeikel force-pushed the rescue-metadata-cascade-errors branch from f6ae25e to cd291c0 Compare May 4, 2026 17:30
@yeikel yeikel marked this pull request as ready for review May 4, 2026 17:30
@yeikel yeikel requested a review from a team as a code owner May 4, 2026 17:30
@yeikel yeikel force-pushed the rescue-metadata-cascade-errors branch 2 times, most recently from 5b97ec4 to afa8d6b Compare May 6, 2026 14:31
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
@yeikel yeikel force-pushed the rescue-metadata-cascade-errors branch from afa8d6b to 44dd26c Compare May 6, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The pull request body is empty when any of the metadata retrieval steps fails

1 participant