-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Fix/RE:Invalid uri created when extras contains non string elements #59339
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
Conversation
3431d69 to
41e7df8
Compare
|
CodeQL workflow is awaiting maintainer approval (standard for PRs from forks). All unit tests pass locally. |
Can you review this please |
29f80b2 to
355bf68
Compare
|
Hey @potiuk, thanks for re-running the tests. I’m a bit confused by these errors—do you have any advice on where I should start looking or how to approach fixing them? |
96581bd to
6e6b804
Compare
There was a flaky test in main - so it failed often in other PRs as well. This is now hopefully fixed in #59394 so you should not worry about it. |
|
Same 🫠 |
|
test still failed though 🥲 |
|
Yep. the |
Don't worry. It's not you fault |
|
Yeah. Not your fault for sure. I have a likely fix for the main issue: #59406 |
6e6b804 to
08db084
Compare
|
Nice all test passed thanks @potiuk @henry3260 The issue is solved now? |
Yes 😀 |
|
@jason810496 Hey jason can you please review the PR |
|
hey @Lee-W Can you please review the PR |
jason810496
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update!
Lee-W
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one nit, overall looks good
|
sorry about this push i am gonna push one more time i forgot to do prek test |
…rialization and deserialization for various data types.
a934aed to
2dead81
Compare
|
@jason810496 @Lee-W Thanks for approving the PR can you merge this to main? |
|
Sorry that I forgot to add the backport label. @Pyasma, would you mind backporting this PR to the We can backport the patch using the following command and resolve any conflicts if needed: cherry_picker a377033 v3-1-test |
…pache#59339) Co-authored-by: Pyasma <pranyasharms55555@gmail.com>
…pache#59339) Co-authored-by: Pyasma <pranyasharms55555@gmail.com>
…g elements (apache#59339) (cherry picked from commit a377033) Co-authored-by: Piyush Mudgal <94688939+Pyasma@users.noreply.github.com> Co-authored-by: Pyasma <pranyasharms55555@gmail.com>
|
I cherry-picked it here #60219 @jason810496 |
|
hey @jason810496 Sorry i missed the message and thanks @potiuk |
…pache#59339) Co-authored-by: Pyasma <pranyasharms55555@gmail.com>
|
After migration to 3.1.6 still having error: `[2026-01-13 15:46:29] ERROR - Task failed with exception source=task loc=task_runner.py:1056 File "/home/airflow/airflow_venv/lib/python3.12/site-packages/airflow/sdk/execution_time/task_runner.py", line 1405 in _execute_task File "/home/airflow/airflow_venv/lib/python3.12/site-packages/airflow/sdk/bases/operator.py", line 417 in wrapper File "/opt/airflow/plugins/com/softwaremind/transfers/entraid.py", line 148 in execute TypeError: connect() got an unexpected keyword argument 'extra' File "/home/airflow/airflow_venv/lib/python3.12/site-packages/airflow/providers/microsoft/mssql/hooks/mssql.py", line 97 in get_sqlalchemy_connection File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3325 in connect File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 96 in init File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3404 in raw_connection File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3371 in _wrap_pool_connect File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 327 in connect File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 894 in _checkout File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 493 in checkout File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 145 in _do_get File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 70 in exit File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/util/compat.py", line 211 in raise_ File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 143 in _do_get File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 273 in _create_connection File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 388 in init File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 690 in __connect File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 70 in exit File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/util/compat.py", line 211 in raise_ File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 686 in __connect File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py", line 574 in connect File "/home/airflow/airflow_venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 598 in connect` When extra fields contains as_dict attribute:
|
|
@frodo2000 Can you open an issue for that? |
RE:This PR fixes how Connection.get_uri() handles extras with non-string values (floats, booleans, nested dicts).
Extras are now stringified before encoding to produce valid, SQLAlchemy-compatible URIs.
Added a unit test test_get_uri_with_non_string_extras to verify the change.
All pre-commit checks passed.
Issue :#55893
Original PR is closed -> #57969
^ 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.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.