forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize CI builds for unimportant pyproject.toml changes (apache#37305)
When dependencies change in pyproject.toml, we should run build with `upgrade-to-newer-dependencies`, however we should not run it when dependencies in pyproject.toml do not change. That saves about 30 minutes of elapsed time of the build and heavily limits the number of tests executed. It takes about 30 minutes now to build the image that has "upgrade-to-newer-dependencies", we only usually run default Python image in such case and we do not run many tests that are not needed (for example K8S tests). This PR optimizes out the case where non-dependency changes only are done in pyproject.toml. This happens for example when you only change docstrings and remove ruff rules in [[tools.ruff]] section. We compare the dependencies and optional dependencies coming from the change and only when there is a change in those, we set the `upgrade-to-newer-dependencies` flag. We also print what changed. Similarly full-tests-needed is only set when build-system changes or when dependencies change, because then we want to make sure new dependencies are working on all Python versions.
- Loading branch information
1 parent
19d43b9
commit f1ddb5a
Showing
5 changed files
with
206 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters