-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BugFix: CLI 'kubernetes cleanup-pods' should only clean up Airflow-created Pods #15204
Conversation
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest master or amend the last commit of the PR, and push it with --force-with-lease. |
Currently condition 'if the pod is created by Airflow' is not considered. This commit fixes this. We decide if the Pod is created by Airflow via checking if it has all the labels added in PodGenerator.construct_pod().
I have added one more commit, c1218d5, to update the help string of this CLI (to highlight we only clean up pods created by KubernetesExecutor/KubernetesPodOperator), so that the scope is clearer to users. If you have no objection about it, I will merge later today. Cheers |
…eated Pods (#15204) closes: #15193 Currently condition if the pod is created by Airflow is not considered. This commit fixes this. We decide if the Pod is created by Airflow via checking if it has all the labels added in PodGenerator.construct_pod() or KubernetesPodOperator.create_labels_for_pod(). (cherry picked from commit c594d9c)
closes: #15193
Currently condition
if the pod is created by Airflow
is not considered. This commit fixes this.We decide if the Pod is created by Airflow via checking if it has all the labels added in
PodGenerator.construct_pod()
orKubernetesPodOperator.create_labels_for_pod()
.Test added.