-
Notifications
You must be signed in to change notification settings - Fork 0
test(stress): long-running soak + worker cascade + orphan + adversity #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
kriszyp
wants to merge
5
commits into
main
Choose a base branch
from
stress/long-running-soak
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ff306c6
test(stress): long-running soak + worker cascade + orphan + adversity
kriszyp 51b1726
test(stress): update ctx.nodes after restart, relax convergence
kriszyp 877bd80
test(stress): drop bogus maxCount<=KEYSPACE assertion in orphan test
kriszyp e97a3a3
test(stress): apply orphan-race ctx.nodes update (review feedback)
kriszyp feaa1a2
test(stress): replication-correctness suite (replay seam, backlog, sl…
kriszyp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| name: Stress Tests | ||
|
|
||
| # Long-running replication stress regressions. These are gated on the | ||
| # HARPER_RUN_STRESS_TESTS env var so they never run in the normal | ||
| # integration matrix (they'd blow the 15-minute shard timeout). Triggered | ||
| # manually from the Actions tab or on a weekly cadence. | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| node-version: | ||
| description: 'Node.js version' | ||
| required: true | ||
| type: choice | ||
| default: '24' | ||
| options: | ||
| - '22' | ||
| - '24' | ||
| - '25' | ||
| soak-minutes: | ||
| description: 'Soak duration in minutes (Priority 1)' | ||
| required: false | ||
| default: '240' | ||
| orphan-minutes: | ||
| description: 'Orphan-race duration in minutes (Priority 3)' | ||
| required: false | ||
| default: '60' | ||
| adversity-minutes: | ||
| description: 'Rapid-reconnect duration in minutes (Priority 4)' | ||
| required: false | ||
| default: '30' | ||
| schedule: | ||
| # 06:11 UTC on Sundays (off-peak, off the canonical :00 mark) | ||
| - cron: '11 6 * * 0' | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build Harper Pro (Node.js v${{ inputs.node-version || '24' }}) | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| submodules: 'recursive' | ||
| - name: Setup Node.js ${{ inputs.node-version || '24' }} | ||
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version: ${{ inputs.node-version || '24' }} | ||
| package-manager-cache: false | ||
| - name: Install dependencies | ||
| run: npm install | ||
| - name: Build | ||
| run: npm run build || true # tolerate the same pre-existing TS errors as the regular integration workflow | ||
| - name: Upload build artifacts | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: harper-stress-build-${{ inputs.node-version || '24' }} | ||
| path: | | ||
| dist/ | ||
| static/ | ||
| node_modules/ | ||
| package.json | ||
| retention-days: 1 | ||
|
|
||
| stress: | ||
| name: Stress ${{ matrix.test.name }} (Node.js v${{ inputs.node-version || '24' }}) | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| # Each test gets its own slot; the soak's worst case (240 min) drives | ||
| # the overall budget. Other tests will finish well before this. | ||
| timeout-minutes: 260 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| test: | ||
| - name: 'worker-exit-cascade' | ||
| file: 'integrationTests/stress/workerExitCascade.test.mjs' | ||
| env_vars: '' | ||
| - name: 'soak-rolling-restarts' | ||
| file: 'integrationTests/stress/soakWithRollingRestarts.test.mjs' | ||
| env_vars: 'HARPER_STRESS_SOAK_MINUTES' | ||
| - name: 'blob-orphan-race' | ||
| file: 'integrationTests/stress/blobOrphanRace.test.mjs' | ||
| env_vars: 'HARPER_STRESS_ORPHAN_MINUTES' | ||
| - name: 'rapid-reconnect-adversity' | ||
| file: 'integrationTests/stress/rapidReconnectAdversity.test.mjs' | ||
| env_vars: 'HARPER_STRESS_ADVERSITY_MINUTES' | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| submodules: 'recursive' | ||
| - name: Setup Node.js ${{ inputs.node-version || '24' }} | ||
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version: ${{ inputs.node-version || '24' }} | ||
| package-manager-cache: false | ||
| - name: Download build artifacts | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
| with: | ||
| name: harper-stress-build-${{ inputs.node-version || '24' }} | ||
| - name: Relink bin scripts | ||
| run: npm install --ignore-scripts | ||
| - name: Run ${{ matrix.test.name }} | ||
| env: | ||
| HARPER_RUN_STRESS_TESTS: '1' | ||
| HARPER_INTEGRATION_TEST_LOG_DIR: /tmp/harper-integration-test-logs | ||
| # Per-test duration knobs, sourced from workflow inputs (or scheduled defaults) | ||
| HARPER_STRESS_SOAK_MINUTES: ${{ inputs.soak-minutes || '240' }} | ||
| HARPER_STRESS_ORPHAN_MINUTES: ${{ inputs.orphan-minutes || '60' }} | ||
| HARPER_STRESS_ADVERSITY_MINUTES: ${{ inputs.adversity-minutes || '30' }} | ||
| run: | | ||
| node --experimental-test-coverage=false integrationTests/run.mjs ${{ matrix.test.file }} | ||
| - name: Upload Harper server logs | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: stress-logs-${{ matrix.test.name }}-node-${{ inputs.node-version || '24' }} | ||
| path: /tmp/harper-integration-test-logs/ | ||
| retention-days: 7 | ||
| if-no-files-found: ignore | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The matrix only covers the four original tests. The three runnable new tests added in this push —
backlogRecovery,replayCatchupSeam, andslowConsumerBackpressure— are absent, so they'll never execute in CI (weekly cron or manual dispatch).partitionHealConvergenceis intentionally blocked and documented, so excluding that one is fine.Suggested additions:
You'll also want to expose the new duration knobs (
backlog-offline-minutes,slow-minutes) in theworkflow_dispatch.inputsblock and wire them into theenv:section of theRunstep, matching the pattern the existing four tests use.