Agon Shabi
05/11/2023, 7:45 PMk8s_job_executor
(i.e. each op is run as its own job), cancellation from the UI manages to delete the "parent" k8s job, but its children (the op jobs) silently continue in the background.I'm not sure that this was always the case, but I think you can tighten this up by including an owner reference (https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/#owner-references-in-object-specifications) when creating the op jobs here: https://github.com/dagster-io/dagster/blob/eb26ca5d1fb69df0034742630e8fcc3f6799c34b/python_modules/libraries/dagster-k8s/dagster_k8s/executor.py#L234-L255
So when a user cancels from the UI, the K8sRunLauncher
deletes the dagster-run-...
job: https://github.com/dagster-io/dagster/blob/eb26ca5d1fb69df0034742630e8fcc3f6799c34b/python_modules/libraries/dagster-k8s/dagster_k8s/launcher.py#L313-L315, and then kubernetes itself will delete the 'owned' dagster-step-...
jobs automatically.
Loving all the work you guys are doing!prha
05/11/2023, 8:04 PMAgon Shabi
05/11/2023, 8:22 PMprha
05/11/2023, 8:22 PM