Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new fork/cleanup path has verified exception/resource-handling issues (EINTR safety and a potential Pipe FD leak on fork failure) that should be addressed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR fixes Workflow Approval context_template rendering when executed inside dispatcher pool workers (daemonic multiprocessing processes), ensuring context_message is populated for both the approval details view and approval notification emails.
Changes:
- Replace
multiprocessing.Processusage with a directos.fork()-based render child to avoid “daemonic processes are not allowed to have children” failures. - Add a functional test that validates context rendering works when the current process is marked daemonic.
File summaries
| File | Description |
|---|---|
| awx/main/models/workflow.py | Switches context template rendering to a direct fork model and adds child reaping logic. |
| awx/main/tests/functional/models/test_workflow.py | Adds coverage for rendering inside a daemonic process context. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🔵 Needs a closer look
It introduces low-level fork/waitpid/signal-based process management in a core workflow path that warrants final human review for operational safety.
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
Verified the context is now properly shown in both the Approval Details and in the email I received for the notification.
Resolves Issue #912