[X] I used the GitHub search to find a similar request and didn't find it.
[X] I searched the Prefect documentation for this feature.
Describe the current behavior
User-chosen names are static. If not given, defaults to flow_run.name.
Describe the proposed behavior
Allow using any flow or flow_run parameter to set the infra name.
Example Use
Specifying a name.
from prefect_docker.worker import DockerWorkerJobConfiguration
DockerWorkerJobConfiguration(name="worker-1/{flow.name}/{flow_run.name}")
The main advantage is that it's easier to tell at a glance what's running, e.g. with docker stats:
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM %
b46329f94fbf worker-1_small-flow_phi310-wezn 34.69% 2.828GiB / 50.94GiB 5.55%
b3e8c1db8da5 worker-1_big-flow_mu5-argana-conflux 769.65% 3.128GiB / 50.94GiB 6.14%
First check
Describe the current behavior
User-chosen names are static. If not given, defaults to
flow_run.name
.Describe the proposed behavior
Allow using any
flow
orflow_run
parameter to set the infra name.Example Use
Specifying a name.
The main advantage is that it's easier to tell at a glance what's running, e.g. with
docker stats
:Additional context
This seems pretty easy to implement, see https://github.com/PrefectHQ/prefect/compare/main...rsundqvist:prefect:main