-
Notifications
You must be signed in to change notification settings - Fork 3.4k
chore: use cloud validations for packages/server api request/response types #32632
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
base: develop
Are you sure you want to change the base?
Conversation
cypress
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Project |
cypress
|
| Branch Review |
chore/use-api-typedefs
|
| Run status |
|
| Run duration | 19m 34s |
| Commit |
|
| Committer | Cacie Prins |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
1
|
|
|
14
|
|
|
1102
|
|
|
4
|
|
|
26748
|
| View all changes introduced in this branch ↗︎ | |
Warning
Partial Report: The results for the Application Quality reports may be incomplete.
UI Coverage
45.2%
|
|
|---|---|
|
|
189
|
|
|
160
|
Accessibility
98%
|
|
|---|---|
|
|
4 critical
8 serious
2 moderate
2 minor
|
|
|
101
|
Tests for review
src/gql-components/error/BaseError.cy.tsx • 1 failed test • frontend-shared-ct
| Test | Artifacts | |
|---|---|---|
| An uncaught error was detected outside of a test |
Test Replay
|
|
commands/actions/selectFile.cy.ts • 1 flaky test • 5x-driver-electron
| Test | Artifacts | |
|---|---|---|
| ... > throws with aliased intercepts |
Test Replay
|
|
issues/28527.cy.ts • 1 flaky test • 5x-driver-electron
| Test | Artifacts | |
|---|---|---|
| issue 28527 > fails and then retries and verifies about:blank is not displayed |
Test Replay
Screenshots
|
|
e2e/origin/config_env.cy.ts • 1 flaky test • 5x-driver-inject-document-domain-chrome
| Test | Artifacts | |
|---|---|---|
| cy.origin- Cypress.config() > serializable > overwrites different values in secondary if one exists in the primary |
Test Replay
|
|
commands/files.cy.js • 1 flaky test • 5x-driver-firefox
| Test | Artifacts | |||||||
|---|---|---|---|---|---|---|---|---|
| src/cy/commands/files > #readFile > retries to read when ENOENT |
| |||||||
| Test | Artifacts | |
|---|---|---|
| ... > stops waiting when an xhr request is canceled |
The first 5 flaky specs are shown, see all 13 specs in Cypress Cloud. | |
| .catch((err: any) => { | ||
| onError(err) | ||
|
|
||
| return responseDidFail |
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.
do we no longer need this logic?
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.
It's still there, just without the boolean flag. This "hanging" behavior is further down in the catch block that BugBot is complaining about.
| "dev": "node index.js", | ||
| "docker": "cd ../.. && WORKING_DIR=/packages/server ./scripts/run-docker-local.sh", | ||
| "postinstall": "patch-package", | ||
| "postinstall": "patch-package && yarn sync-cloud-validations", |
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.
if we are doing this at the package level, do we still need to call it in CI after the build? Would be nice to get rid of this https://github.com/cypress-io/cypress/blob/develop/.circleci/src/pipeline/@pipeline.yml#L201
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.
That's a fully separate cloud validations download, combining them was out of scope for this
Additional details
System tests currently fetch typescript definitions and example payloads for API endpoints when they run. This ensures our api calls are supported properly by the server.
This adds the same functionality to packages/server, so we can make sure our api functions use up-to-date typedefs from Cypress Cloud
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation?type definitions?Note
Fetches Cloud validation typings during install/build and updates server Cloud API to use them with tightened types and small flow tweaks.
scripts/sync-cloud-validations.shto fetchlib/validations/cloudValidations.d.ts(ETag-based); wire viapostinstall,build-prod,check-ts, and new scriptssync-cloud-validations/ensure-cloud-validations.lib/validations/**in.gitignoreand ESLint.../../validations/cloudValidationstypes inlib/cloud/api/index.tsandlib/cloud/api/create_instance.ts; add explicit method return types.e2e/componenttesting types.postInstanceTests,postInstanceResults,updateInstanceStdout,updateInstanceArtifacts,createInstancenow use validated request/response types.getBaseLoginUrlasync and readdashboardAuthUrlfromgetAuthUrls()result._postInstanceTeststo async/await with centralized error handling;onTestsReceivedhandlesSPEC: SKIPand error paths without invoking the callback.@tooling/v8-snapshotbuild ensures typedefs by invoking serverensure-cloud-validations.zod; update npm scripts accordingly.Written by Cursor Bugbot for commit dfe3934. This will update automatically on new commits. Configure here.