Skip to content

test(fileservice): key injected sync-dir handle by the resolved root - #30137

Closed
MatrixAdventurer wants to merge 0 commit into
matrixorigin:mainfrom
MatrixAdventurer:fix/localetlfs-sync-dir-test-symlink-root
Closed

MatrixAdventurer wants to merge 0 commit into
matrixorigin:mainfrom
MatrixAdventurer:fix/localetlfs-sync-dir-test-symlink-root

Conversation

@MatrixAdventurer

@MatrixAdventurer MatrixAdventurer commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • Test and CI

Which issue(s) this PR fixes:

Related: #29427. The equivalent fix is already in main through #30212 (18d5335ee330).

What this PR does / why we need it:

Rebased on official main 35253f2a95e88ec6537696015b6189442aff23d1. Main already derives the injected directory-cache key from filepath.Split(f.Name()), which uses the actual writer path and handles symlinked temporary roots.

The rebase retains main's implementation and drops this PR's redundant nativeRoot variables and test-only patch. The resulting head is exactly main, with an empty delivery diff. No artificial empty commit, production change or additional test abstraction is introduced. Both original commits and their exact source tree are retained in the delivery evidence.

Validation on Go 1.27.1, darwin/arm64, with TMPDIR=/tmp (the macOS symlinked-root layout):

  • Complete pkg/fileservice normal suite: passed, 457 test roots plus fuzz seeds; seven existing environment-dependent skips remain explicit.
  • One focused -race -count=1 run of TestLocalWriterCloseCleanup: passed, both local/ETL services and all ten cleanup scenarios.
  • Configured incremental formatting, molint/vet and golangci-lint 2.14.0 for the owning package; terminal result recorded before publication.
  • Actual gpt-6.1-sol / xhigh design and final review verify main already covers the fix and that the rebase removes duplicate code.

There is no new executable delta requiring BVT or a native rebuild. This PR now has no additional change to merge; CI status for any newly published head must be read from GitHub rather than inferred from old runs.

@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 →

@MatrixAdventurer

Copy link
Copy Markdown
Contributor Author

CI 状态更新(attempt 1,run 38490247639):

  • Matrixone CI execution / UT Test on Ubuntu/x86 在 Unit Testing 步骤失败(exit code 2),同轮还有 1 个 job 失败;两个失败 job 的日志均超过 API 单次获取上限,无法直接拉取,失败明细已由 CI 归档在 artifact ut-diagnostics-38490247639-1-all(约 18.5 MB,保留至 2026-10-15 01:58 UTC),维护者可从 run 页面直接下载查看。
  • 本 PR 为 test-only(仅改 pkg/fileservice/local_writer_cleanup_test.go),PR 描述中已记录本地红/绿验证:TMPDIR 指向符号链接时旧代码必现 etl/sync_dir 失败、修复后 3 次通过;go test ./pkg/fileservice/... 在两种 TMPDIR 布局下均通过。
  • 已重跑失败的 job(attempt 2 已于 02:10 UTC 排队开始)。若复现,我会结合 artifact 中的 UT 报告继续定位。

由LW授权的MOI智能体提交

@MatrixAdventurer

Copy link
Copy Markdown
Contributor Author

CI update (run 38490247639): attempt 2 (started 02:10 UTC) was cancelled at 02:16 UTC — UT Test on Ubuntu/x86 reached its Unit Testing step (checkout/Go setup all green) and was cancelled mid-step; the run-level conclusion is cancelled, not a test failure. No new commit or push happened on the branch.

Attempt 1's UT diagnostics remain archived in ut-diagnostics-38490247639-1-all (retained until 2026-10-15 01:58 UTC) if the exit-code-2 failure needs deeper analysis.

I have re-triggered the run (attempt 3, 03:07 UTC) and will verify its final state on the next pass. If the cancellation was intentional (e.g. runner contention), please disregard the rerun.

由LW授权的MOI智能体提交

@MatrixAdventurer

Copy link
Copy Markdown
Contributor Author

更正与 CI 状态(run 38500061183,head 254d5b17):

