-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore: manage pool of workers directly in the plugin #113
Conversation
Signed-off-by: Valery Piashchynski <[email protected]>
WalkthroughThe changes involve updates to the linting configuration in Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant gRPCServer
participant Pool
Client->>gRPCServer: Stop()
gRPCServer->>gRPCServer: GracefulStop()
gRPCServer-->>Client: Acknowledgment
gRPCServer->>Pool: Destroy(ctx)
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Signed-off-by: Valery Piashchynski <[email protected]>
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
Outside diff range, codebase verification and nitpick comments (1)
plugin.go (1)
155-156
: Approved method modification for graceful shutdown.The changes to the
Stop
method, usingGracefulStop
for the gRPC server and immediately destroying the worker pool, are crucial for ensuring a controlled shutdown process. This should help in better resource management and reduce the risk of abrupt terminations.The changes are approved.
Consider adding comments within the
Stop
method to explain the rationale behind these changes for future maintainability.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
go.sum
is excluded by!**/*.sum
go.work.sum
is excluded by!**/*.sum
Files selected for processing (3)
- .golangci.yml (1 hunks)
- go.mod (2 hunks)
- plugin.go (1 hunks)
Files skipped from review due to trivial changes (1)
- go.mod
Additional comments not posted (1)
.golangci.yml (1)
38-38
: Approved linter change.The replacement of
exportloopref
withcopyloopvar
is noted. This change should help in better handling of loop variable issues in Go code.The change is approved.
Consider running the linter on the existing codebase to ensure that this change does not introduce new linting errors or overlook potential issues that were previously detected.
Signed-off-by: Valery Piashchynski <[email protected]>
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
go.work.sum
is excluded by!**/*.sum
tests/go.sum
is excluded by!**/*.sum
Files selected for processing (5)
- .golangci.yml (2 hunks)
- proxy.go (7 hunks)
- tests/centrifugo_test.go (7 hunks)
- tests/go.mod (4 hunks)
- tests/php_test_files/centrifuge_connect.php (1 hunks)
Files skipped from review due to trivial changes (2)
- .golangci.yml
- proxy.go
Additional comments not posted (4)
tests/php_test_files/centrifuge_connect.php (1)
29-36
: Properly implemented error handling for subscription requests.The new conditional block for handling
Request\Subscribe
instances is correctly implemented with appropriate error handling. The use ofcontinue
ensures that the loop can proceed without interruption.The code changes are approved.
tests/go.mod (1)
Line range hint
3-81
: Dependency updates reviewed.The updates to the Go version and dependencies in
go.mod
are noted. It's important to ensure that these updates do not introduce breaking changes and are compatible with the project's existing codebase.The dependency updates are approved, but it is recommended to verify their integration and test extensively to ensure compatibility.
tests/centrifugo_test.go (2)
Line range hint
228-240
: Enhanced HTTP request management with context.The replacement of
http.NewRequest
withhttp.NewRequestWithContext
is a significant improvement, allowing for better management of request timeouts and cancellations.The changes are approved and align with best practices for HTTP request handling in Go.
40-45
: Improved cross-platform compatibility in command execution.The introduction of conditional command execution based on
runtime.GOOS
enhances the test suite's flexibility and ensures that the correct executable is invoked based on the operating system.The changes are approved, but it is recommended to perform thorough testing on different platforms to ensure consistent behavior.
Reason for This PR
ref: roadrunner-server/roadrunner#1986
Description of Changes
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the MIT license.
PR Checklist
[Author TODO: Meet these criteria.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]
git commit -s
).CHANGELOG.md
.Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes
Refactor