Skip to content

Add staggered parallel worker startup - #2919

Open
espekkaya wants to merge 1 commit into
cucumber:mainfrom
espekkaya:staggered-parallel-startup
Open

Add staggered parallel worker startup#2919
espekkaya wants to merge 1 commit into
cucumber:mainfrom
espekkaya:staggered-parallel-startup

Conversation

@espekkaya

Copy link
Copy Markdown

🤔 What's changed?

Adds native staggered startup for parallel Cucumber workers.

New configuration options:

  • --parallel-startup-mode=staggered
  • --parallel-ramp-size=5
  • --parallel-ramp-delay=1000

In staggered mode, Cucumber starts an initial group of workers, begins executing scenarios as soon as a worker has completed its worker-level BeforeAll hooks, and progressively starts further workers as capacity becomes available.

The default eager startup mode is unchanged.

This includes:

  • CLI parsing, configuration schema, public types, and API reports
  • Worker lifecycle changes in the parallel runtime
  • Documentation and changelog updates
  • Acceptance coverage that verifies scenarios can begin before later workers complete their worker-level hooks

⚡️ What's your motivation?

Large --parallel values can create a significant worker startup spike before the first scenario begins. This is especially noticeable in CI environments.

Staggered startup reduces time-to-first-scenario by allowing early workers to begin execution while the remaining worker pool is still being prepared.

🏷️ What kind of change is this?

  • ⚡ New feature (non-breaking change which adds new behaviour)
  • 📖 Documentation

♻️ Anything particular you want feedback on?

Feedback on the ramp semantics would be especially useful:

  • parallelRampSize controls the number of workers created initially.
  • parallelRampDelay controls the minimum delay between workers created after the initial group.

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG.

@espekkaya espekkaya changed the title feat: add staggered parallel worker startup Add staggered parallel worker startup Aug 7, 2026
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