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

Set Minimum Buffer Size to 1 #3749

Merged
merged 15 commits into from
May 9, 2024
Merged

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:

Closes #3715

Special notes for your reviewer:

@github-actions github-actions bot added kind/bug These are bugs. size/S labels Apr 9, 2024
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 5c6745d8-e9bd-4b46-bce8-02c4a14caa71

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

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: bbb1c989-426c-4122-9b0b-cd9466a83b07

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

@markmandel markmandel requested a review from igooch April 10, 2024 18:06
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 712da535-b430-42c8-8ca3-17b7984c5428

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/3749/head:pr_3749 && git checkout pr_3749
  • 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.40.0-dev-e5fb5e2-amd64

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 66436d88-6521-44c3-9c79-607057d80e29

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

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 7eb17ccc-c585-4e1a-9046-ccddc3fba753

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

@Kalaiselvi84 Kalaiselvi84 changed the title Set Minimums for DesiredCapacity and Buffer to 1 Set Minimum Buffer Size to 1 Apr 11, 2024
@markmandel
Copy link
Member

@igooch is there any e2e tests here to update that would also need to be updated?

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: d91f7765-28d9-4b1c-b3f6-ded9c6f48d62

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/3749/head:pr_3749 && git checkout pr_3749
  • 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.40.0-dev-2fc8bad-amd64

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 34fd4157-9785-4272-b92f-fb6033506da4

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/3749/head:pr_3749 && git checkout pr_3749
  • 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.40.0-dev-78d2675-amd64

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 02453ae0-b466-4e72-b307-7638dd5acfcc

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

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 7d8aa50a-6335-4459-bdd6-04942ecff669

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/3749/head:pr_3749 && git checkout pr_3749
  • 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.40.0-dev-451b4f8-amd64

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 9463b6c3-1d29-438b-ac92-734a48f801ef

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/3749/head:pr_3749 && git checkout pr_3749
  • 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.41.0-dev-ec72f7f-amd64

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 204267c3-cfd9-4cb1-8c57-4c07d9361cf0

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/3749/head:pr_3749 && git checkout pr_3749
  • 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.41.0-dev-f98e459-amd64

Copy link
Collaborator

@igooch igooch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On about line 322 I'd recommend doing something like:

		// If the Aggregated Allocated Counts is 0 then desired capacity gets calculated as 0. If the
		// capacity of 1 replica is equal to or greater than minimum capacity we can exit early.
		if aggAllocatedCount <= 0 && capacity >= minCapacity {
			return 1, true, nil
		}

It's a bit convoluted, but it will get us the desired result. I think this takes care of all the edge cases, but if you can think of any others let me know.

