BUILD-10724: GitHub→S3 cache migration fallback#125
BUILD-10724: GitHub→S3 cache migration fallback#125julien-carsique-sonarsource merged 2 commits intomasterfrom
Conversation
2cc4fb5 to
540d520
Compare
|
https://github.com/SonarSource/sonar-dummy-js/actions/runs/23494106215/job/68370132963?pr=125 # Build
## S3 backend and import mode ON
Using default import mode: true
## S3 lookup
Cache not found for input keys: test/jcarsique/BUILD-10724-migrationGh2s3/npm-Linux-Build-655c2e22a7bceb4cba87bd33429d34e2ab54e41f19dab78fad56d9bc645173e0, test/jcarsique/BUILD-10724-migrationGh2s3/npm-Linux-Build-
## GitHub lookup
Cache hit for: npm-Linux-Build-655c2e22a7bceb4cba87bd33429d34e2ab54e41f19dab78fad56d9bc645173e0
Cache restored from key: npm-Linux-Build-655c2e22a7bceb4cba87bd33429d34e2ab54e41f19dab78fad56d9bc645173e0
## Post Run
Cache saved with key: test/jcarsique/BUILD-10724-migrationGh2s3/npm-Linux-Build-655c2e22a7bceb4cba87bd33429d34e2ab54e41f19dab78fad56d9bc645173e0
---
# Custom NPM command
## S3 lookup
Cache restored from key: test/jcarsique/BUILD-10724-migrationGh2s3/npm-Linux-Build-655c2e22a7bceb4cba87bd33429d34e2ab54e41f19dab78fad56d9bc645173e0
## Post Run
Cache hit occurred on the primary key test/jcarsique/BUILD-10724-migrationGh2s3/npm-Linux-Build-655c2e22a7bceb4cba87bd33429d34e2ab54e41f19dab78fad56d9bc645173e0, not saving cache.✔️ No need for migration in the second run. # Build
## S3 lookup
Cache restored successfully
Cache restored from key: test/jcarsique/BUILD-10724-migrationGh2s3/npm-Linux-Build-655c2e22a7bceb4cba87bd33429d34e2ab54e41f19dab78fad56d9bc645173e0
## Post Run
Cache hit occurred on the primary key test/jcarsique/BUILD-10724-migrationGh2s3/npm-Linux-Build-655c2e22a7bceb4cba87bd33429d34e2ab54e41f19dab78fad56d9bc645173e0, not saving cache. |
62396c0 to
d2e1fcf
Compare
Tests the new import-github-cache feature from gh-action_cache: - S3 backend with import mode active (default migration behaviour) - S3 backend with import mode explicitly disabled (post-migration) - S3 backend with import mode disabled via CACHE_IMPORT_GITHUB env var Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
d2e1fcf to
0f073d2
Compare
SummaryTests the migration fallback mechanism for the cache backend transition (GitHub → S3). A new workflow validates three scenarios: (1) S3 with GitHub cache import enabled (default, tests the fallback feature), (2) S3 with import explicitly disabled, and (3) S3 with import disabled via environment variable. The test provisions a GitHub cache entry, then verifies that each scenario behaves correctly. Also updates existing workflows to force S3 backend globally. What reviewers should knowStart here: Review the new
|
There was a problem hiding this comment.
Pull request overview
Adds workflows and configuration to dogfood and validate the GitHub→S3 cache migration fallback behavior for SonarSource/gh-action_cache, while switching this repo’s CI workflows to force the S3 cache backend.
Changes:
- Force S3 caching in existing CI workflows via workflow-level
CACHE_BACKEND: s3. - Add a dedicated test workflow to exercise migration fallback and import-disabled modes (including env-var disabling).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .github/workflows/unified-dogfooding.yml | Forces S3 cache backend for unified dogfooding runs via CACHE_BACKEND. |
| .github/workflows/build.yml | Forces S3 cache backend for build pipeline via CACHE_BACKEND. |
| .github/workflows/test-cache-migration-gh2s3.yml | Adds a test matrix-style workflow to validate GitHub→S3 import fallback and disabling mechanisms. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0f073d2 to
0406398
Compare
|





Tests the
import-github-cachefeature introduced in SonarSource/gh-action_cache#45Also depends on SonarSource/ci-github-actions#236
Migrate sonar-dummy-js to S3 cache
What is being tested
test-s3-import-enabledtest-s3-import-disabledimport-github-cache: false— post-migration behaviourtest-s3-import-disabled-via-envCACHE_IMPORT_GITHUB=falseenv var — repo variable patternRelated