Skip to content

Commit 5c4df06

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent c1f98d9 commit 5c4df06

File tree

81 files changed

+525
-200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+525
-200
lines changed

.rubocop_todo/rake/require.yml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Rake/Require:
33
Details: grace period
44
Exclude:
55
- 'lib/tasks/gitlab/assets.rake'
6-
- 'lib/tasks/gitlab/dependency_proxy/migrate.rake'
76
- 'lib/tasks/gitlab/docs/redirect.rake'
87
- 'lib/tasks/gitlab/graphql.rake'
98
- 'lib/tasks/gitlab/lfs/migrate.rake'

app/assets/javascripts/pipelines/pipeline_tabs.js

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const createAppOptions = (selector, apolloProvider, router) => {
3434
totalJobCount,
3535
licenseManagementApiUrl,
3636
licenseManagementSettingsPath,
37+
licenseScanCount,
3738
licensesApiPath,
3839
canManageLicenses,
3940
summaryEndpoint,
@@ -87,6 +88,7 @@ export const createAppOptions = (selector, apolloProvider, router) => {
8788
totalJobCount,
8889
licenseManagementApiUrl,
8990
licenseManagementSettingsPath,
91+
licenseScanCount,
9092
licensesApiPath,
9193
canManageLicenses: parseBoolean(canManageLicenses),
9294
summaryEndpoint,

app/assets/javascripts/related_issues/constants.js

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { __, sprintf } from '~/locale';
2-
import { TYPE_ISSUE } from '~/issues/constants';
2+
import { TYPE_EPIC, TYPE_ISSUE } from '~/issues/constants';
33

44
export const issuableTypesMap = {
55
ISSUE: 'issue',
@@ -32,7 +32,7 @@ export const autoCompleteTextMap = {
3232
{ emphasisStart: '<', emphasisEnd: '>' },
3333
false,
3434
),
35-
[issuableTypesMap.EPIC]: sprintf(
35+
[TYPE_EPIC]: sprintf(
3636
__(' or %{emphasisStart}&epic id%{emphasisEnd}'),
3737
{ emphasisStart: '<', emphasisEnd: '>' },
3838
false,
@@ -45,32 +45,32 @@ export const autoCompleteTextMap = {
4545
},
4646
false: {
4747
[TYPE_ISSUE]: '',
48-
[issuableTypesMap.EPIC]: '',
48+
[TYPE_EPIC]: '',
4949
[issuableTypesMap.MERGE_REQUEST]: __(' or references'),
5050
},
5151
};
5252

5353
export const inputPlaceholderTextMap = {
5454
[TYPE_ISSUE]: __('Paste issue link'),
5555
[issuableTypesMap.INCIDENT]: __('Paste link'),
56-
[issuableTypesMap.EPIC]: __('Paste epic link'),
56+
[TYPE_EPIC]: __('Paste epic link'),
5757
[issuableTypesMap.MERGE_REQUEST]: __('Enter merge request URLs'),
5858
};
5959

6060
export const inputPlaceholderConfidentialTextMap = {
6161
[TYPE_ISSUE]: __('Paste confidential issue link'),
62-
[issuableTypesMap.EPIC]: __('Paste confidential epic link'),
62+
[TYPE_EPIC]: __('Paste confidential epic link'),
6363
[issuableTypesMap.MERGE_REQUEST]: __('Enter merge request URLs'),
6464
};
6565

6666
export const relatedIssuesRemoveErrorMap = {
6767
[TYPE_ISSUE]: __('An error occurred while removing issues.'),
68-
[issuableTypesMap.EPIC]: __('An error occurred while removing epics.'),
68+
[TYPE_EPIC]: __('An error occurred while removing epics.'),
6969
};
7070

7171
export const pathIndeterminateErrorMap = {
7272
[TYPE_ISSUE]: __('We could not determine the path to remove the issue'),
73-
[issuableTypesMap.EPIC]: __('We could not determine the path to remove the epic'),
73+
[TYPE_EPIC]: __('We could not determine the path to remove the epic'),
7474
};
7575

7676
export const itemAddFailureTypesMap = {
@@ -80,7 +80,7 @@ export const itemAddFailureTypesMap = {
8080

8181
export const addRelatedIssueErrorMap = {
8282
[TYPE_ISSUE]: __('Issue cannot be found.'),
83-
[issuableTypesMap.EPIC]: __('Epic cannot be found.'),
83+
[TYPE_EPIC]: __('Epic cannot be found.'),
8484
};
8585

8686
export const addRelatedItemErrorMap = {
@@ -97,7 +97,7 @@ export const addRelatedItemErrorMap = {
9797
export const issuableIconMap = {
9898
[TYPE_ISSUE]: 'issues',
9999
[issuableTypesMap.INCIDENT]: 'issues',
100-
[issuableTypesMap.EPIC]: 'epic',
100+
[TYPE_EPIC]: 'epic',
101101
};
102102

103103
export const PathIdSeparator = {
@@ -108,28 +108,28 @@ export const PathIdSeparator = {
108108
export const issuablesBlockHeaderTextMap = {
109109
[TYPE_ISSUE]: __('Linked items'),
110110
[issuableTypesMap.INCIDENT]: __('Linked incidents or issues'),
111-
[issuableTypesMap.EPIC]: __('Linked epics'),
111+
[TYPE_EPIC]: __('Linked epics'),
112112
};
113113

114114
export const issuablesBlockHelpTextMap = {
115115
[TYPE_ISSUE]: __('Learn more about linking issues'),
116116
[issuableTypesMap.INCIDENT]: __('Learn more about linking issues and incidents'),
117-
[issuableTypesMap.EPIC]: __('Learn more about linking epics'),
117+
[TYPE_EPIC]: __('Learn more about linking epics'),
118118
};
119119

120120
export const issuablesBlockAddButtonTextMap = {
121121
[TYPE_ISSUE]: __('Add a related issue'),
122-
[issuableTypesMap.EPIC]: __('Add a related epic'),
122+
[TYPE_EPIC]: __('Add a related epic'),
123123
};
124124

125125
export const issuablesFormCategoryHeaderTextMap = {
126126
[TYPE_ISSUE]: __('The current issue'),
127127
[issuableTypesMap.INCIDENT]: __('The current incident'),
128-
[issuableTypesMap.EPIC]: __('The current epic'),
128+
[TYPE_EPIC]: __('The current epic'),
129129
};
130130

131131
export const issuablesFormInputTextMap = {
132132
[TYPE_ISSUE]: __('the following issues'),
133133
[issuableTypesMap.INCIDENT]: __('the following incidents or issues'),
134-
[issuableTypesMap.EPIC]: __('the following epics'),
134+
[TYPE_EPIC]: __('the following epics'),
135135
};

app/assets/javascripts/search/sidebar/components/language_filter.vue

+2-5
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ export default {
3131
computed: {
3232
...mapState(['aggregations', 'sidebarDirty']),
3333
...mapGetters(['langugageAggregationBuckets']),
34-
ffBasedXPadding() {
35-
return this.glFeatures.searchPageVerticalNav ? 'gl-px-5' : 'gl-px-0';
36-
},
3734
hasBuckets() {
3835
return this.langugageAggregationBuckets.length > 0;
3936
},
@@ -87,7 +84,7 @@ export default {
8784
class="gl-overflow-x-hidden gl-overflow-y-auto"
8885
:class="{ 'language-filter-max-height': showAll }"
8986
>
90-
<checkbox-filter :class="ffBasedXPadding" :filter-data="filtersData" />
87+
<checkbox-filter class="gl-px-5" :filter-data="filtersData" />
9188
<span v-if="showAll && hasOverMax" data-testid="has-over-max-text">{{
9289
$options.i18n.showingMax
9390
}}</span>
@@ -109,7 +106,7 @@ export default {
109106
</div>
110107
<div v-if="!aggregations.error">
111108
<hr :class="$options.HR_DEFAULT_CLASSES" />
112-
<div class="gl-display-flex gl-align-items-center gl-mt-4 gl-mx-5" :class="ffBasedXPadding">
109+
<div class="gl-display-flex gl-align-items-center gl-mt-4 gl-mx-5 gl-px-5">
113110
<gl-button
114111
category="primary"
115112
variant="confirm"

app/controllers/projects_controller.rb

+10-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,16 @@ def housekeeping
228228
:eager
229229
end
230230

231-
::Repositories::HousekeepingService.new(@project, task).execute
231+
::Repositories::HousekeepingService.new(@project, task).execute do
232+
::Gitlab::Audit::Auditor.audit(
233+
name: 'manually_trigger_housekeeping',
234+
author: current_user,
235+
scope: @project,
236+
target: @project,
237+
message: "Housekeeping task: #{task}",
238+
created_at: DateTime.current
239+
)
240+
end
232241

233242
redirect_to(
234243
project_path(@project),

app/finders/fork_targets_finder.rb

-10
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ def initialize(project, user)
77
end
88

99
def execute(options = {})
10-
return previous_execute(options) unless Feature.enabled?(:searchable_fork_targets)
11-
1210
items = fork_targets(options)
1311

1412
by_search(items, options)
@@ -31,14 +29,6 @@ def fork_targets(options)
3129
user.forkable_namespaces.sort_by_type
3230
end
3331
end
34-
35-
# rubocop: disable CodeReuse/ActiveRecord
36-
def previous_execute(options = {})
37-
return ::Namespace.where(id: user.forkable_namespaces).sort_by_type unless options[:only_groups]
38-
39-
::Group.where(id: user.manageable_groups(include_groups_with_developer_maintainer_access: true))
40-
end
41-
# rubocop: enable CodeReuse/ActiveRecord
4232
end
4333

4434
ForkTargetsFinder.prepend_mod_with('ForkTargetsFinder')

app/finders/groups_finder.rb

+8
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# min_access_level: integer
1414
# search: string
1515
# exclude_group_ids: array of integers
16+
# filter_group_ids: array of integers - only include groups from the specified list of ids
1617
# include_parent_descendants: boolean (defaults to false) - includes descendant groups when
1718
# filtering by parent. The parent param must be present.
1819
# include_ancestors: boolean (defaults to true)
@@ -34,6 +35,7 @@ def execute
3435
items = all_groups.map do |item|
3536
item = by_parent(item)
3637
item = by_custom_attributes(item)
38+
item = filter_group_ids(item)
3739
item = exclude_group_ids(item)
3840
item = by_search(item)
3941

@@ -90,6 +92,12 @@ def exclude_group_ids(groups)
9092
groups.id_not_in(params[:exclude_group_ids])
9193
end
9294

95+
def filter_group_ids(groups)
96+
return groups unless params[:filter_group_ids]
97+
98+
groups.id_in(params[:filter_group_ids])
99+
end
100+
93101
# rubocop: disable CodeReuse/ActiveRecord
94102
def by_parent(groups)
95103
return groups unless params[:parent]

app/graphql/types/packages/package_details_type.rb

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ class PackageDetailsType < PackageType
2828

2929
field :last_downloaded_at, Types::TimeType, null: true, description: 'Last time that a file of this package was downloaded.'
3030

31+
field :public_package, GraphQL::Types::Boolean, null: true, description: 'Indicates if there is public access to the package.'
32+
3133
def versions
3234
object.versions
3335
end
@@ -63,6 +65,10 @@ def pypi_setup_url
6365
def pypi_url
6466
pypi_registry_url(object.project.id)
6567
end
68+
69+
def public_package
70+
object.project.public? || object.project.project_feature.package_registry_access_level == ProjectFeature::PUBLIC
71+
end
6672
end
6773
end
6874
end

app/models/merge_request.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -2080,7 +2080,11 @@ def expire_etag_cache
20802080
end
20812081

20822082
def report_type_enabled?(report_type)
2083-
!!actual_head_pipeline&.batch_lookup_report_artifact_for_file_type(report_type)
2083+
if report_type == :license_scanning
2084+
::Gitlab::LicenseScanning.scanner_for_pipeline(project, actual_head_pipeline).has_data?
2085+
else
2086+
!!actual_head_pipeline&.batch_lookup_report_artifact_for_file_type(report_type)
2087+
end
20842088
end
20852089
end
20862090

app/views/groups/edit.html.haml

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
.settings-content
2929
= render 'groups/settings/permissions'
3030

31+
= render_if_exists 'groups/merge_requests', expanded: expanded, group: @group
3132
= render_if_exists 'groups/merge_request_approval_settings', expanded: expanded, group: @group, user: current_user
3233
= render_if_exists 'groups/insights', expanded: expanded
3334
= render_if_exists 'groups/analytics_dashboards', expanded: expanded
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
- form = local_assigns.fetch(:form)
22

33
= form.gitlab_ui_checkbox_component :only_allow_merge_if_pipeline_succeeds,
4-
s_('ProjectSettings|Pipelines must succeed'),
5-
help_text: s_("ProjectSettings|Merge requests can't be merged if the latest pipeline did not succeed or is still running.")
4+
s_('MergeChecks|Pipelines must succeed'),
5+
help_text: s_("MergeChecks|Merge requests can't be merged if the latest pipeline did not succeed or is still running.")
66
.gl-pl-6
77
= form.gitlab_ui_checkbox_component :allow_merge_on_skipped_pipeline,
8-
s_('ProjectSettings|Skipped pipelines are considered successful'),
9-
help_text: s_('ProjectSettings|Introduces the risk of merging changes that do not pass the pipeline.'),
8+
s_('MergeChecks|Skipped pipelines are considered successful'),
9+
help_text: s_('MergeChecks|Introduces the risk of merging changes that do not pass the pipeline.'),
1010
checkbox_options: { class: 'gl-pl-6' }
1111
= form.gitlab_ui_checkbox_component :only_allow_merge_if_all_discussions_are_resolved,
12-
s_('ProjectSettings|All threads must be resolved'),
13-
checkbox_options: { data: { qa_selector: 'allow_merge_if_all_discussions_are_resolved_checkbox' } }
12+
s_('MergeChecks|All threads must be resolved'),
13+
checkbox_options: { data: { qa_selector: 'only_allow_merge_if_all_discussions_are_resolved_checkbox' } }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
name: manually_trigger_housekeeping
3+
description: Triggered when manually triggering housekeeping via api or admin UI
4+
introduced_by_issue: https://gitlab.com/gitlab-org/gitlab/-/issues/390761
5+
introduced_by_mr: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/112095
6+
feature_category: source_code_management
7+
milestone: '15.9'
8+
saved_to_database: true
9+
streamed: true

config/feature_flags/development/searchable_fork_targets.yml

-8
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# frozen_string_literal: true
22

3+
require_relative '../../lib/gitlab/i18n'
4+
35
Gitlab::I18n.setup(domain: 'gitlab', default_locale: :en)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# frozen_string_literal: true
2+
3+
class PrepareAsyncForeignKeyValidationForCiBuildReportResults < Gitlab::Database::Migration[2.1]
4+
TABLE_NAME = :ci_build_report_results
5+
COLUMN_NAMES = [:partition_id, :build_id]
6+
FOREIGN_KEY_NAME = :fk_rails_16cb1ff064_p
7+
8+
def up
9+
prepare_async_foreign_key_validation(TABLE_NAME, COLUMN_NAMES, name: FOREIGN_KEY_NAME)
10+
end
11+
12+
def down
13+
unprepare_async_foreign_key_validation(TABLE_NAME, COLUMN_NAMES, name: FOREIGN_KEY_NAME)
14+
end
15+
end

db/schema_migrations/20230216052103

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
f6520e0b7cda276b7cf198bcbb0be4425c844a88d38118740675b639dbc73694

doc/administration/gitaly/praefect.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ Particular attention should be shown to:
10251025
10261026
WARNING:
10271027
If you have existing data stored on the default Gitaly storage,
1028-
you should [migrate the data your Gitaly Cluster storage](index.md#migrate-to-gitaly-cluster)
1028+
you should [migrate the data to your Gitaly Cluster storage](index.md#migrate-to-gitaly-cluster)
10291029
first.
10301030
10311031
```ruby

doc/administration/integration/kroki.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ group: Project Management
44
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
55
---
66

7-
# Kroki diagrams **(FREE SELF)**
7+
# Kroki **(FREE SELF)**
88

99
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/241744) in GitLab 13.7.
1010
> - Support for reStructuredText and Textile documents [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/324766) in GitLab 13.12.

doc/administration/integration/mailgun.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
55
type: reference, howto
66
---
77

8-
# Mailgun and GitLab **(FREE SELF)**
8+
# Mailgun **(FREE SELF)**
99

1010
When you use Mailgun to send emails for your GitLab instance and [Mailgun](https://www.mailgun.com/)
1111
integration is enabled and configured in GitLab, you can receive their webhook for

doc/administration/integration/plantuml.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ info: "To determine the technical writer assigned to the Stage/Group associated
55
type: reference, howto
66
---
77

8-
# PlantUML and GitLab **(FREE)**
8+
# PlantUML **(FREE)**
99

1010
When the [PlantUML](https://plantuml.com) integration is enabled and configured in
1111
GitLab, you can create diagrams in snippets, wikis, and repositories. This integration

doc/administration/sidekiq/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ Updates to example must be made at:
184184
## Set number of Sidekiq queue processes to the same number as available CPUs
185185
sidekiq['queue_groups'] = ['*'] * 4
186186

187-
## Set number of Sidekiq threads per queue process to the recommend number of 10
188-
sidekiq['max_concurrency'] = 10
187+
## Set number of Sidekiq threads per queue process to the recommend number of 20
188+
sidekiq['max_concurrency'] = 20
189189
```
190190

191191
1. Copy the `/etc/gitlab/gitlab-secrets.json` file from the GitLab instance and replace the file in the Sidekiq instance.

0 commit comments

Comments
 (0)