-
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 19s |
Commit |
|
Committer | Cacie Prins |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
2
|
|
13
|
|
1102
|
|
4
|
|
26711
|
View all changes introduced in this branch ↗︎ |
Warning
Partial Report: The results for the Application Quality reports may be incomplete.
UI Coverage
45.27%
|
|
---|---|
|
186
|
|
158
|
Accessibility
97.97%
|
|
---|---|
|
4 critical
8 serious
2 moderate
2 minor
|
|
101
|
Tests for review
commands/files.cy.js • 1 failed test • 5x-driver-firefox
.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
Switches server API request/response typing to Cloud-provided validations and adds a script/workflow to sync those typedefs; updates related call sites and error handling.
lib/cloud/api/create_instance.ts
andlib/cloud/api/index.ts
(e.g.,PostRun*
,PostInstance*
,PutInstance*
).createRun
,createInstance
,postInstanceTests
,postInstanceResults
,updateInstanceStdout
,updateInstanceArtifacts
).testingType
._postInstanceTests
to async/try-catch; centralize error conversion tocloudCannotProceedErr
.onTestsReceived
error path and keep SKIP handling (emitend
withskippedSpec: true
).user.getBaseLoginUrl
async and readdashboardAuthUrl
fromgetAuthUrls()
result.scripts/sync-cloud-validations.sh
and new npm scripts (sync-cloud-validations
,ensure-cloud-validations
); run duringpostinstall
and before build/type-check.zod
dep; update@tooling/v8-snapshot
build to ensure typedefs.lib/validations
via.gitignore
.Written by Cursor Bugbot for commit c537692. This will update automatically on new commits. Configure here.