View in #prefect-community on Slack
@Klemen_Strojan : Hey all -
I can’t remove one of our agents (k8s) from the UI. What is the mutation to do this with the API?
@Anna_Geller : @Klemen_Strojan are you trying to stop the agent from the UI, or only remove a UI tile of an old agent that has already been stopped?
@Klemen_Strojan : The later - remove the UI tile of an old agent.
@Anna_Geller : Can you try the Clean up icon?
it usually takes some time to clean up
can you try that and share a screenshot? I could dig into GraphQL but with UI is way easier
@Klemen_Strojan : Sure:
This is what I get with remove:
Clean-up will come in handy after 12 hours.
@Anna_Geller : interesting! let me check it
Do you know the agent id?
here is the delete mutation:
mutation DeleteAgent($agentId: UUID!) {
delete_agent(input: { agent_id: $agentId }) {
success
}
}
ok, so you can get the agent ID this way:
query Agents {
agent {
id
agent_config_id
core_version
created
name
labels
last_queried
type
}
}
this should work
@Klemen_Strojan : This is what I get:
@Anna_Geller : @Klemen_Strojan can you share the output of “prefect diagnostics”?
I’m creating an issue for it
@Klemen_Strojan if you can share your “prefect diagnostics”, I’ll update it here https://github.com/PrefectHQ/prefect/issues/5216
GitHub: API_ERROR when trying to delete an idle agent using UI and GraphQL API · Issue #5216 · PrefectHQ/prefect
@Klemen_Strojan : How can I share my prefect diagnostics?
@Anna_Geller : you run this command in your terminal:
prefect diagnostics
and share the output here
@Klemen_Strojan :
{
"config_overrides": {
"context": {
"secrets": false
}
},
"env_vars": [
"PREFECT__FLOWS__CHECKPOINTING"
],
"system_information": {
"platform": "macOS-10.16-x86_64-i386-64bit",
"prefect_backend": "cloud",
"prefect_version": "0.15.10",
"python_version": "3.8.12"
}
}
Thanks for your help! I’ll be opening a new issue for K8s soon. It’s a weird day I guess.