Skip to content

Fix issue with Workflow Approval Context not showing - #913

Merged
cigamit merged 2 commits into
mainfrom
issue912
Sep 9, 2026
Merged

Fix issue with Workflow Approval Context not showing#913
cigamit merged 2 commits into
mainfrom
issue912

Conversation

@cigamit

@cigamit cigamit commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Verified the context is now properly shown in both the Approval Details and in the email I received for the notification.

Resolves Issue #912

@cigamit
cigamit requested a review from TheWitness September 9, 2026 17:00
@cigamit cigamit self-assigned this Sep 9, 2026
Copilot AI lite review requested due to automatic review settings September 9, 2026 17:00
@cigamit cigamit added the bug Something isn't working label Sep 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.Process usage with a direct os.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.

Comment thread awx/main/models/workflow.py
Comment thread awx/main/models/workflow.py
Copilot AI review requested due to automatic review settings September 9, 2026 17:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

@cigamit
cigamit merged commit 7a0293b into main Sep 9, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

3 participants