fix(distributed): execute work units and track task outcomes#795
fix(distributed): execute work units and track task outcomes#795
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee6ed250eb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for (task_index, task) in tasks.into_iter().enumerate() { | ||
| let task_result = self.execute_task(&task).await; |
There was a problem hiding this comment.
Honor
when conditions before running tasks
execute_work_unit now executes every task in order without checking TaskSpec.when, so any conditional task is run unconditionally. In workflows that submit work units with when expressions (for example, guard tasks that should be skipped on certain hosts/variables), this can trigger unintended commands and false failures instead of a skip, which changes playbook semantics and can produce incorrect side effects.
Useful? React with 👍 / 👎.
Summary
Controller::execute_work_unitcommand,shell) using taskmodule+argsFailedon task failures instead of placeholder completionCloses #787
Test evidence
cargo test --features distributed distributed::controller::tests -- --nocapturetest_controller_creationtest_controller_infotest_execute_work_unit_not_completed_when_task_cannot_executetest_execute_work_unit_marks_failed_on_task_failure