diff --git a/ee/app/assets/javascripts/remote_development/graphql/queries/get_remote_development_cluster_agents.query.graphql b/ee/app/assets/javascripts/remote_development/graphql/queries/get_remote_development_cluster_agents.query.graphql
index 18279d27a33f1779342fccca5716cc7f37af96d2..18eff19d41623bba3a5664ec6652de9ab760973d 100644
--- a/ee/app/assets/javascripts/remote_development/graphql/queries/get_remote_development_cluster_agents.query.graphql
+++ b/ee/app/assets/javascripts/remote_development/graphql/queries/get_remote_development_cluster_agents.query.graphql
@@ -1,7 +1,7 @@
query getRemoteDevelopmentClusterAgents($namespace: ID!) {
namespace(fullPath: $namespace) {
id
- remoteDevelopmentClusterAgents(filter: "AVAILABLE") @client {
+ remoteDevelopmentClusterAgents(filter: AVAILABLE) {
nodes {
id
name
diff --git a/ee/app/assets/javascripts/remote_development/pages/create.vue b/ee/app/assets/javascripts/remote_development/pages/create.vue
index 0f773a1e58ffa6abed746d453be6b43fab9eaccf..910c233f38b38f22fd7d9f3a421b4a7460d0b3d9 100644
--- a/ee/app/assets/javascripts/remote_development/pages/create.vue
+++ b/ee/app/assets/javascripts/remote_development/pages/create.vue
@@ -10,7 +10,6 @@ import {
GlFormInputGroup,
GlIcon,
GlPopover,
- GlSprintf,
GlTooltipDirective,
GlLink,
} from '@gitlab/ui';
@@ -60,7 +59,7 @@ export const i18n = {
invalidProjectAlert: {
title: s__("Workspaces|You can't create a workspace for this project"),
noAgentsContent: s__(
- "Workspaces|To create a workspace for this project, an administrator must %{linkStart}configure a cluster agent%{linkEnd} for the project's group.",
+ 'Workspaces|You must have access to a cluster agent. An administrator can configure an agent for the project or group.',
),
noDevFileContent: s__(
'Workspaces|To create a workspace, add a devfile to this project. A devfile is a configuration file for your workspace.',
@@ -76,7 +75,6 @@ export const i18n = {
),
};
-const clusterAgentsHelpPath = helpPagePath('user/clusters/agent/install/index.md');
export const devfileHelpPath = helpPagePath('user/workspace/index.md#devfile');
export default {
@@ -90,7 +88,6 @@ export default {
GlFormInput,
GlIcon,
GlPopover,
- GlSprintf,
GlLink,
RefSelector,
SearchProjectsListbox,
@@ -241,7 +238,6 @@ export default {
i18n,
ROUTES,
PROJECT_VISIBILITY,
- clusterAgentsHelpPath,
devfileHelpPath,
};
@@ -281,11 +277,7 @@ export default {
variant="danger"
:dismissible="false"
>
-
-
- {{ content }}
-
-
+ {{ $options.i18n.invalidProjectAlert.noAgentsContent }}
diff --git a/ee/spec/features/remote_development/workspaces_spec.rb b/ee/spec/features/remote_development/workspaces_spec.rb
index 4da3fa82ccab5c8641d00d0aa96f84c75674c92f..9916870ef2c2cf201e90e0687c660845f070f2ed 100644
--- a/ee/spec/features/remote_development/workspaces_spec.rb
+++ b/ee/spec/features/remote_development/workspaces_spec.rb
@@ -259,9 +259,15 @@ def simulate_agentk_reconcile_post(workspace_agent_infos:)
describe 'workspaces' do
context 'when creating' do
- # TODO Unskip feature spec once the Agent mapping GraphQL API is implemented
- # https://gitlab.com/gitlab-org/gitlab/-/issues/455214
- describe 'when the remote_development_namespace_agent_authorization feature flag is on', :skip do
+ context 'when the remote_development_namespace_agent_authorization feature flag is on' do
+ let_it_be(:cluster_agent_mapping) do
+ create(
+ :remote_development_namespace_cluster_agent_mapping,
+ user: user, agent: agent,
+ namespace: group
+ )
+ end
+
before do
stub_feature_flags(remote_development_namespace_agent_authorization: true)
end
@@ -269,7 +275,7 @@ def simulate_agentk_reconcile_post(workspace_agent_infos:)
it_behaves_like 'creates a workspace'
end
- describe 'when the remote_development_namespace_agent_authorization feature flag is off' do
+ context 'when the remote_development_namespace_agent_authorization feature flag is off' do
before do
stub_feature_flags(remote_development_namespace_agent_authorization: false)
end
diff --git a/ee/spec/frontend/remote_development/pages/create_spec.js b/ee/spec/frontend/remote_development/pages/create_spec.js
index 06ff28d8fdc914c49c2f6f79f4b3b6bc57c9d373..55ed788822596b9ae5ee55217bfa680aa2d283dc 100644
--- a/ee/spec/frontend/remote_development/pages/create_spec.js
+++ b/ee/spec/frontend/remote_development/pages/create_spec.js
@@ -240,12 +240,6 @@ describe('remote_development/pages/create.vue', () => {
});
});
- it('displays a link that navigates to the workspaces documentation', () => {
- expect(wrapper.findComponent(GlLink).attributes().href).toBe(
- '/help/user/clusters/agent/install/index.md',
- );
- });
-
it('does not display cluster agents form select group', () => {
expect(findClusterAgentsFormGroup().exists()).toBe(false);
});
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 35cc186c6ab1ee17ffa49ca06de8d5022335ab48..aa6fcf689e099b9d19625a2cd474aa93fb239bd2 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -58873,9 +58873,6 @@ msgstr ""
msgid "Workspaces|The branch, tag, or commit hash GitLab uses to create your workspace."
msgstr ""
-msgid "Workspaces|To create a workspace for this project, an administrator must %{linkStart}configure a cluster agent%{linkEnd} for the project's group."
-msgstr ""
-
msgid "Workspaces|To create a workspace, add a devfile to this project. A devfile is a configuration file for your workspace."
msgstr ""
@@ -58900,6 +58897,9 @@ msgstr ""
msgid "Workspaces|You can't create a workspace for this project"
msgstr ""
+msgid "Workspaces|You must have access to a cluster agent. An administrator can configure an agent for the project or group."
+msgstr ""
+
msgid "Workspaces|Your workspaces"
msgstr ""