kaxil commented on a change in pull request #7507: [AIRFLOW-6885] Delete worker 
on success
URL: https://github.com/apache/airflow/pull/7507#discussion_r382946377
 
 

 ##########
 File path: airflow/executors/kubernetes_executor.py
 ##########
 @@ -848,10 +850,13 @@ def sync(self) -> None:
 
     def _change_state(self, key: TaskInstanceKeyType, state: Optional[str], 
pod_id: str) -> None:
         if state != State.RUNNING:
-            if self.kube_config.delete_worker_pods:
+            if self.kube_config.delete_on_success and state is State.SUCCESS:
 
 Review comment:
   ```suggestion
               if self.kube_config.delete_worker_pods_on_success and state is 
State.SUCCESS:
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to