-
Notifications
You must be signed in to change notification settings - Fork 817
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
Tests update: portallocator_test #1723
Conversation
Build Failed 😱 Build Id: 49c86e86-a519-4b35-8f36-1ee035280a1c To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
5b5deb8
to
95d2409
Compare
Build Succeeded 👏 Build Id: e625c55e-8e89-455a-8bf5-33567879c545 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:
|
@@ -106,7 +106,6 @@ func (pa *PortAllocator) Run(stop <-chan struct{}) error { | |||
} | |||
|
|||
// Allocate assigns a port to the GameServer and returns it. | |||
// Return ErrPortNotFound if no port is allocatable |
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.
I have just simulated what would be when we don't have enough free ports. In current version - it would be actually a warning, so error is redundant in that case:
11m Warning FailedScheduling pod/simple-udp-qbx79-c2vll 0/6 nodes are available: 2 node(s) had taints that the pod didn't tolerate, 4 node(s) didn't have free ports for the requested pod ports.
maxPort := int32(19) // make sure we have an even number | ||
pa := NewPortAllocator(10, maxPort, m.KubeInformerFactory, m.AgonesInformerFactory) | ||
minPort := int32(10) | ||
maxPort := int32(20) // make sure we have an even number |
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.
maxPort := int32(20) // make sure we have an even number | |
maxPort := int32(19) // make sure we have an even number |
Now we have odd number of ports. Not sure what we should change this comment or set back the number and consequently other comments with 20
.
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.
I thought this comment is related to maxPort that is why I’ve changed it.
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.
Outside of this comment, I think this PR 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.
Yes.
Are you aware of a context of this comment?
If we all are unsure about it I think we can remove one and 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.
Looks like I wrote it.... and I can't remember anymore 😕
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.
Updated
95d2409
to
c2a073e
Compare
Build Succeeded 👏 Build Id: 94459b93-d580-4c61-a367-0b4cb231f047 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:
|
c2a073e
to
9ace5c5
Compare
fix applied review notes removed comment fix
9ace5c5
to
951f589
Compare
Build Succeeded 👏 Build Id: 3d0652c1-d9f6-468b-b70f-41f065342f9b 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.
Fine with me
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: akremsa, aLekSer, markmandel The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Build Succeeded 👏 Build Id: 37b4b9c6-dfe6-4110-bfdc-451d351dbe1e 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:
|
New changes are detected. LGTM label has been removed. |
Build Succeeded 👏 Build Id: 25468fc6-154d-455f-be65-276d03b7341e 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:
|
fix applied review notes removed comment fix Co-authored-by: Mark Mandel <markmandel@google.com>
What type of PR is this?
What this PR does / Why we need it:
Made several fixes in test cases, abort tests in proper places using require package.