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

Add close method to node client #748

Conversation

BradfordMedeiros
Copy link
Contributor

@BradfordMedeiros BradfordMedeiros commented Apr 27, 2019

I was using the client and realized I couldnt close it as the streams from the grpc were being held open. I just went ahead and created a close method that cleans up the connection info.

Also updated the examples to follow suit since overkill process.exit no longer needed.
Also, awesome project. This is really amazing great stuff guys.

@markmandel
Copy link
Member

/cc @steven-supersolid you are our local node.js expert 😄 see any issues?

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 8451e693-52a8-471f-be16-b8e133f56f87

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/GoogleCloudPlatform/agones.git pull/748/head:pr_748 && git checkout pr_748
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-d345a24

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 3253e948-31c4-4831-9244-7c92df642400

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/GoogleCloudPlatform/agones.git pull/748/head:pr_748 && git checkout pr_748
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-60f23e5

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: b35ff169-2c3e-461e-996e-a828eadf60b8

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

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 3b4c9075-554e-4809-ac6e-66800436ba0c

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

Copy link
Collaborator

@steven-supersolid steven-supersolid left a comment

Choose a reason for hiding this comment

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

Looks great although I am unable to run the code until next week. Couple of minor changes requested including adding a test as I'm really keen to maintain coverage.

this.healthStream = undefined;
this.emitters = [];
}
async close(){
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please can you add a test for this method to maintain code coverage? You can check coverage with the npm script cover

this.healthStream = this.client.health((error) => {
// Ignore error as this can't be caught
});
}
let request = new messages.Empty();
this.healthStream.write(request);
this.healthStream.write(new messages.Empty());
Copy link
Collaborator

Choose a reason for hiding this comment

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

I prefer to keep the request as a local variable as this can aid debugging, is consistent with other calls that pass a request/message and fewer changes if parameters ever have to be added to the message in future.

@markmandel markmandel added the feature-freeze-do-not-merge Only eligible to be merged once we are out of feature freeze (next full release) label May 8, 2019
@markmandel
Copy link
Member

@BradfordMedeiros gentle bump on this - are you able to respond to the review comments and/or make the requested changes?

@markmandel markmandel removed feature-freeze-do-not-merge Only eligible to be merged once we are out of feature freeze (next full release) labels May 16, 2019
@BradfordMedeiros
Copy link
Contributor Author

@markmandel @steven-supersolid
Addressed the comments.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 6ac2c860-bb1e-4797-b717-71a9f7c0ac26

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/GoogleCloudPlatform/agones.git pull/748/head:pr_748 && git checkout pr_748
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-987e6d2

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 2f5e5182-89a2-4acc-9fb0-9ab97614dcf9

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/GoogleCloudPlatform/agones.git pull/748/head:pr_748 && git checkout pr_748
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-7cbb8aa

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 14236cae-54ec-4acd-9a11-3b8ff30c3f47

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/GoogleCloudPlatform/agones.git pull/748/head:pr_748 && git checkout pr_748
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-a0e285b

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 63534d95-fcf9-42bb-af3d-74709c0c3938

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/GoogleCloudPlatform/agones.git pull/748/head:pr_748 && git checkout pr_748
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-ddd7550

Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

I assume this is good to go 😄 looks like all comments have been dealt with 👍

@markmandel markmandel added area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc kind/feature New features for Agones labels May 16, 2019
@markmandel markmandel added this to the 0.11.0 milestone May 16, 2019
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: ed6d91ea-0fbe-4f34-adf9-99cb12068151

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/GoogleCloudPlatform/agones.git pull/748/head:pr_748 && git checkout pr_748
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-abad38a

@markmandel markmandel merged commit 14b890c into googleforgames:master May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc kind/feature New features for Agones
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants