Repository navigation
ci: build autoscaler-webhook example image for e2e tests - #4810
Conversation
The fleet autoscaler webhook e2e tests pinned the published autoscaler-webhook image, so they missed the switch to example images built from source in agones-dev#4790. They now use framework.ExampleImage, and ci/push-e2e-example-images.sh builds autoscaler-webhook alongside the other example images. TestGameServerPodTemplateSpecFailSchemaValidation also hardcoded the simple-game-server image in its YAML, so it now uses framework.GameServerImage. Signed-off-by: Mark Mandel <mark@compoundtheory.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified in the changes enabling CI to use source-built webhook images.
No open issues 🎉
What changed in this PR
Extends #4790’s source-built example image workflow to the fleet autoscaler webhook tests, so CI can test webhook changes without waiting for a published image.
Changes:
- Adds
autoscaler-webhookto the cached CI image build workflow and selects it throughframework.ExampleImage, preserving the published fallback for local runs. - Reuses
framework.GameServerImagein the schema-validation test. - Updates example-image flag descriptions to reflect their broader e2e usage.
| File | Description |
|---|---|
test/e2e/gameserver_test.go |
Replaces the hardcoded image in validation-test YAML with the framework setting. |
test/e2e/framework/framework.go |
Broadens image flag help text from examples tests to e2e tests. |
test/e2e/fleetautoscaler_test.go |
Uses the configurable example image for webhook tests. |
ci/push-e2e-example-images.sh |
Adds the webhook image and its build inputs to the cached build list. |
Review effort: Balanced
|
Build Succeeded 🥳 Build Id: 2ebaa468-6113-4ce6-b148-401550217270 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
|
Build Succeeded 🥳 Build Id: 5b5f056a-d093-4e0d-8f58-41583b57f991 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
What type of PR is this?
/kind cleanup
What this PR does / Why we need it:
Follow-up to #4790, which switched the examples e2e tests to example images built from source in CI. The fleet autoscaler webhook tests (
TestAutoscalerWebhook,TestFleetAutoscalerTLSWebhook,TestAutoscalerWebhookWithMetadata) were missed, and still pinned the publishedautoscaler-webhook:0.23image indefaultAutoscalerWebhook.defaultAutoscalerWebhooknow usesframework.ExampleImage("autoscaler-webhook", "0.23").ci/push-e2e-example-images.shnow also buildsautoscaler-webhook. It builds with the repository root as its Docker context and usesreplace agones.dev/agones => ../../, so its build inputs arepkg go.mod go.sum .dockerignore.TestGameServerPodTemplateSpecFailSchemaValidationhardcodedsimple-game-server:0.44in its YAML. It now usesframework.GameServerImage, so the version doesn't need bumping in two places. The image is never pulled, since the GameServer fails schema validation.--example-image-registry/--example-image-tagflag descriptions now say "e2e tests" rather than "examples tests", since they're no longer used only byexamples_test.go.I reviewed the rest of
test/e2e/for other images. The remaining ones are third-party (registry.k8s.io/pause,alpine,nginx:alpine) or placeholders that are never pulled.Which issue(s) this PR fixes:
N/A
Did you use AI tools in preparing this PR?:
Y
Special notes for your reviewer:
autoscaler-webhookfrom source. Later runs skip the build unless its inputs change.TestGameServerPodTemplateSpecFailSchemaValidationagainst minikube (no example image tag, so using the publishedautoscaler-webhook:0.23fallback). All pass.make lintpasses.