-
Notifications
You must be signed in to change notification settings - Fork 813
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
Add close method to node client #748
Conversation
/cc @steven-supersolid you are our local node.js expert 😄 see any issues? |
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:
|
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:
|
Build Failed 😱 Build Id: b35ff169-2c3e-461e-996e-a828eadf60b8 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Failed 😱 Build Id: 3b4c9075-554e-4809-ac6e-66800436ba0c 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.
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(){ |
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.
Please can you add a test for this method to maintain code coverage? You can check coverage with the npm script cover
sdks/nodejs/src/agonesSDK.js
Outdated
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()); |
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 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.
@BradfordMedeiros gentle bump on this - are you able to respond to the review comments and/or make the requested changes? |
@markmandel @steven-supersolid |
…BradfordMedeiros/agones into add-close-method-to-node-client
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:
|
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:
|
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:
|
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:
|
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 assume this is good to go 😄 looks like all comments have been dealt with 👍
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:
|
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.