Marwan Sarieddine
05/27/2020, 2:02 PMprefect agent
command in the cli …Kyle Moon-Wright
05/27/2020, 2:11 PMmutation {
delete_agent(input: <agent_id>) {
success,
error
}
}
Marwan Sarieddine
05/27/2020, 2:31 PMWill Milner
05/27/2020, 2:41 PMKyle Moon-Wright
05/27/2020, 3:00 PMWill Milner
05/27/2020, 3:02 PMMarwan Sarieddine
05/27/2020, 4:13 PMnicholas
05/27/2020, 4:17 PMMarwan Sarieddine
05/27/2020, 4:17 PMnicholas
05/27/2020, 4:18 PMprefect.Client
that I think will make that pretty easy, one secKyle Moon-Wright
05/27/2020, 4:25 PMimport prefect
client = prefect.Client()
client.graphql(
mutation {
delete_agent(input:<agent_id>) {
success,
error
}
}
)
nicholas
05/27/2020, 4:28 PMclient.graphql(
query="mutation { delete_agent(input: agent_id) { success } }", token=api_token
)
client.access_token
doesn't exist)Marwan Sarieddine
05/27/2020, 4:34 PMagent_id
with a string - but I am getting an error message - Expected type delete_agent_input!, found \"dxxxxxxx"
(x’s for hashing out the actual id … )nicholas
05/27/2020, 4:43 PMmutation {
delete_agent(input: { agent_id: <your agent_id> }) {
success
}
}
Marwan Sarieddine
05/27/2020, 4:45 PMnicholas
05/27/2020, 5:04 PMMarwan Sarieddine
05/27/2020, 5:05 PMprefect agent install kubernetes
to generate the manifests - but how can I tell the agent id of the agent I just deployed ? I can query the agents to get a list of agent ids - but is there a way to tell which is the id I just created ? the only way I see is to do a diff on the list of agents before and after I deploy - but that’s quite the workaround …Kyle Moon-Wright
05/27/2020, 5:30 PM--name <agent_name>
tag, so when you query your agents you can discern the latest one a bit easier. Without specifying, the name defaults to agent
, if you’re seeing that in your queries at all.Marwan Sarieddine
05/27/2020, 5:57 PMagent
- but looks like prefect agent install kubernetes
doesn’t accept a --name
option (at least not in prefect v 0.11.2)
Usage: prefect agent install [OPTIONS] NAME
Try 'prefect agent install -h' for help.
Error: no such option: --name Did you mean --namespace?
nicholas
05/28/2020, 3:45 PMinstall
command doesn't accept the --name
flag, the prefect agent start
command does.Marwan Sarieddine
05/28/2020, 3:48 PMnicholas
05/28/2020, 3:49 PM