From 73ff43129b98d433923d144fccd2e47c33c3b091 Mon Sep 17 00:00:00 2001
From: GitLab Bot
Date: Thu, 15 Apr 2021 09:09:03 +0000
Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master
---
.haml-lint.yml | 1 -
Gemfile | 2 +-
Gemfile.lock | 107 ++++---
app/assets/javascripts/boards/index.js | 10 +-
.../action_buttons/remove_member_button.vue | 9 +
.../action_buttons/user_action_buttons.vue | 9 +-
.../members/components/modals/leave_modal.vue | 16 +-
.../mr_widget_options.vue | 2 +-
.../components/blob_viewers/simple_viewer.vue | 12 +-
.../markdown/suggestion_diff_header.vue | 1 +
.../components/oncall_schedules_list.vue | 70 +++++
.../components/remove_member_modal.vue | 21 ++
app/assets/stylesheets/framework/emojis.scss | 7 +
app/controllers/groups/boards_controller.rb | 1 -
app/models/group.rb | 27 +-
app/models/members/group_member.rb | 2 +
.../members/last_group_owner_assigner.rb | 46 +++
app/models/packages/debian/file_metadatum.rb | 2 +
app/models/packages/maven/metadatum.rb | 1 +
app/policies/group_member_policy.rb | 2 +-
app/serializers/member_serializer.rb | 6 +
.../_account_and_limit.html.haml | 2 +-
.../_diff_limits.html.haml | 2 +-
.../admin/application_settings/_eks.html.haml | 2 +-
...ernal_authorization_service_form.html.haml | 2 +-
.../application_settings/_gitpod.html.haml | 2 +-
.../application_settings/_kroki.html.haml | 2 +-
.../application_settings/_plantuml.html.haml | 2 +-
.../application_settings/_signin.html.haml | 2 +-
.../application_settings/_snowplow.html.haml | 2 +-
.../_sourcegraph.html.haml | 2 +-
.../application_settings/_terminal.html.haml | 2 +-
.../application_settings/_terms.html.haml | 2 +-
.../_third_party_offers.html.haml | 2 +-
.../_visibility_and_access.html.haml | 2 +-
.../application_settings/general.html.haml | 2 +-
app/views/award_emoji/_awards_block.html.haml | 2 +-
app/views/groups/edit.html.haml | 2 +-
.../import/fogbugz/new_user_map.html.haml | 2 +-
.../header/_read_only_banner.html.haml | 2 +-
.../registrations/welcome/show.html.haml | 2 +-
.../shared/tokens/_scopes_form.html.haml | 2 +-
...scontroller-index-executes-more-than-1.yml | 5 +
...7-warn-user-is-part-of-oncall-schedule.yml | 5 +
.../unreleased/326819-check-maven-path.yml | 5 +
...ing-tooltip-to-apply-suggestion-button.yml | 5 +
.../unreleased/bw-iteration-globalid.yml | 5 +
.../unreleased/sh-update-rails-6-0-3-6.yml | 5 +
.../development/check_maven_path_first.yml | 8 +
...d_index_to_packages_maven_metadata_path.rb | 17 ++
db/schema_migrations/20210413092922 | 1 +
db/structure.sql | 2 +
.../geo/replication/datatypes.md | 2 +-
doc/ci/multi_project_pipelines.md | 19 +-
lib/api/maven_packages.rb | 18 ++
locale/gitlab.pot | 25 +-
spec/deprecation_toolkit_env.rb | 6 +-
.../settings/forked_project_settings_spec.rb | 2 +-
spec/features/projects_spec.rb | 2 +-
spec/frontend/fixtures/issues.rb | 2 -
.../remove_member_button_spec.js | 2 +
.../user_action_buttons_spec.js | 8 +-
.../components/modals/leave_modal_spec.js | 26 +-
spec/frontend/members/mock_data.js | 1 +
.../blob_viewers/simple_viewer_spec.js | 42 ++-
.../markdown/suggestion_diff_header_spec.js | 16 +-
.../components/remove_member_modal_spec.js | 33 ++-
.../vue_shared/oncall_schedules_list_spec.js | 87 ++++++
...set_header_builder_with_controller_spec.rb | 4 +-
spec/models/group_spec.rb | 171 ++++++++++-
.../members/last_group_owner_assigner_spec.rb | 98 +++++++
spec/models/packages/maven/metadatum_spec.rb | 14 +-
spec/requests/api/maven_packages_spec.rb | 275 ++++++++++++++----
spec/serializers/member_serializer_spec.rb | 65 ++++-
spec/spec_helper.rb | 6 -
75 files changed, 1147 insertions(+), 231 deletions(-)
create mode 100644 app/assets/javascripts/vue_shared/components/oncall_schedules_list.vue
create mode 100644 app/models/members/last_group_owner_assigner.rb
create mode 100644 changelogs/unreleased/21033-controller-groups-groupmemberscontroller-index-executes-more-than-1.yml
create mode 100644 changelogs/unreleased/323627-warn-user-is-part-of-oncall-schedule.yml
create mode 100644 changelogs/unreleased/326819-check-maven-path.yml
create mode 100644 changelogs/unreleased/59202-add-missing-tooltip-to-apply-suggestion-button.yml
create mode 100644 changelogs/unreleased/bw-iteration-globalid.yml
create mode 100644 changelogs/unreleased/sh-update-rails-6-0-3-6.yml
create mode 100644 config/feature_flags/development/check_maven_path_first.yml
create mode 100644 db/post_migrate/20210413092922_add_index_to_packages_maven_metadata_path.rb
create mode 100644 db/schema_migrations/20210413092922
create mode 100644 spec/frontend/vue_shared/oncall_schedules_list_spec.js
create mode 100644 spec/models/members/last_group_owner_assigner_spec.rb
diff --git a/.haml-lint.yml b/.haml-lint.yml
index efbf14b2e22..db3dc8a45cd 100644
--- a/.haml-lint.yml
+++ b/.haml-lint.yml
@@ -135,7 +135,6 @@ linters:
- Style/NegatedIf
- Style/NestedTernaryOperator
- Style/ParenthesesAroundCondition
- - Style/RedundantParentheses
- Style/SelfAssignment
- Style/TernaryParentheses
- Style/TrailingCommaInHashLiteral
diff --git a/Gemfile b/Gemfile
index e07592c9bd6..7d46e9c123f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -2,7 +2,7 @@
source 'https://rubygems.org'
-gem 'rails', '~> 6.0.3.1'
+gem 'rails', '~> 6.0.3.6'
gem 'bootsnap', '~> 1.4.6'
diff --git a/Gemfile.lock b/Gemfile.lock
index 86dbaad98b0..3ec19d681ed 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -17,59 +17,59 @@ GEM
abstract_type (0.0.7)
acme-client (2.0.6)
faraday (>= 0.17, < 2.0.0)
- actioncable (6.0.3.4)
- actionpack (= 6.0.3.4)
+ actioncable (6.0.3.6)
+ actionpack (= 6.0.3.6)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
- actionmailbox (6.0.3.4)
- actionpack (= 6.0.3.4)
- activejob (= 6.0.3.4)
- activerecord (= 6.0.3.4)
- activestorage (= 6.0.3.4)
- activesupport (= 6.0.3.4)
+ actionmailbox (6.0.3.6)
+ actionpack (= 6.0.3.6)
+ activejob (= 6.0.3.6)
+ activerecord (= 6.0.3.6)
+ activestorage (= 6.0.3.6)
+ activesupport (= 6.0.3.6)
mail (>= 2.7.1)
- actionmailer (6.0.3.4)
- actionpack (= 6.0.3.4)
- actionview (= 6.0.3.4)
- activejob (= 6.0.3.4)
+ actionmailer (6.0.3.6)
+ actionpack (= 6.0.3.6)
+ actionview (= 6.0.3.6)
+ activejob (= 6.0.3.6)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
- actionpack (6.0.3.4)
- actionview (= 6.0.3.4)
- activesupport (= 6.0.3.4)
+ actionpack (6.0.3.6)
+ actionview (= 6.0.3.6)
+ activesupport (= 6.0.3.6)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
- actiontext (6.0.3.4)
- actionpack (= 6.0.3.4)
- activerecord (= 6.0.3.4)
- activestorage (= 6.0.3.4)
- activesupport (= 6.0.3.4)
+ actiontext (6.0.3.6)
+ actionpack (= 6.0.3.6)
+ activerecord (= 6.0.3.6)
+ activestorage (= 6.0.3.6)
+ activesupport (= 6.0.3.6)
nokogiri (>= 1.8.5)
- actionview (6.0.3.4)
- activesupport (= 6.0.3.4)
+ actionview (6.0.3.6)
+ activesupport (= 6.0.3.6)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
- activejob (6.0.3.4)
- activesupport (= 6.0.3.4)
+ activejob (6.0.3.6)
+ activesupport (= 6.0.3.6)
globalid (>= 0.3.6)
- activemodel (6.0.3.4)
- activesupport (= 6.0.3.4)
- activerecord (6.0.3.4)
- activemodel (= 6.0.3.4)
- activesupport (= 6.0.3.4)
+ activemodel (6.0.3.6)
+ activesupport (= 6.0.3.6)
+ activerecord (6.0.3.6)
+ activemodel (= 6.0.3.6)
+ activesupport (= 6.0.3.6)
activerecord-explain-analyze (0.1.0)
activerecord (>= 4)
pg
- activestorage (6.0.3.4)
- actionpack (= 6.0.3.4)
- activejob (= 6.0.3.4)
- activerecord (= 6.0.3.4)
- marcel (~> 0.3.1)
- activesupport (6.0.3.4)
+ activestorage (6.0.3.6)
+ actionpack (= 6.0.3.6)
+ activejob (= 6.0.3.6)
+ activerecord (= 6.0.3.6)
+ marcel (~> 1.0.0)
+ activesupport (6.0.3.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
@@ -728,8 +728,7 @@ GEM
lumberjack (1.2.7)
mail (2.7.1)
mini_mime (>= 0.1.1)
- marcel (0.3.3)
- mimemagic (~> 0.3.2)
+ marcel (1.0.1)
marginalia (1.10.0)
actionpack (>= 2.3)
activerecord (>= 2.3)
@@ -961,20 +960,20 @@ GEM
rack-test (1.1.0)
rack (>= 1.0, < 3)
rack-timeout (0.5.2)
- rails (6.0.3.4)
- actioncable (= 6.0.3.4)
- actionmailbox (= 6.0.3.4)
- actionmailer (= 6.0.3.4)
- actionpack (= 6.0.3.4)
- actiontext (= 6.0.3.4)
- actionview (= 6.0.3.4)
- activejob (= 6.0.3.4)
- activemodel (= 6.0.3.4)
- activerecord (= 6.0.3.4)
- activestorage (= 6.0.3.4)
- activesupport (= 6.0.3.4)
+ rails (6.0.3.6)
+ actioncable (= 6.0.3.6)
+ actionmailbox (= 6.0.3.6)
+ actionmailer (= 6.0.3.6)
+ actionpack (= 6.0.3.6)
+ actiontext (= 6.0.3.6)
+ actionview (= 6.0.3.6)
+ activejob (= 6.0.3.6)
+ activemodel (= 6.0.3.6)
+ activerecord (= 6.0.3.6)
+ activestorage (= 6.0.3.6)
+ activesupport (= 6.0.3.6)
bundler (>= 1.3.0)
- railties (= 6.0.3.4)
+ railties (= 6.0.3.6)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
@@ -988,9 +987,9 @@ GEM
rails-i18n (6.0.0)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 7)
- railties (6.0.3.4)
- actionpack (= 6.0.3.4)
- activesupport (= 6.0.3.4)
+ railties (6.0.3.6)
+ actionpack (= 6.0.3.6)
+ activesupport (= 6.0.3.6)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
@@ -1548,7 +1547,7 @@ DEPENDENCIES
rack-oauth2 (~> 1.16.0)
rack-proxy (~> 0.6.0)
rack-timeout (~> 0.5.1)
- rails (~> 6.0.3.1)
+ rails (~> 6.0.3.6)
rails-controller-testing
rails-i18n (~> 6.0)
rainbow (~> 3.0)
diff --git a/app/assets/javascripts/boards/index.js b/app/assets/javascripts/boards/index.js
index e3328449f41..e3f9d2f24c2 100644
--- a/app/assets/javascripts/boards/index.js
+++ b/app/assets/javascripts/boards/index.js
@@ -163,15 +163,9 @@ export default () => {
eventHub.$off('initialBoardLoad', this.initialBoardLoad);
},
mounted() {
- if (!gon.features?.boardsFilteredSearch) {
- this.filterManager = new FilteredSearchBoards(
- boardsStore.filter,
- true,
- boardsStore.cantEdit,
- );
+ this.filterManager = new FilteredSearchBoards(boardsStore.filter, true, boardsStore.cantEdit);
- this.filterManager.setup();
- }
+ this.filterManager.setup();
this.performSearch();
diff --git a/app/assets/javascripts/members/components/action_buttons/remove_member_button.vue b/app/assets/javascripts/members/components/action_buttons/remove_member_button.vue
index fc5fcdc52c5..a477aedd233 100644
--- a/app/assets/javascripts/members/components/action_buttons/remove_member_button.vue
+++ b/app/assets/javascripts/members/components/action_buttons/remove_member_button.vue
@@ -42,6 +42,11 @@ export default {
required: false,
default: false,
},
+ oncallSchedules: {
+ type: Object,
+ required: false,
+ default: () => {},
+ },
},
computed: {
...mapState({
@@ -52,6 +57,9 @@ export default {
computedMemberPath() {
return this.memberPath.replace(':id', this.memberId);
},
+ stringifiedSchedules() {
+ return JSON.stringify(this.oncallSchedules);
+ },
},
};
@@ -69,6 +77,7 @@ export default {
:data-is-access-request="isAccessRequest"
:data-is-invite="isInvite"
:data-message="message"
+ :data-oncall-schedules="stringifiedSchedules"
data-qa-selector="delete_member_button"
/>
diff --git a/app/assets/javascripts/members/components/action_buttons/user_action_buttons.vue b/app/assets/javascripts/members/components/action_buttons/user_action_buttons.vue
index e723685d88b..1e9f79927ea 100644
--- a/app/assets/javascripts/members/components/action_buttons/user_action_buttons.vue
+++ b/app/assets/javascripts/members/components/action_buttons/user_action_buttons.vue
@@ -33,7 +33,7 @@ export default {
if (user) {
return sprintf(
- s__('Members|Are you sure you want to remove %{usersName} from "%{source}"'),
+ s__('Members|Are you sure you want to remove %{usersName} from "%{source}"?'),
{
usersName: user.name,
source: source.fullName,
@@ -42,12 +42,16 @@ export default {
}
return sprintf(
- s__('Members|Are you sure you want to remove this orphaned member from "%{source}"'),
+ s__('Members|Are you sure you want to remove this orphaned member from "%{source}"?'),
{
source: source.fullName,
},
);
},
+ oncallScheduleUserData() {
+ const { user: { name, oncallSchedules: schedules } = {} } = this.member;
+ return { name, schedules };
+ },
},
};
@@ -60,6 +64,7 @@ export default {
v-else
:member-id="member.id"
:member-type="member.type"
+ :oncall-schedules="oncallScheduleUserData"
:message="message"
:title="s__('Member|Remove member')"
/>
diff --git a/app/assets/javascripts/members/components/modals/leave_modal.vue b/app/assets/javascripts/members/components/modals/leave_modal.vue
index b4cbef13b75..44178981136 100644
--- a/app/assets/javascripts/members/components/modals/leave_modal.vue
+++ b/app/assets/javascripts/members/components/modals/leave_modal.vue
@@ -3,6 +3,7 @@ import { GlModal, GlForm, GlSprintf, GlTooltipDirective } from '@gitlab/ui';
import { mapState } from 'vuex';
import csrf from '~/lib/utils/csrf';
import { __, s__, sprintf } from '~/locale';
+import OncallSchedulesList from '~/vue_shared/components/oncall_schedules_list.vue';
import { LEAVE_MODAL_ID } from '../../constants';
export default {
@@ -19,7 +20,7 @@ export default {
csrf,
modalId: LEAVE_MODAL_ID,
modalContent: s__('Members|Are you sure you want to leave "%{source}"?'),
- components: { GlModal, GlForm, GlSprintf },
+ components: { GlModal, GlForm, GlSprintf, OncallSchedulesList },
directives: {
GlTooltip: GlTooltipDirective,
},
@@ -42,6 +43,12 @@ export default {
modalTitle() {
return sprintf(s__('Members|Leave "%{source}"'), { source: this.member.source.fullName });
},
+ schedules() {
+ return this.member.user?.oncallSchedules;
+ },
+ isPartOfOnCallSchedules() {
+ return this.schedules?.length;
+ },
},
methods: {
handlePrimary() {
@@ -58,7 +65,6 @@ export default {
:title="modalTitle"
:action-primary="$options.actionPrimary"
:action-cancel="$options.actionCancel"
- size="sm"
@primary="handlePrimary"
>
@@ -68,6 +74,12 @@ export default {
+
+
diff --git a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
index 78721955141..264ea36137f 100644
--- a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
@@ -514,7 +514,7 @@ export default {
>
{{
s__(
- 'mrWidget|Fork merge requests do not create merge request pipelines which validate a post merge result',
+ 'mrWidget|If the last pipeline ran in the fork project, it may be inaccurate. Before merge, we advise running a pipeline in this project.',
)
}}
diff --git a/app/assets/javascripts/vue_shared/components/blob_viewers/simple_viewer.vue b/app/assets/javascripts/vue_shared/components/blob_viewers/simple_viewer.vue
index f6055054cb0..f477610ff1d 100644
--- a/app/assets/javascripts/vue_shared/components/blob_viewers/simple_viewer.vue
+++ b/app/assets/javascripts/vue_shared/components/blob_viewers/simple_viewer.vue
@@ -1,16 +1,17 @@
+
+
+
+
{{ title }}
+
+
+
+
+
+ {{ schedule.name }}
+
+
+ {{
+ schedule.projectName
+ }}
+
+
+
+
+
+
{{ footer }}
+
+
diff --git a/app/assets/javascripts/vue_shared/components/remove_member_modal.vue b/app/assets/javascripts/vue_shared/components/remove_member_modal.vue
index 9968240b5b1..dff3a6a8c3f 100644
--- a/app/assets/javascripts/vue_shared/components/remove_member_modal.vue
+++ b/app/assets/javascripts/vue_shared/components/remove_member_modal.vue
@@ -1,8 +1,10 @@