Skip to content

test: support isolated CS S3 coverage - #32590

Merged
mergify[bot] merged 7 commits into
matrixorigin:mainfrom
Ariznawlll:codex/cs-s3-ut
Nov 12, 2026
Merged

mergify[bot] merged 7 commits into
matrixorigin:mainfrom
Ariznawlll:codex/cs-s3-ut

Conversation

@Ariznawlll

Copy link
Copy Markdown
Collaborator

Add CS S3 selection for object-storage tests and preserve a per-run test prefix. This draft is not ready for merge: CI integration, dedicated test storage, cleanup safety, and Linux validation are pending. COS/OSS provider-specific coverage is not supplied by CS S3.

@Ariznawlll

Copy link
Copy Markdown
Collaborator Author

已补充 CS S3 fixture 边界验证(67e3cf40c8):拒绝路径穿越;验证完整枚举后才清理;已有对象、越界枚举、权限失败、取消均有测试;修复子测试前缀累积和列表双斜杠问题。本地独立 fixture 测试及 race 检查通过。上一版真实执行的隔离 MinIO 适配冒烟通过: https://github.com/matrixorigin/matrixone/actions/runs/43146458077 。最新版读写、清理与无关对象保留验证已启动: https://github.com/matrixorigin/matrixone/actions/runs/43149448772 ,结果待确认。没有操作真实 CS S3 对象;真实环境配置和验证仍待研发补齐,PR 保持 draft。

@Ariznawlll
Ariznawlll marked this pull request as ready for review November 12, 2026 06:09
@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 →

@mergify

mergify Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Queue requested — the merge queue status continues in this comment ↓.

@XuPeng-SH

XuPeng-SH commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

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

Commit: b690d40ffcaaceae27fde2a97d6359fb40078b76

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: b690d40ffcaaceae27fde2a97d6359fb40078b76

Assessment: request_changes

The fixture appropriately reuses the existing MinIO harness, but early rejection of listing results leaks SDK goroutines.

Model: gpt-6.1-sol / max

Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0

  • P2 pkg/fileservice/cs_s3_fixture_test.go:63: An out-of-prefix entry or the 10,000-key limit causes an early return while additional listing results remain buffered.
    Impact: The deferred cancellation does not terminate the SDK worker. MinIO v7.0.99 sends its final cancellation error into the abandoned, full channel, leaving the goroutine blocked until the test binary exits.
    Evidence: The unchanged-helper probe left 32 goroutines blocked at MinIO api-list.go:784 (early-return-candidate.log). Replacing only ListObjects with ListObjectsIter passes that probe and the original safety cases (early-return-control.log). Use the existing iterator API, or cancel and fully drain the channel, and cover early rejection with additional pending entries.

Validation:

  • Isolation preflight, formatting, diff whitespace checks and go vet passed.

  • Seven focused tests and the full pkg/fileservice run passed; package runtime was 138.698s.

  • Local MinIO validation passed both existing CS suites, prefix cleanup and unrelated-sentinel preservation.

  • Extracted fixture safety tests passed 100 race repetitions; the stronger lifecycle probe failed and its iterator-only control passed.

  • Commands, frozen-source receipts and retained logs are reconciled in validation-index.json. Source remains unchanged.

Limitations:

  • Real CS S3 credentials and prefix-restricted bucket policy were not exercised.

  • Race validation covered extracted fixture helpers, not the full package.

@XuPeng-SH

XuPeng-SH commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

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

Commit: 9ebafa87748246a5b144a270ecc26b3a1fb2136c

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: 9ebafa87748246a5b144a270ecc26b3a1fb2136c

Assessment: approve

The opt-in CS fixture preserves run-prefix isolation and reuses the existing MinIO and shared storage suites. The earlier listing-worker leak is resolved by the synchronous iterator; cleanup rejection, limits and adapter checks passed. No actionable finding remains.

Model: gpt-6.1-sol / max

Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0

Validation:

  • Reviewed the complete four-file delta, SDK/fixture consumers and all six discussion entries; discussion-assessment.json covers every key exactly once.

  • Isolation preflight, formatting and diff checks passed. Verified 198 current native input hashes and 50 reused output hashes; retained the matching linked candidate outside tmp. Final audit reconciles frozen source, receipts and logs in review-validation.json.

  • All seven maintained focused tests passed (checks/1794494398387666234-2.json; fileservice-focused-recovery.stdout.jsonl). Five extracted helper tests passed normally and under race; three exact lifecycle/safety tests each passed 100 race repetitions. The channel-only negative control failed the worker oracle as expected; probe-manifest.json records extraction and control changes.

  • Local MinIO CS selection ran both shared object-storage and file-service suites, then verified an empty fixture prefix and an intact outside sentinel after each suite; passed in 83.43s (checks/1794494600800714929-2.json; adapter-smoke-recovery.stdout.jsonl).

  • Internal normal coverage accounts for all 586 listed Test roots: 580 pass events and six skips. The cumulative 300s run was resumed only for unfinished roots using the identical retained binary through test-exec; that selection passed in 68.367s. All 38 supplied path/CSV fuzz seeds passed. FuzzDiskS3 has no supplied seed corpus and receives no input-coverage credit.

Limitations:

  • Real CS credentials/service policy, dedicated CI storage and COS/OSS-specific behavior were not exercised.

  • Three broad builds timed out before tests ran. Recovered internal coverage excludes the unchanged external SQL-reader test qcloud_load_close_test.go and spans two processes; no full-package or single-process pass is claimed.

  • Race evidence covers extracted fixture helpers, not the entire owning package.

@mergify mergify Bot added the queued label Nov 12, 2026
@mergify

mergify Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into main as 1115008 at 16:13 UTC

1 h 14 min in the queue, with no time running CI.

So far

  • ✅ Entered the queue Thu 12 Nov, 14:58 · rule main · triggered by rule Automatic queue on approval for main
  • ✅ Checks skipped · PR is already up-to-date
  • ✅ Merged 16:13 · 1115008 · squash
3 merge conditions met
  • #review-threads-unresolved = 0 · required by GitHub branch protection
  • github-review-approved · required by GitHub branch protection
  • any of · required by GitHub branch protection:
    • check-success = CI Required
    • check-neutral = CI Required
    • check-skipped = CI Required

Times in UTC · dashboard · how the merge queue works

@mergify
mergify Bot merged commit 1115008 into matrixorigin:main Nov 12, 2026
@mergify mergify Bot removed the queued label Nov 12, 2026
XuPeng-SH pushed a commit that referenced this pull request Nov 27, 2026
Backport the test-only S3 fixtures from MatrixOne #32590. This provides
the mandatory prefix-scoped initialization test and preserves
MO_CI_S3_PREFIX for the basic and streaming tests. No production Go code
or CI configuration changes.

Prerequisite for [CI #487](matrixorigin/CI#487).
Keep the 4.2-dev rollout disabled until this backport is merged and a
real PR containing the fixture passes the restricted-account smoke
tests. Older heads must sync 4.2-dev before retrying. Do not remove or
skip the required smoke assertions.

Locally verified the five focused Go tests using the local HTTP fixture,
plus the compiled listing of all three required test entry points. No
live CS/Shanghai worker was dispatched.

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

This branch was previously deployed

1 inactive deployment
ci — 9ebafa87 Deployed Nov 12, 2026 by Ariznawlll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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