diff --git a/metaflow/plugins/aip/aip.py b/metaflow/plugins/aip/aip.py index 1d81a697e65..04b7af03bb5 100644 --- a/metaflow/plugins/aip/aip.py +++ b/metaflow/plugins/aip/aip.py @@ -291,10 +291,9 @@ def _create_workflow_yaml( # Note the name has to follow k8s format. # self.name is typically CamelCase as it's python class name. # generateName contains a sanitized version of self.name from aip.compiler + default_workflow_name = workflow["metadata"].pop("generateName").rstrip("-") workflow["metadata"]["name"] = ( - sanitize_k8s_name(name) - if name - else workflow["metadata"].pop("generateName").rstrip("-") + sanitize_k8s_name(name) if name else default_workflow_name ) # Service account is added through webhooks.