Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests for Providers also for Airflow 2.8 #39606

Merged

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented May 14, 2024

This is a follow-up on #39513 to add support for running Provider
tests against Airlfow 2.8 installed from PyPI.


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

@potiuk potiuk marked this pull request as draft May 14, 2024 07:14
@potiuk potiuk changed the title Add running tests against airflow 2 8 Add running tests against airflow 2.8 May 14, 2024
@potiuk potiuk changed the title Add running tests against airflow 2.8 Run tests for Providers also for Airflow 2.8 May 14, 2024
@potiuk potiuk requested a review from Taragolis May 14, 2024 07:16
@potiuk potiuk force-pushed the add-running-tests-against-airflow-2-8 branch 3 times, most recently from 9b729bf to 4cf22f9 Compare May 14, 2024 10:04
@potiuk potiuk force-pushed the add-running-tests-against-airflow-2-8 branch from 4cf22f9 to a61412e Compare May 14, 2024 11:29
@potiuk
Copy link
Member Author

potiuk commented May 14, 2024

OK. Just 4 tests left to fix in 2.8 :).

@potiuk potiuk force-pushed the add-running-tests-against-airflow-2-8 branch 6 times, most recently from e1b9f59 to 3fb63e3 Compare May 18, 2024 18:30
@potiuk
Copy link
Member Author

potiuk commented May 20, 2024

together with OL support, so I'm trying to understand if there might be some mismatch of the provider versions there.

I think the problem is connected with upath integration. Airflow 2.8.4 uses older upath version that was not compatible with Python 3.12 - cc: @bolkedebruin

@bolkedebruin
Copy link
Contributor

@potiuk Airflow 2.8.4 requires (constraints) universal-path 0.1.4 which is indeed not compatible with python 3.12. However., I am not sure if this is related. The namespace property was added past in 2.9.0, so I guess the provider is only compatible with Airflow 2.9.0+ without adjustments?

@potiuk
Copy link
Member Author

potiuk commented May 21, 2024

@potiuk Airflow 2.8.4 requires (constraints) universal-path 0.1.4 which is indeed not compatible with python 3.12. However., I am not sure if this is related. The namespace property was added past in 2.9.0, so I guess the provider is only compatible with Airflow 2.9.0+ without adjustments?

Yes. That was my thought as well (and that's how I solved it in the PR) - In this case I check if we are retrieving openlineage facets in Airlfow < 2.9.0 in this operator and fail it explicitly if so: https://github.com/apache/airflow/pull/39606/files#diff-ee30b541cc8033613196b62a0e5d9ff0276113f27d011a9ffbcd355826205f14R87 . Note that FileTransferOperator should work fine when openlineage is disabled even in 2.8.*

Not sure if this is the best approach @mobuchowski @kacpermuda -> maybe we can make it works also in 2.8 ?

@kacpermuda
Copy link
Contributor

@potiuk do you think #39755 will be enough to fix the test you mentioned and make the io provider + OpenLineage work well with Airflow 2.8 ?

@potiuk potiuk force-pushed the add-running-tests-against-airflow-2-8 branch 2 times, most recently from dced766 to f778dd7 Compare May 22, 2024 13:41
@potiuk
Copy link
Member Author

potiuk commented May 22, 2024

@potiuk do you think #39755 will be enough to fix the test you mentioned and make the io provider + OpenLineage work well with Airflow 2.8 ?

Yes. In the last rebase I 'lost" previous commit - so you could not really properly test it. but I just restored it and it looks like it's working just fine.

@potiuk potiuk force-pushed the add-running-tests-against-airflow-2-8 branch 4 times, most recently from 81a7e35 to d05e641 Compare May 22, 2024 13:57
@kacpermuda
Copy link
Contributor

I was wondering why i could not do it. I was trying to run breeze with dev providers and Airflow 2.8.4 like you mentioned, but the fab provider required 2.9.0. After i dealt with it, and run the test, it passed without any problems, but now it makes more sense. Anyway, glad that it should be solved now ^^

@potiuk
Copy link
Member Author

potiuk commented May 22, 2024

I was wondering why i could not do it. I was trying to run breeze with dev providers and Airflow 2.8.4 like you mentioned, but the fab provider required 2.9.0. After i dealt with it, and run the test, it passed without any problems, but now it makes more sense. Anyway, glad that it should be solved now ^^

Yes. I have to upgrade the docs to add information about removing incompatible providers (and I think I can change it to run those tests locally without actually building packages - so that will simplify the process (separate PR)

@potiuk
Copy link
Member Author

potiuk commented May 22, 2024

OK . That one is ready to be finally reviewed. All problems with compatibility with 2.8 have been solved in the test suite, also thanks to that one we found out the compatbility issue of common.io filetransfer openlineage integration for 2.8 that has been fixed in #39755 -> so thsoe tests are alredy showing it's worth 🚀

Once this one is merged, I will work on 2.7 compatibility and - in parallell - making it easier to debug and reproduce the tests with previous version of airflow locally.

@potiuk potiuk force-pushed the add-running-tests-against-airflow-2-8 branch 3 times, most recently from 7adad37 to 9989b43 Compare May 24, 2024 20:40
@potiuk
Copy link
Member Author

potiuk commented May 26, 2024

I would love to merge that one and work on 2.7 tests :)

@potiuk potiuk force-pushed the add-running-tests-against-airflow-2-8 branch 3 times, most recently from 58fc9ea to b04b658 Compare May 27, 2024 14:41
@potiuk
Copy link
Member Author

potiuk commented May 27, 2024

Anyone :) ? I am already working on 2.7 compatibility in #39862

@potiuk potiuk force-pushed the add-running-tests-against-airflow-2-8 branch from b04b658 to 59a3836 Compare May 27, 2024 15:36
This is a follow-up on apache#39513 to add support for running Provider
tests against Airlfow 2.8 installed from PyPI.

This change includes:

* simplifying the way how we specify provider exclusions in tests
* update to the unit test documentation describing testing
* updating to latest pytest tooling in case older airflow version
  is installed (pulling the correct versions and correct packages
  for pytest extensions)
* implementing 2.8 compatibility for the conftest/test common code
* implementing 2.8 compatibility for provider tests that relied
  on 2.9+ behaviours
@potiuk potiuk force-pushed the add-running-tests-against-airflow-2-8 branch from 59a3836 to e30cdf9 Compare May 27, 2024 17:37
@mobuchowski mobuchowski merged commit 36562fe into apache:main May 27, 2024
85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants