diff options
100 files changed, 249 insertions, 305 deletions
diff --git a/.rubocop_todo/rspec/expect_change.yml b/.rubocop_todo/rspec/expect_change.yml index 4e7ab65db74..23bb61a5d68 100644 --- a/.rubocop_todo/rspec/expect_change.yml +++ b/.rubocop_todo/rspec/expect_change.yml @@ -3,23 +3,6 @@ RSpec/ExpectChange: Details: grace period Exclude: - - 'ee/spec/controllers/admin/geo/projects_controller_spec.rb' - - 'ee/spec/controllers/admin/licenses_controller_spec.rb' - - 'ee/spec/controllers/ee/groups_controller_spec.rb' - - 'ee/spec/controllers/ee/projects/protected_branches_controller_spec.rb' - - 'ee/spec/controllers/ee/projects/variables_controller_spec.rb' - - 'ee/spec/controllers/ee/registrations_controller_spec.rb' - - 'ee/spec/controllers/groups/epic_boards_controller_spec.rb' - - 'ee/spec/controllers/groups/group_members_controller_spec.rb' - - 'ee/spec/controllers/groups/omniauth_callbacks_controller_spec.rb' - - 'ee/spec/controllers/groups/sso_controller_spec.rb' - - 'ee/spec/controllers/ldap/omniauth_callbacks_controller_spec.rb' - - 'ee/spec/controllers/projects/issues_controller_spec.rb' - - 'ee/spec/controllers/projects/protected_environments_controller_spec.rb' - - 'ee/spec/controllers/registrations/groups_projects_controller_spec.rb' - - 'ee/spec/features/groups/hooks/user_adds_hook_spec.rb' - - 'ee/spec/features/groups/saml_providers_spec.rb' - - 'ee/spec/features/groups/settings/webhooks_settings_spec.rb' - 'ee/spec/graphql/mutations/boards/update_spec.rb' - 'ee/spec/graphql/mutations/incident_management/issuable_resource_link/create_spec.rb' - 'ee/spec/lib/audit/compliance_framework_changes_auditor_spec.rb' diff --git a/.rubocop_todo/rspec/scattered_let.yml b/.rubocop_todo/rspec/scattered_let.yml index 05a87c0f178..9d049dd4a26 100644 --- a/.rubocop_todo/rspec/scattered_let.yml +++ b/.rubocop_todo/rspec/scattered_let.yml @@ -2,25 +2,6 @@ # Cop supports --autocorrect. RSpec/ScatteredLet: Exclude: - - 'ee/spec/features/boards/user_visits_board_spec.rb' - - 'ee/spec/features/groups/group_roadmap_spec.rb' - - 'ee/spec/features/milestones/user_views_milestone_spec.rb' - - 'ee/spec/finders/analytics/devops_adoption/enabled_namespaces_finder_spec.rb' - - 'ee/spec/finders/ee/alert_management/http_integrations_finder_spec.rb' - - 'ee/spec/finders/issues_finder_spec.rb' - - 'ee/spec/finders/security/pipeline_vulnerabilities_finder_spec.rb' - - 'ee/spec/frontend/fixtures/runner.rb' - - 'ee/spec/graphql/ee/types/clusters/agent_type_spec.rb' - - 'ee/spec/graphql/mutations/boards/epics/create_spec.rb' - - 'ee/spec/graphql/mutations/merge_requests/accept_spec.rb' - - 'ee/spec/graphql/mutations/releases/update_spec.rb' - - 'ee/spec/graphql/resolvers/analytics/devops_adoption/enabled_namespaces_resolver_spec.rb' - - 'ee/spec/graphql/resolvers/clusters/agents_resolver_spec.rb' - - 'ee/spec/graphql/resolvers/security_orchestration/scan_execution_policy_resolver_spec.rb' - - 'ee/spec/graphql/types/asset_type_spec.rb' - - 'ee/spec/graphql/types/boards/board_epic_type_spec.rb' - - 'ee/spec/graphql/types/instance_security_dashboard_type_spec.rb' - - 'ee/spec/graphql/types/vulnerability_evidence_source_type_spec.rb' - 'ee/spec/graphql/types/vulnerability_evidence_supporting_message_type_spec.rb' - 'ee/spec/graphql/types/vulnerability_evidence_type_spec.rb' - 'ee/spec/graphql/types/vulnerability_request_response_header_type_spec.rb' diff --git a/.rubocop_todo/style/percent_literal_delimiters.yml b/.rubocop_todo/style/percent_literal_delimiters.yml index b1160a7d9f4..fee5decab22 100644 --- a/.rubocop_todo/style/percent_literal_delimiters.yml +++ b/.rubocop_todo/style/percent_literal_delimiters.yml @@ -3,27 +3,6 @@ Style/PercentLiteralDelimiters: Exclude: - 'Guardfile' - - 'app/controllers/admin/application_settings_controller.rb' - - 'app/controllers/admin/broadcast_messages_controller.rb' - - 'app/controllers/application_controller.rb' - - 'app/controllers/concerns/impersonation.rb' - - 'app/controllers/concerns/oauth_applications.rb' - - 'app/controllers/concerns/uploads_actions.rb' - - 'app/controllers/groups_controller.rb' - - 'app/controllers/import/bulk_imports_controller.rb' - - 'app/controllers/import/fogbugz_controller.rb' - - 'app/controllers/import/gitea_controller.rb' - - 'app/controllers/jira_connect/app_descriptor_controller.rb' - - 'app/controllers/jira_connect/subscriptions_controller.rb' - - 'app/controllers/profiles/two_factor_auths_controller.rb' - - 'app/controllers/projects/performance_monitoring/dashboards_controller.rb' - - 'app/controllers/projects/service_desk_controller.rb' - - 'app/controllers/repositories/lfs_locks_api_controller.rb' - - 'app/finders/group_members_finder.rb' - - 'app/finders/members_finder.rb' - - 'app/finders/notes_finder.rb' - - 'app/finders/todos_finder.rb' - - 'app/helpers/application_helper.rb' - 'app/helpers/auth_helper.rb' - 'app/helpers/ci/variables_helper.rb' - 'app/helpers/clusters_helper.rb' diff --git a/CHANGELOG.md b/CHANGELOG.md index 037d539606d..0a1633a7bd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,19 @@ documentation](doc/development/changelog.md) for instructions on adding your own entry. +## 15.6.2 (2022-12-05) + +### Added (1 change) + +- [Finalize group member namespace id migration](gitlab-org/gitlab@0b8ccad1c8c4066ffb594c8181bb1a68ddde7fdf) ([merge request](gitlab-org/gitlab!105804)) + +### Fixed (4 changes) + +- [Conditionally disable fastupdate on GIN indexes (issues, merge_requests)](gitlab-org/gitlab@302bea06dedf5939dcb618be945bbbb85fb4dd45) ([merge request](gitlab-org/gitlab!105804)) +- [Hide marketing-related entries](gitlab-org/gitlab@628fb55b6d32d5f4739e07cbd3c60de69246107b) ([merge request](gitlab-org/gitlab!105804)) +- [Fix memory limit for RssMemoryLimit monitor](gitlab-org/gitlab@4c040620cb5c84043d30587f95b4c2fc6149a3ed) ([merge request](gitlab-org/gitlab!105804)) +- [Fix deleting protected branch](gitlab-org/gitlab@2c884c5162ca24dbc3fd3d1c156f426f81565800) ([merge request](gitlab-org/gitlab!105804)) + ## 15.6.1 (2022-11-30) ### Fixed (1 change) diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/constants.js b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/constants.js index 00c54313292..00c54313292 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/constants.js +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/constants.js diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_button.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_button.vue index 864d9b308e7..864d9b308e7 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_button.vue +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_button.vue diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_contents.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_contents.vue index 89a976d45fa..89a976d45fa 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_contents.vue +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_contents.vue diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_contents_create_view.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_contents_create_view.vue index b8afa67a947..b8afa67a947 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_contents_create_view.vue +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_contents_create_view.vue diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_contents_labels_view.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_contents_labels_view.vue index ee6b531c1ca..ee6b531c1ca 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_contents_labels_view.vue +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_contents_labels_view.vue diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_title.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_title.vue index 1e9edd222c5..1e9edd222c5 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_title.vue +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_title.vue diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_value.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_value.vue index 583f060be8a..583f060be8a 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_value.vue +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_value.vue diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_value_collapsed.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_value_collapsed.vue index e84da6ee12b..e84da6ee12b 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_value_collapsed.vue +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_value_collapsed.vue diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/label_item.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/label_item.vue index 135fa9f6228..135fa9f6228 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/label_item.vue +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/label_item.vue diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/labels_select_root.vue index 2a78db352d7..2a78db352d7 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/labels_select_root.vue diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/actions.js b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/store/actions.js index 2dab97826b9..2dab97826b9 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/actions.js +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/store/actions.js diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/getters.js b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/store/getters.js index ef3eedd9bb2..ef3eedd9bb2 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/getters.js +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/store/getters.js diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/index.js b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/store/index.js index 5f61cb732c8..5f61cb732c8 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/index.js +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/store/index.js diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/mutation_types.js b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/store/mutation_types.js index f26e36031f4..f26e36031f4 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/mutation_types.js +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/store/mutation_types.js diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/mutations.js b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/store/mutations.js index c85d9befcbb..c85d9befcbb 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/mutations.js +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/store/mutations.js diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/state.js b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/store/state.js index 0185d5f88e1..0185d5f88e1 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/state.js +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/store/state.js diff --git a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/dropdown_contents_create_view.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/dropdown_contents_create_view.vue index ce93ad216ec..aa1184ed314 100644 --- a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/dropdown_contents_create_view.vue +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/dropdown_contents_create_view.vue @@ -10,7 +10,7 @@ import { import produce from 'immer'; import { createAlert } from '~/flash'; import { __ } from '~/locale'; -import { workspaceLabelsQueries } from '~/sidebar/constants'; +import { workspaceLabelsQueries } from '../../../constants'; import createLabelMutation from './graphql/create_label.mutation.graphql'; import { LabelType } from './constants'; diff --git a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/dropdown_contents_labels_view.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/dropdown_contents_labels_view.vue index 1d854505d11..c1939dc7785 100644 --- a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/dropdown_contents_labels_view.vue +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/dropdown_contents_labels_view.vue @@ -4,7 +4,7 @@ import fuzzaldrinPlus from 'fuzzaldrin-plus'; import { createAlert } from '~/flash'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; import { __ } from '~/locale'; -import { workspaceLabelsQueries } from '~/sidebar/constants'; +import { workspaceLabelsQueries } from '../../../constants'; import LabelItem from './label_item.vue'; export default { diff --git a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/labels_select_root.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/labels_select_root.vue index 2c27a69d587..b2b490b8ec4 100644 --- a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/labels_select_root.vue +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/labels_select_root.vue @@ -7,8 +7,8 @@ import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { IssuableType } from '~/issues/constants'; import { __ } from '~/locale'; -import SidebarEditableItem from '~/sidebar/components/sidebar_editable_item.vue'; -import { issuableLabelsQueries } from '~/sidebar/constants'; +import { issuableLabelsQueries } from '../../../constants'; +import SidebarEditableItem from '../../sidebar_editable_item.vue'; import { DEBOUNCE_DROPDOWN_DELAY, DropdownVariant } from './constants'; import DropdownContents from './dropdown_contents.vue'; import DropdownValue from './dropdown_value.vue'; diff --git a/app/assets/javascripts/sidebar/mount_sidebar.js b/app/assets/javascripts/sidebar/mount_sidebar.js index 9b546e4d48b..5127db6368d 100644 --- a/app/assets/javascripts/sidebar/mount_sidebar.js +++ b/app/assets/javascripts/sidebar/mount_sidebar.js @@ -16,7 +16,6 @@ import { } from '~/lib/utils/common_utils'; import { __ } from '~/locale'; import { apolloProvider } from '~/graphql_shared/issuable_client'; -import { DropdownVariant } from '~/vue_shared/components/sidebar/labels_select_vue/constants'; import Translate from '~/vue_shared/translate'; import CollapsedAssigneeList from './components/assignees/collapsed_assignee_list.vue'; import SidebarAssignees from './components/assignees/sidebar_assignees.vue'; @@ -25,6 +24,7 @@ import SidebarConfidentialityWidget from './components/confidential/sidebar_conf import CopyEmailToClipboard from './components/copy/copy_email_to_clipboard.vue'; import SidebarDueDateWidget from './components/date/sidebar_date_widget.vue'; import SidebarEscalationStatus from './components/incidents/sidebar_escalation_status.vue'; +import { DropdownVariant } from './components/labels/labels_select_vue/constants'; import { LabelType } from './components/labels/labels_select_widget/constants'; import LabelsSelectWidget from './components/labels/labels_select_widget/labels_select_root.vue'; import IssuableLockForm from './components/lock/issuable_lock_form.vue'; diff --git a/app/assets/javascripts/vue_shared/issuable/create/components/issuable_form.vue b/app/assets/javascripts/vue_shared/issuable/create/components/issuable_form.vue index 25799171905..2644befc902 100644 --- a/app/assets/javascripts/vue_shared/issuable/create/components/issuable_form.vue +++ b/app/assets/javascripts/vue_shared/issuable/create/components/issuable_form.vue @@ -1,8 +1,8 @@ <script> import { GlForm, GlFormInput, GlFormGroup } from '@gitlab/ui'; import MarkdownField from '~/vue_shared/components/markdown/field.vue'; -import { DropdownVariant } from '~/vue_shared/components/sidebar/labels_select_vue/constants'; -import LabelsSelect from '~/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue'; +import { DropdownVariant } from '~/sidebar/components/labels/labels_select_vue/constants'; +import LabelsSelect from '~/sidebar/components/labels/labels_select_vue/labels_select_root.vue'; export default { LabelSelectVariant: DropdownVariant, diff --git a/app/assets/stylesheets/page_bundles/milestone.scss b/app/assets/stylesheets/page_bundles/milestone.scss index 63bcb83e747..9ee6d17cb50 100644 --- a/app/assets/stylesheets/page_bundles/milestone.scss +++ b/app/assets/stylesheets/page_bundles/milestone.scss @@ -1,17 +1,7 @@ @import 'page_bundles/mixins_and_variables_and_functions'; -$status-box-line-height: 26px; - -.issues-sortable-list .str-truncated { - max-width: 90%; -} - .milestones { .milestone { - h4 { - font-weight: $gl-font-weight-bold; - } - .progress { width: 100%; height: 6px; diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index ec9441c2b9b..d1a5adcea3d 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -40,9 +40,9 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController feature_category :pages, [:lets_encrypt_terms_of_service] feature_category :error_tracking, [:reset_error_tracking_access_token] - VALID_SETTING_PANELS = %w(general repository + VALID_SETTING_PANELS = %w[general repository ci_cd reporting metrics_and_profiling - network preferences).freeze + network preferences].freeze # The current size of a sidekiq job's jid is 24 characters. The size of the # jid is an internal detail of Sidekiq, and they do not guarantee that it'll diff --git a/app/controllers/admin/broadcast_messages_controller.rb b/app/controllers/admin/broadcast_messages_controller.rb index bdf0c6aedb9..e8c913f0a1e 100644 --- a/app/controllers/admin/broadcast_messages_controller.rb +++ b/app/controllers/admin/broadcast_messages_controller.rb @@ -86,7 +86,7 @@ class Admin::BroadcastMessagesController < Admin::ApplicationController def broadcast_message_params params.require(:broadcast_message) - .permit(%i( + .permit(%i[ theme ends_at message @@ -94,7 +94,7 @@ class Admin::BroadcastMessagesController < Admin::ApplicationController target_path broadcast_type dismissable - ), target_access_levels: []).reverse_merge!(target_access_levels: []) + ], target_access_levels: []).reverse_merge!(target_access_levels: []) end def push_features diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a0e5fe0203d..28a45606ceb 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -158,7 +158,7 @@ class ApplicationController < ActionController::Base protected def workhorse_excluded_content_types - @workhorse_excluded_content_types ||= %w(text/html application/json) + @workhorse_excluded_content_types ||= %w[text/html application/json] end def append_info_to_payload(payload) diff --git a/app/controllers/concerns/impersonation.rb b/app/controllers/concerns/impersonation.rb index 539dd9ad69d..e562cf5dbe4 100644 --- a/app/controllers/concerns/impersonation.rb +++ b/app/controllers/concerns/impersonation.rb @@ -3,11 +3,11 @@ module Impersonation include Gitlab::Utils::StrongMemoize - SESSION_KEYS_TO_DELETE = %w( + SESSION_KEYS_TO_DELETE = %w[ github_access_token gitea_access_token gitlab_access_token bitbucket_token bitbucket_refresh_token bitbucket_server_personal_access_token bulk_import_gitlab_access_token fogbugz_token - ).freeze + ].freeze def current_user user = super diff --git a/app/controllers/concerns/oauth_applications.rb b/app/controllers/concerns/oauth_applications.rb index 8e63cc391ff..b48907f7fb3 100644 --- a/app/controllers/concerns/oauth_applications.rb +++ b/app/controllers/concerns/oauth_applications.rb @@ -30,7 +30,7 @@ module OauthApplications end def permitted_params - %i{name redirect_uri scopes confidential} + %i[name redirect_uri scopes confidential] end def application_params diff --git a/app/controllers/concerns/uploads_actions.rb b/app/controllers/concerns/uploads_actions.rb index 585c4fd05d1..6ad1b63db59 100644 --- a/app/controllers/concerns/uploads_actions.rb +++ b/app/controllers/concerns/uploads_actions.rb @@ -5,7 +5,7 @@ module UploadsActions include Gitlab::Utils::StrongMemoize include SendFileUpload - UPLOAD_MOUNTS = %w(avatar attachment file logo header_logo favicon).freeze + UPLOAD_MOUNTS = %w[avatar attachment file logo header_logo favicon].freeze included do prepend_before_action :set_request_format_from_path_extension diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 3f516c24a69..0a487bb2508 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -386,7 +386,7 @@ class GroupsController < Groups::ApplicationController override :has_project_list? def has_project_list? - %w(details show index).include?(action_name) + %w[details show index].include?(action_name) end def captcha_enabled? diff --git a/app/controllers/import/bulk_imports_controller.rb b/app/controllers/import/bulk_imports_controller.rb index 655fc7854fe..9a7118ce498 100644 --- a/app/controllers/import/bulk_imports_controller.rb +++ b/app/controllers/import/bulk_imports_controller.rb @@ -135,7 +135,7 @@ class Import::BulkImportsController < ApplicationController session[url_key], allow_localhost: allow_local_requests?, allow_local_network: allow_local_requests?, - schemes: %w(http https) + schemes: %w[http https] ) rescue Gitlab::UrlBlocker::BlockedUrlError => e clear_session_data diff --git a/app/controllers/import/fogbugz_controller.rb b/app/controllers/import/fogbugz_controller.rb index 7b580234227..77043e174b4 100644 --- a/app/controllers/import/fogbugz_controller.rb +++ b/app/controllers/import/fogbugz_controller.rb @@ -114,7 +114,7 @@ class Import::FogbugzController < Import::BaseController end def user_map_params - params.permit(users: %w(name email gitlab_user)) + params.permit(users: %w[name email gitlab_user]) end def verify_fogbugz_import_enabled @@ -126,7 +126,7 @@ class Import::FogbugzController < Import::BaseController params[:uri], allow_localhost: allow_local_requests?, allow_local_network: allow_local_requests?, - schemes: %w(http https) + schemes: %w[http https] ) rescue Gitlab::UrlBlocker::BlockedUrlError => e redirect_to new_import_fogbugz_url, alert: _('Specified URL cannot be used: "%{reason}"') % { reason: e.message } diff --git a/app/controllers/import/gitea_controller.rb b/app/controllers/import/gitea_controller.rb index 4b4ac07b389..97317b7c376 100644 --- a/app/controllers/import/gitea_controller.rb +++ b/app/controllers/import/gitea_controller.rb @@ -78,7 +78,7 @@ class Import::GiteaController < Import::GithubController provider_url, allow_localhost: allow_local_requests?, allow_local_network: allow_local_requests?, - schemes: %w(http https) + schemes: %w[http https] ) rescue Gitlab::UrlBlocker::BlockedUrlError => e session[access_token_key] = nil diff --git a/app/controllers/jira_connect/app_descriptor_controller.rb b/app/controllers/jira_connect/app_descriptor_controller.rb index 16bd73f5ab6..dcb5d590a95 100644 --- a/app/controllers/jira_connect/app_descriptor_controller.rb +++ b/app/controllers/jira_connect/app_descriptor_controller.rb @@ -28,7 +28,7 @@ class JiraConnect::AppDescriptorController < JiraConnect::ApplicationController type: 'jwt' }, modules: modules, - scopes: %w(READ WRITE DELETE), + scopes: %w[READ WRITE DELETE], apiVersion: 1, apiMigrations: { 'context-qsh': true, @@ -84,7 +84,7 @@ class JiraConnect::AppDescriptorController < JiraConnect::ApplicationController name: { value: 'GitLab' }, url: HOME_URL, logoUrl: logo_url, - capabilities: %w(branch commit pull_request) + capabilities: %w[branch commit pull_request] } } end diff --git a/app/controllers/jira_connect/subscriptions_controller.rb b/app/controllers/jira_connect/subscriptions_controller.rb index 30cfeb563eb..33d77c5b536 100644 --- a/app/controllers/jira_connect/subscriptions_controller.rb +++ b/app/controllers/jira_connect/subscriptions_controller.rb @@ -7,8 +7,8 @@ class JiraConnect::SubscriptionsController < JiraConnect::ApplicationController next if p.directives.blank? # rubocop: disable Lint/PercentStringArray - script_src_values = Array.wrap(p.directives['script-src']) | %w('self' https://connect-cdn.atl-paas.net) - style_src_values = Array.wrap(p.directives['style-src']) | %w('self' 'unsafe-inline') + script_src_values = Array.wrap(p.directives['script-src']) | %w['self' https://connect-cdn.atl-paas.net] + style_src_values = Array.wrap(p.directives['style-src']) | %w['self' 'unsafe-inline'] # rubocop: enable Lint/PercentStringArray # *.jira.com is needed for some legacy Jira Cloud instances, new ones will use *.atlassian.net diff --git a/app/controllers/profiles/two_factor_auths_controller.rb b/app/controllers/profiles/two_factor_auths_controller.rb index 0933f2bb7ea..9ef5cf0ed09 100644 --- a/app/controllers/profiles/two_factor_auths_controller.rb +++ b/app/controllers/profiles/two_factor_auths_controller.rb @@ -97,7 +97,7 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController def skip if two_factor_grace_period_expired? - redirect_to new_profile_two_factor_auth_path, alert: s_('Cannot skip two factor authentication setup') + redirect_to new_profile_two_factor_auth_path, alert: _('Cannot skip two factor authentication setup') else session[:skip_two_factor] = current_user.otp_grace_period_started_at + two_factor_grace_period.hours redirect_to root_path @@ -216,7 +216,7 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController group_links = groups.map { |group| view_context.link_to group.full_name, group_path(group) }.to_sentence leave_group_links = groups.map { |group| view_context.link_to (s_("leave %{group_name}") % { group_name: group.full_name }), leave_group_members_path(group), remote: false, method: :delete }.to_sentence - s_(%{The group settings for %{group_links} require you to enable Two-Factor Authentication for your account. You can %{leave_group_links}.}) + s_(%(The group settings for %{group_links} require you to enable Two-Factor Authentication for your account. You can %{leave_group_links}.)) .html_safe % { group_links: group_links.html_safe, leave_group_links: leave_group_links.html_safe } end diff --git a/app/controllers/projects/performance_monitoring/dashboards_controller.rb b/app/controllers/projects/performance_monitoring/dashboards_controller.rb index 8acbc17aef3..d043f8d0b9f 100644 --- a/app/controllers/projects/performance_monitoring/dashboards_controller.rb +++ b/app/controllers/projects/performance_monitoring/dashboards_controller.rb @@ -70,7 +70,7 @@ module Projects end def validate_required_params! - params.require(%i(branch file_name dashboard commit_message)) + params.require(%i[branch file_name dashboard commit_message]) end def redirect_safe_branch_name @@ -78,7 +78,7 @@ module Projects end def dashboard_params - params.permit(%i(branch file_name dashboard commit_message)).to_h + params.permit(%i[branch file_name dashboard commit_message]).to_h end def file_content_params diff --git a/app/controllers/projects/service_desk_controller.rb b/app/controllers/projects/service_desk_controller.rb index aa0e70121df..8f576b8d72b 100644 --- a/app/controllers/projects/service_desk_controller.rb +++ b/app/controllers/projects/service_desk_controller.rb @@ -29,7 +29,7 @@ class Projects::ServiceDeskController < Projects::ApplicationController end def allowed_update_attributes - %i(issue_template_key outgoing_name project_key) + %i[issue_template_key outgoing_name project_key] end def service_desk_attributes diff --git a/app/controllers/repositories/lfs_locks_api_controller.rb b/app/controllers/repositories/lfs_locks_api_controller.rb index f36126d67ff..0b765aa6931 100644 --- a/app/controllers/repositories/lfs_locks_api_controller.rb +++ b/app/controllers/repositories/lfs_locks_api_controller.rb @@ -72,7 +72,7 @@ module Repositories end def upload_request? - %w(create unlock verify).include?(params[:action]) + %w[create unlock verify].include?(params[:action]) end def lfs_params diff --git a/app/finders/group_members_finder.rb b/app/finders/group_members_finder.rb index 4688d561897..47ed623b252 100644 --- a/app/finders/group_members_finder.rb +++ b/app/finders/group_members_finder.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true class GroupMembersFinder < UnionFinder - RELATIONS = %i(direct inherited descendants shared_from_groups).freeze - DEFAULT_RELATIONS = %i(direct inherited).freeze + RELATIONS = %i[direct inherited descendants shared_from_groups].freeze + DEFAULT_RELATIONS = %i[direct inherited].freeze INVALID_RELATION_TYPE_ERROR_MSG = "is not a valid relation type. Valid relation types are #{RELATIONS.join(', ')}." RELATIONS_DESCRIPTIONS = { diff --git a/app/finders/members_finder.rb b/app/finders/members_finder.rb index e68a0c8fca9..de6eacbb1e0 100644 --- a/app/finders/members_finder.rb +++ b/app/finders/members_finder.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true class MembersFinder - RELATIONS = %i(direct inherited descendants invited_groups).freeze - DEFAULT_RELATIONS = %i(direct inherited).freeze + RELATIONS = %i[direct inherited descendants invited_groups].freeze + DEFAULT_RELATIONS = %i[direct inherited].freeze # Params can be any of the following: # sort: string diff --git a/app/finders/notes_finder.rb b/app/finders/notes_finder.rb index ce0bf0dc145..7890502cf0e 100644 --- a/app/finders/notes_finder.rb +++ b/app/finders/notes_finder.rb @@ -101,7 +101,7 @@ class NotesFinder # rubocop: disable CodeReuse/ActiveRecord def notes_of_any_type - types = %w(commit issue merge_request snippet) + types = %w[commit issue merge_request snippet] note_relations = types.map { |t| notes_for_type(t) } note_relations.map! { |notes| search(notes) } UnionFinder.new.find_union(note_relations, Note.includes(:author)) # rubocop: disable CodeReuse/Finder diff --git a/app/finders/todos_finder.rb b/app/finders/todos_finder.rb index e83018ed24c..31287f63eb2 100644 --- a/app/finders/todos_finder.rb +++ b/app/finders/todos_finder.rb @@ -24,7 +24,7 @@ class TodosFinder NONE = '0' - TODO_TYPES = Set.new(%w(Issue MergeRequest DesignManagement::Design AlertManagement::Alert)).freeze + TODO_TYPES = Set.new(%w[Issue MergeRequest DesignManagement::Design AlertManagement::Alert]).freeze attr_accessor :current_user, :params diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e9b1eece969..643cddec694 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -124,7 +124,7 @@ module ApplicationHelper end def simple_sanitize(str) - sanitize(str, tags: %w(a span)) + sanitize(str, tags: %w[a span]) end def body_data diff --git a/app/helpers/groups/observability_helper.rb b/app/helpers/groups/observability_helper.rb index 6fb6acce386..a16e6ab13e3 100644 --- a/app/helpers/groups/observability_helper.rb +++ b/app/helpers/groups/observability_helper.rb @@ -5,15 +5,15 @@ module Groups ACTION_TO_PATH = { 'dashboards' => { path: '/', - title: -> { s_('Dashboards') } + title: -> { _('Dashboards') } }, 'manage' => { path: '/dashboards', - title: -> { s_('Manage Dashboards') } + title: -> { _('Manage Dashboards') } }, 'explore' => { path: '/explore', - title: -> { s_('Explore') } + title: -> { _('Explore') } } }.freeze diff --git a/app/models/integrations/bamboo.rb b/app/models/integrations/bamboo.rb index b4e97f0871e..fc5e6a88c2d 100644 --- a/app/models/integrations/bamboo.rb +++ b/app/models/integrations/bamboo.rb @@ -16,7 +16,7 @@ module Integrations help: -> { s_('BambooService|Bamboo build plan key.') }, non_empty_password_title: -> { s_('BambooService|Enter new build key') }, non_empty_password_help: -> { s_('BambooService|Leave blank to use your current build key.') }, - placeholder: -> { s_('KEY') }, + placeholder: -> { _('KEY') }, required: true field :username, diff --git a/app/models/integrations/confluence.rb b/app/models/integrations/confluence.rb index c1c43af99bf..31e9a171d1b 100644 --- a/app/models/integrations/confluence.rb +++ b/app/models/integrations/confluence.rb @@ -10,7 +10,7 @@ module Integrations validate :validate_confluence_url_is_cloud, if: :activated? field :confluence_url, - title: -> { s_('Confluence Cloud Workspace URL') }, + title: -> { _('Confluence Cloud Workspace URL') }, placeholder: 'https://example.atlassian.net/wiki', required: true diff --git a/app/models/integrations/datadog.rb b/app/models/integrations/datadog.rb index 27bed5d3f76..9f33b499f62 100644 --- a/app/models/integrations/datadog.rb +++ b/app/models/integrations/datadog.rb @@ -48,8 +48,8 @@ module Integrations field :archive_trace_events, storage: :attribute, type: 'checkbox', - title: -> { s_('Logs') }, - checkbox_label: -> { s_('Enable logs collection') }, + title: -> { _('Logs') }, + checkbox_label: -> { _('Enable logs collection') }, help: -> { s_('When enabled, job logs are collected by Datadog and displayed along with pipeline execution traces.') } field :datadog_service, diff --git a/app/models/integrations/mattermost.rb b/app/models/integrations/mattermost.rb index dd1c98ee06b..e3c5c22ad3a 100644 --- a/app/models/integrations/mattermost.rb +++ b/app/models/integrations/mattermost.rb @@ -5,7 +5,7 @@ module Integrations include SlackMattermostNotifier def title - s_('Mattermost notifications') + _('Mattermost notifications') end def description diff --git a/app/models/integrations/packagist.rb b/app/models/integrations/packagist.rb index 7148de66aee..3973b492b6d 100644 --- a/app/models/integrations/packagist.rb +++ b/app/models/integrations/packagist.rb @@ -5,15 +5,15 @@ module Integrations include HasWebHook field :username, - title: -> { s_('Username') }, - help: -> { s_('Enter your Packagist username.') }, + title: -> { _('Username') }, + help: -> { _('Enter your Packagist username.') }, placeholder: '', required: true field :token, type: 'password', - title: -> { s_('Token') }, - help: -> { s_('Enter your Packagist token.') }, + title: -> { _('Token') }, + help: -> { _('Enter your Packagist token.') }, non_empty_password_title: -> { s_('ProjectService|Enter new token') }, non_empty_password_help: -> { s_('ProjectService|Leave blank to use your current token.') }, placeholder: '', diff --git a/app/models/merge_request/predictions.rb b/app/models/merge_request/predictions.rb deleted file mode 100644 index 61494ca584c..00000000000 --- a/app/models/merge_request/predictions.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class MergeRequest::Predictions < ApplicationRecord # rubocop:disable Style/ClassAndModuleChildren - belongs_to :merge_request, inverse_of: :predictions - - validates :suggested_reviewers, json_schema: { filename: 'merge_request_predictions_suggested_reviewers' } - validates :accepted_reviewers, json_schema: { filename: 'merge_request_predictions_accepted_reviewers' } - - def suggested_reviewer_usernames - Array.wrap(suggested_reviewers['reviewers']) - end - - def accepted_reviewer_usernames - Array.wrap(accepted_reviewers['reviewers']) - end -end diff --git a/app/services/wiki_pages/update_service.rb b/app/services/wiki_pages/update_service.rb index 12b2cf87d5d..cf9eddbd13f 100644 --- a/app/services/wiki_pages/update_service.rb +++ b/app/services/wiki_pages/update_service.rb @@ -12,7 +12,7 @@ module WikiPages execute_hooks(page) ServiceResponse.success(payload: { page: page }) else - raise UpdateError, s_('Could not update wiki page') + raise UpdateError, _('Could not update wiki page') end rescue UpdateError, WikiPage::PageChangedError, WikiPage::PageRenameError => e page.update_attributes(@params) # rubocop:disable Rails/ActiveRecordAliases diff --git a/app/validators/json_schemas/merge_request_predictions_accepted_reviewers.json b/app/validators/json_schemas/merge_request_predictions_accepted_reviewers.json deleted file mode 100644 index fcbe8903df4..00000000000 --- a/app/validators/json_schemas/merge_request_predictions_accepted_reviewers.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Merge request predictions accepted reviewers", - "type": "object", - "properties": { - "reviewers": { - "type": "array" - } - }, - "additionalProperties": true -}
\ No newline at end of file diff --git a/app/validators/json_schemas/merge_request_predictions_suggested_reviewers.json b/app/validators/json_schemas/merge_request_predictions_suggested_reviewers.json deleted file mode 100644 index 8e80b52d9b8..00000000000 --- a/app/validators/json_schemas/merge_request_predictions_suggested_reviewers.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Merge request predictions suggested reviewers", - "type": "object", - "properties": { - "top_n": { "type": "number" }, - "version": { "type": "string" }, - "reviewers": { "type": "array" } - }, - "additionalProperties": true -} diff --git a/app/views/admin/hook_logs/show.html.haml b/app/views/admin/hook_logs/show.html.haml index 6fcaf2ea152..6dca0b100e4 100644 --- a/app/views/admin/hook_logs/show.html.haml +++ b/app/views/admin/hook_logs/show.html.haml @@ -5,8 +5,11 @@ %hr - if @hook_log.oversize? - = button_tag _("Resend Request"), class: "btn gl-button btn-default float-right gl-ml-3 has-tooltip", disabled: true, title: _("Request data is too large") + - tooltip = _("Request data is too large") + = render Pajamas::ButtonComponent.new(disabled: true, button_options: { class: 'float-right gl-ml-3 has-tooltip', title: tooltip }) do + = _("Resend Request") - else - = link_to _("Resend Request"), retry_admin_hook_hook_log_path(@hook, @hook_log), method: :post, class: "btn gl-button btn-default float-right gl-ml-3" + = render Pajamas::ButtonComponent.new(href: retry_admin_hook_hook_log_path(@hook, @hook_log), method: :post, button_options: { class: 'float-right gl-ml-3' }) do + = _("Resend Request") = render partial: 'shared/hook_logs/content', locals: { hook_log: @hook_log } diff --git a/app/views/groups/settings/ci_cd/_auto_devops_form.html.haml b/app/views/groups/settings/ci_cd/_auto_devops_form.html.haml index a55ccd94974..06cb9893196 100644 --- a/app/views/groups/settings/ci_cd/_auto_devops_form.html.haml +++ b/app/views/groups/settings/ci_cd/_auto_devops_form.html.haml @@ -13,4 +13,4 @@ help_text: '%{help_text} %{learn_more_link}'.html_safe % { help_text: help_text, learn_more_link: learn_more_link }, checkbox_options: { checked: group.auto_devops_enabled? } - = f.submit _('Save changes'), class: 'btn gl-button btn-confirm gl-mt-5' + = f.submit _('Save changes'), class: 'gl-mt-5', pajamas_button: true diff --git a/app/views/groups/settings/repository/_default_branch.html.haml b/app/views/groups/settings/repository/_default_branch.html.haml index 844a5f890a4..e8aa809a6ca 100644 --- a/app/views/groups/settings/repository/_default_branch.html.haml +++ b/app/views/groups/settings/repository/_default_branch.html.haml @@ -21,4 +21,4 @@ = render 'groups/settings/default_branch_protection', f: f, group: @group = f.hidden_field :redirect_target, value: "repository_settings" - = f.submit _('Save changes'), class: 'btn gl-button btn-confirm' + = f.submit _('Save changes'), pajamas_button: true diff --git a/config/events/1655726589_ide_edit_g_edit_by_web_ide.yml b/config/events/1655726589_ide_edit_g_edit_by_web_ide.yml deleted file mode 100644 index 128bfaf6029..00000000000 --- a/config/events/1655726589_ide_edit_g_edit_by_web_ide.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -description: Triggered from backend on editing file in web ide -category: ide_edit -action: g_edit_by_web_ide -identifiers: -- project -- user -- namespace -product_section: dev -product_stage: create -product_group: group::editor -product_category: web_ide -milestone: "15.1" -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/90484 -distributions: -- ce -- ee -tiers: -- free -- premium -- ultimate - diff --git a/config/events/1655726650_ide_edit_g_edit_by_sfe.yml b/config/events/1655726650_ide_edit_g_edit_by_sfe.yml deleted file mode 100644 index 9acdc317cf5..00000000000 --- a/config/events/1655726650_ide_edit_g_edit_by_sfe.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -description: Triggered from backend on editing file by sfe -category: ide_edit -action: g_edit_by_sfe -identifiers: - - project - - user - - namespace -product_section: dev -product_stage: create -product_group: group::editor -product_category: web_ide -milestone: "15.1" -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/90484 -distributions: - - ce - - ee -tiers: - - free - - premium - - ultimate - diff --git a/config/events/1655726683_ide_edit_g_edit_by_snippet_ide.yml b/config/events/1655726683_ide_edit_g_edit_by_snippet_ide.yml deleted file mode 100644 index 2b3ed1a5d7a..00000000000 --- a/config/events/1655726683_ide_edit_g_edit_by_snippet_ide.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -description: Triggered from backend on editing file by ide snippet -category: ide_edit -action: g_edit_by_snippet_ide -identifiers: - - project - - user - - namespace -product_section: dev -product_stage: create -product_group: group::editor -product_category: web_ide -milestone: "15.1" -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/90484 -distributions: - - ce - - ee -tiers: - - free - - premium - - ultimate - diff --git a/config/events/1655726622_ide_edit_g_edit_by_live_preview.yml b/config/events/1669597397_Gitlab__UsageDataCounters__EditorUniqueCounter_ide_edit.yml index d9d54e1c311..67240ae2363 100644 --- a/config/events/1655726622_ide_edit_g_edit_by_live_preview.yml +++ b/config/events/1669597397_Gitlab__UsageDataCounters__EditorUniqueCounter_ide_edit.yml @@ -1,7 +1,7 @@ --- -description: Triggered from backend on showing a file in live preview -category: ide_edit -action: g_edit_by_live_preview +description: Triggered from backend on interaction with web ide +category: Gitlab::UsageDataCounters::EditorUniqueCounter +action: ide_edit identifiers: - project - user @@ -10,8 +10,8 @@ product_section: dev product_stage: create product_group: group::editor product_category: web_ide -milestone: "15.1" -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/90484 +milestone: "15.7" +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/104809 distributions: - ce - ee @@ -19,4 +19,3 @@ tiers: - free - premium - ultimate - diff --git a/config/feature_flags/development/ci_raw_variables_in_yaml_config.yml b/config/feature_flags/development/ci_raw_variables_in_yaml_config.yml index ab135526c0b..0b6fc6022f4 100644 --- a/config/feature_flags/development/ci_raw_variables_in_yaml_config.yml +++ b/config/feature_flags/development/ci_raw_variables_in_yaml_config.yml @@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/375034 milestone: '15.6' type: development group: group::pipeline authoring -default_enabled: false +default_enabled: true diff --git a/data/removals/15_8/15-8-auto-deploy-helm-chart-cilium-policy.yml b/data/removals/15_8/15-8-auto-deploy-helm-chart-cilium-policy.yml new file mode 100644 index 00000000000..40f7a57b6ec --- /dev/null +++ b/data/removals/15_8/15-8-auto-deploy-helm-chart-cilium-policy.yml @@ -0,0 +1,16 @@ +- title: "CiliumNetworkPolicy within the auto deploy Helm chart is removed" # (required) Actionable title. e.g., The `confidential` field for a `Note` is deprecated. Use `internal` instead. + announcement_milestone: "14.8" # The milestone when this feature was first announced as deprecated. + announcement_date: "2022-02-22" # The date of the milestone release when this feature was first announced as deprecated + removal_milestone: "15.8" # The milestone when this feature is planned to be removed + removal_date: "2023-01-22" # (optional - may be required in the future) YYYY-MM-DD format - the date of the milestone release when this feature is planned to be removed + breaking_change: false # (required) Change to true if this removal is a breaking change. + reporter: sam.white # (required) GitLab username of the person reporting the removal + stage: govern # (required) String value of the stage that the feature was created in. e.g., Growth + issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/382044 + body: | # (required) Do not modify this line, instead modify the lines below. + All functionality related to the GitLab Container Network Security and Container Host Security categories was deprecated in GitLab 14.8 and scheduled for removal in GitLab 15.0. The [CiliumNetworkPolicy definition](https://gitlab.com/gitlab-org/cluster-integration/auto-deploy-image/-/blob/master/assets/auto-deploy-app/values.yaml#L175) that exists as part of the [GitLab Auto Deploy Helm chart](https://gitlab.com/gitlab-org/cluster-integration/auto-deploy-image/-/tree/master/assets/auto-deploy-app) was not removed as scheduled in GitLab 15.0. This policy is planned to be removed in the GitLab 15.8 release. + + If you want to preserve this functionality, you can follow one of these two paths: + + 1. Fork the [GitLab Auto Deploy Helm chart](https://gitlab.com/gitlab-org/cluster-integration/auto-deploy-image/-/tree/master/assets/auto-deploy-app) into the `chart/` path within your project + 1. Set `AUTO_DEPLOY_IMAGE_VERSION` and `DAST_AUTO_DEPLOY_IMAGE_VERSION` to the most recent version of the image that included the CiliumNetworkPolicy diff --git a/doc/ci/yaml/index.md b/doc/ci/yaml/index.md index 5d6f4e965ea..27cb81e7775 100644 --- a/doc/ci/yaml/index.md +++ b/doc/ci/yaml/index.md @@ -4311,7 +4311,13 @@ variables: #### `variables:expand` -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/353991) in GitLab 15.6 [with a flag](../../administration/feature_flags.md) named `ci_raw_variables_in_yaml_config`. Disabled by default. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/353991) in GitLab 15.6 [with a flag](../../administration/feature_flags.md) named `ci_raw_variables_in_yaml_config`. Disabled by default. +> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/375034) in GitLab 15.6. +> - [Enabled on self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/375034) in GitLab 15.7. + +FLAG: +On self-managed GitLab, by default this feature is available. To hide the feature per project, +ask an administrator to [disable the feature flag](../../administration/feature_flags.md) named `ci_raw_variables_in_yaml_config`. Use the `expand` keyword to configure a variable to be expandable or not. diff --git a/doc/development/sidekiq/compatibility_across_updates.md b/doc/development/sidekiq/compatibility_across_updates.md index cfb709d9110..e61e1420717 100644 --- a/doc/development/sidekiq/compatibility_across_updates.md +++ b/doc/development/sidekiq/compatibility_across_updates.md @@ -123,14 +123,63 @@ uses a parameter hash. end ``` -## Removing workers +## Removing worker classes -Try to avoid removing workers and their queues in minor and patch -releases. +To remove a worker class, follow these steps over two minor releases: -During online update instance can have pending jobs and removing the queue can -lead to those jobs being stuck forever. If you can't write migration for those -Sidekiq jobs, please consider removing the worker in a major release only. +### In the first minor release + +1. Remove any code that enqueues the jobs. + + For example, if there is a UI component or an API endpoint that a user can interact with that results in the worker instance getting enqueued, make sure those surface areas are either removed or updated in a way that the worker instance is no longer enqueued. + + This ensures that instances related to the worker class are no longer being enqueued. + +1. Ensure both the frontend and backend code no longer relies on any of the work that used to be done by the worker. +1. In the relevant worker classes, replace the contents of the `perform` method with a no-op, while keeping any arguments in tact. + + For example, if you're working with the following `ExampleWorker`: + + ```ruby + class ExampleWorker + def perform(object_id) + SomeService.run!(object_id) + end + end + ``` + + Implementing the no-op might look like this: + + ```ruby + class ExampleWorker + def perform(object_id); end + end + ``` + + By implementing this no-op, you can avoid unnecessary cycles once any deprecated jobs that are still enqueued eventually get processed. + +1. In a separate merge request, because it's a migration, consider using the `sidekiq_remove_jobs` helper migration method in a **post-deployment migration**: + + ```ruby + class RemoveMyDeprecatedWorkersJobInstances < Gitlab::Database::Migration[2.0] + DEPRECATED_JOB_CLASSES = %w[ + MyDeprecatedWorkerOne + MyDeprecatedWorkerTwo + ] + + def up + sidekiq_remove_jobs(job_klasses: DEPRECATED_JOB_CLASSES) + end + + def down + # This migration removes any instances of deprecated workers and cannot be undone. + end + end + ``` + +#### In a subsequent, separate minor release + +1. Delete the worker class file and follow the guidance in our [Sidekiq queues documentation](../sidekiq/index.md#sidekiq-queues) around running Rake tasks to regenerate/update related files. ## Renaming queues diff --git a/doc/update/removals.md b/doc/update/removals.md index f71a21c6453..c2a14a5cb2e 100644 --- a/doc/update/removals.md +++ b/doc/update/removals.md @@ -46,6 +46,17 @@ To change the approvals required for a merge request, you should no longer use t Instead, use the [`/approval_rules` endpoint](https://docs.gitlab.com/ee/api/merge_request_approvals.html#merge-request-level-mr-approvals) to [create](https://docs.gitlab.com/ee/api/merge_request_approvals.html#create-merge-request-level-rule) or [update](https://docs.gitlab.com/ee/api/merge_request_approvals.html#update-merge-request-level-rule) the approval rules for a merge request. +## Removed in 15.8 + +### CiliumNetworkPolicy within the auto deploy Helm chart is removed + +All functionality related to the GitLab Container Network Security and Container Host Security categories was deprecated in GitLab 14.8 and scheduled for removal in GitLab 15.0. The [CiliumNetworkPolicy definition](https://gitlab.com/gitlab-org/cluster-integration/auto-deploy-image/-/blob/master/assets/auto-deploy-app/values.yaml#L175) that exists as part of the [GitLab Auto Deploy Helm chart](https://gitlab.com/gitlab-org/cluster-integration/auto-deploy-image/-/tree/master/assets/auto-deploy-app) was not removed as scheduled in GitLab 15.0. This policy is planned to be removed in the GitLab 15.8 release. + +If you want to preserve this functionality, you can follow one of these two paths: + +1. Fork the [GitLab Auto Deploy Helm chart](https://gitlab.com/gitlab-org/cluster-integration/auto-deploy-image/-/tree/master/assets/auto-deploy-app) into the `chart/` path within your project +1. Set `AUTO_DEPLOY_IMAGE_VERSION` and `DAST_AUTO_DEPLOY_IMAGE_VERSION` to the most recent version of the image that included the CiliumNetworkPolicy + ## Removed in 15.6 ### NFS as Git repository storage is no longer supported. Migrate to Gitaly Cluster as soon as possible diff --git a/doc/user/application_security/policies/scan-execution-policies.md b/doc/user/application_security/policies/scan-execution-policies.md index 02db4f487b1..0a67bdbcf29 100644 --- a/doc/user/application_security/policies/scan-execution-policies.md +++ b/doc/user/application_security/policies/scan-execution-policies.md @@ -144,6 +144,7 @@ rule in the defined policy are met. | `site_profile` | `string` | Name of the selected [DAST site profile](../dast/proxy-based.md#site-profile). | The DAST site profile to execute the DAST scan. This field should only be set if `scan` type is `dast`. | | `scanner_profile` | `string` or `null` | Name of the selected [DAST scanner profile](../dast/proxy-based.md#scanner-profile). | The DAST scanner profile to execute the DAST scan. This field should only be set if `scan` type is `dast`.| | `variables` | `object` | | A set of CI variables, supplied as an array of `key: value` pairs, to apply and enforce for the selected scan. The `key` is the variable name, with its `value` provided as a string. This parameter supports any variable that the GitLab CI job supports for the specified scan. | +| `tags` | `array` of `string` | | A list of runner tags for the policy. The policy jobs will be run by runner with the specified tags. | Note the following: diff --git a/lib/gitlab/ci/runner_instructions.rb b/lib/gitlab/ci/runner_instructions.rb index 44f3d3403f5..01df41a06ce 100644 --- a/lib/gitlab/ci/runner_instructions.rb +++ b/lib/gitlab/ci/runner_instructions.rb @@ -62,7 +62,7 @@ module Gitlab def install_script with_error_handling [Gitlab::Ci::RunnerInstructions::ArgumentError] do - raise Gitlab::Ci::RunnerInstructions::ArgumentError, s_('Architecture not found for OS') unless environment[:download_locations].key?(@arch.to_sym) + raise Gitlab::Ci::RunnerInstructions::ArgumentError, _('Architecture not found for OS') unless environment[:download_locations].key?(@arch.to_sym) replace_variables(get_file(environment[:install_script_template_path])) end @@ -70,7 +70,7 @@ module Gitlab def register_command with_error_handling [Gitlab::Ci::RunnerInstructions::ArgumentError, Gitlab::Access::AccessDeniedError] do - raise Gitlab::Ci::RunnerInstructions::ArgumentError, s_('No runner executable') unless environment[:runner_executable] + raise Gitlab::Ci::RunnerInstructions::ArgumentError, _('No runner executable') unless environment[:runner_executable] server_url = Gitlab::Routing.url_helpers.root_url(only_path: false) runner_executable = environment[:runner_executable] @@ -91,12 +91,12 @@ module Gitlab end def environment - @environment ||= OS[@os.to_sym] || ( raise Gitlab::Ci::RunnerInstructions::ArgumentError, s_('Invalid OS') ) + @environment ||= OS[@os.to_sym] || ( raise Gitlab::Ci::RunnerInstructions::ArgumentError, _('Invalid OS') ) end def validate_params - @errors << s_('Missing OS') unless @os.present? - @errors << s_('Missing arch') unless @arch.present? + @errors << _('Missing OS') unless @os.present? + @errors << _('Missing arch') unless @arch.present? end def replace_variables(expression) diff --git a/lib/gitlab/usage_data_counters/editor_unique_counter.rb b/lib/gitlab/usage_data_counters/editor_unique_counter.rb index 5ede840661a..0b448f68153 100644 --- a/lib/gitlab/usage_data_counters/editor_unique_counter.rb +++ b/lib/gitlab/usage_data_counters/editor_unique_counter.rb @@ -45,20 +45,23 @@ module Gitlab private - def track_unique_action(action, author, time, project = nil) + def track_unique_action(event_name, author, time, project = nil) return unless author if Feature.enabled?(:route_hll_to_snowplow_phase2) Gitlab::Tracking.event( + name, 'ide_edit', - action.to_s, + property: event_name.to_s, project: project, namespace: project&.namespace, - user: author + user: author, + label: 'usage_activity_by_stage_monthly.create.action_monthly_active_users_ide_edit', + context: [Gitlab::Tracking::ServicePingContext.new(data_source: :redis_hll, event: event_name).to_context] ) end - Gitlab::UsageDataCounters::HLLRedisCounter.track_event(action, values: author.id, time: time) + Gitlab::UsageDataCounters::HLLRedisCounter.track_event(event_name, values: author.id, time: time) end def count_unique(actions, date_from, date_to) diff --git a/qa/qa/page/component/issuable/sidebar.rb b/qa/qa/page/component/issuable/sidebar.rb index 20f305921ab..0a31dee2b4f 100644 --- a/qa/qa/page/component/issuable/sidebar.rb +++ b/qa/qa/page/component/issuable/sidebar.rb @@ -26,7 +26,7 @@ module QA element :labels_block end - base.view 'app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_contents_labels_view.vue' do + base.view 'app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_contents_labels_view.vue' do element :dropdown_input_field end diff --git a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/prefill_variables_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/prefill_variables_spec.rb index 4ae278418a9..c5112ebedc6 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/prefill_variables_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/prefill_variables_spec.rb @@ -104,7 +104,7 @@ module QA context 'with feature flag enabled' do before do Runtime::Feature.enable(:run_pipeline_graphql) - sleep 30 + sleep 60 Flow::Login.sign_in project.visit! @@ -121,7 +121,7 @@ module QA after do Runtime::Feature.disable(:run_pipeline_graphql) - sleep 30 + sleep 60 end it_behaves_like 'pre-filled variables form', 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/378977' diff --git a/spec/controllers/projects/service_ping_controller_spec.rb b/spec/controllers/projects/service_ping_controller_spec.rb index 22fb18edc80..10d4b897564 100644 --- a/spec/controllers/projects/service_ping_controller_spec.rb +++ b/spec/controllers/projects/service_ping_controller_spec.rb @@ -91,11 +91,14 @@ RSpec.describe Projects::ServicePingController do expect(response).to have_gitlab_http_status(:ok) end - it_behaves_like 'Snowplow event tracking' do + it_behaves_like 'Snowplow event tracking with RedisHLL context' do let(:project) { create(:project) } - let(:category) { 'ide_edit' } - let(:action) { 'g_edit_by_live_preview' } let(:namespace) { project.namespace } + let(:category) { 'Gitlab::UsageDataCounters::EditorUniqueCounter' } + let(:action) { 'ide_edit' } + let(:property) { 'g_edit_by_live_preview' } + let(:label) { 'usage_activity_by_stage_monthly.create.action_monthly_active_users_ide_edit' } + let(:context) { [Gitlab::Tracking::ServicePingContext.new(data_source: :redis_hll, event: event_name).to_context] } let(:feature_flag_name) { :route_hll_to_snowplow_phase2 } end end diff --git a/spec/features/broadcast_messages_spec.rb b/spec/features/broadcast_messages_spec.rb index 3b6d5035eb3..8300cfce539 100644 --- a/spec/features/broadcast_messages_spec.rb +++ b/spec/features/broadcast_messages_spec.rb @@ -31,8 +31,7 @@ RSpec.describe 'Broadcast Messages', feature_category: :onboarding do expect(page).not_to have_content 'SampleMessage' end - it 'broadcast message is still hidden after refresh', :js, - quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/347118' do + it 'broadcast message is still hidden after refresh', :js do visit root_path find('.js-dismiss-current-broadcast-notification').click diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/dropdown_button_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_button_spec.js index c0e5408e1bd..4f2a89e20db 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/dropdown_button_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_button_spec.js @@ -3,9 +3,9 @@ import { shallowMount } from '@vue/test-utils'; import Vue, { nextTick } from 'vue'; import Vuex from 'vuex'; -import DropdownButton from '~/vue_shared/components/sidebar/labels_select_vue/dropdown_button.vue'; +import DropdownButton from '~/sidebar/components/labels/labels_select_vue/dropdown_button.vue'; -import labelSelectModule from '~/vue_shared/components/sidebar/labels_select_vue/store'; +import labelSelectModule from '~/sidebar/components/labels/labels_select_vue/store'; import { mockConfig } from './mock_data'; diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/dropdown_contents_create_view_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_create_view_spec.js index 799e2c1d08e..59e95edfa20 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/dropdown_contents_create_view_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_create_view_spec.js @@ -3,9 +3,9 @@ import { shallowMount } from '@vue/test-utils'; import Vue, { nextTick } from 'vue'; import Vuex from 'vuex'; -import DropdownContentsCreateView from '~/vue_shared/components/sidebar/labels_select_vue/dropdown_contents_create_view.vue'; +import DropdownContentsCreateView from '~/sidebar/components/labels/labels_select_vue/dropdown_contents_create_view.vue'; -import labelSelectModule from '~/vue_shared/components/sidebar/labels_select_vue/store'; +import labelSelectModule from '~/sidebar/components/labels/labels_select_vue/store'; import { mockConfig, mockSuggestedColors } from './mock_data'; diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/dropdown_contents_labels_view_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_labels_view_spec.js index cc9b9f393ce..865dc8fe8fb 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/dropdown_contents_labels_view_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_labels_view_spec.js @@ -9,13 +9,13 @@ import { shallowMount } from '@vue/test-utils'; import Vue, { nextTick } from 'vue'; import Vuex from 'vuex'; import { UP_KEY_CODE, DOWN_KEY_CODE, ENTER_KEY_CODE, ESC_KEY_CODE } from '~/lib/utils/keycodes'; -import DropdownContentsLabelsView from '~/vue_shared/components/sidebar/labels_select_vue/dropdown_contents_labels_view.vue'; -import LabelItem from '~/vue_shared/components/sidebar/labels_select_vue/label_item.vue'; +import DropdownContentsLabelsView from '~/sidebar/components/labels/labels_select_vue/dropdown_contents_labels_view.vue'; +import LabelItem from '~/sidebar/components/labels/labels_select_vue/label_item.vue'; -import * as actions from '~/vue_shared/components/sidebar/labels_select_vue/store/actions'; -import * as getters from '~/vue_shared/components/sidebar/labels_select_vue/store/getters'; -import mutations from '~/vue_shared/components/sidebar/labels_select_vue/store/mutations'; -import defaultState from '~/vue_shared/components/sidebar/labels_select_vue/store/state'; +import * as actions from '~/sidebar/components/labels/labels_select_vue/store/actions'; +import * as getters from '~/sidebar/components/labels/labels_select_vue/store/getters'; +import mutations from '~/sidebar/components/labels/labels_select_vue/store/mutations'; +import defaultState from '~/sidebar/components/labels/labels_select_vue/store/state'; import { mockConfig, mockLabels, mockRegularLabel } from './mock_data'; diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/dropdown_contents_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_spec.js index 9781d9c4de0..e9ffda7c251 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/dropdown_contents_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_contents_spec.js @@ -2,9 +2,9 @@ import { shallowMount } from '@vue/test-utils'; import Vue from 'vue'; import Vuex from 'vuex'; -import { DropdownVariant } from '~/vue_shared/components/sidebar/labels_select_vue/constants'; -import DropdownContents from '~/vue_shared/components/sidebar/labels_select_vue/dropdown_contents.vue'; -import labelsSelectModule from '~/vue_shared/components/sidebar/labels_select_vue/store'; +import { DropdownVariant } from '~/sidebar/components/labels/labels_select_vue/constants'; +import DropdownContents from '~/sidebar/components/labels/labels_select_vue/dropdown_contents.vue'; +import labelsSelectModule from '~/sidebar/components/labels/labels_select_vue/store'; import { mockConfig } from './mock_data'; diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/dropdown_title_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_title_spec.js index 54804f85f81..6c3fda421ff 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/dropdown_title_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_title_spec.js @@ -3,9 +3,9 @@ import { shallowMount } from '@vue/test-utils'; import Vue, { nextTick } from 'vue'; import Vuex from 'vuex'; -import DropdownTitle from '~/vue_shared/components/sidebar/labels_select_vue/dropdown_title.vue'; +import DropdownTitle from '~/sidebar/components/labels/labels_select_vue/dropdown_title.vue'; -import labelsSelectModule from '~/vue_shared/components/sidebar/labels_select_vue/store'; +import labelsSelectModule from '~/sidebar/components/labels/labels_select_vue/store'; import { mockConfig } from './mock_data'; diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/dropdown_value_collapsed_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_value_collapsed_spec.js index c6400320dea..56f25a1c6a4 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/dropdown_value_collapsed_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_value_collapsed_spec.js @@ -2,7 +2,7 @@ import { shallowMount } from '@vue/test-utils'; import { GlIcon } from '@gitlab/ui'; import { nextTick } from 'vue'; import { createMockDirective, getBinding } from 'helpers/vue_mock_directive'; -import DropdownValueCollapsedComponent from '~/vue_shared/components/sidebar/labels_select_vue/dropdown_value_collapsed.vue'; +import DropdownValueCollapsedComponent from '~/sidebar/components/labels/labels_select_vue/dropdown_value_collapsed.vue'; import { mockCollapsedLabels as mockLabels, mockRegularLabel } from './mock_data'; diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/dropdown_value_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_value_spec.js index f3c4839002b..a1ccc9d2ab1 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/dropdown_value_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/dropdown_value_spec.js @@ -3,9 +3,9 @@ import { shallowMount } from '@vue/test-utils'; import Vue from 'vue'; import Vuex from 'vuex'; -import DropdownValue from '~/vue_shared/components/sidebar/labels_select_vue/dropdown_value.vue'; +import DropdownValue from '~/sidebar/components/labels/labels_select_vue/dropdown_value.vue'; -import labelsSelectModule from '~/vue_shared/components/sidebar/labels_select_vue/store'; +import labelsSelectModule from '~/sidebar/components/labels/labels_select_vue/store'; import { mockConfig, mockLabels, mockRegularLabel, mockScopedLabel } from './mock_data'; diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/label_item_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/label_item_spec.js index bb0f1777de6..e14c0e308ce 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/label_item_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/label_item_spec.js @@ -1,7 +1,7 @@ import { GlLink } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; -import LabelItem from '~/vue_shared/components/sidebar/labels_select_vue/label_item.vue'; +import LabelItem from '~/sidebar/components/labels/labels_select_vue/label_item.vue'; import { mockRegularLabel } from './mock_data'; const mockLabel = { ...mockRegularLabel, set: true }; diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/labels_select_root_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/labels_select_root_spec.js index 30c1a4b7d2f..a3b10c18374 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/labels_select_root_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/labels_select_root_spec.js @@ -3,15 +3,15 @@ import Vue, { nextTick } from 'vue'; import Vuex from 'vuex'; import { isInViewport } from '~/lib/utils/common_utils'; -import { DropdownVariant } from '~/vue_shared/components/sidebar/labels_select_vue/constants'; -import DropdownButton from '~/vue_shared/components/sidebar/labels_select_vue/dropdown_button.vue'; -import DropdownContents from '~/vue_shared/components/sidebar/labels_select_vue/dropdown_contents.vue'; -import DropdownTitle from '~/vue_shared/components/sidebar/labels_select_vue/dropdown_title.vue'; -import DropdownValue from '~/vue_shared/components/sidebar/labels_select_vue/dropdown_value.vue'; -import DropdownValueCollapsed from '~/vue_shared/components/sidebar/labels_select_vue/dropdown_value_collapsed.vue'; -import LabelsSelectRoot from '~/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue'; - -import labelsSelectModule from '~/vue_shared/components/sidebar/labels_select_vue/store'; +import { DropdownVariant } from '~/sidebar/components/labels/labels_select_vue/constants'; +import DropdownButton from '~/sidebar/components/labels/labels_select_vue/dropdown_button.vue'; +import DropdownContents from '~/sidebar/components/labels/labels_select_vue/dropdown_contents.vue'; +import DropdownTitle from '~/sidebar/components/labels/labels_select_vue/dropdown_title.vue'; +import DropdownValue from '~/sidebar/components/labels/labels_select_vue/dropdown_value.vue'; +import DropdownValueCollapsed from '~/sidebar/components/labels/labels_select_vue/dropdown_value_collapsed.vue'; +import LabelsSelectRoot from '~/sidebar/components/labels/labels_select_vue/labels_select_root.vue'; + +import labelsSelectModule from '~/sidebar/components/labels/labels_select_vue/store'; import { mockConfig } from './mock_data'; diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/mock_data.js b/spec/frontend/sidebar/components/labels/labels_select_vue/mock_data.js index 884bc4684ba..884bc4684ba 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/mock_data.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/mock_data.js diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/store/actions_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/store/actions_spec.js index edd044bd754..0e0024aa6c2 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/store/actions_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/store/actions_spec.js @@ -3,9 +3,9 @@ import MockAdapter from 'axios-mock-adapter'; import testAction from 'helpers/vuex_action_helper'; import { createAlert } from '~/flash'; import axios from '~/lib/utils/axios_utils'; -import * as actions from '~/vue_shared/components/sidebar/labels_select_vue/store/actions'; -import * as types from '~/vue_shared/components/sidebar/labels_select_vue/store/mutation_types'; -import defaultState from '~/vue_shared/components/sidebar/labels_select_vue/store/state'; +import * as actions from '~/sidebar/components/labels/labels_select_vue/store/actions'; +import * as types from '~/sidebar/components/labels/labels_select_vue/store/mutation_types'; +import defaultState from '~/sidebar/components/labels/labels_select_vue/store/state'; jest.mock('~/flash'); diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/store/getters_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/store/getters_spec.js index 6ad46dbe898..e32256831a3 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/store/getters_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/store/getters_spec.js @@ -1,4 +1,4 @@ -import * as getters from '~/vue_shared/components/sidebar/labels_select_vue/store/getters'; +import * as getters from '~/sidebar/components/labels/labels_select_vue/store/getters'; describe('LabelsSelect Getters', () => { describe('dropdownButtonText', () => { diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/store/mutations_spec.js b/spec/frontend/sidebar/components/labels/labels_select_vue/store/mutations_spec.js index 2b2508b5e11..cee5d2e77d1 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select_vue/store/mutations_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_vue/store/mutations_spec.js @@ -1,6 +1,6 @@ import { cloneDeep } from 'lodash'; -import * as types from '~/vue_shared/components/sidebar/labels_select_vue/store/mutation_types'; -import mutations from '~/vue_shared/components/sidebar/labels_select_vue/store/mutations'; +import * as types from '~/sidebar/components/labels/labels_select_vue/store/mutation_types'; +import mutations from '~/sidebar/components/labels/labels_select_vue/store/mutations'; describe('LabelsSelect Mutations', () => { describe(`${types.SET_INITIAL_STATE}`, () => { diff --git a/spec/frontend/vue_shared/components/filtered_search_bar/mock_data.js b/spec/frontend/vue_shared/components/filtered_search_bar/mock_data.js index fdfc33ac97c..dd4d4a0b542 100644 --- a/spec/frontend/vue_shared/components/filtered_search_bar/mock_data.js +++ b/spec/frontend/vue_shared/components/filtered_search_bar/mock_data.js @@ -1,5 +1,5 @@ import { GlFilteredSearchToken } from '@gitlab/ui'; -import { mockLabels } from 'jest/vue_shared/components/sidebar/labels_select_vue/mock_data'; +import { mockLabels } from 'jest/sidebar/components/labels/labels_select_vue/mock_data'; import Api from '~/api'; import { FILTERED_SEARCH_TERM, diff --git a/spec/frontend/vue_shared/components/filtered_search_bar/tokens/base_token_spec.js b/spec/frontend/vue_shared/components/filtered_search_bar/tokens/base_token_spec.js index d9ba044a779..164235e4bb9 100644 --- a/spec/frontend/vue_shared/components/filtered_search_bar/tokens/base_token_spec.js +++ b/spec/frontend/vue_shared/components/filtered_search_bar/tokens/base_token_spec.js @@ -12,7 +12,7 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import { mockRegularLabel, mockLabels, -} from 'jest/vue_shared/components/sidebar/labels_select_vue/mock_data'; +} from 'jest/sidebar/components/labels/labels_select_vue/mock_data'; import { OPTIONS_NONE_ANY, diff --git a/spec/frontend/vue_shared/components/filtered_search_bar/tokens/label_token_spec.js b/spec/frontend/vue_shared/components/filtered_search_bar/tokens/label_token_spec.js index a2071037508..9d96123c17f 100644 --- a/spec/frontend/vue_shared/components/filtered_search_bar/tokens/label_token_spec.js +++ b/spec/frontend/vue_shared/components/filtered_search_bar/tokens/label_token_spec.js @@ -10,7 +10,7 @@ import waitForPromises from 'helpers/wait_for_promises'; import { mockRegularLabel, mockLabels, -} from 'jest/vue_shared/components/sidebar/labels_select_vue/mock_data'; +} from 'jest/sidebar/components/labels/labels_select_vue/mock_data'; import { createAlert } from '~/flash'; import axios from '~/lib/utils/axios_utils'; diff --git a/spec/frontend/vue_shared/issuable/create/components/issuable_form_spec.js b/spec/frontend/vue_shared/issuable/create/components/issuable_form_spec.js index f98e7a678f4..ff21b3bc356 100644 --- a/spec/frontend/vue_shared/issuable/create/components/issuable_form_spec.js +++ b/spec/frontend/vue_shared/issuable/create/components/issuable_form_spec.js @@ -3,7 +3,7 @@ import { shallowMount } from '@vue/test-utils'; import IssuableForm from '~/vue_shared/issuable/create/components/issuable_form.vue'; import MarkdownField from '~/vue_shared/components/markdown/field.vue'; -import LabelsSelect from '~/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue'; +import LabelsSelect from '~/sidebar/components/labels/labels_select_vue/labels_select_root.vue'; const createComponent = ({ descriptionPreviewPath = '/gitlab-org/gitlab-shell/preview_markdown', diff --git a/spec/migrations/schedule_populate_requirements_issue_id_spec.rb b/spec/migrations/schedule_populate_requirements_issue_id_spec.rb index 2702c000b60..5d238e75bd9 100644 --- a/spec/migrations/schedule_populate_requirements_issue_id_spec.rb +++ b/spec/migrations/schedule_populate_requirements_issue_id_spec.rb @@ -48,7 +48,7 @@ RSpec.describe SchedulePopulateRequirementsIssueId do # Create one requirement with issue_id present, to make # sure a job won't be scheduled for it - work_item_type_id = work_item_types_table.find_by(namespace_id: nil, name: 'Issue').id + work_item_type_id = table(:work_item_types).find_by(namespace_id: nil, name: 'Issue').id issue = issues.create!(state_id: 1, work_item_type_id: work_item_type_id) create_requirement(iid: 2, title: 'r 2', issue_id: issue.id) diff --git a/spec/models/jira_connect_installation_spec.rb b/spec/models/jira_connect_installation_spec.rb index 09a4a7a488c..f1dc170dea9 100644 --- a/spec/models/jira_connect_installation_spec.rb +++ b/spec/models/jira_connect_installation_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe JiraConnectInstallation do +RSpec.describe JiraConnectInstallation, feature_category: :integrations do describe 'associations' do it { is_expected.to have_many(:subscriptions).class_name('JiraConnectSubscription') } end diff --git a/spec/requests/api/commits_spec.rb b/spec/requests/api/commits_spec.rb index 6ef9cf70a66..3b686fb6598 100644 --- a/spec/requests/api/commits_spec.rb +++ b/spec/requests/api/commits_spec.rb @@ -492,10 +492,13 @@ RSpec.describe API::Commits do subject end - it_behaves_like 'Snowplow event tracking' do - let(:namespace) { project.namespace } - let(:category) { 'ide_edit' } - let(:action) { 'g_edit_by_web_ide' } + it_behaves_like 'Snowplow event tracking with RedisHLL context' do + let(:namespace) { project.namespace.reload } + let(:category) { 'Gitlab::UsageDataCounters::EditorUniqueCounter' } + let(:action) { 'ide_edit' } + let(:property) { 'g_edit_by_web_ide' } + let(:label) { 'usage_activity_by_stage_monthly.create.action_monthly_active_users_ide_edit' } + let(:context) { [Gitlab::Tracking::ServicePingContext.new(data_source: :redis_hll, event: event_name).to_context] } let(:feature_flag_name) { :route_hll_to_snowplow_phase2 } end diff --git a/spec/requests/api/graphql/mutations/snippets/update_spec.rb b/spec/requests/api/graphql/mutations/snippets/update_spec.rb index 1a5d3620f22..a385c96de61 100644 --- a/spec/requests/api/graphql/mutations/snippets/update_spec.rb +++ b/spec/requests/api/graphql/mutations/snippets/update_spec.rb @@ -192,11 +192,18 @@ RSpec.describe 'Updating a Snippet' do stub_session('warden.user.user.key' => [[current_user.id], current_user.authenticatable_salt]) end - it_behaves_like 'Snowplow event tracking' do + it_behaves_like 'Snowplow event tracking with RedisHLL context' do + let(:feature_flag_name) { :route_hll_to_snowplow_phase2 } let(:user) { current_user } + let(:property) { 'g_edit_by_snippet_ide' } let(:namespace) { project.namespace } - let(:category) { 'ide_edit' } - let(:action) { 'g_edit_by_snippet_ide' } + let(:category) { 'Gitlab::UsageDataCounters::EditorUniqueCounter' } + let(:action) { 'ide_edit' } + let(:label) { 'usage_activity_by_stage_monthly.create.action_monthly_active_users_ide_edit' } + let(:context) do + [Gitlab::Tracking::ServicePingContext.new(data_source: :redis_hll, event: event_name).to_context] + end + let(:feature_flag_name) { :route_hll_to_snowplow_phase2 } end end diff --git a/spec/requests/jira_connect/installations_controller_spec.rb b/spec/requests/jira_connect/installations_controller_spec.rb index 6315c66a41a..42abc1e4542 100644 --- a/spec/requests/jira_connect/installations_controller_spec.rb +++ b/spec/requests/jira_connect/installations_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe JiraConnect::InstallationsController do +RSpec.describe JiraConnect::InstallationsController, feature_category: :integrations do let_it_be(:installation) { create(:jira_connect_installation) } describe 'GET /-/jira_connect/installations' do diff --git a/spec/requests/jira_connect/public_keys_controller_spec.rb b/spec/requests/jira_connect/public_keys_controller_spec.rb index 2eca4c0ea2f..1573e0f66c4 100644 --- a/spec/requests/jira_connect/public_keys_controller_spec.rb +++ b/spec/requests/jira_connect/public_keys_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe JiraConnect::PublicKeysController do +RSpec.describe JiraConnect::PublicKeysController, feature_category: :integrations do describe 'GET /-/jira_connect/public_keys/:uuid' do before do allow(Gitlab).to receive(:com?).and_return(dot_com) diff --git a/spec/services/jira_connect/create_asymmetric_jwt_service_spec.rb b/spec/services/jira_connect/create_asymmetric_jwt_service_spec.rb index f5359e5b643..5dbbc7fb0a2 100644 --- a/spec/services/jira_connect/create_asymmetric_jwt_service_spec.rb +++ b/spec/services/jira_connect/create_asymmetric_jwt_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe JiraConnect::CreateAsymmetricJwtService do +RSpec.describe JiraConnect::CreateAsymmetricJwtService, feature_category: :integrations do describe '#execute' do let_it_be(:jira_connect_installation) { create(:jira_connect_installation) } |