Skip to content
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

Require an explicit knob to allow uploading ReplayIO recordings #42649

Merged
merged 5 commits into from
May 15, 2024

Conversation

nemanjaglumac
Copy link
Member

@nemanjaglumac nemanjaglumac commented May 14, 2024

I upgraded the Replay's Cypress plugin in #42507
They introduced a breaking change that I didn't know about - the runner will now throw if the API key is missing but the runWithReplay is true in the Cypress config.

The solution is to explicitly set the upload to true or false, depending on the context.
We're now instructing the main E2E workflow to upload recordings, and we're omitting this env var from the stress-test workflow.

Slack context

Test

Successful run using the latest commit:
https://github.com/metabase/metabase/actions/runs/9095182474/job/24997844000

@nemanjaglumac nemanjaglumac added .CI & Tests no-backport Do not backport this PR to any branch labels May 14, 2024
@nemanjaglumac nemanjaglumac requested a review from a team May 14, 2024 15:33
@nemanjaglumac nemanjaglumac self-assigned this May 14, 2024
@nemanjaglumac
Copy link
Member Author

@iethree something weird is happening now.

As far as I can tell, the browser is installed
https://github.com/metabase/metabase/actions/runs/9082717408/job/24959752403#step:7:39

But then Cypress fails due to the "invalid browser"
https://github.com/metabase/metabase/actions/runs/9082717408/job/24959752403#step:9:50

For some reason, it doesn't see it anymore.

@nemanjaglumac nemanjaglumac marked this pull request as draft May 14, 2024 16:21
Even though we're not using it in this workflow. 🤷
@@ -22,6 +22,7 @@ const sourceVersion = process.env["CROSS_VERSION_SOURCE"];
const targetVersion = process.env["CROSS_VERSION_TARGET"];

const runWithReplay = process.env["CYPRESS_REPLAYIO_ENABLED"];
const uploadReplayRecordings = process.env["CYPRESS_REPLAYIO_ENABLE_UPLOAD"];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest removing CYPRESS_REPLAYIO_ENABLE_UPLOAD: 0 from the other file and combining it with this change:

Suggested change
const uploadReplayRecordings = process.env["CYPRESS_REPLAYIO_ENABLE_UPLOAD"];
const uploadReplayRecordings = !!process.env["CYPRESS_REPLAYIO_ENABLE_UPLOAD"];

@nemanjaglumac nemanjaglumac changed the title Stop instructing stress-test workflow to record and upload ReplayIo Require an explicit knob to allow uploading ReplayIO recordings May 15, 2024
@nemanjaglumac nemanjaglumac marked this pull request as ready for review May 15, 2024 11:55
@@ -47,9 +47,6 @@ jobs:
QA_DB_ENABLED: true
CYPRESS_QA_DB_MONGO: true
CYPRESS_REPLAYIO_ENABLED: 1
CYPRESS_REPLAYIO_ENABLE_UPLOAD: 0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work.
false doesn't work either.

The only solution was to omit it.

Copy link

replay-io bot commented May 15, 2024

Status Complete ↗︎
Commit 4199789
Results
⚠️ 4 Flaky
2504 Passed

@nemanjaglumac nemanjaglumac merged commit 5333bd9 into master May 15, 2024
188 of 189 checks passed
@nemanjaglumac nemanjaglumac deleted the e2e-stress-test-replay-key branch May 15, 2024 12:10
Copy link

@nemanjaglumac Did you forget to add a milestone to the issue for this PR? When and where should I add a milestone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants