SDKMan ANSI color codes pollute JAVA_HOME during network issues
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Description
During GitHub's infrastructure outage on Feb 9-10, 2026, a merge queue run failed because SDKMan's colored error output was captured as the JAVA_HOME environment variable value, causing GitHub Actions to reject it with 'Invalid format'.
Failed Run: https://github.com/dotCMS/core/actions/runs/21876576401
Root Cause: When SDKMan encountered network connectivity issues (due to GitHub's outage), it printed a colored 'INTERNET NOT REACHABLE' warning message with ANSI color codes ([1;31m, [0m). These codes were captured in the JAVA_HOME variable and written to $GITHUB_ENV, which GitHub Actions rejected.
Context: This was triggered by GitHub's infrastructure outage affecting runner network connectivity. First observed occurrence, likely to recur during network issues. Impact: Blocks merge queue runs (false positive - Java was actually configured correctly).
Acceptance Criteria
- Add
SDKMAN_COLOUR_ENABLE=falseto setup-java action before sourcing sdkman-init.sh - Add
SDKMAN_AUTO_ANSWER=trueto prevent interactive prompts - Add
SDKMAN_AUTO_SELFUPDATE=falseto disable auto-updates in CI - Test that JAVA_HOME is set correctly without ANSI codes during simulated network issues
- Document the change in workflow documentation
Alternative: This issue may become obsolete if we migrate from SDKMan to mise for SDK management, which is faster, more CI-friendly, and better suited for modern DevOps workflows.
Priority
Low - This was triggered by a transient GitHub outage (now resolved). The fix is simple but may not be needed if we migrate to mise.
Additional Context
Proposed Fix Location: .github/actions/core-cicd/setup-java/action.yml (before line 101)
# Disable SDKMan color codes in CI to prevent environment variable pollution
export SDKMAN_COLOUR_ENABLE=false
export SDKMAN_AUTO_ANSWER=true
export SDKMAN_AUTO_SELFUPDATE=false
References:
- Diagnostic Report:
.claude/diagnostics/run-21876576401/DIAGNOSIS.md - GitHub Outage: Feb 9-10, 2026 'Incident with Issues, Actions and Git Operations'
- Related: GitHub Community Discussion #137976 (merge queue orphaned workflows)
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 .github/actions/core-cicd/setup-java/action.yml around line 101 and review .claude/diagnostics/run-21876576401/DIAGNOSIS.md alongside the failed Actions run. Verify the SDKMan settings prevent ANSI text from entering JAVA_HOME during simulated network failure, then confirm the workflow documentation records the change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, java, shell
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100