我前一条 CI 更新中的判断有误,特此更正:

  • run 38490247639 的 attempt 2 于 02:16 UTC 被取消,原因是 @XuPeng-SH 在 02:15 将 main 合并进本分支(新 head 254d5b17 触发了新 run 38500061183),并非无关的运行中断;
  • 我在 03:07 对已被取代的旧 run 重触发的 attempt 3,反而把新 run 的 UT Test on Ubuntu/x86 在执行中取消(03:08),这一取消是我造成的,抱歉。attempt 3 随后于 03:08:45 以 failure 结束(针对旧 head 2bbde5d2,与当前分支状态无关)。

处理:已于 04:11 UTC 对 run 38500061183 重新触发,CI 正在当前 head 254d5b17 上完整重跑,下轮回访核对终态。若 UT 再现 exit 2,将结合 attempt 1 归档的 ut-diagnostics-38490247639-1-all(保留至 2026-10-15 01:58 UTC)或新 run 的诊断 artifact 继续定位。

由LW授权的MOI智能体提交

@MatrixAdventurer

Copy link
Copy Markdown
Contributor Author

CI 终态更新(run 38500061183,head 254d5b17):04:11 UTC 重跑已完成,UT Test on Ubuntu/x86 于 06:57:41Z 再次 exit code 2 失败,CI Required failure(07:17:47Z)。这是第二个 head 上同型失败(attempt 1 在 2bbde5d2),非单次偶发。

失败明细获取受限:job 日志超 API 上限(>1 MiB),诊断归档于 artifact ut-diagnostics-38500061183-2-all(约 18.5 MB,保留至 2026-10-15 06:57 UTC),当前工具面无该 artifact 下载通道,需维护者从 run 页面下载查看,或待具备通道的窗口继续定位。

本 PR 仍为 test-only,PR 描述中的本地红/绿验证不变:TMPDIR 为符号链接时旧代码必现 etl/sync_dir 失败、修复后通过;两种 TMPDIR 布局下 go test ./pkg/fileservice/... 均通过。

已检索 05:30Z 以来仓库级失败 run:未见其他 PR 出现同型 UT Ubuntu/x86 失败(近期 failure 集中在 TKE 回归与 main 上 issue 触发的机器人 run),暂无本测试导致仓库级阻塞的证据;但无法排除与本测试在 CI 环境特定布局相关,待 artifact 报告确认。

未经指示不再自动重跑 CI,避免与并行 run 互相取消(attempt 3 教训已在 04:13Z 更正)。

由LW授权的MOI智能体提交

@matrix-meow matrix-meow added size/XS Denotes a PR that changes [1, 9] lines and removed size/S Denotes a PR that changes [10,99] lines labels Oct 18, 2026
@XuPeng-SH

Copy link
Copy Markdown
Contributor

Rebased and pushed the branch to latest main 35253f2a95e88ec6537696015b6189442aff23d1.

Main already contains the equivalent fix in #30212 (18d5335ee330): the injection key comes from the actual writer's filepath.Split(f.Name()), including the symlink-resolved root. Conflict resolution retains that implementation and drops this PR's duplicate patch. The resulting delivery diff is empty; no artificial empty commit or additional production/test change was added. Both original commits and their exact tree remain archived.

Verification on the resulting head: complete fileservice normal suite passes (457 roots plus fuzz seeds; seven existing environment skips), the ten local/ETL cleanup scenarios pass once under race with TMPDIR=/tmp, and configured owning-package SCA passes with 0 lint issues. The first SCA attempt was refused by golangci's global parallel-runner lock; its failed receipt is retained, followed by a serialized successful run on the exact same clean head. Actual gpt-6.1-sol / xhigh design and final code review pass; the sole pending SCA receipt condition is now closed.

There is no additional fix left in this PR to merge. Related issue #29427 is already covered by main's #30212; no issue or review state was manually changed as part of this rebase.

This branch was previously deployed

1 inactive deployment
ci — 35253f2a Deployed Oct 18, 2026 by XuPeng-SH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/test-ci size/XS Denotes a PR that changes [1, 9] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants