Skip to content

Commit

Permalink
add deploy time trigger inits to argo parameter handling (#2146)
Browse files Browse the repository at this point in the history
  • Loading branch information
saikonen authored Nov 20, 2024
1 parent 3c2f536 commit f4e3f26
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions metaflow/plugins/argo/argo_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,9 @@ def _process_triggers(self):
params = set(
[param.name.lower() for var, param in self.flow._get_parameters()]
)
for event in self.flow._flow_decorators.get("trigger")[0].triggers:
trigger_deco = self.flow._flow_decorators.get("trigger")[0]
trigger_deco.format_deploytime_value()
for event in trigger_deco.triggers:
parameters = {}
# TODO: Add a check to guard against names starting with numerals(?)
if not re.match(r"^[A-Za-z0-9_.-]+$", event["name"]):
Expand Down Expand Up @@ -562,9 +564,11 @@ def _process_triggers(self):

# @trigger_on_finish decorator
if self.flow._flow_decorators.get("trigger_on_finish"):
for event in self.flow._flow_decorators.get("trigger_on_finish")[
0
].triggers:
trigger_on_finish_deco = self.flow._flow_decorators.get(
"trigger_on_finish"
)[0]
trigger_on_finish_deco.format_deploytime_value()
for event in trigger_on_finish_deco.triggers:
# Actual filters are deduced here since we don't have access to
# the current object in the @trigger_on_finish decorator.
triggers.append(
Expand Down

0 comments on commit f4e3f26

Please sign in to comment.