Migrate Exasol provider to pyexasol 2.x - #69695
Conversation
|
Quickest fix: git fetch upstream main && git rebase upstream/main
rm uv.lock && uv lock
git add uv.lock && git rebase --continue
git push --force-with-leaseAutomated nudge — ignore if you're not ready to rebase. This comment is updated in place on future |
| :param parameters: The parameters as passed to this hook's public methods. | ||
| :return: The same parameters, narrowed to ``dict[str, Any] | None`` for pyexasol/mypy. | ||
| """ | ||
| if parameters is not None and not isinstance(parameters, dict): |
There was a problem hiding this comment.
This rejects any mapping but a dict. This is probably not necessary?
| if not isinstance(sql, str): | ||
| raise TypeError( | ||
| "ExasolHook.get_records() only supports a single SQL string, not a list of statements. " | ||
| "Use ExasolHook.run() with a handler for executing multiple statements." | ||
| ) |
There was a problem hiding this comment.
This is duplicated too many times. I would refactor it into a private function called by each place. You can use TypeGuard to improve typing.
|
It seems like the upgrade is quite breaking (a lot of old inputs are not rejected), so the provider will need a major version bump. If we’re bumping major, deprecated functions should also be removed. |
The breaking changes don't seem to be about Airflow interface (Hook/operator) |
This PR upgrades the Exasol provider to support
pyexasolversion 2.x.As
pyexasol2.x introduces changes to the underlying library API, this PR includes the necessary refactoring of the Exasol hook, updates to the unit tests, and adjustments to the provider's dependencies and documentation to maintain full compatibility.Key Changes:
ConnectionfromExaConnectioninget_connto resolve variable reuse typing errors.query_params(enforcing a literaldictto matchpyexasol's**query_paramsunpacking) andsqlstatements (rejecting lists inget_records/get_first). This respects theDbApiHookbase class interface while failing fast on invalid inputs.pyproject.tomltopyexasol>=2.0.0,<3, establishing a proper major-version ceiling.TypeError.README.rst,docs/index.rst, anddocs/changelog.rstto reflect the breaking changes and new dependencies.Testing
mypystrictness verified locally (0 errors inexasol.py).pyexasol 2.2.2to verify end-to-end type execution onconn.execute().Important
🛠️ Maintainer triage note for @joshuabvarghese · by
@potiuk· 2026-07-28 16:32 UTCSome review feedback from
eladkalis waiting on you:eladkal.The ball is in your court — you've been assigned to this PR. Push a fix or reply in each thread explaining why the feedback does not apply, then mark them resolved and ping the reviewer (
eladkal) for a final look.See the Pull Request quality criteria for how to fix each item. There is no rush.
Note: your branch is 294 commits behind
main— please rebase and push again to get up-to-date CI results.Automated triage — may be imperfect; a maintainer takes the next look. We use this two-stage triage process so maintainers' limited time goes to the conversation with you.