Skip to content

Flaky Test: TestGameServerAllocationReturnLabels#4435

Open
Sivasankaran25 wants to merge 4 commits intogoogleforgames:mainfrom
Sivasankaran25:flaky/gameserver
Open

Flaky Test: TestGameServerAllocationReturnLabels#4435
Sivasankaran25 wants to merge 4 commits intogoogleforgames:mainfrom
Sivasankaran25:flaky/gameserver

Conversation

@Sivasankaran25
Copy link
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:

Which issue(s) this PR fixes:

Closes #4431

Special notes for your reviewer:

@Sivasankaran25 Sivasankaran25 self-assigned this Jan 27, 2026
@github-actions github-actions bot added kind/bug These are bugs. size/XS labels Jan 27, 2026
@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: a765df12-e1ab-4f81-82d0-68838557c782

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/4435/head:pr_4435 && git checkout pr_4435
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.56.0-dev-9bd03d6

@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: 07ca1545-b7cb-4a5c-b16f-477889d0e21a

Status: FAILURE

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

@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: 91fde476-2248-4b2f-93e8-d90926e17378

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/4435/head:pr_4435 && git checkout pr_4435
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.56.0-dev-d3cf825

Copy link
Collaborator

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

I think this is heading in the right direction, but isn't quite there yet.

require.Equal(t, allocationv1.GameServerAllocationAllocated, gsa.Status.State)
require.NotEmpty(t, gsa.Status.GameServerName)

require.Eventually(t, func() bool {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I recently found https://pkg.go.dev/github.com/stretchr/testify@v1.11.1/require#EventuallyWithT - which for more complicated test conditions is definitely a better option for sure.

Then we can maintain the checks for labels and annotations, and have them reported in a way that's easier to read.

gsa, err = framework.AgonesClient.
AllocationV1().
GameServerAllocations(framework.Namespace).
Create(ctx, gsa.DeepCopy(), metav1.CreateOptions{})
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this fix the flake where this comes back with an Unallocated state? Should the eventually be wrapping the allocation call?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky Test: TestGameServerAllocationReturnLabels

3 participants