-
Notifications
You must be signed in to change notification settings - Fork 799
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
Remove 1.25 supported K8s version from e2e cluster #3451
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: gongmax, Kalaiselvi84 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Build Failed 😱 Build Id: 25b0071f-90f5-42b9-a26a-b39e422929bc To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
test/e2e/framework/framework.go
Outdated
@@ -292,8 +292,7 @@ func (f *Framework) WaitForGameServerState(t *testing.T, gs *agonesv1.GameServer | |||
// Each Allocated GameServer gets deleted allocDuration after it was Allocated. | |||
// GameServers will continue to be Allocated until a message is passed to the done channel. | |||
func (f *Framework) CycleAllocations(ctx context.Context, t *testing.T, flt *agonesv1.Fleet, period time.Duration, allocDuration time.Duration) { | |||
// nolint:staticcheck | |||
err := wait.PollImmediateUntil(period, func() (bool, error) { | |||
err := wait.PollUntilContextCancel(ctx, period, true, func(ctx context.Context) (bool, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this doesn't work because PollUntilContextCancel doesn't return ErrWaitTimeout error so error was thrown in line 315. Please revert the change for this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be annotated with // nolint:staticcheck?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes just revert the change you made for this line in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Below code will work I guess,
func (f *Framework) CycleAllocations(ctx context.Context, t *testing.T, flt *agonesv1.Fleet, period time.Duration, allocDuration time.Duration) {
err := wait.PollUntilContextCancel(ctx, period, true, func(ctx context.Context) (bool, error) {
gsa := GetAllocation(flt)
gsa, err := f.AgonesClient.AllocationV1().GameServerAllocations(flt.Namespace).Create(ctx, gsa, metav1.CreateOptions{})
if err != nil || gsa.Status.State != allocationv1.GameServerAllocationAllocated {
// Ignore error. Could be that the buffer was empty, will try again next cycle.
return false, nil
}
// Deallocate after allocDuration.
go func(gsa *allocationv1.GameServerAllocation) {
time.Sleep(allocDuration)
err := f.AgonesClient.AgonesV1().GameServers(gsa.Namespace).Delete(ctx, gsa.Status.GameServerName, metav1.DeleteOptions{})
require.NoError(t, err)
}(gsa)
return false, nil
})
if err != nil {
require.NoError(t, err)
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will work on this in the upcoming PR
New changes are detected. LGTM label has been removed. |
Build Succeeded 👏 Build Id: 3e8adaf5-975a-4dcd-9699-4bea2608e5a3 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:
|
What type of PR is this?
/kind breaking
What this PR does / Why we need it:
Which issue(s) this PR fixes:
Work on #3371
Special notes for your reviewer: