-
Notifications
You must be signed in to change notification settings - Fork 820
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
Improved fleetautoscalers - fleetautoscalers_test.go unit tests + applyWebhookPolicy refactoring #1531
Improved fleetautoscalers - fleetautoscalers_test.go unit tests + applyWebhookPolicy refactoring #1531
Conversation
if w.Service.Path != nil { | ||
servicePath = *w.Service.Path | ||
|
||
if w.URL != nil && w.Service != nil { |
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.
👍 additional check would be great. Validated on Update but still something wrong could happen.
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.
Agree, taking into account the fact that another validation happens in a different package.
Build Failed 😱 Build Id: 844f2438-299c-4881-8cf7-16bba813a284 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
0dd3cec
to
3630834
Compare
Build Failed 😱 Build Id: 041001a9-ea5f-41a0-89f2-04673a1dcc88 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
3630834
to
6183853
Compare
Build Failed 😱 Build Id: d1007c0a-4537-45d5-b11c-3e9005b711b6 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
6183853
to
5f60476
Compare
Build Failed 😱 Build Id: b866e474-b138-4493-a79a-da7c67692885 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
5f60476
to
3523987
Compare
Build Succeeded 👏 Build Id: b9784537-393c-45f5-af58-b7834e9e9303 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:
|
3523987
to
5de2cf0
Compare
Build Succeeded 👏 Build Id: f1e91a9b-7572-435d-a04b-438c68041fd7 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:
|
Build Succeeded 👏 Build Id: 725f0237-7f6e-4331-9ef7-d179b107072b 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:
|
Build Failed 😱 Build Id: d20a5fcf-347f-4932-b59a-8c8c3261498b To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
1378040
to
f2cb6bd
Compare
Build Failed 😱 Build Id: 9f99225f-13e1-4c00-911a-5b42b55e5212 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
f2cb6bd
to
6239f90
Compare
Build Failed 😱 Build Id: cf961221-8a4f-4eb8-8b9a-5de92468c5a5 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
6239f90
to
d9ee2ba
Compare
Build Failed 😱 Build Id: fa3521c7-7519-41c1-96d8-c2fc73fec90c To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
d9ee2ba
to
c303f1c
Compare
Build Failed 😱 Build Id: 851235fe-2a39-4b35-bfb7-d83a8019dd72 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
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.
@akremsa Alexey, please add nil check to service and this PR is good to go. I will double check that nothing is broken, if we follow the guide here :
https://agones.dev/site/docs/getting-started/create-fleetautoscaler/
fa6e359
to
139140e
Compare
@aLekSer done |
added nil fleet case fix URL fix
added more tests linter fix
139140e
to
3fcde1f
Compare
Build Succeeded 👏 Build Id: 2224389a-34f6-4b46-8ef8-f533eceac619 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.
Thanks for this changes.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: akremsa, aLekSer 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 |
…lyWebhookPolicy refactoring (googleforgames#1531)
What type of PR is this?
What this PR does / Why we need it:
Added missing unit tests to TestApplyWebhookPolicy and refactored applyWebhookPolicy method.
Added an absent error check after
b, err := json.Marshal(faReq)
which could be a potential bug.Refactored TestComputeDesiredFleetSize and TestApplyBufferPolicy and added new test cases.
Special notes for your reviewer:
Before:
After:
By the way, I suggest using url.ParseRequestURI instead of url.Parse.