fix(tests/k6): send captcha bypass header from execution-load-test#1503
Merged
Conversation
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.
🧹 PR Environment Cleaned UpThe PR environment has been successfully deleted. Deleted Resources:
All resources have been cleaned up and will no longer incur costs. |
ℹ️ No PR Environment to Clean UpNo PR environment was found for this PR. This is expected if:
|
4 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Follow-up to the load-test captcha bypass landed in PR #1502. That PR added the
X-Load-Test-Captcha-Bypassheader intests/k6/helpers/http.js, which covers the http-ramp mode (it routes throughhelpers/auth.js). The scheduled execution mode runstests/k6/execution-load-test.js, which is self-contained and has its ownh()header builder - so it never sent the bypass header.A manual dispatch on
stagingpost-deploy reproduced this: all 25 VUs gotsignup 400and 1625 follow-onwf create failed 401s (65 per VU, matchingWF_PER_VU=65).This adds the same two-line wiring to
execution-load-test.js: readLOAD_TEST_CAPTCHA_BYPASS_TOKENfrom__ENVand attach the header inh()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, attachX-Load-Test-Captcha-Bypassinh()Test plan
staging+ deploy: dispatchk6 Load Testworkflow and confirm signup step succeeds (no moresignup 400console errors)