-
Notifications
You must be signed in to change notification settings - Fork 3.3k
internal: (studio) initialize cloud studio asynchronously #31469
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
Conversation
cypress
|
Project |
cypress
|
Branch Review |
10501-studio-telemetry
|
Run status |
|
Run duration | 18m 11s |
Commit |
|
Committer | Adam Stone-Lord |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
2
|
|
154
|
|
0
|
|
11248
|
View all changes introduced in this branch ↗︎ |
Warning
No Report: Something went wrong and we could not generate a report for the Application Quality products.
@astone123 Lint is failing here |
…n errors, remove references for isStudioProtocolEnabled
Co-authored-by: Matt Schile <[email protected]>
Co-authored-by: Matt Schile <[email protected]>
Co-authored-by: Matt Schile <[email protected]>
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.
Pull Request Overview
This PR introduces asynchronous initialization for Cypress Cloud Studio, ensuring the cloud bundle is always loaded and Studio is initialized without blocking project startup. Key changes include always capturing Studio’s init event, refactoring protocol setup using a new StudioLifecycleManager, and updating tests and related configuration to support the new initialization flow.
Reviewed Changes
Copilot reviewed 26 out of 27 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/server/test/unit/cloud/studio_spec.ts | Added flag “shouldEnableStudio” to test studio manager behavior |
packages/server/test/unit/cloud/api/studio/get_and_initialize_studio_manager_spec.ts | Updated environment variable handling and restoration for studio tests |
packages/server/test/unit/StudioLifecycleManager_spec.ts | Extensive tests for new StudioLifecycleManager functionality |
packages/server/lib/socket-base.ts | Updated socket event handling to register Studio readiness callbacks |
packages/server/lib/routes.ts | Modified Studio route initialization using a dedicated router |
packages/server/lib/project-base.ts | Reworked studio initialization and protocol setup using the lifecycle manager |
packages/server/lib/modes/results.ts | Removed obsolete config key from the results output |
packages/server/lib/cloud/studio.ts | Updated StudioManager setup to conditionally set status based on enable flag |
packages/server/lib/cloud/api/studio/get_and_initialize_studio_manager.ts | Passed through “shouldEnableStudio” flag to the studio manager setup |
packages/server/lib/StudioLifecycleManager.ts | New file encapsulating studio lifecycle management logic |
packages/graphql/src/schemaTypes/objectTypes/gql-Query.ts | Adjusted GraphQL resolve logic for studio status |
packages/driver/src/util/config.ts | Removed outdated config key checks |
packages/data-context/src/data/coreDataShape.ts | Updated core data shape to use the new lifecycle manager |
packages/config/src/options.ts & snapshots | Removed support for the obsolete “isStudioProtocolEnabled” flag |
packages/app/src/runner/event-manager.ts | Updated protocol-enabled state handling via studio:protocol:enabled event |
packages/app/src/runner/SpecRunnerOpenMode.vue | Adjusted UI display logic to reflect the new enabled status |
packages/app/cypress/e2e/studio/studio.cy.ts | Added new e2e test to simulate a hanging studio UI load scenario |
Files not reviewed (1)
- packages/graphql/schemas/schema.graphql: Language not supported
Co-authored-by: Matt Schile <[email protected]>
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Additional details
We'd like to know how many people are using Cypress Studio today. This PR does a few things:
StudioLifecycleManager
to handle accessing StudioSteps to test
Ensure that studio still loads correctly - the cloud studio panel should still load when you pass the correct environment variables, and it should not when these variables are not provided.
Check the tests that I added that verify that the cloud code to collect telemetry is always called when Studio loads even if AI is not enabled.
How has the user experience changed?
Users shouldn't notice any changes to how Studio works today - the external user experience should remain unchanged.
PR Tasks
cypress-documentation
?type definitions
?