Skip to content

Draft: Codespaces

Jacob Sapoznikow requested to merge (removed):feat/plugins-and-codespaces into master

What does this MR do and why?

Describe in detail what your merge request does and why.

This is the merge request for #353316 (closed).

This will add support for codespaces-like IDEs as well as the built-in GitLab IDE. The reason I am keeping the built-in IDE in is because some people may want a fast, lightweight, development environment. Here are the criteria:

IDE Criteria

  • Spawn a dev environment with the click of a button (in a repo, like the vscode button).
  • This will run in a Docker container on a Docker runner.
  • This will be available in Free, Premium, and Ultimate versions of GitLab.
  • This will automatically clone the repo and provide full access to a Docker container.
  • This will use Eclipse Theia, Code Server, or OpenVSCode Server. I personally use Code Server when doing remote development, but OpenVSCode Server is better. I don't like Eclipse Theia much.
  • Running this IDE will count as CI minutes, as it is on a runner.
  • The IDE will have a limited amount of power and certain processes will be killed if they take too long.
  • The IDE will have it's modified content saved (stuff that's in the /workspace directory) and it will be shut down if it has been closed for too long.
  • The IDE will be able to be re-opened with it's previous content after it is closed by inactivity.
  • Allowing people to use IDEs will be configured (including enabling/disabling IDEs) in the gitlab.rb config and in the admin settings panel.
  • The existing Web IDE will be left in. The reason I am keeping the built-in IDE in is because some people may want a fast, lightweight, development environment.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

This has been created, and some changes have been made, but not enough yet.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Unknown. What I do know is that there will be multiple feature flags:

  1. Enable the normal web IDE
Feature.enable(:web_ide)
  1. Enable IDEs
Feature.enable(:codespaces)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

  • I have evaluated the MR acceptance checklist for this MR.
  • Add button in admin panel for Web IDEs.
  • Design configuration in admin panel for Web IDEs. (Needs bug fixing)
  • Add feature flags in Ruby.
  • Create multi-arch Docker images for the web IDE. (In progress, using docker buildx)
  • Add configuration file into repositories for web IDEs. (Probably .gitlab/ide.yml)
  • Create button in repositories for opening in the web IDE.
  • Run IDEs in Docker runners.
  • Allow ports to be published in web IDEs (like GitPod).
  • Allow custom docker images for web IDEs.
  • Allow disabling web IDEs for orginizations.
  • Allow disabling web IDEs in repositories.
  • Allow self-hosted and shared runners to host web IDEs.
  • In kubernetes installations, run web IDEs in pods.
  • Non-docker IDE for easier access without using CI minutes (like https://vscode.dev)
  • Headless IDE that connects to the non-docker IDE for people who want a more complete development environment.
Edited by Jacob Sapoznikow

Merge request reports