diff --git a/flytekit/remote/remote.py b/flytekit/remote/remote.py index dd0d50b8af..7cbaaa46ca 100644 --- a/flytekit/remote/remote.py +++ b/flytekit/remote/remote.py @@ -1144,8 +1144,9 @@ def _execute( """ if execution_name is not None and execution_name_prefix is not None: raise ValueError("Only one of execution_name and execution_name_prefix can be set, but got both set") - execution_name_prefix = execution_name_prefix + "-" if execution_name_prefix is not None else None - execution_name = execution_name or (execution_name_prefix or "f") + uuid.uuid4().hex[:19] + # todo: The prefix should be passed to the backend + if execution_name_prefix is not None: + execution_name = execution_name_prefix + "-" + uuid.uuid4().hex[:19] if not options: options = Options() if options.disable_notifications is not None: diff --git a/tests/flytekit/unit/remote/test_remote.py b/tests/flytekit/unit/remote/test_remote.py index 3852da9a31..81e70e0a21 100644 --- a/tests/flytekit/unit/remote/test_remote.py +++ b/tests/flytekit/unit/remote/test_remote.py @@ -598,7 +598,7 @@ def test_execution_name(mock_client, mock_uuid): [ mock.call(ANY, ANY, "execution-test", ANY, ANY), mock.call(ANY, ANY, "execution-test-" + test_uuid.hex[:19], ANY, ANY), - mock.call(ANY, ANY, "f" + test_uuid.hex[:19], ANY, ANY), + mock.call(ANY, ANY, None, ANY, ANY), ] ) with pytest.raises(