Repository navigation
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Tick the box to add this pull request to the merge queue (same as
|
|
mo-bot review · Commit: "interrupted" |
…to fix/python-sdk-unified-contracts
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 96dbeecd906d74a579dad5755210170e10793cdd
Assessment: request_changes
Native labels and the shared connection, parameter, export and CDC helpers are proportionate fixes. The unconditional BEGIN hook conflicts with the existing non-transactional execution path and breaks DATA BRANCH PICK.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
- P2
clients/python/matrixone/_connection_options.py:29: Use the default auto_commit=True and execute DATA BRANCH PICK through a SQLAlchemy 2.x Client or an AsyncClient.
Impact: The BEGIN listener opens an explicit transaction before SELECT @@autocommit. That check still returns1, so the bypass skips its mode change and sends PICK inside the transaction; MatrixOne rejects an otherwise valid standalone operation.
Evidence: client.py:1410-1425 and async_client.py:1281-1298 use this bypass, while both managed engines register the listener. transaction-final.stdout.log records BEGIN, SELECT @@autocommit, then PICK through real SQLAlchemy/public Client dispatch; no-listener controls omit BEGIN and ordinary transaction controls retain it. data_branch_pick.go:124 and mysql_cmd_executor.go:122 reject explicitly begun PICK transactions. Make the BEGIN hook respect the non-transactional checkout before its first query, retain ordinary session/transaction semantics, and add an event-aware regression.
Validation:
-
Reviewed all fifteen changed files, affected owners/consumers, four discussion entries and all five linked issues, including issue31186 comments.
-
Isolation preflight passed. Complete offline suite passed on SQLAlchemy1.4.54: checks/1794549545449127316-3.json and offline14.stdout.log.
-
SQLAlchemy2.1.8 offline run:3244 passed;21 dialect-entrypoint setup failures all passed on exact-case retry after installing frozen SDK packaging metadata. Receipts: checks/1794549784777441668-3.json and checks/1794550015417979037-3.json; offline20.xml and metadata-retry.xml.
-
Real SQLAlchemy/mock-DBAPI public dispatch probes confirmed the BEGIN conflict with baseline and ordinary-transaction controls. Final source-bound receipt: checks/1794550437337306236-3.json; transaction-final.stdout.log. Earlier1.4/2.1 controls remain retained.
-
Frozen CI records successful Python offline matrices across SQLAlchemy1.4,2.0,2.1; online was skipped. Source, discussion, result and receipt audit retained in review-audit.json.
Limitations:
-
The transaction probe uses real SQLAlchemy and SDK dispatch with a deterministic DBAPI transport; PICK rejection is established by the frozen server guard, not a local live-server run.
-
Author-reported online autocommit, rollback, fulltext, export and CDC probes were not independently reproduced. The complete online suite is not claimed green.
|
mo-bot review · Commit: "interrupted" |
…tract cdc: MatrixOne reports an invisible catalog relation as parser error 1064 (`SQL parser error: table "mo_cdc_task" does not exist`), so the errno whitelist (1044/1045/1146/20403) never matched and detection depended on an unrelated `does not exist` substring anywhere in the message. Key on the reported relation instead, keep privilege errors on the fallback path, and let every other failure propagate. _driver_execution: a tuple is exactly one positional collection. The previous SQLAlchemy-shaped inference sent a tuple of parameter collections through executemany; that shape now runs as one collection, so announce it with a RuntimeWarning that names the list form instead of changing behaviour silently. tests: pin the CDC classification table and the parameter-shape matrix offline.
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: c889423d0ea83dfcf5e890ca92f83048cd515048
Assessment: request_changes
Shared helpers and native SQLAlchemy labels fit the existing owners, and the earlier BEGIN/PICK defect is resolved. Three regressions remain: unintended commits on raw-connection return, malformed dollar-quoted exports, and disclosure of bound values in migration warnings.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
-
P1
clients/python/matrixone/_connection_options.py:56: With auto_commit=True, obtain get_sqlalchemy_engine().raw_connection(), disable autocommit, write a row, then close the checkout without committing.
Impact: Returning the abandoned transaction commits its pending writes instead of rolling them back.
Evidence: SQLAlchemy dispatches reset listeners before its default rollback. This listener enables autocommit first; MatrixOne's TxnHandler.SetAutocommit commits the active transaction on that transition. transaction14-final.log and transaction21.log reproduce committed rows visible to an independent storage connection; removing only this listener or explicitly rolling back leaves zero rows. Roll back pending work before restoring the mode, retaining explicit-commit, managed-rollback and PICK behavior. -
P2
clients/python/matrixone/export.py:43: Export a valid terminated query containing a dollar-quoted string, such as SELECT $tag$a // b$tag$;.
Impact: The scanner treats text inside the literal as a comment and retains the semicolon. OUTFILE is appended after a completed statement, producing invalid export SQL.
Evidence: The frozen MySQL scanner accepts dollar strings, and _sql_literals.substitute_parameters already recognizes their boundaries. sql-boundary14-evidence.log and sql-boundary21.log each demonstrate 36 affected raw/SQLAlchemy/builder, sync/async, CSV/JSONL cases. The base normalization removed the terminal semicolon. Honor dollar-string boundaries before comment detection and extend the existing terminator regression cases. -
P2
clients/python/matrixone/_driver_execution.py:39: Call execute_driver with a tuple containing multiple collection-valued bindings, including valid IN-clause parameters, while SQL logging is off.
Impact: The RuntimeWarning prints complete bound values to stderr, bypassing the SDK's default diagnostic privacy controls.
Evidence: The warning interpolates both params and list(params). Public SDK probes on SQLAlchemy 1.4.54 and 2.1.8 successfully execute the query and capture a synthetic private binding in stderr with sql_log_mode='off' (sql-boundary14-evidence.log and sql-boundary21.log). This conflicts with the documented opt-in data logging contract. Keep the migration guidance parameter-free and cover stderr in the privacy regression.
Validation:
-
Reviewed all 18 changed paths, affected owners/consumers, seven discussion entries and five linked issues. review-audit.log and checks/1794557712614631820-2.json confirm frozen-head identity, clean source, patch/AST/whitespace checks and receipt reconciliation. discussion-assessment.json covers every discussion key.
-
Isolation preflight passed. SQLAlchemy 1.4.54: 768 focused tests passed (focused14.log/xml; checks/1794557354772391815-2.json). SQLAlchemy 2.1.8: 451 passed (focused21.log/xml; checks/1794557466521753313-2.json). Neither run skipped tests.
-
Counterexample probes completed on both versions with rollback/commit, no-listener, managed-rollback, PICK and ordinary-quote/comment controls. validation-summary.json reconciles commands, source fingerprints, exits, logs and initial reviewer setup diagnostics.
-
Reused eight successful exact-head offline CI matrix jobs and two core-import jobs from the supplied evidence. Online CI was skipped.
Limitations:
-
Local runtime was Python 3.13.5. Transaction probes use real SDK/SQLAlchemy dispatch and independent SQLite storage with substituted MySQL transport/introspection; MatrixOne commit semantics are established from frozen server source, not a fresh live-server run.
-
Export probes inspect generated SQL against the frozen lexer contract. Author-reported online checks were not independently reproduced; raw CI artifacts were unavailable and no complete online-suite pass is claimed.
|
mo-bot review · Commit: "interrupted" |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: c70593175c07ad828fba0b8e4d2a97811ac600e8
Assessment: approve
Reviewed the complete 87-file scope. Earlier findings remain resolved. Release adaptations reuse existing execution and compilation owners; Arrow fallback retains existing transaction, cleanup and admission bounds without new workers, caches or write retries. No actionable defect remains.
Model: gpt-6.1-sol / max
Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0
Validation:
-
Reviewed all discussion entries and five linked issues; discussion-assessment.json covers all 19 keys.
-
Isolation preflight passed. Focused Python validation passed 962 tests and 4 subtests with zero failures/errors/skips. Receipt: checks/1794635762481591152-2.json; focused.log/xml.
-
All 21 CI scope-selection tests passed. Receipt: checks/1794635765627728044-2.json; ci-scope.log.
-
Final audit verified clean frozen source, 429 input hashes, 72 changed Python files, design digests and receipt/log consistency. Receipt: checks/1794636280212429932-2.json; review-audit.json and validation-manifest.json.
-
Reused eight successful frozen-head offline CI profiles and two core-import profiles.
Limitations:
-
No local live-server or native-companion execution. Author-reported online, analytics and packaging results were assessed with attribution; raw artifacts were unavailable.
-
Online CI was skipped. The latest reported original-4.2.8 full online sweep had six TLS setup errors; focused renewals do not erase that failure or certify TLS reliability. Documented native feature limitations remain.
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: ac58e4f910827bd6c81ae5993025cf43035cbdf7
Assessment: request_changes
Two P2 defects remain: release guards reject valid scalar table DDL, and dated-hotfix selection breaks four online contracts. Shared execution/staging ownership is coherent; earlier transaction, export and warning findings are resolved.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
-
P2
clients/python/matrixone/_release_compat.py:237: On a qualified 4.2.8 connection, create an integer-only table named vecf4 or vecf8, such as CREATE TABLE vecf4(id INT PRIMARY KEY).
Impact: The listener mistakes the table identifier followed by '(' for a vector datatype and rejects valid DDL before dispatch, including SQLAlchemy CreateTable. Restrict detection to datatype positions.
Evidence: The published 4.2.8 lexer/grammar at 10d204b accepts these identifiers. scalar-vector-name-report.json demonstrates both scalar tables failing in the actual listener; quoted-name, ordinary-name and unqualified-banner controls pass. Receipts and logs are indexed in validation-summary.json. -
P2
clients/python/tests/online/test_block_vector_reflection_online.py:29: Select MO_SDK_TARGET=4.2.8-hotfix-20261114 through the newly supported release workflow/runner.
Impact: The gate recognizes only 4.2.5/4.2.8, so both vector tests attempt positive VECF4/VECF8 creation instead of checking the expected limitation. Four cases raise uncaught QueryError. Include qualified dated hotfixes using the shared release classification.
Evidence: The workflow and runner preserve the dated target, and tests/release_contracts.py recognizes it. dated-hotfix-vector-report.json invokes both maintained tests with the actual SDK listener: four uncaught compatibility errors while release_428 returns true. This is an internal deterministic probe.
Validation:
-
Reviewed all 91 changed files, relevant owners/consumers, six linked issues and all 21 discussion items.
-
Isolated offline runner: 3,454 tests plus 116 subtests passed with zero failures/errors/skips; Python 3.13.5, SQLAlchemy 2.0.43.
-
Focused async lifecycle/staging tests: 59 passed. Node CI scope tests: 21 passed.
-
Both counterexample probes completed with unaffected controls. AST, provenance, receipt, discussion coverage and git diff --check audits passed; source remains clean.
-
Supplied frozen-head CI records eight successful offline profiles and two successful core-import profiles.
Limitations:
-
No local live MatrixOne, TLS or multi-CN execution; online CI is skipped and unrelated native CI remains pending.
-
Native identifier acceptance is established from pinned released parser sources. Author-reported main/hotfix qualification and published TLS/dictionary limitations were reviewed, not rerun.
…32748) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Related to #29928. Release-branch follow-up to #29996; discovered while qualifying SDK #32671. ## What this PR does / why we need it: On the actual `v4.2.8-hotfix` branch, the MySQL reader can consume SSLRequest and TLS ClientHello together. Upgrading the raw socket then loses the buffered TLS bytes, causing a pre-authentication hang or EOF. Preserve that prefix at both TLS handoffs while forwarding the original socket, deadlines and close/liveness operations. This is the complete four-file backport of #29996, cherry-picked from `2bc83b0b9a2` onto release base `c66030006fc`. It adds no client retry, TLS fallback, catalog change or runner. Validation on Linux/amd64, Go 1.26.4: all nine focused TLS/disconnect roots pass normally and under race; the complete frontend package, gofmt, go vet and incremental golangci-lint pass. An independent real-service probe sends SSLRequest and ClientHello in a single write, negotiates verified TLS 1.3 and authenticates `SELECT 1` successfully. Source candidate identity is `8.0.30-MatrixOne-v4.2.8-hotfix`, git `dbd8358db62`, binary SHA-256 `e16a080574bcc8a8ef7d3ddcaa990f0a86a45ce64a295023309f471261ae2688`. This source candidate does not change the immutable published `v4.2.8-hotfix-20261114` asset. That published binary still reproduces the failure. Full SDK qualification and its distinct release/main identities are tracked in #32671; no published release or production deployment is performed here. Complete SDK qualification against this actual release-branch build now passes 1298/1298 online and 340/340 analytics cases with zero failures/errors/skips. All required TLS, certificate/hostname rejection and original Chinese-search assertions remain active. See #32671 for the separate SDK hotfix-version fixes and immutable-release counterevidence. Co-authored-by: davis zhen <daviszhen007@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #32538
Fixes #32537
Fixes #32556
Fixes #32026
Fixes #31186
What this PR does / why we need it:
Restore Python SDK transaction, query, export and analytics contracts on published MatrixOne releases, with main qualified separately. Official v4.2.8 and v4.2.8-hotfix-20261114 are SDK compatibility targets: use equivalent implementations where safe, otherwise give a precise actionable SDK limitation with verified effects. A future native release is not a prerequisite for these supported SDK paths.
Preserve transaction rollback/reset, explicit SQLAlchemy AUTOCOMMIT, native error causes, parameter ownership and one-slot timeout/cancellation cleanup.
Fix typed queries, snapshot compiler/cache adoption, verified CLONE source/no-op behavior, export literal handling and administrative SQL construction without global MySQL mutation.
Support Arrow-input uploads through checked Parquet after the exact native Arrow-format rejection. Preserve values, transaction and cleanup; pending async closes remain charged to the existing two-upload admission.
Adapt released-server numeric/dollar token boundaries and reflection spelling without changing values, aliases, native types or raw
execute_driverbytes. Recover original source-table SET member case from the same connection's account-scoped catalog, retaining bind/result processors.Scope ASYNC/gojieba classification to options of the same FULLTEXT index. Legal column/index names
asyncand separate indexes do not trigger the limitation. Retain the original Chinese-search data and positive alternatives.Report known Stage, FULLTEXT, branch, schema, vector-precision and FLOAT32-infinity limits with release/feature/advice. Unsafe DDL is refused before dispatch; actual native failures retain their source and errno. No silent identifier rename, ASYNC downgrade, type widening, DROP substitution or fabricated view provenance. Explicit usable alternatives have actual-service tests.
Select compatibility from the actual physical driver handshake, never a test flag or caller version override. The listener issues zero SQL before dispatch: even SQL-mode reads start a transaction on 4.2.8. Other unknown/custom/source builds keep their execution path and require qualification; the explicitly pinned hotfix source branch has its own release-family profile.
Document exact release boundaries and reopening criteria in maintained code/README/Stage guidance. Keep full original positive feature scenarios on main and the fixed 4.2 candidate. Keep all existing CI targets/runners: 1638 scenarios partition into 207 required + 1431 extended without omissions/duplicates.
Recognize native hotfix version suffixes without losing the backend version; keep full physical banner/revision checks for qualification. Give precise pre-authentication TLS EOF/timeout and missing-dictionary installation advice, preserving native causes and trust settings. No connection or write retry is added.
Retain native MySQL uppercase-view metadata controls and all original SDK-positive reflection/value/replay assertions through
Client.from_engine()on every target. The raw third-party view limitation remains separately tracked in [4.2][Bug]: preserve legacy metadata while supporting SQLAlchemy view reflection #32746.Version contracts and validation
Latest main:
625865c470631f33da52793a2e2766d63e5a316e, freshly built with Go 1.27.1. Actual hotfix release-branch candidate:dbd8358db6258b59d66d874a21801cbac0f43712on release basec66030006fc, Go 1.26.4, full identity8.0.30-MatrixOne-v4.2.8-hotfix. Exact binary/asset hashes and retained previous failures are in the maintained validation notes.625865c4706dbd8358db62The final
socket.timeoutspelling covers Python 3.8/3.9, where it differs from built-in TimeoutError. Its exception set is identical on each full-suite Python 3.10+ runtime; those successful full sweeps remain valid. Both older Python versions also pass focused six-case timeout/EOF renewal and installed-wheel checks. No source drift occurred within the recorded full runs.Released binary defects and their repairs
10d204b8763f, immutable imagesha256:eec6cee1ab0d1ddaa5c81cbc9d79ef6a59ecf13f2b5835631ef3b03ee6822fc6) retains its independently reproduced native TLS defect and the earlier full-sweep six TLS setup errors. A focused retry does not erase that failed sweep.v4.2.8-hotfix-20261114is sourcec66030006fc. Its unchanged published binary also exhibits pre-authentication TLS EOF/timeouts. fix(frontend): backport buffered TLS handshake fix to 4.2.8 hotfix #32748 backports the complete root TLS fix to the actualv4.2.8-hotfixrelease branch. The broader 4.2-dev [4.2-dev] fix SDK contracts and exact ENUM member replay #32723 alone does not modify that branch. No automatic retry, TLS downgrade, certificate relaxation, skipped assertion or accepted connection error turns a failure green.(1, 7). fix(release): include jieba dictionaries in Linux archives CI#478 repairs both Linux archive jobs, with six actual ZIP-layout and ten missing-file rejection subcases plus actionlint passing. This separate plaintext packaging probe does not qualify the old binary's TLS.-hotfixwas not parsed. The shared parser is repaired; those original assertions now pass in the complete 1298-case rerun.A green SDK compatibility suite does not certify every native feature. Release limits remain explicit: special FULLTEXT identifiers/ASYNC gojieba, quoted Stage catalog values, disabled Stage creation, empty branch deletion, some ENUM/SET serialization/view provenance, VECF4/VECF8 and Parquet FLOAT32 infinity. Equivalent Arrow-input upload and other documented alternatives keep their value, transaction and cleanup assertions; no silent ASYNC downgrade, identifier substitution, type widening or DROP replacement occurs.
Native companion #32723 expands the broader 4.2-dev capabilities and retains its separate native/upgrade validation. Its latest observed native CI UT job failed before the first-replay fault was reached (
TestCNFirstReplayDisconnect); that broader job is not certified by this SDK proof. The two BVT groups and coverage at that run passed. Upgrades remain shutdown-only; already-lost view provenance cannot be inferred.Maintained release map, exact identities and validation boundaries.
Local qualification is distinct from remote CI on this new head. Online CI requires its configured disposable-server workflow; skipped/pending jobs provide no online proof. No release is merged, published or deployed by this change; immutable published assets remain unchanged.