Skip to content

Workspace create follow-up

Enrique Alcántara requested to merge 407642-workspace-create-follow-up into master

What does this MR do and why?

This is a follow-up to the Workspace Creation Merge Request. It contains the following changes:

  • It fetches cluster agents from the project’s root group.
  • It sends all the required parameters to the workspaceCreate mutation.
  • It changes how we handle a missing devfile file. The UI won’t allow creating a devfile if it is missing.
  • When a workspace is created, it navigates to the Workspaces list.
    Why are we making this change?
    It doesn’t make sense to open the workspace after it is created because the workspace might not be ready yet (in Running state).

After this change, the Workspace Creation UI works with the real backend API implemented in !105783 (merged)

Screenshots or screen recordings

There are two user-facing changes implemented in this Merge Request:

  1. Devfiles are required on a project.
  2. The UI redirects the user to the Workspaces List after a workspace is created.
No devfile before No devfile after
nodevfile_before nodevfile_after

How to set up and validate locally

Testing the devfile validation

  1. Enable the remote development flag

    Feature.enable(:remote_development_feature_flag)
  2. Ensure you have a valid Ultimate License for your GDK instance.

  3. After checking out the branch, you might need to restart the GDK rails server: gdk restart rails.

  4. Visit "Your Dashboard" i.e. http://localhost:3000/.

  5. Click the Workspaces sidebar entry under "My Work".

  6. Click the New Workspace button.

  7. Interact with the Workspace form.

Creating a workspace

To test that a Workspace is created successfully, you will need to test these changes in the Remote Development MVC branch: !105783 (merged). Setting up your local environment to run the Remote Development MVC is not an easy feat. You can follow the instructions here: https://gitlab.com/gitlab-org/remote-development/gitlab-remote-development-docs/-/blob/main/doc/local-development-environment-setup.md

I’m also super open to have a pairing session and test these changes together to make a more efficient use of our time.

MR acceptance checklist

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

Related to #407642 (closed)

Edited by Enrique Alcántara

Merge request reports