* internal: (studio) add manifest for all of the cloud delivered files
* fix tests and environment variables
* update strategy
* fix tests
* rework
* Apply suggestions from code review
* require manifest
* require manifest
* clean up
* refactor
* Update packages/server/lib/cloud/studio/StudioLifecycleManager.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* refactor
* just use the string
* try and fix test
* try and fix test
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: normalize options passed via axios to the agent layer
* improvements to testing, using debugging-proxy
* clean up & add test cases for authorization
* add follow-redirects as explicit dependency
* internal: (studio) add network agent to the studio session call
* Update packages/server/lib/cloud/api/studio/post_studio_session.ts
Co-authored-by: Matt Schile <mschile@cypress.io>
---------
Co-authored-by: Matt Schile <mschile@cypress.io>
* chore: (studio) when errors occur in development, log them and do not throw and do not send to Sentry
* Update packages/server/lib/cloud/api/studio/report_studio_error.ts
* chore: (studio) when errors occur in development, log them and do not throw and do not send to Sentry
* chore: (studio) when errors occur in development, log them and do not throw and do not send to Sentry
* use old create instance method for proxy support
* changelog
* conform legacy createInstance to the newer signature
* link to proxy env issue as todo
* changelog
* system test snapshots
* fix snap
* chore: convert cache.js file within server to TypeScript
* update cache calls and await them
* updates to imports and switching cache calls to await
* remove Partial from Allowed State
* change cache calls back to not await
* Remove dead code
* update memo.push return
* patch axios for v8 snapshots
* export httpsAgent and httpAgent discretely
* set up axios interceptors for logging and error response transformation
* use unified error transform fn
* create instance api reqs, timeouts, tests
* move axios middleware to its own dir & refactor
* refactor error handling, enable retries in createInstance
* fix invocation of createInstance - not caught by ts because record.js is js
* retry on 500 - according to system test, this is expected behavior
* resolve snapshots, report retries to stdout
* fix cdp connection usage of shouldRetry due to newly unknown error type
* axios doesnt fully follow RequestOptions shape when adding request to https agent
* note why uri is treated as optional
* hail mary on getting axios to work with v8 snapshots
* update lockfile, force no-rewrite on more axios files
* attempt to fix v8 snapshots
* add verbose debugging to api request logging
* enable verbose api debugging on server unit tests
* fix nock pattern for createInstance
* remove request logging unit test - sinon/mocha does not assert correctly
* fix a few unit tests
* use runAllAsync rather than waiting an arbitrary time for sinon fake timer
* move create_instance spec to ts file, remove redundant test
* rm debug on ci
* clarify comment on change inpackages/network
* correct .uri property on patched RequestOptions to be optional
* rm unused log_requests.ts, DRY error messages
* resolve types with record.ts migration
---------
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* chore: set up sharing of react via module federation in studio
* chore: add ability to load types from the studio bundle
* fix build
* fix build
* fix build
* chore: pass file preprocesor override to protocol as debug data
* fix tests
* PR comments
* PR comment
* update types
* chore: set up sharing of react via module federation in studio
* chore: add ability to load types from the studio bundle
* fix build
* fix build
* fix build
* PR comments
* Update guides/studio-development.md
Co-authored-by: Matt Schile <mschile@cypress.io>
* fix test
---------
Co-authored-by: Matt Schile <mschile@cypress.io>
* feat: update the protocol to be able to flex logic based on project config
* slight refactor
* Update cli/CHANGELOG.md
* Update packages/types/src/protocol.ts
* fix ts
* 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 <jennifer@cypress.io>
* fix: rethrow stalled network request error correctly
* no longer timeout from stream monitor on failure to start - allow OS to handle
* changelog
* fix system error detection
* fix test for system error throw
* Update cli/CHANGELOG.md
* Update packages/server/test/unit/cloud/network/put_fetch_spec.ts
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* rm noop try-catch
---------
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* custom async retry for any async fn
* "proxied" fetch for PUT, throwing http errors
* cleans up put_fetch return types & parsing
* move protocol upload logic to put_protocol_artifact, rm upload_stream
* changelog
* changelog
* manually fix wsp in snapshot
* reorganizes a little, properly tests retryable logic
* removes 408 as a non-retriable error in unit test
* make expectation to be resolved more clear
* rm unnecessary type coercion
* changelog
* Update cli/CHANGELOG.md
* asyncRetry only throws Aggregate errors if there is more than one attempt
* Update packages/server/test/unit/cloud/network/is_retryable_error_spec.ts
Co-authored-by: Matt Schile <mschile@cypress.io>
* Update packages/server/test/unit/cloud/network/is_retryable_error_spec.ts
---------
Co-authored-by: Matt Schile <mschile@cypress.io>
* refactor record.js to extract upload logic into ts
- streamlines the main uploadArtifact fn
- extracts artifact specific logic to artifact classes
- fully defines types for upload processing and reporting
* tweak refactors so system tests produce same snapshots
* some todos, fixes exports/imports from api/index.ts
* fix api export so it can be imported by ts files
* cleans up types
* extracting artifact metadata from options logs to debug but does not throw if errors are encountered
* fix type imports in print-run
* fix debug formatting for artifacts
* fix reporting successful protocol uploads
* change inheritence to strategy
* rm empty file
* Update packages/server/lib/cloud/artifacts/upload_artifacts.ts
* makes protocolManager optional to uploadArtifacts, fixes conditional accessor in protocol fatal error report
* missed a potentially undef
* convert to frozen object / keyof instead of string composition for artifact kinds
---------
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
* tbd
* workable templated filestream uploader
* clean up async assertions
* upload stream uses activity monitor to detect start timeouts and stalls
* makes uploadStream retryable
* filesize detection, enoent errors, and testable retry delays
* extract fs logic to putProtocolArtifact, impl putProtocolArtifact
* aggregate errors for retryable upload streams
* fixes imports from moving api.ts, uses new upload mechanism in protocol.ts
* use spec_helper in StreamActivityMonitor_spec due to global sinon clock changes
* fix putProtocolArtifact specs when run as a part of the unit test suite
* fix return type of ProtocolManager.uploadCaptureArtifact
* convert from whatwg streams back to node streams
* extract HttpError
* ensure system test snapshots
* changelog
* more changelog
* fix unit tests
* fix api ref in integration test
* fix refs to api in snapshotting and after-pack
* small edits
* Update packages/server/lib/cloud/api/HttpError.ts
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* Update packages/server/lib/cloud/upload/uploadStream.ts
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* camelcase -> snakeCase filenames
* improve docs for StreamActivityMonitor
* added documentation to: upload_stream, put_protocol_artifact_spec
* move stream activity monitor params to consts - no magic numbers. docs.
* Update packages/server/lib/cloud/api/http_error.ts
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* Update packages/server/test/unit/cloud/api/put_protocol_artifact_spec.ts
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* fix check-ts
* fix imports in put_protocol_artifact_spec
* Update packages/server/test/unit/cloud/upload/stream_activity_monitor_spec.ts
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* api.ts -> index.ts
* fix comment style, remove confusingly inapplicable comment about whatwg streams
---------
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>