Troy Sankey
05/13/2020, 2:27 PM{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "jobs.batch \"load-google-analytics-data-to-snowflake\" already exists",
"reason": "AlreadyExists",
"details": {
"name": "load-google-analytics-data-to-snowflake",
"group": "batch",
"kind": "jobs"
},
"code": 409
}
kubectl --namespace=prefect delete job load-google-analytics-data-to-snowflake
spec:
ttlSecondsAfterFinished: 60
...
nicholas
05/13/2020, 2:35 PMDeleteNamespacedJob
, and is something you can build into your flow so that it cleans up after itself with every run. You could also check that the job exists and remove it before trying to recreate. Otherwise, I think this is a problem with the KubernetesJobEnvironment that @josh is going to try to PR a fix for ASAP.Troy Sankey
05/13/2020, 2:41 PMDeleteNamespacedJob
but I should clarify that this seems to happen at a layer before my first task can even run (i.e. my code to check if the job exist would be running inside the job), so I think checking for the existence of a job would not work.nicholas
05/13/2020, 2:44 PMTroy Sankey
05/13/2020, 2:44 PMnicholas
05/13/2020, 2:45 PMjosh
05/13/2020, 2:45 PMnicholas
05/13/2020, 2:46 PMjosh
05/13/2020, 2:47 PMTroy Sankey
05/13/2020, 2:49 PM