Skip to content

Comments

Fix selective checks when only pyproject.toml changes#43088

Merged
potiuk merged 1 commit intoapache:mainfrom
potiuk:make-pyproject-toml-and-tests-common-trigger-build
Oct 16, 2024
Merged

Fix selective checks when only pyproject.toml changes#43088
potiuk merged 1 commit intoapache:mainfrom
potiuk:make-pyproject-toml-and-tests-common-trigger-build

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Oct 16, 2024

In case only pyproject.toml changes we should automatically build CI image as we need to run full set of static checks - including mypy and other tools.

This change triggers ci-image for such case and it also fixes a subtle bug where "pyproject_toml_changed" was always set to true (but nothing depended on it, because we are checking if build dependencies changed in pyproject.toml to trigger full build as most of the build logic and dependencies is in hatch_build.py

The change first now attempts to see if the pyprject.toml changed at all (i.e. if pyprooject.toml is in the list of files that are changed in the commit) and only then reads the content of old and new version of pyproject.toml to compare them. This will make selective checks a bit faster as it won't run two git commands when pyproject.toml has not changed.

Also tests_common are now added to "all sources" group which should trigger tests when only tests_common change.


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

In case only pyproject.toml changes we should automatically build
CI image as we need to run full set of static checks - including
mypy and other tools.

This change triggers ci-image for such case and it also fixes
a subtle bug where "pyproject_toml_changed" was always set
to true (but nothing depended on it, because we are checking if
build dependencies changed in pyproject.toml to trigger full build
as most of the build logic and dependencies is in hatch_build.py

The change first now attempts to see if the pyprject.toml
changed at all (i.e. if pyprooject.toml is in the list of files
that are changed in the commit) and only then reads the content
of old and new version of pyproject.toml to compare them. This
will make selective checks a bit faster as it won't run two git
commands when pyproject.toml has not changed.

Also tests_common are now added to "all sources" group which
should trigger tests when only tests_common change.
@potiuk potiuk force-pushed the make-pyproject-toml-and-tests-common-trigger-build branch from 4afbb60 to d048b1a Compare October 16, 2024 16:09
@potiuk potiuk requested a review from shahar1 October 16, 2024 16:09
@potiuk potiuk merged commit 4cdbc38 into apache:main Oct 16, 2024
@potiuk potiuk deleted the make-pyproject-toml-and-tests-common-trigger-build branch October 16, 2024 17:47
R7L208 pushed a commit to R7L208/airflow that referenced this pull request Oct 17, 2024
In case only pyproject.toml changes we should automatically build
CI image as we need to run full set of static checks - including
mypy and other tools.

This change triggers ci-image for such case and it also fixes
a subtle bug where "pyproject_toml_changed" was always set
to true (but nothing depended on it, because we are checking if
build dependencies changed in pyproject.toml to trigger full build
as most of the build logic and dependencies is in hatch_build.py

The change first now attempts to see if the pyprject.toml
changed at all (i.e. if pyprooject.toml is in the list of files
that are changed in the commit) and only then reads the content
of old and new version of pyproject.toml to compare them. This
will make selective checks a bit faster as it won't run two git
commands when pyproject.toml has not changed.

Also tests_common are now added to "all sources" group which
should trigger tests when only tests_common change.
harjeevanmaan pushed a commit to harjeevanmaan/airflow that referenced this pull request Oct 23, 2024
In case only pyproject.toml changes we should automatically build
CI image as we need to run full set of static checks - including
mypy and other tools.

This change triggers ci-image for such case and it also fixes
a subtle bug where "pyproject_toml_changed" was always set
to true (but nothing depended on it, because we are checking if
build dependencies changed in pyproject.toml to trigger full build
as most of the build logic and dependencies is in hatch_build.py

The change first now attempts to see if the pyprject.toml
changed at all (i.e. if pyprooject.toml is in the list of files
that are changed in the commit) and only then reads the content
of old and new version of pyproject.toml to compare them. This
will make selective checks a bit faster as it won't run two git
commands when pyproject.toml has not changed.

Also tests_common are now added to "all sources" group which
should trigger tests when only tests_common change.
PaulKobow7536 pushed a commit to PaulKobow7536/airflow that referenced this pull request Oct 24, 2024
In case only pyproject.toml changes we should automatically build
CI image as we need to run full set of static checks - including
mypy and other tools.

This change triggers ci-image for such case and it also fixes
a subtle bug where "pyproject_toml_changed" was always set
to true (but nothing depended on it, because we are checking if
build dependencies changed in pyproject.toml to trigger full build
as most of the build logic and dependencies is in hatch_build.py

The change first now attempts to see if the pyprject.toml
changed at all (i.e. if pyprooject.toml is in the list of files
that are changed in the commit) and only then reads the content
of old and new version of pyproject.toml to compare them. This
will make selective checks a bit faster as it won't run two git
commands when pyproject.toml has not changed.

Also tests_common are now added to "all sources" group which
should trigger tests when only tests_common change.
ellisms pushed a commit to ellisms/airflow that referenced this pull request Nov 13, 2024
In case only pyproject.toml changes we should automatically build
CI image as we need to run full set of static checks - including
mypy and other tools.

This change triggers ci-image for such case and it also fixes
a subtle bug where "pyproject_toml_changed" was always set
to true (but nothing depended on it, because we are checking if
build dependencies changed in pyproject.toml to trigger full build
as most of the build logic and dependencies is in hatch_build.py

The change first now attempts to see if the pyprject.toml
changed at all (i.e. if pyprooject.toml is in the list of files
that are changed in the commit) and only then reads the content
of old and new version of pyproject.toml to compare them. This
will make selective checks a bit faster as it won't run two git
commands when pyproject.toml has not changed.

Also tests_common are now added to "all sources" group which
should trigger tests when only tests_common change.
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.

2 participants