Skip to content

ci: switch both CI jobs to standard Maven -T1C, drop mvnd - #3539

Merged
xzxiaoshan merged 2 commits into
agentscope-ai:mainfrom
xzxiaoshan:ci/build-time-opt-parallel
Oct 14, 2026
Merged

xzxiaoshan merged 2 commits into
agentscope-ai:mainfrom
xzxiaoshan:ci/build-time-opt-parallel

Conversation

@xzxiaoshan

Copy link
Copy Markdown
Collaborator

Follow-up to #3526, from the same CI build-time investigation.

Summary

  • Build both the Linux and Windows jobs in parallel with -T1C (one thread per core) using the standard Maven preinstalled on both runners, replacing the single-threaded -T1 (Windows previously ran mvnd pinned to -T1, so it never actually built in parallel).
  • Drop mvnd entirely from the Windows job: MVND_VERSION, the Cache mvnd / Install mvnd steps, mvnd-cache-path in the matrix, and -Dmvnd.maxLostKeepAlive=120.
  • Companion commit (deliberately separate from the workflow change): raise the hardcoded 10s .block(...) timeout in AnthropicChatModelAuthenticationTest.assertExchange to 30s. This was the only failure observed under heavy parallel test load (32 concurrent test JVMs) — a test-robustness issue unrelated to build correctness, but one that would pollute the CI signal under -T1C.

Why -T1 can be lifted

  • -T1 was introduced in Introduce multiagent pattern practices and docs. #910 to keep reactor order so agentscope-core is built before the modules that resolve it. That rationale does not hold: clean verify never installs anything, and Maven's parallel builder schedules modules by the dependency graph, so reactor ordering is guaranteed at any thread count.
  • The failure -T1 actually papered over was spotless lock contention under mvnd's parallel execution (spotless-maven-plugin:check failed: Could not acquire lock(s), about a dozen modules). Reproduced locally on the Introduce multiagent pattern practices and docs. #910 tree with mvnd 1.0.3 at default parallelism; the same tree with standard Maven at -T1C (32 threads) builds clean, and spotless 3.3.0/3.4.0 under 12-way standard-Maven concurrency shows no lock errors. The module that originally triggered it was removed in cc3b2ee (2026-06).
  • Linux already builds with standard Maven because of mvnd problems (the embedded distribution broke Surefire IPC, [Feat]: Introduce new designed AgentScope Service implementation. #3080). Moving Windows to standard mvn removes the remaining mvnd-specific failure sources plus the mvnd install/cache overhead.

Verification (local, 32-core / Maven 3.9.9 standard mvn)

  • Current main tree, -T1C (32 threads) full lifecycle without executing tests: clean, zero remote resolution of io.agentscope artifacts.
  • Current main tree, -T1C full build with tests (32 concurrent test JVMs): all green except one 10s-timeout flake in AnthropicChatModelAuthenticationTest; the same class re-run in isolation passes 13/13 (addressed by the companion commit).
  • Current main tree, -T4 (CI 4-vCPU equivalent) full build with tests: 10,582 tests, 0 failures, 0 errors.
  • This PR tree, -T1C dependency-chain build of the anthropic module plus AnthropicChatModelAuthenticationTest: 13/13 pass.
  • CI: watch consecutive runs after this change (expected Windows job ~10-15 min vs ~21-24 min after ci: skip release-only artifacts and JaCoCo on Windows, remove duplicate Maven cache #3526; runner times fluctuate, so judge by the mean of several runs).

Rollback

Workflow/command-line-level change only — no artifact content changes; reverting the commit fully rolls back.

- Linux/Windows: -T1 -> -T1C (one thread per core); Maven schedules
  parallel builds by the dependency graph, so reactor ordering holds —
  the old -T1 rationale was an mvnd-specific spotless lock issue
- Windows: use the preinstalled standard Maven; remove MVND_VERSION,
  mvnd cache/install steps, mvnd-cache-path and -Dmvnd.maxLostKeepAlive
10s was the only failure observed under heavy parallel test load
(32 concurrent test JVMs); 30s keeps the CI signal clean under -T1C.
@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@xzxiaoshan
xzxiaoshan merged commit 952bf28 into agentscope-ai:main Oct 14, 2026
6 checks passed
jujn pushed a commit that referenced this pull request Oct 14, 2026
…#3543)

Follow-up to #3526 and #3539 from the same CI build-time effort. Two
independent workflow-level changes, split into separate commits.

## Summary

- Add a workflow-level `concurrency` group so a new push to a PR cancels
that PR's superseded in-flight run. Pushes to main are unaffected: they
use a separate group, and `cancel-in-progress` is only true for
`pull_request` events.
- On the Linux build step, skip javadoc/source jars — but only for
`pull_request`-triggered runs, via an event-gated env var
(`PR_SKIP_FLAGS`). Pushes to main still build them, so javadoc/doclint
breakage still surfaces on main before a release. The pom is untouched:
local builds and the release process behave exactly as before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants