-
Notifications
You must be signed in to change notification settings - Fork 8
test: fix flaky test-grpc-packages #368
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
test: fix flaky test-grpc-packages #368
Conversation
Caution Review failedThe pull request is closed. WalkthroughUpdated the Makefile’s test-agents-prereqs target to install the latest @grpc/proto-loader via npm instead of pinning it to version 0.7. The @grpc/grpc-js install remains unchanged. No other targets or commands were modified. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
Makefile (2)
1693-1700
: Avoid floating “latest” to keep CI deterministic; parameterize or pin versions.Installing unpinned @grpc/grpc-js and @grpc/proto-loader makes test-agents-prereqs non-reproducible and can reintroduce flakes when those packages release. Recommend parameterizing the specs so you can set/override versions in CI, defaulting to latest only when unset.
Apply this diff within the changed line to use variables:
-env npm_config_nodedir=$(PWD) $(NODE) ./deps/npm install @grpc/grpc-js @grpc/proto-loader --prefix test/common/nsolid-grpc-agent --no-save --no-package-lock +env npm_config_nodedir=$(PWD) $(NODE) ./deps/npm install $(GRPC_JS_SPEC) $(PROTO_LOADER_SPEC) --prefix test/common/nsolid-grpc-agent --no-save --no-package-lockAdd these variable definitions near the top (outside this hunk), so CI can pin when needed:
# Inherit from environment; when empty, installs latest. GRPC_JS_VERSION ?= PROTO_LOADER_VERSION ?= GRPC_JS_SPEC := @grpc/grpc-js$(if $(GRPC_JS_VERSION),@$(GRPC_JS_VERSION),) PROTO_LOADER_SPEC := @grpc/proto-loader$(if $(PROTO_LOADER_VERSION),@$(PROTO_LOADER_VERSION),)
1701-1705
: Add cleanup for nsolid-grpc-agent node_modules.test-agents-prereqs installs deps under test/common/nsolid-grpc-agent, but test-agents-prereqs-clean doesn’t remove them.
Apply this diff:
test-agents-prereqs-clean: $(RM) -r test/common/nsolid-zmq-agent/node_modules $(RM) -r test/common/nsolid-otlp-agent/node_modules + $(RM) -r test/common/nsolid-grpc-agent/node_modules
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Makefile
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: build-tarball
- GitHub Check: test-linux (ubuntu-24.04)
- GitHub Check: lint-js-and-md
- GitHub Check: test-macOS
- GitHub Check: test-linux (ubuntu-24.04-arm)
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.
Nice
c5c219c
to
609557e
Compare
Fixes: #378 PR-URL: #368 Reviewed-By: Juan José Arboleda <[email protected]>
Landed in 45abe09 |
Summary by CodeRabbit