pkg/fleetautoscalers/fleetautoscalers_test.go Outdated Show resolved Hide resolved
Comment on lines 490 to 492
if replicas == 1 {
return 1, true, nil
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if replicas == 1 {
return 1, true, nil
}

This doesn't quite work, because there are cases where scaling down to 1 replica is desired (not limited). This is the case the test case "scale down".

Copy link
Contributor Author

@Kalaiselvi84 Kalaiselvi84 May 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have rolled back all the changes from the scaleDown method and modified the code as per your suggestion. I adjusted the TestApplyCounterPolicy/scale down test case to not be limited: limited: false. Both the TestApplyCounterPolicy and TestApplyListPolicy tests have passed.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 429b7ce6-718e-4849-8d6c-0ae510f2acd6

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/3749/head:pr_3749 && git checkout pr_3749
  • 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.41.0-dev-1b4f2b9-amd64

Copy link
Collaborator

@igooch igooch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@igooch igooch merged commit 8749377 into googleforgames:main May 9, 2024
4 checks passed
spiceratops added a commit to spiceratops/k8s-gitops that referenced this pull request Jun 8, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [agones](https://agones.dev)
([source](https://github.com/googleforgames/agones)) | minor |
`1.40.0` -> `1.41.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.41.0`](https://github.com/googleforgames/agones/blob/HEAD/CHANGELOG.md#v1410-2024-06-04)

[Compare
Source](https://github.com/googleforgames/agones/compare/v1.40.0...v1.41.0)

[Full
Changelog](https://github.com/googleforgames/agones/compare/v1.40.0...v1.41.0)

**Implemented enhancements:**

- Configure Allocator Status Code by
[@&#8203;Kalaiselvi84](https://github.com/Kalaiselvi84) in
[googleforgames/agones#3782
- Graduate Counters and Lists to Beta by
[@&#8203;Kalaiselvi84](https://github.com/Kalaiselvi84) in
[googleforgames/agones#3801
- Passthrough autopilot - Adds an AutopilotPassthroughPort Feature Gate
and new pod label by [@&#8203;vicentefb](https://github.com/vicentefb)
in
[googleforgames/agones#3809
- CountsAndLists: Move to Beta Protobuf by
[@&#8203;Kalaiselvi84](https://github.com/Kalaiselvi84) in
[googleforgames/agones#3806
- feat: support multiple port ranges by
[@&#8203;nrwiersma](https://github.com/nrwiersma) in
[googleforgames/agones#3747
- Changes `sdk-server` to Patch instead of Update by
[@&#8203;igooch](https://github.com/igooch) in
[googleforgames/agones#3803
- Generate grpc for nodejs from alpha to beta by
[@&#8203;lacroixthomas](https://github.com/lacroixthomas) in
[googleforgames/agones#3825
- Update CountsAndLists from Alpha to Beta by
[@&#8203;Kalaiselvi84](https://github.com/Kalaiselvi84) in
[googleforgames/agones#3824
- feat(gameserver): New DirectToGameServer PortPolicy allows direct
traffic to a GameServer by
[@&#8203;daniellee](https://github.com/daniellee) in
[googleforgames/agones#3807
- Passthrough autopilot - Adds mutating webhook by
[@&#8203;vicentefb](https://github.com/vicentefb) in
[googleforgames/agones#3833
- Passthrough autopilot - added ports array case and updated unit tests
by [@&#8203;vicentefb](https://github.com/vicentefb) in
[googleforgames/agones#3842
- Nodejs counters and lists by
[@&#8203;steven-supersolid](https://github.com/steven-supersolid) in
[googleforgames/agones#3726
- Promote AutopilotPassthroughPort feature gate to Alpha by
[@&#8203;vicentefb](https://github.com/vicentefb) in
[googleforgames/agones#3849

**Fixed bugs:**

- Helm Param Update: Default to agones.controller if agones.extensions
is Missing by [@&#8203;Kalaiselvi84](https://github.com/Kalaiselvi84)
in
[googleforgames/agones#3773
- fix: rollout strategy issues by
[@&#8203;nrwiersma](https://github.com/nrwiersma) in
[googleforgames/agones#3762
- Set Minimum Buffer Size to 1 by
[@&#8203;Kalaiselvi84](https://github.com/Kalaiselvi84) in
[googleforgames/agones#3749
- Pin ltsc2019 to older SHA by
[@&#8203;zmerlynn](https://github.com/zmerlynn) in
[googleforgames/agones#3829
- TestGameServerAllocationDuringMultipleAllocationClients: Readdress
flake by [@&#8203;zmerlynn](https://github.com/zmerlynn) in
[googleforgames/agones#3831
- Refactor finalizer name to include valid domain name and path by
[@&#8203;indexjoseph](https://github.com/indexjoseph) in
[googleforgames/agones#3840
- agones-{extensions,allocator}: Be more defensive about draining by
[@&#8203;zmerlynn](https://github.com/zmerlynn) in
[googleforgames/agones#3839
- agones-{extensions,allocator}: Pause after cancelling context by
[@&#8203;zmerlynn](https://github.com/zmerlynn) in
[googleforgames/agones#3843
- Change the line to modify in Quickstart: Edit a Game Server by
[@&#8203;peterzhongyi](https://github.com/peterzhongyi) in
[googleforgames/agones#3844

**Other:**

- Prep for Release v1.41.0 by
[@&#8203;Kalaiselvi84](https://github.com/Kalaiselvi84) in
[googleforgames/agones#3800
- Update site documentation to reflect firewall prefix and default to
Autopilot cluster creation for Agones by
[@&#8203;vicentefb](https://github.com/vicentefb) in
[googleforgames/agones#3769
- Add a System Diagram and overview page by
[@&#8203;zmerlynn](https://github.com/zmerlynn) in
[googleforgames/agones#3792
- Update Side Menu: Preserve and Restore Scroll Position by
[@&#8203;Kalaiselvi84](https://github.com/Kalaiselvi84) in
[googleforgames/agones#3805
- fix: typo by [@&#8203;skmpf](https://github.com/skmpf) in
[googleforgames/agones#3808
- Helm Config: Add httpUnallocatedStatusCode in Allocator Service by
[@&#8203;Kalaiselvi84](https://github.com/Kalaiselvi84) in
[googleforgames/agones#3802
- Update Docs: CountersAndLists to Beta by
[@&#8203;Kalaiselvi84](https://github.com/Kalaiselvi84) in
[googleforgames/agones#3810
- Disable Dev feature FeatureAutopilotPassthroughPort by
[@&#8203;vicentefb](https://github.com/vicentefb) in
[googleforgames/agones#3815
- Disable FeatureAutopilotPassthroughPort in features.go by
[@&#8203;vicentefb](https://github.com/vicentefb) in
[googleforgames/agones#3816
- SDK proto compatibility guarantees and deprecation policies
documentation by [@&#8203;igooch](https://github.com/igooch) in
[googleforgames/agones#3774
- Fix dangling "as of" by
[@&#8203;zmerlynn](https://github.com/zmerlynn) in
[googleforgames/agones#3827
- Steps to Promote SDK Features from Alpha to Beta by
[@&#8203;Kalaiselvi84](https://github.com/Kalaiselvi84) in
[googleforgames/agones#3814
- Adds comment for help troubleshooting issues with terraform tfstate by
[@&#8203;igooch](https://github.com/igooch) in
[googleforgames/agones#3822
- docs: improve counter and list example comments by
[@&#8203;yonbh](https://github.com/yonbh) in
[googleforgames/agones#3818
- Skip /tmp/ on yamllint by
[@&#8203;zmerlynn](https://github.com/zmerlynn) in
[googleforgames/agones#3838
- TestAllocatorAfterDeleteReplica: More logging by
[@&#8203;zmerlynn](https://github.com/zmerlynn) in
[googleforgames/agones#3837
- Instructions for upgrading golang version by
[@&#8203;gongmax](https://github.com/gongmax) in
[googleforgames/agones#3819
- Remove unused function FindGameServerContainer by
[@&#8203;zmerlynn](https://github.com/zmerlynn) in
[googleforgames/agones#3841
- Adds Unreal to the List of URL Links to Not Check by
[@&#8203;igooch](https://github.com/igooch) in
[googleforgames/agones#3847
- docs: clarify virtualization setup for Windows versions by
[@&#8203;andresromerodev](https://github.com/andresromerodev) in
[googleforgames/agones#3850

**New Contributors:**

- [@&#8203;skmpf](https://github.com/skmpf) made their first
contribution in
[googleforgames/agones#3808
- [@&#8203;yonbh](https://github.com/yonbh) made their first
contribution in
[googleforgames/agones#3818
- [@&#8203;peterzhongyi](https://github.com/peterzhongyi) made their
first contribution in
[googleforgames/agones#3844
- [@&#8203;andresromerodev](https://github.com/andresromerodev) made
their first contribution in
[googleforgames/agones#3850

</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://github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM5MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9oZWxtIiwidHlwZS9taW5vciJdfQ==-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug These are bugs. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scale Down by Percent CounterPolicy or ListPolicy Can Lead to 0 Replicas
4 participants