Skip to content

Commit

Permalink
flow_triggering_flow.py test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
talebzeghmi committed Feb 19, 2024
1 parent ab09749 commit dfa6f85
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion metaflow/plugins/aip/tests/flows/flow_triggering_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import base64
from typing import Callable

from kfp.compiler._k8s_helper import sanitize_k8s_name
from metaflow import FlowSpec, Parameter, Step, current, step
from metaflow.metaflow_config import KUBERNETES_NAMESPACE
from metaflow.plugins.aip import (
Expand Down Expand Up @@ -56,7 +57,11 @@ def start(self):
logger.info(f"This flow is triggered by run {self.triggered_by}")

if self.trigger_enabled: # Upload pipeline
self.template_name = (
# for the case where generate_base64_uuid returns a string starting with '-'
# and template_name == 'wfdsk-ftf-test-he5d4--6rhai0z0wiysuew'
# where aip _create_workflow_yaml() calls sanitize_k8s_name() which returns
# 'wfdsk-ftf-test-he5d4-6rhai0z0wiysuew' without the double --
self.template_name = sanitize_k8s_name(
f"{TEST_TEMPLATE_NAME}-{generate_base64_uuid()}".lower()
)
logger.info(f"Creating workflow: {self.template_name}")
Expand Down

0 comments on commit dfa6f85

Please sign in to comment.