Currently rex only supports task first task execution order. I want to add host first task execution order. Some goals for this issue:
- Explain what this change will look like to the user.
- Create a detailed plan to get there so I can do small incremental prs instead of one gigantic pr.
User interface
Command line options
Users will use the -eo option to indicate which execution order they prefer. The default value will be task-first for backwards compatibility. Next major version bump should probably flip that because host-first execution is faster and I believe its what users want though I have no data to back that up:
rex -eo host-first -G production deploy:product1
rex -eo task-first -G production deploy:product1
New rex feature flags
Users will also be able to specify a default execution order using the host_first_execution_order or task_first_execution_order` feature flags.
use Rex -feature => [qw/ host_first_execution_order /];
Task execution summary
Users will also see a summary of success/failure at the end of a rex run. The summary of failures will be sorted by host first when using host first execution. And it will be sorted by task first when using task first execution.
How to get there
Refactor some stuff first
Then add new features
Currently rex only supports task first task execution order. I want to add host first task execution order. Some goals for this issue:
User interface
Command line options
Users will use the
-eooption to indicate which execution order they prefer. The default value will betask-firstfor backwards compatibility. Next major version bump should probably flip that becausehost-firstexecution is faster and I believe its what users want though I have no data to back that up:New rex feature flags
Users will also be able to specify a default execution order using the
host_first_execution_orderor task_first_execution_order` feature flags.Task execution summary
Users will also see a summary of success/failure at the end of a rex run. The summary of failures will be sorted by host first when using host first execution. And it will be sorted by task first when using task first execution.
How to get there
Refactor some stuff first
$forked_subout ofTaskList->run()and into its own function.@SUMMARYlogic and shared variables fromFork::TaskandFork::ManagerintoTaskList::Base->build_child_coderef().TaskList::Base->run()run()torun_task(). I think this will eventually be calledrun_task_first().run()?TaskList->run()andRunList->new->run_tasks()intoTaskList::Base->run_tasks()Then add new features
TaskList::Base->run_tasks()will callrun_host_first()orrun_task_first()host_first_execution_orderandtask_first_execution_orderfeature flagsrex -eocommand line option