potiuk commented on a change in pull request #6749: [AIRFLOW-6193] Do not use
asserts in Airflow main code
URL: https://github.com/apache/airflow/pull/6749#discussion_r355208648
##########
File path: airflow/executors/kubernetes_executor.py
##########
@@ -863,9 +876,12 @@ def _flush_result_queue(self) -> None:
def end(self) -> None:
"""Called when the executor shuts down"""
- assert self.task_queue, NOT_STARTED_MESSAGE
- assert self.result_queue, NOT_STARTED_MESSAGE
- assert self.kube_scheduler, NOT_STARTED_MESSAGE
+ if not self.task_queue:
Review comment:
Same here. I specifically want to keep those checks separately - so that
you can figure out from the stack trace which of them was None. This is much
easier than to do debugging.
----------------------------------------------------------------
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