-
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
feat: Improve UX when Test Replay upload fails due to slow upload #30235
base: develop
Are you sure you want to change the base?
Conversation
…consolidatd args for stream stall msg
packages/errors/src/errors.ts
Outdated
Warning: We encountered an error while upload the Test Replay recording of this spec. | ||
|
||
These reults will not display Test Replay recordings. |
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.
@cacieprins typos
Warning: We encountered an error while upload the Test Replay recording of this spec. | |
These reults will not display Test Replay recordings. | |
Warning: We encountered an error while uploading the Test Replay recording of this spec. | |
These results will not display Test Replay recordings. |
cypress Run #57146
Run Properties:
|
Project |
cypress
|
Branch Review |
cacie/9143/stream-stall-enhancements
|
Run status |
Passed #57146
|
Run duration | 23m 53s |
Commit |
b93916fcbc: Merge branch 'develop' into cacie/9143/stream-stall-enhancements
|
Committer | Jennifer Shehane |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
8
|
Pending |
1326
|
Skipped |
0
|
Passing |
29395
|
View all changes introduced in this branch ↗︎ |
UI Coverage
44.89%
|
|
---|---|
Untested elements |
200
|
Tested elements |
167
|
Accessibility
91.3%
|
|
---|---|
Failed rules |
5 critical
10 serious
2 moderate
2 minor
|
Failed elements |
944
|
@@ -3049,6 +3051,15 @@ exports['e2e record capture-protocol enabled protocol runtime errors db size too | |||
- Screenshot - Done Uploading 1 kB in Xm, Ys ZZ.ZZms 1/2 /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png | |||
- Test Replay - Failed Uploading after Xm, Ys ZZ.ZZms 2/2 - Spec recording too large: artifact is 1024 bytes, limit is 200 bytes | |||
|
|||
Warning: We encountered an error while upload the Test Replay recording of this spec. | |||
|
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.
These lines still have the typos in them
Same below also
|
||
If this error occurs often, the sampling period may be configured by setting the ${fmt.highlightSecondary('CYPRESS_PROTOCOL_UPLOAD_SAMPLING_INTERVAL')} environment variable to a higher value than ${fmt.stringify(error.maxActivityDwellTime)}. | ||
|
||
To prevent long CI executing durations, this Test Replay recording will not be uploaded. |
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.
To prevent long CI executing durations, this Test Replay recording will not be uploaded. | |
To prevent long CI execution durations, this Test Replay recording will not be uploaded. |
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.
@cacieprins This still needs addressing.
packages/errors/src/errors.ts
Outdated
|
||
The upload transfer rate fell below ${fmt.highlightSecondary(`${kbpsThreshold}kbps`)} over a sampling period of ${fmt.highlightSecondary(`${error.maxActivityDwellTime}ms`)}. | ||
|
||
If this error occurs often, the sampling period may be configured by setting the ${fmt.highlightSecondary('CYPRESS_PROTOCOL_UPLOAD_SAMPLING_INTERVAL')} environment variable to a higher value than ${fmt.stringify(error.maxActivityDwellTime)}. |
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 feel like this might flow better if we rearranged the paragraphs.
Warning...
The upload...
To prevent...
The results for this...
If this error occurs...
@@ -719,6 +730,13 @@ describe('visual error templates', () => { | |||
withSystemError: [aggregateErrorWithSystemError], | |||
} | |||
}, | |||
CLOUD_PROTOCOL_UPLOAD_UNKNOWN_ERROR: () => { | |||
const error = new Error('some message') |
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.
Will this be updated to be a more specific error message?
console.log('') | ||
errors.warning('CLOUD_PROTOCOL_UPLOAD_NEWORK_FAILURE', error) | ||
} | ||
printProtocolUploadError(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.
nice
@@ -320,7 +322,11 @@ export class ProtocolManager implements ProtocolManagerShape { | |||
debug(`uploading %s to %s with a file size of %s`, filePath, uploadUrl, fileSize) | |||
|
|||
try { | |||
await putProtocolArtifact(filePath, dbSizeLimit(), uploadUrl) | |||
const samplingInterval = process.env.CYPRESS_TEST_REPLAY_UPLOAD_SAMPLING_INTERVAL ? |
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.
What is a user passes 'foo' to this env var, it'd evaluate to NaN, then what?
Additional details
Cypress monitors the upload of a Test Replay recording. If the upload speed drops below 102.4kbps over a period of five seconds, Cypress terminates the upload so that CI pipelines are not unnecessarily slowed. This value is determined by:
This PR changes that behavior such that:
Steps to test
CYPRESS_PROTOCOL_UPLOAD_SAMPLING_INTERVAL
environment variable. If your bandwidth is set to 56kbps, for example, you should set the sampling interval to at least ten seconds (at 56kbps, it should take just over 9 seconds to transfer 512kb, or 64 kiloBytes)How has the user experience changed?
A new stream stall error message:
A new uncategorized error message:
PR Tasks
cypress-documentation
?type definitions
?