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 940bfefce6a9af847bbbe01bbfaddd801aed42d3..86177d7f1c85eedf74bd6cc5cddff3fe45d6cc66 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 1b97427e5eb86c3dcb16d2eec89590a5d7694c11..57c872d73f260bc9cd005a9ed57bfacb11f6e766 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 7db376d19d92b9f51976ab67ce581c87b62907c4..596118354a651bd6463370d4c553d3eda3ea5c6d 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 5e8a4f9bc51e9f798d05396de64ad8489f2f4ecb..b082da362d6245bd64e90a782f695754e81ea217 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 749f5744009280cadbd35908b42e614c3b130110..7c2ee8024deaf3b230645d76f9a97c472284c393 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 880535807c02d9d399ba1806b2600b57a32f886e..97e36aab46a3738be8f2904c79f011901714a1f8 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 4ca802928a50d01b996c66f1b5a531356c866209..1d79ba49357c7b6f7e13e69aafdb094ac29d79ff 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 b96aea7190a5c12d8e66b5373b9944314238fc3f..ff1ff0babf23384ab209dcef5edd42e7efe93165 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 f7fbf4c971844cf045e06d42e84ec31bfc2373c4..63171b708b74409c16929cf830ec2cc2933d37bb 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 07ed8e44f3cbe51d9c0955a1249e9a049efd4cfd..40007da21d61b414af46be061dba4ca8bd4e97b9 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 9647a46e8a06fdc01f23f27cc5ad646bac40a433..091f36e616e73d8501abe5f77e8d7dc537863399 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 8fb66614960c4bb1cea997f3daa1710b586c5615..12b6e484b2fa11f8b426e9b3e022f5e4eea1658a 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 c5e1831528245e153df2ab30def519e06fc4ea78..bd2517266e29f41d76490c26127471a9cdbba06e 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 ad7600cc05b72355e43163fba26206d819296fd4..842722256038c778f535bb932310e7c011e6a874 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 1ee86962b3ce6a0d18a77ce51030e2ea3cc50081..e273853bc2a0d0dc677a81ed6e4e1984a71dbc54 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 1bbbfb59aff1d66aaab0196b65e360f0128b9069..4ccdf9b0b068d3f8220c27a33bd6992d40a38229 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 e48093b7c7ec5f64ce6e73362bd18d5b0367f5fd..37b500c3a9aab9deac7e7ab94b172d12d4e4f7c6 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 fb52d2792ee10c4e8c11d962d73be5c7824a6a5b..521fd2a72d488b90972a8d52d19402b31f4d2df0 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 1c3359cb17cbcdc7034631ba37407b9a2c5a2ee7..c152b660816740358a020a37bb83087e236fc939 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 e6df500ad7cf42848964cae652b5c81df3148501..f91c86aef6aef43224c9fbcc6d3cac6f253aae46 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 5d9a23d7203591bb96b62115e28b6a349395386a..657469853abf5f3f5403ab282671d801d2d8fe5e 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 9b0cb0c1a7f57b66fa34adf58b8f7d896ee859c4..0749b8602dab1f988fb100c7886d9bb7509094c4 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 8c32a5e2f1b43f4ff02042750cb7a042bc8a23f6..6ea5007cc740a717065e49787cfa0b4e9143d2da 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 59dadd7e7da63af8e0429611cefa79f9b1b455e7..61341c477822efe77699a0679e56ed61d582ee73 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 4473ffdc41c5431d75d923bdc9ed787db5fe673e..0a642fda97229f2880aa8d76fa2dd02af521b0e4 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 399f92856bac3c3537102caae656a6958bf5e984..a4e9d55d491db81b56b546abd474e4c8e8e8cd33 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 4469c9d131a2a837d1aefa3486fed258ae75e1ba..59c2d6f0aded3b3ee7b211c1f0461d0d6512678d 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 05e8e75db5d559fd66d4e06a758f616dcd8087f8..57669071a9163c018882ec4f25d600b76b632f29 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 e1d6ed4b51bf953f72e98d1d45f245b6d1b7609b..c5e1399a69dacc862dcc74e71008f2eda40e943c 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 ef612d600b04e82282949dee8c623faf5b97489b..61c4ff6715a00beb7b9fa03dd022364a136e28e3 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 a5a84ff453b1cbde25ee51b144c640da4a679fac..b8912b6bd194be9c1c02ac3cbcf841bd9eec1bc3 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 e02fa6417a877edd4868a41c263db698dd480cd3..c8ad351ba9ca287820563b406e798598b858f9f5 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 06d7620d75a3a69fde1b4e41af66d28ced6a4d21..7548665b8ff5dbee7a56d94c707cfc6f3e0a8af7 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 040a90f04650e0b052778db710179d9a8c8b2247..fe6f437da14fd45d56f0ead08a70ff18d1187791 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 51042cdb0004a90b08a33bd8ee3f0f0f0bd5f7ad..25e864da3a6e91727f71fa2629b5ab317a45b5ea 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 6e3451050fba35418932bdf9e0c46f876dfc8b88..bd501d40d8944a2883ab484ca8b8ee80dadf95bb 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 24703f3c0908e05f9aae7a4399b79efbc507f5f8..d5435e8a6649af3a185f44b2b90b2db1c0ac5c78 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 3c6ff6b91997b50c8ec8813b317509ef9438ac39..50e61dd11a9185af7e7d8df3acfda6862deeb0f8 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 f793829f7c59d692a3d15ec3e28cd79aee6e91c2..22eda3726c5168560bafdfb19e34e601dc1e8161 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 ad6667b4baf9ae23236d21d717ba2da48f2f52f5..2677da00ca136eaa98c7fed0243df535180d75b4 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 83ee3f080f6426f92ed519bb05bc8362dee0bc77..a1e1a1e1d20751c8b9a41d39feed3b9067a484e1 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 e449adb53f17b697fe2d52382b0ced9678000ab2..808a8a6589e1ae6bd2b25cd4f799b5bf9e2f9f25 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 87ec6f90c8e9220d302afa3da16d2416c0692557..ad808ba69c448ff960b1fd605f50a1914c348a78 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 8fc4cca0867b54ab956e3a54d2a35dd5533cb6bb..eab54a917db4d635df4b7b8c502810abc518b319 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 cb0a687c7cdcd5e006aa3460a95e67487675e43b..626da2b420c7d4b080f5fda93fcc120fa2fd9620 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 d987c4304b1b588279e88275acf57958aa7c0b34..537e1d26d53125e98f9ee9b863b70a82134ed9ce 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 764bcc1841330ad18afd80f599c2f0f399493c9c..d5dbe14029713ae950eb353eb4965431d3a381ec 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 2da75da4eb7cc950edc00b03092746c10a122111..b480ad8a8ee4fda31a4576265c9c1abb50221307 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 c20b66b4958bd834bf43f3791ee5e6d384668ae7..a1f00d06491b6202857e20cf0e9ab67e54dc5777 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 d6bda7662bacd9c0e73a59c276d82c094d935d4c..bb704014eef7d88341c320c41368cc5fad3afbc0 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 8269d536bcedc32798963abb7a3bea8dcf07532c..e2e00e9aeb5598f7b22a51c11f12c9c779350ab6 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 2ec10b40fbde6af2b8301fd58282f6d9c5d89f7f..b2e666bed9f48a5098681006af95435c41e59d0e 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 57e7b9626a307ba86e730f7124f5580aa335d72c..8cd3bb1fe0e8c871393d838f7b4b06622aa53294 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 a1c0d5aecf3edcacff9d7882d0bf96059f501558..56a8109b6f3b0549ac87ce03f27f160386bfd2fa 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 c84225432cd747c76264feeef3f3a4da4db967d7..6b52e536a9880cf9f15e654da297a98107af4716 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 6adb0bc70dbcd6ec27c96a214f8638c18a5921cc..f18005054b53dcfc7fca8b900d56ed6054d8a818 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"] }