Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Oct 11, 2020

This is final step of implementing #10507 - selective tests.
Depending on files changed by the incoming commit, only subset of
the tests are exucted. The conditions below are evaluated in the
sequence specified below as well:

  • In case of "push" and "schedule" type of events, all tests
    are executed.

  • If no important files and folders changed - no tests are executed.
    This is a typical case for doc-only changes.

  • If any of the environment files (Dockerfile/setup.py etc.) all
    tests are executed.

  • If no "core/other" files are changed, only the relevant types
    of tests are executed:

    • API - if any of the API files/tests changed
    • CLI - if any of the CLI files/tests changed
    • WWW - if any of the WWW files/tests changed
    • Providers - if any of the Providers files/tests changed
  • Integration Heisentests, Quarantined, Postgres and MySQL
    runs are always run unless all tests are skipped like in
    case of doc-only changes.

  • If "Kubernetes" related files/tests are changed, the
    "Kubernetes" tests with Kind are run. Note that those tests
    are run separately using Host environment and those tests
    are stored in "kubernetes_tests" folder.

  • If some of the core/other files change, all tests are run. This
    is calculated by substracting all the files count calculated
    above from the total count of important files.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@potiuk
Copy link
Member Author

potiuk commented Oct 11, 2020

I am still testing that one in my private fork (https://github.com/potiuk/airflow/pulls). There are 12 pull requests that (I hope) should run faster or longer, and have more or less checks depending on the files that are changed in the upcoming commit.

This is final step of implementing #10507 and I think this will be ultimate saver on the job queues that we have in Github Actions - and for most contributors it will significantly speed up the feedback time - if they only change docs + some of the providers for example. I will use the linked 12 PRs from my fork to make sure that it works as expected before merging but I am happy to get reviews before.

Copy link
Member Author

@potiuk potiuk Oct 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have as many savings as I think we will, we can likely even bring back all python variants for all tests.

@potiuk potiuk force-pushed the selective-tests-2nd-attempt branch from 2790c5e to 69bb493 Compare October 11, 2020 13:04
This was referenced Oct 11, 2020
@potiuk potiuk force-pushed the selective-tests-2nd-attempt branch 2 times, most recently from 1e7a72b to 993409e Compare October 11, 2020 15:50
This is final step of implementing apache#10507 - selective tests.
Depending on files changed by the incoming commit, only subset of
the tests are exucted. The conditions below are evaluated in the
sequence specified below as well:

* In case of "push" and "schedule" type of events, all tests
  are executed.

* If no important files and folders changed - no tests are executed.
  This is a typical case for doc-only changes.

* If any of the environment files (Dockerfile/setup.py etc.) all
  tests are executed.

* If no "core/other" files are changed, only the relevant types
  of tests are executed:

  * API - if any of the API files/tests changed
  * CLI - if any of the CLI files/tests changed
  * WWW - if any of the WWW files/tests changed
  * Providers - if any of the Providers files/tests changed

* Integration Heisentests, Quarantined, Postgres and MySQL
  runs are always run unless all tests are skipped like in
  case of doc-only changes.

* If "Kubernetes" related files/tests are changed, the
  "Kubernetes" tests with Kind are run. Note that those tests
  are run separately using Host environment and those tests
  are stored in "kubernetes_tests" folder.

* If some of the core/other files change, all tests are run. This
  is calculated by substracting all the files count calculated
  above from the total count of important files.

Fixes: apache#10507
@potiuk potiuk force-pushed the selective-tests-2nd-attempt branch from 993409e to 5cf673f Compare October 11, 2020 16:06
@potiuk potiuk changed the title Selective tests 2nd attempt Selective tests - depends on files changed in the commit. Oct 11, 2020
@potiuk
Copy link
Member Author

potiuk commented Oct 11, 2020

Hello everyone - this one is ready for review and it looks like it works as expected:

You can see all the 13 different cases where I tested small changes in some of the combinations:

https://github.com/potiuk/airflow/pulls

Examples:

@potiuk
Copy link
Member Author

potiuk commented Oct 11, 2020

Would be great to merge this one for the coming weel - it will significantly decrease the strain on the GA.

@potiuk potiuk merged commit 369bbf0 into apache:master Oct 11, 2020
@potiuk potiuk deleted the selective-tests-2nd-attempt branch October 11, 2020 22:28
potiuk added a commit that referenced this pull request Nov 14, 2020
This is final step of implementing #10507 - selective tests.
Depending on files changed by the incoming commit, only subset of
the tests are exucted. The conditions below are evaluated in the
sequence specified below as well:

* In case of "push" and "schedule" type of events, all tests
  are executed.

* If no important files and folders changed - no tests are executed.
  This is a typical case for doc-only changes.

* If any of the environment files (Dockerfile/setup.py etc.) all
  tests are executed.

* If no "core/other" files are changed, only the relevant types
  of tests are executed:

  * API - if any of the API files/tests changed
  * CLI - if any of the CLI files/tests changed
  * WWW - if any of the WWW files/tests changed
  * Providers - if any of the Providers files/tests changed

* Integration Heisentests, Quarantined, Postgres and MySQL
  runs are always run unless all tests are skipped like in
  case of doc-only changes.

* If "Kubernetes" related files/tests are changed, the
  "Kubernetes" tests with Kind are run. Note that those tests
  are run separately using Host environment and those tests
  are stored in "kubernetes_tests" folder.

* If some of the core/other files change, all tests are run. This
  is calculated by substracting all the files count calculated
  above from the total count of important files.

Fixes: #10507
(cherry picked from commit 369bbf0)
@potiuk potiuk added the type:misc/internal Changelog: Misc changes that should appear in change log label Nov 14, 2020
@potiuk potiuk added this to the Airflow 1.10.13 milestone Nov 14, 2020
potiuk added a commit that referenced this pull request Nov 16, 2020
This is final step of implementing #10507 - selective tests.
Depending on files changed by the incoming commit, only subset of
the tests are exucted. The conditions below are evaluated in the
sequence specified below as well:

* In case of "push" and "schedule" type of events, all tests
  are executed.

* If no important files and folders changed - no tests are executed.
  This is a typical case for doc-only changes.

* If any of the environment files (Dockerfile/setup.py etc.) all
  tests are executed.

* If no "core/other" files are changed, only the relevant types
  of tests are executed:

  * API - if any of the API files/tests changed
  * CLI - if any of the CLI files/tests changed
  * WWW - if any of the WWW files/tests changed
  * Providers - if any of the Providers files/tests changed

* Integration Heisentests, Quarantined, Postgres and MySQL
  runs are always run unless all tests are skipped like in
  case of doc-only changes.

* If "Kubernetes" related files/tests are changed, the
  "Kubernetes" tests with Kind are run. Note that those tests
  are run separately using Host environment and those tests
  are stored in "kubernetes_tests" folder.

* If some of the core/other files change, all tests are run. This
  is calculated by substracting all the files count calculated
  above from the total count of important files.

Fixes: #10507
(cherry picked from commit 369bbf0)
potiuk added a commit that referenced this pull request Nov 16, 2020
This is final step of implementing #10507 - selective tests.
Depending on files changed by the incoming commit, only subset of
the tests are exucted. The conditions below are evaluated in the
sequence specified below as well:

* In case of "push" and "schedule" type of events, all tests
  are executed.

* If no important files and folders changed - no tests are executed.
  This is a typical case for doc-only changes.

* If any of the environment files (Dockerfile/setup.py etc.) all
  tests are executed.

* If no "core/other" files are changed, only the relevant types
  of tests are executed:

  * API - if any of the API files/tests changed
  * CLI - if any of the CLI files/tests changed
  * WWW - if any of the WWW files/tests changed
  * Providers - if any of the Providers files/tests changed

* Integration Heisentests, Quarantined, Postgres and MySQL
  runs are always run unless all tests are skipped like in
  case of doc-only changes.

* If "Kubernetes" related files/tests are changed, the
  "Kubernetes" tests with Kind are run. Note that those tests
  are run separately using Host environment and those tests
  are stored in "kubernetes_tests" folder.

* If some of the core/other files change, all tests are run. This
  is calculated by substracting all the files count calculated
  above from the total count of important files.

Fixes: #10507
(cherry picked from commit 369bbf0)
kaxil pushed a commit that referenced this pull request Nov 18, 2020
This is final step of implementing #10507 - selective tests.
Depending on files changed by the incoming commit, only subset of
the tests are exucted. The conditions below are evaluated in the
sequence specified below as well:

* In case of "push" and "schedule" type of events, all tests
  are executed.

* If no important files and folders changed - no tests are executed.
  This is a typical case for doc-only changes.

* If any of the environment files (Dockerfile/setup.py etc.) all
  tests are executed.

* If no "core/other" files are changed, only the relevant types
  of tests are executed:

  * API - if any of the API files/tests changed
  * CLI - if any of the CLI files/tests changed
  * WWW - if any of the WWW files/tests changed
  * Providers - if any of the Providers files/tests changed

* Integration Heisentests, Quarantined, Postgres and MySQL
  runs are always run unless all tests are skipped like in
  case of doc-only changes.

* If "Kubernetes" related files/tests are changed, the
  "Kubernetes" tests with Kind are run. Note that those tests
  are run separately using Host environment and those tests
  are stored in "kubernetes_tests" folder.

* If some of the core/other files change, all tests are run. This
  is calculated by substracting all the files count calculated
  above from the total count of important files.

Fixes: #10507
(cherry picked from commit 369bbf0)
cfei18 pushed a commit to cfei18/incubator-airflow that referenced this pull request Mar 5, 2021
This is final step of implementing apache#10507 - selective tests.
Depending on files changed by the incoming commit, only subset of
the tests are exucted. The conditions below are evaluated in the
sequence specified below as well:

* In case of "push" and "schedule" type of events, all tests
  are executed.

* If no important files and folders changed - no tests are executed.
  This is a typical case for doc-only changes.

* If any of the environment files (Dockerfile/setup.py etc.) all
  tests are executed.

* If no "core/other" files are changed, only the relevant types
  of tests are executed:

  * API - if any of the API files/tests changed
  * CLI - if any of the CLI files/tests changed
  * WWW - if any of the WWW files/tests changed
  * Providers - if any of the Providers files/tests changed

* Integration Heisentests, Quarantined, Postgres and MySQL
  runs are always run unless all tests are skipped like in
  case of doc-only changes.

* If "Kubernetes" related files/tests are changed, the
  "Kubernetes" tests with Kind are run. Note that those tests
  are run separately using Host environment and those tests
  are stored in "kubernetes_tests" folder.

* If some of the core/other files change, all tests are run. This
  is calculated by substracting all the files count calculated
  above from the total count of important files.

Fixes: apache#10507
(cherry picked from commit 369bbf0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:CLI area:dev-tools type:misc/internal Changelog: Misc changes that should appear in change log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants