Skip to content

Commit 91a8a89

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent e5de358 commit 91a8a89

File tree

23 files changed

+374
-80
lines changed

23 files changed

+374
-80
lines changed

.graphqlrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ schema:
44
documents:
55
- ./app/assets/javascripts/**/*.graphql
66
- ./ee/app/assets/javascripts/**/*.graphql
7+
- ./jh/app/assets/javascripts/**/*.graphql
78
- ./app/graphql/queries/**/*.graphql

app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ import {
1212
WIDGET_TYPE_PROGRESS,
1313
WIDGET_TYPE_START_AND_DUE_DATE,
1414
WIDGET_TYPE_TIME_TRACKING,
15+
WIDGET_TYPE_ROLLEDUP_DATES,
1516
WIDGET_TYPE_WEIGHT,
1617
WIDGET_TYPE_COLOR,
18+
WORK_ITEM_TYPE_VALUE_EPIC,
1719
} from '../constants';
1820
import WorkItemAssigneesInline from './work_item_assignees_inline.vue';
1921
import WorkItemAssigneesWithEdit from './work_item_assignees_with_edit.vue';
@@ -61,6 +63,8 @@ export default {
6163
import('ee_component/work_items/components/work_item_color_inline.vue'),
6264
WorkItemColorWithEdit: () =>
6365
import('ee_component/work_items/components/work_item_color_with_edit.vue'),
66+
WorkItemRolledupDates: () =>
67+
import('ee_component/work_items/components/work_item_rolledup_dates.vue'),
6468
},
6569
mixins: [glFeatureFlagMixin()],
6670
props: {
@@ -92,6 +96,9 @@ export default {
9296
workItemDueDate() {
9397
return this.isWidgetPresent(WIDGET_TYPE_START_AND_DUE_DATE);
9498
},
99+
workItemRolledupDates() {
100+
return this.isWidgetPresent(WIDGET_TYPE_ROLLEDUP_DATES);
101+
},
95102
workItemWeight() {
96103
return this.isWidgetPresent(WIDGET_TYPE_WEIGHT);
97104
},
@@ -113,6 +120,11 @@ export default {
113120
workItemMilestone() {
114121
return this.isWidgetPresent(WIDGET_TYPE_MILESTONE);
115122
},
123+
showRolledupDates() {
124+
return (
125+
this.glFeatures.workItemsRolledupDates && this.workItemType === WORK_ITEM_TYPE_VALUE_EPIC
126+
);
127+
},
116128
workItemParent() {
117129
return this.isWidgetPresent(WIDGET_TYPE_HIERARCHY)?.parent;
118130
},
@@ -211,6 +223,20 @@ export default {
211223
@error="$emit('error', $event)"
212224
/>
213225
</template>
226+
<template v-if="workItemRolledupDates && showRolledupDates">
227+
<work-item-rolledup-dates
228+
:can-update="canUpdate"
229+
:due-date-is-fixed="workItemRolledupDates.dueDateIsFixed"
230+
:due-date-fixed="workItemRolledupDates.dueDateFixed"
231+
:due-date-inherited="workItemRolledupDates.dueDate"
232+
:start-date-is-fixed="workItemRolledupDates.startDateIsFixed"
233+
:start-date-fixed="workItemRolledupDates.startDateFixed"
234+
:start-date-inherited="workItemRolledupDates.startDate"
235+
:work-item-type="workItemType"
236+
:work-item="workItem"
237+
@error="$emit('error', $event)"
238+
/>
239+
</template>
214240
<template v-if="workItemMilestone">
215241
<work-item-milestone-with-edit
216242
v-if="workItemsBetaFeaturesEnabled"
@@ -257,7 +283,7 @@ export default {
257283
@error="$emit('error', $event)"
258284
/>
259285
</template>
260-
<template v-if="workItemDueDate">
286+
<template v-if="workItemDueDate && !showRolledupDates">
261287
<work-item-due-date-with-edit
262288
v-if="workItemsBetaFeaturesEnabled"
263289
:can-update="canUpdate"

app/assets/javascripts/work_items/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const WIDGET_TYPE_CURRENT_USER_TODOS = 'CURRENT_USER_TODOS';
1717
export const WIDGET_TYPE_LABELS = 'LABELS';
1818
export const WIDGET_TYPE_START_AND_DUE_DATE = 'START_AND_DUE_DATE';
1919
export const WIDGET_TYPE_TIME_TRACKING = 'TIME_TRACKING';
20+
export const WIDGET_TYPE_ROLLEDUP_DATES = 'ROLLEDUP_DATES';
2021
export const WIDGET_TYPE_WEIGHT = 'WEIGHT';
2122
export const WIDGET_TYPE_PARTICIPANTS = 'PARTICIPANTS';
2223
export const WIDGET_TYPE_PROGRESS = 'PROGRESS';

app/models/group.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,10 @@ def linked_work_items_feature_flag_enabled?
918918
feature_flag_enabled_for_self_or_ancestor?(:linked_work_items)
919919
end
920920

921+
def work_items_rolledup_dates_feature_flag_enabled?
922+
feature_flag_enabled_for_self_or_ancestor?(:work_items_rolledup_dates)
923+
end
924+
921925
def supports_lock_on_merge?
922926
feature_flag_enabled_for_self_or_ancestor?(:enforce_locked_labels_on_merge, type: :ops)
923927
end

app/services/git/process_ref_changes_service.rb

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ def execute
99

1010
process_changes_by_action(:branch, changes.branch_changes)
1111
process_changes_by_action(:tag, changes.tag_changes)
12+
warn_if_over_process_limit(changes.branch_changes + changes.tag_changes)
1213

1314
perform_housekeeping
1415
end
@@ -63,7 +64,46 @@ def process_changes(ref_type, action, changes, execute_project_hooks:)
6364
end
6465

6566
def under_process_limit?(change)
66-
change[:index] < PIPELINE_PROCESS_LIMIT || Feature.enabled?(:git_push_create_all_pipelines, project)
67+
change[:index] < process_limit || Feature.enabled?(:git_push_create_all_pipelines, project)
68+
end
69+
70+
def process_limit
71+
PIPELINE_PROCESS_LIMIT
72+
end
73+
74+
def warn_if_over_process_limit(changes)
75+
return unless process_limit > 0
76+
return if changes.length <= process_limit
77+
78+
# We don't know for sure whether the project has CI enabled or CI rules
79+
# that might excluded pipelines from being created.
80+
omitted_refs = possible_omitted_pipeline_refs(changes)
81+
82+
return unless omitted_refs.present?
83+
84+
# This notification only lets the admin know that we might have skipped some refs.
85+
Gitlab::AppJsonLogger.info(
86+
message: "Some pipelines may not have been created because ref count exceeded limit",
87+
ref_limit: process_limit,
88+
total_ref_count: changes.length,
89+
possible_omitted_refs: omitted_refs,
90+
possible_omitted_ref_count: omitted_refs.length,
91+
**Gitlab::ApplicationContext.current
92+
)
93+
end
94+
95+
def possible_omitted_pipeline_refs(changes)
96+
# Pipelines can only be created on pushed for branch creation or updates
97+
omitted_changes = changes.select do |change|
98+
change[:index] >= process_limit &&
99+
change_action(change) != :removed
100+
end
101+
102+
# rubocop:disable CodeReuse/ActiveRecord -- not an ActiveRecord model
103+
# rubocop:disable Database/AvoidUsingPluckWithoutLimit -- not an ActiveRecord model
104+
omitted_changes.pluck(:ref).sort
105+
# rubocop:enable CodeReuse/ActiveRecord
106+
# rubocop:enable Database/AvoidUsingPluckWithoutLimit
67107
end
68108

69109
def create_bulk_push_event(ref_type, action, changes)

app/services/resource_access_tokens/create_service.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ def default_user_params
8484
email: username_and_email_generator.email,
8585
username: username_and_email_generator.username,
8686
user_type: :project_bot,
87-
skip_confirmation: true # Bot users should always have their emails confirmed.
87+
skip_confirmation: true, # Bot users should always have their emails confirmed.
88+
organization_id: resource.organization_id
8889
}
8990
end
9091

app/workers/members_destroyer/unassign_issuables_worker.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ class UnassignIssuablesWorker
1515

1616
idempotent!
1717

18-
# Remove the default value `nil` for `requesting_user_id` after 16.10.
19-
# TODO: https://gitlab.com/gitlab-org/gitlab/-/issues/442878
20-
def perform(user_id, entity_id, entity_type, requesting_user_id = nil)
18+
def perform(user_id, entity_id, entity_type, requesting_user_id)
2119
unless ENTITY_TYPES.include?(entity_type)
2220
logger.error(
2321
message: "#{entity_type} is not a supported entity.",
@@ -42,9 +40,7 @@ def perform(user_id, entity_id, entity_type, requesting_user_id = nil)
4240
return
4341
end
4442

45-
# Remove the condition requesting_user_id after 16.10.
46-
# TODO: https://gitlab.com/gitlab-org/gitlab/-/issues/442878
47-
requesting_user = requesting_user_id && User.find(requesting_user_id)
43+
requesting_user = User.find(requesting_user_id)
4844
user = User.find(user_id)
4945
entity = entity_type.constantize.find(entity_id)
5046

config/webpack.config.js

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ const {
4242
WEBPACK_OUTPUT_PATH,
4343
WEBPACK_PUBLIC_PATH,
4444
SOURCEGRAPH_PUBLIC_PATH,
45-
SOURCEGRAPH_OUTPUT_PATH,
46-
GITLAB_WEB_IDE_OUTPUT_PATH,
4745
GITLAB_WEB_IDE_PUBLIC_PATH,
46+
copyFilesPatterns,
4847
} = require('./webpack.constants');
4948

5049
const createIncrementalWebpackCompiler = require('./helpers/incremental_webpack_compiler');
@@ -89,9 +88,6 @@ if (WEBPACK_REPORT) {
8988
NO_HASHED_CHUNKS = true;
9089
}
9190

92-
const SOURCEGRAPH_PACKAGE = '@sourcegraph/code-host-integration';
93-
const GITLAB_WEB_IDE_PACKAGE = '@gitlab/web-ide';
94-
9591
const devtool = IS_PRODUCTION ? 'source-map' : 'cheap-module-eval-source-map';
9692

9793
let autoEntriesCount = 0;
@@ -711,34 +707,7 @@ module.exports = {
711707
}),
712708

713709
new CopyWebpackPlugin({
714-
patterns: [
715-
{
716-
from: path.join(ROOT_PATH, 'node_modules/pdfjs-dist/cmaps/'),
717-
to: path.join(WEBPACK_OUTPUT_PATH, 'pdfjs/cmaps/'),
718-
},
719-
{
720-
from: path.join(ROOT_PATH, 'node_modules/pdfjs-dist/legacy/build/pdf.worker.min.js'),
721-
to: path.join(WEBPACK_OUTPUT_PATH, 'pdfjs/'),
722-
},
723-
{
724-
from: path.join(ROOT_PATH, 'node_modules', SOURCEGRAPH_PACKAGE, '/'),
725-
to: SOURCEGRAPH_OUTPUT_PATH,
726-
globOptions: {
727-
ignore: ['package.json'],
728-
},
729-
},
730-
{
731-
from: path.join(ROOT_PATH, 'node_modules', GITLAB_WEB_IDE_PACKAGE, 'dist', 'public'),
732-
to: GITLAB_WEB_IDE_OUTPUT_PATH,
733-
},
734-
{
735-
from: path.join(
736-
ROOT_PATH,
737-
'node_modules/@gitlab/visual-review-tools/dist/visual_review_toolbar.js',
738-
),
739-
to: WEBPACK_OUTPUT_PATH,
740-
},
741-
],
710+
patterns: copyFilesPatterns,
742711
}),
743712

744713
// compression can require a lot of compute time and is disabled in CI

config/webpack.constants.js

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,45 @@ const GITLAB_WEB_IDE_PUBLIC_PATH = path.join(WEBPACK_PUBLIC_PATH, GITLAB_WEB_IDE
1818
const IS_EE = require('./helpers/is_ee_env');
1919
const IS_JH = require('./helpers/is_jh_env');
2020

21+
const SOURCEGRAPH_PACKAGE = '@sourcegraph/code-host-integration';
22+
const GITLAB_WEB_IDE_PACKAGE = '@gitlab/web-ide';
23+
24+
const copyFilesPatterns = [
25+
{
26+
from: path.join(ROOT_PATH, 'node_modules/pdfjs-dist/cmaps/'),
27+
to: path.join(WEBPACK_OUTPUT_PATH, 'pdfjs/cmaps/'),
28+
},
29+
{
30+
from: path.join(ROOT_PATH, 'node_modules/pdfjs-dist/legacy/build/pdf.worker.min.js'),
31+
to: path.join(WEBPACK_OUTPUT_PATH, 'pdfjs/'),
32+
},
33+
{
34+
from: path.join(ROOT_PATH, 'node_modules', SOURCEGRAPH_PACKAGE, '/'),
35+
to: SOURCEGRAPH_OUTPUT_PATH,
36+
globOptions: {
37+
ignore: ['package.json'],
38+
},
39+
},
40+
{
41+
from: path.join(ROOT_PATH, 'node_modules', GITLAB_WEB_IDE_PACKAGE, 'dist', 'public'),
42+
to: GITLAB_WEB_IDE_OUTPUT_PATH,
43+
},
44+
{
45+
from: path.join(
46+
ROOT_PATH,
47+
'node_modules/@gitlab/visual-review-tools/dist/visual_review_toolbar.js',
48+
),
49+
to: WEBPACK_OUTPUT_PATH,
50+
},
51+
];
52+
2153
module.exports = {
2254
IS_EE,
2355
IS_JH,
2456
ROOT_PATH,
2557
WEBPACK_OUTPUT_PATH,
2658
WEBPACK_PUBLIC_PATH,
27-
SOURCEGRAPH_OUTPUT_PATH,
2859
SOURCEGRAPH_PUBLIC_PATH,
29-
GITLAB_WEB_IDE_OUTPUT_PATH,
3060
GITLAB_WEB_IDE_PUBLIC_PATH,
61+
copyFilesPatterns,
3162
};

db/docs/batched_background_migrations/purge_security_scans_with_empty_finding_data.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ milestone: '16.10'
77
queued_migration_version: 20240209153920
88
# Replace with the approximate date you think it's best to ensure the completion of this BBM.
99
finalize_after: '2024-03-15'
10-
finalized_by: # version of the migration that finalized this BBM
10+
finalized_by: 20240320102510

0 commit comments

Comments
 (0)