[go: up one dir, main page]

Skip to content

[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:

  1. Access-Control-Allow-Origin set to the Web IDE assets host origin.
  2. Access-Control-Allow-Methods
    1. get for /info/refs
    2. options post for /git-uploadpack
  3. Access-Control-Allow-Header Set to Authorization to 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

Screenshots or screen recordings

There aren't user-facing changes in this MR.

How to set up and validate locally

  1. Set the following configuration in your gdk.yml file:

    workhorse:
      skip_compile: false
  2. Run gdk reconfigure && gdk restart .

  3. Run cd <gdk-dir>/gitlab/workhorse .

  4. Run make && gdk restart gitlab-workhorse.

  5. Run rails c

  6. Update the vscode_extension_marketplace_extension_host_domain application setting introduced in this MR with the domain that you use to test the Web IDE. For example, I set up web-ide.test in my local environment and the update expression is: Gitlab::CurrentSettings.update!({ vscode_extension_marketplace_extension_host_domain: 'web-ide.test' } .

  7. 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.

Edited by Enrique Alcántara

Merge request reports

Loading