Fix parameterized URL bug in task block (#815)
This commit is contained in:
@@ -188,16 +188,7 @@ class TaskBlock(Block):
|
|||||||
workflow_run_context = self.get_workflow_run_context(workflow_run_id)
|
workflow_run_context = self.get_workflow_run_context(workflow_run_id)
|
||||||
|
|
||||||
if self.url and workflow_run_context.has_parameter(self.url):
|
if self.url and workflow_run_context.has_parameter(self.url):
|
||||||
if workflow_run_context.has_value(self.url):
|
if self.url not in [parameter.key for parameter in parameters]:
|
||||||
LOG.info(
|
|
||||||
"Task URL is parameterized, using parameter value",
|
|
||||||
task_url_parameter_value=workflow_run_context.get_value(self.url),
|
|
||||||
task_url_parameter_key=self.url,
|
|
||||||
)
|
|
||||||
self.url = workflow_run_context.get_value(self.url)
|
|
||||||
else:
|
|
||||||
# if the parameter is not resolved yet, we'll add it to the list of parameters to resolve
|
|
||||||
# parameterization of the url would happen when the task is executed
|
|
||||||
parameters.append(workflow_run_context.get_parameter(self.url))
|
parameters.append(workflow_run_context.get_parameter(self.url))
|
||||||
|
|
||||||
return parameters
|
return parameters
|
||||||
|
|||||||
Reference in New Issue
Block a user