PrefectHQ / prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
https://prefect.io
Apache License 2.0
15.86k stars 1.56k forks source link

API_ERROR when trying to delete an idle agent using UI and GraphQL API #5216

Closed anna-geller closed 2 years ago

anna-geller commented 2 years ago

Description

Reported via this Community Slack thread

The user gets the following API_ERROR:

image

image

Used in the following environment:

{
  "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"
  }
}
thomasfrederikhoeck commented 2 years ago

I'm still seeing this issue :-)

strojank commented 2 years ago

The same goes for me

zanieb commented 2 years ago

We're still investigating an ideal long-term solution here. The issue will be updated once resolved.

zangell44 commented 2 years ago

This should now be resolved, thanks all for the reports. If you're still seeing issues deleting agents, please feel free to reopen

strojank commented 2 years ago

This worked for me, thanks!

thomasfrederikhoeck commented 2 years ago

I'm still seeing this error when running it from the Interactive API in the UI @zangell44 :

{
  "errors": [
    {
      "path": [
        "delete_agent"
      ],
      "message": "Operation timed out",
      "extensions": {
        "code": "API_ERROR"
      }
    }
  ],
  "data": {
    "delete_agent": null
  }
}

----- UPDATE ---- Running it a few times made it work. :-)

zangell44 commented 2 years ago

@thomasfrederikhoeck deletes for very active agents may still hit timeouts, helpful to know! I should also have mentioned the new behavior will accomplish a portion of the delete each time at minimum, so running the API request a few times (or angrily spamming the "Remove" button) should allow the delete to eventually succeed.

LoicEm commented 2 years ago

Can confirm that the spamming method worked out for me, but it took 20+ tries through the interactive API, so don't give up !

ghost commented 1 year ago

I'm still seeing this error when running it from the Interactive API in the UI @zangell44 :

{
  "errors": [
    {
      "path": [
        "delete_agent"
      ],
      "message": "Operation timed out",
      "extensions": {
        "code": "API_ERROR"
      }
    }
  ],
  "data": {
    "delete_agent": null
  }
}

----- UPDATE ---- Running it a few times made it work. :-)

Second this, I had to run it several times, and it worked finally.

ibabeo commented 1 year ago

Please reopen the issue as the error keeps occuring. @anna-geller

Not been able to succeed after 30+ tries. Mostly the API_ERROR is returned and once in a while the following error appears as well.

{
  "errors": {
    "message": "Failed to fetch",
    "stack": "TypeError: Failed to fetch\n    at https://cloud.prefect.io/js/chunk-vendors~323f991a.dd7bce1a.js:37:764"
  }
}
ghost commented 1 year ago

Please reopen the issue as the error keeps occuring. @anna-geller

Not been able to succeed after 30+ tries. Mostly the API_ERROR is returned and once in a while the following error appears as well.

{
  "errors": {
    "message": "Failed to fetch",
    "stack": "TypeError: Failed to fetch\n    at https://cloud.prefect.io/js/chunk-vendors~323f991a.dd7bce1a.js:37:764"
  }
}

Can confirm this. It was working for the first time but later attempts never succeeded, we have to open a ticket with Prefect Cloud to have it manually removed.