-
Notifications
You must be signed in to change notification settings - Fork 819
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
Switch Node.js SDK grpc dependency to grpc-js #1529
Conversation
…sts. change emitter to stream. update example to 1.5.0
@BradfordMedeiros do you want to take a look at the change from emitters to streams? When updating the library |
Build Succeeded 👏 Build Id: f105e604-73e9-441d-83e0-f4d02c8429fa 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: dc0cc964-0d0a-41ea-ac73-77a8229bef6c 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:
|
protoc -I ${googleapis} -I ${sdk} --grpc_out=minimum_node_version=12:./sdks/nodejs/lib --plugin=protoc-gen-grpc=`which grpc_node_plugin` sdk.proto | ||
protoc -I ${googleapis} -I ${sdk} --js_out=import_style=commonjs,binary:./sdks/nodejs/lib sdk.proto ${googleapis}/google/api/annotations.proto ${googleapis}/google/api/http.proto | ||
npm install --unsafe-perm --global grpc-tools | ||
grpc_tools_node_protoc --proto_path=${googleapis} --proto_path=${sdk} --js_out=import_style=commonjs,binary:./sdks/nodejs/lib google/api/annotations.proto google/api/http.proto |
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.
Generation command makes sense 👍
build/build-sdk-images/node/gen.sh
Outdated
@@ -25,8 +25,9 @@ googleapis=/go/src/agones.dev/agones/proto/googleapis | |||
|
|||
cd /go/src/agones.dev/agones | |||
|
|||
protoc -I ${googleapis} -I ${sdk} --grpc_out=minimum_node_version=12:./sdks/nodejs/lib --plugin=protoc-gen-grpc=`which grpc_node_plugin` sdk.proto | |||
protoc -I ${googleapis} -I ${sdk} --js_out=import_style=commonjs,binary:./sdks/nodejs/lib sdk.proto ${googleapis}/google/api/annotations.proto ${googleapis}/google/api/http.proto | |||
npm install --unsafe-perm --global grpc-tools |
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.
Curious - do you think we should bake grpc-tools into the Dockerfile ?
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.
Also, I think it would be good to lock this to a version, to avoid any weirdness between runs.
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 started out this way and had some issues but now it's working gen.sh
then will take a look at moving it. Will add the latest version too.
Another way of doing this is to add to the package.json of the sdk and have a build/pre-build step there. One advantage of this is that a dependency bot could keep it up to date (with other dependencies), also the SDK would be self contained and it's clear from the package.json which version of grpc-tools was used. We would then update gen.sh to just run npm run build
or similar.
This is just an idea though and would not do as part of this code review :)
Build Failed 😱 Build Id: 800edb96-9d8f-4fb1-b011-28ad0a1ab1a7 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Failed 😱 Build Id: a5ec2a42-e595-4d7f-9bda-3a5003fe04fa To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
The test failure may be due to this grpc/grpc-node#1362 |
Build Failed 😱 Build Id: 72df94e2-ea2c-4367-818b-a9075f779a24 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Failed 😱 Build Id: 888ba103-5e09-4dda-8b30-843b96db44bd To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Different tests are failing, most recent was e2e-runner
|
Wow, haven't seen TestGameServerReserve be flaky in a WHILE! Can you rebase against master and push, github isn't giving me the options because I don't know why. |
Build Failed 😱 Build Id: 6519ff55-222a-490a-a8d0-3b6119d18f85 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Same again. Perhaps I can try locally
|
Build Succeeded 👏 Build Id: 8ff7d998-2ae0-4e26-9be0-f47d0ce3fea3 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 we go! I marked is as breaking as more of a "just in case", and as a reminder to mention it in the release notes. This looks good now! |
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.
let's go!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: markmandel, steven-supersolid 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 |
* update generation of libs. update libs. update sdk. update and fix tests. change emitter to stream. update example to 1.5.0 * Move grpc-tools installation to Dockerfile and fix version * hopefully fix node-pre-gyp bug
What type of PR is this?
/kind feature
What this PR does / Why we need it:
The original node.js grpc library has been replaced by a new implementation and after a year the original library will be deprecated. The recommendation from the gRPC team is to update.
https://grpc.io/blog/grpc-js-1.0/
Which issue(s) this PR fixes:
Closes #1489
Closes #1490
Special notes for your reviewer: