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

breaking: default video configuration option to false #27008

Merged
merged 16 commits into from
Jun 20, 2023

Conversation

AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Jun 13, 2023

Additional details

For Cypress v13 , video will be set to false by default. This PR implements those changes.

Steps to test

How has the user experience changed?

PR Tasks

@AtofStryker AtofStryker changed the title Feat/set video false feat: default video to false Jun 13, 2023
@AtofStryker AtofStryker force-pushed the feat/set_video_false branch 2 times, most recently from cdeee0e to 93584bc Compare June 13, 2023 00:44
@AtofStryker AtofStryker changed the title feat: default video to false BREAKING CHANGE: default video configuration option to false Jun 13, 2023
@AtofStryker AtofStryker changed the title BREAKING CHANGE: default video configuration option to false breaking: default video configuration option to false Jun 13, 2023
@AtofStryker AtofStryker force-pushed the feat/set_video_false branch from 93584bc to ead8ed1 Compare June 13, 2023 01:51
@@ -3013,7 +3013,7 @@ declare namespace Cypress {
videoCompression: number | boolean
/**
* Whether Cypress will record a video of the test run when running headlessly.
Copy link
Member

Choose a reason for hiding this comment

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

Should this be calling out cypress run mode? do we really only recorded when headless or just run mode? haven't seen this blurb in our docs anywhere if it is only headless mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think you're right. recording happens in run mode regardless of whether the browser is headed or not. I'll push an update to call out run mode specifically

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hows 4ef0364 look?

@@ -657,7 +657,7 @@ async function waitForTestsToFinishRunning (options: { project: Project, screens

if (!shouldUploadVideo) {
debug(`Spec run had no failures and config.videoUploadOnPasses=false. Skip compressing video. Video path: ${videoName}`)
results.video = null
Copy link
Member

Choose a reason for hiding this comment

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

why did we remove results.video = null?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because video is still be captured, it just isn't uploaded to the cloud or compressed, meaning that we still want to print video: true in the terminal but want to return null when the function ends, which is handled here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ultimately it doesn't matter too much, since this gets ripped out in #27010

@emilyrohrbough
Copy link
Member

@AtofStryker On the issue we called out:

Additionally recording video on lower resourced machines impacts the performance of tests, resulting in slower runtime.

What was the execution time and resource usage improvement in our CI runs by disabling videos by default? Would we expect to be able to lower our CI machine resources with this change?

Co-authored-by: Emily Rohrbough <[email protected]>
@AtofStryker
Copy link
Contributor Author

@AtofStryker On the issue we called out:

Additionally recording video on lower resourced machines impacts the performance of tests, resulting in slower runtime.

What was the execution time and resource usage improvement in our CI runs by disabling videos by default? Would we expect to be able to lower our CI machine resources with this change?

I didn't measure it, but I know @mjhenkes is doing measurements on the v13 branch while mixing/matching video configurations. I am not sure if we can lower CI resources since protocol might make up for the performance difference, which seems to be somewhat what @mjhenkes was saying, assuming I am articulating that correctly.

@mjhenkes
Copy link
Member

@emilyrohrbough @AtofStryker,

Currently we're running protocol and video on, with this change i'd expect our resource consumption with just protocol to drop back to video + compression levels. So we will reduce somewhat in this branch, but not overall.

@cypress
Copy link

cypress bot commented Jun 15, 2023

3 flaky tests on run #47901 ↗︎

0 5193 77 0 Flakiness 3

Details:

chore: fix flaky navigation test where done is called multiple times almsot alwa...
Project: cypress Commit: 08a5af0772
Status: Passed Duration: 13:55 💡
Started: Jun 20, 2023 5:00 PM Ended: Jun 20, 2023 5:14 PM
Flakiness  cypress/e2e/cypress/cypress.cy.js • 3 flaky tests • 5x-driver-electron

View Output Video

Test Artifacts
... > correctly returns currentRetry Output
... > correctly returns currentRetry Output
... > correctly returns currentRetry Output

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@AtofStryker AtofStryker force-pushed the feat/set_video_false branch from 052bebb to 24ee9f5 Compare June 16, 2023 16:57
@AtofStryker AtofStryker force-pushed the feat/set_video_false branch from 24ee9f5 to 129a152 Compare June 16, 2023 17:23
@AtofStryker AtofStryker force-pushed the feat/set_video_false branch from 129a152 to a66b1fe Compare June 16, 2023 19:03
@AtofStryker AtofStryker merged commit 9580dc2 into release/13.0.0 Jun 20, 2023
@AtofStryker AtofStryker deleted the feat/set_video_false branch June 20, 2023 17:21
@cypress cypress bot mentioned this pull request Jun 20, 2023
3 tasks
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Aug 29, 2023

Released in 13.0.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.0.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Aug 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants