Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
📝 WalkthroughWalkthroughThis PR introduces comprehensive logging infrastructure across server components and refactors the App lifecycle to implement error propagation through a new ErrorProducer interface. Changes include adding logger fields with component scoping to multiple services, reducing log verbosity by converting Info-level logs to Debug across several components, and introducing service context management with dedicated error handling channels in the App struct. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@server/internal/workflows/worker.go`:
- Around line 55-63: Start currently overwrites w.cancel on re-entry; change
Worker.Start to guard and only assign the active cancel after the underlying
worker successfully started: first check if w.cancel != nil (or if w.ctx != nil)
and return an error or no-op to prevent re-entry, then create a localCtx,
localCancel := context.WithCancel(ctx) and call w.worker.Start(localCtx); if
that returns an error call localCancel() and return the error, otherwise set
w.ctx = localCtx and w.cancel = localCancel. Reference Worker.Start, w.ctx,
w.cancel and w.worker.Start when making the change.
1fc7985 to
7264b7e
Compare
e1a27fd to
a12872f
Compare
7264b7e to
9b24f17
Compare
a12872f to
3afed69
Compare
The workflows worker does not exit until its context is canceled. This commit fixes an issue where certain errors, such as those originating from Etcd or the various watches, could lead to the app shutting down without canceling the worker's context. This put the server in a partially shut down state, where it would still try to run workflows but fail from missing services in our DI system. Now, the `App` manages a separate context for services, and the worker manages its own context as well. This allows for a complete crash in case of error, and improves our shutdown process by waiting until all the shutdown methods have been tried before canceling the service context. PLAT-331
Simplifies our startup and shut down log output by limiting it to general process status and services that are opening ports. PLAT-331
3afed69 to
49fe78a
Compare
Summary
The workflows worker does not exit until its context is canceled. This commit fixes an issue where certain errors, such as those originating from Etcd or the various watches, could lead to the app shutting down without canceling the worker's context. This put the server in a partially shut down state, where it would still try to run workflows but fail from missing services in our DI system.
Now, the
Appmanages a separate context for services, and the worker manages its own context as well. This allows for a complete crash in case of error, and improves our shutdown process by waiting until all the shutdown methods have been tried before canceling the service context.Testing
The app should function normally. In extreme situations that prompt a crash, such as the one described in PLAT-331, the server should shut down completely and restart itself rather than partially shutting down.
PLAT-331
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.