Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Jun 26, 2022

After implementing #24610 and few follow-up fixes, it is now easy
to add more optimizations to our unit test execution in CI (and
to give this capability back to our contributors).

This PR adds capability of running tests for selected set of
providers - not for the whole "Providers" group. You can
specify `--test-type "Providers[airbyte,http]" to only run tests
for the two selected providers.

This is the step towards separating providers to separate
repositories, but it also allows to optimize the experience of
the contributors developing only single provider changes (which
is vast majority of contributions).

This also allows to optimize build and elapsed time needd to run
tests for those PRs that only affects selected providers (again -
vast majority of PRs).

The CI selection of which provider tests is done now in Selective
Checkcs - they are a bit smarter in just selecting the providers
that has been changed, they also check if there are any other
providers that depend on it (we keep automatically updated by
pre-commit dependencies.json file and this file determines
which files should be run.


^ 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 a newsfragement file, named {pr_number}.significant.rst, in newsfragments.

@potiuk potiuk requested review from dstandish, eladkal and uranusjr June 26, 2022 13:12
@potiuk potiuk force-pushed the add-more-selective-provider-checks branch from 5d1b3a9 to 9934de2 Compare June 27, 2022 01:04
@potiuk potiuk force-pushed the add-more-selective-provider-checks branch from 9934de2 to a1f9ec5 Compare June 27, 2022 10:12
@potiuk
Copy link
Member Author

potiuk commented Jun 27, 2022

Resolved @bhirsz :). Thanks for feedback. The for/else clause made my day.

@potiuk
Copy link
Member Author

potiuk commented Jun 27, 2022

BTW. This one is going to help quite a bit with the elapsed time neeed for "localized" PRs to providers :) and together with #24671 it will be even more localised as any changes to provider including it's dependencies will limit tests to only this provider, they won't need the "core" tests at all.

@potiuk potiuk force-pushed the add-more-selective-provider-checks branch 5 times, most recently from d459df2 to c3bd97d Compare July 4, 2022 21:26
@potiuk
Copy link
Member Author

potiuk commented Jul 4, 2022

Anyone ? This should speed up the tests in most cases and adds a way how to run tests per provider (will be useful in the future when we split providers).

@potiuk potiuk force-pushed the add-more-selective-provider-checks branch from e75b3f0 to 928049c Compare July 6, 2022 15:59
@potiuk
Copy link
Member Author

potiuk commented Jul 6, 2022

Nice I added tests :). In the meantime I changed the provider_dependencies.json structure and the tests nicely caught it :)

After implementing apache#24610 and few follow-up fixes, it is now easy
to add more optimizations to our unit test execution in CI (and
to give this capability back to our contributors).

This PR adds capability of running tests for selected set of
providers - not for the whole "Providers" group. You can
specify `--test-type "Providers[airbyte,http]" to only run tests
for the two selected providers.

This is the step towards separating providers to separate
repositories, but it also allows to optimize the experience of
the contributors developing only single provider changes (which
is vast majority of contributions).

This also allows to optimize build and elapsed time needd to run
tests for those PRs that only affects selected providers (again -
vast majority of PRs).

The CI selection of which provider tests is done now in Selective
Checkcs - they are a bit smarter in just selecting the providers
that has been changed, they also check if there are any other
providers that depend on it (we keep automatically updated by
pre-commit dependencies.json file and this file determines
which files should be run.
@potiuk potiuk force-pushed the add-more-selective-provider-checks branch from 928049c to f04bc8b Compare July 6, 2022 18:17
@potiuk potiuk merged commit 3dedbd3 into apache:main Jul 6, 2022
@potiuk potiuk deleted the add-more-selective-provider-checks branch July 6, 2022 19:55
potiuk added a commit that referenced this pull request Jul 21, 2022
After implementing #24610 and few follow-up fixes, it is now easy
to add more optimizations to our unit test execution in CI (and
to give this capability back to our contributors).

This PR adds capability of running tests for selected set of
providers - not for the whole "Providers" group. You can
specify `--test-type "Providers[airbyte,http]" to only run tests
for the two selected providers.

This is the step towards separating providers to separate
repositories, but it also allows to optimize the experience of
the contributors developing only single provider changes (which
is vast majority of contributions).

This also allows to optimize build and elapsed time needd to run
tests for those PRs that only affects selected providers (again -
vast majority of PRs).

The CI selection of which provider tests is done now in Selective
Checkcs - they are a bit smarter in just selecting the providers
that has been changed, they also check if there are any other
providers that depend on it (we keep automatically updated by
pre-commit dependencies.json file and this file determines
which files should be run.

(cherry picked from commit 3dedbd3)
@ephraimbuddy ephraimbuddy added this to the Airflow 2.3.4 milestone Aug 15, 2022
@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants