Prevent different Web IDE Extensions Marketplace contexts from overwriting Settings Sync store
## Description Currently, Web IDE settings/configurations are persisted in the backend per user. With the introduction of Instance/Group level settings for Extensions Marketplace, there are cases where: * Extensions Marketplace can be enabled/disabled at a group level * Extensions Marketplace URL can differ across groups and instances. We want to prevent the following due to security and UX purposes: * A user's extensions getting uninstalled when visiting a project that belongs to a group with extensions disabled. * A user's extensions being **invalid** when visiting a project that uses a different extension marketplace. To do so we need to separate extensions sync data based on user and the extensions marketplace settings. ## High Level Implementation Plan * Currently, the Settings Sync API has no context of the extensions marketplace settings. We will create a hash of the extensions marketplace settings and pass this to the Settings Sync URL as a route parameter. This prevents making modifications to the VSCode fork. * The `vs_code_settings` table will now store multiple **extensions** settings per user and unique `settings_context_hash`. We continue to expect only one record per user for other settings. We will need to update the schema as well as the API logic to account for this new change. ## Requirements **Setup**: * `group-a` has extensions marketplace disabled. * `group-b` and `group-c` have extensions marketplace enabled and goes to `openvsx.org`. * `group-d` has extensions marketplace enabled and goes to `marketplace.example.com`. **Use Case 1 - Extensions do not follow across differently configured Web IDE sessions:** * Given the User visits Web IDE at `group-b/proj` * And the User installs extensions ‘vim’ and ‘dracula’ * When the User visits Web IDE at `group-d/proj` * Then no extensions should not be installed **Use Case 2 - Extensions are recovered whenever visiting a similarly configured Web IDE session:** * Given the User visits Web IDE at `group-b/proj` * And the User installs extensions `vim` and `dracula` * And the User visits Web IDE at `group-d/proj` * And the User installs extensions `python` * When the User visits Web IDE at `group-c/proj` * Then only the extensions `vim` and `dracula` should be installed. **Use Case 3 - Non-extension configuration should persist across all Web IDE sessions:** * Given the User visits Web IDE at `group-a/proj` * And the User sets the Web IDE theme to `high-contrast` * When the User visits Web IDE at `group-d/proj` * Then the User’s Web IDE theme should load as `high-contrast`
epic