From 01f1669bb93727ba24bafde3be368809ebd87062 Mon Sep 17 00:00:00 2001 From: Michael Kozono <mkozono@gitlab.com> Date: Tue, 17 Dec 2024 01:45:13 +0000 Subject: [PATCH] Geo: Remove no longer needed check --- ee/app/graphql/types/geo/registry_type.rb | 4 +--- .../api/graphql/geo/registries_shared_examples.rb | 8 +------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/ee/app/graphql/types/geo/registry_type.rb b/ee/app/graphql/types/geo/registry_type.rb index 9b41d5c17f41b..383b93d74957a 100644 --- a/ee/app/graphql/types/geo/registry_type.rb +++ b/ee/app/graphql/types/geo/registry_type.rb @@ -23,10 +23,8 @@ module RegistryType field :verification_checksum, GraphQL::Types::String, null: true, description: "The local checksum of the #{graphql_name}" field :verification_failure, GraphQL::Types::String, null: true, description: "Error message during verification of the #{graphql_name}" - # NOTE: remove respond_to? when GroupWikiRepositoryRegistry includes the verification state machine - # Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/323897 def verification_state_name_value - object.verification_state_name.to_s.gsub('verification_', '') if object.respond_to?(:verification_state_name) + object.verification_state_name.to_s.gsub('verification_', '') end end end diff --git a/ee/spec/support/shared_examples/requests/api/graphql/geo/registries_shared_examples.rb b/ee/spec/support/shared_examples/requests/api/graphql/geo/registries_shared_examples.rb index 344a4193767b1..1a9bbdd877e32 100644 --- a/ee/spec/support/shared_examples/requests/api/graphql/geo/registries_shared_examples.rb +++ b/ee/spec/support/shared_examples/requests/api/graphql/geo/registries_shared_examples.rb @@ -132,13 +132,7 @@ def verification_data_to_registry_hash(data, registry) data['verificationFailure'] = registry.verification_failure data['verificationRetryCount'] = registry.verification_retry_count data['verificationStartedAt'] = registry.verification_started_at - - # NOTE: remove respond_to? when GroupWikiRepositoryRegistry includes the verification state machine - # Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/323897 - data['verificationState'] = if registry.respond_to?(:verification_state_name) - registry.verification_state_name.to_s.gsub('verification_', '').upcase - end - + data['verificationState'] = registry.verification_state_name.to_s.gsub('verification_', '').upcase data['verifiedAt'] = registry.verified_at if verification_enabled data['verificationRetryAt'] = registry.verification_retry_at if verification_enabled data -- GitLab