Hey team - Is this expected behavior? I have the f...
# ask-community
s
Hey team - Is this expected behavior? I have the following setup: 1. a ECS agent with label “prod” 2. a Kubernetes agent also with label “prod” 3. run_config:
Copy code
flow.run_config = ECSRun(labels=['prod'],
        image='xxxxxxxx',
        env={"EXTRA_PIP_PACKAGES": "retry"}
    )
I was expecting that although the Kubernetes agent has the label “prod”, prefect scheduler should still only route flow runs to the ECS agent. However, looks like that’s not the case. Error:
Copy code
Flow run ad4bce7b-29cb-4e42-a8c3-eeb9a75f7999 has a `run_config` of type `ECSRun`, only `KubernetesRun` is supported
k
Ah there is no mechanism to constrain agent types to certain RunConfigs. Maybe it can be explored.
@Marvin open “Explore Constraining Agents to Only Pick Up Flows with Corresponding RunConfig”
s
Thank you for opening the issue!
k
I dunno how hard this is because they can all pick up UniversalRun also, which is the default