Skip to content

BUILD-10724 fix provision-s3-cache job for tests#50

Merged
julien-carsique-sonarsource merged 1 commit intomasterfrom
fix/jcarsique/BUILD-10724-migrationGh2s3Test
Mar 24, 2026
Merged

BUILD-10724 fix provision-s3-cache job for tests#50
julien-carsique-sonarsource merged 1 commit intomasterfrom
fix/jcarsique/BUILD-10724-migrationGh2s3Test

Conversation

@julien-carsique-sonarsource
Copy link
Copy Markdown
Contributor

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

Fix https://github.com/SonarSource/gh-action_cache/actions/runs/23498187931/job/68385308447#annotation:4:9

In provision-s3-cache, the action has import mode enabled by default. Since S3 was empty on first run, it fell back to GitHub cache and found test-migration-s3hit (saved with github-content by provision-github-cache), restored that, and then the post-step saved github-content to S3 — overwriting the intended s3-content.

Log confirms:

  • Cache not found for input keys: refs/heads/master/test-migration-s3hit
  • Cache hit for: test-migration-s3hit ← GitHub import!
  • Cache saved with key: refs/heads/master/test-migration-s3hit ← saves github-content to S3

Fix: add import-github-cache: 'false' to the provision-s3-cache step so the GitHub import can't interfere.

@julien-carsique-sonarsource julien-carsique-sonarsource requested a review from a team as a code owner March 24, 2026 16:50
@sonarqube-cloud-us
Copy link
Copy Markdown

@sonar-review-alpha
Copy link
Copy Markdown

Summary

Adds import-github-cache: 'false' to the provision-s3-cache test job to disable falling back to GitHub's native cache. This ensures the test actually validates S3 cache behavior instead of potentially hitting GitHub's cache as a fallback, making the test more reliable and focused.

What reviewers should know

The change is a single line in .github/workflows/test-cache-migration-gh2s3.yml (line 48). The parameter prevents the cache action from importing cached data from GitHub's native cache service, forcing the test to exercise only the S3 backend. This is critical for a migration test — without this flag, a cache hit could come from GitHub instead of S3, masking issues in the S3 implementation.


  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

@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.

Conclusion: Clean one-line fix that correctly scopes the provision-s3-cache test job to S3 only.

🗣️ Give feedback

@julien-carsique-sonarsource julien-carsique-sonarsource merged commit 4b32fcd into master Mar 24, 2026
20 checks passed
@julien-carsique-sonarsource julien-carsique-sonarsource deleted the fix/jcarsique/BUILD-10724-migrationGh2s3Test branch March 24, 2026 18:01
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