Capture Ruby Version information directly from the Gemfile.lock #1603
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.
Add a custom class
GemfileLock
that parses a lockfile to return information that can build a RubyVersion. We then compare that information to the current method of usingbundle platform --ruby
output to gauge correctness from production data before we make any behavior changes.Commits are are focused (if not entirely small) and ordered.
Context of this work
Today, the order of operations for running the buildpack looks like this:
bundle platform --ruby
to detect the application Ruby version.Moving into the future, an eventual goal is to be able to avoid running
bundle platform --ruby
with the bootstrap version of ruby (used by the buildpack). This execution exposes incompatibilities between the bootstrap ruby version and versions of bundler. Instead, the order will eventually be:gem install bundler -v <version>
)To support this, I want to populate RubyVersion from different sources at the same time so I can compare them, instrument them, and ensure consistent platform behavior.
Worth noting that the proposed future goal is the same order of execution as the CNB (without the need to install a bootstrap ruby as the CNB is written in Rust).
GUS-W-18627780