← Back to Pull requests

ci: build e2e example images, skipping unchanged ones #4790

Closed
unknown closed this pull request without merging on Oct 25, 2026 00:23 UTC
View on GitHub
unknown unknown commented on Oct 19, 2026 17:48 UTC
Author

What type of PR is this?

/kind cleanup

What this PR does / Why we need it:

The examples e2e tests (test/e2e/examples_test.go) pinned the published example images, so every example version bump needed a manual update to the tests, and changes to an example or its SDK were never tested before release. This has already drifted: rust-simple is 0.14 in its Makefile, but the test used 0.13.

CI now builds the example images used by those tests, as well as simple-game-server (which was previously rebuilt on every run), and skips any build whose source hasn't changed:

  • The new ci/push-e2e-example-images.sh hashes the git trees of each example's build inputs (the example directory plus the SDK or Go source it builds from). If ${_REGISTRY}/<image>:src-<hash> already exists, the build is skipped. Otherwise, it's built and pushed using the example's own make push.

  • Either way, the image is then tagged with ${COMMIT_SHA}. This only copies the manifest, so it takes about a second.

  • In cloudbuild.yaml, the build-push-simple-game-server step is replaced by build-push-e2e-example-images. The new step starts as soon as make-docker is built and runs alongside lint and the other builds, instead of waiting on push-images.

  • The tag is passed through ci/e2e-test-cloudbuild.yaml → entrypoint.sh → e2e.sh → build/Makefile (EXAMPLE_IMAGE_REGISTRY / EXAMPLE_IMAGE_TAG) into the new --example-image-registry and --example-image-tag e2e framework flags.

  • The tests use framework.ExampleImage(name, defaultVersion). When no tag is passed (local runs), it falls back to the published image at defaultVersion.
  • This also avoids the cost of building the Windows version of simple-game-server on every run, once we set up CI for Windows nodes.

    Which issue(s) this PR fixes:

    N/A

    Did you use AI tools in preparing this PR?:

    Y

    Special notes for your reviewer:

  • Marked as draft until CI passes. This is the first run of the new step in Cloud Build, and it's also the first time the hash relies on .git being available in the Cloud Build workspace (VERSION in build/Makefile already uses git rev-parse there).

  • The first run will build all six images, and cpp-simple compiles gRPC from source, so it will be slow. Runs where nothing changed should skip all six builds.

  • Images are pushed to the ci registry, which is cleaned up periodically. When an image is cleaned up, it's rebuilt once on the next run.

  • Tested locally against a local registry. The first run built simple-game-server for real (the other five used a stub make). The second run skipped all six and retagged them in about 0s. make lint test-go passes.
  • Diff: 337 lines (+252 / -85) across 4 files Reviewer: markmandel Review duration: 7594m
    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 · 337 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.348
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #4790"
    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.2% (MEDIUM) · Higher = larger blast radius
    42.2%
    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%