<#3626 [Core feature] Flytekit: Add support for ex...
# flytekit
a
#3626 [Core feature] Flytekit: Add support for execution name prefixes in FlyteRemote.execute() Issue created by tomasz-sodzawiczny Motivation: Why do you think this is important? Setting human-readable names might be quite for useful inspecting running executions; at the same time the behavior might be unexpected / dangerous if used naively: Running:
Copy code
ex1 = flyte_remote.execute(my_task, {"input": 1}, execution_name="foo")
ex2 = flyte_remote.execute(my_task, {"input": 2}, execution_name="foo")
Creates only 1 execution (or 0, if execution named "foo" already existed). The second set of inputs is silently ignored, and the existing execution is returned. Goal: What should the final outcome look like, ideally? I would suggest a way to generate a name with a human-readable prefix (with behavior similar to e.g. Kubernetes's
generateName
):
Copy code
ex1 = flyte_remote.execute(my_task, {"input": 1}, execution_name_prefix="foo-")
ex2 = flyte_remote.execute(my_task, {"input": 2}, execution_name_prefix="foo-")

ex1.id.name # Something like "foo-41e2c72fa869"
ex2.id.name # Something like "foo-7742ba115212"
Describe alternatives you've considered Propose: Link/Inline OR Additional context Note: I'm happy to create a PR to flytekit if the idea seems reasonable. Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte