Merge pull request #10305 from jbradberry/resolve-workflow-ee

Include the EE set on a workflow template in the resolver hierarchy

SUMMARY
This step comes immediately after checking the actual job/template for
an explicitly set EE.
Note that now, because of how jobs are spawned off of workflow nodes,
the call to .resolve_execution_environment() no longer happens in
.create_unified_job().  The job instance within .create_unified_job()
doesn't yet have access to the node that it will be attached to,
making it impossible to use this information in the resolver if called
there.
related #9560
ISSUE TYPE


Feature Pull Request
Bugfix Pull Request

COMPONENT NAME

API

AWX VERSION

Reviewed-by: Shane McDonald <me@shanemcd.com>
Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
This commit is contained in:
softwarefactory-project-zuul[bot]
2021-06-02 16:22:39 +00:00
committed by GitHub
4 changed files with 13 additions and 9 deletions

View File

@@ -3038,8 +3038,8 @@ class AWXReceptorJob:
@property
def pod_definition(self):
if self.task:
ee = self.task.instance.resolve_execution_environment()
if self.task and self.task.instance.execution_environment:
ee = self.task.instance.execution_environment
else:
ee = get_default_execution_environment()