Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudw committed Aug 14, 2024
1 parent 6c5e60f commit cc5c597
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions metaflow/plugins/aip/tests/flows/flow_triggering_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def start(self):
self.triggered_by_tag = "triggerred-by"
self.index_tag = "template-index"

for template_name, template_index in enumerate(
for template_index, template_name in enumerate(
self.workflow_template_names
):
path = f"/tmp/{template_name}.yaml"
Expand Down Expand Up @@ -112,12 +112,16 @@ def end(self):
assert self.workflow_template_names[1] == argo_helper.template_get_latest(
template_prefix=sanitize_k8s_name(TEST_TEMPLATE_NAME.lower()),
flow_name=current.flow_name,
filter_func=lambda template: template["metadata"]["labels"][
f"metaflow.org/tag_{self.triggered_by_tag}"
]
== current.run_id
and template["metadata"]["labels"][f"metaflow.org/tag_{self.index_tag}"]
== str(1),
filter_func=lambda template: (
template["metadata"]["labels"][
f"metaflow.org/tag_{self.triggered_by_tag}"
]
== current.run_id
and template["metadata"]["labels"][
f"metaflow.org/tag_{self.index_tag}"
]
== str(1)
),
)

# ====== Test template triggering ======
Expand Down

0 comments on commit cc5c597

Please sign in to comment.