Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flake: TestControllerAllocator #3264

Merged

Conversation

markmandel
Copy link
Member

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

What this PR does / Why we need it:

Fix fo flakiness in TestControllerAllocator unit test.

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

Also caught a linting issue in gke_test.go that for some reason wasn't picked up elsewhere. Weird.

@markmandel markmandel added kind/cleanup Refactoring code, fixing up documentation, etc area/tests Unit tests, e2e tests, anything to make sure things don't break labels Jul 13, 2023
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: baf7d934-a240-4dfd-8286-b698b9387af4

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/3264/head:pr_3264 && git checkout pr_3264
  • 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.34.0-dev-87c8231-amd64

@aimuz
Copy link
Collaborator

aimuz commented Jul 14, 2023

/lgtm

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gongmax, igooch, markmandel, zmerlynn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@markmandel markmandel enabled auto-merge (squash) July 14, 2023 16:13
@google-oss-prow google-oss-prow bot removed the lgtm label Jul 14, 2023
@google-oss-prow
Copy link

New changes are detected. LGTM label has been removed.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 4d6856e4-52b6-48de-9a53-f595e2413d4a

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

@markmandel markmandel disabled auto-merge July 14, 2023 16:31
@markmandel
Copy link
Member Author

Still failed on

--- FAIL: TestControllerAllocator (3.66s)
    --- FAIL: TestControllerAllocator/successful_allocation (3.66s)
        controller_test.go:118: 
            	Error Trace:	/go/src/agones.dev/agones/pkg/gameserverallocations/controller_test.go:118
            	            				/go/src/agones.dev/agones/pkg/gameserverallocations/controller_test.go:125
            	Error:      	Should be true
            	Test:       	TestControllerAllocator/successful_allocation
            	Messages:   	Failed: UnAllocated vs Allocated

So clearly I didn't fix the flake!

Fix fo flakiness in TestControllerAllocator unit test.

Also caught a linting issue in gke_test.go that for some reason wasn't
picked up elsewhere. Weird.
In theory, a cache could allocate the same GameServer twice. Since
there is no generational lock on the mock, we have to fake one.
@markmandel markmandel force-pushed the flaky/TestControllerAllocator branch from a525811 to 7d8d032 Compare July 14, 2023 20:25
@markmandel
Copy link
Member Author

Let's try this again. I think I might know what is happening.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 98705a72-75e9-49b8-b160-dbeac1716acd

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/3264/head:pr_3264 && git checkout pr_3264
  • 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.34.0-dev-7d8d032-amd64

@markmandel markmandel enabled auto-merge (squash) July 17, 2023 22:38
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 12cd8480-b545-4b1a-93e7-2da34189875d

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/3264/head:pr_3264 && git checkout pr_3264
  • 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.34.0-dev-b19977c-amd64

@markmandel markmandel merged commit f8f25e5 into googleforgames:main Jul 18, 2023
3 checks passed
@markmandel markmandel deleted the flaky/TestControllerAllocator branch July 18, 2023 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved 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.

None yet

6 participants