Skip to content

ci: build autoscaler-webhook example image for e2e tests - #4810

Merged
lacroixthomas merged 2 commits into
agones-dev:mainfrom
markmandel:e2e/build-rest-of-images
Oct 29, 2026
Merged

lacroixthomas merged 2 commits into
agones-dev:mainfrom
markmandel:e2e/build-rest-of-images

Conversation

@markmandel

Copy link
Copy Markdown
Member

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 published autoscaler-webhook:0.23 image in defaultAutoscalerWebhook.

  • defaultAutoscalerWebhook now uses framework.ExampleImage("autoscaler-webhook", "0.23").
  • ci/push-e2e-example-images.sh now also builds autoscaler-webhook. It builds with the repository root as its Docker context and uses replace agones.dev/agones => ../../, so its build inputs are pkg go.mod go.sum .dockerignore.
  • TestGameServerPodTemplateSpecFailSchemaValidation hardcoded simple-game-server:0.44 in its YAML. It now uses framework.GameServerImage, so the version doesn't need bumping in two places. The image is never pulled, since the GameServer fails schema validation.
  • The --example-image-registry / --example-image-tag flag descriptions now say "e2e tests" rather than "examples tests", since they're no longer used only by examples_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:

  • The first CI run will build autoscaler-webhook from source. Later runs skip the build unless its inputs change.
  • Ran the three webhook tests and TestGameServerPodTemplateSpecFailSchemaValidation against minikube (no example image tag, so using the published autoscaler-webhook:0.23 fallback). All pass. make lint passes.

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>
@github-actions github-actions Bot added kind/cleanup Refactoring code, fixing up documentation, etc size/S labels Oct 28, 2026
@markmandel
markmandel requested a balanced review from Copilot October 28, 2026 22:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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-webhook to the cached CI image build workflow and selects it through framework.ExampleImage, preserving the published fallback for local runs.
  • Reuses framework.GameServerImage in 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

@agones-bot

Copy link
Copy Markdown
Collaborator

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:

git fetch https://github.com/googleforgames/agones.git pull/4810/head:pr_4810 && git checkout pr_4810
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.62.0-dev-13b8aaf

@lacroixthomas lacroixthomas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lacroixthomas
lacroixthomas enabled auto-merge (squash) October 29, 2026 21:32
@agones-bot

Copy link
Copy Markdown
Collaborator

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:

git fetch https://github.com/googleforgames/agones.git pull/4810/head:pr_4810 && git checkout pr_4810
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.62.0-dev-0c37fa4

@lacroixthomas
lacroixthomas merged commit 31b286c into agones-dev:main Oct 29, 2026
4 checks passed
@markmandel
markmandel deleted the e2e/build-rest-of-images branch October 31, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/cleanup Refactoring code, fixing up documentation, etc size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants