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 2022/04/19 14:17:30 UTC

[GitHub] [airflow] potiuk opened a new issue, #23083: Breeze: Running integration tests in Breeze

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

   We should be able to run integration tests with Breeze - this is extension of `test` unit tests command that should allow to enable --integrations (same as in Shell) and run the tests with only the integration tests selected.


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

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


[GitHub] [airflow] Bowrna commented on issue #23083: Breeze: Running integration tests in Breeze

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

   @joppevos 
   https://github.com/apache/airflow/pull/23052 - This is in the new breeze where you can join the shell of interactive airflow container to execute commands. It's not yet merged.
   
   


-- 
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] joppevos commented on issue #23083: Breeze: Running integration tests in Breeze

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

   @potiuk I can take this one :)
   so we want a flag like `breeze test --integrations`?


-- 
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] joppevos commented on issue #23083: Breeze: Running integration tests in Breeze

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

   @potiuk I tried to make a start this morning, but some things are not clear to me yet. 
   
   We want to run pytest in our container. Too run `docker exec ...pytest`, the container needs to be running. 
   Do we want `breeze tests` to spin up the container? 
   A logic like the following:
   ```
   check if container is running
   ...
   if not, spin up container detached
   exec pytest in container
   ...
   forward pytest results to stdout
   stop de container
   ```
   
   In `breeze-legacy`, we ask the user to first spin up the container himself, detached. 
   I cannot find a command in the new breeze where we can spin the container up easily detached. Then we need to provide a command for that too i guess. something like `docker-compose up -d` wrapped with `breeze up`?
   
   Thanks for the help and rubber ducking 🦆 
   


-- 
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] joppevos commented on issue #23083: Breeze: Running integration tests in Breeze

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

   @potiuk Great. I think the general test command wil be covered by [this](https://github.com/apache/airflow/issues/23082) issue not? This will then depend on the implementation of that issue. I can make a start on the `breeze test` command and see later how we bring it together @Bowrna 


-- 
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] potiuk commented on issue #23083: Breeze: Running integration tests in Breeze

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

   > We want to run pytest in our container. Too run `docker exec ...pytest`, the container needs to be running. Do we actually want `breeze tests` to spin up the container?
   
   Yes. This is how it was done before and this is also needed to run the tests in CI (and how they are run currently).
    Basically in CI we run multiple tests in parallel - and what we do we spin multiple containers for that - each "group" of tests is run in a separate container with separate databases and separate integrations if needed. So for that we need to have a test command that
   
   1) starts a docker-compose with container and all necessary containers. Depending on the test type different containers are starting (for examplef when you run integration, all the integration containers are started).
   2) run the tests in the container (this is done by running the same thing as entering shell but setting a few env variables - RUN_TESTS, TEST_TYPE I thiink
   
   At later stage (when we reuse it in CI) - we should be able to run several docker-compose in parallel (this is easy - by just setting different docker-compose name)
   
   All that done in `./breeze-legacy` and scripts that run test . For now just focus on what `breeze-legacy` does.
   
   Spinning containers is a very cheap operation in fact. so this is not e problem to run them for tests.
   
   
   
   
   


-- 
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] potiuk closed issue #23083: Breeze: Running integration tests in Breeze

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #23083: Breeze: Running integration tests in Breeze
URL: https://github.com/apache/airflow/issues/23083


-- 
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] potiuk commented on issue #23083: Breeze: Running integration tests in Breeze

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

   I think we need to do "breeze test" in general first - just to allow regular unit testing to be executed with single command.
   
   We already have CI executing the different test types - and we need to automate CI running of those tests in parallel but it should start with a `breeze test` command:
   
   The different test types are described here:
   
   https://github.com/apache/airflow/blob/main/TESTING.rst#airflow-test-types
   
   
   And we gnerally have to implement equivalent of this:
   
   
   Detailed usage for command: tests
   
   
   ```
   breeze-legacy tests [FLAGS] [TEST_TARGET ..] [-- <EXTRA_ARGS>]
   
         Run the specified unit test target. There might be multiple
         targets specified separated with comas. The <EXTRA_ARGS> passed after -- are treated
         as additional options passed to pytest. You can pass 'tests' as target to
         run all tests. For example:
   
         'breeze-legacy tests tests/core/test_core.py -- --logging-level=DEBUG'
         'breeze-legacy tests tests
   
   Flags:
   
   --test-type TEST_TYPE
           Type of the test to run. One of:
   
                  All,Always,Core,Providers,API,CLI,Integration,Other,WWW,Postgres,MySQL,Helm,
                  Quarantined
   
           Default: All
   ```
   


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