Skip to content

Draft: Enable settings sync

Vishal Tak requested to merge vtak/marketplace into main

Description

  • Patch product.json in start_server.sh script to set the configuration store for settings sync of the user

References

Related MR:

Related issues:

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

Merge request reports