Skip to content

Handle Bundler::HTTPErrors during bundle install #3699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 31, 2025
Merged

Conversation

egiurleo
Copy link
Contributor

@egiurleo egiurleo commented Jul 30, 2025

Motivation

In addition to Bundler::Fetcher::NetworkDownErrors, a Bundler networking issue might be indicated by a variety of Bundler::HTTPErrors. By rescuing the parent error class, we can protect against any of these child errors from cluttering our telemetry.

Implementation

I switched out the rescue for Bundler::Fetcher::NetworkDownError for Bundler::HTTPError.

Automated Tests

I kept the original test and added a separate Bundler::HTTPError test, ensuring that this would catch both the parent error class and any of its children.

Copy link
Contributor Author

egiurleo commented Jul 30, 2025


How to use the Graphite Merge Queue

Add the label graphite-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@egiurleo egiurleo requested review from alexcrocha and vinistock July 30, 2025 20:36
@egiurleo egiurleo added other Changes that aren't bugfixes, enhancements or breaking changes server This pull request should be included in the server gem's release notes labels Jul 30, 2025 — with Graphite App
@egiurleo egiurleo marked this pull request as ready for review July 30, 2025 20:39
@egiurleo egiurleo requested a review from a team as a code owner July 30, 2025 20:39
It turns out, `Bundler::Fetcher::NetworkDownError` is actually a subclass of `Bundler::HTTPError`,
and both have shown up in our telemetry. By rescuing only `Bundler::HTTPError`, we also rescue
all subclasses that might indicate other bundler networking errors as well.
@egiurleo egiurleo changed the base branch from ignore-operation-not-permitted to graphite-base/3699 July 31, 2025 14:23
@egiurleo egiurleo force-pushed the ignore-http-error branch from 8f2b64d to 474a760 Compare July 31, 2025 14:23
@egiurleo egiurleo force-pushed the graphite-base/3699 branch from d638388 to 9a027cf Compare July 31, 2025 14:23
@egiurleo egiurleo changed the base branch from graphite-base/3699 to main July 31, 2025 14:23
@egiurleo egiurleo enabled auto-merge July 31, 2025 14:24
@egiurleo egiurleo merged commit 971959e into main Jul 31, 2025
71 checks passed
@egiurleo egiurleo deleted the ignore-http-error branch July 31, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
other Changes that aren't bugfixes, enhancements or breaking changes server This pull request should be included in the server gem's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants