-
Notifications
You must be signed in to change notification settings - Fork 831
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
added condition for distributed logic #3877
Conversation
Build Succeeded 👏 Build Id: 947d2e56-46aa-40d9-83fa-163e6c714757 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:
|
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 good, just one nit.
pkg/gameserverallocations/find.go
Outdated
@@ -40,6 +40,9 @@ func findGameServerForAllocation(gsa *allocationv1.GameServerAllocation, list [] | |||
|
|||
var loop func(list []*agonesv1.GameServer, f func(i int, gs *agonesv1.GameServer)) | |||
|
|||
// Determine if Priorities are set in the Fleet spec | |||
prioritiesSet := len(gsa.Spec.Priorities) > 0 |
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.
This can be moved to inside the case apis.Distributed:
ade2cc5
to
fe78c66
Compare
Build Succeeded 👏 Build Id: fcfb7f98-4492-40cf-89f2-1c8379cd2163 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:
|
pkg/gameserverallocations/find.go
Outdated
// randomised looping - make a list of indices, and then randomise them | ||
// as we don't want to change the order of the gameserver slice | ||
if !runtime.FeatureEnabled(runtime.FeatureCountsAndLists) { | ||
if !runtime.FeatureEnabled(runtime.FeatureCountsAndLists) || !prioritiesSet { |
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.
if !runtime.FeatureEnabled(runtime.FeatureCountsAndLists) || !prioritiesSet { | |
if !runtime.FeatureEnabled(runtime.FeatureCountsAndLists) || len(gsa.Spec.Priorities) == 0 { |
Small thing, but probably doesn't need a variable? WDYT @igooch ?
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.
No strong feelings either way. It's probably not needed.
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.
@ashutosji bump on removing this variable, and just moving the check inline, and then I think this is good to merge.
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.
@ashutosji bump on removing this variable, and just moving the check inline, and then I think this is good to merge.
Thanks! Moved the check inline.
fe78c66
to
38093a1
Compare
Build Succeeded 👏 Build Id: 31b18c3b-b930-4217-8064-5da499ad5879 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:
|
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.
LGTM
Build Succeeded 👏 Build Id: bad00577-2428-40f1-8ecd-e12f8b3188b4 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:
|
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [agones](https://agones.dev) ([source](https://togithub.com/googleforgames/agones)) | minor | `1.41.0` -> `1.42.0` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>googleforgames/agones (agones)</summary> ### [`v1.42.0`](https://togithub.com/googleforgames/agones/blob/HEAD/CHANGELOG.md#v1420-2024-07-16) [Compare Source](https://togithub.com/googleforgames/agones/compare/v1.41.0...v1.42.0) [Full Changelog](https://togithub.com/googleforgames/agones/compare/v1.41.0...v1.42.0) **Breaking changes:** - Update csharp.md to indicate ConnectAsync is deprecated by [@​aallbrig](https://togithub.com/aallbrig) in [https://github.com/googleforgames/agones/pull/3866](https://togithub.com/googleforgames/agones/pull/3866) **Implemented enhancements:** - Add security context to Agones containers by [@​peterzhongyi](https://togithub.com/peterzhongyi) in [https://github.com/googleforgames/agones/pull/3856](https://togithub.com/googleforgames/agones/pull/3856) - Add Security Context to game server sidecar by [@​peterzhongyi](https://togithub.com/peterzhongyi) in [https://github.com/googleforgames/agones/pull/3869](https://togithub.com/googleforgames/agones/pull/3869) - Drop CountsAndLists Data from the Fleet and Game Server Set When the Flag is False by [@​igooch](https://togithub.com/igooch) in [https://github.com/googleforgames/agones/pull/3881](https://togithub.com/googleforgames/agones/pull/3881) - Adds tests to confirm that Fleet, Fleet Autoscaler, and Fleet Allocation apply defaults code is idempotent by [@​igooch](https://togithub.com/igooch) in [https://github.com/googleforgames/agones/pull/3888](https://togithub.com/googleforgames/agones/pull/3888) - feat: Add CRD Changes and Feature Flag for chain policy by [@​indexjoseph](https://togithub.com/indexjoseph) in [https://github.com/googleforgames/agones/pull/3880](https://togithub.com/googleforgames/agones/pull/3880) **Fixed bugs:** - sdk-server expects SDK_LOG_LEVEL by [@​KAllan357](https://togithub.com/KAllan357) in [https://github.com/googleforgames/agones/pull/3858](https://togithub.com/googleforgames/agones/pull/3858) - this will resolve From/layer extraction issue on ltsc2019 in examples by [@​ashutosji](https://togithub.com/ashutosji) in [https://github.com/googleforgames/agones/pull/3873](https://togithub.com/googleforgames/agones/pull/3873) - featuregate: adds validation if PortPolicyNone is not enabled by [@​daniellee](https://togithub.com/daniellee) in [https://github.com/googleforgames/agones/pull/3871](https://togithub.com/googleforgames/agones/pull/3871) - added local as default for registry when registry is not specified by [@​kamaljeeti](https://togithub.com/kamaljeeti) in [https://github.com/googleforgames/agones/pull/3876](https://togithub.com/googleforgames/agones/pull/3876) - Buffer Unity SDK ReceiveData when watching for configuration changes by [@​ZeroParticle](https://togithub.com/ZeroParticle) in [https://github.com/googleforgames/agones/pull/3872](https://togithub.com/googleforgames/agones/pull/3872) - agones-{extensions,allocator}: Make servers context aware by [@​zmerlynn](https://togithub.com/zmerlynn) in [https://github.com/googleforgames/agones/pull/3845](https://togithub.com/googleforgames/agones/pull/3845) - added condition for distributed logic by [@​ashutosji](https://togithub.com/ashutosji) in [https://github.com/googleforgames/agones/pull/3877](https://togithub.com/googleforgames/agones/pull/3877) **Security fixes:** - Bump [@​grpc/grpc-js](https://togithub.com/grpc/grpc-js) from 1.10.7 to 1.10.9 in /sdks/nodejs by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/googleforgames/agones/pull/3863](https://togithub.com/googleforgames/agones/pull/3863) **Other:** - Preparation for Release v1.42.0 by [@​ashutosji](https://togithub.com/ashutosji) in [https://github.com/googleforgames/agones/pull/3854](https://togithub.com/googleforgames/agones/pull/3854) - Add helpful note to edit-first-gameserver-go by [@​peterzhongyi](https://togithub.com/peterzhongyi) in [https://github.com/googleforgames/agones/pull/3846](https://togithub.com/googleforgames/agones/pull/3846) - Moved Passthrough feature description to the correct section in Feature Stages by [@​vicentefb](https://togithub.com/vicentefb) in [https://github.com/googleforgames/agones/pull/3861](https://togithub.com/googleforgames/agones/pull/3861) - Updated Node.js Page to Reflect that Counters and Lists is Implemented by [@​ashutosji](https://togithub.com/ashutosji) in [https://github.com/googleforgames/agones/pull/3865](https://togithub.com/googleforgames/agones/pull/3865) - Change Slack channel description from #developers to #development by [@​branhoff](https://togithub.com/branhoff) in [https://github.com/googleforgames/agones/pull/3868](https://togithub.com/googleforgames/agones/pull/3868) - updated UpdateList documentation for local sdk server and sdk server by [@​ashutosji](https://togithub.com/ashutosji) in [https://github.com/googleforgames/agones/pull/3878](https://togithub.com/googleforgames/agones/pull/3878) - Add zio-agones to the list of third party client SDKs by [@​ghostdogpr](https://togithub.com/ghostdogpr) in [https://github.com/googleforgames/agones/pull/3875](https://togithub.com/googleforgames/agones/pull/3875) - refactor simple game server by [@​ashutosji](https://togithub.com/ashutosji) in [https://github.com/googleforgames/agones/pull/3817](https://togithub.com/googleforgames/agones/pull/3817) - Update Slack invite link by [@​markmandel](https://togithub.com/markmandel) in [https://github.com/googleforgames/agones/pull/3896](https://togithub.com/googleforgames/agones/pull/3896) - Added cleanup for app-engine services in cloudbuild script by [@​kamaljeeti](https://togithub.com/kamaljeeti) in [https://github.com/googleforgames/agones/pull/3890](https://togithub.com/googleforgames/agones/pull/3890) - Adds a command to generate the zz_generated.deepcopy.go files for the apis by [@​igooch](https://togithub.com/igooch) in [https://github.com/googleforgames/agones/pull/3900](https://togithub.com/googleforgames/agones/pull/3900) - update go version to 1.21.12 by [@​ashutosji](https://togithub.com/ashutosji) in [https://github.com/googleforgames/agones/pull/3894](https://togithub.com/googleforgames/agones/pull/3894) **New Contributors:** - [@​KAllan357](https://togithub.com/KAllan357) made their first contribution in [https://github.com/googleforgames/agones/pull/3858](https://togithub.com/googleforgames/agones/pull/3858) - [@​branhoff](https://togithub.com/branhoff) made their first contribution in [https://github.com/googleforgames/agones/pull/3868](https://togithub.com/googleforgames/agones/pull/3868) - [@​aallbrig](https://togithub.com/aallbrig) made their first contribution in [https://github.com/googleforgames/agones/pull/3866](https://togithub.com/googleforgames/agones/pull/3866) - [@​ZeroParticle](https://togithub.com/ZeroParticle) made their first contribution in [https://github.com/googleforgames/agones/pull/3872](https://togithub.com/googleforgames/agones/pull/3872) - [@​ghostdogpr](https://togithub.com/ghostdogpr) made their first contribution in [https://github.com/googleforgames/agones/pull/3875](https://togithub.com/googleforgames/agones/pull/3875) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzIuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQzMi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9oZWxtIiwidHlwZS9taW5vciJdfQ==-->
What type of PR is this?
/kind bug
What this PR does / Why we need it:
Which issue(s) this PR fixes:#3862
Closes #3862
Special notes for your reviewer: