Repository navigation
fix(ci): scope the sdk-java host lock to the cache write-back - #15128
Conversation
Run 39627609266's fast-tier job arrived at 17:38, stayed head of the sdk-java host-lock queue, and failed at 19:15 without starting Maven. The MariaDB integration lane held the same lock across its install and full MySQL clean verify; under pool contention that hold ran from 15:54 to 18:57 (run 39628985638), past the fast tier's 90-minute budget. Both MariaDB Maven runs already resolve from a job-local repository, so they touch no host-shared state. Seed that repository before the lock, run both Maven commands unlocked, and take the host lock only for the cache write-back, the sole remaining host-shared mutation. Drop fd 9 on the write-back children so a cancelled job's survivor cannot retain the lock. Raise the lane ceiling to 300 minutes for the ~3-hour verify plus one lock wait and setup, and pin the new order and fd closes. Fixes #15117
E2E Test Report — issue #15117FailureRun 39627609266's The ticketed queue was behaving as designed — the head was blocked by a holder, not by queue order. The defect is the hold scope: a fast-tier waiter with a 90-minute budget cannot outlast a multi-hour integration hold. FixBoth MariaDB Maven runs already resolve from a job-local repository, so only the cache write-back mutates host-shared state. The lane now:
The fast-tier and release fallback paths are unchanged: same helper, same 5400 s budget, same Verification
中文说明E2E 测试报告 — issue #15117失败Run 39627609266 的 票据队列本身按设计工作 —— 队首是被持有者挡住,而不是被排队顺序挡住。缺陷在持锁范围:只有 90 分钟预算的 fast 通道等待者,不可能熬过一次数小时的集成持锁。 修复MariaDB 通道的两次 Maven 运行本来就都从 job 本地仓库解析,因此只有缓存写回会修改宿主机共享状态。该通道现在:
fast 通道和发布回退路径不变:同一个辅助脚本、同一个 5400 秒预算、同一个 验证
|
|
|
|
Thanks for the PR! Template looks good ✓ Problem: observed, not theoretical. Run 39627609266's fast-tier job arrived at 17:38 and died at 19:15 in Direction: aligned. The fair-lock-queue design already rejected the obvious alternative — raising the budget — on the grounds that "a wait budget bounds one attempt, not the wait", so shortening the hold is the structurally correct move rather than another step up from 5400 s. It also lands on the criterion the rest of this file already uses for pool-safety: Size: not applicable — no core paths are touched. 5 files, +136/−74, entirely CI workflow, design docs, and meta-tests; zero production logic lines. Approach: the scope feels right and I could not find anything worth cutting. It updates the meta-test that parses the changed step, as the repo's workflow-edit rule requires — I checked the other eight files under Risk: no elevated risk signals — nothing here matches the high-risk paths. The one thing a reviewer should look at deliberately is that this widens concurrency on the pool: the fast tier's Maven runs and the MariaDB lane's can now overlap on one host, where the lock used to make them mutually exclusive. I have written up in the code review why I do not think that blocks it. Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ 问题: 是已观测到的故障,不是理论性加固。run 39627609266 的 fast 通道 job 17:38 到达,19:15 在 方向: 对齐。公平锁队列的设计文档已经否掉了最直接的替代方案 —— 提高预算 —— 理由是"等待预算只能约束一次尝试,约束不了排队本身",所以收窄持锁范围才是结构上正确的做法,而不是把 5400 秒再往上调一档。它也落在这个文件里既有的 pool-safety 判据上: 规模: 不适用 —— 未触及核心路径。5 个文件,+136/−74,全部是 CI 工作流、设计文档和元测试,生产逻辑行数为零。 方案: 范围合理,没找到可以砍的部分。按仓库对改动工作流的要求,它更新了会解析该步骤的元测试 —— 我核对了 风险: 无升级风险信号 —— 没有命中高风险路径。唯一需要评审者刻意看一眼的是它放宽了池上的并发:fast 通道的 Maven 运行和 MariaDB 通道的现在可以在同一台宿主机上重叠,而过去这把锁让它们互斥。我在代码审查里写了为什么我认为这不构成阻塞。 进入代码审查 🔍 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
Code reviewBefore reading the diff I wrote down what I would do from the title and the "why" alone: the lock exists to protect host-shared state, so find the lane's only host-shared mutation and hold the lock across just that, leaving the Maven runs outside it. That is what this PR does, so I have no materially simpler alternative to offer. The checks below are the things I confirmed rather than assumed. What holds up:
Non-blocking observations:
House rules: the workflow-edit rule is satisfied — I checked all nine TestingThis run carries the PR's own CI check results, read through the API — no PR code was built or executed here. The load-bearing fact: this PR's CI cannot exercise the step it changes. Nothing is red. There are no failures to excerpt; 8 checks are green, 45 skipped (the tier-gated lanes plus the profile-gated bot jobs), and 7 still running. The author's "338 passed, 1 skipped" is their own local claim, not something I re-ran. Not verified: the Java suites and any real ECS host behaviour — the author says so too, and no JDK or Maven is available in this environment. Final CI results for
One row per check name (latest run); skipped checks omitted; failures sort first. / 每个检查名一行(取最新一次运行),省略 skipped,失败项排在最前。 Sandboxed verification would settle part of this: Real-scenario tmux testing: N/A — this is an unattended CI run, and a workflow-file change has no user-visible surface to drive in a terminal. 中文说明代码审查在读 diff 之前,我先只看标题和"为什么需要"写下了自己的做法:这把锁是为了保护宿主机共享状态,那就找出该通道唯一会修改共享状态的动作,只用锁包住它,把 Maven 运行放在锁外。这个 PR 做的正是这件事,所以我没有更简单的替代方案可提。下面这些是我实际核对过、而不是默认成立的点。 站得住的部分:
不阻塞的观察:
仓库规则: 改动工作流的要求已满足 —— 我核对了 测试本次运行携带的是该 PR 自己的 CI 检查结果,通过 API 读取 —— 这里没有构建或执行任何 PR 代码。 最关键的一点:这个 PR 的 CI 无法执行它改动的那个步骤。 没有红色项。没有失败日志可摘:8 个检查通过,45 个跳过(tier 门控的通道加上 profile 门控的机器人 job),7 个仍在运行。作者所说的"338 通过,1 跳过"是其本地声明,不是我重跑的结果。未验证:Java 套件以及任何真实 ECS 宿主机上的行为 —— 作者也这么说明,本环境没有 JDK 和 Maven。 (CI 表格见上方区域标记内。) 沙箱验证可以解决其中一部分: 真实场景 tmux 测试:N/A —— 这是无人值守的 CI 运行,而且工作流文件改动没有可在终端里驱动的用户可见界面。 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
|
Confidence: 4/5 — the diagnosis is arithmetically evidenced and the fix is the structurally right one; the two reservations below are real but neither blocks. Stepping back: this PR found the actual reason the lock existed in that lane and then removed only the part that was not doing work. The What makes me comfortable approving an infrastructure change I cannot run: the two run IDs in the description reconcile. 15:54→18:57 is a 183-minute hold; 17:38→19:15 is 97 minutes, which is the 5400 s wait budget plus setup. Those are not round numbers chosen to fit a story, and #15117 independently records the same job failing in the same step. The repo's own design doc had already ruled out the lazier fix — raising the budget — with "a wait budget bounds one attempt, not the wait", so this is the second-order fix rather than another nudge upward. And the concurrency it introduces is not new to this file: two sibling lanes already run unlocked My two reservations, neither blocking:
Would I curse the author in six months? No. The comments carry the run IDs that justify the ordering, the meta-tests pin the order and the fd-9 closes so a future edit that moves the lock back above Maven goes red, and both design-doc languages were updated in the same commit. That is better maintained than most CI changes here. One thing the maintainer should weigh that I cannot settle: this PR's own CI never runs the changed step. The tier selector picked CI is still running ( 中文说明信心:4/5 —— 诊断有可核对的算术证据,修复也是结构上正确的那个;下面两条保留意见是真实的,但都不构成阻塞。 退一步看:这个 PR 找到了这把锁在该通道里存在的真正理由,然后只去掉了没在起作用的那部分。 让我能安心通过一个自己无法运行的基础设施改动的是:描述里的两个 run ID 能对上。15:54→18:57 是 183 分钟的持锁;17:38→19:15 是 97 分钟,正好是 5400 秒等待预算加 setup。这些不是为凑故事挑的整数,而 #15117 也独立记录了同一个 job 在同一个步骤失败。仓库自己的设计文档早就排除了那个更省事的修法 —— 提高预算 —— 理由是"等待预算只能约束一次尝试,约束不了排队本身",所以这是二阶修复,而不是把数字再往上调一档。它引入的并发对这个文件也不新:两个同级通道本来就在同一个池上不持锁跑 我的两条保留意见,都不阻塞:
六个月后我会骂作者吗?不会。注释里带着证明这个顺序合理的 run ID,元测试 pin 住了顺序和 fd 9 的关闭,所以将来谁把锁移回 Maven 之前会直接跑红,而且两种语言的设计文档是在同一个 commit 里更新的。这比这里大多数 CI 改动维护得更好。 有一件我无法定论、需要维护者权衡的事:这个 PR 自己的 CI 从未运行被改动的步骤。 tier 选择器选了 CI 仍在运行( — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
|
|
🔀 Base updated: red check(s) [web-shell E2E Smoke (ubuntu-latest, Node 22.x)] pass on current main — merged current main via update-branch; CI will re-run. 中文说明🔀 已更新 base:红色检查 [web-shell E2E Smoke (ubuntu-latest, Node 22.x)] 在当前 main 上通过 —— 已通过 update-branch 合入当前 main,CI 将重新运行。 |
chiga0
left a comment
There was a problem hiding this comment.
Tier: Standard (elevated for concurrency/fd-lifecycle concern).
No blocking findings.
Approval blockers: none.
Checked:
- Lock scope and fd 9 management (
sdk-java.yml, mysql-integration step): Maven install and verify run before any lock acquisition in both the primary path (source sdk-java-lock.sh) and the fallback (exec 9>). The write-back children (mkdir, bothtarsides) carry9>&-, so a cancelled job's survivor cannot retain the host lock. Ordering is correctly mirrored in the test'sindexOfassertions. - Unlocked seed safety (
cp -aln "${HOME}/.m2/repository" "${RUNNER_TEMP}/m2-repo" 2>/dev/null || true): read-only hard-link copy; any race with a concurrent write-back produces a cache miss at worst, not corrupted state. Best-effort is documented and|| true-guarded. - Timeout 200 → 300 min: absorbs one full 90-min lock wait (5400 s) + ~3-hour MySQL verify + ~30 min setup — consistent with the cited run timestamps.
- Test updates (
scripts/tests/sdk-java-workflow.test.js):lockAtderived from thesourceline;installAtandverifyAtasserted< lockAt;writeBackAtasserted> lockAt;mkdir 9>&-andtar … 9>&- | tar … 9>&-pattern assertions present;retains serializationtest scoped tojobs.testonly, consistent with the behavioral change. - Size baseline (
.size-baseline): 109610 → 113617, consistent with the net +62 lines in the workflow. - Design doc sync (EN + 中文): non-goal ceiling updated 280 → 300 min; new "Hold scope" section matches the code. No EN/中文 divergence found.
- Cross-check: no other reviewer findings at this head.
Unreviewed dimensions:
- Working tree unavailable;
npx vitest run --config ./scripts/tests/vitest.config.ts sdk-java-workflow workflow-size sdk-java-locknot executed locally. PR states 338 passed, 1 skipped — no execution witness from this review. - Java/Maven not available locally; real ECS host behaviour not exercised. Both acknowledged in the PR's test plan.
Reviewed with AI assistance.
The main merge brought three interactive suites from #14964. The no-AK gate requires every runnable integration test to be selected or explicitly exempted, so the Test job fails until they are listed. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
🤖 Addressed the latest review feedback (round 1/10). What changed, and what I pushed back on: · 已处理最新评审反馈(第 1/10 轮)。改动内容与我反驳保留之处如下: Autofix round summary — PR #15128Feedback triagedNo review bodies, inline comments, or issue-level comments were newer than the evaluation cutoff. Two failed checks were listed:
Test failure — fixed
Fix: add the three entries to the exemption table with the same web-shell E2E Smoke — not locally reproducibleThe PR touches only the sdk-java workflow, its size baseline, its design docs, and its workflow test; no web-shell runtime or test path changed. The browser suite needs Playwright Chromium/WebKit plus system libraries, which are unavailable in this sandbox, so it cannot be reproduced locally. The job will re-run on the next CI pass; no code change was made for it. Verification
Changed files
中文说明Autofix 轮次总结 — PR #15128已分诊的反馈评估截止时间之后没有新的评审正文、行内评论或 issue 级评论。列出了两个失败的检查:
Test 失败 — 已修复
修复:把这三个条目加入豁免表,并使用与相邻交互式套件相同的 web-shell E2E Smoke — 本地无法复现本 PR 只改动了 sdk-java 工作流、其大小基线、其设计文档和工作流测试;没有改动任何 web-shell 运行时或测试路径。该浏览器套件需要 Playwright Chromium/WebKit 以及系统库,而此沙箱中不可用,因此无法在本地复现。该任务会在下一次 CI 运行时重跑;没有为它做代码改动。 验证
改动文件
Re-review when you have a moment. After round 10 this bot stops and leaves the PR for a human. · 有空请复审;第 10 轮后本 bot 停止并将 PR 交给人工。 🧠 Handled by Qwen Code · model/模型 |
|
|
Consolidating the sdk-java host-lock repair family into this PR. The rest are being closed:
One salvage from the closed set: #15121's behavioural surviving-child harness — a runtime test that spawns a child outliving its step and asserts the lock actually releases — was called load-bearing in review and pins something the string-match guards cannot. Worth carrying into this PR or a follow-up so the write-back section's Not urgent: the Managed Agent gate on main is green again as of ~03:54Z today. One design assumption worth watching before merge: with the lock gone from the ~3h Maven runs, multiple integration lanes may execute concurrently per pool host — sound in principle via per-job containers on random ports plus job-local |
The identical fix is already on main (cfd95f6). Resolving all four conflicting files in favor of main's reviewed version leaves no functional or documentation delta on this branch; the PR is a duplicate of #15128 and should be closed rather than merged. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
…15243) The bare-lock fallbacks hand-write their timeout line, so raising `flock --wait` could leave `160 minutes`/`90 minutes` stale with every test green; pin both literals. The sizing comments also cited a pre-#15128 run as evidence for a sibling-hold chain and repeated an uncited 925 s hold; frame that run as the history it is, state that 9600 s is headroom sized from the hold length rather than an observed chain, and keep the derivation in the design doc's Goals.
#15257) * fix(ci): raise the sdk-java test-lane lock wait above the longest hold (#15243) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * docs(ci): restate sdk-java lock wait sizing and lane budgets (#15243) * fix(ci): pin the sdk-java lock fallback minutes and restate sizing (#15243) The bare-lock fallbacks hand-write their timeout line, so raising `flock --wait` could leave `160 minutes`/`90 minutes` stale with every test green; pin both literals. The sizing comments also cited a pre-#15128 run as evidence for a sibling-hold chain and repeated an uncited 925 s hold; frame that run as the history it is, state that 9600 s is headroom sized from the hold length rather than an observed chain, and keep the derivation in the design doc's Goals. --------- Co-authored-by: Qwen Autofix <qwen-code-assistant@users.noreply.github.com> Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* fix(ci): skip stale main CI failure issues after main advances (#15259) Run 39777472391's push run on 06e5966 failed on the sdk-java host-lock timeout that #15128 had already fixed. The failure-issue analyzer then ran after main had advanced to 3d65e23, whose own push run passed, and filed #15259 asking for a repair main already contained. Skip a push run whose head is no longer the tip of main: the newer push run owns that result, exactly as a later attempt does. The tip read fails open, and scheduled/manual runs keep reporting because they are the only signal some lanes have. * test(ci): pin the empty main-tip fail-open path (#15259) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(ci): require a successor run before suppressing stale main failures (#15259) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(ci): cover retried runs in the stale-head guard (#15259) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(ci): suppress only successor runs that can report (#15259) --------- Co-authored-by: Qwen Autofix <qwen-autofix@users.noreply.github.com> Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
|
Released in v0.26.1. |
* fix(ci): run the sdk-java suite before taking the host lock (#15242) Run 39771949573's fast-tier job spent both attempts' full 5400 s lock budget waiting: the full-tier Java 21 leg of run 39754414693 ran for 89 minutes on the same host, and the fast job failed five seconds after that leg ended. The MariaDB lane's #15128 fix scoped the lock to its cache write-back, but the test job still held the host lock across the SDK and Managed Agent Maven suites. Seed the test job's Maven repository from the host cache, run its suite from that job-local copy, and take the ticketed host lock only for the cache write-back. The write-back children close fd 9 so a cancelled job's survivor cannot retain the lock, and the workflow pins move with the new order. * fix(ci): keep the SDK Java gate green when the write-back lock expires (#15242) The write-back lock acquisition could redden a job whose suite had already passed (CI run 39814549427). Treat it like the best-effort copy it guards: warn and skip on timeout in both the helper and fallback arms, while leaving the helper's pinned lock-not-acquired signature alone. Tighten the workflow pins: assert the region below the lock instead of first-occurrence Maven indices, pin both write-back copies byte-equal, bind the job-local MAVEN_ARGS to its step, and include the write-back bound in the test job's ceiling model. Restate the hold-length derivations and record the concurrency blast radius in both design languages. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(ci): keep the lock helper outside this PR's footprint (#15242) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(ci): describe the sdk-java 89-minute leg as the leg, not the suite (#15242) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(ci): keep tolerated sdk-java lock timeouts out of rerun classification (#15242) The warn-and-skip downgrade left the helper's `lock not acquired within` annotation on a step that now exits 0, so a later genuine failure in the same job could be classified as infrastructure. Both call sites rewrite the timeout line before it reaches the log, and probe flock plus the cache directory first: bash suppresses errexit for a function on the left of `||`, so without the probes a setup fault spun out the full wait green. The skip test now plants a publishable delta, asserts nothing was published, checks the captured annotations against the live INFRA_FAILURE_SIGNATURES list, and adds a setup-fault arm. The workflow size baseline is re-measured, and the design docs' classifier, promotion, and budget claims are corrected in both languages. --------- Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> Co-authored-by: Qwen Autofix <qwen-autofix@users.noreply.github.com>
) * fix(ci): skip main-failure issues for post-merge reruns (#15239) A rerun re-executes the PR's pre-merge workflow. When it starts after the PR merged, its failure describes a head that main has already replaced, and the post-merge push run owns that signal. Compare the attempt's start time with the merge time and skip filing for the stale head. Run 39768204855's attempt 2 started after PR #15094 merged, hit the pre-#15128 suite-wide host-lock hold, and filed #15239. * fix(ci): discriminate post-merge reruns by attempt (#15239) The clock proxy suppressed fresh manual dispatches and post-merge approval runs while missing reruns dispatched before the merge. Use run_attempt, which states rerun identity directly: attempt 1 still files, later attempts on a merged PR keep the comment but open no issue. Announce the empty-attempt fail-open path. Preserve an existing tracking-issue link when a suppressed attempt updates the PR comment, and sync the design docs and the contract comments with the narrower scope. * fix(ci): pin rerun guard scope and tracking-link recovery (#15239) Drop the pre-loop body write that no publish path could read, and cover the publish-retry truncate with a row that fails the first publish. Pin the writer's tracking line against the recovery grep's anchored pattern, and pin that the attempt guard never suppresses a main run. Scope the design doc's exclusivity sentence to the infrastructure path in both languages. The workflow size ratchet records the file's new size; the growth is the attempt guard and tracking-link recovery this PR adds. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * test(ci): pin tracking-link precedence for PR failure comment (#15239) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * test(ci): pin tracking-link wiring and POST coverage (#15239) * fix(ci): file dispatch reruns on merged PR branches (#15239) * test(ci): pin merged-PR rerun event and lookup-failure publish guard (#15239) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * test(ci): pin approval-run suppression and merged-PR comment guard (#15239) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> --------- Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com> Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
#15274) * fix(ci): scope the sdk-java test lock to the cache write-back (#15262) The Managed Agent fast tier can fail without reporting a test result after waiting out the per-host SDK Java lock. #15128 scoped the MariaDB lane's lock to its cache write-back, but the test job still held the same lock across the SDK and Managed Agent Maven suites, so a long full-tier suite could starve the fast tier on that host. Seed the test job's Maven repository from the host cache, run both suites unlocked from that job-local copy, and take the ticketed host lock only for the cache write-back. The write-back children close fd 9 so a cancelled job's survivor cannot retain the lock. Pin the new order and the write-back fd closures in the workflow tests, and update the fair-lock design docs and the workflow size baseline. Fixes #15262 Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(ci): keep sdk-java cache write-back best-effort (#15262) * fix(ci): keep the sdk-java gate result across the cache write-back (#15262) The write-back runs after the suite, so the step's exit code must come from the suite: both lanes now track the Maven status, demote only a lock-wait timeout with a step-summary record, and redden when the queue itself is unusable. The wait drops to 1800 s because it guards only the bounded copy; the seed stops hiding cp's diagnosis while staying quiet on a fresh host; the design docs record the head-of-queue stall the shorter hold does not bound. * fix(ci): revert the sdk-java lock helper to the PR footprint (#15262) The previous round changed .github/scripts/sdk-java-lock.sh, which this PR never touched; the deterministic gate rejects that expansion. Restore the helper and keep both call sites on the pre-round `if !` shape, retaining the 1800 s wait and the step-summary record. Drop the status-2 pins and tests that only existed for the reverted helper, and record the unusable-queue gap as a follow-up in the design docs. The timeout-returns test stays. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(ci): de-alias every resolver tracking file and guard an unusable lock queue (#15262) * fix(ci): de-alias Maven install metadata in the sdk-java seed (#15262) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * test(ci): restore the per-job Maven seed binding (#15262) * fix(ci): keep sdk-java resolution metadata out of the host cache (#15262) The seed drops maven-metadata-*.xml hardlinks, but the write-back still published job-local metadata with cp -n, where the first publisher's copy could never be refreshed. Exclude it at both write-back sites and pin the seed and write-back name sets to each other. Also witness each suite-status exit with an exit-1 case, restore the lock test's combined-stream assertion, and bring the design docs' acceptance criteria and fault arms up to date. * test(ci): carry the deferred-status helper into the sdk-java slices The tolerated-skip arms now call mvn_report_failed_suite, which the step defines above the lock block. Every slice that starts at lock_setup_fault() or at the write-back therefore ran bash -e without the definition and died with 127, which read as a code failure rather than a missing prelude. * docs(ci): clarify remaining sdk-java cache hardening scope * fix(ci): bound failed MySQL cache waits and exclude resolver residue Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(ci): clear inherited resolver state in the Maven cache seed prune The seed de-alias prunes carried -links +1, which restricted deletion to the hardlinks cp -aln created in this job. RUNNER_TEMP survives across jobs on the pool, so a previous job's mutable resolver state (nlink 1 *.lastUpdated, _remote.repositories, resolver-status.properties) survived in the job-local repository and could redden an otherwise green Maven lane. Drop -links +1 from all four seed prunes so inherited state is cleared again; the write-back's -links 1 delta filter is unchanged and the seed stays best-effort (2>/dev/null || true). Move the deAlias test pin with the fix and add a regression witness that plants single-link markers in the job-local repository before the seed body runs and asserts they are gone (red with -links +1 restored, exit 1; green with the fix, on macOS and Linux). Re-record the sdk-java.yml .size-baseline entry (153970 bytes) and synchronize both design-doc languages, including the nine-coordinate set the main merge brought in. --------- Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> Co-authored-by: Qwen Autofix <qwen-autofix@users.noreply.github.com> Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com> Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com> Co-authored-by: yiliang114 <1204183885@qq.com> Co-authored-by: Shaojin Wen <szujobs@gmail.com>
What this PR does
Scope the per-host sdk-java lock in the MariaDB integration lane to the shared Maven cache write-back. The lane seeds its job-local Maven repository before taking the lock, runs both Maven commands unlocked, and holds one acquisition only for the write-back. The write-back's
mkdir/timeout/find/cpchildren close fd 9 so a cancelled job's survivor cannot retain the lock. Raise the lane's ceiling to 310 minutes to cover the ~3-hour verify plus one lock wait and setup.The fast tier and the release fallback keep the same lock helper, 5400-second budget, and
lock not acquired withinerror signature.Why it's needed
Run 39627609266's fast-tier job arrived at 17:38 and stayed head of the host-lock queue until it failed at 19:15, without starting Maven. The same lock was held by the MariaDB integration lane's install and full MySQL verify from 15:54 to 18:57 (run 39628985638). The fast tier's 90-minute budget cannot outlast a multi-hour hold, so every fast-tier job arriving during that window fails before Maven.
Both MariaDB Maven runs already resolve from a job-local repository, so the long hold protects nothing beyond the shared cache write-back — which is short. This is the same starvation class as #15108's run; this change narrows the hold for the #15117 failure.
Reviewer Test Plan
How to verify
mkdir/timeout/find/cpwrite-back, with9>&-on the write-back children.sdk_java_lock_acquire 5400, and the fallback still containsflock --wait 5400 9.npx vitest run --config ./scripts/tests/vitest.config.ts sdk-java-workflow workflow-size sdk-java-lock; verify the ordering, descriptor-closure, and workflow-size assertions.9>&-from a write-back child; the workflow pins should go red.Evidence (Before & After)
N/A — CI workflow change with no user-visible UI.
Tested on
Environment (optional)
Sandboxed Linux container.
npm run build,npm run typecheck, andnpm run lintpassed; the workflow meta-tests run under the repository's scripts vitest config. Java/Maven are unavailable locally, so the Java suites run in CI.Risk & Scope
Linked Issues
Fixes #15117
中文说明
这个 PR 做了什么
把 MariaDB 集成通道的 sdk-java 宿主机锁缩小到只包住共享 Maven 缓存写回。该通道现在先种子复制 job 本地 Maven 仓库,再取锁;两次 Maven 命令都不持锁运行;只对缓存写回取一次锁。写回的
mkdir/timeout/find/cp子进程会关闭 fd 9,避免被取消 job 的幸存进程继续持有锁。该通道上限从 200 分钟提高到 310 分钟,容纳约 3 小时的 verify 加一次等锁和 setup。fast 通道和发布回退路径保持不变:同一个锁辅助脚本、同一个 5400 秒预算、同一个
lock not acquired within错误签名。为什么需要
run 39627609266 的 fast 通道 job 于 17:38 到达,一直排在宿主机锁队列的队首,直到 19:15 失败,Maven 一次都没启动。同一把锁从 15:54 到 18:57 被 MariaDB 集成通道的 install 和完整 MySQL verify 持有(run 39628985638)。fast 通道的 90 分钟预算熬不过数小时的持锁,因此在这个窗口内到达的 fast 通道 job 都会在 Maven 之前失败。
MariaDB 通道的两次 Maven 运行本来就都从 job 本地仓库解析,长时间持锁除了共享缓存写回之外保护不了什么 —— 而写回很短。这与 #15108 那次运行属于同一类饥饿;本改动针对 #15117 的失败收窄持锁范围。
评审测试计划
如何验证
mkdir/timeout/find/cp写回,写回子进程带9>&-。sdk_java_lock_acquire 5400,回退分支仍包含flock --wait 5400 9。npx vitest run --config ./scripts/tests/vitest.config.ts sdk-java-workflow workflow-size sdk-java-lock;核对执行顺序、描述符关闭与工作流体积断言。9>&-;工作流 pin 应转红。证据(修改前 / 修改后)
N/A —— CI 工作流改动,无用户可见 UI。
测试平台
环境(可选)
沙箱 Linux 容器。
npm run build、npm run typecheck、npm run lint均通过;工作流元测试使用仓库的 scripts vitest 配置。本地没有 Java/Maven,因此 Java 套件由 CI 运行。风险与范围
关联 issue
Fixes #15117