PrefectHQ / prefect

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

Prefect work pool configuration job auto-deletion problem #14525

Open YasmineBrut opened 4 months ago

YasmineBrut commented 4 months ago

First check

Bug summary

Hi,

We are currently using self hosted Prefect. We are running our jobs on Cloud Run V2. In the work pool configuration, there's a keep job option that we set to false in order to automatically delete the jobs after they are completed otherwise we reach the limit of 1000 existing jobs on google. The following json snippet is from our configuration file on Prefect : "keep_job": { "type": "boolean", "title": "Keep Job After Completion", "default": false, "description": "Keep the completed Cloud run job on Google Cloud Platform." }, The problem is that the option doesn't seem to be working, because when jobs are completed, They are kept in the list of jobs in Cloud Run and we are often reaching the 1000 jobs rate limit so each time we need to delete the jobs manually. Is there a way to fix this?

We are currently using the version 2.14.21 of Prefect.

Thank you in advance for your help,

Reproduction

In the work pool config file : 
      "keep_job": {
        "type": "boolean",
        "title": "Keep Job After Completion",
        "default": false,
        "description": "Keep the completed Cloud run job on Google Cloud Platform."
      }

Error

No error but not all jobs are being deleted on GCP cloud run jobs list.

Versions (prefect version output)

Prefect version 2.14.21
No code is used, we just used the toggle button "Keep Job After Completion (Optional)" in Prefect interface when setting a work pool.

Additional context

No response

zzstoatzz commented 4 months ago

hi @YasmineBrut - thanks for the issue!

can you provide the version of prefect-gcp you are using here?

YasmineBrut commented 4 months ago

Hi @zzstoatzz, Sorry for the delay. We are using prefect-gcp 0.5.5