Skip to content

test: simplify autoscaler e2e tests for minikube compatibility#4331

Merged
markmandel merged 3 commits intoagones-dev:mainfrom
markmandel:e2e/minikube-improvement
Nov 19, 2025
Merged

test: simplify autoscaler e2e tests for minikube compatibility#4331
markmandel merged 3 commits intoagones-dev:mainfrom
markmandel:e2e/minikube-improvement

Conversation

@markmandel
Copy link
Copy Markdown
Collaborator

What type of PR is this?

Uncomment only one /kind <> line, press enter to put that in a new line, and remove leading whitespace from that line:

/kind breaking
/kind bug

/kind cleanup

/kind documentation
/kind feature
/kind hotfix
/kind release

What this PR does / Why we need it:

  • Change ImagePullPolicy from PullAlways to PullIfNotPresent
  • Remove unnecessary container port name 'autoscaler'
  • Remove TargetPort reference to simplify service configuration

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

For some reason using a name for TargetPort failed on minikube, but this fixed it 🤷‍♂️

@markmandel markmandel added the area/tests Unit tests, e2e tests, anything to make sure things don't break label Nov 10, 2025
@github-actions github-actions bot added kind/cleanup Refactoring code, fixing up documentation, etc size/XS labels Nov 10, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR simplifies the webhook autoscaler configuration in the end-to-end test by removing unnecessary fields and changing the image pull policy.

  • Changed the container image pull policy from PullAlways to PullIfNotPresent to improve test performance
  • Removed the named port reference from the container port and service port definitions
  • Simplified the service port configuration by removing the TargetPort specification

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@markmandel markmandel force-pushed the e2e/minikube-improvement branch from 3ff11a9 to 5b5d83d Compare November 10, 2025 05:08
@agones-bot
Copy link
Copy Markdown
Collaborator

Build Failed 😭

Build Id: 95179da2-92de-4512-9085-c3fb87bc64a8

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@markmandel markmandel force-pushed the e2e/minikube-improvement branch from 5b5d83d to a435dd2 Compare November 10, 2025 05:24
@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: 7bd2906b-d6c7-4e74-968f-ed9c736971c5

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/4331/head:pr_4331 && git checkout pr_4331
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.54.0-dev-a435dd2

Name: "newport",
Port: 8000,
TargetPort: intstr.IntOrString{StrVal: "autoscaler"},
TargetPort: intstr.FromInt(8000),
Copy link
Copy Markdown
Collaborator

@lacroixthomas lacroixthomas Nov 13, 2025

Choose a reason for hiding this comment

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

I was doing some test locally, it seems to be working by using intstr.FromString("autoscaler") (and keeping the name: "autoscaler" L750

intstr.FromString add the type with it: IntOrString{Type: String, StrVal: val}, I've got it working locally, not sure how it works on the background, if you can also test on your side, otherwise it's good to me to keep it like this 😄

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.

It might be by default to an int for the type and the validation expect it to be so and fails the creation of the service *
I'm not fully sure about it, but it's possible

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good find! That worked!

As an interesting thing, checked the implementation:

// FromString creates an IntOrString object with a string value.
func FromString(val string) IntOrString {
	return IntOrString{Type: String, StrVal: val}
}

No Type value on the original implementation!

- Change ImagePullPolicy from PullAlways to PullIfNotPresent
- Remove unnecessary container port name 'autoscaler'
- Remove TargetPort reference to simplify service configuration

For some reason using a name for TargetPort failed on minikube, but this
fixed it 🤷‍♂️
@markmandel markmandel force-pushed the e2e/minikube-improvement branch from a435dd2 to 2dc879f Compare November 18, 2025 02:08
@markmandel
Copy link
Copy Markdown
Collaborator Author

Something weird happened to CI.

@markmandel
Copy link
Copy Markdown
Collaborator Author

/gcbrun

@markmandel markmandel force-pushed the e2e/minikube-improvement branch from 2dc879f to 5aeb0ae Compare November 18, 2025 15:46
@agones-bot
Copy link
Copy Markdown
Collaborator

Build Failed 😭

Build Id: 24910709-dec4-46e7-b649-c81cbcfad24d

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@markmandel
Copy link
Copy Markdown
Collaborator Author

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Failed 😭

Build Id: d96a7609-fb5f-4f14-aebc-c7317209824a

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@markmandel
Copy link
Copy Markdown
Collaborator Author

make[1]: Leaving directory '/workspace/build'
docker run --rm -v /workspace/build//.config/gcloud:/root/.config/gcloud -v ~/.kube/:/root/.kube -v ~/.config/helm:/root/.config/helm -v ~/.cache/helm:/root/.cache/helm -v /workspace:/go/src/agones.dev/agones -v /workspace/build//.gomod:/go/pkg/mod -v /workspace/build//.gocache:/root/.cache/go-build -e "KUBECONFIG=/root/.kube/config" -e "GO111MODULE=on" -w /go/src/agones.dev/agones  agones-build:a8d1f85932 go test -mod=vendor -race agones.dev/agones/pkg/... \
    agones.dev/agones/sdks/... agones.dev/agones/cmd/...
FAIL	agones.dev/agones/sdks/rust/target/debug/deps/rmetajHKWjf [setup failed]
FAIL	agones.dev/agones/sdks/... [setup failed]

wha?

@markmandel
Copy link
Copy Markdown
Collaborator Author

/gcbrun

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Failed 😭

Build Id: 9071009d-9881-4f24-aea4-dd5152d6b9b3

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@markmandel
Copy link
Copy Markdown
Collaborator Author

image ohnno

@markmandel
Copy link
Copy Markdown
Collaborator Author

/gcbrun

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: cc442318-5d50-45a0-bbe5-e2ca734ebe55

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/4331/head:pr_4331 && git checkout pr_4331
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.54.0-dev-60e888b

Copy link
Copy Markdown
Collaborator

@lacroixthomas lacroixthomas left a comment

Choose a reason for hiding this comment

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

LGTM ! 👍🏼

@markmandel markmandel merged commit 4b8abd0 into agones-dev:main Nov 19, 2025
4 checks passed
@markmandel markmandel deleted the e2e/minikube-improvement branch November 19, 2025 17:00
mnthe pushed a commit to mnthe/agones that referenced this pull request Mar 23, 2026
…s-dev#4331)

* test: simplify autoscaler e2e tests for minikube compatability

- Change ImagePullPolicy from PullAlways to PullIfNotPresent
- Remove unnecessary container port name 'autoscaler'
- Remove TargetPort reference to simplify service configuration

For some reason using a name for TargetPort failed on minikube, but this
fixed it 🤷‍♂️

* Review updates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tests Unit tests, e2e tests, anything to make sure things don't break kind/cleanup Refactoring code, fixing up documentation, etc size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants