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

TestAllocatorAllocateOnGameServerUpdateError #3283

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
/kind release

What this PR does / Why we need it:

This was flaking as the cache is eventually consistent, so sometimes it wouldn't be populated in time for the allocation request.

Fixed with a better state check on the allocation cache.

--- FAIL: TestAllocatorAllocateOnGameServerUpdateError (19.31s)
    allocator_test.go:499:
        	Error Trace:	/go/src/agones.dev/agones/pkg/gameserverallocations/allocator_test.go:499
        	Error:      	An error is expected but got nil.
        	Test:       	TestAllocatorAllocateOnGameServerUpdateError

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

N/A

This was flaking as the cache is eventually consistent, so sometimes it
wouldn't be populated in time for the allocation request.

Fixed with a better state check on the allocation cache.

```
--- FAIL: TestAllocatorAllocateOnGameServerUpdateError (19.31s)
    allocator_test.go:499:
        	Error Trace:	/go/src/agones.dev/agones/pkg/gameserverallocations/allocator_test.go:499
        	Error:      	An error is expected but got nil.
        	Test:       	TestAllocatorAllocateOnGameServerUpdateError
```
@markmandel markmandel added the area/tests Unit tests, e2e tests, anything to make sure things don't break label Jul 21, 2023
@github-actions github-actions bot added the kind/cleanup Refactoring code, fixing up documentation, etc label Jul 21, 2023
@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gongmax, 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 21, 2023 20:05
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: e06c028e-5c8d-48fe-897c-ed13ad97258c

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

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 1ff7b39e-6719-447f-9435-0c9b4b7d639c

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

@markmandel
Copy link
Member Author

--- FAIL: TestAllocatorAllocateOnGameServerUpdateError (4.64s)
    allocator_test.go:498: 
        	Error Trace:	/go/src/agones.dev/agones/pkg/gameserverallocations/allocator_test.go:498
        	Error:      	An error is expected but got nil.
        	Test:       	TestAllocatorAllocateOnGameServerUpdateError

Flaked again!

I ran it 100 times, it was fine 😠 .

So what is weird is it passes consistently with the private method, but not the public after it. I might have another idea to take for a spin.

@google-oss-prow google-oss-prow bot removed the lgtm label Jul 21, 2023
@google-oss-prow
Copy link

New changes are detected. LGTM label has been removed.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 7cd4d93e-37b3-47e3-ab2c-e1578d5500e7

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/3283/head:pr_3283 && git checkout pr_3283
  • 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-15a96eb-amd64

@markmandel markmandel merged commit 94038da into googleforgames:main Jul 22, 2023
2 checks passed
@markmandel markmandel deleted the flaky/TestAllocatorAllocateOnGameServerUpdateError branch July 22, 2023 01:07
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.

4 participants