Skip to content

Allow tools_injector_image to be overridden via Settings

Chad Woolley requested to merge caw-add-tools-inject-image-to-settings into master

Issue: Allow editor and project cloner images and tags... (#438767 - closed)

What does this MR do and why?

Add tools_injector_image to RD Settings, so it can be overridden via GITLAB_REMOTE_DEVELOPMENT_TOOLS_INJECTOR_IMAGE, and optionally via CurrentSettings or other ways in the future.

See Introduce Remote Dev Settings module (!144518 - merged) and https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/lib/remote_development/README.md#remote-development-settings for contexts on how the Settings Module works.

This MR implements the final piece of Allow editor and project cloner images and tags... (#438767 - closed), adding support for overriding the tools injector image. The other var in that issue, for project cloner image, was already added as part of the MR which introduced the settings module.

Other changes in this MR:

  • Some cleanup to the class, adding named arguments
  • Cleanup and refactors to use fast_spec_helper, by isolating and mocking the temporary feature flag code which is all that was coupling this class to the rest of the monolith.
  • Fixes some typos in the README
  • Switches some of the existing tests to use the remote development version of fast_spec_helper rather than the global one.

MR acceptance checklist

  • Tools injector image can be overridden

How to set up and validate locally

  1. export the ENV var to override: export GITLAB_REMOTE_DEVELOPMENT_TOOLS_INJECTOR_IMAGE='registry.gitlab.com/gitlab-org/gitlab-web-ide-vscode-fork/web-ide-injector:8' (7 and 9 are the possible default values). Or use another one.
  2. gdk restart in the same terminal you exported the var
  3. create a workspace
  4. Inspect the processed_devfile in the new workspace's DB record to ensure it contains the value you overrode.
Edited by Chad Woolley

Merge request reports