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

+1
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

+27-1
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

+1
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

+4
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

+41-1
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

+2-1
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

+2-6
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

+2-33
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

+33-2
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

+1-1
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# frozen_string_literal: true
2+
3+
class FinalizePurgeSecurityScansWithEmptyFindingData < Gitlab::Database::Migration[2.2]
4+
disable_ddl_transaction!
5+
6+
milestone '16.11'
7+
restrict_gitlab_migration gitlab_schema: :gitlab_main
8+
9+
def up
10+
return if Gitlab.com? || !Gitlab.ee?
11+
12+
ensure_batched_background_migration_is_finished(
13+
job_class_name: 'PurgeSecurityScansWithEmptyFindingData',
14+
table_name: :security_scans,
15+
column_name: :id,
16+
job_arguments: [],
17+
finalize: true
18+
)
19+
end
20+
21+
def down
22+
# no-op
23+
end
24+
end

db/schema_migrations/20240320102510

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9cf0040ec4eb9f9baa7bdef04e8afe07bcac0091053ae7810440993609d0f1bc

doc/administration/geo/secondary_proxy/index.md

+27-25
Original file line numberDiff line numberDiff line change
@@ -76,31 +76,6 @@ a single URL used by all Geo sites, including the primary.
7676

7777
In Kubernetes, you can [use the same domain under `global.hosts.domain` as for the primary site](https://docs.gitlab.com/charts/advanced/geo/index.html).
7878

79-
## Geo proxying with Separate URLs
80-
81-
> - Geo secondary proxying for separate URLs is [enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/346112) in GitLab 15.1.
82-
83-
NOTE:
84-
The feature flag described in this section is planned to be deprecated and removed in a future release. Support for read-only Geo secondary sites is proposed in [issue 366810](https://gitlab.com/gitlab-org/gitlab/-/issues/366810), you can upvote and share your use cases in that issue.
85-
86-
If you run into issues, to disable this feature, disable the `geo_secondary_proxy_separate_urls` feature flag.
87-
88-
1. SSH into one node running Rails on your primary Geo site and run:
89-
90-
```shell
91-
sudo gitlab-rails runner "Feature.disable(:geo_secondary_proxy_separate_urls)"
92-
```
93-
94-
1. Restart Puma on all of the nodes running Rails on your secondary Geo site:
95-
96-
```shell
97-
sudo gitlab-ctl restart puma
98-
```
99-
100-
In Kubernetes, you can run the same command in the toolbox pod. Refer to the
101-
[Kubernetes cheat sheet](https://docs.gitlab.com/charts/troubleshooting/kubernetes_cheat_sheet.html#gitlab-specific-kubernetes-information)
102-
for details.
103-
10479
## Limitations
10580

10681
- When secondary proxying is used, the asynchronous Geo replication can cause unexpected issues for accelerated
@@ -204,3 +179,30 @@ gitlab:
204179
extraEnv:
205180
GEO_SECONDARY_PROXY: "0"
206181
```
182+
183+
## Geo proxying with Separate URLs
184+
185+
> - Geo secondary proxying for separate URLs is [enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/346112) in GitLab 15.1.
186+
187+
NOTE:
188+
The feature flag described in this section is planned to be deprecated and removed in a future release. Support for read-only Geo secondary sites is proposed in [issue 366810](https://gitlab.com/gitlab-org/gitlab/-/issues/366810), you can upvote and share your use cases in that issue.
189+
190+
Geo proxying for seperate URLs is enabled by default from GitLab 15.1. This allows secondary sites to proxy actions to the primary site even if the URLS are different.
191+
192+
If you run into issues, disable the `geo_secondary_proxy_separate_urls` feature flag to disable the feature.
193+
194+
1. SSH into one node running Rails on your primary Geo site and run:
195+
196+
```shell
197+
sudo gitlab-rails runner "Feature.disable(:geo_secondary_proxy_separate_urls)"
198+
```
199+
200+
1. Restart Puma on all of the nodes running Rails on your secondary Geo site:
201+
202+
```shell
203+
sudo gitlab-ctl restart puma
204+
```
205+
206+
In Kubernetes, you can run the same command in the toolbox pod. Refer to the
207+
[Kubernetes cheat sheet](https://docs.gitlab.com/charts/troubleshooting/kubernetes_cheat_sheet.html#gitlab-specific-kubernetes-information)
208+
for details.

doc/development/cloud_connector/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ To add a new feature bound to a scope:
104104
services:
105105
new_feature_scope:
106106
service_start_time: 2024-02-15 00:00:00 UTC
107-
min_gitlab_version: '16.8'
108-
bundled_with: 'duo_pro'
107+
min_gitlab_version: '16.8'
108+
bundled_with: 'duo_pro'
109109
```
110110
111111
1. **Optional:** If the backend service the token is used for requires additional claims to be embedded in the

0 commit comments

Comments
 (0)