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 an activity indicator in the CLI output when uploading artifacts to cypress cloud #28277

Merged
merged 22 commits into from
Nov 20, 2023

Conversation

cacieprins
Copy link
Contributor

@cacieprins cacieprins commented Nov 8, 2023

Additional details

When uploading large artifacts to the cloud, we need a keep alive signal for CI systems, as well as an indicator for users when running in record mode locally.

Steps to test

  1. Throttle network connections using charles proxy or similar (alternatively, select a project that generates a large test replay database or video)
  2. Run cypress in record mode
  3. Verify the upload indicator progresses

How has the user experience changed?

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

After:
out_delayed

PR Tasks

@cacieprins cacieprins changed the title Cacie/feat/upload activity indicator feat: display an activity indicator in the CLI output when uploading artifacts to cypress cloud Nov 8, 2023
@cacieprins cacieprins marked this pull request as ready for review November 8, 2023 17:13
Copy link

cypress bot commented Nov 8, 2023

5 flaky tests on run #52378 ↗︎

0 6037 81 0 Flakiness 5

Details:

Merge branch 'develop' into cacie/feat/upload-activity-indicator
Project: cypress Commit: 1edb77837d
Status: Passed Duration: 15:06 💡
Started: Nov 20, 2023 4:31 PM Ended: Nov 20, 2023 4:47 PM
Flakiness  commands/storage.cy.ts • 1 flaky test • 5x-driver-chrome

View Output

Test Artifacts
src/cy/commands/storage > #getAllLocalStorage > gets local storage from all origins Test Replay
Flakiness  e2e/origin/commands/storage.cy.ts • 1 flaky test • 5x-driver-chrome

View Output

Test Artifacts
cy.origin storage > .getAllLocalStorage Test Replay
Flakiness  cypress/cypress.cy.js • 3 flaky tests • 5x-driver-chrome

View Output

Test Artifacts
... > correctly returns currentRetry Test Replay
... > correctly returns currentRetry Test Replay
... > correctly returns currentRetry Test Replay

Review all test suite changes for PR #28277 ↗︎

cli/CHANGELOG.md Outdated Show resolved Hide resolved
@@ -150,8 +143,8 @@ export const normalizeStdout = function (str: string, options: any = {}) {
// 15 seconds -> XX seconds
.replace(/((\d+ minutes?,\s+)?\d+ seconds? *)/g, replaceTime)
.replace(/\r/g, '')
// replaces multiple lines of uploading screenshots & results (since order not guaranteed)
.replace(/(Uploading Screenshots & Videos.*?\n\n)((.*-.*[\s\S\r]){2,}?)(\n\n)/g, replaceUploadingResults)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This mask was no longer in used, so replaced with the activity mask

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

The animation looks great.

@cacieprins Could we have the 'Uploading' text indented 2 spaces like the other text? Maybe in the same Blue style?

Screen Shot 2023-11-14 at 9 55 22 AM

I also wonder if there should be some interval before printing the 'Uploading Cloud Artifacts: .' text, where it will just skip this if it uploads so fast. Most of my run just had this line printed arbitrarily when the upload was instant.

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Nov 16, 2023

@cacieprins Mine has the Uploading displaying without a spaced line above it from the Test Replay output, not like shown in your screenshots.

Screen Shot 2023-11-16 at 11 35 00 AM

@cacieprins cacieprins merged commit e3ba697 into develop Nov 20, 2023
80 of 82 checks passed
@cacieprins cacieprins deleted the cacie/feat/upload-activity-indicator branch November 20, 2023 16:50
@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 a progress indicator for uploads
3 participants