Skip to content

Remove references for editor field on workspaces

Daniyal Arshad requested to merge da-drop-editor-field-from-workspaces into master

Issue: Drop editor field in workspaces table as it is ... (#486301 - closed)

What does this MR do and why?

Why this is needed?
As part of the renaming plan for the VSCode fork injected into workspaces, we want to remove the editor field from workspaces.

The renaming plan intends to differentiate between the Web IDE on Gitlab and the IDE (VSCode fork) inside a workspace

The editor field defaults to webide which is not accurate and could be confused with the Gitlab Web IDE. Since this field does not serve a purpose at the moment. We want to remove it entirely Discussion note

So as a first step for removing a column according to database documentation Dropping columns

  • With this MR we are adding the ignore rule and removing references for the editor field in code.

What it does?
This MR removes code references including

  • model validations
  • specs / factory attribute
  • graphql type / mutation
  • frontend constant and param for workspace create mutation

It also introduces these changes

  • Adds an ignore rule which should be removed in release M+2 (17.7) and updates the graphql documentation.
  • Adds a regular migration to add a default value on the editor column (We need this because this column has a NOT NULL constraint but does not have a default value. It always defaults to webide which was previously set in the application code)

Changelog: changed
EE: true

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Acceptance Criteria

  • Ignore editor column in the RemoteDevelopment::Workspace model
  • Remove reference for the editor column in application code
  • Migration to add default value for editor column
  • Create follow up MR in release M+1 for dropping the column

Follow up MR: Drop the editor field from the workspaces table (!167823 - merged)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

This MR does not contain any UI changes

How to set up and validate locally

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

  • Setup workspaces locally following this guide
  • Checkout this branch and run the migration rails db:migrate:main in the terminal
  • Navigate to http://gdk.test:3000/-/remote_development/workspaces/ and create a new workspace
  • In rails console or any SQL client check that the new workspace has been created with the editor field is still set to webide
  • Make sure the workspace is correctly provisioned and has the Running status, open the workspace from the Preview url and test to make sure that the VS Code fork loads without issues
  • Optional: Run some commands in the terminal in the workspace to make sure everything is working
  • Finally terminate the workspace to ensure that it is stopped without any issues.
Edited by Daniyal Arshad

Merge request reports

Loading