-
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 | 16m 42s |
Commit |
|
Committer | Cacie Prins |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
1
|
|
2
|
|
11
|
|
4
|
|
677
|
View all changes introduced in this branch ↗︎ |
Warning
Partial Report: The results for the Application Quality reports may be incomplete.
UI Coverage
27.27%
|
|
---|---|
|
8
|
|
3
|
Accessibility
97.1%
|
|
---|---|
|
1 critical
1 serious
0 moderate
0 minor
|
|
3
|
Tests for review
cypress/e2e/studio/studio.cy.ts • 1 failed test • app-e2e
Test | Artifacts | |
---|---|---|
Cypress Studio > updates an existing test with assertions |
Test Replay
Screenshots
|
runner/runner.ui.cy.ts • 1 flaky test • app-e2e
Test | Artifacts | |
---|---|---|
src/cypress/runner > reporter interaction > user can stop test execution |
Test Replay
Screenshots
|
cypress-origin-communicator.cy.ts • 1 flaky test • app-e2e
.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 Cloud API to typed request/response models from Cloud validations and adds scripts to sync/ensure those types, with minor runtime guards and error-handling refactors.
lib/cloud/api/index.ts
andlib/cloud/api/create_instance.ts
(e.g.,PostRun*
,PostRunInstance*
,PostInstance*
,PutInstance*
).createRun
,createInstance
,postInstanceTests
,postInstanceResults
,updateInstanceStdout
,updateInstanceArtifacts
, utilities likeping
,getAuthUrls
).scripts/sync-cloud-validations.sh
to fetchcloudValidations.d.ts
from Cloud and annotate with ETag.sync-cloud-validations
,ensure-cloud-validations
; run onpostinstall
,build-prod
, andcheck-ts
inpackages/server/package.json
.zod
dependency; ignore generatedlib/validations
in.gitignore
.script
exists andtestingType
ise2e
orcomponent
._postInstanceTests
and its caller to async/await with try/catch; on failure, log and allow browser to hang without invoking callback.Written by Cursor Bugbot for commit 5ff0444. This will update automatically on new commits. Configure here.