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

Clarify default settings versus user specified settings in the config table #314

Open
dmikusa opened this issue Feb 16, 2024 · 0 comments
Open
Labels
type:enhancement A general enhancement

Comments

@dmikusa
Copy link
Contributor

dmikusa commented Feb 16, 2024

Describe the Enhancement

The config table is a little confusing in that we don't specify what's a default setting versus user-supplied. This makes it a little tricky sometimes to understand what value is going to be applied, in particular with BP_JVM_VERSION.

Log without setting BP_JVM_VERSION explicitly:

[INFO]     [creator]     Paketo Buildpack for BellSoft Liberica 10.5.2
[INFO]     [creator]       https://github.com/paketo-buildpacks/bellsoft-liberica
[...]
[INFO]     [creator]         $BP_JVM_TYPE                 JRE                                                          the JVM type - JDK or JRE
[INFO]     [creator]         $BP_JVM_VERSION              17                                                           the Java version
[...]
[INFO]     [creator]         Using Java version 21 extracted from MANIFEST.MF

Log with setting BP_JVM_VERSION to 17 explicitly.

[INFO]     [creator]     Paketo Buildpack for BellSoft Liberica 10.5.2
[INFO]     [creator]       https://github.com/paketo-buildpacks/bellsoft-liberica
[...]
[INFO]     [creator]         $BP_JVM_TYPE                 JRE                                                          the JVM type - JDK or JRE
[INFO]     [creator]         $BP_JVM_VERSION              17                                                           the Java version
[...]
[INFO]     [creator]         Using Java version 17 from BP_JVM_VERSION

Note how the last line shows that they are different because it impacts which version is selected. In both cases $BP_JVM_VERSION is logged as 17, but only if I set it explicitly the variable is used to determine the runtime jdk.

Possible Solution

We need a way to specify when a value is a default value versus user-supplied.

Options:

  1. Add an asterisk after default values. Add a line below the table indicating items marked with an asterisk are default values.
  2. Both add an asterisk and add some colors.
  3. Do nothing, or maybe just indicate below the table that this is the list of combined settings, and don't worry about trying to differentiate.
  4. Something else? 🤔

Things I'd prefer not to do:

  1. I don't want to add another column to the table, cause the table is already a bit large and hard to read.
  2. I don't want to do something that would make existing columns wider, like showing both the default and user-supplied versions. Some of the columns are already very wide, this would make that worse.
  3. I don't want to add just colors because that's not friendly for someone that's color blind or that just has colors disabled.

Motivation

Spun out of libjvm issue -> paketo-buildpacks/libjvm#350

@dmikusa dmikusa added the type:enhancement A general enhancement label Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant