[Rails][POC] Web IDE Fast File system based on Private Origin File System
Issue: [WebIDE] [POC] Explore using origin private fil... (gitlab-web-ide#499 - closed)
What does this MR do and why?
It adds CORS headers to the following endpoints:
'/info/refs''/git-upload-pack'
These endpoints implement the git HTTP protocol used to perform git operations over HTTP. The Merge Request adds the following CORS headers to these endpoints' HTTP response:
-
Access-Control-Allow-Originset to the Web IDE assets host origin. -
Access-Control-Allow-Methods-
getfor/info/refs -
options postfor/git-uploadpack
-
-
Access-Control-Allow-HeaderSet toAuthorizationto authenticate requests to protected repositories.
Why
We are exploring the implementation of a full-fledged file system and git client in the Web IDE using the Origin Private File System API and isomorphic-git. Rather than building an in-memory file tree, the new file system performs a git clone operation over HTTP and stores the files in a secure, high performant file system that it's only accessible to a single origin.
References
- [WebIDE] [POC] Explore using origin private fil... (gitlab-web-ide#499 - closed)
- Adding CORS headers for git clone and push (#20590)
Screenshots or screen recordings
There aren't user-facing changes in this MR.
How to set up and validate locally
-
Set the following configuration in your
gdk.ymlfile:workhorse: skip_compile: false -
Run
gdk reconfigure && gdk restart. -
Run
cd <gdk-dir>/gitlab/workhorse. -
Run
make && gdk restart gitlab-workhorse. -
Run
rails c -
Update the
vscode_extension_marketplace_extension_host_domainapplication setting introduced in this MR with the domain that you use to test the Web IDE. For example, I set upweb-ide.testin my local environment and the update expression is:Gitlab::CurrentSettings.update!({ vscode_extension_marketplace_extension_host_domain: 'web-ide.test' }. -
Run
gdk restart rails-web
Follow the instructions in gitlab-web-ide!536 (closed) to test the OPFS file system in the Web IDE example server.
Use the instructions in the Merge Request gitlab-web-ide!536 (closed) to test these changes.
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.