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 GitHub as GitHub Actions
participant Workflow as GitHub Workflows<br/>🔄 Updated | ●●○ Medium
participant Cache as Cache System
participant Build as Build Process
participant Test as Test Process
Dev->>GitHub: Push code changes
GitHub->>Workflow: Trigger workflow
Workflow->>Cache: Check cache with updated key
Cache-->>Workflow: Cache miss
Workflow->>Build: Start build process
Build->>Build: Compile source code
Build->>Build: Package artifacts
Build-->>Workflow: Build complete
Workflow->>Cache: Store in cache
Cache-->>Workflow: Cache updated
Workflow->>Test: Run tests
Test-->>Workflow: Tests passed
Workflow-->>GitHub: Workflow success
No direct upstream/downstream impact detected in repository scan or cross-repo dependency analysis. Code Paths AnalyzedImpact: Flow: Direct Changes (Diff Files): Repository Impact: Cross-Repository Dependencies: Database/Caching Impact: API Contract Violations: Infrastructure Dependencies: 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. |
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
Fix the CI build cache key so rerunning failed jobs can restore the existing `dist` cache. This removes `github.run_attempt` from the build cache key in the reusable workflows, while keeping the cache scoped to the current workflow run via `github.run_id`.
Detailed Changes