-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: Treat Video compression 0 as false. #26503
Conversation
This still needs a Changlog entry, but i'll add that after the next release. |
.circleci/workflows.yml
Outdated
@@ -493,7 +493,7 @@ commands: | |||
# internal PR | |||
CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY \ | |||
CYPRESS_INTERNAL_ENABLE_TELEMETRY="true" \ | |||
OTEL_RESOURCE_ATTRIBUTES="ci.branch=$CIRCLE_BRANCH,ci.job=$CIRCLE_JOB,ci.node-index=$CIRCLE_NODE_INDEX,ci.circle=$CIRCLECI,ci.build-url=$CIRCLE_BUILD_URL,ci.build-number=$CIRCLE_BUILD_NUM" \ | |||
OTEL_RESOURCE_ATTRIBUTES="ci.branch=$CIRCLE_BRANCH,ci.job=$CIRCLE_JOB,ci.node-index=$CIRCLE_NODE_INDEX,ci.circle=$CIRCLECI,ci.build-url=$CIRCLE_BUILD_URL,ci.build-number=$CIRCLE_BUILD_NUM,SHA1=$CIRCLE_SHA1,PR_NUMBER=$CIRCLE_PR_NUMBER" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding to telemetry, i want to turn this into a custom detector, but thats for another pr
telemetry.getSpan('cypress')?.end() | ||
const span = telemetry.getSpan('cypress') | ||
|
||
span?.setAttribute('exitCode', code) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets log out the exit code to know if jobs failed or not.
// or we've been told not to upload the video | ||
if (options.videoCompression === false || options.shouldUploadVideo === false) { | ||
if (options.videoCompression === false || options.videoCompression === 0 || options.shouldUploadVideo === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the bug fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!options.videoCompress || !options.shouldUploadVideo)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd rather be explicit
@@ -676,7 +676,7 @@ async function waitForTestsToFinishRunning (options: { project: Project, screens | |||
|
|||
span?.setAttributes({ | |||
videoName, | |||
videoCompression, | |||
videoCompressionString: videoCompression.toString(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
honeycomb decided this value was an int, so false === 0... i changed it to a string to get the real value.
@@ -342,7 +342,7 @@ const isVideoSnapshotError = (err: Error) => { | |||
_.pull(added, sometimesAddedVideoSnapshotLine, sometimesAddedSpacingLine) | |||
_.pull(deleted, sometimesDeletedVideoSnapshotLine, sometimesAddedSpacingLine) | |||
|
|||
return _.isEqual(added, expectedAddedVideoSnapshotLines) && _.isEqual(deleted, expectedDeletedVideoSnapshotLines) | |||
return _.isEqual(added, expectedAddedVideoSnapshotLines) && (deleted.length === 0 || _.isEqual(deleted, expectedDeletedVideoSnapshotLines)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is modifying an existing workaround for the firefox video error... previously when video was being compressed there were lines that were missing from the saved snapshot... since with compression off, the video name isn't logged, now there are not deleted lines.
@@ -101,3 +102,15 @@ describe('e2e video compression', () => { | |||
}) | |||
}) | |||
}) | |||
|
|||
describe('video compression 0', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a new test for video compression 0
I was honestly hoping to see better performance returns from system tests. |
@@ -11,8 +11,8 @@ export default defineConfig({ | |||
reporter: '../../node_modules/cypress-multi-reporters/index.js', | |||
reporterOptions: { | |||
configFile: '../../mocha-reporter-config.json', | |||
videoCompression: false, // turn off video compression for CI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surprised this wasn't a typescript error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
3 flaky tests on run #45607 ↗︎
Details:
cypress/e2e/cypress/cypress.cy.js • 3 flaky tests • 5x-driver-electron
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
* chore: disable video compression * system test updates * moar system test fixes * a couple of telemetry tweaks * more intelligent defaults, don't touch firefox. * trying this * probably finally fix firefox system tests * unformat plz * ugh, also add a test * plz stop formatting that file * re-enable firefox tests * Change log * don't save videos to artifacts * this will be fixed in another pr * quoth the raven, quotes matter don't mess them up
Co-authored-by: Matt Henkes <mjhenkes@gmail.com> Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com> Co-authored-by: Ryan Manuel <ryanm@cypress.io> Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com> Co-authored-by: astone123 <adams@cypress.io> Co-authored-by: Mark Noonan <mark@cypress.io> Co-authored-by: Mike Plummer <mike-plummer@users.noreply.github.com> Co-authored-by: Mike Plummer <mikep@cypress.io> Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com> Co-authored-by: Stokes Player <stokes.player@gmail.com> Co-authored-by: Stokes Player <stokes@cypress.io> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Adam Stone-Lord <adams@cypress.io> Co-authored-by: Ben M <benm@cypress.io> Co-authored-by: Jordan <jordan@jpdesigning.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Barthélémy Ledoux <bart@cypress.io> fix: Treat Video compression 0 as false. (#26503) fix: don't display run passing status if Cloud org is over run limit (#26533) fix: unify cdp approach to fix devtools in electron (#26573)
* feat/protocol: refactor: migrate from windi to tailwind (#26516) chore: update v8 generation vars so that from scratch depends implies updating the metafile (#26472) chore: Update Vite to 4.3.0 (#26553) fix: unify cdp approach to fix devtools in electron (#26573) dependency(deps): update dependency deps-ok to v1.4.1 🌟 (#26612) chore: update 12.11.0 release date (#26587) chore: 12.11.0 release (#26582) chore: implement experimental ESM stub/spy for Vite (#26536) chore: try triggering mouseleave on buttons to ensure that tooltips aren't showing (#26524) chore: add support for Angular 16 (#26052) chore: upgrade Vue to 3.2.47 (#26555) chore: Update v8 snapshot cache (#26537) chore: add missing utm parameters for cloud links to Debug page (#26556) chore: update stalebot to respect new labels and up process rate (#26552) fix: don't display run passing status if Cloud org is over run limit (#26533) chore: update vm2 to 3.9.17 (#26534) feat: display a limit warning on the run navigation component when there are 100 total runs (#26523) chore: Update v8 snapshot cache (#26476) chore: upgrade vm2 (#26495) fix: Treat Video compression 0 as false. (#26503)
Additional details
This Pull request also disables video compression for our tests in CI
The following table is a comparison between a develop ci run and a ci run in this branch, since it is not averaged over time the number just represent a snapshot in time and the real performance difference is probably somewhere in the middle.
Honeycomb metrics:
Comparing average job duration between develop and this branch
Average time spent in the video:post:procoessing span
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?