From f73ae1598262bc8820685f63e98e6f509a1f54ac Mon Sep 17 00:00:00 2001 From: Tyler Potts Date: Tue, 24 Oct 2023 10:07:22 -0500 Subject: [PATCH] use shortened uuid for backwards compatibility --- metaflow/plugins/kubernetes/kubernetes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/metaflow/plugins/kubernetes/kubernetes.py b/metaflow/plugins/kubernetes/kubernetes.py index f64e7fa942..99f88d6fdc 100644 --- a/metaflow/plugins/kubernetes/kubernetes.py +++ b/metaflow/plugins/kubernetes/kubernetes.py @@ -2,11 +2,11 @@ import math import os import re -import secrets import shlex import time from typing import Dict, List, Optional - +import uuid +from uuid import uuid4 from metaflow import current, util from metaflow.exception import MetaflowException @@ -180,7 +180,7 @@ def create_job( job = ( KubernetesClient() .job( - generate_name="t-{entropy}".format(entropy=secrets.token_hex(2)), + generate_name="t-{uid}".format(uid=str(uuid4())[:3]), namespace=namespace, service_account=service_account, secrets=secrets,