Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Dec 22, 2022

The provider validation pre-commit is now a lot slower after #28516 but it turned out that it has been also doing a little too much.

It worked in the way (against the original design) that when any provider.yaml changed, validation was actually performed for all the providers, not only for those changed.

This change improves the regular speed of running this validation when one or few providers are changed in the commit.

It's not only limiting the validation to those provider.yaml files that changes but also performing subset of validations on those changed files if not all providers are changed or --all-files are not used (because some of the validations involving documentation and cross-provider dependencies require all provider.yaml files to be loaded and validated).

The validation is still done in one "docker run" command though.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

The provider validation pre-commit is now a lot slower after apache#28516
but it turned out that it has been also doing a little too much.

It worked in the way (against the original design) that when any
provider.yaml changed, validation was actually performed for all
the providers, not only for those changed.

This change improves the regular speed of running this validation
when one or few providers are changed in the commit.

It's not only limiting the validation to those provider.yaml files
that changes but also performing subset of validations on those changed
files if not all providers are changed or --all-files are not used
(because some of the validations involving documentation and
cross-provider dependencies require all provider.yaml files to be loaded
and validated).

The validation is still done in one "docker run" command though.
@potiuk
Copy link
Member Author

potiuk commented Dec 22, 2022

All green.

@potiuk
Copy link
Member Author

potiuk commented Dec 28, 2022

Anyone needs some speed-ups :) ?

@potiuk potiuk merged commit 69df1c5 into apache:main Dec 28, 2022
@potiuk potiuk deleted the speed-up-provider-yaml-pre-commit branch December 28, 2022 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants