Repository navigation
Conversation
There was a problem hiding this comment.
📋 Review Summary
This PR resolves a port reservation race condition between Prism's child process and loopback workers by verifying JobService readiness via GetJobs before starting the PortableRunner, with bounded retries and proper process/channel cleanup on failure. The implementation is well-structured, handles thread interruption cleanly, and includes thorough unit and regression test coverage.
🔍 General Feedback
- The readiness check in
PrismRunner(probing the TCP socket before invokingJobService.GetJobsto avoid gRPC reconnect backoff, and rejecting non-retryable gRPC status codes likeUNIMPLEMENTEDif another service bound the port) directly and cleanly addresses the race condition. - Resource cleanup and thread interruption preservation in
PrismExecutor.stop()andPrismRunner.startPrism()are handled properly. - Consider cleaning up the duplicate
dependenciesblock inrunners/prism/java/build.gradlein a follow-up.
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
|
Assigning reviewers: R: @tvalentyn added as fallback since no labels match configuration Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #40773 +/- ##
===========================================
- Coverage 80.04% 0 -80.05%
===========================================
Files 490 0 -490
Lines 82916 0 -82916
===========================================
- Hits 66373 0 -66373
+ Misses 16543 0 -16543
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Related #40298.
Prism's port reservation is released before the child process binds it. The loopback worker can take that port in the meantime. CI then logs
bind: address already in use, followed byUNIMPLEMENTED ...JobService/Preparefrom the wrong service (example).Wait for a successful
JobService.GetJobsresponse before starting the portable runner. Retry failed startup on a fresh port, stopping the failed child and closing its channel. Preserve interruption during cleanup. Retries apply only to service startup.Reproduced the port conflict with a competing gRPC service. The startup regressions fail before the fix and pass afterward. Module tests, targeted loopback tests, formatting, Checkstyle, and dependency checks passed. The module tests can be run with
./gradlew :runners:prism:java:test.