-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
Remove sqlalchemy-redshift dependency from Amazon provider #42963
Conversation
@ashb is it possible to trigger full tests on this? The previous pr went through without any issues but later got issues when tests ran in ci. Thoughts? |
Yeah, I'm hoping by editing more files it'll trigger full tests. If that didn't work I was going to investigate ways of triggering full tests. |
It's a matter of setting "full tests needed" label and closing/reopen the PR. I just did it. BTW. All the ways maintainers can interact with PRs via labels are described in https://github.com/apache/airflow/blob/main/dev/breeze/doc/ci/07_debugging.md - it explains all the labels you can use and what effect they have. |
Can't rebase it myself - but you should rebase now this PR after I merged the fix for "package removal" in #42967 and this time I guess it should properly not have the sqlalchemy-redshift installed in CI image . |
`sqlalchemy-redshift` is unused. It is also not compatible with sqlalchemy>2, so good riddance!
13f68fd
to
9c922f0
Compare
Seems that this time it failed on |
OK. Now we got what we wanted. The PR with caching disabled (i.e. removing the dependency) shows that it is actually used and the tests using it failed - showing that the dependency is actually used in openlineage so actually we need to talk to @mobuchowski and @kacpermuda and it's likely something related to #41632 |
The root cause seem to be that openlineage uses "redshift_connector" as sqlalchemy dialect internally - and while direct import is not present anywhere, it expects the library to be present as it contributes the "redshift_connector" dialect. This is why we think the dependency is not used, but in fact it is. |
And if you look at the summary of "Tests" job, in the CI output, you will see that the redshift connector has been removed: https://github.com/apache/airflow/actions/runs/11314973292 For the future @ashb and others - just click on "Tests" in the list of checks and you will see the summary - which contains the diff in dependencies vs. ![]() |
Exactly, we use it to generate queries fitting the right db. We've migrated to this approach from earlier approach when we manually slapped SQL together via string concatenation. IMO what could work is moving Redshift hook to use Postgres dialect - unless there is something breaking using Postgres dialect from working with Redshift now; it was used for this purpose before actual Redshift dialect. BTW, IMO the fact that there are no tests other than OL breaking from this means that the
|
@mobuchowski The hook itself doesn't use the SQLa get engine: airflow/providers/src/airflow/providers/amazon/aws/hooks/redshift_sql.py Lines 203 to 208 in e20146d
So this is a problem only for the OL integration I think. We need to move away fro this sqla redshift integration as it doesn't support 2.0. Can you please take this on with some urgency please? |
@ashb sure, I'll own that topic. |
Merged in #43271 |
sqlalchemy-redshift
is unused. It is also not compatible with sqlalchemy>2, so good riddance!Attempt no. 2 of #42830 after it got reverted in #42864