Skip to content
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

Prevent composed bundle from failing with SSH git sources #2810

Conversation

vinistock
Copy link
Member

@vinistock vinistock commented Oct 31, 2024

Motivation

Closes #2809

You can use SSH git sources in your Gemfile, which result in a lockfile remote that isn't a valid URI. We need to protect the composed bundle setup from that possibility or else it crashes.

Implementation

Started rescuing URI related errors, which then makes us default to not performing any corrections and just using the exact remote existing in the lockfile.

Automated Tests

Added a test that reproduces the reported issue.

Copy link
Member Author

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

Join @vinistock and the rest of your teammates on Graphite Graphite

@vinistock vinistock requested review from andyw8 and st0012 October 31, 2024 14:18
@vinistock vinistock added server This pull request should be included in the server gem's release notes bugfix This PR will fix an existing bug labels Oct 31, 2024 — with Graphite App
@vinistock vinistock marked this pull request as ready for review October 31, 2024 14:18
@vinistock vinistock requested a review from a team as a code owner October 31, 2024 14:18
@vinistock vinistock self-assigned this Oct 31, 2024
Copy link
Contributor

@KaanOzkan KaanOzkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's fine to not cover cases where exception is due to a faulty source

@vinistock vinistock force-pushed the 10-31-prevent_composed_bundle_from_failing_with_ssh_git_sources branch from 22ac487 to 473c9b8 Compare October 31, 2024 14:29
@vinistock
Copy link
Member Author

I guess it's fine to not cover cases where exception is due to a faulty source

Yeah, in that scenario, bundle install will fail. With the new experimental launcher mode, we will still be able to launch the server despite that happening and report the problem to the user, but there's not much else that we can do.

@vinistock vinistock enabled auto-merge (squash) October 31, 2024 14:39
@vinistock vinistock merged commit 2cd7b92 into main Oct 31, 2024
36 checks passed
@vinistock vinistock deleted the 10-31-prevent_composed_bundle_from_failing_with_ssh_git_sources branch October 31, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This PR will fix an existing bug 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.

Crash on git gem in Gemfile
2 participants