Skip to content

FE: Use real agent-mapping API in Create Workspace UI

Issue: FE: Replace mock group-agent mapping GraphQL wi... (#455214 - closed)

What does this MR do and why?

  • Removes the @client annotation from the agent-mapping GraphQL query.
  • Unskip the feature spec that exercises the "Create Workspace" UI when the remote_development_namespace_agent_authorization feature flag is on.
  • Rewrites the message that appears when there aren't cluster agents available to create a workspace for a given project.

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.

Screenshots or screen recordings

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

Before After
cant_create_workspace_before.png cant_create_workspace_after.png

How to set up and validate locally

Given the complexity of setting up remote development in a local environment, I recommend testing these changes by running the feature tests locally using CHROME_HEADLESS=0 flag. Follow these instructions to use this approach:

  1. Apply the following patch. It will insert a debugging breakpoint in the feature spec.

    diff --git a/ee/spec/features/remote_development/workspaces_spec.rb b/ee/spec/features/remote_development/workspaces_spec.rb
    index 9916870ef2c2..e8daba5e45ce 100644
    --- a/ee/spec/features/remote_development/workspaces_spec.rb
    +++ b/ee/spec/features/remote_development/workspaces_spec.rb
    @@ -50,6 +50,8 @@
     
           # CREATE WORKSPACE
     
    +      live_debug
    +
           click_link 'New workspace', match: :first
           click_button 'Select a project'
           find_by_testid("listbox-item-#{project.full_path}").click
    
  2. Run the feature spec using the following command: CHROME_HEADLESS=0 bundle exec rspec ee/spec/features/remote_development/workspaces_spec.rb

  3. When the Chrome Browser opens, click New Workspace

  4. Select a project in the dropdown.

  5. Select a cluster agent.

  6. Click "Create workspace".

  7. A workspace should be created.

Edited by Enrique Alcántara

Merge request reports