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

Add sdkserver.SetAnnotations() #4001

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

antiphp
Copy link
Contributor

@antiphp antiphp commented Sep 25, 2024

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:

Provides the ability to set multiple annotations at once.

This is important if you want an atomic application of the annotations.

Without that, setting annotations is not atomic, so anyone watching for changes required a mechanism to find out when all annotations have been applied. Hard to do if the number of annotation varies.

Which issue(s) this PR fixes:

Closes #3835

Special notes for your reviewer:

Adding some notes in the related ticket around unsetting annotations and labels.

@github-actions github-actions bot added kind/feature New features for Agones size/M labels Sep 25, 2024
@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: 6bf71540-b245-4e61-a9e4-b060d4c5a439

Status: FAILURE

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

@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: 4be80e2b-ce52-4a3b-b113-ded3b0847aa4

Status: FAILURE

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

@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: d5428209-06d1-4b09-8673-507abfd93b46

Status: FAILURE

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

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: d8486e17-18fa-48fc-ac9d-6a6fbfad2fa8

Status: FAILURE

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

@gongmax
Copy link
Collaborator

gongmax commented Sep 27, 2024

lint error

make: *** [Makefile:499: lint] Error 1
			      ^
			err = wait.PollImmediate(time.Second, 10*time.Second, func() (bool, error) {
pkg/sdkserver/localsdk_test.go:330:10: SA1019: wait.PollImmediate is deprecated: This method does not return errors from context, use PollUntilContextTimeout. Note that the new method will no longer return ErrWaitTimeout and instead return errors defined by the context package. Will be removed in a future release. (staticcheck)
// Copyright 2020 Google LLC All Rights Reserved.
sdks/go/sdk_test.go:131:23: cannot use &sdkMock{} (value of type *sdkMock) as "agones.dev/agones/pkg/sdk".SDKClient value in variable declaration: *sdkMock does not implement "agones.dev/agones/pkg/sdk".SDKClient (missing method SetAnnotations) (typecheck)
sdks/go/sdk_test.go:122:11: cannot use sm (variable of type *sdkMock) as "agones.dev/agones/pkg/sdk".SDKClient value in struct literal: *sdkMock does not implement "agones.dev/agones/pkg/sdk".SDKClient (missing method SetAnnotations)
sdks/go/sdk_test.go:106:11: cannot use sm (variable of type *sdkMock) as "agones.dev/agones/pkg/sdk".SDKClient value in struct literal: *sdkMock does not implement "agones.dev/agones/pkg/sdk".SDKClient (missing method SetAnnotations)
sdks/go/sdk_test.go:77:11: cannot use sm (variable of type *sdkMock) as "agones.dev/agones/pkg/sdk".SDKClient value in struct literal: *sdkMock does not implement "agones.dev/agones/pkg/sdk".SDKClient (missing method SetAnnotations)
sdks/go/sdk_test.go:36:11: cannot use sm (variable of type *sdkMock) as "agones.dev/agones/pkg/sdk".SDKClient value in struct literal: *sdkMock does not implement "agones.dev/agones/pkg/sdk".SDKClient (missing method SetAnnotations)
sdks/go/alpha.go:1: : # agones.dev/agones/sdks/go [agones.dev/agones/sdks/go.test]

@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: afe1b1c2-f118-4317-91c2-144a4f4d046f

Status: FAILURE

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

@gongmax
Copy link
Collaborator

gongmax commented Sep 27, 2024

/gcbrun

@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: 04c928c9-b679-4dce-91f3-4e0622d4767c

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/4001/head:pr_4001 && git checkout pr_4001
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.44.0-dev-9113391

@0xaravindh 0xaravindh added the kind/documentation Documentation for Agones label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Documentation for Agones kind/feature New features for Agones size/L size/M size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sdkserver: add functionality to set multiple game server annotations at once
4 participants