From faefc053bbb019dfb3f600cd7d2e3706eee92e4d Mon Sep 17 00:00:00 2001 From: Chad Woolley <cwoolley@gitlab.com> Date: Tue, 9 Jan 2024 16:37:47 +0000 Subject: [PATCH] Update RubyMine noinspection comments - Remove fixed ones, update remaining ones as necessary --- .../common/get_project_details_query.vue | 1 + .../common/update_workspace_mutation.vue | 1 + .../remote_development/pages/create.vue | 2 ++ .../remote_development/workspaces/create.rb | 1 + .../remote_development/workspaces/update.rb | 2 ++ .../workspaces_for_agent_resolver.rb | 1 + .../workspaces_for_current_user_resolver.rb | 2 ++ .../workspaces_for_query_root_resolver.rb | 2 ++ .../remote_development_agent_config.rb | 4 ++-- ee/app/models/remote_development/workspace.rb | 7 ++++--- ee/lib/remote_development/message_support.rb | 1 - .../workspaces/create/creator.rb | 1 - .../create/editor_component_injector.rb | 3 +++ .../create/pre_flatten_devfile_validator.rb | 1 - .../workspaces/create/workspace_creator.rb | 4 +--- .../reconcile/input/actual_state_calculator.rb | 1 - .../workspaces/reconcile/input/agent_info.rb | 1 - .../reconcile/input/agent_infos_observer.rb | 1 - .../workspaces/reconcile/input/factory.rb | 1 - .../reconcile/input/params_extractor.rb | 1 - .../reconcile/input/params_to_infos_converter.rb | 1 - .../reconcile/input/params_validator.rb | 1 - .../reconcile/output/desired_config_generator.rb | 4 ---- .../output/desired_config_generator_v2.rb | 4 ---- .../reconcile/output/devfile_parser.rb | 1 - .../reconcile/output/devfile_parser_v2.rb | 1 - .../workspaces_to_rails_infos_converter.rb | 1 - .../persistence/orphaned_workspaces_observer.rb | 1 - .../workspaces_from_agent_infos_updater.rb | 3 --- .../workspaces_to_be_returned_finder.rb | 3 --- .../factories/remote_development/workspaces.rb | 13 +------------ .../workspaces_dropdown_group_spec.rb | 4 +--- .../remote_development/workspaces_spec.rb | 6 ++---- .../common/get_project_details_query_spec.js | 1 + .../common/workspaces_breadcrumbs_spec.js | 2 ++ .../create/search_projects_listbox_spec.js | 2 ++ .../components/list/empty_state_spec.js | 1 + .../components/list/workspaces_table_spec.js | 1 + .../workspace_dropdown_item_spec.js | 1 + .../workspaces_dropdown_group_spec.js | 1 + .../remote_development/pages/create_spec.js | 1 + .../remote_development/pages/list_spec.js | 1 + .../remote_development/router/index_spec.js | 2 ++ .../remote_development/agent_config/main_spec.rb | 3 +++ .../agent_config/updater_spec.rb | 1 + .../post_flatten_devfile_validator_spec.rb | 2 -- .../input/actual_state_calculator_spec.rb | 4 ++-- .../reconcile/main_integration_spec.rb | 16 +--------------- .../reconcile/main_reconcile_scenarios_spec.rb | 7 ------- .../workspaces_to_be_returned_finder_spec.rb | 6 +----- .../workspaces_to_be_returned_updater_spec.rb | 6 +----- .../remote_development_agent_config_spec.rb | 1 - .../remote_development/workspaces/create_spec.rb | 2 -- .../railway_oriented_programming_helpers.rb | 3 --- .../remote_development_shared_contexts.rb | 4 ---- spec/validators/ip_cidr_array_validator_spec.rb | 1 - 56 files changed, 48 insertions(+), 102 deletions(-) diff --git a/ee/app/assets/javascripts/remote_development/components/common/get_project_details_query.vue b/ee/app/assets/javascripts/remote_development/components/common/get_project_details_query.vue index 940bfefce6a9a..86177d7f1c85e 100644 --- a/ee/app/assets/javascripts/remote_development/components/common/get_project_details_query.vue +++ b/ee/app/assets/javascripts/remote_development/components/common/get_project_details_query.vue @@ -90,6 +90,7 @@ export default { methods: { async fetchClusterAgents(groupPath) { try { + // noinspection JSCheckFunctionSignatures - TODO: Address in https://gitlab.com/gitlab-org/gitlab/-/issues/437600 const { data, error } = await this.$apollo.query({ query: getGroupClusterAgentsQuery, variables: { groupPath }, diff --git a/ee/app/assets/javascripts/remote_development/components/common/update_workspace_mutation.vue b/ee/app/assets/javascripts/remote_development/components/common/update_workspace_mutation.vue index 1b97427e5eb86..57c872d73f260 100644 --- a/ee/app/assets/javascripts/remote_development/components/common/update_workspace_mutation.vue +++ b/ee/app/assets/javascripts/remote_development/components/common/update_workspace_mutation.vue @@ -13,6 +13,7 @@ export default { methods: { async update(id, state = {}) { try { + // noinspection JSCheckFunctionSignatures - TODO: Address in https://gitlab.com/gitlab-org/gitlab/-/issues/437600 const { data } = await this.$apollo.mutate({ mutation: workspaceUpdateMutation, variables: { diff --git a/ee/app/assets/javascripts/remote_development/pages/create.vue b/ee/app/assets/javascripts/remote_development/pages/create.vue index 7db376d19d92b..596118354a651 100644 --- a/ee/app/assets/javascripts/remote_development/pages/create.vue +++ b/ee/app/assets/javascripts/remote_development/pages/create.vue @@ -144,6 +144,7 @@ export default { try { this.isCreatingWorkspace = true; + // noinspection JSCheckFunctionSignatures - TODO: Address in https://gitlab.com/gitlab-org/gitlab/-/issues/437600 const result = await this.$apollo.mutate({ mutation: workspaceCreateMutation, variables: { @@ -175,6 +176,7 @@ export default { return; } + // noinspection ES6MissingAwait - TODO: Address in https://gitlab.com/gitlab-org/gitlab/-/issues/437600 this.$router.push(ROUTES.index); } catch (error) { logError(error); diff --git a/ee/app/graphql/mutations/remote_development/workspaces/create.rb b/ee/app/graphql/mutations/remote_development/workspaces/create.rb index 5e8a4f9bc51e9..b082da362d624 100644 --- a/ee/app/graphql/mutations/remote_development/workspaces/create.rb +++ b/ee/app/graphql/mutations/remote_development/workspaces/create.rb @@ -63,6 +63,7 @@ def resolve(args) agent = authorized_find!(id: cluster_agent_id) + # noinspection RubyNilAnalysis track_usage_event(:users_creating_workspaces, current_user.id) service = ::RemoteDevelopment::Workspaces::CreateService.new(current_user: current_user) diff --git a/ee/app/graphql/mutations/remote_development/workspaces/update.rb b/ee/app/graphql/mutations/remote_development/workspaces/update.rb index 749f574400928..7c2ee8024deaf 100644 --- a/ee/app/graphql/mutations/remote_development/workspaces/update.rb +++ b/ee/app/graphql/mutations/remote_development/workspaces/update.rb @@ -32,6 +32,8 @@ def resolve(id:, **args) workspace = authorized_find!(id: id) + # noinspection RubyNilAnalysis - This is because the superclass #current_user uses #[], which can return nil + # TODO: Change the superclass to use context.fetch(:current_user) instead of context[:current_user] track_usage_event(:users_updating_workspaces, current_user.id) service = ::RemoteDevelopment::Workspaces::UpdateService.new(current_user: current_user) diff --git a/ee/app/graphql/resolvers/remote_development/workspaces_for_agent_resolver.rb b/ee/app/graphql/resolvers/remote_development/workspaces_for_agent_resolver.rb index 880535807c02d..97e36aab46a37 100644 --- a/ee/app/graphql/resolvers/remote_development/workspaces_for_agent_resolver.rb +++ b/ee/app/graphql/resolvers/remote_development/workspaces_for_agent_resolver.rb @@ -4,6 +4,7 @@ module Resolvers module RemoteDevelopment class WorkspacesForAgentResolver < ::Resolvers::BaseResolver include ResolvesIds + # noinspection RubyResolve - likely due to https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 include Gitlab::Graphql::Authorize::AuthorizeResource type Types::RemoteDevelopment::WorkspaceType.connection_type, null: true diff --git a/ee/app/graphql/resolvers/remote_development/workspaces_for_current_user_resolver.rb b/ee/app/graphql/resolvers/remote_development/workspaces_for_current_user_resolver.rb index 4ca802928a50d..1d79ba49357c7 100644 --- a/ee/app/graphql/resolvers/remote_development/workspaces_for_current_user_resolver.rb +++ b/ee/app/graphql/resolvers/remote_development/workspaces_for_current_user_resolver.rb @@ -35,6 +35,8 @@ def resolve(**args) raise_resource_not_available_error! "'remote_development' licensed feature is not available" end + # noinspection RubyNilAnalysis - This is because the superclass #current_user uses #[], which can return nil + # TODO: Change the superclass to use context.fetch(:current_user) instead of context[:current_user] ::RemoteDevelopment::WorkspacesFinder.execute( current_user: current_user, user_ids: [current_user.id], diff --git a/ee/app/graphql/resolvers/remote_development/workspaces_for_query_root_resolver.rb b/ee/app/graphql/resolvers/remote_development/workspaces_for_query_root_resolver.rb index b96aea7190a5c..ff1ff0babf233 100644 --- a/ee/app/graphql/resolvers/remote_development/workspaces_for_query_root_resolver.rb +++ b/ee/app/graphql/resolvers/remote_development/workspaces_for_query_root_resolver.rb @@ -66,6 +66,8 @@ def resolve(**args) private def can_read_all_workspaces? + # noinspection RubyNilAnalysis - This is because the superclass #current_user uses #[], which can return nil + # TODO: Change the superclass to use context.fetch(:current_user) instead of context[:current_user] current_user.can?(:read_all_workspaces) end end diff --git a/ee/app/models/remote_development/remote_development_agent_config.rb b/ee/app/models/remote_development/remote_development_agent_config.rb index f7fbf4c971844..63171b708b744 100644 --- a/ee/app/models/remote_development/remote_development_agent_config.rb +++ b/ee/app/models/remote_development/remote_development_agent_config.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true module RemoteDevelopment - # noinspection RailsParamDefResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31540 class RemoteDevelopmentAgentConfig < ApplicationRecord # NOTE: See the following comment for the reasoning behind the `RemoteDevelopment` prefix of this table/model: # https://gitlab.com/gitlab-org/gitlab/-/issues/410045#note_1385602915 @@ -13,6 +12,7 @@ class RemoteDevelopmentAgentConfig < ApplicationRecord belongs_to :agent, class_name: 'Clusters::Agent', foreign_key: 'cluster_agent_id', inverse_of: :remote_development_agent_config + # noinspection RailsParamDefResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 has_many :workspaces, through: :agent, source: :workspaces validates :agent, presence: true @@ -31,7 +31,7 @@ class RemoteDevelopmentAgentConfig < ApplicationRecord validates :workspaces_quota, numericality: { only_integer: true, greater_than_or_equal_to: -1 } validates :workspaces_per_user_quota, numericality: { only_integer: true, greater_than_or_equal_to: -1 } - # noinspection RubyResolve - likely due to https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31540 + # noinspection RubyResolve - likely due to https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-25400 before_validation :prevent_dns_zone_update, if: ->(record) { record.persisted? && record.dns_zone_changed? } private diff --git a/ee/app/models/remote_development/workspace.rb b/ee/app/models/remote_development/workspace.rb index 07ed8e44f3cbe..40007da21d61b 100644 --- a/ee/app/models/remote_development/workspace.rb +++ b/ee/app/models/remote_development/workspace.rb @@ -1,10 +1,9 @@ # frozen_string_literal: true module RemoteDevelopment - # noinspection RailsParamDefResolve, RubyResolve - likely due to https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31540 - # noinspection RubyConstantNamingConvention,RubyInstanceMethodNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ class Workspace < ApplicationRecord include Sortable + # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 include RemoteDevelopment::Workspaces::States MAX_HOURS_BEFORE_TERMINATION_LIMIT = 120 @@ -14,6 +13,7 @@ class Workspace < ApplicationRecord belongs_to :agent, class_name: 'Clusters::Agent', foreign_key: 'cluster_agent_id', inverse_of: :workspaces belongs_to :personal_access_token, inverse_of: :workspace + # noinspection RailsParamDefResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 has_one :remote_development_agent_config, through: :agent, source: :remote_development_agent_config has_many :workspace_variables, class_name: 'RemoteDevelopment::WorkspaceVariable', inverse_of: :workspace @@ -38,7 +38,6 @@ class Workspace < ApplicationRecord validate :enforce_permanent_termination scope :with_desired_state_updated_more_recently_than_last_response_to_agent, -> do - # noinspection SqlResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 where('desired_state_updated_at >= responded_to_agent_at').or(where(responded_to_agent_at: nil)) end @@ -54,6 +53,7 @@ class Workspace < ApplicationRecord ) end + # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-32287 before_save :touch_desired_state_updated_at, if: ->(workspace) do workspace.new_record? || workspace.desired_state_changed? end @@ -89,6 +89,7 @@ def enforce_permanent_termination end def touch_desired_state_updated_at + # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 self.desired_state_updated_at = Time.current.utc end end diff --git a/ee/lib/remote_development/message_support.rb b/ee/lib/remote_development/message_support.rb index 9647a46e8a06f..091f36e616e73 100644 --- a/ee/lib/remote_development/message_support.rb +++ b/ee/lib/remote_development/message_support.rb @@ -3,7 +3,6 @@ require 'active_model/errors' module RemoteDevelopment - # noinspection RubyInstanceMethodNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ module MessageSupport # @param [RemoteDevelopment::Message] message # @param [Symbol] reason diff --git a/ee/lib/remote_development/workspaces/create/creator.rb b/ee/lib/remote_development/workspaces/create/creator.rb index 8fb66614960c4..12b6e484b2fa1 100644 --- a/ee/lib/remote_development/workspaces/create/creator.rb +++ b/ee/lib/remote_development/workspaces/create/creator.rb @@ -3,7 +3,6 @@ module RemoteDevelopment module Workspaces module Create - # noinspection RubyResolve - Rubymine isn't detecting ActiveRecord db field properties of workspace class Creator include Messages diff --git a/ee/lib/remote_development/workspaces/create/editor_component_injector.rb b/ee/lib/remote_development/workspaces/create/editor_component_injector.rb index c5e1831528245..bd2517266e29f 100644 --- a/ee/lib/remote_development/workspaces/create/editor_component_injector.rb +++ b/ee/lib/remote_development/workspaces/create/editor_component_injector.rb @@ -38,6 +38,7 @@ def self.inject(value) # @param [String] volume_path # @param [Integer] editor_port # @param [Integer] ssh_port + # @return [Hash] def self.override_main_container(component, volume_name, volume_path, editor_port, ssh_port) # This overrides the main container's command # Open issue to support both starting the editor and running the default command: @@ -103,6 +104,7 @@ def self.override_main_container(component, volume_name, volume_path, editor_por # @param [Hash] processed_devfile # @param [String] volume_name # @param [String] volume_path + # @return [Array] def self.inject_editor_component(processed_devfile, volume_name, volume_path) processed_devfile['components'] += editor_components(volume_name, volume_path) @@ -121,6 +123,7 @@ def self.inject_editor_component(processed_devfile, volume_name, volume_path) # @param [String] volume_name # @param [String] volume_path + # @return [Array] def self.editor_components(volume_name, volume_path) # TODO: https://gitlab.com/gitlab-org/gitlab/-/issues/409775 - choose image based on which editor is passed. image_name = 'registry.gitlab.com/gitlab-org/gitlab-web-ide-vscode-fork/web-ide-injector' diff --git a/ee/lib/remote_development/workspaces/create/pre_flatten_devfile_validator.rb b/ee/lib/remote_development/workspaces/create/pre_flatten_devfile_validator.rb index ad7600cc05b72..842722256038c 100644 --- a/ee/lib/remote_development/workspaces/create/pre_flatten_devfile_validator.rb +++ b/ee/lib/remote_development/workspaces/create/pre_flatten_devfile_validator.rb @@ -3,7 +3,6 @@ module RemoteDevelopment module Workspaces module Create - # noinspection RubyConstantNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ class PreFlattenDevfileValidator include Messages diff --git a/ee/lib/remote_development/workspaces/create/workspace_creator.rb b/ee/lib/remote_development/workspaces/create/workspace_creator.rb index 1ee86962b3ce6..e273853bc2a0d 100644 --- a/ee/lib/remote_development/workspaces/create/workspace_creator.rb +++ b/ee/lib/remote_development/workspaces/create/workspace_creator.rb @@ -3,6 +3,7 @@ module RemoteDevelopment module Workspaces module Create + # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 class WorkspaceCreator include States include Messages @@ -34,11 +35,8 @@ def self.create(value) workspace.name = workspace_name workspace.namespace = workspace_namespace workspace.personal_access_token = personal_access_token - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 workspace.devfile = devfile_yaml - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 workspace.processed_devfile = YAML.dump(processed_devfile.deep_stringify_keys) - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 workspace.actual_state = CREATION_REQUESTED workspace.config_version = RemoteDevelopment::Workspaces::ConfigVersion::LATEST_VERSION workspace.url = URI::HTTPS.build({ diff --git a/ee/lib/remote_development/workspaces/reconcile/input/actual_state_calculator.rb b/ee/lib/remote_development/workspaces/reconcile/input/actual_state_calculator.rb index 1bbbfb59aff1d..4ccdf9b0b068d 100644 --- a/ee/lib/remote_development/workspaces/reconcile/input/actual_state_calculator.rb +++ b/ee/lib/remote_development/workspaces/reconcile/input/actual_state_calculator.rb @@ -4,7 +4,6 @@ module RemoteDevelopment module Workspaces module Reconcile module Input - # noinspection RubyConstantNamingConvention,RubyParameterNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ class ActualStateCalculator include States diff --git a/ee/lib/remote_development/workspaces/reconcile/input/agent_info.rb b/ee/lib/remote_development/workspaces/reconcile/input/agent_info.rb index e48093b7c7ec5..37b500c3a9aab 100644 --- a/ee/lib/remote_development/workspaces/reconcile/input/agent_info.rb +++ b/ee/lib/remote_development/workspaces/reconcile/input/agent_info.rb @@ -4,7 +4,6 @@ module RemoteDevelopment module Workspaces module Reconcile module Input - # noinspection RubyParameterNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ class AgentInfo attr_reader :name, :namespace, :actual_state, :deployment_resource_version diff --git a/ee/lib/remote_development/workspaces/reconcile/input/agent_infos_observer.rb b/ee/lib/remote_development/workspaces/reconcile/input/agent_infos_observer.rb index fb52d2792ee10..521fd2a72d488 100644 --- a/ee/lib/remote_development/workspaces/reconcile/input/agent_infos_observer.rb +++ b/ee/lib/remote_development/workspaces/reconcile/input/agent_infos_observer.rb @@ -4,7 +4,6 @@ module RemoteDevelopment module Workspaces module Reconcile module Input - # noinspection RubyLocalVariableNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ class AgentInfosObserver NORMAL = "normal" ABNORMAL = "abnormal" diff --git a/ee/lib/remote_development/workspaces/reconcile/input/factory.rb b/ee/lib/remote_development/workspaces/reconcile/input/factory.rb index 1c3359cb17cbc..c152b66081674 100644 --- a/ee/lib/remote_development/workspaces/reconcile/input/factory.rb +++ b/ee/lib/remote_development/workspaces/reconcile/input/factory.rb @@ -7,7 +7,6 @@ module Input class Factory # @param [Hash] agent_info_hash_from_params # @return [RemoteDevelopment::Workspaces::Reconcile::Input::AgentInfo] - # noinspection RubyParameterNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ def self.build(agent_info_hash_from_params:) # Hash#[] instead of Hash#fetch or destructuring is used, since the field may not be present latest_k8s_deployment_info = agent_info_hash_from_params[:latest_k8s_deployment_info] diff --git a/ee/lib/remote_development/workspaces/reconcile/input/params_extractor.rb b/ee/lib/remote_development/workspaces/reconcile/input/params_extractor.rb index e6df500ad7cf4..f91c86aef6aef 100644 --- a/ee/lib/remote_development/workspaces/reconcile/input/params_extractor.rb +++ b/ee/lib/remote_development/workspaces/reconcile/input/params_extractor.rb @@ -4,7 +4,6 @@ module RemoteDevelopment module Workspaces module Reconcile module Input - # noinspection RubyLocalVariableNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ class ParamsExtractor include Messages diff --git a/ee/lib/remote_development/workspaces/reconcile/input/params_to_infos_converter.rb b/ee/lib/remote_development/workspaces/reconcile/input/params_to_infos_converter.rb index 5d9a23d720359..657469853abf5 100644 --- a/ee/lib/remote_development/workspaces/reconcile/input/params_to_infos_converter.rb +++ b/ee/lib/remote_development/workspaces/reconcile/input/params_to_infos_converter.rb @@ -4,7 +4,6 @@ module RemoteDevelopment module Workspaces module Reconcile module Input - # noinspection RubyLocalVariableNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ class ParamsToInfosConverter include Messages diff --git a/ee/lib/remote_development/workspaces/reconcile/input/params_validator.rb b/ee/lib/remote_development/workspaces/reconcile/input/params_validator.rb index 9b0cb0c1a7f57..0749b8602dab1 100644 --- a/ee/lib/remote_development/workspaces/reconcile/input/params_validator.rb +++ b/ee/lib/remote_development/workspaces/reconcile/input/params_validator.rb @@ -4,7 +4,6 @@ module RemoteDevelopment module Workspaces module Reconcile module Input - # noinspection RubyClassMethodNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ class ParamsValidator include Messages include UpdateTypes diff --git a/ee/lib/remote_development/workspaces/reconcile/output/desired_config_generator.rb b/ee/lib/remote_development/workspaces/reconcile/output/desired_config_generator.rb index 8c32a5e2f1b43..6ea5007cc740a 100644 --- a/ee/lib/remote_development/workspaces/reconcile/output/desired_config_generator.rb +++ b/ee/lib/remote_development/workspaces/reconcile/output/desired_config_generator.rb @@ -4,10 +4,6 @@ module RemoteDevelopment module Workspaces module Reconcile module Output - # rubocop:disable Layout/LineLength -- we want the following noinspection comments to remain on a single line - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 - # noinspection RubyClassMethodNamingConvention,RubyLocalVariableNamingConvention,RubyParameterNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ - # rubocop:enable Layout/LineLength class DesiredConfigGenerator include States diff --git a/ee/lib/remote_development/workspaces/reconcile/output/desired_config_generator_v2.rb b/ee/lib/remote_development/workspaces/reconcile/output/desired_config_generator_v2.rb index 59dadd7e7da63..61341c477822e 100644 --- a/ee/lib/remote_development/workspaces/reconcile/output/desired_config_generator_v2.rb +++ b/ee/lib/remote_development/workspaces/reconcile/output/desired_config_generator_v2.rb @@ -4,10 +4,6 @@ module RemoteDevelopment module Workspaces module Reconcile module Output - # rubocop:disable Layout/LineLength -- we want the following noinspection comments to remain on a single line - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 - # noinspection RubyClassMethodNamingConvention,RubyLocalVariableNamingConvention,RubyParameterNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ - # rubocop:enable Layout/LineLength class DesiredConfigGeneratorV2 include States diff --git a/ee/lib/remote_development/workspaces/reconcile/output/devfile_parser.rb b/ee/lib/remote_development/workspaces/reconcile/output/devfile_parser.rb index 4473ffdc41c54..0a642fda97229 100644 --- a/ee/lib/remote_development/workspaces/reconcile/output/devfile_parser.rb +++ b/ee/lib/remote_development/workspaces/reconcile/output/devfile_parser.rb @@ -6,7 +6,6 @@ module RemoteDevelopment module Workspaces module Reconcile module Output - # noinspection RubyClassMethodNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ class DevfileParser # rubocop:todo Metrics/ParameterLists -- refactor this to have fewer parameters - perhaps introduce a parameter object: https://refactoring.com/catalog/introduceParameterObject.html # @param [String] processed_devfile diff --git a/ee/lib/remote_development/workspaces/reconcile/output/devfile_parser_v2.rb b/ee/lib/remote_development/workspaces/reconcile/output/devfile_parser_v2.rb index 399f92856bac3..a4e9d55d491db 100644 --- a/ee/lib/remote_development/workspaces/reconcile/output/devfile_parser_v2.rb +++ b/ee/lib/remote_development/workspaces/reconcile/output/devfile_parser_v2.rb @@ -6,7 +6,6 @@ module RemoteDevelopment module Workspaces module Reconcile module Output - # noinspection RubyClassMethodNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ class DevfileParserV2 # rubocop:todo Metrics/ParameterLists -- refactor this to have fewer parameters - perhaps introduce a parameter object: https://refactoring.com/catalog/introduceParameterObject.html # @param [String] processed_devfile diff --git a/ee/lib/remote_development/workspaces/reconcile/output/workspaces_to_rails_infos_converter.rb b/ee/lib/remote_development/workspaces/reconcile/output/workspaces_to_rails_infos_converter.rb index 4469c9d131a2a..59c2d6f0aded3 100644 --- a/ee/lib/remote_development/workspaces/reconcile/output/workspaces_to_rails_infos_converter.rb +++ b/ee/lib/remote_development/workspaces/reconcile/output/workspaces_to_rails_infos_converter.rb @@ -4,7 +4,6 @@ module RemoteDevelopment module Workspaces module Reconcile module Output - # noinspection RubyClassModuleNamingConvention,RubyClassMethodNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ class WorkspacesToRailsInfosConverter include Messages include UpdateTypes diff --git a/ee/lib/remote_development/workspaces/reconcile/persistence/orphaned_workspaces_observer.rb b/ee/lib/remote_development/workspaces/reconcile/persistence/orphaned_workspaces_observer.rb index 05e8e75db5d55..57669071a9163 100644 --- a/ee/lib/remote_development/workspaces/reconcile/persistence/orphaned_workspaces_observer.rb +++ b/ee/lib/remote_development/workspaces/reconcile/persistence/orphaned_workspaces_observer.rb @@ -4,7 +4,6 @@ module RemoteDevelopment module Workspaces module Reconcile module Persistence - # noinspection RubyLocalVariableNamingConvention,RubyParameterNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ class OrphanedWorkspacesObserver # @param [Hash] value # @return [Hash] diff --git a/ee/lib/remote_development/workspaces/reconcile/persistence/workspaces_from_agent_infos_updater.rb b/ee/lib/remote_development/workspaces/reconcile/persistence/workspaces_from_agent_infos_updater.rb index e1d6ed4b51bf9..c5e1399a69dac 100644 --- a/ee/lib/remote_development/workspaces/reconcile/persistence/workspaces_from_agent_infos_updater.rb +++ b/ee/lib/remote_development/workspaces/reconcile/persistence/workspaces_from_agent_infos_updater.rb @@ -4,9 +4,6 @@ module RemoteDevelopment module Workspaces module Reconcile module Persistence - # rubocop:disable Layout/LineLength -- we want the following noinspection comments to remain on a single line - # noinspection RubyLocalVariableNamingConvention,RubyClassModuleNamingConvention,RubyClassMethodNamingConvention,RubyParameterNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ - # rubocop:enable Layout/LineLength # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 class WorkspacesFromAgentInfosUpdater # @param [Hash] value diff --git a/ee/lib/remote_development/workspaces/reconcile/persistence/workspaces_to_be_returned_finder.rb b/ee/lib/remote_development/workspaces/reconcile/persistence/workspaces_to_be_returned_finder.rb index ef612d600b04e..61c4ff6715a00 100644 --- a/ee/lib/remote_development/workspaces/reconcile/persistence/workspaces_to_be_returned_finder.rb +++ b/ee/lib/remote_development/workspaces/reconcile/persistence/workspaces_to_be_returned_finder.rb @@ -4,9 +4,6 @@ module RemoteDevelopment module Workspaces module Reconcile module Persistence - # rubocop:disable Layout/LineLength -- we want the following noinspection comments to remain on a single line - # noinspection RubyLocalVariableNamingConvention,RubyClassMethodNamingConvention,RubyParameterNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ - # rubocop:enable Layout/LineLength class WorkspacesToBeReturnedFinder include UpdateTypes diff --git a/ee/spec/factories/remote_development/workspaces.rb b/ee/spec/factories/remote_development/workspaces.rb index a5a84ff453b1c..b8912b6bd194b 100644 --- a/ee/spec/factories/remote_development/workspaces.rb +++ b/ee/spec/factories/remote_development/workspaces.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true FactoryBot.define do + # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 factory :workspace, class: 'RemoteDevelopment::Workspace' do project factory: [:project, :in_group] user @@ -17,19 +18,15 @@ actual_state { RemoteDevelopment::Workspaces::States::STOPPED } deployment_resource_version { 2 } editor { 'webide' } - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 max_hours_before_termination { 24 } - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 devfile_ref { 'main' } - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 devfile_path { '.devfile.yaml' } devfile do File.read(Rails.root.join('ee/spec/fixtures/remote_development/example.devfile.yaml').to_s) end - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 processed_devfile do File.read(Rails.root.join('ee/spec/fixtures/remote_development/example.processed-devfile.yaml').to_s) end @@ -37,16 +34,13 @@ transient do without_workspace_variables { false } random_string { SecureRandom.alphanumeric(6).downcase } - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 skip_realistic_after_create_timestamp_updates { false } - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 is_after_reconciliation_finish { false } end # Use this trait if you want to directly control any timestamp fields when invoking the factory. trait :without_realistic_after_create_timestamp_updates do transient do - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 skip_realistic_after_create_timestamp_updates { true } end end @@ -55,7 +49,6 @@ # agent has already received config to apply from Rails trait :after_initial_reconciliation do transient do - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 is_after_reconciliation_finish { true } end end @@ -69,12 +62,9 @@ end after(:create) do |workspace, evaluator| - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-25400 if evaluator.skip_realistic_after_create_timestamp_updates # Set responded_to_agent_at to a non-nil value unless it has already been set - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 workspace.update!(responded_to_agent_at: workspace.updated_at) unless workspace.responded_to_agent_at - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-25400 elsif evaluator.is_after_reconciliation_finish # The most recent activity was reconciliation where info for the workspace was reported to the agent # This DOES NOT necessarily mean that the actual and desired states for the workspace are now the same @@ -126,7 +116,6 @@ trait :unprovisioned do desired_state { RemoteDevelopment::Workspaces::States::RUNNING } actual_state { RemoteDevelopment::Workspaces::States::CREATION_REQUESTED } - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 responded_to_agent_at { nil } deployment_resource_version { nil } end diff --git a/ee/spec/features/remote_development/workspaces_dropdown_group_spec.rb b/ee/spec/features/remote_development/workspaces_dropdown_group_spec.rb index e02fa6417a877..c8ad351ba9ca2 100644 --- a/ee/spec/features/remote_development/workspaces_dropdown_group_spec.rb +++ b/ee/spec/features/remote_development/workspaces_dropdown_group_spec.rb @@ -2,6 +2,7 @@ require 'spec_helper' +# noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 RSpec.describe 'Remote Development workspaces dropdown group', :api, :js, feature_category: :remote_development do include_context 'with remote development shared fixtures' include_context 'file upload requests helpers' @@ -78,7 +79,6 @@ it 'allows navigating to the new workspace page' do click_link 'New workspace' - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 expect(page).to have_current_path("#{new_remote_development_workspace_path}?project=#{project.full_path}") expect(page).to have_css('button', text: project.name_with_namespace) end @@ -101,7 +101,6 @@ expect(page).to have_button('Stopping', disabled: true) end - # noinspection RubyInstanceMethodNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ def expect_workspace_state_indicator(state) indicator = find_by_testid("workspace-state-indicator") @@ -117,7 +116,6 @@ def expect_workspace_state_indicator(state) end describe 'when viewing blob page' do - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 let(:subject) { project_blob_path(project, "#{project.default_branch}/#{devfile_path}") } it_behaves_like 'views and manages workspaces in workspaces dropdown group' diff --git a/ee/spec/features/remote_development/workspaces_spec.rb b/ee/spec/features/remote_development/workspaces_spec.rb index 06d7620d75a3a..7548665b8ff5d 100644 --- a/ee/spec/features/remote_development/workspaces_spec.rb +++ b/ee/spec/features/remote_development/workspaces_spec.rb @@ -2,6 +2,7 @@ require 'spec_helper' +# noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 RSpec.describe 'Remote Development workspaces', :api, :js, feature_category: :remote_development do include_context 'with remote development shared fixtures' include_context 'file upload requests helpers' @@ -46,7 +47,6 @@ # NAVIGATE TO WORKSPACES PAGE - # noinspection RubyResolve - likely related to this, but for routes: https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 visit remote_development_workspaces_path wait_for_requests @@ -56,7 +56,7 @@ click_button 'Select a project' find_by_testid("listbox-item-#{project.full_path}").click wait_for_requests - # noinspection RubyMismatchedArgumentType - Rubymine can't resolve correct #select, probably not a fixable bug + # noinspection RubyMismatchedArgumentType - TODO: Try suggestions in https://youtrack.jetbrains.com/issue/RUBY-25400/Programmatically-defined-constants-always-produce-Unresolved-reference-error#focus=Comments-27-8161148.0-0 select agent.name, from: 'Select cluster agent' fill_in 'Time before automatic termination', with: '20' click_button 'Create workspace' @@ -237,14 +237,12 @@ def simulate_fourth_poll(workspace:) expect(info.fetch(:config_to_apply)).to be_nil end - # noinspection RubyInstanceMethodNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ def expect_workspace_state_indicator(state) indicator = find_by_testid('workspace-state-indicator') expect(indicator).to have_text(state) end - # noinspection RubyParameterNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ def simulate_agentk_reconcile_post(workspace_agent_infos:) post_params = { update_type: 'partial', diff --git a/ee/spec/frontend/remote_development/components/common/get_project_details_query_spec.js b/ee/spec/frontend/remote_development/components/common/get_project_details_query_spec.js index 040a90f04650e..fe6f437da14fd 100644 --- a/ee/spec/frontend/remote_development/components/common/get_project_details_query_spec.js +++ b/ee/spec/frontend/remote_development/components/common/get_project_details_query_spec.js @@ -50,6 +50,7 @@ describe('remote_development/components/create/get_project_details_query', () => [getGroupClusterAgentsQuery, getGroupClusterAgentsQueryHandler], ]); + // noinspection JSCheckFunctionSignatures - TODO: Address in https://gitlab.com/gitlab-org/gitlab/-/issues/437600 wrapper = shallowMountExtended(GetProjectDetailsQuery, { apolloProvider, propsData: { diff --git a/ee/spec/frontend/remote_development/components/common/workspaces_breadcrumbs_spec.js b/ee/spec/frontend/remote_development/components/common/workspaces_breadcrumbs_spec.js index 51042cdb0004a..25e864da3a6e9 100644 --- a/ee/spec/frontend/remote_development/components/common/workspaces_breadcrumbs_spec.js +++ b/ee/spec/frontend/remote_development/components/common/workspaces_breadcrumbs_spec.js @@ -23,8 +23,10 @@ describe('WorkspacesBreadcrumbs', () => { const findBreadcrumbs = () => wrapper.findComponent(GlBreadcrumb); const createWrapper = () => { + // noinspection JSCheckFunctionSignatures - TODO: Address in https://gitlab.com/gitlab-org/gitlab/-/issues/437600 router = createRouter(base); + // noinspection JSValidateTypes - TODO: Address in https://gitlab.com/gitlab-org/gitlab/-/issues/437600 wrapper = shallowMount(WorkspacesBreadcrumbs, { router }); }; diff --git a/ee/spec/frontend/remote_development/components/create/search_projects_listbox_spec.js b/ee/spec/frontend/remote_development/components/create/search_projects_listbox_spec.js index 6e3451050fba3..bd501d40d8944 100644 --- a/ee/spec/frontend/remote_development/components/create/search_projects_listbox_spec.js +++ b/ee/spec/frontend/remote_development/components/create/search_projects_listbox_spec.js @@ -38,6 +38,7 @@ describe('remote_development/components/create/search_projects_listbox', () => { visibility, membership, } = {}) => { + // noinspection JSCheckFunctionSignatures - TODO: Address in https://gitlab.com/gitlab-org/gitlab/-/issues/437600 wrapper = mountFn(SelectProjectListbox, { apolloProvider: mockApollo, propsData: { @@ -151,6 +152,7 @@ describe('remote_development/components/create/search_projects_listbox', () => { const selectedProject = SEARCH_PROJECTS_QUERY_RESULT.data.projects.nodes[0]; beforeEach(async () => { + // noinspection JSCheckFunctionSignatures - TODO: Address in https://gitlab.com/gitlab-org/gitlab/-/issues/437600 buildWrapper({ value: selectedProject }); await waitForPromises(); diff --git a/ee/spec/frontend/remote_development/components/list/empty_state_spec.js b/ee/spec/frontend/remote_development/components/list/empty_state_spec.js index 24703f3c0908e..d5435e8a6649a 100644 --- a/ee/spec/frontend/remote_development/components/list/empty_state_spec.js +++ b/ee/spec/frontend/remote_development/components/list/empty_state_spec.js @@ -11,6 +11,7 @@ describe('remote_development/components/list/empty_state.vue', () => { const findEmptyState = () => wrapper.findComponent(GlEmptyState); const createComponent = () => { + // noinspection JSCheckFunctionSignatures - TODO: Address in https://gitlab.com/gitlab-org/gitlab/-/issues/437600 wrapper = shallowMount(EmptyState, { provide: { emptyStateSvgPath: SVG_PATH, diff --git a/ee/spec/frontend/remote_development/components/list/workspaces_table_spec.js b/ee/spec/frontend/remote_development/components/list/workspaces_table_spec.js index 3c6ff6b91997b..50e61dd11a918 100644 --- a/ee/spec/frontend/remote_development/components/list/workspaces_table_spec.js +++ b/ee/spec/frontend/remote_development/components/list/workspaces_table_spec.js @@ -57,6 +57,7 @@ describe('remote_development/components/list/workspaces_table.vue', () => { ), } = {}) => { updateWorkspaceMutationMock = jest.fn(); + // noinspection JSCheckFunctionSignatures - TODO: Address in https://gitlab.com/gitlab-org/gitlab/-/issues/437600 wrapper = mount(WorkspacesTable, { provide: { emptyStateSvgPath: SVG_PATH, diff --git a/ee/spec/frontend/remote_development/components/workspaces_dropdown_group/workspace_dropdown_item_spec.js b/ee/spec/frontend/remote_development/components/workspaces_dropdown_group/workspace_dropdown_item_spec.js index f793829f7c59d..22eda3726c516 100644 --- a/ee/spec/frontend/remote_development/components/workspaces_dropdown_group/workspace_dropdown_item_spec.js +++ b/ee/spec/frontend/remote_development/components/workspaces_dropdown_group/workspace_dropdown_item_spec.js @@ -13,6 +13,7 @@ describe('remote_development/components/workspaces_dropdown_group/workspace_drop let trackingSpy; const createWrapper = () => { + // noinspection JSCheckFunctionSignatures - TODO: Address in https://gitlab.com/gitlab-org/gitlab/-/issues/437600 wrapper = shallowMountExtended(WorkspaceDropdownItem, { propsData: { workspace: WORKSPACE, diff --git a/ee/spec/frontend/remote_development/components/workspaces_dropdown_group/workspaces_dropdown_group_spec.js b/ee/spec/frontend/remote_development/components/workspaces_dropdown_group/workspaces_dropdown_group_spec.js index ad6667b4baf9a..2677da00ca136 100644 --- a/ee/spec/frontend/remote_development/components/workspaces_dropdown_group/workspaces_dropdown_group_spec.js +++ b/ee/spec/frontend/remote_development/components/workspaces_dropdown_group/workspaces_dropdown_group_spec.js @@ -51,6 +51,7 @@ describe('remote_development/components/workspaces_dropdown_group/workspaces_dro const createWrapper = ({ propsData = {}, glFeatures = { remoteDevelopment: true } } = {}) => { updateWorkspaceMutationMock = jest.fn(); + // noinspection JSCheckFunctionSignatures - TODO: Address in https://gitlab.com/gitlab-org/gitlab/-/issues/437600 wrapper = shallowMountExtended(WorkspacesDropdownGroup, { apolloProvider: mockApollo, provide: { diff --git a/ee/spec/frontend/remote_development/pages/create_spec.js b/ee/spec/frontend/remote_development/pages/create_spec.js index 83ee3f080f642..a1e1a1e1d2075 100644 --- a/ee/spec/frontend/remote_development/pages/create_spec.js +++ b/ee/spec/frontend/remote_development/pages/create_spec.js @@ -93,6 +93,7 @@ describe('remote_development/pages/create.vue', () => { }; const createWrapper = () => { + // noinspection JSCheckFunctionSignatures - TODO: Address in https://gitlab.com/gitlab-org/gitlab/-/issues/437600 wrapper = shallowMountExtended(WorkspaceCreate, { apolloProvider: mockApollo, stubs: { diff --git a/ee/spec/frontend/remote_development/pages/list_spec.js b/ee/spec/frontend/remote_development/pages/list_spec.js index e449adb53f17b..808a8a6589e1a 100644 --- a/ee/spec/frontend/remote_development/pages/list_spec.js +++ b/ee/spec/frontend/remote_development/pages/list_spec.js @@ -45,6 +45,7 @@ describe('remote_development/pages/list.vue', () => { ]); }; const createWrapper = () => { + // noinspection JSCheckFunctionSignatures - TODO: Address in https://gitlab.com/gitlab-org/gitlab/-/issues/437600 wrapper = mount(List, { apolloProvider: mockApollo, provide: { diff --git a/ee/spec/frontend/remote_development/router/index_spec.js b/ee/spec/frontend/remote_development/router/index_spec.js index 87ec6f90c8e92..ad808ba69c448 100644 --- a/ee/spec/frontend/remote_development/router/index_spec.js +++ b/ee/spec/frontend/remote_development/router/index_spec.js @@ -25,6 +25,7 @@ describe('remote_development/router/index.js', () => { let wrapper; beforeEach(() => { + // noinspection JSCheckFunctionSignatures - TODO: Address in https://gitlab.com/gitlab-org/gitlab/-/issues/437600 router = createRouter(ROUTES.index); }); @@ -35,6 +36,7 @@ describe('remote_development/router/index.js', () => { const mountApp = async (route = ROUTES.index) => { await router.push(route); + // noinspection JSCheckFunctionSignatures - TODO: Address in https://gitlab.com/gitlab-org/gitlab/-/issues/437600 wrapper = mountExtended(App, { router, apolloProvider: createMockApollo([ diff --git a/ee/spec/lib/remote_development/agent_config/main_spec.rb b/ee/spec/lib/remote_development/agent_config/main_spec.rb index 8fc4cca0867b5..eab54a917db4d 100644 --- a/ee/spec/lib/remote_development/agent_config/main_spec.rb +++ b/ee/spec/lib/remote_development/agent_config/main_spec.rb @@ -116,6 +116,9 @@ end context 'when an invalid Result is returned' do + # TODO: The following 'noinspection RailsParamDefResolve' is not finding the factory. We need to open a bug against + # JetBrains and track at + # https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues # noinspection RailsParamDefResolve let(:agent_config) { build_stubbed(:agent_config) } diff --git a/ee/spec/lib/remote_development/agent_config/updater_spec.rb b/ee/spec/lib/remote_development/agent_config/updater_spec.rb index cb0a687c7cdcd..626da2b420c7d 100644 --- a/ee/spec/lib/remote_development/agent_config/updater_spec.rb +++ b/ee/spec/lib/remote_development/agent_config/updater_spec.rb @@ -2,6 +2,7 @@ require 'spec_helper' +# noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 RSpec.describe ::RemoteDevelopment::AgentConfig::Updater, feature_category: :remote_development do include ResultMatchers diff --git a/ee/spec/lib/remote_development/workspaces/create/post_flatten_devfile_validator_spec.rb b/ee/spec/lib/remote_development/workspaces/create/post_flatten_devfile_validator_spec.rb index d987c4304b1b5..537e1d26d5312 100644 --- a/ee/spec/lib/remote_development/workspaces/create/post_flatten_devfile_validator_spec.rb +++ b/ee/spec/lib/remote_development/workspaces/create/post_flatten_devfile_validator_spec.rb @@ -64,7 +64,6 @@ is_expected.to be_err_result do |message| expect(message).to be_a(RemoteDevelopment::Messages::WorkspaceCreatePostFlattenDevfileValidationFailed) message.context => { details: String => error_details } - # noinspection RubyResolve expect(error_details).to eq(error_str) end end @@ -96,7 +95,6 @@ is_expected.to be_err_result do |message| expect(message).to be_a(RemoteDevelopment::Messages::WorkspaceCreatePostFlattenDevfileValidationFailed) message.context => { details: String => error_details } - # noinspection RubyResolve expect(error_details).to eq(error_str) end end diff --git a/ee/spec/lib/remote_development/workspaces/reconcile/input/actual_state_calculator_spec.rb b/ee/spec/lib/remote_development/workspaces/reconcile/input/actual_state_calculator_spec.rb index 764bcc1841330..d5dbe14029713 100644 --- a/ee/spec/lib/remote_development/workspaces/reconcile/input/actual_state_calculator_spec.rb +++ b/ee/spec/lib/remote_development/workspaces/reconcile/input/actual_state_calculator_spec.rb @@ -57,7 +57,7 @@ workspace_variables_env_var: {}, workspace_variables_file: {} ) - workspace_agent_info_hash.fetch(:latest_k8s_deployment_info) + workspace_agent_info_hash.fetch(:latest_k8s_deployment_info).to_h end it 'calculates correct actual state' do @@ -273,7 +273,7 @@ - reason: test type: test WORKSPACE_STATUS_YAML - ).deep_symbolize_keys + ).deep_symbolize_keys.to_h end it 'returns the expected actual state' do diff --git a/ee/spec/lib/remote_development/workspaces/reconcile/main_integration_spec.rb b/ee/spec/lib/remote_development/workspaces/reconcile/main_integration_spec.rb index 2da75da4eb7cc..b480ad8a8ee4f 100644 --- a/ee/spec/lib/remote_development/workspaces/reconcile/main_integration_spec.rb +++ b/ee/spec/lib/remote_development/workspaces/reconcile/main_integration_spec.rb @@ -2,6 +2,7 @@ require 'spec_helper' +# noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 RSpec.describe RemoteDevelopment::Workspaces::Reconcile::Main, "Integration", :freeze_time, feature_category: :remote_development do include_context 'with remote development shared fixtures' @@ -183,7 +184,6 @@ .to eq(expected_deployment_resource_version) # test the config to apply first to get a more specific diff if it fails - # noinspection RubyLocalVariableNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ provisioned_workspace_rails_info = workspace_rails_infos.detect { |info| info.fetch(:name) == workspace.name } # Since the workspace is now in Error state, the config should not be returned to the agent @@ -258,7 +258,6 @@ context 'with timestamp precondition checks' do # rubocop:disable RSpec/ExpectInHook -- We want it this way - this before/after expectation structure reads clearly and cohesively for checking the timestamps before and after - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 before do # Ensure that both desired_state_updated_at and responded_to_agent_at are before Time.current, # so that we can test for any necessary differences after processing updates them @@ -266,7 +265,6 @@ expect(workspace.responded_to_agent_at).to be_before(Time.current) end - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 after do # After processing, the responded_to_agent_at should always have been updated workspace.reload @@ -277,7 +275,6 @@ context 'when desired_state matches actual_state' do # rubocop:todo RSpec/ExpectInHook -- This could be moved to a shared example - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 before do expect(workspace.responded_to_agent_at) .to be_after(workspace.desired_state_updated_at) @@ -333,7 +330,6 @@ end end - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 context 'when desired_state does not match actual_state' do let(:deployment_resource_version_from_agent) { workspace.deployment_resource_version } @@ -351,17 +347,14 @@ # rubocop:disable RSpec/ExpectInHook -- This could be moved to a shared example before do - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 expect(workspace.responded_to_agent_at) .to be_before(workspace.desired_state_updated_at) end # rubocop:enable RSpec/ExpectInHook - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 context 'when desired_state is Running' do let(:desired_state) { RemoteDevelopment::Workspaces::States::RUNNING } - # noinspection RubyLocalVariableNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ it 'returns proper workspace_rails_info entry with config_to_apply' do # verify initial states in db (sanity check of match between factory and fixtures) expect(workspace.desired_state).to eq(desired_state) @@ -391,7 +384,6 @@ let(:desired_state) { RemoteDevelopment::Workspaces::States::TERMINATED } let(:expected_value_for_started) { false } - # noinspection RubyLocalVariableNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ it 'returns proper workspace_rails_info entry with config_to_apply' do # verify initial states in db (sanity check of match between factory and fixtures) expect(workspace.desired_state).to eq(desired_state) @@ -421,7 +413,6 @@ let(:desired_state) { RemoteDevelopment::Workspaces::States::RESTART_REQUESTED } let(:expected_desired_state) { RemoteDevelopment::Workspaces::States::RUNNING } - # noinspection RubyLocalVariableNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ it 'changes desired_state to Running' do # verify initial states in db (sanity check of match between factory and fixtures) expect(workspace.desired_state).to eq(desired_state) @@ -522,7 +513,6 @@ let(:workspace_agent_infos) { [] } - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 let(:expected_config_to_apply) do create_config_to_apply( workspace: unprovisioned_workspace, @@ -534,7 +524,6 @@ ) end - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 let(:expected_unprovisioned_workspace_rails_info) do { name: unprovisioned_workspace.name, @@ -548,8 +537,6 @@ let(:expected_workspace_rails_infos) { [expected_unprovisioned_workspace_rails_info] } - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 - # noinspection RubyLocalVariableNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ it 'returns proper workspace_rails_info entry' do # verify initial states in db (sanity check of match between factory and fixtures) expect(unprovisioned_workspace.desired_state).to eq(desired_state) @@ -560,7 +547,6 @@ expect(workspace_rails_infos.length).to eq(1) # test the config to apply first to get a more specific diff if it fails - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 unprovisioned_workspace_rails_info = workspace_rails_infos.detect { |info| info.fetch(:name) == unprovisioned_workspace.name } expect(unprovisioned_workspace_rails_info.fetch(:config_to_apply)) diff --git a/ee/spec/lib/remote_development/workspaces/reconcile/main_reconcile_scenarios_spec.rb b/ee/spec/lib/remote_development/workspaces/reconcile/main_reconcile_scenarios_spec.rb index c20b66b4958bd..a1f00d06491b6 100644 --- a/ee/spec/lib/remote_development/workspaces/reconcile/main_reconcile_scenarios_spec.rb +++ b/ee/spec/lib/remote_development/workspaces/reconcile/main_reconcile_scenarios_spec.rb @@ -146,13 +146,10 @@ # rubocop:enable Layout/LineLength, Style/TrailingCommaInArrayLiteral with_them do - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31544 - # noinspection RubyInstanceMethodNamingConvention,RubyLocalVariableNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ it 'behaves as expected' do expect(logger).not_to receive(:warn) expect(logger).not_to receive(:error) - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31544 expected_db_expectations_length = (initial_db_state ? 1 : 0) + (user_desired_state_update ? 1 : 0) + agent_actual_state_updates.length expect(db_expectations.length).to eq(expected_db_expectations_length) @@ -162,7 +159,6 @@ initial_resource_version = '1' # Handle initial db state, if necessary - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31544 if initial_db_state workspace = create( :workspace, @@ -182,7 +178,6 @@ # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31544 if user_desired_state_update if workspace - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31544 workspace.update!(desired_state: user_desired_state_update.to_s.camelize) else workspace = create(:workspace, :unprovisioned, agent: agent) @@ -197,8 +192,6 @@ raise 'Must have workspace by now, either from initial_db_state or user_desired_state_update' unless workspace # Handle agent updates - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31544 - # noinspection RubyLocalVariableNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ agent_actual_state_updates.each_with_index do |actual_state_update_fixture_args, response_expectations_index| update_type = RemoteDevelopment::Workspaces::Reconcile::UpdateTypes::PARTIAL deployment_resource_version_from_agent ||= initial_resource_version diff --git a/ee/spec/lib/remote_development/workspaces/reconcile/persistence/workspaces_to_be_returned_finder_spec.rb b/ee/spec/lib/remote_development/workspaces/reconcile/persistence/workspaces_to_be_returned_finder_spec.rb index d6bda7662bacd..bb704014eef7d 100644 --- a/ee/spec/lib/remote_development/workspaces/reconcile/persistence/workspaces_to_be_returned_finder_spec.rb +++ b/ee/spec/lib/remote_development/workspaces/reconcile/persistence/workspaces_to_be_returned_finder_spec.rb @@ -2,6 +2,7 @@ require 'spec_helper' +# noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 RSpec.describe RemoteDevelopment::Workspaces::Reconcile::Persistence::WorkspacesToBeReturnedFinder, feature_category: :remote_development do let_it_be(:user) { create(:user) } let_it_be(:agent) { create(:ee_cluster_agent, :with_remote_development_agent_config) } @@ -67,7 +68,6 @@ ) end - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31543 let(:workspaces_from_agent_infos) { [workspace_from_agent_info] } let(:value) do @@ -82,7 +82,6 @@ described_class.find(value) end - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31543 before do agent.reload @@ -122,7 +121,6 @@ context "with fixture sanity checks" do let(:update_type) { RemoteDevelopment::Workspaces::Reconcile::UpdateTypes::FULL } - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31543 it "has the expected fixtures" do expect(workspace_only_returned_by_full_update.desired_state_updated_at) .to be < workspace_only_returned_by_full_update.responded_to_agent_at @@ -138,7 +136,6 @@ context "for update_type FULL" do let(:update_type) { RemoteDevelopment::Workspaces::Reconcile::UpdateTypes::FULL } - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31543 let(:expected_workspaces_to_be_returned) do [ # Includes ALL workspaces including workspace_only_returned_by_full_update @@ -168,7 +165,6 @@ context "for update_type PARTIAL" do let(:update_type) { RemoteDevelopment::Workspaces::Reconcile::UpdateTypes::PARTIAL } - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31543 let(:expected_workspaces_to_be_returned) do [ # Does NOT include workspace_only_returned_by_full_update diff --git a/ee/spec/lib/remote_development/workspaces/reconcile/persistence/workspaces_to_be_returned_updater_spec.rb b/ee/spec/lib/remote_development/workspaces/reconcile/persistence/workspaces_to_be_returned_updater_spec.rb index 8269d536bcedc..e2e00e9aeb559 100644 --- a/ee/spec/lib/remote_development/workspaces/reconcile/persistence/workspaces_to_be_returned_updater_spec.rb +++ b/ee/spec/lib/remote_development/workspaces/reconcile/persistence/workspaces_to_be_returned_updater_spec.rb @@ -2,6 +2,7 @@ require 'spec_helper' +# noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 RSpec.describe RemoteDevelopment::Workspaces::Reconcile::Persistence::WorkspacesToBeReturnedUpdater, feature_category: :remote_development do let_it_be(:user) { create(:user) } let_it_be(:agent) { create(:ee_cluster_agent, :with_remote_development_agent_config) } @@ -39,7 +40,6 @@ ) end - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31543 let(:workspaces_to_be_returned) { [workspace1, workspace2, workspace3] } let(:value) do @@ -53,7 +53,6 @@ described_class.update(value) # rubocop:disable Rails/SaveBang -- This is not an ActiveRecord method end - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31543 before do workspace1.update_attribute(:responded_to_agent_at, 2.hours.ago) workspace2.update_attribute(:responded_to_agent_at, 2.hours.ago) @@ -62,7 +61,6 @@ end context "with fixture sanity checks" do - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31543 it "has the expected fixtures" do expect(workspace1.responded_to_agent_at).to be < 1.hour.ago expect(workspace2.responded_to_agent_at).to be < 1.hour.ago @@ -70,7 +68,6 @@ end context "for update_type FULL" do - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31543 it "updates all workspaces", :unlimited_max_formatted_output_length do returned_value expect(workspace1.reload.responded_to_agent_at).to be > 1.minute.ago @@ -78,7 +75,6 @@ expect(workspace3.reload.responded_to_agent_at).to be > 1.minute.ago end - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31543 it "preserves existing value entries" do returned_value expect(returned_value).to eq(value.merge(workspaces_to_be_returned: [workspace1.reload, workspace2.reload, diff --git a/ee/spec/models/remote_development/remote_development_agent_config_spec.rb b/ee/spec/models/remote_development/remote_development_agent_config_spec.rb index 2ec10b40fbde6..b2e666bed9f48 100644 --- a/ee/spec/models/remote_development/remote_development_agent_config_spec.rb +++ b/ee/spec/models/remote_development/remote_development_agent_config_spec.rb @@ -4,7 +4,6 @@ # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 RSpec.describe RemoteDevelopment::RemoteDevelopmentAgentConfig, feature_category: :remote_development do - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31543 let_it_be_with_reload(:agent) { create(:ee_cluster_agent, :with_remote_development_agent_config) } let(:default_default_resources_per_workspace_container) { {} } let(:default_max_resources_per_workspace) { {} } diff --git a/ee/spec/requests/api/graphql/mutations/remote_development/workspaces/create_spec.rb b/ee/spec/requests/api/graphql/mutations/remote_development/workspaces/create_spec.rb index 57e7b9626a307..8cd3bb1fe0e8c 100644 --- a/ee/spec/requests/api/graphql/mutations/remote_development/workspaces/create_spec.rb +++ b/ee/spec/requests/api/graphql/mutations/remote_development/workspaces/create_spec.rb @@ -46,7 +46,6 @@ let_it_be(:created_workspace, refind: true) { create(:workspace, user: user) } - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 let(:stub_service_payload) { { workspace: created_workspace } } let(:stub_service_response) do ServiceResponse.success(payload: stub_service_payload) @@ -74,7 +73,6 @@ def mutation_response expect_graphql_errors_to_be_empty - # noinspection RubyResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542 expect(mutation_response.fetch('workspace')['name']).to eq(created_workspace['name']) end diff --git a/ee/spec/support/helpers/remote_development/railway_oriented_programming_helpers.rb b/ee/spec/support/helpers/remote_development/railway_oriented_programming_helpers.rb index a1c0d5aecf3ed..56a8109b6f3b0 100644 --- a/ee/spec/support/helpers/remote_development/railway_oriented_programming_helpers.rb +++ b/ee/spec/support/helpers/remote_development/railway_oriented_programming_helpers.rb @@ -1,8 +1,6 @@ # frozen_string_literal: true module RemoteDevelopment - # noinspection RubyClassModuleNamingConvention, RubyInstanceMethodNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ - # noinspection RubyInstanceMethodNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ module RailwayOrientedProgrammingHelpers # NOTE: Depends upon `value` being defined in the including spec def stub_methods_to_return_ok_result(*methods) @@ -14,7 +12,6 @@ def stub_methods_to_return_ok_result(*methods) # NOTE: Depends upon `value` and `err_message_context` being defined in the including spec def stub_methods_to_return_err_result(method:, message_class:) allow(method).to receive(:call).with(value) do - # noinspection RubyResolve Result.err(message_class.new(err_message_context)) end end diff --git a/ee/spec/support/shared_contexts/remote_development/remote_development_shared_contexts.rb b/ee/spec/support/shared_contexts/remote_development/remote_development_shared_contexts.rb index c84225432cd74..6b52e536a9880 100644 --- a/ee/spec/support/shared_contexts/remote_development/remote_development_shared_contexts.rb +++ b/ee/spec/support/shared_contexts/remote_development/remote_development_shared_contexts.rb @@ -274,8 +274,6 @@ def create_workspace_agent_info_hash( # rubocop:enable Metrics/ParameterLists # rubocop:enable Metrics/CyclomaticComplexity # rubocop:enable Metrics/PerceivedComplexity - - # noinspection RubyParameterNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ def create_workspace_rails_info( name:, namespace:, @@ -1069,12 +1067,10 @@ def get_workspace_variables_file(workspace_variables:) end end - # noinspection RubyInstanceMethodNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ def get_workspace_host_template_annotation(workspace_name, dns_zone) "{{.port}}-#{workspace_name}.#{dns_zone}" end - # noinspection RubyInstanceMethodNamingConvention - See https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/code-inspection/why-are-there-noinspection-comments/ def get_workspace_host_template_env_var(workspace_name, dns_zone) "${PORT}-#{workspace_name}.#{dns_zone}" end diff --git a/spec/validators/ip_cidr_array_validator_spec.rb b/spec/validators/ip_cidr_array_validator_spec.rb index 6adb0bc70dbcd..f18005054b53d 100644 --- a/spec/validators/ip_cidr_array_validator_spec.rb +++ b/spec/validators/ip_cidr_array_validator_spec.rb @@ -17,7 +17,6 @@ using RSpec::Parameterized::TableSyntax - # noinspection RubyMismatchedArgumentType - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-32041 where(:cidr_array, :validity, :errors) do # rubocop:disable Layout/LineLength -- The RSpec table syntax often requires long lines for errors nil | false | { cidr_array: ["must be an array of CIDR values"] } -- GitLab