-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Improve UX when Test Replay upload fails due to slow upload (#3…
…0235) * new error message for stream stall upload failures * new unknown error msg, extract printProtocolUploadError for testing, consolidatd args for stream stall msg * rename env more appropriately, add sampling interval param to putProtocolArtifact * default to 5000, override with app capture protocol value, override that with env var * update snapshots * fix math in upload stall error msg * changelog * update gql schema w/ new error msg, fix protocol tscheck * update test to use fn for app capture supplied interval * increase default stream stall interval to 10 seconds * typos * snapshots * rename env var * do not use user-supplied interval if it parses to NaN * use the more standard makeErr for unknown/uncategorized upload error in visual snapshots * rearrange upload stall error message * fix typo * changelog --------- Co-authored-by: Jennifer Shehane <[email protected]>
- Loading branch information
1 parent
fbe51fc
commit 1d84532
Showing
20 changed files
with
455 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...ges/errors/__snapshot-html__/CLOUD_PROTOCOL_UPLOAD_AGGREGATE_ERROR - withSystemError.html
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
47 changes: 47 additions & 0 deletions
47
packages/errors/__snapshot-html__/CLOUD_PROTOCOL_UPLOAD_STREAM_STALL_FAILURE.html
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
45 changes: 45 additions & 0 deletions
45
packages/errors/__snapshot-html__/CLOUD_PROTOCOL_UPLOAD_UNKNOWN_ERROR.html
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
packages/server/lib/cloud/artifacts/print_protocol_upload_error.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { HttpError } from '../network/http_error' | ||
import { SystemError } from '../network/system_error' | ||
import { StreamStalledError } from '../upload/stream_stalled_error' | ||
import Debug from 'debug' | ||
import * as errors from '../../errors' | ||
|
||
const debug = Debug('cypress:server:cloud:artifacts') | ||
|
||
export const printProtocolUploadError = (error: Error) => { | ||
debug('protocol error: %O', error) | ||
// eslint-disable-next-line no-console | ||
console.log('') | ||
if ((error as AggregateError).errors) { | ||
errors.warning('CLOUD_PROTOCOL_UPLOAD_AGGREGATE_ERROR', error as AggregateError) | ||
} else if (HttpError.isHttpError(error)) { | ||
errors.warning('CLOUD_PROTOCOL_UPLOAD_HTTP_FAILURE', error) | ||
} else if (SystemError.isSystemError(error)) { | ||
errors.warning('CLOUD_PROTOCOL_UPLOAD_NETWORK_FAILURE', error) | ||
} else if (StreamStalledError.isStreamStalledError(error)) { | ||
errors.warning('CLOUD_PROTOCOL_UPLOAD_STREAM_STALL_FAILURE', error) | ||
} else { | ||
errors.warning('CLOUD_PROTOCOL_UPLOAD_UNKNOWN_ERROR', error) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
1d84532
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.
Circle has built the
linux arm64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally:
1d84532
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.
Circle has built the
linux x64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally:
1d84532
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.
Circle has built the
darwin arm64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally:
1d84532
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.
Circle has built the
darwin x64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally: