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

Tests update: portallocator_test #1723

Merged
merged 2 commits into from
Aug 4, 2020

Conversation

akremsa
Copy link
Contributor

@akremsa akremsa commented Jul 29, 2020

What type of PR is this?

/kind bug
/kind cleanup

What this PR does / Why we need it:
Made several fixes in test cases, abort tests in proper places using require package.

@akremsa akremsa changed the title Tests update: portallocator_еуые Tests update: portallocator_test Jul 29, 2020
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 49c86e86-a519-4b35-8f36-1ee035280a1c

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

@agones-bot
Copy link
Collaborator

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:

  • git fetch https://github.com/googleforgames/agones.git pull/1723/head:pr_1723 && git checkout pr_1723
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.8.0-95d2409

@@ -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
Copy link
Collaborator

@aLekSer aLekSer Jul 29, 2020

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
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
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.

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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 😕

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@agones-bot
Copy link
Collaborator

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:

  • git fetch https://github.com/googleforgames/agones.git pull/1723/head:pr_1723 && git checkout pr_1723
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.8.0-c2a073e

fix


applied review notes


removed comment


fix
@agones-bot
Copy link
Collaborator

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:

  • git fetch https://github.com/googleforgames/agones.git pull/1723/head:pr_1723 && git checkout pr_1723
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.8.0-9ace5c5

Copy link
Collaborator

@aLekSer aLekSer left a comment

Choose a reason for hiding this comment

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

Fine with me

@google-oss-robot
Copy link

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@agones-bot
Copy link
Collaborator

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:

  • git fetch https://github.com/googleforgames/agones.git pull/1723/head:pr_1723 && git checkout pr_1723
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.8.0-951f589

@google-oss-robot
Copy link

New changes are detected. LGTM label has been removed.

@agones-bot
Copy link
Collaborator

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:

  • git fetch https://github.com/googleforgames/agones.git pull/1723/head:pr_1723 && git checkout pr_1723
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.8.0-a7af0e9

@aLekSer aLekSer merged commit 79006ee into googleforgames:master Aug 4, 2020
@markmandel markmandel added this to the 1.8.0 milestone Aug 11, 2020
@markmandel markmandel added area/tests Unit tests, e2e tests, anything to make sure things don't break kind/cleanup Refactoring code, fixing up documentation, etc labels Aug 11, 2020
ilkercelikyilmaz pushed a commit to ilkercelikyilmaz/agones that referenced this pull request Oct 23, 2020
fix


applied review notes


removed comment


fix

Co-authored-by: Mark Mandel <markmandel@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/tests Unit tests, e2e tests, anything to make sure things don't break cla: yes kind/cleanup Refactoring code, fixing up documentation, etc size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants