You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/02/02 04:47:05 UTC

[GitHub] [airflow] xinbinhuang commented on issue #7249: [AIRFLOW-6626] Add email on failure or retry to default config

xinbinhuang commented on issue #7249: [AIRFLOW-6626] Add email on failure or retry to default config
URL: https://github.com/apache/airflow/pull/7249#issuecomment-581098112
 
 
   @mik-laj @kaxil  Hi, I refactored the tests and stop trying to use `@conf_vars` to test the change on default_config. 
   
   The reason is that when I try to do `importlib.reload(baseoperator)` to refresh the config, it will also mess up with the test on `TestBaseOperatorMethods::test_cross_downstream` and `TestBaseOperatorMethods::test_chain`. After the reload, it leads to the weird behavior below and I am not sure what's going on.
   
   ```
   # This can be reproduced by adding below after the imports in `test_baseoperator.py` 
   ### import importlib
   ### from airflow.models import baseoperator
   ### importlib.reload(baseoperator)
   
   # It will fails on the below checks in BaseOperator.chain() and BaseOperator._set_relative
   isinstance(task, BaseOperator)  # here task = DummyOperator()
   False
   ```
   
   I would love to fix this if there are more pointers, but I believe right now the test has already served the purpose of testing the default values are boolean.
   
   PTAL and let me know how you think.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services