chore(ci): allow failed test jobs to restore the cache on retry [EXT-00] - #2977
Conversation
Code Review Agent Run #19512cActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Changelist by BitoThis pull request implements the following key changes.
|
Impact Analysis by BitoInteraction DiagramsequenceDiagram
participant Dev as Developer
participant GH as GitHub Actions
participant BW as Build Workflow<br/>🔄 Updated | ●●● High
participant CW as Check Workflow<br/>🔄 Updated | ●●● High
participant RW as Release Workflow<br/>🔄 Updated | ●●● High
participant TW as Test Workflows<br/>🔄 Updated | ●●● High
participant AC as Actions Cache
participant Dist as Build Artifacts
Dev->>GH: Push code / Create PR
GH->>BW: Trigger build workflow
BW->>Dist: Build and save artifacts
BW->>AC: Save cache with key build-cache-${{ github.run_id }}
AC-->>BW: Cache saved
GH->>CW: Trigger check workflow
CW->>AC: Restore cache with key build-cache-${{ github.run_id }}
AC-->>CW: Cache restored
CW->>Dist: Access build artifacts
CW->>CW: Run lint, format, unit tests
GH->>TW: Trigger test workflows
TW->>AC: Restore cache with key build-cache-${{ github.run_id }}
AC-->>TW: Cache restored
TW->>Dist: Access build artifacts
TW->>TW: Run integration tests
GH->>RW: Trigger release workflow
RW->>AC: Restore cache with key build-cache-${{ github.run_id }}
AC-->>RW: Cache restored
RW->>Dist: Access build artifacts
RW->>RW: Run semantic release
Note over BW, TW: Cache key simplified by removing run_attempt suffix
Note over BW, TW: Enables cache reuse across workflow retries
This MR simplifies the GitHub Actions cache key by removing the run_attempt suffix from build-cache keys across all workflows. This allows build artifacts to be reused when workflows are retried, improving CI efficiency. The change affects the Build, Check, Release, and Test workflows that share the dist folder cache. Cross-Repository Impact Analysis
Code Paths AnalyzedImpact: Flow: Direct Changes (Diff Files): Repository Impact: Cross-Repository Dependencies: Database/Caching Impact: API Contract Violations: Infrastructure Dependencies: Additional Insights: Testing RecommendationsFrontend Impact: Service Integration: Data Serialization: Privacy Compliance: Backward Compatibility: OAuth Functionality: Reliability Testing: Additional Insights: Analysis based on known dependency patterns and edges. Actual impact may vary. |
335ac15 to
e2908a1
Compare
Code Review Agent Run #ed746eActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
e2908a1 to
cb3944a
Compare
There was a problem hiding this comment.
Code Review Agent Run #bda024
Actionable Suggestions - 1
-
.github/workflows/release.yaml - 1
- Cache key run_attempt removal · Line 64-68
Filtered by Review Rules
Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.
-
.github/workflows/test-integration.yaml - 1
- CWE-400: Broken Cache Key · Line 36-36
-
.github/workflows/check.yaml - 1
- Missing cache save step · Line 31-31
Review Details
-
Files reviewed - 5 · Commit Range:
cb3944a..cb3944a- .github/workflows/build.yaml
- .github/workflows/check.yaml
- .github/workflows/release.yaml
- .github/workflows/test-demo-projects.yaml
- .github/workflows/test-integration.yaml
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at jared.jolton@contentful.com.
Documentation & Help
|
/resolve |
|
/resolve |
|
/review Context for re-review: the prior change request about keeping |
|
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR). |
|
/abort |
cb3944a to
e724211
Compare
There was a problem hiding this comment.
Code Review Agent Run #968484
Actionable Suggestions - 1
-
.github/workflows/build.yaml - 1
- Cache key removes attempt isolation · Line 39-39
Additional Suggestions - 1
-
.github/workflows/check.yaml - 1
-
Cache key fix verified correct · Line 31-31Intentional change. The previous restore key `build-cache-${{ github.run_id }}-${{ github.run_attempt }}` never matched the save key `build-cache-${{ github.run_id }}` (build.yaml line 39), causing cache misses on every run. This change removes `-${{ github.run_attempt }}` so restore keys match save keys, enabling cache hits on workflow retries as intended by the commit.
-
Review Details
-
Files reviewed - 5 · Commit Range:
e724211..e724211- .github/workflows/build.yaml
- .github/workflows/check.yaml
- .github/workflows/release.yaml
- .github/workflows/test-demo-projects.yaml
- .github/workflows/test-integration.yaml
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at jared.jolton@contentful.com.
Documentation & Help
Summary
Fix the CI build cache key so rerunning failed jobs can restore the existing
distcache.Description
This removes
github.run_attemptfrom the build cache key in the reusable workflows, while keeping the cache scoped to the current workflow run viagithub.run_id.Motivation and Context
Our integration jobs could not be rerun in GitHub because the cache restore step was using an attempt-specific key with
fail-on-cache-miss: true. This keeps the same run-scoped cache available across reruns of failed jobs.Tip
This is safe because the cache is still scoped to the current workflow run via
github.run_id. We’re only removinggithub.run_attemptso rerun attempts can reuse the original build output instead of failing on a cache miss.Summary by Bito
This PR updates GitHub Actions cache key configuration across five CI workflow files to allow failed integration jobs to be rerun and restore the existing build cache. By removing `github.run_attempt` from the cache key pattern, the same cache can be accessed across multiple retry attempts within the same workflow run.
Detailed Changes