Fix parameterized URL bug in task block (#815)

This commit is contained in:
Kerem Yilmaz 2024-09-11 23:53:39 -07:00 committed by GitHub
parent 4a599bbf55
commit 3e82a6a5f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -188,16 +188,7 @@ class TaskBlock(Block):
workflow_run_context = self.get_workflow_run_context(workflow_run_id)
if self.url and workflow_run_context.has_parameter(self.url):
if workflow_run_context.has_value(self.url):
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
if self.url not in [parameter.key for parameter in parameters]:
parameters.append(workflow_run_context.get_parameter(self.url))
return parameters