From 18292c2bfbb4daa755f607292a663287b0d4b5d9 Mon Sep 17 00:00:00 2001
From: Dzmitry Meshcharakou <12459192-dmeshcharakou@users.noreply.gitlab.com>
Date: Fri, 17 May 2024 15:19:17 +0200
Subject: [PATCH 1/2] Remove `google_cloud_support_feature_flag` feature flag
This commit removes the `google_cloud_support_feature_flag` feature flag
to enable the features Provisioning runners in Google Cloud, Google
Cloud workload identity federation and IAM policies, and Google Artifact
Management are available for all users on GitLab.com.
Changelog: added
---
.../registration_instructions.vue | 9 +---
.../group_new_runner/group_new_runner_app.vue | 5 ---
.../project_new_runner_app.vue | 5 ---
doc/api/graphql/reference/index.md | 8 ++--
doc/api/integrations.md | 15 ++++---
.../runners/provision_runners_google_cloud.md | 4 +-
doc/ci/yaml/index.md | 4 +-
doc/integration/google_cloud_iam.md | 4 +-
.../google_artifact_management.md | 4 +-
.../ee/groups/runners_controller.rb | 2 -
.../ee/projects/runners_controller.rb | 15 -------
.../artifact_registry_controller.rb | 2 +-
ee/app/graphql/ee/types/group_type.rb | 5 +--
ee/app/graphql/ee/types/project_type.rb | 10 ++---
.../artifact_registry/repository_type.rb | 3 +-
ee/app/helpers/ee/packages_helper.rb | 2 +-
ee/app/models/ee/group.rb | 4 --
ee/app/models/ee/project.rb | 6 +--
.../artifact_registry.rb | 2 +-
.../workload_identity_federation.rb | 4 +-
...google_cloud_provisioning_steps_service.rb | 7 ---
.../artifact_registry/base_project_service.rb | 4 --
.../google_cloud/compute/base_service.rb | 4 --
.../google_cloud_support_feature_flag.yml | 9 ----
.../api/project_google_cloud_integration.rb | 3 +-
ee/lib/ee/gitlab/ci/yaml_processor.rb | 10 -----
.../menus/packages_registries_menu.rb | 2 +-
ee/spec/features/projects/navbar_spec.rb | 1 -
ee/spec/helpers/ee/packages_helper_spec.rb | 6 +--
.../menus/packages_registries_menu_spec.rb | 8 ----
ee/spec/lib/gitlab/ci/yaml_processor_spec.rb | 11 -----
.../projects/super_sidebar_panel_spec.rb | 2 +-
ee/spec/models/ee/group_spec.rb | 22 ----------
ee/spec/models/ee/project_spec.rb | 44 -------------------
.../workload_identity_federation_spec.rb | 16 -------
.../artifact_registry/docker_image_spec.rb | 8 ----
.../artifact_registry/docker_images_spec.rb | 8 ----
.../runner_google_cloud_provisioning_spec.rb | 8 ----
ee/spec/requests/api/integrations_spec.rb | 18 --------
.../project_google_cloud_integration_spec.rb | 12 -----
.../artifact_registry_controller_spec.rb | 8 ----
...e_cloud_provisioning_steps_service_spec.rb | 12 -----
.../services_shared_examples.rb | 9 ----
.../compute/services_shared_examples.rb | 8 ----
locale/gitlab.pot | 3 --
.../registration_instructions_spec.js | 25 -----------
.../runner_platforms_radio_group_spec.js | 15 +------
.../group_register_runner_app_spec.js | 7 +--
.../project_register_runner_app_spec.js | 7 +--
49 files changed, 40 insertions(+), 370 deletions(-)
delete mode 100644 ee/app/controllers/ee/projects/runners_controller.rb
delete mode 100644 ee/config/feature_flags/beta/google_cloud_support_feature_flag.yml
diff --git a/app/assets/javascripts/ci/runner/components/registration/registration_instructions.vue b/app/assets/javascripts/ci/runner/components/registration/registration_instructions.vue
index d9d997d7f008ac..a88c0046a9dc4e 100644
--- a/app/assets/javascripts/ci/runner/components/registration/registration_instructions.vue
+++ b/app/assets/javascripts/ci/runner/components/registration/registration_instructions.vue
@@ -143,13 +143,8 @@ export default {
isRunnerOnline() {
return this.runner?.status === STATUS_ONLINE;
},
- showGoogleCloudPlatformOption() {
- return this.glFeatures?.googleCloudSupportFeatureFlag;
- },
showGoogleCloudRegistration() {
- return (
- this.glFeatures?.googleCloudSupportFeatureFlag && this.platform === GOOGLE_CLOUD_PLATFORM
- );
+ return this.platform === GOOGLE_CLOUD_PLATFORM;
},
},
watch: {
@@ -196,7 +191,7 @@ export default {
{{ s__('Runners|Platform') }}
-
+
diff --git a/app/assets/javascripts/ci/runner/group_new_runner/group_new_runner_app.vue b/app/assets/javascripts/ci/runner/group_new_runner/group_new_runner_app.vue
index 3cf6d4e4969e97..e1bbf4d5e8c20f 100644
--- a/app/assets/javascripts/ci/runner/group_new_runner/group_new_runner_app.vue
+++ b/app/assets/javascripts/ci/runner/group_new_runner/group_new_runner_app.vue
@@ -25,11 +25,6 @@ export default {
platform: DEFAULT_PLATFORM,
};
},
- computed: {
- googleCloudProvisioningEnabled() {
- return this.glFeatures.googleCloudSupportFeatureFlag;
- },
- },
methods: {
onSaved(runner) {
this.trackEvent('click_create_group_runner_button');
diff --git a/app/assets/javascripts/ci/runner/project_new_runner/project_new_runner_app.vue b/app/assets/javascripts/ci/runner/project_new_runner/project_new_runner_app.vue
index 6baa9cd78d4ba5..d2f6cb1e30b97b 100644
--- a/app/assets/javascripts/ci/runner/project_new_runner/project_new_runner_app.vue
+++ b/app/assets/javascripts/ci/runner/project_new_runner/project_new_runner_app.vue
@@ -25,11 +25,6 @@ export default {
platform: DEFAULT_PLATFORM,
};
},
- computed: {
- googleCloudProvisioningEnabled() {
- return this.glFeatures.googleCloudSupportFeatureFlag;
- },
- },
methods: {
onSaved(runner) {
this.trackEvent('click_create_project_runner_button');
diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md
index f681932ef6ac9d..01153afe18a508 100644
--- a/doc/api/graphql/reference/index.md
+++ b/doc/api/graphql/reference/index.md
@@ -21106,7 +21106,7 @@ Represents a repository of Google Artifact Registry.
##### `GoogleCloudArtifactRegistryRepository.artifacts`
-Google Artifact Registry repository artifacts. Returns `null` if `google_cloud_support_feature_flag` feature flag is disabled or GitLab.com feature is unavailable.
+Google Artifact Registry repository artifacts. Returns `null` if GitLab.com feature is unavailable.
Returns [`GoogleCloudArtifactRegistryArtifactConnection`](#googlecloudartifactregistryartifactconnection).
@@ -22167,7 +22167,7 @@ four standard [pagination arguments](#pagination-arguments):
##### `Group.runnerCloudProvisioning`
-Information used for provisioning the runner on a cloud provider. Returns `null` if `:google_cloud_support_feature_flag` feature flag is disabled, or the GitLab instance is not a SaaS instance.
+Information used for provisioning the runner on a cloud provider. Returns `null` if the GitLab instance is not a SaaS instance.
DETAILS:
**Introduced** in GitLab 16.10.
@@ -26857,7 +26857,7 @@ Represents generic policy violation information.
| `forkingAccessLevel` | [`ProjectFeatureAccess`](#projectfeatureaccess) | Access level required for forking access. |
| `forksCount` | [`Int!`](#int) | Number of times the project has been forked. |
| `fullPath` | [`ID!`](#id) | Full path of the project. |
-| `googleCloudArtifactRegistryRepository` **{warning-solid}** | [`GoogleCloudArtifactRegistryRepository`](#googlecloudartifactregistryrepository) | **Introduced** in GitLab 16.10. **Status**: Experiment. Google Artifact Registry repository. Returns `null` if `google_cloud_support_feature_flag` feature flag is disabled, or the GitLab instance is not a SaaS instance. |
+| `googleCloudArtifactRegistryRepository` **{warning-solid}** | [`GoogleCloudArtifactRegistryRepository`](#googlecloudartifactregistryrepository) | **Introduced** in GitLab 16.10. **Status**: Experiment. Google Artifact Registry repository. Returns `null` if the GitLab instance is not a SaaS instance. |
| `grafanaIntegration` | [`GrafanaIntegration`](#grafanaintegration) | Grafana integration details for the project. |
| `group` | [`Group`](#group) | Group of the project. |
| `hasJiraVulnerabilityIssueCreationEnabled` | [`Boolean!`](#boolean) | Indicates whether Jira issue creation from vulnerabilities is enabled. |
@@ -28199,7 +28199,7 @@ four standard [pagination arguments](#pagination-arguments):
##### `Project.runnerCloudProvisioning`
-Information used for provisioning the runner on a cloud provider. Returns `null` if `:google_cloud_support_feature_flag` feature flag is disabled, or the GitLab instance is not a SaaS instance.
+Information used for provisioning the runner on a cloud provider. Returns `null` if the GitLab instance is not a SaaS instance.
DETAILS:
**Introduced** in GitLab 16.9.
diff --git a/doc/api/integrations.md b/doc/api/integrations.md
index fa5a7705e3056b..c66f79f43791a3 100644
--- a/doc/api/integrations.md
+++ b/doc/api/integrations.md
@@ -895,13 +895,14 @@ GET /projects/:id/integrations/hangouts-chat
## Google Artifact Management
DETAILS:
+**Tier:** Free, Premium, Ultimate
**Offering:** GitLab.com
**Status:** Beta
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/425066) in GitLab 16.9 as a [beta](../policy/experiment-beta-support.md) feature [with a flag](../administration/feature_flags.md) named `google_cloud_support_feature_flag`. Disabled by default.
+> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/150472) in GitLab 17.1. Feature flag `google_cloud_support_feature_flag` removed.
-FLAG:
-On GitLab.com, this feature is not available. This feature is not ready for production use.
+This feature is in [beta](../policy/experiment-beta-support.md).
### Set up Google Artifact Management
@@ -937,11 +938,15 @@ GET /projects/:id/integrations/google-cloud-platform-artifact-registry
## Google Cloud Identity and Access Management (IAM)
+DETAILS:
+**Tier:** Free, Premium, Ultimate
+**Offering:** GitLab.com
+**Status:** Beta
+
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/439200) in GitLab 16.10 as a [beta](../policy/experiment-beta-support.md) feature [with a flag](../administration/feature_flags.md) named `google_cloud_support_feature_flag`. Disabled by default.
+> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/150472) in GitLab 17.1. Feature flag `google_cloud_support_feature_flag` removed.
-FLAG:
-On GitLab.com, this feature is not available.
-This feature is not ready for production use.
+This feature is in [beta](../policy/experiment-beta-support.md).
### Set up Google Cloud Identity and Access Management
diff --git a/doc/ci/runners/provision_runners_google_cloud.md b/doc/ci/runners/provision_runners_google_cloud.md
index 6cc0671e2414fb..3f1a96dd3d35f6 100644
--- a/doc/ci/runners/provision_runners_google_cloud.md
+++ b/doc/ci/runners/provision_runners_google_cloud.md
@@ -14,9 +14,7 @@ DETAILS:
**Status:** Beta
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/438316) in GitLab 16.10 [with a flag](../../administration/feature_flags.md) named `google_cloud_support_feature_flag`. This feature is in [beta](../../policy/experiment-beta-support.md).
-
-FLAG:
-On GitLab.com, this feature is available for a subset of users. On GitLab Dedicated, this feature is not available.
+> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/150472) in GitLab 17.1. Feature flag `google_cloud_support_feature_flag` removed.
This feature is in [beta](../../policy/experiment-beta-support.md).
diff --git a/doc/ci/yaml/index.md b/doc/ci/yaml/index.md
index 8c134483bcf9fd..492e914f4afbaf 100644
--- a/doc/ci/yaml/index.md
+++ b/doc/ci/yaml/index.md
@@ -2508,9 +2508,7 @@ DETAILS:
**Status:** Beta
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/142054) in GitLab 16.9 [with a flag](../../administration/feature_flags.md) named `google_cloud_support_feature_flag`. This feature is in [beta](../../policy/experiment-beta-support.md).
-
-FLAG:
-On GitLab.com, this feature is available for a subset of users. On GitLab Dedicated, this feature is not available.
+> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/150472) in GitLab 17.1. Feature flag `google_cloud_support_feature_flag` removed.
This feature is in [beta](../../policy/experiment-beta-support.md).
diff --git a/doc/integration/google_cloud_iam.md b/doc/integration/google_cloud_iam.md
index e6558c7773a006..0e23fa58137e16 100644
--- a/doc/integration/google_cloud_iam.md
+++ b/doc/integration/google_cloud_iam.md
@@ -12,9 +12,7 @@ DETAILS:
**Status:** Beta
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/141127) in GitLab 16.10 [with a flag](../administration/feature_flags.md) named `google_cloud_support_feature_flag`. This feature is in [beta](../policy/experiment-beta-support.md).
-
-FLAG:
-On GitLab.com, this feature is available for a subset of users. On GitLab Dedicated, this feature is not available.
+> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/150472) in GitLab 17.1. Feature flag `google_cloud_support_feature_flag` removed.
This feature is in [beta](../policy/experiment-beta-support.md).
diff --git a/doc/user/project/integrations/google_artifact_management.md b/doc/user/project/integrations/google_artifact_management.md
index d11956246934a1..7bbf5665cc6306 100644
--- a/doc/user/project/integrations/google_artifact_management.md
+++ b/doc/user/project/integrations/google_artifact_management.md
@@ -13,9 +13,7 @@ DETAILS:
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/141127) in GitLab 16.10 [with a flag](../../../administration/feature_flags.md) named
`google_cloud_support_feature_flag`. This feature is in [beta](../../../policy/experiment-beta-support.md).
-
-FLAG:
-On GitLab.com, this feature is available for a subset of users. On GitLab Dedicated, this feature is not available.
+> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/150472) in GitLab 17.1. Feature flag `google_cloud_support_feature_flag` removed.
This feature is in [beta](../../../policy/experiment-beta-support.md).
diff --git a/ee/app/controllers/ee/groups/runners_controller.rb b/ee/app/controllers/ee/groups/runners_controller.rb
index ba6bc1203d67fa..b203ece8055d04 100644
--- a/ee/app/controllers/ee/groups/runners_controller.rb
+++ b/ee/app/controllers/ee/groups/runners_controller.rb
@@ -18,8 +18,6 @@ def needs_authorize_read_group_runners
before_action :authorize_read_group_runners!, only: needs_authorize_read_group_runners
before_action do
- push_frontend_feature_flag(:google_cloud_support_feature_flag, group&.root_ancestor)
-
next unless ::Gitlab::Ci::RunnerReleases.instance.enabled?
push_licensed_feature(:runner_upgrade_management_for_namespace, group)
diff --git a/ee/app/controllers/ee/projects/runners_controller.rb b/ee/app/controllers/ee/projects/runners_controller.rb
deleted file mode 100644
index 81e88aad7e70c6..00000000000000
--- a/ee/app/controllers/ee/projects/runners_controller.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-module EE
- module Projects
- module RunnersController
- extend ActiveSupport::Concern
-
- prepended do
- before_action do
- push_frontend_feature_flag(:google_cloud_support_feature_flag, @project&.root_ancestor)
- end
- end
- end
- end
-end
diff --git a/ee/app/controllers/projects/google_cloud/artifact_registry_controller.rb b/ee/app/controllers/projects/google_cloud/artifact_registry_controller.rb
index b5edcb14217971..a40a6b9b7ceea8 100644
--- a/ee/app/controllers/projects/google_cloud/artifact_registry_controller.rb
+++ b/ee/app/controllers/projects/google_cloud/artifact_registry_controller.rb
@@ -18,7 +18,7 @@ def show
private
def ensure_feature!
- render_404 unless project.google_cloud_support_enabled?
+ render_404 unless ::Gitlab::Saas.feature_available?(:google_cloud_support)
end
end
end
diff --git a/ee/app/graphql/ee/types/group_type.rb b/ee/app/graphql/ee/types/group_type.rb
index 48048e3490542a..9b940d19f6dc2d 100644
--- a/ee/app/graphql/ee/types/group_type.rb
+++ b/ee/app/graphql/ee/types/group_type.rb
@@ -56,8 +56,7 @@ module GroupType
null: true,
alpha: { milestone: '16.10' },
description: 'Information used for provisioning the runner on a cloud provider. ' \
- 'Returns `null` if `:google_cloud_support_feature_flag` feature flag is disabled, ' \
- 'or the GitLab instance is not a SaaS instance.' do
+ 'Returns `null` if the GitLab instance is not a SaaS instance.' do
argument :provider, ::Types::Ci::RunnerCloudProviderEnum, required: true,
description: 'Identifier of the cloud provider.'
argument :cloud_project_id, ::Types::GoogleCloud::ProjectType, required: true,
@@ -305,8 +304,6 @@ def billable_members_count(requested_hosted_plan: nil)
end
def runner_cloud_provisioning(provider:, cloud_project_id:)
- return if ::Feature.disabled?(:google_cloud_support_feature_flag, object.root_ancestor)
-
{
container: object,
provider: provider,
diff --git a/ee/app/graphql/ee/types/project_type.rb b/ee/app/graphql/ee/types/project_type.rb
index cda7bd65e2997a..be70aa008a451e 100644
--- a/ee/app/graphql/ee/types/project_type.rb
+++ b/ee/app/graphql/ee/types/project_type.rb
@@ -352,8 +352,7 @@ module ProjectType
null: true,
alpha: { milestone: '16.9' },
description: 'Information used for provisioning the runner on a cloud provider. ' \
- 'Returns `null` if `:google_cloud_support_feature_flag` feature flag is disabled, ' \
- 'or the GitLab instance is not a SaaS instance.' do
+ 'Returns `null` if the GitLab instance is not a SaaS instance.' do
argument :provider, ::Types::Ci::RunnerCloudProviderEnum, required: true,
description: 'Identifier of the cloud provider.'
argument :cloud_project_id, ::Types::GoogleCloud::ProjectType, required: true,
@@ -371,8 +370,7 @@ module ProjectType
null: true,
alpha: { milestone: '16.10' },
description: 'Google Artifact Registry repository. ' \
- 'Returns `null` if `google_cloud_support_feature_flag` feature flag is disabled, ' \
- 'or the GitLab instance is not a SaaS instance.'
+ 'Returns `null` if the GitLab instance is not a SaaS instance.'
field :ai_agent, ::Types::Ai::Agents::AgentType,
null: true,
@@ -460,8 +458,6 @@ def compliance_frameworks
end
def runner_cloud_provisioning(provider:, cloud_project_id:)
- return if ::Feature.disabled?(:google_cloud_support_feature_flag, project.root_ancestor)
-
{
container: project,
provider: provider,
@@ -470,7 +466,7 @@ def runner_cloud_provisioning(provider:, cloud_project_id:)
end
def google_cloud_artifact_registry_repository
- return unless project.google_cloud_support_enabled?
+ return unless ::Gitlab::Saas.feature_available?(:google_cloud_support)
project
end
diff --git a/ee/app/graphql/types/google_cloud/artifact_registry/repository_type.rb b/ee/app/graphql/types/google_cloud/artifact_registry/repository_type.rb
index d9b936ff27d662..e57093a9fd91d1 100644
--- a/ee/app/graphql/types/google_cloud/artifact_registry/repository_type.rb
+++ b/ee/app/graphql/types/google_cloud/artifact_registry/repository_type.rb
@@ -33,8 +33,7 @@ class RepositoryType < BaseObject
Types::GoogleCloud::ArtifactRegistry::ArtifactType.connection_type,
null: true,
description: 'Google Artifact Registry repository artifacts. ' \
- 'Returns `null` if `google_cloud_support_feature_flag` feature flag ' \
- 'is disabled or GitLab.com feature is unavailable.',
+ 'Returns `null` if GitLab.com feature is unavailable.',
resolver: ::Resolvers::GoogleCloud::ArtifactRegistry::RepositoryArtifactsResolver,
connection_extension: Gitlab::Graphql::Extensions::ExternallyPaginatedArrayExtension
diff --git a/ee/app/helpers/ee/packages_helper.rb b/ee/app/helpers/ee/packages_helper.rb
index b522f49ae91c4e..45e848c180f376 100644
--- a/ee/app/helpers/ee/packages_helper.rb
+++ b/ee/app/helpers/ee/packages_helper.rb
@@ -36,7 +36,7 @@ def show_dependency_proxy_settings?(project)
end
def show_google_cloud_artifact_registry_settings?(project)
- project.google_cloud_support_enabled? &&
+ ::Gitlab::Saas.feature_available?(:google_cloud_support) &&
Ability.allowed?(current_user, :admin_google_cloud_artifact_registry, project)
end
end
diff --git a/ee/app/models/ee/group.rb b/ee/app/models/ee/group.rb
index 7d9179993a796f..76226002e873ff 100644
--- a/ee/app/models/ee/group.rb
+++ b/ee/app/models/ee/group.rb
@@ -987,10 +987,6 @@ def billed_users_from_members(members, merge_condition: ::User.all)
users_without_bots(members, merge_condition: merge_condition)
end
- def google_cloud_support_enabled?
- ::Feature.enabled?(:google_cloud_support_feature_flag, self.root_ancestor) && ::Gitlab::Saas.feature_available?(:google_cloud_support)
- end
-
def assigning_role_too_high?(current_user, access_level)
return false if current_user.can_admin_all_resources?
return false unless access_level
diff --git a/ee/app/models/ee/project.rb b/ee/app/models/ee/project.rb
index 677200d3e91fd3..0ec3c7070611c2 100644
--- a/ee/app/models/ee/project.rb
+++ b/ee/app/models/ee/project.rb
@@ -926,7 +926,7 @@ def disabled_integrations
names << 'github' unless github_integration_enabled?
- unless google_cloud_support_enabled?
+ unless ::Gitlab::Saas.feature_available?(:google_cloud_support)
names << 'google_cloud_platform_artifact_registry'
names << 'google_cloud_platform_workload_identity_federation'
end
@@ -1261,10 +1261,6 @@ def supports_saved_replies?
::Feature.enabled?(:project_saved_replies_flag, self, type: :beta) && licensed_feature_available?(:project_saved_replies)
end
- def google_cloud_support_enabled?
- ::Feature.enabled?(:google_cloud_support_feature_flag, self.root_ancestor) && ::Gitlab::Saas.feature_available?(:google_cloud_support)
- end
-
private
def latest_ingested_sbom_pipeline_id_redis_key
diff --git a/ee/app/models/integrations/google_cloud_platform/artifact_registry.rb b/ee/app/models/integrations/google_cloud_platform/artifact_registry.rb
index 0b38113fe3c2aa..f00e570231f1bb 100644
--- a/ee/app/models/integrations/google_cloud_platform/artifact_registry.rb
+++ b/ee/app/models/integrations/google_cloud_platform/artifact_registry.rb
@@ -88,7 +88,7 @@ def repository_full_name
end
def ci_variables
- return [] unless project.google_cloud_support_enabled? && activated?
+ return [] unless ::Gitlab::Saas.feature_available?(:google_cloud_support) && activated?
[
{ key: 'GOOGLE_ARTIFACT_REGISTRY_PROJECT_ID', value: artifact_registry_project_id },
diff --git a/ee/app/models/integrations/google_cloud_platform/workload_identity_federation.rb b/ee/app/models/integrations/google_cloud_platform/workload_identity_federation.rb
index 5c0426641cf49f..b49feb48258413 100644
--- a/ee/app/models/integrations/google_cloud_platform/workload_identity_federation.rb
+++ b/ee/app/models/integrations/google_cloud_platform/workload_identity_federation.rb
@@ -140,13 +140,13 @@ def testable?
end
def identity_provider_resource_name
- return unless parent.google_cloud_support_enabled? && activated?
+ return unless ::Gitlab::Saas.feature_available?(:google_cloud_support) && activated?
"//#{identity_pool_resource_name}/providers/#{workload_identity_pool_provider_id}"
end
def identity_pool_resource_name
- return unless parent.google_cloud_support_enabled? && activated?
+ return unless ::Gitlab::Saas.feature_available?(:google_cloud_support) && activated?
"iam.googleapis.com/projects/#{workload_identity_federation_project_number}/" \
"locations/global/workloadIdentityPools/#{workload_identity_pool_id}"
diff --git a/ee/app/services/ci/runners/create_google_cloud_provisioning_steps_service.rb b/ee/app/services/ci/runners/create_google_cloud_provisioning_steps_service.rb
index 8d1206fc403b96..a6c47e8950783f 100644
--- a/ee/app/services/ci/runners/create_google_cloud_provisioning_steps_service.rb
+++ b/ee/app/services/ci/runners/create_google_cloud_provisioning_steps_service.rb
@@ -35,13 +35,6 @@ def execute
private
def validate
- if Feature.disabled?(:google_cloud_support_feature_flag, container.root_ancestor)
- return ServiceResponse.error(
- message: s_('Runners|Google Cloud provisioning is disabled for this top-level namespace'),
- reason: :google_cloud_provisioning_disabled
- )
- end
-
unless Ability.allowed?(current_user, :provision_cloud_runner, container)
return ServiceResponse.error(
message: s_('Runners|The user is not allowed to provision a cloud runner'),
diff --git a/ee/app/services/google_cloud/artifact_registry/base_project_service.rb b/ee/app/services/google_cloud/artifact_registry/base_project_service.rb
index db73f5b0eae565..25543b7dbe1a1f 100644
--- a/ee/app/services/google_cloud/artifact_registry/base_project_service.rb
+++ b/ee/app/services/google_cloud/artifact_registry/base_project_service.rb
@@ -37,10 +37,6 @@ def execute
def validate_before_execute
return ERROR_RESPONSES[:saas_only] unless Gitlab::Saas.feature_available?(:google_cloud_support)
- unless Feature.enabled?(:google_cloud_support_feature_flag, project&.root_ancestor)
- return ERROR_RESPONSES[:feature_flag_disabled]
- end
-
return ERROR_RESPONSES[:no_wlif_integration] unless wlif_integration.present?
return ERROR_RESPONSES[:wlif_integration_disabled] unless wlif_integration.activated?
return ERROR_RESPONSES[:no_artifact_registry_integration] unless artifact_registry_integration.present?
diff --git a/ee/app/services/google_cloud/compute/base_service.rb b/ee/app/services/google_cloud/compute/base_service.rb
index 34ac492e7a7c13..080c97820a6f1f 100644
--- a/ee/app/services/google_cloud/compute/base_service.rb
+++ b/ee/app/services/google_cloud/compute/base_service.rb
@@ -38,10 +38,6 @@ def execute
def validate_before_execute
return ERROR_RESPONSES[:saas_only] unless Gitlab::Saas.feature_available?(:google_cloud_support)
- unless Feature.enabled?(:google_cloud_support_feature_flag, container.root_ancestor)
- return ERROR_RESPONSES[:feature_flag_disabled]
- end
-
return ERROR_RESPONSES[:access_denied] unless allowed?
return ERROR_RESPONSES[:no_integration] unless wlif_integration
diff --git a/ee/config/feature_flags/beta/google_cloud_support_feature_flag.yml b/ee/config/feature_flags/beta/google_cloud_support_feature_flag.yml
deleted file mode 100644
index 6ef495882ec8ea..00000000000000
--- a/ee/config/feature_flags/beta/google_cloud_support_feature_flag.yml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-name: google_cloud_support_feature_flag
-feature_issue_url: https://gitlab.com/groups/gitlab-org/-/epics/11412
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/145918
-rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/443470
-milestone: '16.10'
-group: group::container registry
-type: beta
-default_enabled: false
diff --git a/ee/lib/api/project_google_cloud_integration.rb b/ee/lib/api/project_google_cloud_integration.rb
index bb261b5a2d693a..febff8f911b40d 100644
--- a/ee/lib/api/project_google_cloud_integration.rb
+++ b/ee/lib/api/project_google_cloud_integration.rb
@@ -9,7 +9,6 @@ class ProjectGoogleCloudIntegration < ::API::Base
before { authorize_admin_project }
before do
not_found! unless ::Gitlab::Saas.feature_available?(:google_cloud_support)
- not_found! unless ::Feature.enabled?(:google_cloud_support_feature_flag, user_project.root_ancestor)
end
params do
@@ -86,7 +85,7 @@ class ProjectGoogleCloudIntegration < ::API::Base
content_type 'text/plain'
wlif_integration = user_project.google_cloud_platform_workload_identity_federation_integration
- unless user_project.google_cloud_support_enabled? && wlif_integration&.activated?
+ unless ::Gitlab::Saas.feature_available?(:google_cloud_support) && wlif_integration&.activated?
render_api_error!('Workload Identity Federation is not configured', 400)
end
diff --git a/ee/lib/ee/gitlab/ci/yaml_processor.rb b/ee/lib/ee/gitlab/ci/yaml_processor.rb
index 5487fc3a6d770b..b0d9091cd13c2d 100644
--- a/ee/lib/ee/gitlab/ci/yaml_processor.rb
+++ b/ee/lib/ee/gitlab/ci/yaml_processor.rb
@@ -23,11 +23,6 @@ def validate_job_identity!(name, job)
error!("#{name} job: #{s_('GoogleCloud|The google_cloud_support feature is not available')}")
end
- unless google_cloud_support_feature_flag?
- error!("#{name} job: google_cloud_support_feature_flag feature flag is not enabled for the " \
- 'top-level namespace')
- end
-
integration = project.google_cloud_platform_workload_identity_federation_integration
if integration.nil?
error!("#{name} job: #{s_('GoogleCloud|The Google Cloud Identity and Access Management ' \
@@ -44,11 +39,6 @@ def google_cloud_support_saas_feature?
::Gitlab::Saas.feature_available?(:google_cloud_support)
end
strong_memoize_attr :google_cloud_support_saas_feature?
-
- def google_cloud_support_feature_flag?
- ::Feature.enabled?(:google_cloud_support_feature_flag, project.root_ancestor)
- end
- strong_memoize_attr :google_cloud_support_feature_flag?
end
end
end
diff --git a/ee/lib/ee/sidebars/projects/menus/packages_registries_menu.rb b/ee/lib/ee/sidebars/projects/menus/packages_registries_menu.rb
index 135a0f366658c6..bea00ff56bb5de 100644
--- a/ee/lib/ee/sidebars/projects/menus/packages_registries_menu.rb
+++ b/ee/lib/ee/sidebars/projects/menus/packages_registries_menu.rb
@@ -46,7 +46,7 @@ def ai_agents_menu_item
end
def show_google_artifact_registry_menu_item?
- context.project.google_cloud_support_enabled? &&
+ ::Gitlab::Saas.feature_available?(:google_cloud_support) &&
can?(context.current_user, :read_google_cloud_artifact_registry, context.project) &&
context.project.google_cloud_platform_workload_identity_federation_integration&.operating? &&
context.project.google_cloud_platform_artifact_registry_integration&.operating?
diff --git a/ee/spec/features/projects/navbar_spec.rb b/ee/spec/features/projects/navbar_spec.rb
index 4a8f93664f0a84..f7fb6f64f37e8f 100644
--- a/ee/spec/features/projects/navbar_spec.rb
+++ b/ee/spec/features/projects/navbar_spec.rb
@@ -194,7 +194,6 @@
context 'when google artifact registry is unavailable' do
before do
stub_config(packages: { enabled: true }, registry: { enabled: true })
- stub_feature_flags(google_cloud_support_feature_flag: false)
stub_saas_features(google_cloud_support: false)
insert_container_nav
diff --git a/ee/spec/helpers/ee/packages_helper_spec.rb b/ee/spec/helpers/ee/packages_helper_spec.rb
index 16829c14b3555e..c165a1efa106fc 100644
--- a/ee/spec/helpers/ee/packages_helper_spec.rb
+++ b/ee/spec/helpers/ee/packages_helper_spec.rb
@@ -56,7 +56,7 @@
describe 'settings_path' do
before do
- allow(project).to receive(:google_cloud_support_enabled?).and_return(true)
+ stub_saas_features(google_cloud_support: true)
allow(Ability).to receive(:allowed?).with(user, :admin_google_cloud_artifact_registry, project)
.and_return(true)
end
@@ -66,9 +66,9 @@
::Integrations::GoogleCloudPlatform::ArtifactRegistry))
end
- context 'when google_cloud_support_enabled? is false' do
+ context 'when google artifact registry feature is unavailable' do
before do
- allow(project).to receive(:google_cloud_support_enabled?).and_return(false)
+ stub_saas_features(google_cloud_support: false)
end
it { is_expected.to include(settings_path: '') }
diff --git a/ee/spec/lib/ee/sidebars/projects/menus/packages_registries_menu_spec.rb b/ee/spec/lib/ee/sidebars/projects/menus/packages_registries_menu_spec.rb
index 16a9f9fb0420f5..0f01f00af9c5a8 100644
--- a/ee/spec/lib/ee/sidebars/projects/menus/packages_registries_menu_spec.rb
+++ b/ee/spec/lib/ee/sidebars/projects/menus/packages_registries_menu_spec.rb
@@ -40,14 +40,6 @@
it_behaves_like 'the menu item gets added to list of menu items'
- context 'when feature flag is turned off' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it_behaves_like 'the menu item is not added to list of menu items'
- end
-
context 'when feature is unavailable' do
before do
stub_saas_features(google_cloud_support: false)
diff --git a/ee/spec/lib/gitlab/ci/yaml_processor_spec.rb b/ee/spec/lib/gitlab/ci/yaml_processor_spec.rb
index 387be9a7ce0a56..1f4316cd08e495 100644
--- a/ee/spec/lib/gitlab/ci/yaml_processor_spec.rb
+++ b/ee/spec/lib/gitlab/ci/yaml_processor_spec.rb
@@ -370,17 +370,6 @@
end
end
- context 'when feature flag is disabled' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it 'returns errors' do
- expect(result.errors).to include(
- 'build job: google_cloud_support_feature_flag feature flag is not enabled for the top-level namespace')
- end
- end
-
context 'when project integration does not exist' do
before do
integration.destroy!
diff --git a/ee/spec/lib/sidebars/projects/super_sidebar_panel_spec.rb b/ee/spec/lib/sidebars/projects/super_sidebar_panel_spec.rb
index 1f8cba4aff2d50..09c421ff22d821 100644
--- a/ee/spec/lib/sidebars/projects/super_sidebar_panel_spec.rb
+++ b/ee/spec/lib/sidebars/projects/super_sidebar_panel_spec.rb
@@ -45,7 +45,7 @@
# Needed to show Container Registry items
allow(::Gitlab.config.registry).to receive(:enabled).and_return(true)
# Needed to show Google Artifactory Registry items
- allow(project).to receive(:google_cloud_support_enabled?).and_return true
+ stub_saas_features(google_cloud_support: true)
# Iterations are only available in non-personal projects
allow(project).to receive(:personal?).and_return(false)
end
diff --git a/ee/spec/models/ee/group_spec.rb b/ee/spec/models/ee/group_spec.rb
index 7abca7ba9c1d17..20e68d213f6c39 100644
--- a/ee/spec/models/ee/group_spec.rb
+++ b/ee/spec/models/ee/group_spec.rb
@@ -3594,28 +3594,6 @@ def webhook_headers
end
end
- describe '#google_cloud_support_enabled?' do
- subject { group.google_cloud_support_enabled? }
-
- it { is_expected.to eq(false) }
-
- context 'when feature is available' do
- before do
- stub_saas_features(google_cloud_support: true)
- end
-
- it { is_expected.to eq(true) }
- end
-
- context 'when google_cloud_support FF is disabled' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it { is_expected.to eq(false) }
- end
- end
-
describe '#block_seat_overages?' do
context 'when gitlab subscriptions are available' do
before do
diff --git a/ee/spec/models/ee/project_spec.rb b/ee/spec/models/ee/project_spec.rb
index dbb5e128435ad8..1c69e64ff6b5de 100644
--- a/ee/spec/models/ee/project_spec.rb
+++ b/ee/spec/models/ee/project_spec.rb
@@ -2052,14 +2052,6 @@
it { is_expected.not_to include('google_cloud_platform_artifact_registry') }
- context 'when google_cloud_support_feature_flag FF is disabled' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it { is_expected.to include('google_cloud_platform_artifact_registry') }
- end
-
context 'when google artifact registry feature is unavailable' do
before do
stub_saas_features(google_cloud_support: false)
@@ -2072,14 +2064,6 @@
context 'workload identity federation' do
it { is_expected.to include('google_cloud_platform_workload_identity_federation') }
- context 'when google_cloud_support_feature_flag FF is disabled' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it { is_expected.to include('google_cloud_platform_workload_identity_federation') }
- end
-
context 'when google artifact registry feature is available' do
before do
stub_saas_features(google_cloud_support: true)
@@ -4469,34 +4453,6 @@ def stub_default_url_options(host)
end
end
- describe '#google_cloud_support_enabled?' do
- subject { project.google_cloud_support_enabled? }
-
- let_it_be(:project) { build_stubbed(:project) }
-
- before do
- stub_saas_features(google_cloud_support: true)
- end
-
- it { is_expected.to eq(true) }
-
- context 'when feature is unavailable' do
- before do
- stub_saas_features(google_cloud_support: false)
- end
-
- it { is_expected.to eq(false) }
- end
-
- context 'when google_cloud_support_feature_flag feature is disabled' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it { is_expected.to eq(false) }
- end
- end
-
describe '#supports_saved_replies?' do
subject(:supported) { project.supports_saved_replies? }
diff --git a/ee/spec/models/integrations/google_cloud_platform/workload_identity_federation_spec.rb b/ee/spec/models/integrations/google_cloud_platform/workload_identity_federation_spec.rb
index e88a871020b286..caebd48f5a4a6d 100644
--- a/ee/spec/models/integrations/google_cloud_platform/workload_identity_federation_spec.rb
+++ b/ee/spec/models/integrations/google_cloud_platform/workload_identity_federation_spec.rb
@@ -161,14 +161,6 @@
it { is_expected.to be_nil }
end
end
-
- context 'when google_cloud_support_feature_flag FF is disabled' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it { is_expected.to be_nil }
- end
end
end
@@ -209,14 +201,6 @@
it { is_expected.to eq(expected_resource_name) }
end
-
- context 'when google_cloud_support_feature_flag FF is disabled' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it { is_expected.to be_nil }
- end
end
end
end
diff --git a/ee/spec/requests/api/graphql/google_cloud/artifact_registry/docker_image_spec.rb b/ee/spec/requests/api/graphql/google_cloud/artifact_registry/docker_image_spec.rb
index 41c6a8fe618c54..894e6e833510a5 100644
--- a/ee/spec/requests/api/graphql/google_cloud/artifact_registry/docker_image_spec.rb
+++ b/ee/spec/requests/api/graphql/google_cloud/artifact_registry/docker_image_spec.rb
@@ -161,14 +161,6 @@
it_behaves_like 'returning a blank response'
end
- context 'when google_cloud_support_feature_flag FF is disabled' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it_behaves_like 'returning a blank response'
- end
-
%i[wlif artifact_registry].each do |integration_type|
context "with the #{integration_type} integration" do
let(:integration) { public_send("#{integration_type}_integration") }
diff --git a/ee/spec/requests/api/graphql/project/google_cloud/artifact_registry/docker_images_spec.rb b/ee/spec/requests/api/graphql/project/google_cloud/artifact_registry/docker_images_spec.rb
index 36dfc34ceb5e51..eb25dd9920f1bf 100644
--- a/ee/spec/requests/api/graphql/project/google_cloud/artifact_registry/docker_images_spec.rb
+++ b/ee/spec/requests/api/graphql/project/google_cloud/artifact_registry/docker_images_spec.rb
@@ -202,14 +202,6 @@
it { is_expected.to be_nil }
end
- context 'when google_cloud_support_feature_flag FF is disabled' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it { is_expected.to be_nil }
- end
-
context 'with the Google Cloud Identity and Access Management (IAM) project integration' do
context 'when does not exist' do
before do
diff --git a/ee/spec/requests/api/graphql/project/runner_google_cloud_provisioning_spec.rb b/ee/spec/requests/api/graphql/project/runner_google_cloud_provisioning_spec.rb
index e0e9c775047a3b..3837a108ad6817 100644
--- a/ee/spec/requests/api/graphql/project/runner_google_cloud_provisioning_spec.rb
+++ b/ee/spec/requests/api/graphql/project/runner_google_cloud_provisioning_spec.rb
@@ -188,13 +188,5 @@
it { is_expected.to be nil }
end
-
- context 'when google_cloud_support_feature_flag FF is disabled' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it { is_expected.to be nil }
- end
end
end
diff --git a/ee/spec/requests/api/integrations_spec.rb b/ee/spec/requests/api/integrations_spec.rb
index 62d8afd0f649a5..36d53889ab4a98 100644
--- a/ee/spec/requests/api/integrations_spec.rb
+++ b/ee/spec/requests/api/integrations_spec.rb
@@ -26,15 +26,6 @@
it_behaves_like 'returning response status', unavailable_status
it_behaves_like 'does not change integrations count'
end
-
- context 'when google_cloud_support_feature_flag FF is disabled' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it_behaves_like 'returning response status', unavailable_status
- it_behaves_like 'does not change integrations count'
- end
end
%w[integrations services].each do |endpoint|
@@ -97,15 +88,6 @@
it_behaves_like 'returning response status', unavailable_status
it_behaves_like 'does not change integrations count'
end
-
- context 'when google_cloud_support_feature_flag FF is disabled' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it_behaves_like 'returning response status', unavailable_status
- it_behaves_like 'does not change integrations count'
- end
end
describe 'PUT /projects/:id/integrations/google-cloud-platform-artifact-registry' do
diff --git a/ee/spec/requests/api/project_google_cloud_integration_spec.rb b/ee/spec/requests/api/project_google_cloud_integration_spec.rb
index 7cc3fc0a29ba5e..901db96a4934b0 100644
--- a/ee/spec/requests/api/project_google_cloud_integration_spec.rb
+++ b/ee/spec/requests/api/project_google_cloud_integration_spec.rb
@@ -41,18 +41,6 @@
expect(response).to have_gitlab_http_status(:forbidden)
end
end
-
- context 'when feature flag is disabled' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it 'returns error' do
- get(api(path, owner), params: params)
-
- expect(response).to have_gitlab_http_status(:not_found)
- end
- end
end
describe 'GET /projects/:id/google_cloud/setup/runner_deployment_project.sh' do
diff --git a/ee/spec/requests/projects/google_cloud/artifact_registry_controller_spec.rb b/ee/spec/requests/projects/google_cloud/artifact_registry_controller_spec.rb
index d4274badfb556a..945012f7006ea6 100644
--- a/ee/spec/requests/projects/google_cloud/artifact_registry_controller_spec.rb
+++ b/ee/spec/requests/projects/google_cloud/artifact_registry_controller_spec.rb
@@ -19,14 +19,6 @@
it_behaves_like 'returning response status', :ok
- context 'when feature flag is disabled' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it_behaves_like 'returning response status', :not_found
- end
-
context 'when feature is unavailable' do
before do
stub_saas_features(google_cloud_support: false)
diff --git a/ee/spec/services/ci/runners/create_google_cloud_provisioning_steps_service_spec.rb b/ee/spec/services/ci/runners/create_google_cloud_provisioning_steps_service_spec.rb
index 793b393e3fe3e2..c7eeafd864c9eb 100644
--- a/ee/spec/services/ci/runners/create_google_cloud_provisioning_steps_service_spec.rb
+++ b/ee/spec/services/ci/runners/create_google_cloud_provisioning_steps_service_spec.rb
@@ -190,18 +190,6 @@
expect(execute.message).to eq s_('Runners|The user is not allowed to provision a cloud runner')
end
end
-
- context 'when google_cloud_support_feature_flag FF is not enabled' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it 'returns an error' do
- expect(execute).to be_error
- expect(execute.reason).to eq :google_cloud_provisioning_disabled
- expect(execute.message).to eq s_('Runners|Google Cloud provisioning is disabled for this top-level namespace')
- end
- end
end
end
end
diff --git a/ee/spec/support/shared_examples/google_cloud_platform/artifact_registry/services_shared_examples.rb b/ee/spec/support/shared_examples/google_cloud_platform/artifact_registry/services_shared_examples.rb
index 23a524c0a966b6..271cdd15042d25 100644
--- a/ee/spec/support/shared_examples/google_cloud_platform/artifact_registry/services_shared_examples.rb
+++ b/ee/spec/support/shared_examples/google_cloud_platform/artifact_registry/services_shared_examples.rb
@@ -45,15 +45,6 @@
end
end
- context 'with google_cloud_support_feature_flag FF disabled' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it_behaves_like 'returning an error service response',
- message: described_class::ERROR_RESPONSES[:feature_flag_disabled].message
- end
-
%i[wlif artifact_registry].each do |integration_type|
context "with #{integration_type}" do
let(:integration) { public_send("#{integration_type}_integration") }
diff --git a/ee/spec/support/shared_examples/google_cloud_platform/compute/services_shared_examples.rb b/ee/spec/support/shared_examples/google_cloud_platform/compute/services_shared_examples.rb
index 22f9db1bb037ce..a8231c0955b910 100644
--- a/ee/spec/support/shared_examples/google_cloud_platform/compute/services_shared_examples.rb
+++ b/ee/spec/support/shared_examples/google_cloud_platform/compute/services_shared_examples.rb
@@ -21,14 +21,6 @@
it_behaves_like 'returning an error service response', message: 'Access denied'
end
- context 'with google_cloud_support_feature_flag FF disabled' do
- before do
- stub_feature_flags(google_cloud_support_feature_flag: false)
- end
-
- it_behaves_like 'returning an error service response', message: 'Feature flag not enabled'
- end
-
context 'with no integration' do
before do
wlif_integration.destroy!
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 037885bc4314f5..86d00f07a07088 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -44517,9 +44517,6 @@ msgstr ""
msgid "Runners|Google Cloud project ID"
msgstr ""
-msgid "Runners|Google Cloud provisioning is disabled for this top-level namespace"
-msgstr ""
-
msgid "Runners|Group"
msgstr ""
diff --git a/spec/frontend/ci/runner/components/registration/registration_instructions_spec.js b/spec/frontend/ci/runner/components/registration/registration_instructions_spec.js
index 6053cbd040b032..7930fa26aa4f01 100644
--- a/spec/frontend/ci/runner/components/registration/registration_instructions_spec.js
+++ b/spec/frontend/ci/runner/components/registration/registration_instructions_spec.js
@@ -351,9 +351,6 @@ describe('RegistrationInstructions', () => {
platform: GOOGLE_CLOUD_PLATFORM,
groupPath: 'mock/group/path',
},
- provide: {
- glFeatures: { googleCloudSupportFeatureFlag: true },
- },
});
await waitForPromises();
@@ -371,9 +368,6 @@ describe('RegistrationInstructions', () => {
platform: GOOGLE_CLOUD_PLATFORM,
projectPath: 'mock/project/path',
},
- provide: {
- glFeatures: { googleCloudSupportFeatureFlag: true },
- },
});
await waitForPromises();
@@ -385,31 +379,12 @@ describe('RegistrationInstructions', () => {
});
});
- it('does not show google instructions when disabled', async () => {
- createComponent({
- props: {
- platform: GOOGLE_CLOUD_PLATFORM,
- projectPath: 'mock/project/path',
- },
- provide: {
- glFeatures: { googleCloudSupportFeatureFlag: false },
- },
- });
-
- await waitForPromises();
-
- expect(findGoogleCloudRegistrationInstructions().exists()).toBe(false);
- });
-
it('does not show google instructions when on another platform', async () => {
createComponent({
props: {
platform: WINDOWS_PLATFORM,
projectPath: 'mock/project/path',
},
- provide: {
- glFeatures: { googleCloudSupportFeatureFlag: true },
- },
});
await waitForPromises();
diff --git a/spec/frontend/ci/runner/components/runner_platforms_radio_group_spec.js b/spec/frontend/ci/runner/components/runner_platforms_radio_group_spec.js
index e3169aa6024e1a..ef7f0bd17b123e 100644
--- a/spec/frontend/ci/runner/components/runner_platforms_radio_group_spec.js
+++ b/spec/frontend/ci/runner/components/runner_platforms_radio_group_spec.js
@@ -23,22 +23,12 @@ describe('RunnerPlatformsRadioGroup', () => {
.filter((w) => w.text() === text)
.at(0);
- const createComponent = ({
- props = {},
- mountFn = shallowMountExtended,
- googleCloudSupportFeatureFlag = false,
- ...options
- } = {}) => {
+ const createComponent = ({ props = {}, mountFn = shallowMountExtended, ...options } = {}) => {
wrapper = mountFn(RunnerPlatformsRadioGroup, {
propsData: {
value: null,
...props,
},
- provide: {
- glFeatures: {
- googleCloudSupportFeatureFlag,
- },
- },
...options,
});
};
@@ -95,14 +85,11 @@ describe('RunnerPlatformsRadioGroup', () => {
});
expect(radio.findComponent(GlIcon).props('name')).toBe('external-link');
});
- });
- describe('with googleCloudSupportFeatureFlag flag enabled', () => {
it('contains google cloud platform option', () => {
createComponent({
props: {},
mountFn: shallowMountExtended,
- googleCloudSupportFeatureFlag: true,
slots: {
'cloud-options': 'Google cloud',
},
diff --git a/spec/frontend/ci/runner/group_register_runner_app/group_register_runner_app_spec.js b/spec/frontend/ci/runner/group_register_runner_app/group_register_runner_app_spec.js
index 207ad6dabecca8..a121cdc6481455 100644
--- a/spec/frontend/ci/runner/group_register_runner_app/group_register_runner_app_spec.js
+++ b/spec/frontend/ci/runner/group_register_runner_app/group_register_runner_app_spec.js
@@ -34,7 +34,7 @@ describe('GroupRegisterRunnerApp', () => {
const findRegistrationInstructions = () => wrapper.findComponent(RegistrationInstructions);
const findBtn = () => wrapper.findComponent(GlButton);
- const createComponent = (googleCloudSupportFeatureFlag = false) => {
+ const createComponent = () => {
trackingSpy = mockTracking(undefined, window.document, jest.spyOn);
wrapper = shallowMountExtended(GroupRegisterRunnerApp, {
propsData: {
@@ -42,11 +42,6 @@ describe('GroupRegisterRunnerApp', () => {
runnersPath: mockRunnersPath,
groupPath: mockGroupPath,
},
- provide: {
- glFeatures: {
- googleCloudSupportFeatureFlag,
- },
- },
});
};
diff --git a/spec/frontend/ci/runner/project_register_runner_app/project_register_runner_app_spec.js b/spec/frontend/ci/runner/project_register_runner_app/project_register_runner_app_spec.js
index 386635269a3c94..4331fb6945b896 100644
--- a/spec/frontend/ci/runner/project_register_runner_app/project_register_runner_app_spec.js
+++ b/spec/frontend/ci/runner/project_register_runner_app/project_register_runner_app_spec.js
@@ -34,7 +34,7 @@ describe('ProjectRegisterRunnerApp', () => {
const findRegistrationInstructions = () => wrapper.findComponent(RegistrationInstructions);
const findBtn = () => wrapper.findComponent(GlButton);
- const createComponent = (googleCloudSupportFeatureFlag = false) => {
+ const createComponent = () => {
trackingSpy = mockTracking(undefined, window.document, jest.spyOn);
wrapper = shallowMountExtended(ProjectRegisterRunnerApp, {
propsData: {
@@ -42,11 +42,6 @@ describe('ProjectRegisterRunnerApp', () => {
runnersPath: mockRunnersPath,
projectPath: mockProjectPath,
},
- provide: {
- glFeatures: {
- googleCloudSupportFeatureFlag,
- },
- },
});
};
--
GitLab
From ecb9cc595a227a8bbec40826ce883e9f49ef4db4 Mon Sep 17 00:00:00 2001
From: Dzmitry Meshcharakou <12459192-dmeshcharakou@users.noreply.gitlab.com>
Date: Sat, 18 May 2024 08:15:44 +0200
Subject: [PATCH 2/2] Cleanup constants: remove unused error responses
---
.../google_cloud/artifact_registry/base_project_service.rb | 1 -
ee/app/services/google_cloud/compute/base_service.rb | 1 -
2 files changed, 2 deletions(-)
diff --git a/ee/app/services/google_cloud/artifact_registry/base_project_service.rb b/ee/app/services/google_cloud/artifact_registry/base_project_service.rb
index 25543b7dbe1a1f..a38572a0ad8bbc 100644
--- a/ee/app/services/google_cloud/artifact_registry/base_project_service.rb
+++ b/ee/app/services/google_cloud/artifact_registry/base_project_service.rb
@@ -5,7 +5,6 @@ module ArtifactRegistry
class BaseProjectService < ::BaseProjectService
ERROR_RESPONSES = {
saas_only: ServiceResponse.error(message: "This is a SaaS-only feature that can't run here"),
- feature_flag_disabled: ServiceResponse.error(message: 'Feature flag not enabled'),
access_denied: ServiceResponse.error(message: 'Access denied'),
no_wlif_integration: ServiceResponse.error(
message: "#{Integrations::GoogleCloudPlatform::WorkloadIdentityFederation.title} integration not set"
diff --git a/ee/app/services/google_cloud/compute/base_service.rb b/ee/app/services/google_cloud/compute/base_service.rb
index 080c97820a6f1f..c057b33331e33c 100644
--- a/ee/app/services/google_cloud/compute/base_service.rb
+++ b/ee/app/services/google_cloud/compute/base_service.rb
@@ -10,7 +10,6 @@ class BaseService < ::BaseContainerService
ERROR_RESPONSES = {
saas_only: ServiceResponse.error(message: "This is a SaaS-only feature that can't run here"),
- feature_flag_disabled: ServiceResponse.error(message: 'Feature flag not enabled'),
access_denied: ServiceResponse.error(message: 'Access denied'),
no_integration: ServiceResponse.error(
message: "#{Integrations::GoogleCloudPlatform::WorkloadIdentityFederation.title} integration not set"),
--
GitLab