[fix](dbt-doris) Fix broken test dependencies preventing adapter development#64929
[fix](dbt-doris) Fix broken test dependencies preventing adapter development#64929arpitjain099 wants to merge 3 commits into
Conversation
- Update dbt-tests-adapter source URL: the package moved from dbt-labs/dbt-core to dbt-labs/dbt-adapters, so pip install of dev-requirements.txt fails on a fresh checkout. - Pin logbook<1.8: pytest-logbook 1.2.0 imports logbook.compat, which was removed in logbook 1.8+, causing an AttributeError that prevents any test from running. - Raise mysql-connector-python lower bound to >=8.0.33 to include authentication-related fixes. Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
|
/review |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
There was a problem hiding this comment.
Automated review result: request changes.
Critical checkpoint conclusions:
- Goal/test: the PR intends to restore the dbt-doris development requirements install path, but the current file still does not satisfy that goal. A clean requirements dry-run fails at the dbt-core VCS requirement, the new dbt-tests-adapter source raises the dev-test Python floor beyond the adapter metadata/tox matrix, and the MySQL connector range still fails the dependency-review gate.
- Scope: the patch is small and focused to one development requirements file, but the dependency choices are moving upstream refs/ranges, so the fix is not stable enough as written.
- Concurrency, lifecycle, FE/BE protocol, persistence, data writes, and observability: not applicable to this dependency-manifest-only PR.
- Compatibility/config: Python support and dependency metadata compatibility need correction before this can be considered fixed.
- Tests: I did not run Doris build/regression suites; they are not relevant for this one-file extension dependency change in this runner. I verified with pip dry-run, GitHub contents API, the live dependency-review job log, and advisory metadata.
- Security model: the connector advisory is treated here as a dependency-review CI blocker for an extension/dev dependency, not as a Doris runtime vulnerability claim under the repository threat model.
User focus: no additional user-provided review focus was supplied.
Subagent conclusions: optimizer-rewrite found no optimizer/rewrite impact and was dismissed with evidence. tests-session-config proposed TSC-1/TSC-2/TSC-3; all three were independently verified and became inline comments M-1/M-2/M-3. After the live PR head refreshed to 0578cf6 with the same patch, convergence round 2 ended with both live subagents replying NO_NEW_VALUABLE_FINDINGS for the same refreshed ledger/comment set.
| @@ -17,7 +17,7 @@ | |||
|
|
|||
| # install latest changes in dbt-core | |||
| git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core | |||
There was a problem hiding this comment.
This still leaves the fresh pip install -r extension/dbt-doris/dev-requirements.txt path broken. The PR fixes the dbt-tests-adapter URL, but pip fails earlier on this line because current dbt-labs/dbt-core main no longer has a core Python project (/core 404s and the dry-run reports that subdirectory=core has no Python project metadata). Since the PR body says the full requirements install now succeeds, please update this VCS requirement too, or pin it to a known-good dbt-core tag/release, and rerun the clean install.
| # install latest changes in dbt-core | ||
| git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core | ||
| git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-tests-adapter&subdirectory=tests/adapter | ||
| git+https://github.com/dbt-labs/dbt-adapters.git@main#subdirectory=dbt-tests-adapter |
There was a problem hiding this comment.
This new unpinned main dependency currently declares requires-python = ">=3.10.0" in dbt-tests-adapter/pyproject.toml, but dbt-doris still advertises python_requires=">=3.9" and tox includes py39. A contributor using the supported Python 3.9 dev environment will not be able to install this updated requirement once pip evaluates that package metadata. Please either pin/select a dbt-tests-adapter version that still supports Python 3.9, or update the adapter metadata and tox matrix to require Python 3.10+ in the same change.
| twine | ||
| wheel | ||
| mysql-connector-python>=8.0.0,<8.3 | ||
| mysql-connector-python>=8.0.33,<8.3 |
There was a problem hiding this comment.
This range still blocks the dependency-review gate. GitHub flags Connector/Python <9.1.0 for GHSA-hgjp-83m4-h4fj, and <8.3 means every version allowed here is below the patched floor; the PR's dependency-review job is failing on this line. If the connector floor is also an authentication correctness requirement, note that setup.py still permits mysql-connector-python>=8.0.0 for published installs. Please choose a range that can satisfy the gate or explicitly handle the exception, and align runtime metadata if the floor is meant to be required outside dev.
|
Codex automated review failed and did not complete. Error: Codex completed, but no new pull request review was submitted for the current head SHA. Please inspect the workflow logs and rerun the review after the underlying issue is resolved. |
The previous git refs no longer resolve: dbt-core removed the /core subdirectory and dbt-tests-adapter moved to dbt-labs/dbt-adapters, whose main now requires Python 3.10 while this adapter still targets 3.9. Pin dbt-core and dbt-tests-adapter to the released 1.10 line, which keeps Python 3.9 support in line with setup.py. Raise mysql-connector-python to >=9.1.0 for GHSA-hgjp-83m4-h4fj; 9.1 through 9.4 still support 3.9 and the adapter only uses the stable mysql.connector connect/cursor API. Verified: pip resolves the full dev-requirements.txt on Python 3.9.6. Signed-off-by: Arpit Jain <3242828+arpitjain099@users.noreply.github.com>
|
Thanks for the catch on all three. I dug into the current upstream layout: dbt-core dropped the |
What problem does this PR solve?
Issue Number: close #60780
Related PR: N/A
Problem Summary:
The dbt-doris adapter test suite cannot run on a fresh checkout due to two dependency issues that have been broken since early 2025.
1. dbt-tests-adapter moved to a new repo
The
dbt-tests-adapterpackage was relocated fromdbt-labs/dbt-core(undertests/adapter) todbt-labs/dbt-adapters(underdbt-tests-adapter). The old git URL indev-requirements.txtfails duringpip install, blocking any contributor from setting up the adapter dev environment.Updated the URL to
git+https://github.com/dbt-labs/dbt-adapters.git@main#subdirectory=dbt-tests-adapter.2. pytest-logbook incompatible with logbook 1.8+
pytest-logbook==1.2.0importslogbook.compat, which was removed inlogbook1.8+. Without a pin, pip installs the latest logbook, and every test run fails with:Added an explicit
logbook<1.8pin to keeppytest-logbookfunctional.3. mysql-connector-python lower bound
Raised the lower bound from
>=8.0.0to>=8.0.33to include authentication-related fixes in the official connector.Release note
None
Check List (For Author)
Test
pip install -r extension/dbt-doris/dev-requirements.txtin a clean virtualenv. All packages resolve and install without errors.pytest-logbookloads without thelogbook.compatAttributeError.Behavior changed:
Does this need documentation?