Skip to content
Snippets Groups Projects
Unverified Commit 5333bd94 authored by Nemanja Glumac's avatar Nemanja Glumac Committed by GitHub
Browse files

Require an explicit knob to allow uploading ReplayIO recordings (#42649)

* Explicitly decide whether to upload or not

* Upload in the main e2e workflow, but skip uploading in stress-test workflow

* Do not record runs in the stress-test workflow

* Add Replay API key

Even though we're not using it in this workflow. :shrug:

* Omit env var from the stress-test workflow
parent 5cfc079d
No related branches found
No related tags found
No related merge requests found
......@@ -91,6 +91,7 @@ jobs:
MB_SNOWPLOW_AVAILABLE: true
MB_SNOWPLOW_URL: "http://localhost:9090" # Snowplow micro
CYPRESS_REPLAYIO_ENABLED: 1
CYPRESS_REPLAYIO_ENABLE_UPLOAD: 1
RECORD_REPLAY_METADATA_FILE: /tmp/replay-metadata.json
RECORD_REPLAY_METADATA_TEST_RUN_ID: ${{ github.run_id }}
REPLAY_API_KEY: ${{ secrets.REPLAY_IO_TOKEN }}
......
......@@ -22,6 +22,12 @@ const sourceVersion = process.env["CROSS_VERSION_SOURCE"];
const targetVersion = process.env["CROSS_VERSION_TARGET"];
const runWithReplay = process.env["CYPRESS_REPLAYIO_ENABLED"];
/**
* CI coerces the value of this env var to a string (even if it's `false` or `0`!
* Just omit it from any workflow that doesn't need to upload test recordings,
* like we do in the `e2e-stress-test-flake-fix` workflow.
*/
const uploadReplayRecordings = !!process.env["CYPRESS_REPLAYIO_ENABLE_UPLOAD"];
const feHealthcheckEnabled = process.env["CYPRESS_FE_HEALTHCHECK"] === "true";
......@@ -40,7 +46,7 @@ const defaultConfig = {
if (runWithReplay) {
on = replay.wrapOn(on);
replay.default(on, config, {
upload: true,
upload: uploadReplayRecordings,
apiKey: process.env.REPLAY_API_KEY,
filter: r => {
const hasCrashed = r.status === "crashed";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment