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: improve stability when recording #25837

Merged
merged 58 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
48700f4
cycle through preflight requests
brian-mann Feb 16, 2023
c2b647a
always replace apiUrl
brian-mann Feb 16, 2023
c080a11
fix logic, add additional test cases
brian-mann Feb 16, 2023
ecbde1e
add tests for default timeout on /preflight
brian-mann Feb 16, 2023
29e6951
fix tests, rename function stub
brian-mann Feb 16, 2023
b2a047c
optimize only instantiating apiProd once
brian-mann Feb 16, 2023
d01987b
general cleanup
brian-mann Feb 16, 2023
f5bcc6e
general cleanup and refactoring of test helpers
brian-mann Feb 16, 2023
1462c86
add tests and logic for additional error scenarios
brian-mann Feb 16, 2023
72d4b16
cleanup tests, add tests for ensuring encrypt is respected on subsequ…
brian-mann Feb 16, 2023
8c5817f
formatting
brian-mann Feb 16, 2023
60984eb
bugfix: prevent retryable API errors from retrying one too many times
brian-mann Feb 16, 2023
139eda5
cleaned up various error messages
brian-mann Feb 16, 2023
792ab36
added a bunch of tests covering all error cases except for F3
brian-mann Feb 16, 2023
503e549
snapshot cleanup and formatting
brian-mann Feb 16, 2023
3e64537
update error messages and html snapshots
brian-mann Feb 16, 2023
f45cb3b
system test function name
brian-mann Feb 16, 2023
8ca8724
added tests for F3 and F4 failure states, handle 412 and 422 status c…
brian-mann Feb 16, 2023
d9142a6
env url resolution
ryanthemanuel Feb 16, 2023
21bf1ab
fix build issues
ryanthemanuel Feb 16, 2023
2bb00d7
fix failing tests
brian-mann Feb 16, 2023
d9df6dc
Merge branch 'fix/preflight' of /~https://github.com/cypress-io/cypress…
brian-mann Feb 16, 2023
0b90a2b
pr comments
ryanthemanuel Feb 17, 2023
68e715c
update env detection logic
ryanthemanuel Feb 20, 2023
48b833d
Merge branch 'develop' into fix/preflight
ryanthemanuel Feb 21, 2023
26353d9
refactor environment detection and add tests
ryanthemanuel Feb 22, 2023
5150ac9
tweak regex
ryanthemanuel Feb 22, 2023
1021b0d
use map instead of object
ryanthemanuel Feb 22, 2023
329b655
fix tests
ryanthemanuel Feb 22, 2023
fcbada8
fix tests
ryanthemanuel Feb 22, 2023
7e026ae
fix binary build
ryanthemanuel Feb 22, 2023
fed61c1
oops wrong name
ryanthemanuel Feb 22, 2023
e9e3547
run environment tests on all platforms
ryanthemanuel Feb 23, 2023
57a821d
fix build
ryanthemanuel Feb 23, 2023
809d5b1
fix tests and build
ryanthemanuel Feb 23, 2023
a1de330
pr comments
ryanthemanuel Feb 23, 2023
e358a66
renaming
ryanthemanuel Feb 23, 2023
eba8365
Merge branch 'develop' into fix/preflight
ryanthemanuel Feb 23, 2023
2740245
update resource class to medium
ryanthemanuel Feb 23, 2023
04e4b98
pr comments
ryanthemanuel Feb 23, 2023
29857da
pr comments
ryanthemanuel Feb 23, 2023
3a54b3d
isolate cypress_env_dependencies to just the built binary
ryanthemanuel Feb 23, 2023
ea075e7
fix tests
ryanthemanuel Feb 23, 2023
6780197
fix test - run ci
ryanthemanuel Feb 23, 2023
4e7c7bf
Updating logic for 422
tgriesser Feb 24, 2023
a9e07e0
updates to CYPRESS_ENV_DEPENDENCIES structure
ryanthemanuel Feb 24, 2023
d2bda85
run ci
ryanthemanuel Feb 24, 2023
c1b3357
fix test for 422 error
brian-mann Feb 24, 2023
d6681a5
Update CHANGELOG.md
ryanthemanuel Feb 24, 2023
26a0465
Merge branch 'develop' into fix/preflight
ryanthemanuel Feb 24, 2023
878aa1e
Update CHANGELOG.md
ryanthemanuel Feb 24, 2023
802f193
PR comments
ryanthemanuel Feb 24, 2023
458dc0b
Merge branch 'develop' into fix/preflight
ryanthemanuel Feb 24, 2023
d6086a6
fix build
ryanthemanuel Feb 24, 2023
2c5094c
retry on all 5xx errors
brian-mann Feb 24, 2023
245400f
Merge branch 'fix/preflight' of /~https://github.com/cypress-io/cypress…
brian-mann Feb 24, 2023
5d38807
condensed down to 4 error cases, updated snapshots
brian-mann Feb 24, 2023
45c8a33
added tests for failing after preflight, but valid decryption, always…
brian-mann Feb 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 59 additions & 2 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mainBuildFilters: &mainBuildFilters
- /^release\/\d+\.\d+\.\d+$/
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- 'update-v8-snapshot-cache-on-develop'
- 'lmiller/fixing-vite-windows'
- 'fix/preflight'

# usually we don't build Mac app - it takes a long time
# but sometimes we want to really confirm we are doing the right thing
Expand All @@ -41,6 +41,7 @@ macWorkflowFilters: &darwin-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'fix/preflight', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -51,6 +52,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'fix/preflight', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -71,6 +73,7 @@ windowsWorkflowFilters: &windows-workflow-filters
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'lmiller/fixing-vite-windows', << pipeline.git.branch >> ]
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'fix/preflight', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -136,7 +139,7 @@ commands:
- run:
name: Check current branch to persist artifacts
command: |
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "lmiller/fixing-vite-windows" ]]; then
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "fix/preflight" && "$CIRCLE_BRANCH" != "update-v8-snapshot-cache-on-develop" ]]; then
echo "Not uploading artifacts or posting install comment for this branch."
circleci-agent step halt
fi
Expand Down Expand Up @@ -1485,6 +1488,30 @@ jobs:
path: /tmp/cypress
- store-npm-logs

server-unit-tests-cloud-environment:
<<: *defaults
parameters:
<<: *defaultsParameters
resource_class:
type: string
default: medium
resource_class: << parameters.resource_class >>
parallelism: 1
steps:
- restore_cached_workspace
# TODO: Remove this once we switch off self-hosted M1 runners
- when:
condition:
equal: [ *darwin-arm64-executor, << parameters.executor >> ]
steps:
- run: rm -f /tmp/cypress/junit/*
- run: yarn workspace @packages/server test-unit cloud/environment_spec.ts
- verify-mocha-results:
expectedResultCount: 1
- store_test_results:
path: /tmp/cypress
- store-npm-logs

server-integration-tests:
<<: *defaults
parallelism: 1
Expand Down Expand Up @@ -2577,6 +2604,7 @@ linux-x64-workflow: &linux-x64-workflow
context:
- test-runner:upload
- test-runner:commit-status-checks
- test-runner:build-binary
requires:
- build
# various testing scenarios, like building full binary
Expand Down Expand Up @@ -2677,6 +2705,7 @@ linux-arm64-workflow: &linux-arm64-workflow
context:
- test-runner:upload
- test-runner:commit-status-checks
- test-runner:build-binary
executor: linux-arm64
resource_class: arm.medium
requires:
Expand All @@ -2694,6 +2723,12 @@ linux-arm64-workflow: &linux-arm64-workflow
resource_class: arm.medium
requires:
- linux-arm64-build
- server-unit-tests-cloud-environment:
name: linux-arm64-server-unit-tests-cloud-environment
executor: linux-arm64
resource_class: arm.medium
requires:
- linux-arm64-build

darwin-x64-workflow: &darwin-x64-workflow
jobs:
Expand All @@ -2717,6 +2752,7 @@ darwin-x64-workflow: &darwin-x64-workflow
- test-runner:sign-mac-binary
- test-runner:upload
- test-runner:commit-status-checks
- test-runner:build-binary
executor: mac
resource_class: macos.x86.medium.gen2
requires:
Expand All @@ -2740,6 +2776,12 @@ darwin-x64-workflow: &darwin-x64-workflow
resource_class: macos.x86.medium.gen2
requires:
- darwin-x64-build
- server-unit-tests-cloud-environment:
Copy link
Contributor

Choose a reason for hiding this comment

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

How come this job isn't run against darwin-arm64 and linux-arm64?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I suppose I could add it. I'm not sure there's much benefit as the logic is platform specific, not architecture specific

name: darwin-x64-driver-server-unit-tests-cloud-environment
executor: mac
resource_class: macos.x86.medium.gen2
Copy link
Member Author

Choose a reason for hiding this comment

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

not sure if this needs to be this big bc these are just unit tests

Copy link
Collaborator

Choose a reason for hiding this comment

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

Updated: e358a66 (#25837)

requires:
- darwin-x64-build

darwin-arm64-workflow: &darwin-arm64-workflow
jobs:
Expand All @@ -2762,6 +2804,7 @@ darwin-arm64-workflow: &darwin-arm64-workflow
- test-runner:sign-mac-binary
- test-runner:upload
- test-runner:commit-status-checks
- test-runner:build-binary
executor: darwin-arm64
resource_class: cypress-io/latest_m1
requires:
Expand All @@ -2779,6 +2822,12 @@ darwin-arm64-workflow: &darwin-arm64-workflow
resource_class: cypress-io/latest_m1
requires:
- darwin-arm64-build
- server-unit-tests-cloud-environment:
name: darwin-arm64-server-unit-tests-cloud-environment
executor: darwin-arm64
resource_class: cypress-io/latest_m1
requires:
- darwin-arm64-build

windows-workflow: &windows-workflow
jobs:
Expand Down Expand Up @@ -2819,6 +2868,13 @@ windows-workflow: &windows-workflow
requires:
- windows-build

- server-unit-tests-cloud-environment:
name: windows-server-unit-tests-cloud-environment
executor: windows
resource_class: windows.medium
requires:
- windows-build

- create-build-artifacts:
name: windows-create-build-artifacts
executor: windows
Expand All @@ -2827,6 +2883,7 @@ windows-workflow: &windows-workflow
- test-runner:sign-windows-binary
- test-runner:upload
- test-runner:commit-status-checks
- test-runner:build-binary
requires:
- windows-build
- test-binary-against-kitchensink-chrome:
Expand Down
2 changes: 2 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ _Released 02/28/2023 (PENDING)_
- It is now possible to set `hostOnly` cookies with [`cy.setCookie()`](https://docs.cypress.io/api/commands/setcookie) for a given domain. Addresses [#16856](/~https://github.com/cypress-io/cypress/issues/16856) and [#17527](/~https://github.com/cypress-io/cypress/issues/17527).
- Added a Public API for third party component libraries to define a Framework Definition, embedding their library into the Cypress onboarding workflow. Learn more [here](https://docs.cypress.io/guides/component-testing/third-party-definitions). Implemented in [#25780](/~https://github.com/cypress-io/cypress/pull/25780) and closes [#25638](/~https://github.com/cypress-io/cypress/issues/25638).
- Added a Debug Page tutorial slideshow for projects that are not connected to Cypress Cloud. Addresses [#25768](/~https://github.com/cypress-io/cypress/issues/25768).
- Improved various error message around interactions with the Cypress cloud. Implemented in [#25837](/~https://github.com/cypress-io/cypress/pull/25837)
- Updated the "new" status badge for the Debug page navigation link to be less noticeable when the navigation is collapsed. Addresses [#25739](/~https://github.com/cypress-io/cypress/issues/25739).

**Bugfixes:**

- Fixed various bugs when recording to the cloud. Fixed in [#25837](/~https://github.com/cypress-io/cypress/pull/25837)
- Fixed an issue where cookies were being duplicated with the same hostname, but a prepended dot. Fixed an issue where cookies may not be expiring correctly. Fixes [#25174](/~https://github.com/cypress-io/cypress/issues/25174), [#25205](/~https://github.com/cypress-io/cypress/issues/25205) and [#25495](/~https://github.com/cypress-io/cypress/issues/25495).
- Fixed an issue where cookies weren't being synced when the application was stable. Fixed in [#25855](/~https://github.com/cypress-io/cypress/pull/25855). Fixes [#25835](/~https://github.com/cypress-io/cypress/issues/25835).
- Added missing TypeScript type definitions for the [`cy.reload()`](https://docs.cypress.io/api/commands/reload) command. Addressed in [#25779](/~https://github.com/cypress-io/cypress/pull/25779).
Expand Down
2 changes: 1 addition & 1 deletion guides/error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ CANNOT_TRASH_ASSETS: (arg1: string) => {
return errTemplate`\
Warning: We failed to trash the existing run results.
This error will not alter the exit code.
This error will not affect or change the exit code.
${details(arg1)}`
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/errors/__snapshot-html__/CANNOT_TRASH_ASSETS.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading