Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Mar 3, 2025

This PR moves all commo tests to a "devel-common" sub-project in Airlfow repo.

This project is now part of the airflow's workspace, which means that it is installed by default when uv sync is run.

The following changes have been implemented:

  • removed pytest options from providers and moved to common pyproject.toml

  • devel-common now keeps all the test dependencies that are used by other packages - they are automatically installed when uv sync is run. We do not need devel-tests extra any more

  • providers_src_folder fixture was effectively not used and replaced by file deriving the source of where the appropriate package is imported from.

  • pytest init options are removed from provider's pyproject.toml because they overwrote the options defined in the main pyproject.toml. Instead --ignore-glob command line is passed to addopts

  • devel dependencies from task_sdk are removed and devel-common package is added as required dependency as well as standard and common.sql package - both needed to run task_sdk tests. This allows to run tests in task_sdk tests from withing task_sdk package.

  • all dev dependency group settings for all providers contain the dependent sources thaat allow to treat each provider separately.

  • all devel and bundle dependencies and deprecated dependencies have
    been removed complely - the devel dependencies have been incorporated
    into "devel-common" distribution - so you can install all development
    dependencies (except docs) by installing devel-common. Doc deps
    will be later extracted to a separate distriubution.


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

Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

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

Reviewed code, looks good! Just pipeline needs to turn green :-D

@potiuk
Copy link
Member Author

potiuk commented Mar 3, 2025

Reviewed code, looks good! Just pipeline needs to turn green :-D

On it :)

@potiuk potiuk force-pushed the move_tests_common_to_tests-common branch from 0bd4054 to 22326a9 Compare March 3, 2025 19:56
Copy link
Contributor

@o-nikolas o-nikolas left a comment

Choose a reason for hiding this comment

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

A couple of doc suggestions and a question. The code changes look mostly mechanical and overall LGTM

@potiuk potiuk force-pushed the move_tests_common_to_tests-common branch 3 times, most recently from f320253 to 6fd248e Compare March 4, 2025 16:19
@potiuk
Copy link
Member Author

potiuk commented Mar 4, 2025

While fixing the remaining issues, I have found that it will be easier, when I incorporate all "devel" dependencies into "tests-common" distribution - this way I could (@ashb -> I think you will be super-happy) of ALL devel- and bundle dependencies. This one will still need to get fixes to the failing builds but, It already looks pretty cool, with a lot of complexity removed from hatch_builtd.py and all the references to old devl* and bundle extras removed.

This might be followed by similar doc distribution removal (doc is pretty special beast here).

@potiuk potiuk requested a review from gopidesupavan March 4, 2025 17:08
@potiuk
Copy link
Member Author

potiuk commented Mar 4, 2025

That actualy makes me think if we should not name it devel-common rather than tests-common ?

@potiuk potiuk force-pushed the move_tests_common_to_tests-common branch 2 times, most recently from 5973e1f to b8b14ec Compare March 5, 2025 11:59
@potiuk potiuk changed the title Move tests_common package to tests-common project Move tests_common package to devel-common project Mar 5, 2025
@potiuk potiuk force-pushed the move_tests_common_to_tests-common branch from b8b14ec to 087add7 Compare March 5, 2025 12:00
@potiuk
Copy link
Member Author

potiuk commented Mar 5, 2025

Renamed the project to devel-common

@potiuk potiuk force-pushed the move_tests_common_to_tests-common branch 6 times, most recently from fa0b97d to 6e23f42 Compare March 5, 2025 18:43
@potiuk
Copy link
Member Author

potiuk commented Mar 5, 2025

All right, I had to do a bit of custom installation of devel dependencies for the "compatibility" tests - because we are basically removing sources for airflow and task_sdk from those builds and only use the "devel-common" and "tests" and the rest is installed from packages, but I think I finally nailed it :)

This PR moves all commo tests to a "devel-common" sub-project in
Airlfow repo.

This project is now part of the airflow's workspace, which means
that it is installed by default when `uv sync` is run.

The following changes have been implemented:

* removed pytest options from providers and moved to common
  pyproject.toml

* devel-common now keeps all the test dependencies that are used by
  other packages - they are automatically installed when `uv sync`
  is run. We do not need devel-tests extra any more

* providers_src_folder fixture was effectively not used and replaced
  by __file__ deriving the source of where the appropriate package
  is imported from.

* pytest init options are removed from provider's pyproject.toml because
  they overwrote the options defined in the main pyproject.toml. Instead
  --ignore-glob command line is passed to addopts

* devel dependencies from task_sdk are removed and devel-common package
  is added as required dependency as well as standard and common.sql
  package - both needed to run task_sdk tests. This allows to run tests
  in task_sdk tests from withing task_sdk package.

* all dev dependency group settings for all providers contain the
  dependent sources thaat allow to treat each provider separately.

* all devel and bundle dependencies and deprecated dependencies have
  been removed complely - the devel dependencies have been incorporated
  into "devel-common" distribution - so you can install all development
  dependencies (except docs) by installing `devel-common`. Doc deps
  will be later extracted to a separate distriubution.
@potiuk potiuk force-pushed the move_tests_common_to_tests-common branch from 6e23f42 to 0638e15 Compare March 5, 2025 20:42
Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

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

Besides the one question - code looks good.

@potiuk potiuk merged commit e4002c3 into apache:main Mar 5, 2025
148 checks passed
@potiuk potiuk deleted the move_tests_common_to_tests-common branch March 5, 2025 22:04
@potiuk
Copy link
Member Author

potiuk commented Mar 5, 2025

wooohoo!

@gopidesupavan
Copy link
Member

Woohooo :)

@bugraoz93
Copy link
Contributor

Huge 😮 🎉

potiuk added a commit to potiuk/airflow that referenced this pull request Mar 6, 2025
The change apache#47281 introduced ``devel-common`` and simplified
hatch_build.py with removal of unneeded bundle extras, but it
removed ``all-core`` extra that was actually used in constraint
generation.

This is a follow-up for it, fixing the problem and restoring
``all-core`` - also it synchronizes documentation and adds
newsfragment describing the removal and explaining how users
who used ``all`` extra before (for example in their ``CI``)
with ``uv pip install --all-extras``.
potiuk added a commit to potiuk/airflow that referenced this pull request Mar 6, 2025
The change apache#47281 introduced ``devel-common`` and simplified
hatch_build.py with removal of unneeded bundle extras, but it
removed ``all-core`` extra that was actually used in constraint
generation.

This is a follow-up for it, fixing the problem and restoring
``all-core`` - also it synchronizes documentation and adds
newsfragment describing the removal and explaining how users
who used ``all`` extra before (for example in their ``CI``)
with ``uv pip install --all-extras``.
potiuk added a commit that referenced this pull request Mar 6, 2025
The change #47281 introduced ``devel-common`` and simplified
hatch_build.py with removal of unneeded bundle extras, but it
removed ``all-core`` extra that was actually used in constraint
generation.

This is a follow-up for it, fixing the problem and restoring
``all-core`` - also it synchronizes documentation and adds
newsfragment describing the removal and explaining how users
who used ``all`` extra before (for example in their ``CI``)
with ``uv pip install --all-extras``.
nailo2c pushed a commit to nailo2c/airflow that referenced this pull request Apr 4, 2025
This PR moves all commo tests to a "devel-common" sub-project in
Airlfow repo.

This project is now part of the airflow's workspace, which means
that it is installed by default when `uv sync` is run.

The following changes have been implemented:

* removed pytest options from providers and moved to common
  pyproject.toml

* devel-common now keeps all the test dependencies that are used by
  other packages - they are automatically installed when `uv sync`
  is run. We do not need devel-tests extra any more

* providers_src_folder fixture was effectively not used and replaced
  by __file__ deriving the source of where the appropriate package
  is imported from.

* pytest init options are removed from provider's pyproject.toml because
  they overwrote the options defined in the main pyproject.toml. Instead
  --ignore-glob command line is passed to addopts

* devel dependencies from task_sdk are removed and devel-common package
  is added as required dependency as well as standard and common.sql
  package - both needed to run task_sdk tests. This allows to run tests
  in task_sdk tests from withing task_sdk package.

* all dev dependency group settings for all providers contain the
  dependent sources thaat allow to treat each provider separately.

* all devel and bundle dependencies and deprecated dependencies have
  been removed complely - the devel dependencies have been incorporated
  into "devel-common" distribution - so you can install all development
  dependencies (except docs) by installing `devel-common`. Doc deps
  will be later extracted to a separate distriubution.
nailo2c pushed a commit to nailo2c/airflow that referenced this pull request Apr 4, 2025
…7441)

The change apache#47281 introduced ``devel-common`` and simplified
hatch_build.py with removal of unneeded bundle extras, but it
removed ``all-core`` extra that was actually used in constraint
generation.

This is a follow-up for it, fixing the problem and restoring
``all-core`` - also it synchronizes documentation and adds
newsfragment describing the removal and explaining how users
who used ``all`` extra before (for example in their ``CI``)
with ``uv pip install --all-extras``.
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.

5 participants