Investigate and break down tasks on how to configure private extensions marketplace for Self-managed users
MR: Enable VS Code private extensions marketplace f... (!147718 - merged)
Description
As a Workspace Admin, I would like to configure a custom/private Extensions Marketplace for Engineers to use.
The initial minimal work to allow configuration via ENV vars is being tracked by Enable VS Code private extensions marketplace f... (#451941 - closed)
Acceptance Criteria
-
A breakdown of technical steps that allows us do this for Self-managed users is documented -
Smaller issues on UX and Backend requirements related to the Settings module that allow us build this for Workspace Admins to do this themselves
Technical Requirements
The following requirement is copied from Add JSON support to Remote Dev Settings module (#452607 - closed):
-
proper structure of VS Code Extension Gallery settings override JSON when specified via an ENV var. E.g.:
export GITLAB_REMOTE_DEVELOPMENT_VSCODE_EXTENSIONS_GALLERY='{"service_url":"https://marketplace.visualstudio.com/_apis/public/gallery","item_url":"https://marketplace.visualstudio.com/items","resource_url_template":"https://{publisher}.vscode-unpkg.net/{publisher}/{name}/{version}/{path}"}'
-
RemoteDevelopment::Settings.get_single_setting(:vscode_extensions_gallery)
should properly retrieve it. - Misnamed/missing keys should raise an exception
- non-string values should raise an exception
-
The following variables must eventually be settable from the
GITLAB_REMOTE_DEVELOPMENT_VSCODE_EXTENSIONS_GALLERY
env var on the monolith: https://gitlab.com/gitlab-org/gitlab-web-ide-vscode-fork/-/blob/main/scripts/gl/tools-injector/gl_init_tools.sh?ref_type=heads#L28-L38GL_EDITOR_EXTENSIONS_GALLERY_SERVICE_URL
GL_EDITOR_EXTENSIONS_GALLERY_ITEM_URL
GL_EDITOR_EXTENSIONS_GALLERY_RESOURCE_URL_TEMPLATE
-
in
ee/lib/remote_development/workspaces/create/workspace_variables.rb
, add new entries for theGITLAB_REMOTE_DEVELOPMENT_VSCODE_EXTENSIONS_GALLERY
var, and default thevalue
as described above. -
See https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/lib/remote_development/README.md#remote-development-settings for naming conventions of the ENV var (e.g.
GITLAB_REMOTE_DEVELOPMENT_
...) -
Note that we are renaming
EDITOR_EXTENSIONS*
toVSCODE_EXTENSIONS_*
, and can update this in thescripts/gl/tools-injector/gl_init_tools.sh
file in the vscode fork. -
Testing values for these come from (can't make this the default, because it's not a legal production use of the official VS Code extension gallery):
cat "/Applications/Visual Studio Code.app/Contents/Resources/app/product.json"
- Search for
ExtensionsGallery
, e.g.:
"extensionsGallery": {
"nlsBaseUrl": "https://www.vscode-unpkg.net/_lp/",
"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
"cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
"itemUrl": "https://marketplace.visualstudio.com/items",
"publisherUrl": "https://marketplace.visualstudio.com/publishers",
"resourceUrlTemplate": "https://{publisher}.vscode-unpkg.net/{publisher}/{name}/{version}/{path}",
"controlUrl": "https://az764295.vo.msecnd.net/extensions/marketplace.json"
},
Design Requirements
TODO: Fill out or delete [If applicable, please provide a link to the design specifications for this feature/enhancement.]
Impact Assessment
TODO: Fill out or delete [Please describe the impact this feature/enhancement will have on the user experience and/or the product as a whole.]