grpc-node icon indicating copy to clipboard operation
grpc-node copied to clipboard

Health list endpoint

Open MatiasManevi opened this issue 7 months ago • 4 comments

Change

This PR introduces the implementation of the new List endpoint to the Health service in order to list all the services that a certain server is watching to.

It also adds generated files for the endpoint and its tests.

I would like to write some tests too but I couldn't run the test suite as it is as I get some errors, any help is appreciated.

gulpfile.ts:28:19 - error TS2339: Property 'parallel' does not exist on type 'Gulp'.
28 const lint = gulp.parallel(jsCore.lint);
gulpfile.ts:30:20 - error TS2339: Property 'series' does not exist on type 'Gulp'.
30 const build = gulp.series(protobuf.compile, jsCore.compile, jsXds.compile);

Related PR

gRPC-proto added in https://github.com/grpc/grpc-node/pull/2951

Proposal

https://github.com/grpc/proposal/pull/468

MatiasManevi avatar May 17 '25 12:05 MatiasManevi

If you run npm install and gulp setup in the repository root directory, that should set everything up to be able to run those tests.

murgatroid99 avatar May 20 '25 18:05 murgatroid99

If you run npm install and gulp setup in the repository root directory, that should set everything up to be able to run those tests.

Thank you for the guidance!

Running gulp setup is being problematic. Some deps not working

[20:00:23] Finished '<anonymous>' after 11 s
[20:00:23] Starting 'install'...
npm error Cannot read properties of null (reading 'isDescendantOf')
npm error A complete log of this run can be found in: /home/matias/.npm/_logs/2025-05-20T23_00_23_644Z-debug-0.log
[20:03:50] 'install' errored after 3.45 min
[20:03:50] Error: exited with error code: 1
    at ChildProcess.onexit (/home/matias/projects/grpc-node/node_modules/end-of-stream/index.js:40:36)
    at ChildProcess.emit (node:events:536:35)
    at ChildProcess.emit (node:domain:552:15)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
    at Process.callbackTrampoline (node:internal/async_hooks:130:17)
[20:03:50] 'setup' errored after 3.79 min

My node version is 22.13.1, I use nvm.

Does this PR depend on unit tests to be "approvable"? I can add the test code and someone else can try to run them?

MatiasManevi avatar May 20 '25 23:05 MatiasManevi

I think the most likely issue you are seeing is that the git submodules that the setup script expects to be able to use are absent. You can correct that by running git submodule update --init --recursive. Alternatively, you can run a smaller set of install scripts directly, by running npm install in the root directory, in packages/proto-loader, in packages/grpc-js, and in packages/health-check, in that order.

murgatroid99 avatar May 21 '25 18:05 murgatroid99

I think the most likely issue you are seeing is that the git submodules that the setup script expects to be able to use are absent. You can correct that by running git submodule update --init --recursive. Alternatively, you can run a smaller set of install scripts directly, by running npm install in the root directory, in packages/proto-loader, in packages/grpc-js, and in packages/health-check, in that order.

Thank you!, second approach worked (even tho 29 tests fail). I will work on the tests shortly.

MatiasManevi avatar May 22 '25 02:05 MatiasManevi

Hey @murgatroid99 can you help me understand why Windows Tests job is failing? doesn't seem to be related to my changes I believe.

MatiasManevi avatar Aug 05 '25 22:08 MatiasManevi

Ignore the Windows test job. It's broken.

murgatroid99 avatar Aug 06 '25 17:08 murgatroid99

Way to go my friend! Thanks for the help!

marcoshuck avatar Aug 06 '25 17:08 marcoshuck

This has been released in version 2.1.0.

murgatroid99 avatar Aug 06 '25 20:08 murgatroid99