Skip to content

fix(tests/k6): send captcha bypass header from execution-load-test#1503

Merged
OleksandrUA merged 1 commit into
stagingfrom
KEEP-574-execution-load-test-bypass
Jun 10, 2026
Merged

fix(tests/k6): send captcha bypass header from execution-load-test#1503
OleksandrUA merged 1 commit into
stagingfrom
KEEP-574-execution-load-test-bypass

Conversation

@OleksandrUA

Copy link
Copy Markdown

Summary

Follow-up to the load-test captcha bypass landed in PR #1502. That PR added the X-Load-Test-Captcha-Bypass header in tests/k6/helpers/http.js, which covers the http-ramp mode (it routes through helpers/auth.js). The scheduled execution mode runs tests/k6/execution-load-test.js, which is self-contained and has its own h() header builder - so it never sent the bypass header.

A manual dispatch on staging post-deploy reproduced this: all 25 VUs got signup 400 and 1625 follow-on wf create failed 401s (65 per VU, matching WF_PER_VU=65).

This adds the same two-line wiring to execution-load-test.js: read LOAD_TEST_CAPTCHA_BYPASS_TOKEN from __ENV and attach the header in h() when set. The header is only sent when the staging-env GH Actions secret is populated, so prod is unchanged.

Changes

  • tests/k6/execution-load-test.js: read the env var, attach X-Load-Test-Captcha-Bypass in h()

Test plan

  • Lint clean on the changed file
  • Post-merge to staging + deploy: dispatch k6 Load Test workflow and confirm signup step succeeds (no more signup 400 console errors)

The scheduled load test runs tests/k6/execution-load-test.js, which has
its own self-contained h() header builder rather than importing from
tests/k6/helpers/http.js. The prior bypass-header wiring only landed in
the helpers module, so all VUs in execution mode still got signup 400 +
65 follow-on wf-create 401s after KEEP-574 (load-test captcha bypass)
merged.

Mirror the same pattern: read LOAD_TEST_CAPTCHA_BYPASS_TOKEN from __ENV,
attach X-Load-Test-Captcha-Bypass to h() when set. The header is only
sent when the GH Actions secret is populated (staging), so prod is
unchanged.

The HTTP ramp mode already works because tests/k6/load-test.js routes
through scenarios/user-journey.js -> helpers/auth.js -> helpers/http.js.
@OleksandrUA OleksandrUA merged commit 40857b8 into staging Jun 10, 2026
33 of 34 checks passed
@OleksandrUA OleksandrUA deleted the KEEP-574-execution-load-test-bypass branch June 10, 2026 13:37
@github-actions

Copy link
Copy Markdown

🧹 PR Environment Cleaned Up

The PR environment has been successfully deleted.

Deleted Resources:

  • Namespace: pr-1503
  • All Helm releases (Keeperhub, Scheduler, Event services)
  • PostgreSQL Database (including data)
  • LocalStack, Redis
  • All associated secrets and configs

All resources have been cleaned up and will no longer incur costs.

@github-actions

Copy link
Copy Markdown

ℹ️ No PR Environment to Clean Up

No PR environment was found for this PR. This is expected if:

  • The PR never had the deploy-pr-environment label
  • The environment was already cleaned up
  • The deployment never completed successfully

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.

1 participant