Improvements to command plugin and service#1641
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1641 +/- ##
==========================================
+ Coverage 85.07% 85.11% +0.04%
==========================================
Files 105 105
Lines 13691 13702 +11
==========================================
+ Hits 11647 11663 +16
+ Misses 1529 1524 -5
Partials 515 515
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR refactors parts of the command plugin/service to improve reconnection behavior and reduce the risk of deadlocks/races during runtime config updates and config-apply request handling.
Changes:
- Removes the “requests in progress” gating/timeout and related config/flags.
- Adds RWMutex protection around agent config access and adjusts command plugin/service to read config via accessors.
- Adjusts subscribe/channel monitoring behavior (continue on invalid auxiliary requests) and refactors config-apply request queue handling to avoid deadlocks.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
internal/command/command_service.go |
Concurrency/reconnect behavior changes, config locking/accessor, config-apply queue refactor. |
internal/command/command_plugin.go |
Uses config accessor + continues monitoring on invalid auxiliary requests. |
internal/command/command_service_test.go |
Removes tests tied to removed “requests in progress” logic. |
internal/config/types.go |
Removes ConnectionResetTimeout from GRPC config struct. |
internal/config/defaults.go |
Removes default for reset timeout. |
internal/config/flags.go |
Removes CLI flag key for reset timeout. |
internal/config/config.go |
Removes flag registration + viper resolution for reset timeout. |
internal/watcher/credentials/credential_watcher_service.go |
Logging level/context tweak when credential changes are detected. |
test/types/config.go |
Updates test config builder to match removed config field. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Proposed changes
There are a few places where things can be improved in the command plugin and service which are detailed below.
Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTINGdocumentmake install-toolsand have attached any dependency changes to this pull requestREADME.md)