-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Limit SQLAlchemy until MSSQL datetime bug is fixed #21272
Limit SQLAlchemy until MSSQL datetime bug is fixed #21272
Conversation
SQL Alchemy 1.4.10 introduces a bug where for PyODBC driver UTCDateTime fields get wrongly converted as string and fail to be converted back to datetime. It was supposed to be fixed in sqlalchemy/sqlalchemy#6366 (released in 1.4.10) but apparently our case is different. Opened sqlalchemy/sqlalchemy#7660 to track it
de79b6f
to
b8b2750
Compare
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
The story unfolds. I tried to reproduce starting from a "minimum" script that
Any comments are welcome :) The script above can be executed in Breeze with |
If we replace the
does the error still show up? |
That's the first thing I checked. Yes. That's why I thought initially and that's why I thought this is not "our" problem. But I could not reproduce it with neither DateTime nor or UTCDateTime in the "MVE" (minimum viable error) script from SQLAlchemy. |
I gave myself a little break on searching since yesterday to get a new perspective and I will come back today to look for more clues :). But an ideas/hypotheses/recalls would be most welcome .. BTW. It actually also crossed my mind "Should we drop MSSQL Idea :) ?". We keep on getting various kinds of troubles with it, t's still experimental, we have not released any version that would be MSSQL compatible, so the harm there is minimal. But I think it would be a little harsh. I spoke with a user on Slack yesterday who was mislead that MsSQL is supported and our website - even if mentioned that this is experimental, does not really say "it's not supported officially uet" (which was a bit surprising https://airflow.apache.org/docs/apache-airflow/stable/installation/prerequisites.html ) - only the https://github.com/apache/airflow/blob/main/README.md#requirements is precise with tht. |
I'm not sure if it's relevant (probably not) but I've just noticed this warning:
|
@potiuk can we merge this please? |
It does not seem like it solves all problems (if you look at the errors), but yeah, I think there might partially help at least for now. |
I also updated constraints manualy to include SQLAlchemy == 1.4.9. Hopefully it will contain the "regular" PR errors now. But I think 1.4.9 also has other MSSQL issues that might show-up instead. |
@potiuk Ran into this issue and with this workaround it worked. Thank you! When do apache/airflow:2.2.3-python3.7 docker images get updated? |
2.2.3 will never be updated with that change. MSSQL is not yet supported in 2.2 at all. 2.3.0 is the first time it MAY be supported. |
Is this still a needed thing? |
Good you reminded me - It would be worth checking |
Or maybe even 2.3.4 if we have one |
We've got a regression in 2.3.3 so we can get it in there |
Yep. I will cherry-pick it. |
SQL Alchemy 1.4.10 introduces a bug where for PyODBC driver UTCDateTime
fields get wrongly converted as string and fail to be converted back to
datetime. It was supposed to be fixed in
sqlalchemy/sqlalchemy#6366 (released in
1.4.10) but apparently our case is different.
Opened sqlalchemy/sqlalchemy#7660 to track it
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 UPDATING.md.