Troy Sankey
05/13/2020, 2:27 PMTroy Sankey
05/13/2020, 2:28 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
}
Troy Sankey
05/13/2020, 2:28 PMkubectl --namespace=prefect delete job load-google-analytics-data-to-snowflake
Troy Sankey
05/13/2020, 2:29 PMTroy Sankey
05/13/2020, 2:30 PMTroy Sankey
05/13/2020, 2:33 PMspec:
ttlSecondsAfterFinished: 60
...
nicholas
DeleteNamespacedJob
, 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
Troy Sankey
05/13/2020, 2:44 PMnicholas
josh
05/13/2020, 2:45 PMjosh
05/13/2020, 2:46 PMnicholas
josh
05/13/2020, 2:47 PMTroy Sankey
05/13/2020, 2:49 PMTroy Sankey
05/13/2020, 2:53 PM