Draft: Enable settings sync
Description
- Patch product.json in start_server.sh script to set the configuration store for settings sync of the user
References
- https://github.com/eclipse/openvsx/wiki/Using-Open-VSX-in-VS-Code
- https://gitlab.com/gitlab-org/gitlab-web-ide/-/blob/418d7010711fe0f87f62107b33f8fa37dbc00218/packages/vscode-bootstrap/src/start.ts#L278
Related MR:
Related issues:
- Enable extensions in the Web IDE injected into ... (gitlab#436398 - closed)
- Investigation: Settings Sync in Workspace VSCode (gitlab#437097 - closed)
How to test locally
- Add the following value in the root object in
product.json
"configurationSync.store": {
"url": "http://gdk.test:3000/api/v4/vscode/settings_sync",
"insidersUrl": "http://gdk.test:3000/api/v4/vscode/settings_sync",
"stableUrl": "http://gdk.test:3000/api/v4/vscode/settings_sync",
"canSwitch": false,
"authenticationProviders": {
"gitlab": {
"scopes": ["api"]
}
}
}
- Create a PAT in your GDK and paste the value to a file e.g.
test/GL_TOKEN
- Run the following command
GL_TOKEN_FILE_PATH="/Users/vishaltak/dev/gitlab-org/gitlab-web-ide-vscode-fork/test/GL_TOKEN" GL_USER_EMAIL="admin@example.com" GL_GITLAB_URL="http://gdk.test:3000" scripts/code-server.sh
- If you make any changes to the code, remove the cache by running
rm -rf out/
and rerun the above command - Open the VS Code URL
- Click on "User" icon on bottom left
- Click on "Turn Settings Sync on"
- Select the account
- Success!
Edited by Vishal Tak