← Back to Pull requests

refresh cache download URL when Azure returns BlobNotFound #53

Open
crazy-max opened this pull request with 133 lines diff across 2 files
View on GitHub
crazy-max crazy-max commented on Nov 30, 2026 14:41 UTC
Author

fixes https://github.com/moby/buildkit/issues/7283

BuildKit can accept a GitHub Actions cache hit and then fail to read the layer when Azure returns BlobNotFound for its signed URL.

Ask GitHub for a fresh URL once and retry at the original byte offset. Require the lookup to match the original key so a restore-key prefix cannot cause the download to resume from a different blob.

Diff: 133 lines (+113 / -20) across 2 files Reviewer: crazy-max Review duration: 7897m
All Vouch review confidence checks passed
Residual risk 0.09 = Change Risk (0.48) × (1 − Review Confidence (0.82)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 133 lines diff across 2 files
0.48
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.89 · 1 substantive comment(s)
0.89
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
81%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.293
Self Review self_review
0.140
Real PR Conversation Timeline
2 items
crazy-max crazy-max commented on code on Nov 30, 2026 14:48 UTC
Code Review
cache_v2.go:1
@@ -218,11 +219,10 @@ func (c *Cache) loadV2(ctx context.Context, keys ...string) (*Entry, error) {
 		if err != nil {
 			return errors.WithStack(err)
 		}
-		if v == nil {
+		if v == nil || v.Key != ce.Key {
 			return errors.New("cache entry no longer exists")
 		}
 		ce.URL = v.URL
-		ce.Key = v.Key

removed ce.Key = v.Key because the refresh already requires both keys to match.

Reviewers
Assignees
crazy-max crazy-max
Labels
risk: low confidence: 81.6% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 47.8% (MEDIUM) · Higher = larger blast radius
47.8%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 81.6% · Lower = rushed or shallow review
81.6%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 8.8% · Safe to merge
8.8%