Skip to content

Conversation

@ryanthemanuel
Copy link
Collaborator

@ryanthemanuel ryanthemanuel commented Dec 1, 2025

Additional details

The existing error when the cy.prompt bundle is prematurely deleted off disk is less than helpful. It's also possible that we are deleting the bundle while other Cypress instances are accessing it. This PR:

  • Updates the error message to provide more guidance about what to do if the cy.prompt bundle is no longer properly available
  • Ensures that writes for the bundles are done atomically so there is no chance of code being stomped on.

Steps to test

How has the user experience changed?

PR Tasks


Note

Atomically downloads/extracts Cloud bundles (Studio and cy.prompt) to prevent concurrent write issues and adds safer cy.prompt init with a new refresh error; includes tests and dependency update.

  • Backend (Cloud bundles):
    • Added extractAtomic to write tar entries atomically via write-file-atomic.
    • Updated ensureCyPromptBundle and ensureStudioBundle to:
      • Download to a unique bundle.tar-<random> path, extract via extractAtomic, then remove temp file.
      • Stop deleting the target directory pre-extract.
    • Added dependency [email protected].
  • Driver (cy.prompt):
    • Wrap module federation init/load in try/catch; on failure throw prompt.promptBundleNeedsRefresh.
    • Introduced new error message promptBundleNeedsRefresh in error_messages.
  • Tests:
    • New unit and integration tests for extractAtomic and updated bundle ensure flows (cy-prompt and studio).
  • Docs/Changelog:
    • CHANGELOG bugfix entry describing atomic bundle writes and updated cy.prompt() error.

Written by Cursor Bugbot for commit c08155f. This will update automatically on new commits. Configure here.

@ryanthemanuel ryanthemanuel self-assigned this Dec 1, 2025
@cypress
Copy link

cypress bot commented Dec 1, 2025

cypress    Run #67660

Run Properties:  status check passed Passed #67660  •  git commit c08155f4eb: Update cli/CHANGELOG.md
Project cypress
Branch Review ryanm/chore/slight-refactor-for-ensuring-bundles
Run status status check passed Passed #67660
Run duration 19m 04s
Commit git commit c08155f4eb: Update cli/CHANGELOG.md
Committer Ryan Manuel
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 14
Tests that did not run due to a developer annotating a test with .skip  Pending 1097
Tests that did not run due to a failure in a mocha hook  Skipped 4
Tests that passed  Passing 26698
View all changes introduced in this branch ↗︎

Warning

Partial Report: The results for the Application Quality reports may be incomplete.

UI Coverage  45.89%
  Untested elements 186  
  Tested elements 162  
Accessibility  98%
  Failed rules  4 critical   8 serious   2 moderate   2 minor
  Failed elements 101  

@ryanthemanuel ryanthemanuel changed the title chore: refactor cy.prompt/studio bundle code downloads fix: concurrent cy.prompt() and Studio bundle download issues Dec 1, 2025
@ryanthemanuel ryanthemanuel requested a review from mschile December 1, 2025 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants