Skip to content

ci: cancel superseded PR runs and skip release-only jars on PR builds - #3543

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

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

Conversation

@xzxiaoshan

Copy link
Copy Markdown
Collaborator

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.

Why

Behavior matrix

Trigger javadoc/source jars Superseded runs
pull_request (Linux) skipped (new) cancelled by newer push
pull_request (Windows) skipped (unchanged since #3526) cancelled by newer push
push to main built (javadoc check retained) never cancelled
local mvn verify / releases unchanged (pom untouched) n/a

Notes / trade-offs

  • Cancellation is run-level: the license and module-sync jobs are cancelled along with the build and rerun with the new commit; cancelled runs skip cache-save post steps (no correctness impact).
  • While debugging a specific run, avoid pushing to the same PR — the run being watched would be cancelled; manually re-running an older run cancels newer runs in the same group (rare edge case).
  • Commits are split so each change can be reverted independently; both are pure workflow config, no artifact content changes.

New pushes to a PR cancel that PR's in-flight run: the PR merge button
only reflects the latest commit, so older runs are pure waste. Cancellation
is run-level (license and module-sync rerun with the new commit), cancelled
runs skip cache-save post steps, and pushes to main are unaffected —
separate group, and cancel-in-progress is only true for pull_request events.
…main

Event-gated: the skip flags are injected only when the run was triggered
by pull_request. PR builds (the bulk of runs) skip javadoc/source jars for
roughly 1-2 min per run; pushes to main still build them so doclint errors
surface before a release. Nothing changes for local builds or releases —
the pom is untouched and the knowledge lives only in this workflow.
@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!

@jujn
jujn merged commit 1117001 into agentscope-ai:main Oct 14, 2026
5 checks passed
xzxiaoshan added a commit that referenced this pull request Oct 14, 2026
…e test time) (#3553)

## Background

The Linux CI build step sits at 693s after #3543; effective parallelism
(~3.3/4) is near hardware saturation, so the remaining bottleneck is the
dependency-chain critical path: Core(84s) → extensions → Harness(167s) →
Service Common(78s) → … → Service Scheduler(119s, wall end). This PR
removes deterministic wait waste from tests on that path (fixed sleeps,
coarse polling, oversized observation windows). No assertion or behavior
under test changes; production defaults are untouched.

## Changes

1. **Scheduler (−55s)**: `SchedulerAppContextLoadTest` sets
`builder.scheduler.channel-config-retries=1` — the 12×5s retry backoff
was pure idle waiting in tests (local 85.65s → 13.89s); the app still
boots with 0 channels. Production default (12 retries / 5s) unchanged.
2. **Injectable poll intervals**: `WorkspaceMessageBus` heartbeat and
`WaitAsyncResultsTool` polling gained injectable constructors, and
`WorkspaceTaskRepository` a package-private `setAwaitingConfirmPollMs`
seam (mirrors the existing `setTransport` hook). Production defaults (3s
/ 3s / 750ms) unchanged; tests inject 50ms.
3. **Wait tightening (scenario-derived bounds, each documented with its
derivation in comments)**:
- 5 budget waits in `WaitAsyncResultsToolTest` use the existing
`VirtualTime` helper (8.6s → 0.65s), timeout values unchanged
- Observation windows sized to iteration periods:
`AgentSpawnToolOrphanCancelTest` 4s → 1s (~150ms/iteration),
`SubAgentToolTimeoutRetryIntegrationTest` 2s+2s → 1.5s+0.75s
- Fixed sleeps → bounded polling (25ms step / 5s cap, returns on
completion): `GracefulShutdownTest`, `TrainingRunnerTest`,
`AsyncToolMiddlewareTest`
- Negative-assertion windows sized to tick multiples:
`WakeupDispatcherTest` 500ms×2 → 300ms×2,
`MongoSandboxExecutionGuardTest` 500+after(500) → 300+after(300)
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