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

chore: rename video processing events to capture/compress #26800

Merged
merged 2 commits into from
May 19, 2023

Conversation

AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented May 18, 2023

Additional details

The goal of this PR is to change the naming nomenclature of video output when printed to the terminal. Today, ending capture of video and compression is called "processing". This has been confusing to users because it is unclear whether the video is being saved, compressed , or uploaded to the cloud. In an effort to make this more clear, areas that are related to compression/compression failure are renamed to "compressing" nomenclature and areas related to capture/capture failures are renamed to"capture" nomenclature.

When capturing now fails, a message is displayed to the user that capturing instead of processing has failed, so it is clearer where the failure came from. This happens in FF as video recording is not currently working and is unable to capture any frames from the screencast API.

Steps to test

execute a Cypress test in run mode with video/cloud recording on

How has the user experience changed?

old terminal output

Screenshot 2023-05-18 at 4 38 36 PM

new terminal output

Screenshot 2023-05-18 at 4 48 43 PM

old terminal output with firefox failed recording

Screenshot 2023-05-18 at 4 39 14 PM

new terminal output with firefox failed recording(capturing fails instead of "processing")

Screenshot 2023-05-18 at 4 24 18 PM

PR Tasks

  • Have tests been added/updated?
  • Has a PR for user-facing changes been opened in cypress-documentation? (did a quick audit and didn't see anyplace in the docs where "processing" in mentioned or screenshots to terminal output need updating)
  • Have API changes been updated in the type definitions?

@AtofStryker AtofStryker changed the title Chore: rename video processing events to capture/compress chore: rename video processing events to capture/compress May 18, 2023
@@ -515,7 +515,7 @@ export function displayVideoProcessingProgress (opts: { videoName: string, video
const dur = `${humanTime.long(finished)}`

const table = terminal.table({
colWidths: [3, 21, 61, 15],
colWidths: [3, 22, 60, 15],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

had to offset the 2nd column by one in order to not get finished compressin... and not get the g truncated. I took a character from the 3rd column as we have more than ample room to store the results of the compression, but means the snapshots will be missing a space in that column (hence the regen in the system tests)

// or we've been told not to upload the video
if (options.videoCompression === false || options.videoCompression === 0 || options.shouldUploadVideo === false) {
debug('skipping compression')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

added a debug log if this condition is met since otherwise its hard to tell. I wonder if we want to add any of these options to the telemetry span in the future to determine if this is a no-op (we can do it in this PR as well just wanted to see if others thought it was a good idea).

Copy link
Member

@mjhenkes mjhenkes May 18, 2023

Choose a reason for hiding this comment

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

videoname, videoCompression and compressedVideoName are added to the span now. You could add 'should upload' if you want. (down on line 685)

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 missed that. I think that should be enough for us to infer the behavior!

@AtofStryker AtofStryker marked this pull request as ready for review May 18, 2023 20:56
@mschile mschile self-requested a review May 18, 2023 20:59
@AtofStryker AtofStryker requested a review from mjhenkes May 18, 2023 21:16
@cypress
Copy link

cypress bot commented May 18, 2023

13 flaky tests on run #46568 ↗︎

0 15516 295 0 Flakiness 13

Details:

chore: rename 'capturing of' to 'capturing'
Project: cypress Commit: 50bddeb22c
Status: Passed Duration: 13:36 💡
Started: May 19, 2023 4:48 PM Ended: May 19, 2023 5:01 PM
Flakiness  commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-firefox

View Output Video

Test Artifacts
network stubbing > intercepting request > can delay and throttle a StaticResponse Output
Flakiness  e2e/origin/commands/assertions.cy.ts • 1 flaky test • 5x-driver-firefox

View Output Video

Test Artifacts
cy.origin assertions > #consoleProps > .should() and .and() Output
Flakiness  cypress/cypress.cy.js • 3 flaky tests • 5x-driver-firefox

View Output Video

Test Artifacts
... > correctly returns currentRetry Output
... > correctly returns currentRetry Output
... > correctly returns currentRetry Output
Flakiness  commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
network stubbing > intercepting request > can delay and throttle a StaticResponse Output Video
Flakiness  cypress/cypress.cy.js • 3 flaky tests • 5x-driver-electron

View Output Video

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

The first 5 flaky specs are shown, see all 7 specs in Cypress Cloud.

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

Comment on lines +42 to +43
- Started compressing: Compressing to 32 CRF
- Finished compressing: /XXX/XXX/XXX/cypress/videos/simple.cy.js.mp4 (X second)
Copy link
Member

Choose a reason for hiding this comment

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

you have no idea how lucky you are to make this change after i turned off video compression in snapshots. lol

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's just say there were a lot LESS snapshots that needed updated 🙏🏻

packages/errors/src/errors.ts Outdated Show resolved Hide resolved
@AtofStryker AtofStryker force-pushed the chore/processing_to_compressing branch from 548d97a to 4191be4 Compare May 19, 2023 13:53
@AtofStryker AtofStryker requested a review from mschile May 19, 2023 13:57
@AtofStryker AtofStryker force-pushed the chore/processing_to_compressing branch from 4191be4 to 50bddeb Compare May 19, 2023 16:06
@AtofStryker AtofStryker merged commit eef8cd2 into develop May 19, 2023
@AtofStryker AtofStryker deleted the chore/processing_to_compressing branch May 19, 2023 17:02
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 23, 2023

Released in 12.13.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators May 23, 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.

Change 'Processing' to 'Compressing' in terminal video output
3 participants