Repository navigation
feat(service): support deferred configuration updates - #130
Conversation
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #130 +/- ##
==========================================
+ Coverage 97.96% 98.65% +0.69%
==========================================
Files 5 6 +1
Lines 295 373 +78
==========================================
+ Hits 289 368 +79
+ Misses 6 5 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
Resolve the critical build, cleanup, and unbounded reconciliation issues before approval.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds deferred service.Update support for partial configuration changes while active processes continue running.
Changes:
- Adds runtime updates with environment replacement and process-count reconciliation.
- Refactors process-group and lifecycle management.
- Adds unit/integration coverage and dependency updates.
File summaries
| File | Reviewed changes | Final findings |
|---|---|---|
update_test.go |
Update tests | — |
tests/update_test.go |
Integration and concurrency tests | Critical (1 vote): new(tt.target) does not compile at lines 572 and 582. |
tests/mock/observer.go |
Structured log capture | Moderate (1 vote): Returned attribute maps alias stored records; deep-copy them on reads. |
tests/helpers/rpc.go |
Update RPC helper | — |
tests/go.sum |
Test dependency checksums | — |
tests/go.mod |
Test dependency updates | — |
rpc.go |
Update and lifecycle RPCs | — |
rpc_test.go |
RPC lifecycle tests | — |
process.go |
Process snapshots and shutdown handling | Critical (1 vote): stop can dereference a nil command for an unstarted process. |
process_test.go |
Process cleanup tests | — |
plugin.go |
Plugin lifecycle integration | — |
plugin_test.go |
Plugin lifecycle tests | — |
group.go |
Deferred updates and process reconciliation | Critical (1 vote): math.MaxInt can trigger unbounded worker/timer reconciliation and resource exhaustion. |
go.work.sum |
Workspace checksums | — |
go.sum |
Dependency checksums | — |
go.mod |
API dependency updates | — |
config.go |
Configuration cloning and validation | — |
Review details
Suppressed comments (2)
tests/mock/observer.go:23
Allonly clones the slice, so each returnedAttrsmap still aliases the stored record;FilterMessageandFilterMessageSnippetreturn the same aliases. A caller that mutates an attribute can change historical records and race withHandle, contradicting the “Attribute maps are immutable” contract; deep-copy the maps on every read or remove that claim.
// All returns the captured records. Attribute maps are immutable.
func (o *ObservedLogs) All() []LoggedEntry {
o.mu.RLock()
defer o.mu.RUnlock()
return slices.Clone(o.logs)
tests/update_test.go:582
new(tt.target)cannot compile becausenewaccepts a type, not a value. This prevents the test package from building; take the address of theint64field instead (for example,&tt.target).
helpers.Update(t, client, &serviceV1.Update{Name: "update", ProcessNum: new(tt.target)})
- Files reviewed: 15/17 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
Add
service.Updatefor partial configuration changes while current processes continue running.api-go/v6 v6.0.0-beta.15and align startup and shutdown with Endure.closes: roadrunner-server/roadrunner#2119
API: roadrunner-server/api#80.
Docs: roadrunner-server/docs#80.