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 2021/04/26 07:32:19 UTC

[GitHub] [airflow] potiuk opened a new issue #15525: Improve test coverage of views

potiuk opened a new issue #15525:
URL: https://github.com/apache/airflow/issues/15525


   There are quite a number of untested views: 
   
   https://codecov.io/gh/apache/airflow/src/master/airflow/www/views.py 80%
   
   We might want to improve test coverage for those.


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



[GitHub] [airflow] uranusjr commented on issue #15525: Improve test coverage of views

Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #15525:
URL: https://github.com/apache/airflow/issues/15525#issuecomment-828106725


   I wonder if this is also a good chance to improve the www/view tests as a whole. One thing I found while working on improving test suite run time (#14857 etc.) was the whole `tests/www/test_views.py` file is much too complex and less maintainable relative to other tests (#14863), and could use some big cleanup and reorganisation (e.g. split into smaller files with more granular fixture setup).


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



[GitHub] [airflow] potiuk commented on issue #15525: Improve test coverage of views

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #15525:
URL: https://github.com/apache/airflow/issues/15525#issuecomment-828274517


   But feel free to do it If you feel like it :). The old UI will be with us for quite a while still (at least till 3.0)


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



[GitHub] [airflow] potiuk commented on issue #15525: Improve test coverage of views

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #15525:
URL: https://github.com/apache/airflow/issues/15525#issuecomment-828273220


   Yeah. We know it. But we also want to get rid of it and replace it with the new UI (work is on-going) so rather than refactoring and fixing the current approach (which is based on Flask Application Builder) we want to 'properly' build the new UI. See https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-38+Modern+Web+Application


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



[GitHub] [airflow] uranusjr commented on issue #15525: Improve test coverage of views

Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #15525:
URL: https://github.com/apache/airflow/issues/15525#issuecomment-966035999


   To test a view, you need to set up a `Flask` app instance, and use it to invoke the views. Since setting up the `Flask` instance is quite costly, it’s important to reuse the instance as much as possible; in general we use Pytest’s [fixture scope](https://docs.pytest.org/en/stable/fixture.html#scope-sharing-fixtures-across-classes-modules-packages-or-session) for this; fixtures generating `Flask` instance would be marked either `module` or even `session` scoped so they can be reused by tests inside a `.py` file or for the entire `pytest` run. So it’d be very beneficial to first read and understand how Pytest fixtures, discoverer, and runner work. The test setup would make a lot more sense after that.


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] rsg17 commented on issue #15525: Improve test coverage of views

Posted by GitBox <gi...@apache.org>.
rsg17 commented on issue #15525:
URL: https://github.com/apache/airflow/issues/15525#issuecomment-966032891


   Hi - I am new to Airflow and would like to contribute to this. Do you have some pointers to help me get started? I was going to look at the previous PRs to get some ideas and context. 


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org