kaxil commented on a change in pull request #6596: [AIRFLOW-6004] Untangle 
Executors class to avoid cyclic imports
URL: https://github.com/apache/airflow/pull/6596#discussion_r352914727
 
 

 ##########
 File path: airflow/executors/dask_executor.py
 ##########
 @@ -36,9 +35,7 @@ def __init__(self, cluster_address=None):
         super().__init__(parallelism=0)
         if cluster_address is None:
             cluster_address = conf.get('dask', 'cluster_address')
-        if not cluster_address:
-            raise ValueError(
-                'Please provide a Dask cluster address in airflow.cfg')
+        assert cluster_address, 'Please provide a Dask cluster address in 
airflow.cfg'
 
 Review comment:
   I remember the discussion (in one of the old PRs) where adding assert in the 
code was highly discouraged. One of the reason I think was 
https://stackoverflow.com/a/1838411/5691525 
   
   >"assert" statements are removed when the compilation is optimized.

----------------------------------------------------------------
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