ci: build e2e example images, skipping unchanged ones #4790
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
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
markmandel
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-simpleis0.14in its Makefile, but the test used0.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:
ci/push-e2e-example-images.shhashes 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 ownmake push.${COMMIT_SHA}. This only copies the manifest, so it takes about a second.cloudbuild.yaml, thebuild-push-simple-game-serverstep is replaced bybuild-push-e2e-example-images. The new step starts as soon asmake-dockeris built and runs alongside lint and the other builds, instead of waiting onpush-images.ci/e2e-test-cloudbuild.yaml→entrypoint.sh→e2e.sh→build/Makefile(EXAMPLE_IMAGE_REGISTRY/EXAMPLE_IMAGE_TAG) into the new--example-image-registryand--example-image-tage2e framework flags.framework.ExampleImage(name, defaultVersion). When no tag is passed (local runs), it falls back to the published image atdefaultVersion.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:
.gitbeing available in the Cloud Build workspace (VERSIONinbuild/Makefilealready usesgit rev-parsethere).ciregistry, which is cleaned up periodically. When an image is cleaned up, it's rebuilt once on the next run.make). The second run skipped all six and retagged them in about 0s.make lint test-gopasses.