Only one template invocation is created per one job invocation
During digging around job_name refactoring I realized that template invocations are not being created as expected. Job composer creates one template invocation that works as a template (does not have host_id yet, that is correct), then when planning the RunHostJob the same template is passed as an argument, during plan host_id is set. Unfortunately for all RunHostJob the same template is used, so each sub task is changing the only one template invocation that exist. We should expand the template as part of RunHostsJob so it passes new object to RunHostJob. I guess the update was part of RunHostJob plan phase, since that's in transaction.
Fixes #13130 - save template invocations for each host
This commit introduces so called pattern template invocation which is
created by job composer as a pattern for real template invocation that
being created during dynflow action run. Pattern template invocation
holds all information from composer (e.g. input values) except target
host which is evaluated just during dynflow action run phase.
#4 Updated by Marek Hulán over 6 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset foreman_plugin|1206a1c4c93a49df29ea3e1df1f2a134c2a950a6.