Skip to content

SONARJAVA-6231 Set up orchestrator cache#5549

Open
tomasz-tylenda-sonarsource wants to merge 4 commits intomasterfrom
tt/cache
Open

SONARJAVA-6231 Set up orchestrator cache#5549
tomasz-tylenda-sonarsource wants to merge 4 commits intomasterfrom
tt/cache

Conversation

@tomasz-tylenda-sonarsource
Copy link
Copy Markdown
Contributor

@tomasz-tylenda-sonarsource tomasz-tylenda-sonarsource commented Apr 2, 2026

@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod bot changed the title Set up orchestrator cache SONARJAVA-6231 Set up orchestrator cache Apr 2, 2026
@hashicorp-vault-sonar-prod
Copy link
Copy Markdown
Contributor

hashicorp-vault-sonar-prod bot commented Apr 2, 2026

SONARJAVA-6231

@tomasz-tylenda-sonarsource tomasz-tylenda-sonarsource marked this pull request as ready for review April 2, 2026 12:32
@sonar-review-alpha
Copy link
Copy Markdown

sonar-review-alpha bot commented Apr 2, 2026

Summary

Adds caching for the SonarQube orchestrator downloads to reduce Repox usage. Introduces a reusable GitHub Action that caches the orchestrator directory using a week-based key (which auto-purges weekly), skips caching for DEV versions, and integrates it into the ruling QA and plugin QA jobs. Also adds a manual cleanup workflow for cache management.

What reviewers should know

Where to focus: Start with the new orchestrator-cache/action.yml to understand the caching strategy—note the week-based key (%Y-%U) ensures automatic weekly purges without staleness issues, and the if: inputs.sq-version != 'DEV' guard prevents caching development builds. Then review how it's integrated into build.yml—the action is called in both QA jobs before the mvn runs. The sq_version matrix variable replaced the hardcoded LATEST_RELEASE to support future flexibility.

Non-obvious: The cache key includes github.run_id for uniqueness, then falls back to restore-keys with just the version and week prefix—this is intentional GitHub Actions cache behavior. The cleanup workflow is separate and manual-only (workflow_dispatch), giving operators control over when to clean.

Watch for: This assumes the ORCHESTRATOR_HOME directory exists before SQ downloads—the action creates it with mkdir -p, so the flow is: create dir → restore cache (or skip if empty) → run tests (which populate it if needed). The matrix change adds sq_version: LATEST_RELEASE to all four test combinations, so caching is applied uniformly.


  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

sonar-review-alpha[bot]

This comment was marked as outdated.

@sonarqube-next
Copy link
Copy Markdown

sonarqube-next bot commented Apr 2, 2026

Copy link
Copy Markdown

@sonar-review-alpha sonar-review-alpha bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! ✅

Clean, focused implementation. The cache action is correctly wired into both QA jobs, the DEV bypass works as intended, and the weekly key rotation is a sound strategy for keeping cache fresh without manual intervention.

🗣️ Give feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant