mik-laj opened a new pull request #8050: Fix airflow.www.views import
URL: https://github.com/apache/airflow/pull/8050
 
 
   Before:
   ```
   03:20 $ python -c 'import airflow.www.views'
   [2020-04-02 03:20:51,157] {dagbag.py:368} INFO - Filling up the DagBag from 
/Users/kamilbregula/airflow/dags
   Traceback (most recent call last):
     File "<string>", line 1, in <module>
     File 
"/Users/kamilbregula/devel/google-airflow/airflow/airflow/www/views.py", line 
147, in <module>
       @app.errorhandler(404)
   AttributeError: 'NoneType' object has no attribute 'errorhandler'
   ```
   After:
   ```
   03:20 $ python -c 'import airflow.www.views'
   [2020-04-02 03:24:12,793] {dagbag.py:368} INFO - Filling up the DagBag from 
/Users/kamilbregula/airflow/dags
   ```
   We use factory pattern, so we should use register_error_handler.
   
   
https://flask.palletsprojects.com/en/1.1.x/patterns/errorpages/#error-handlers
   
   
   
   ---
   Issue link: WILL BE INSERTED BY 
[boring-cyborg](https://github.com/kaxil/boring-cyborg)
   
   Make sure to mark the boxes below before creating PR: [x]
   
   - [ ] Description above provides context of the change
   - [ ] Unit tests coverage for changes (not needed for documentation changes)
   - [ ] Commits follow "[How to write a good git commit 
message](http://chris.beams.io/posts/git-commit/)"
   - [ ] Relevant documentation is updated including usage instructions.
   - [ ] I will engage committers as explained in [Contribution Workflow 
Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   ---
   In case of fundamental code change, Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals))
 is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party 
License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in 
[UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   Read the [Pull Request 
Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)
 for more information.
   

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


With regards,
Apache Git Services

Reply via email to