Skip to content

test: deferred cleanup for GameServer in TestSuperTuxKartGameServerReady#4379

Merged
markmandel merged 2 commits intoagones-dev:mainfrom
markmandel:flaky/supertuxkart-v2
Dec 10, 2025
Merged

test: deferred cleanup for GameServer in TestSuperTuxKartGameServerReady#4379
markmandel merged 2 commits intoagones-dev:mainfrom
markmandel:flaky/supertuxkart-v2

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:

Add a deferred function to properly delete the GameServer after the test completes, ensuring resources are cleaned up even if the test fails. Also update error handling to check if readyGs is not nil before logging events.

This makes rerunning the test hundreds of time to check for flakes much easier without a super large cluster.

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

N/A

Add a deferred function to properly delete the GameServer after the test
completes, ensuring resources are cleaned up even if the test fails.
Also update error handling to check if readyGs is not nil before
logging events.

This makes rerunning the test hundreds of time to check for flakes much
easier without a super large cluster.
@github-actions github-actions bot added kind/cleanup Refactoring code, fixing up documentation, etc size/S labels Dec 8, 2025
@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: 02d54f93-47c4-4f37-aa15-278bb9f47df6

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/4379/head:pr_4379 && git checkout pr_4379
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.55.0-dev-a845b04

@markmandel markmandel added the area/tests Unit tests, e2e tests, anything to make sure things don't break label Dec 9, 2025
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.

Oooh good catch, not sure we clean up the ressources all the times even from other e2e in case of errors, could definitively be an issue
LGTM !

@markmandel markmandel enabled auto-merge (squash) December 10, 2025 15:11
@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: c1f99382-c075-448b-b5e5-83bd74607168

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/4379/head:pr_4379 && git checkout pr_4379
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.55.0-dev-edbe62d

@markmandel markmandel merged commit c242b1f into agones-dev:main Dec 10, 2025
4 checks passed
@markmandel markmandel deleted the flaky/supertuxkart-v2 branch December 10, 2025 16:10
mnthe pushed a commit to mnthe/agones that referenced this pull request Mar 23, 2026
…ady (agones-dev#4379)

Add a deferred function to properly delete the GameServer after the test
completes, ensuring resources are cleaned up even if the test fails.
Also update error handling to check if readyGs is not nil before
logging events.

This makes rerunning the test hundreds of time to check for flakes much
easier without a super large cluster.
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/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants