Skip to content

test: cover temporal SQL compatibility fixes (#28232 #28154 #28599) - #30829

Merged
XuPeng-SH merged 3 commits into
matrixorigin:mainfrom
Ariznawlll:codex/qa-temporal-28232-28154-28599
Oct 23, 2026
Merged

XuPeng-SH merged 3 commits into
matrixorigin:mainfrom
Ariznawlll:codex/qa-temporal-28232-28154-28599

Conversation

@Ariznawlll

@Ariznawlll Ariznawlll commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Related to #28232, #28154 and #28599; regression coverage for the temporal compatibility fixes in #28932.

What this PR does / why we need it:

Exercise the three temporal contracts through the public MySQL protocol while reusing the existing embedded 1 LS / 1 TN / 2 CN base-cluster fixture. Preserve CASE/IF/IFNULL fractional values and CTAS metadata, no-op versus real ON UPDATE behavior and rollback, and session timestamp override across functions, prepared statements and automatic timestamps.

The SQL helper receives the active subtest's testing.T, so a SQL error fails that scenario without aborting its independent siblings. The no-op case sets distinct whole-second session timestamps for insert, no-op update and real update, asserts exact TIMESTAMP(6) values, and restores timestamp/time-zone state on exit. The two fixed 1.1-second sleeps are removed. Database cleanup errors are reported.

Validation for head 7f13c45 on darwin/arm64, Go 1.27.1:

  • Exact TestIssueTemporalCompatibility selection confirmed; all three named scenarios passed for three repetitions.
  • Controlled missing-table overlays reproduce parent FailNow/omitted siblings at be03725; with the repair, the intended first child fails and the two remaining scenarios run and pass. These intentional negative probes return non-zero; they are test-helper verification.
  • Repository-controlled native build completed with the pinned ONNX Runtime SHA verified, followed by mo-cgo-test execution. Initial dependency download failures are environment evidence, not passes.
  • go vet for pkg/tests/issues, gofmt and git diff --check passed. Local no-op subtest took 0.03–0.05 seconds.
  • Full owning-package/race/BVT suites and configured CI SCA are not claimed as locally executed. Normal push checks are pending; earlier-head CI is not substituted.

@Ariznawlll
Ariznawlll requested a review from XuPeng-SH as a code owner October 22, 2026 09:20
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH

XuPeng-SH commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: be03725eb733c23f74cf7874f5b5b278a4849c47

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: be03725eb733c23f74cf7874f5b5b278a4849c47

Assessment: request_changes

Reviewed the complete test-only delta. Reusing the shared cluster and exercising the public MySQL protocol are appropriate, and the committed test passes. Two test-quality issues remain: incorrect failure ownership and avoidable clock-dependent waits.

Model: gpt-6-astra / xhigh

Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1

  • P2 pkg/tests/issues/issue_28232_28154_28599_test.go:48: Any exec call inside a child subtest returns a SQL error.
    Impact: The helper captures the parent testing.T, so require.NoError calls FailNow on the parent from the child goroutine. This aborts the parent and skips the remaining independent scenarios. Pass the active testing.T into the helper or return the error for the child to assert.
    Evidence: An overlay injecting a missing-table query into the first subtest reproduced 'subtest may have called FailNow on a parent test'; neither subsequent subtest started. Retained in failure-tests.jsonl with receipt 1792669117037947906-5.json.

  • P2 pkg/tests/issues/issue_28232_28154_28599_test.go:100: Every execution reaches two 1.1-second sleeps in the no-op update scenario.
    Impact: These waits add at least 2.2 seconds while occupying the shared fixture and violate the repository's deterministic-control test requirement. Set distinct session timestamps before the insert, no-op update and real update, restore the setting afterward, and assert the exact resulting timestamp.
    Evidence: A diagnostic overlay using controlled timestamps passed all three scenarios twice. The warm no-op subtest decreased from 2.24s to 0.03s while strengthening the real-update assertion. See temporal-tests.jsonl and deterministic-corrected-tests.jsonl.

Validation:

  • Unchanged candidate test passed twice, including all three subtests and database-removal assertions.

  • Incremental configured lint reported zero issues; formatting and diff checks passed.

  • Isolation preflight passed; verified 192 matching native inputs and 46 native output hashes before tests.

  • Commands, source fingerprints, exits, logs and diagnostic overlay hashes reconciled in /home/xupeng/.local/state/mo-bot/jobs/8b682b4ebfd117b5b5776573/attempt-1/review-evidence-audit.json. Source remains unchanged.

Limitations:

  • Full package and race suites were not rerun; supplied CI statuses lack retained raw execution evidence.

  • The first clock-control probe encountered preexisting fractional timestamp rounding; it is retained separately and is not attributed to this PR.

  • Original linked-issue bodies were absent from the frozen evidence packet.

@Ariznawlll

Copy link
Copy Markdown
Collaborator Author

已在 7f13c45 修复 review 5613582888 的两项 P2,正常 push 回原分支。

  1. SQL exec helper 显式接收当前 testing.T。用相同 missing-table SQL overlay 对比:旧 be03725 出现 parent FailNow 并跳过两个后续场景;修复后仅首个子测试失败,no-op timestamp 和 session timestamp 两个场景仍通过。两个故障探针都按预期返回非零,未把它们当作正常测试通过。
  2. no-op case 通过 session timestamp 控制 insert/no-op/real-update 的三个时点,断言精确 TIMESTAMP(6) 值并恢复 timestamp/time_zone;删除两次 1.1 秒等待。本地 no-op 子测试为 0.03–0.05 秒。另补事务失败后的 rollback defer,并让数据库清理错误可见。

使用 Go 1.27.1 / darwin arm64 和仓库 CGo wrapper,三个命名场景连续三轮全部通过;go vet、gofmt、diff checks 通过。原生依赖下载初次失败,随后使用与固定 SHA 完全匹配的 ONNX 制品完成受控 native build 后重跑。完整 package/race/BVT 未在本轮本地执行,configured SCA 及新 head CI 仍待自动检查结果。PR 描述已按当前模板更新,无共享环境操作。

@mergify mergify Bot added the kind/test-ci label Oct 23, 2026

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the updated test-only change at exact head 7f13c456887bc30bd384df4000af2932ce79bae0 (base 6cbe375b49696021d72778baa292a66287f080bd). The two findings from review 5613582888 are addressed in the diff: SQL assertions now use the active subtest testing.T, and controlled session timestamps replace the two fixed sleeps while checking no-op versus real UPDATE values. Cleanup remains bounded and reports DROP errors. I found no new actionable issue in the changed test.

Validation boundary: this workspace has no MatrixOne checkout or Go executable, so I did not run the named tests. The three-run results and overlay probes in the PR description/comment are author-reported; full package/race/BVT and new-head CI are not claimed as independently verified. Related issues #28232, #28154, and #28599 are already closed and assigned to Ariznawlll; no issue mutation was needed.

@mergify mergify Bot added the queued label Oct 23, 2026
@mergify

mergify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-23 15:52 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🟠 Checks running · in-place
  • 🚫 Left the queue — 2026-10-23 16:16 UTC · at 8805631d6be634a5ed8aa6303b79ae2dd7ec38b3

This pull request spent 23 minutes 29 seconds in the queue, with no time running CI.

Reason

Pull request #30829 has been dequeued

Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.

The author needs to enable "Allow edits from maintainers" on this pull request.

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Waiting for any of
  • check-neutral = CI Required
  • check-skipped = CI Required
  • check-success = CI Required
All conditions

Tick the box to put this pull request back in the merge queue (same as @mergifyio queue).

  • Requeue this pull request

@XuPeng-SH
XuPeng-SH merged commit b787941 into matrixorigin:main Oct 23, 2026
21 of 23 checks passed
@mergify mergify Bot added dequeued and removed queued labels Oct 23, 2026

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dequeued kind/test-ci size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants