← Back to Pull requests

Add daily VM image refresh for Git mirrors, Docker containers, and Bazel repo cache #3027

Closed
unknown closed this pull request without merging on Nov 25, 2026 09:54 UTC
View on GitHub
unknown unknown commented on Nov 16, 2026 15:22 UTC
Author

Adds refresh mode BAZEL_REFRESH_VM_IMAGE to Create VM Images pipelines and schedule it to run beside the full image build from scratch.

Instead of reinstalling the OS and toolchains and packages from scratch (the full build), the refresh boots from the current production VM image and updates three caches:

1. Git mirrors: Fetches the latest commits for all mirrored Git repos so CI jobs only download a tiny delta from GitHub during git clone.
2. Docker containers (Linux): Pulls the latest container digests so Linux CI jobs start containers immediately from local disk without waiting on registry pulls.
3. Bazel repository cache (repo_cache): Pre-warms and updates the external dependencies of Bazel's own CI (downloaded archives only, no repo contents cache) by running bazel fetch //src:bazel //src:test_repos (Linux with --config=ci-linux), so Bazel presubmit and postsubmit jobs don't have to re-download them on every run, avoiding network timeouts and download flakes. Windows jobs use the cache directly; Linux jobs will use it once bazel#32768 stops deleting it at the start of each job.

| | Full build | Daily refresh |
|---|---|---|
| When | 1st of the month (Linux 04:00 UTC, Windows 05:00 UTC) | Mon–Thu (Linux 04:00 UTC, Windows 05:00 UTC), skipped on the 1st |
| Starts from | Clean base OS image | Current prod image |
| OS packages, SDKs, tools | Installed from scratch | Unchanged (skipped) |
| Git mirrors | Seeded from the GCS tarball (refreshed monthly) | git fetch from GitHub for each existing mirror |
| Docker images (Linux) | Pulled | Pulls the current list, removes images no longer in it |
| Bazel repository cache | Pre-warmed (downloads only) | Pre-warmed (downloads only) |
| Testing | Bazel presubmits in bazel-testing | Bazel presubmits in bazel-testing |
| Promotion | Manual (Confirm + Promote) | Automatic |
| If presubmits fail | Choose: roll back or continue | Choose: roll back or continue |

Extra changes:

  • Removes the redundant testing-confirmation step and skips the manual promote step on refresh runs, so refreshes promote automatically once the testing presubmits pass, while full builds still wait for approval.

  • After a successful promotion, deletes older images and keeps only the newest 2 per family (testing and prod), so the previous image is still available for rollback.

  • The update-git-mirror-tar-ball job now runs monthly at 03:00 UTC on the 1st, one hour before the monthly full build that uses it, instead of weekly. The refresh doesn't use the tarball; it fetches mirrors directly from GitHub.

  • The refresh skips the 1st of the month, so it never runs at the same time as the monthly full build.
  • Diff: 346 lines (+259 / -87) across 4 files Reviewer: ted-xie Review duration: 12632m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 346 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    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.350
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3027"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 42.4% (MEDIUM) · Higher = larger blast radius
    42.4%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 16.7% · Safe to merge
    16.7%