Skip to content

BUILD-10801: Set S3 as the default backend for all repositories#53

Merged
julien-carsique-sonarsource merged 1 commit intomasterfrom
feat/jcarsique/BUILD-10801-defaultS3
Mar 26, 2026
Merged

BUILD-10801: Set S3 as the default backend for all repositories#53
julien-carsique-sonarsource merged 1 commit intomasterfrom
feat/jcarsique/BUILD-10801-defaultS3

Conversation

@julien-carsique-sonarsource
Copy link
Copy Markdown
Contributor

@julien-carsique-sonarsource julien-carsique-sonarsource commented Mar 26, 2026

Summary

  • Removes the visibility-based split (public→GitHub, private→S3) in the auto-detection step; all repositories now default to S3
  • Adds a was-github-default output from the backend-detection step to identify public repos that previously used GitHub cache by default
  • Extends migration mode detection: in addition to explicitly forced S3, public repos with auto-detected S3 also enable import by default (they had GitHub cache entries to migrate)
  • Updates README accordingly: intro, Backend Selection, import-github-cache default description, and Migration Mode resolution order
  • Adds test scenario 5 to test-cache-migration-gh2s3.yml: auto-detected S3 on a public repo triggers GitHub import via was-github-default=true (distinct from the backend-source=forced path in scenario 1)

Test plan

CI-covered:

  • Auto-detected S3 (public repo) → GitHub import enabled (test-auto-public-import-enabled)
  • Auto-detected S3, forced backend: s3 → migration enabled (test-s3-import-enabled)
  • import-github-cache: false input → migration disabled (test-s3-import-disabled)
  • CACHE_IMPORT_GITHUB=false env var → migration disabled (test-s3-import-disabled-via-env)
  • S3 hit → GitHub import skipped (test-s3-hit-skips-github-import)
  • backend: github input → GitHub backend (test-action.yml)

Manual — will be covered after merge, before release, via dogfooding on the dummy repositories:

  • Public repo, no override → S3 backend, migration enabled
  • Any repo, CACHE_BACKEND=github env var → GitHub backend

@julien-carsique-sonarsource julien-carsique-sonarsource force-pushed the feat/jcarsique/BUILD-10801-defaultS3 branch from bdf92e9 to fb94ac5 Compare March 26, 2026 11:48
@julien-carsique-sonarsource julien-carsique-sonarsource marked this pull request as ready for review March 26, 2026 11:48
@julien-carsique-sonarsource julien-carsique-sonarsource requested a review from a team as a code owner March 26, 2026 11:48
@sonar-review-alpha
Copy link
Copy Markdown

sonar-review-alpha bot commented Mar 26, 2026

Summary

Changes the default cache backend from visibility-based (public→GitHub, private→S3) to S3 for all repositories. Public repos now auto-enable GitHub cache import by default (was-github-default output) to maintain warm cache hits during migration—they previously used GitHub cache, so they have entries to migrate. Adds test scenario validating this new auto-migration path for public repos.

What reviewers should know

Start in action.yml to see the core logic change (lines 81–85): all repos now default to S3, public repos just set WAS_GITHUB_DEFAULT=true instead of switching to GitHub. The import resolution logic (lines 152–156) shows how this output gates migration enablement—public repos now take the same path as explicitly forced S3. The README updates explain why public repos get auto-migration (they had GitHub cache entries), distinct from the forced S3 path. Scenario 5 in the test workflow demonstrates this: a public repo with no backend input should auto-detect S3 and import from GitHub—verify it hits both checks.


  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

sonar-review-alpha[bot]

This comment was marked as resolved.

@julien-carsique-sonarsource julien-carsique-sonarsource force-pushed the feat/jcarsique/BUILD-10801-defaultS3 branch from fb94ac5 to 4a8bf00 Compare March 26, 2026 13:06
sonar-review-alpha[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor

@bwalsh434 bwalsh434 left a comment

Choose a reason for hiding this comment

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

LGTM!!

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@julien-carsique-sonarsource julien-carsique-sonarsource force-pushed the feat/jcarsique/BUILD-10801-defaultS3 branch from 4a8bf00 to d76d0be Compare March 26, 2026 14:29
@sonarqube-cloud-us
Copy link
Copy Markdown

@sonarqubecloud
Copy link
Copy Markdown

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 change. The logic flows correctly across all backend-selection combinations (forced input, env var, auto-detected public, auto-detected private), the new was-github-default signal is properly scoped to the auto-detection branch only, and the test scenario correctly exercises the new code path distinct from the forced-S3 path.

🗣️ Give feedback

@julien-carsique-sonarsource julien-carsique-sonarsource merged commit 86a3c04 into master Mar 26, 2026
21 checks passed
@julien-carsique-sonarsource julien-carsique-sonarsource deleted the feat/jcarsique/BUILD-10801-defaultS3 branch March 26, 2026 14:35
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.

2 participants