Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-07 09:08:16 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-07 09:08:16 +0300
commita95f7ad8b8331e972ce2e82247679fec7a918565 (patch)
treea76204749ad8b1822304ba89b8f3b2f6b05c13db
parent66664611361dcfcbaf99cd7c6906b99bcb16becd (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.gitignore1
-rw-r--r--app/assets/javascripts/issues/show/components/incidents/timeline_events_item.vue55
-rw-r--r--app/assets/javascripts/monitoring/utils.js1
-rw-r--r--app/assets/javascripts/pages/projects/settings/merge_requests/index.js3
-rw-r--r--app/assets/stylesheets/page_bundles/incidents.scss9
-rw-r--r--app/assets/stylesheets/page_bundles/merge_requests.scss2
-rw-r--r--app/controllers/registrations_controller.rb6
-rw-r--r--app/models/concerns/has_user_type.rb16
-rw-r--r--app/views/admin/users/_form.html.haml6
-rw-r--r--app/views/devise/shared/_signup_box.html.haml1
-rw-r--r--app/views/profiles/accounts/show.html.haml6
-rw-r--r--config/feature_flags/ops/suggested_reviewers_internal_api.yml8
-rw-r--r--config/gitlab.yml.example5
-rw-r--r--config/initializers/1_settings.rb6
-rw-r--r--config/initializers/gitlab_suggested_reviewers_secret.rb5
-rw-r--r--doc/.vale/gitlab/spelling-exceptions.txt7
-rw-r--r--doc/ci/pipelines/multi_project_pipelines.md11
-rw-r--r--doc/ci/pipelines/parent_child_pipelines.md11
-rw-r--r--lib/api/api.rb2
-rw-r--r--lib/api/usage_data_queries.rb6
-rw-r--r--spec/features/invites_spec.rb1
-rw-r--r--spec/features/users/signup_spec.rb7
-rw-r--r--spec/models/concerns/has_user_type_spec.rb3
23 files changed, 65 insertions, 113 deletions
diff --git a/.gitignore b/.gitignore
index 6441e798332..ad7595dc7f2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -73,7 +73,6 @@ eslint-report.html
/.gitlab_workhorse_secret
/.gitlab_pages_secret
/.gitlab_kas_secret
-/.gitlab_suggested_reviewers_secret
/webpack-report/
/crystalball/
/test_results/
diff --git a/app/assets/javascripts/issues/show/components/incidents/timeline_events_item.vue b/app/assets/javascripts/issues/show/components/incidents/timeline_events_item.vue
index 79a61880cf8..bc7c7c505e0 100644
--- a/app/assets/javascripts/issues/show/components/incidents/timeline_events_item.vue
+++ b/app/assets/javascripts/issues/show/components/incidents/timeline_events_item.vue
@@ -43,41 +43,36 @@ export default {
};
</script>
<template>
- <div class="gl-display-flex gl-align-items-start">
+ <div class="timeline-event gl-display-grid">
<div
class="gl-display-flex gl-align-items-center gl-justify-content-center gl-bg-white gl-text-gray-200 gl-border-gray-100 gl-border-1 gl-border-solid gl-rounded-full gl-mt-2 gl-mr-3 gl-w-8 gl-h-8 gl-p-3 gl-z-index-1"
>
<gl-icon :name="getEventIcon(action)" class="note-icon" />
</div>
- <div
- class="timeline-event-note timeline-event-border gl-w-full gl-display-flex gl-flex-direction-row"
- data-testid="event-text-container"
- >
- <div>
- <strong class="gl-font-lg" data-testid="event-time">
- <gl-sprintf :message="$options.i18n.timeUTC">
- <template #time>{{ time }}</template>
- </gl-sprintf>
- </strong>
- <div v-safe-html="noteHtml"></div>
- </div>
- <gl-dropdown
- v-if="canUpdateTimelineEvent"
- right
- class="event-note-actions gl-ml-auto gl-align-self-start"
- icon="ellipsis_v"
- text-sr-only
- :text="$options.i18n.moreActions"
- category="tertiary"
- no-caret
- >
- <gl-dropdown-item @click="$emit('edit')">
- {{ $options.i18n.edit }}
- </gl-dropdown-item>
- <gl-dropdown-item @click="$emit('delete')">
- {{ $options.i18n.delete }}
- </gl-dropdown-item>
- </gl-dropdown>
+ <div class="timeline-event-note timeline-event-border" data-testid="event-text-container">
+ <strong class="gl-font-lg" data-testid="event-time">
+ <gl-sprintf :message="$options.i18n.timeUTC">
+ <template #time>{{ time }}</template>
+ </gl-sprintf>
+ </strong>
+ <div v-safe-html="noteHtml" class="md"></div>
</div>
+ <gl-dropdown
+ v-if="canUpdateTimelineEvent"
+ right
+ class="event-note-actions gl-ml-auto gl-align-self-start"
+ icon="ellipsis_v"
+ text-sr-only
+ :text="$options.i18n.moreActions"
+ category="tertiary"
+ no-caret
+ >
+ <gl-dropdown-item @click="$emit('edit')">
+ {{ $options.i18n.edit }}
+ </gl-dropdown-item>
+ <gl-dropdown-item @click="$emit('delete')">
+ {{ $options.i18n.delete }}
+ </gl-dropdown-item>
+ </gl-dropdown>
</div>
</template>
diff --git a/app/assets/javascripts/monitoring/utils.js b/app/assets/javascripts/monitoring/utils.js
index fd8749625da..0d849e1a2d8 100644
--- a/app/assets/javascripts/monitoring/utils.js
+++ b/app/assets/javascripts/monitoring/utils.js
@@ -39,7 +39,6 @@ export const stateAndPropsFromDataset = (dataset = {}) => {
// HTML attributes are always strings, parse other types.
dataProps.hasMetrics = parseBoolean(dataProps.hasMetrics);
dataProps.customMetricsAvailable = parseBoolean(dataProps.customMetricsAvailable);
- dataProps.prometheusAlertsAvailable = parseBoolean(dataProps.prometheusAlertsAvailable);
return {
initState: {
diff --git a/app/assets/javascripts/pages/projects/settings/merge_requests/index.js b/app/assets/javascripts/pages/projects/settings/merge_requests/index.js
index 739e666644c..0f7ede8ed42 100644
--- a/app/assets/javascripts/pages/projects/settings/merge_requests/index.js
+++ b/app/assets/javascripts/pages/projects/settings/merge_requests/index.js
@@ -1,9 +1,6 @@
import groupsSelect from '~/groups_select';
import UserCallout from '~/user_callout';
-import UsersSelect from '~/users_select';
-// eslint-disable-next-line no-new
-new UsersSelect();
groupsSelect();
// eslint-disable-next-line no-new
diff --git a/app/assets/stylesheets/page_bundles/incidents.scss b/app/assets/stylesheets/page_bundles/incidents.scss
index de246fa14b9..e807c4c0bbb 100644
--- a/app/assets/stylesheets/page_bundles/incidents.scss
+++ b/app/assets/stylesheets/page_bundles/incidents.scss
@@ -4,13 +4,10 @@
.main-notes-list::before {
content: none;
}
+}
- .timeline-event-note {
- p {
- margin-bottom: 0;
- font-size: 0.875rem;
- }
- }
+.timeline-event {
+ grid-template-columns: #{$gl-spacing-scale-9} minmax(0, 1fr) #{$gl-spacing-scale-7};
}
/**
diff --git a/app/assets/stylesheets/page_bundles/merge_requests.scss b/app/assets/stylesheets/page_bundles/merge_requests.scss
index bc59cc61b98..b7dd3ba2303 100644
--- a/app/assets/stylesheets/page_bundles/merge_requests.scss
+++ b/app/assets/stylesheets/page_bundles/merge_requests.scss
@@ -329,6 +329,8 @@ $tabs-holder-z-index: 250;
top: 0;
// !important is required to override inline styles of resizable sidebar
width: 100% !important;
+ // avoid sticky elements overlap header and other elements
+ z-index: 1;
}
.tree-list-holder {
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
index f003cbb5fd4..091886dd7ac 100644
--- a/app/controllers/registrations_controller.rb
+++ b/app/controllers/registrations_controller.rb
@@ -18,7 +18,6 @@ class RegistrationsController < Devise::RegistrationsController
before_action :ensure_destroy_prerequisites_met, only: [:destroy]
before_action :init_preferred_language, only: :new
before_action :load_recaptcha, only: :new
- before_action :set_invite_params, only: :new
before_action only: [:create] do
check_rate_limit!(:user_sign_up, scope: request.ip)
end
@@ -32,6 +31,7 @@ class RegistrationsController < Devise::RegistrationsController
def new
@resource = build_resource
+ set_invite_params
end
def create
@@ -221,7 +221,9 @@ class RegistrationsController < Devise::RegistrationsController
end
def set_invite_params
- @invite_email = ActionController::Base.helpers.sanitize(params[:invite_email])
+ if resource.email.blank? && params[:invite_email].present?
+ resource.email = @invite_email = ActionController::Base.helpers.sanitize(params[:invite_email])
+ end
end
def after_pending_invitations_hook
diff --git a/app/models/concerns/has_user_type.rb b/app/models/concerns/has_user_type.rb
index 158d7d1c9bb..8e371f2a9c1 100644
--- a/app/models/concerns/has_user_type.rb
+++ b/app/models/concerns/has_user_type.rb
@@ -14,22 +14,10 @@ module HasUserType
migration_bot: 7,
security_bot: 8,
automation_bot: 9,
- admin_bot: 11,
- suggested_reviewers_bot: 12
+ admin_bot: 11
}.with_indifferent_access.freeze
- BOT_USER_TYPES = %w[
- alert_bot
- project_bot
- support_bot
- visual_review_bot
- migration_bot
- security_bot
- automation_bot
- admin_bot
- suggested_reviewers_bot
- ].freeze
-
+ BOT_USER_TYPES = %w[alert_bot project_bot support_bot visual_review_bot migration_bot security_bot automation_bot admin_bot].freeze
NON_INTERNAL_USER_TYPES = %w[human project_bot service_user].freeze
INTERNAL_USER_TYPES = (USER_TYPES.keys - NON_INTERNAL_USER_TYPES).freeze
diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml
index 6809f147ef8..eb151b40a65 100644
--- a/app/views/admin/users/_form.html.haml
+++ b/app/views/admin/users/_form.html.haml
@@ -76,7 +76,9 @@
%div
- if @user.new_record?
= f.submit _('Create user'), pajamas_button: true
- = link_to _('Cancel'), admin_users_path, class: "gl-button btn btn-default btn-cancel"
+ = render Pajamas::ButtonComponent.new(href: admin_users_path) do
+ = _('Cancel')
- else
= f.submit _('Save changes'), pajamas_button: true
- = link_to _('Cancel'), admin_user_path(@user), class: "gl-button btn btn-default btn-cancel"
+ = render Pajamas::ButtonComponent.new(href: admin_user_path(@user)) do
+ = _('Cancel')
diff --git a/app/views/devise/shared/_signup_box.html.haml b/app/views/devise/shared/_signup_box.html.haml
index b9c9c99bf1a..a3a5fe690a7 100644
--- a/app/views/devise/shared/_signup_box.html.haml
+++ b/app/views/devise/shared/_signup_box.html.haml
@@ -44,7 +44,6 @@
.form-group
= f.label :email, class: "label-bold #{'gl-mb-1' if Feature.enabled?(:restyle_login_page, @project)}"
= f.email_field :email,
- value: @invite_email,
class: 'form-control gl-form-input middle js-validate-email',
data: { qa_selector: 'new_user_email_field' },
required: true,
diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml
index cdd5a9ae7a1..bc0d615bb64 100644
--- a/app/views/profiles/accounts/show.html.haml
+++ b/app/views/profiles/accounts/show.html.haml
@@ -24,10 +24,12 @@
%p
#{_('Status')}: #{current_user.two_factor_enabled? ? _('Enabled') : _('Disabled')}
- if current_user.two_factor_enabled?
- = link_to _('Manage two-factor authentication'), profile_two_factor_auth_path, class: 'gl-button btn btn-confirm'
+ = render Pajamas::ButtonComponent.new(variant: :confirm, href: profile_two_factor_auth_path) do
+ = _('Manage two-factor authentication')
- else
.gl-mb-3
- = link_to _('Enable two-factor authentication'), profile_two_factor_auth_path, class: 'gl-button btn btn-confirm', data: { qa_selector: 'enable_2fa_button' }
+ = render Pajamas::ButtonComponent.new(variant: :confirm, href: profile_two_factor_auth_path, button_options: { data: { qa_selector: 'enable_2fa_button' }}) do
+ = _('Enable two-factor authentication')
.col-lg-12
%hr
diff --git a/config/feature_flags/ops/suggested_reviewers_internal_api.yml b/config/feature_flags/ops/suggested_reviewers_internal_api.yml
deleted file mode 100644
index e5e5ce54cb9..00000000000
--- a/config/feature_flags/ops/suggested_reviewers_internal_api.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-name: suggested_reviewers_internal_api
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/105975
-rollout_issue_url:
-milestone: '15.7'
-type: ops
-group: group::applied ml
-default_enabled: true
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index fec4bcb7ba5..c5ca6efb906 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -1266,11 +1266,6 @@ production: &base
# The URL to the Kubernetes API proxy (used by GitLab users)
# external_k8s_proxy_url: https://localhost:8154 # default: nil
- gitlab_suggested_reviewers:
- # File that contains the secret key for verifying access for gitlab-suggested-reviewers.
- # Default is '.gitlab_suggested_reviewers_secret' relative to Rails.root (i.e. root of the GitLab app).
- # secret_file: /home/git/gitlab/.gitlab_suggested_reviewers_secret
-
## GitLab Elasticsearch settings
elasticsearch:
indexer_path: /home/git/gitlab-elasticsearch-indexer/
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 4d8d09313b6..51dff8a422b 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -867,12 +867,6 @@ Settings.gitlab_kas['internal_url'] ||= 'grpc://localhost:8153'
# Settings.gitlab_kas['external_k8s_proxy_url'] ||= 'grpc://localhost:8154' # NOTE: Do not set a default until all distributions have been updated with a correct value
#
-# GitLab Suggested Reviewers
-#
-Settings['gitlab_suggested_reviewers'] ||= Settingslogic.new({})
-Settings.gitlab_suggested_reviewers['secret_file'] ||= Rails.root.join('.gitlab_suggested_reviewers_secret')
-
-#
# Repositories
#
Settings['repositories'] ||= Settingslogic.new({})
diff --git a/config/initializers/gitlab_suggested_reviewers_secret.rb b/config/initializers/gitlab_suggested_reviewers_secret.rb
deleted file mode 100644
index 49fa65b96a1..00000000000
--- a/config/initializers/gitlab_suggested_reviewers_secret.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: true
-
-return unless Gitlab::Runtime.application? && Gitlab.com? && Gitlab.ee?
-
-Gitlab::AppliedMl::SuggestedReviewers.ensure_secret!
diff --git a/doc/.vale/gitlab/spelling-exceptions.txt b/doc/.vale/gitlab/spelling-exceptions.txt
index 6270f710972..fa702cedc6f 100644
--- a/doc/.vale/gitlab/spelling-exceptions.txt
+++ b/doc/.vale/gitlab/spelling-exceptions.txt
@@ -84,6 +84,7 @@ backtraces
backtracing
badging
balancer
+balancer's
Bamboo
Bazel
bcrypt
@@ -100,6 +101,7 @@ boolean
booleans
Bootsnap
bot
+bot's
Bottlerocket
browsable
bugfix
@@ -179,6 +181,7 @@ Coinbase
colocate
colocated
colocating
+commit's
CommonMark
compilable
composable
@@ -205,7 +208,7 @@ crosslinking
crosslinks
Crossplane
Crowdin
-Crypto
+crypto
CSSComb
CSV
CSVs
@@ -586,6 +589,7 @@ nameserver
nameservers
namespace
namespaced
+namespace's
namespaces
namespacing
namespacings
@@ -916,6 +920,7 @@ sublicensed
sublicenses
sublicensing
submodule
+submodule's
subnet
subnets
subnetting
diff --git a/doc/ci/pipelines/multi_project_pipelines.md b/doc/ci/pipelines/multi_project_pipelines.md
deleted file mode 100644
index 25ac9e13185..00000000000
--- a/doc/ci/pipelines/multi_project_pipelines.md
+++ /dev/null
@@ -1,11 +0,0 @@
----
-redirect_to: 'downstream_pipelines.md'
-remove_date: '2022-11-30'
----
-
-This document was moved to [another location](downstream_pipelines.md).
-
-<!-- This redirect file can be deleted after <2022-11-30>. -->
-<!-- Redirects that point to other docs in the same project expire in three months. -->
-<!-- Redirects that point to docs in a different project or site (link is not relative and starts with `https:`) expire in one year. -->
-<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/redirects.html -->
diff --git a/doc/ci/pipelines/parent_child_pipelines.md b/doc/ci/pipelines/parent_child_pipelines.md
deleted file mode 100644
index be8ed8ba6d7..00000000000
--- a/doc/ci/pipelines/parent_child_pipelines.md
+++ /dev/null
@@ -1,11 +0,0 @@
----
-redirect_to: 'downstream_pipelines.md'
-remove_date: '2022-12-05'
----
-
-This document was moved to [another location](downstream_pipelines.md).
-
-<!-- This redirect file can be deleted after <2022-12-05>. -->
-<!-- Redirects that point to other docs in the same project expire in three months. -->
-<!-- Redirects that point to docs in a different project or site (link is not relative and starts with `https:`) expire in one year. -->
-<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/redirects.html -->
diff --git a/lib/api/api.rb b/lib/api/api.rb
index 4d06ccebb72..bc67f3d8839 100644
--- a/lib/api/api.rb
+++ b/lib/api/api.rb
@@ -288,6 +288,7 @@ module API
mount ::API::Unleash
mount ::API::UsageData
mount ::API::UsageDataNonSqlMetrics
+ mount ::API::UsageDataQueries
mount ::API::UserCounts
mount ::API::Wikis
@@ -332,7 +333,6 @@ module API
mount ::API::Todos
mount ::API::UsageData
mount ::API::UsageDataNonSqlMetrics
- mount ::API::UsageDataQueries
mount ::API::Users
mount ::API::Ml::Mlflow
end
diff --git a/lib/api/usage_data_queries.rb b/lib/api/usage_data_queries.rb
index fe972942111..8e85fca4ba9 100644
--- a/lib/api/usage_data_queries.rb
+++ b/lib/api/usage_data_queries.rb
@@ -14,6 +14,12 @@ module API
desc 'Get raw SQL queries for usage data SQL metrics' do
detail 'This feature was introduced in GitLab 13.11.'
+ success code: 200
+ failure [
+ { code: 401, message: 'Unauthorized' },
+ { code: 403, message: 'Forbidden' },
+ { code: 404, message: 'Not Found' }
+ ]
end
get 'queries' do
diff --git a/spec/features/invites_spec.rb b/spec/features/invites_spec.rb
index 5ba0f7025e0..1e71904356d 100644
--- a/spec/features/invites_spec.rb
+++ b/spec/features/invites_spec.rb
@@ -213,6 +213,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures, feature_cate
expect { fill_in_sign_up_form(new_user) }.not_to change { User.count }
expect(page).to have_content('prohibited this user from being saved')
expect(page).to have_current_path(user_registration_path, ignore_query: true)
+ expect(find_field('Email').value).to eq(group_invite.invite_email)
end
end
diff --git a/spec/features/users/signup_spec.rb b/spec/features/users/signup_spec.rb
index d048a6636a9..6171aa3a058 100644
--- a/spec/features/users/signup_spec.rb
+++ b/spec/features/users/signup_spec.rb
@@ -282,7 +282,7 @@ RSpec.describe 'Signup', feature_category: :users do
expect(page).to have_content("Email has already been taken")
end
- it 'does not redisplay the password' do
+ it 'redisplays all fields except password' do
create(:user, email: new_user.email)
visit new_user_registration_path
@@ -291,6 +291,11 @@ RSpec.describe 'Signup', feature_category: :users do
expect(page).to have_current_path user_registration_path, ignore_query: true
expect(page.body).not_to match(/#{new_user.password}/)
+
+ expect(find_field('First name').value).to eq(new_user.first_name)
+ expect(find_field('Last name').value).to eq(new_user.last_name)
+ expect(find_field('Username').value).to eq(new_user.username)
+ expect(find_field('Email').value).to eq(new_user.email)
end
end
diff --git a/spec/models/concerns/has_user_type_spec.rb b/spec/models/concerns/has_user_type_spec.rb
index f8a7763aeed..b6e711e8325 100644
--- a/spec/models/concerns/has_user_type_spec.rb
+++ b/spec/models/concerns/has_user_type_spec.rb
@@ -5,8 +5,7 @@ require 'spec_helper'
RSpec.describe User do
specify 'types consistency checks', :aggregate_failures do
expect(described_class::USER_TYPES.keys)
- .to match_array(%w[human ghost alert_bot project_bot support_bot service_user security_bot visual_review_bot
- migration_bot automation_bot admin_bot suggested_reviewers_bot])
+ .to match_array(%w[human ghost alert_bot project_bot support_bot service_user security_bot visual_review_bot migration_bot automation_bot admin_bot])
expect(described_class::USER_TYPES).to include(*described_class::BOT_USER_TYPES)
expect(described_class::USER_TYPES).to include(*described_class::NON_INTERNAL_USER_TYPES)
expect(described_class::USER_TYPES).to include(*described_class::INTERNAL_USER_TYPES)