Issue 1270 fix: use default JRE version when memory_calculator settings only#1274
Open
stokpop wants to merge 1 commit into
Open
Conversation
When JBP_CONFIG_*_JRE contains only memory_calculator settings (no version), GetJREVersion() was hard-failing with 'could not parse version'. Now: if parseJBPConfigVersion returns empty string, log debug and fall through to manifest default version. Fixes: https://github.com/stokpop/java-buildpack/issues/1270
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
When
JBP_CONFIG_*_JREis set with onlymemory_calculatorsettings (noversionfield), staging hard-fails with:The env var is valid for configuring memory calculator tuning without pinning a version. Staging should continue with the manifest default version.
This affects all JREs (OpenJDK, SapMachine, Zulu, IBM, Oracle, GraalVM) since
GetJREVersion()is shared.Fix
In
GetJREVersion(): whenparseJBPConfigVersionreturns an empty string, log a debug message and fall through to the manifest default instead of hard-erroring.Tests
Added two tests for this behaviour:
Fixes #1270