Skip to content

Conversation

@Hamms
Copy link
Contributor

@Hamms Hamms commented Aug 8, 2025

Reverts #67639, re-reapplying #66536

The last attempt applied successfully at first, but a subsequent build revealed that it introduced a circular dependency problem when trying to process Gemfile changes.

Specifically, in order to successfully run a bundle operation which processes a Gemfile change from within a Ruby processes started within the bundle environment, it's important to spawn the subshell without any of the BUNDLE_* environment variables set by the original process. Bundle provides a with_unbundled_env helper for doing so, but we weren't using it; we were instead running all bundle operations with sudo, which has a side effect of stripping out all environment variables.

Since we are now running bundle install without sudo, we need to make sure to use with_unbundled_env instead.

Links

Slack thread

Testing Story

Tested on an adhoc; I first verified that without this fix, the adhoc will fail to install a new gem in the same way our build pipeline servers failed. I then verified that with the fix in place, the adhoc can successfully install a new gem.

@Hamms Hamms marked this pull request as ready for review August 11, 2025 23:08
@Hamms Hamms requested a review from a team as a code owner August 11, 2025 23:08
@Hamms Hamms added the Ruby Update Everything related to work to update the version of Ruby our codebase runs on label Aug 11, 2025
Copy link
Contributor

@sureshc sureshc left a comment

Choose a reason for hiding this comment

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

Once, again, I only understand and approve of the testing process 😅

Copy link
Contributor

@cat5inthecradle cat5inthecradle left a comment

Choose a reason for hiding this comment

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

LGTM!

@Hamms Hamms merged commit 3fcff01 into staging Aug 13, 2025
18 checks passed
@Hamms Hamms deleted the revert-67639-revert-67117-revert-67115-revert-66536-elijah/bundle-deployment-mode branch August 13, 2025 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ruby Update Everything related to work to update the version of Ruby our codebase runs on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants