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

feat: display artifact upload durations in the console #28226

Merged
merged 30 commits into from
Nov 16, 2023

Conversation

cacieprins
Copy link
Contributor

@cacieprins cacieprins commented Nov 2, 2023

Additional details

Test Replay capture artifacts can be fairly large, so it is important to display how long it takes to upload artifacts to the Cypress cloud when recording a run. Each artifact type (screenshots, video, test replay) now displays how long it took to upload after the upload is complete. If an artifact fails to upload, the duration of the request is displayed as well.

Steps to test

Record a test run that will produce artifacts that are uploaded to the cloud, and observe the duration in the console output.

How has the user experience changed?

Before:
Screen Shot 2023-11-02 at 12 36 48 PM

After:
Screen Shot 2023-11-02 at 12 31 40 PM

PR Tasks

@cacieprins cacieprins marked this pull request as ready for review November 2, 2023 16:37
@cacieprins cacieprins marked this pull request as draft November 2, 2023 17:36
@cacieprins cacieprins marked this pull request as ready for review November 2, 2023 17:37
Copy link

cypress bot commented Nov 2, 2023

4 flaky tests on run #52309 ↗︎

0 554 6 0 Flakiness 4

Details:

Update CHANGELOG.md
Project: cypress Commit: 74fa6d66dd
Status: Passed Duration: 13:31 💡
Started: Nov 15, 2023 4:32 PM Ended: Nov 15, 2023 4:45 PM
Flakiness  runs.cy.ts • 2 flaky tests • app-e2e

View
Output

Test Artifacts
... > displays each run with correct information Test Replay Screenshots
... > opens the run page if a run is clicked Test Replay Screenshots
Flakiness  cypress-in-cypress.cy.ts • 1 flaky test • app-e2e

View
Output

Test Artifacts
Cypress in Cypress > restarts browser if there is a before:browser:launch task and there is a change on the config Test Replay Screenshots
Flakiness  specs_list_latest_runs.cy.ts • 1 flaky test • app-e2e

View
Output

Test Artifacts
App/Cloud Integration - Latest runs and Average duration > when no runs are recorded > shows placeholders for all visible specs Test Replay Screenshots

Review all test suite changes for PR #28226 ↗︎

@@ -338,7 +345,8 @@ const uploadArtifactBatch = async (artifacts, protocolManager, quiet) => {
return skipped && !report.error ? acc : {
...acc,
[key]: {
...report,
// TODO: once cloud supports reporting duration, no longer omit this
..._.omit(report, 'duration'),
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the Cloud not able to handle extra fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it will give zod errors.

cli/CHANGELOG.md Outdated Show resolved Hide resolved
@@ -111,7 +111,7 @@ exports['video compression true / compresses to 32 CRF'] = `

(Uploaded Cloud Artifacts)

- Video - Done Uploading 1 kB 1/1 /XXX/XXX/XXX/cypress/videos/video_compression.cy.js.mp4
- Video - Done Uploading 1 kB 1/1 in Xm, Ys ZZms /XXX/XXX/XXX/cypress/videos/video_compression.cy.js.mp4
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the snapshot needs to be updated to reflect the updates.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated, thanks for the catch!

process.stdout.write(` ${success ? 'in' : 'after'} ${durationOut}`)
}

process.stdout.write(` ${num}`)
Copy link
Member

Choose a reason for hiding this comment

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

what is num in this context?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

1/2, 2/2, etc. carryover name from previous logic

@cacieprins cacieprins merged commit d54a1e9 into develop Nov 16, 2023
5 checks passed
@cacieprins cacieprins deleted the cacie/feat/artifact-upload-duration branch November 16, 2023 15:01
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 21, 2023

Released in 13.6.0.

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

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

Protocol: [Performance] Add timings around upload to the standard output
6 participants