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

Remove 1.25 supported K8s version from e2e cluster #3451

Merged
merged 3 commits into from
Oct 25, 2023

Conversation

Kalaiselvi84
Copy link
Contributor

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:

Work on #3371

Special notes for your reviewer:

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: gongmax, Kalaiselvi84
Once this PR has been reviewed and has the lgtm label, please assign cyriltovena for approval. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 25b0071f-90f5-42b9-a26a-b39e422929bc

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

@@ -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) {
Copy link
Collaborator

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.

Copy link
Contributor Author

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?

Copy link
Collaborator

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

Copy link
Contributor Author

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)
	}
}

Copy link
Contributor Author

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

@google-oss-prow google-oss-prow bot removed the lgtm label Oct 25, 2023
@google-oss-prow
Copy link

New changes are detected. LGTM label has been removed.

@agones-bot
Copy link
Collaborator

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:

  • git fetch https://github.com/googleforgames/agones.git pull/3451/head:pr_3451 && git checkout pr_3451
  • 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.36.0-dev-fd48aef-amd64

@gongmax gongmax merged commit 67aa5e2 into googleforgames:main Oct 25, 2023
3 checks passed
@Kalaiselvi84 Kalaiselvi84 deleted the remove-cluster branch March 15, 2024 01:11
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.

3 participants