Thread
#prefect-community
    n

    Nicholas Chammas

    1 year ago
    Is it possible to edit the labels on an agent? If not, I suppose as a workaround I could launch a second agent with the desired labels and tear down the original agent.
    FYI, I'm reposting this question since it didn't get any answers: https://github.com/PrefectHQ/prefect/discussions/4472
    ciaran

    ciaran

    1 year ago
    How do you deploy the agent?
    Something like K8s/ECS would just be editing the environment variable on the container
    n

    Nicholas Chammas

    1 year ago
    The agent is deployed on ECS but (looking at the script someone else wrote) it looks like it runs
    prefect agent local start --label ...
    on ECS to start the agent. Does that make sense?
    m

    Mariia Kerimova

    1 year ago
    Hello Nicholas! Sorry for such delay. You'll have to create a new agent with updated labels. So in your case, you'll need to update the script with new labels.
    ciaran

    ciaran

    1 year ago
    Ah, @Nicholas Chammas I'd recommend trying to extract the labels out to the environment variable
    PREFECT__CLOUD__AGENT__LABELS
    n

    Nicholas Chammas

    1 year ago
    Would it make sense to file a feature request to make it possible to edit labels directly (either via the web UI or CLI) on a running agent? With regards to editing
    PREFECT__CLOUD__AGENT__LABELS
    , wouldn't I need to relaunch the agent somehow so it sees the updated environment variable? i.e. It doesn't eliminate the need to take the agent down, right?
    ciaran

    ciaran

    1 year ago
    I think updating it would just restart the process