Skip to content
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

Support migrating storage for extensions adopting pre-release #140088

Closed
sandy081 opened this issue Jan 4, 2022 · 5 comments
Closed

Support migrating storage for extensions adopting pre-release #140088

sandy081 opened this issue Jan 4, 2022 · 5 comments
Assignees
Labels
extensions Issues concerning extensions feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@sandy081
Copy link
Member

sandy081 commented Jan 4, 2022

Support migrating storage for extensions adopting pre-release

Migration includes following:

  • Uninstall the nightly/insiders extension
  • Install (with optional storage migration) the Pre-release extension only if
    • it is not installed
    • or it is a release version and the nightly/insiders extension is enabled.
@sandy081 sandy081 added feature-request Request for new features or functionality extensions Issues concerning extensions labels Jan 4, 2022
@sandy081 sandy081 added this to the January 2022 milestone Jan 4, 2022
@sandy081 sandy081 self-assigned this Jan 4, 2022
@sandy081
Copy link
Member Author

sandy081 commented Jan 11, 2022

@joyceerhl added following embedder API to support extension storage migration

type MarketplaceExtension = ExtensionId | { readonly id: ExtensionId, preRelease?: boolean, migrateStorageFrom?: ExtensionId };

This will be available from tomorrow's insiders

@joyceerhl
Copy link
Contributor

joyceerhl commented Jan 11, 2022

Tested migrateStorageFrom API in Code-OSS + vscode.dev + RemoteHub, migration works like a charm and uncommitted changes in RemoteHub workspaces are preserved. Here's what I did to verify that the API works as expected:

  1. Reset VS Code web storage (since storage migration is only done once and skipped thereafter)
  2. Start Code-OSS web out of sources
  3. Start vscode.dev out of sources bundling GitHub.remotehub-insiders
  4. Make a change to a file in the microsoft/vscode repo using GitHub.remotehub-insiders
  5. Apply change to vscode.dev to bundle prerelease GitHub.remotehub and migrateStorageFrom GitHub.remotehub-insiders
  6. Reload vscode.dev
  7. Verify that the change made in step 4 is still there
  8. Verify that pre-release of GitHub.remotehub is installed, not GitHub.remotehub-insiders

Will repeat this tomorrow with the VS Code Insiders build, but so far looking good. Thanks for the quick turnaround on this!

sandy081 added a commit that referenced this issue Jan 11, 2022
- introduce migration list api in IExtensionStorageService
- Use the list to migrate storage from main thread storage
sandy081 added a commit that referenced this issue Jan 11, 2022
@joyceerhl
Copy link
Contributor

API is looking good in Insiders with the following steps:

  1. Start vscode.dev out of sources bundling GitHub.remotehub-insiders
  2. Access vscode.dev/github/microsoft/vscode?vscode-quality=insiders
  3. Make a change to a file (and repeat steps 2 and 3 with a couple more repos for completeness)
  4. Apply change to vscode.dev to bundle prerelease GitHub.remotehub and migrateStorageFrom GitHub.remotehub-insiders
  5. Reload vscode.dev
  6. Verify that the change made in step 3 is still there and that all other changes are accessible from Remote Explorer
  7. Verify that pre-release of GitHub.remotehub is installed, not GitHub.remotehub-insiders

sandy081 added a commit that referenced this issue Jan 12, 2022
@sandy081 sandy081 added the verification-needed Verification of issue is requested label Jan 24, 2022
@sandy081
Copy link
Member Author

@joyceerhl Can you please verify this or mark this verified as you adopted this?

@joyceerhl joyceerhl added the verified Verification succeeded label Jan 24, 2022
@joyceerhl
Copy link
Contributor

Marked as verified since I have adopted this in vscode.dev as of two weeks ago.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extensions Issues concerning extensions feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants