Enable extension marketplace by default
Issue: [Feature flag] Rollout of `vscode_extension_mar... (#508996 - closed)
Depends on: FE for vscode extension marketplace settings (!184207 - merged)
Depends on: Check marketplace_home_url with user opt in (!184569 - merged)
What does this MR do and why?
1 - Feature flag enablement
This MR enables the following feature flags:
-
web_ide_extensions_marketplace
old flag initially used to iteratively release the feature targeted towards.com
. Some self-managed instances have enabled this flag. Everything is hardcoded to Open VSX. -
vscode_extension_marketplace_settings
new flag which integrates application settingsvscode_extension_marketplace
with the Web IDE (replacing the hardcoded-Open-VSX behavior).
It's easier for us to to enable/remove these flags together than deal with weird in-between phases. There's also a requirement for us to gracefully migrate any instance that has explicitly opted into web_ide_extensions_marketplace
. The out-of-the-box behavior is for the marketplace to be disabled, but for these early adopting instances we'd like them to not have any disruption.
2 - Check for persistence in db migration
There's a requirement for us to gracefully migrate any instance that has explicitly opted into web_ide_extensions_marketplace
. We introduced a db migration to handle this, but now we need to change for not only feature flag enablement, but also persistence since the flag is not enabled by default.
Please note: these flags are slated to be removed after the next required hard stop. #459028 (comment 2374068840)
Screenshots or screen recordings
Feature demo
Migration with flag not persisted (expect migration to noop)
Migration with flag persisted (expect migration to happen)
How to set up and validate locally
PLEASE NOTE: This also considers the changes from FE for vscode extension marketplace settings (!184207 - merged)
Feature smoke testing
NOTE: GitLab heavily caches things from application settings, so sometimes it takes a couple of refreshes for changes to take effect.
- Start GDK and in rails console run
Feature.remove(:web_ide_extensions_marketplace)
andFeature.remove(:vscode_extension_marketplace_settings)
. - Visit Admin > General > VS Code Extension Marketplace.
- Click the toggle to enable the extension marketplace.
- Visit your profile preferences and look for the Web IDE and Workspaces checkbox to enable extension marketplace.
- Check the enable extension marketplace and click Save changes.
- Visit the Web IDE and the extension marketplace should be functional.
- Visit Admin > General > VS Code Extension Marketplace.
- Click the toggle to DISABLE the extension marketplace.
- EXPECTATION: The
Web IDE and Workspaces
extension marketplace checkbox in Profile Preferences > Integrations should not be visible. - Visit the Web IDE.
- EXPECTATION: The extension marketplace tab should show a disabled message.
Migration with flag not persisted (expect migration to noop)
- Start GDK
- Revert feature_flag_to_data migration
bin/rails db:migrate:down:main VERSION=20250228183319
. - In a rails console
rails c
, reset application settings withGitlab::CurrentSettings.update(vscode_extension_marketplace: {})
. - In a rails console
rails c
, remove feature flag from db withFeature.remove(:web_ide_extensions_marketplace)
. - Rerun feature_flag_to_data migration
bin/rails db:migrate:up:main VERSION=20250228183319
. - EXPECTATION: In a rails console
rails c
, confirm that theGitlab::CurrentSettings.vscode_extension_marketplace
is unchanged.
Migration with flag persisted (expect migration to happen)
- Start GDK
- Revert feature_flag_to_data migration
bin/rails db:migrate:down:main VERSION=20250228183319
. - In a rails console
rails c
, reset application settings withGitlab::CurrentSettings.update(vscode_extension_marketplace: {})
. - In a rails console
rails c
, add feature flag to db withFeature.enable(:web_ide_extensions_marketplace)
. - Rerun feature_flag_to_data migration
bin/rails db:migrate:up:main VERSION=20250228183319
. - EXPECTATION: In a rails console
rails c
, confirm that theGitlab::CurrentSettings.vscode_extension_marketplace
has been updated to{ enabled: true, preset: 'open_vsx' }
. You might need to reload the current settings to get passed the cache.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.