Require explicit java_version for manual java-variant builds; remove repo-var fallback
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Parent Issue
Follow-up to #33865 (Java 25 migration), after #35914 (Java 25 default) and #35915 (variant auto-build retired).
Problem Statement
cicd_7-release-java-variant.yml is now manual-only, but it still falls back to the RELEASE_JAVA_VARIANT_VERSION / RELEASE_JAVA_VARIANT_SUFFIX repository variables when the java_version input is left empty. These vars still point at Java 25, which is now the default build — so an empty dispatch produces a redundant duplicate of the primary release image. Worse, if the vars were simply deleted, an empty dispatch would fall through to .sdkmanrc with no suffix and overwrite the primary release Docker tags.
This leaves two places where "the default Java" effectively lives: .sdkmanrc and the repo vars.
Proposed Solution
Make .sdkmanrc the single source of truth and require deliberate user action for any variant build:
- Make
java_versiona required dispatch input; remove allvars.RELEASE_JAVA_VARIANT_*fallbacks from the workflow. - Add a fail-fast guard: read
.sdkmanrcfrom the release branch being built and error out if the requested version is empty or equals the default (the primary release image already covers it). - After merge: delete the
RELEASE_JAVA_VARIANT_VERSIONandRELEASE_JAVA_VARIANT_SUFFIXrepository variables.
Outcome
A variant build (e.g. a future java-29) requires explicitly dispatching with a Java version that differs from the default — no silent fallbacks, no config drift.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with cicd_7-release-java-variant.yml and inspect how the manual java_version input and repository-variable fallbacks are handled. Read .sdkmanrc on the release branch to understand the default version, then verify that an empty or default-version dispatch fails fast and that only an explicitly different variant can build; remove the obsolete repository variables after the workflow change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, java
- Domain
- ci-cd, release
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100