Skip to content

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?

Image for: 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 settings vscode_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

Image for: Screenshots or screen recordings
Feature demo

feature_demo

Migration with flag not persisted (expect migration to noop)

enable_by_default_demo1

Migration with flag persisted (expect migration to happen)

enabled_by_default_demo2

How to set up and validate locally

Image for: 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.

  1. Start GDK and in rails console run Feature.remove(:web_ide_extensions_marketplace) and Feature.remove(:vscode_extension_marketplace_settings).
  2. Visit Admin > General > VS Code Extension Marketplace.
  3. Click the toggle to enable the extension marketplace.
  4. Visit your profile preferences and look for the Web IDE and Workspaces checkbox to enable extension marketplace.
  5. Check the enable extension marketplace and click Save changes.
  6. Visit the Web IDE and the extension marketplace should be functional.

  1. Visit Admin > General > VS Code Extension Marketplace.
  2. Click the toggle to DISABLE the extension marketplace.
  3. EXPECTATION: The Web IDE and Workspaces extension marketplace checkbox in Profile Preferences > Integrations should not be visible.
  4. Visit the Web IDE.
  5. EXPECTATION: The extension marketplace tab should show a disabled message.
Migration with flag not persisted (expect migration to noop)
  1. Start GDK
  2. Revert feature_flag_to_data migration bin/rails db:migrate:down:main VERSION=20250228183319.
  3. In a rails console rails c, reset application settings with Gitlab::CurrentSettings.update(vscode_extension_marketplace: {}).
  4. In a rails console rails c, remove feature flag from db with Feature.remove(:web_ide_extensions_marketplace).
  5. Rerun feature_flag_to_data migration bin/rails db:migrate:up:main VERSION=20250228183319.
  6. EXPECTATION: In a rails console rails c, confirm that the Gitlab::CurrentSettings.vscode_extension_marketplace is unchanged.
Migration with flag persisted (expect migration to happen)
  1. Start GDK
  2. Revert feature_flag_to_data migration bin/rails db:migrate:down:main VERSION=20250228183319.
  3. In a rails console rails c, reset application settings with Gitlab::CurrentSettings.update(vscode_extension_marketplace: {}).
  4. In a rails console rails c, add feature flag to db with Feature.enable(:web_ide_extensions_marketplace).
  5. Rerun feature_flag_to_data migration bin/rails db:migrate:up:main VERSION=20250228183319.
  6. EXPECTATION: In a rails console rails c, confirm that the Gitlab::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

Image for: 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.

Edited by Paul Slaughter

Merge request reports

Image for: Merge request reports
Loading