Skip to content

Commit b3c5dfb

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent c0bb2c0 commit b3c5dfb

File tree

27 files changed

+155
-143
lines changed

27 files changed

+155
-143
lines changed

.rubocop_todo/lint/unused_method_argument.yml

-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ Lint/UnusedMethodArgument:
254254
- 'ee/lib/ee/gitlab/geo_git_access.rb'
255255
- 'ee/lib/elastic/as_json.rb'
256256
- 'ee/lib/elastic/latest/issue_instance_proxy.rb'
257-
- 'ee/lib/elastic/latest/merge_request_instance_proxy.rb'
258257
- 'ee/lib/elastic/latest/milestone_instance_proxy.rb'
259258
- 'ee/lib/elastic/latest/note_class_proxy.rb'
260259
- 'ee/lib/elastic/latest/note_instance_proxy.rb'

.rubocop_todo/rspec/factory_bot/avoid_create.yml

-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ RSpec/FactoryBot/AvoidCreate:
265265
- 'spec/helpers/gitlab_routing_helper_spec.rb'
266266
- 'spec/helpers/graph_helper_spec.rb'
267267
- 'spec/helpers/groups/group_members_helper_spec.rb'
268-
- 'spec/helpers/groups/settings_helper_spec.rb'
269268
- 'spec/helpers/groups_helper_spec.rb'
270269
- 'spec/helpers/ide_helper_spec.rb'
271270
- 'spec/helpers/import_helper_spec.rb'

.rubocop_todo/rspec/feature_category.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1947,7 +1947,6 @@ RSpec/FeatureCategory:
19471947
- 'spec/helpers/gitlab_script_tag_helper_spec.rb'
19481948
- 'spec/helpers/graph_helper_spec.rb'
19491949
- 'spec/helpers/groups/group_members_helper_spec.rb'
1950-
- 'spec/helpers/groups/settings_helper_spec.rb'
19511950
- 'spec/helpers/hooks_helper_spec.rb'
19521951
- 'spec/helpers/icons_helper_spec.rb'
19531952
- 'spec/helpers/import_helper_spec.rb'

.rubocop_todo/style/inline_disable_annotation.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1707,7 +1707,6 @@ Style/InlineDisableAnnotation:
17071707
- 'ee/lib/elastic/instance_proxy_util.rb'
17081708
- 'ee/lib/elastic/latest/git_class_proxy.rb'
17091709
- 'ee/lib/elastic/latest/issue_class_proxy.rb'
1710-
- 'ee/lib/elastic/latest/merge_request_class_proxy.rb'
17111710
- 'ee/lib/elastic/latest/note_class_proxy.rb'
17121711
- 'ee/lib/elastic/latest/project_class_proxy.rb'
17131712
- 'ee/lib/elastic/latest/user_class_proxy.rb'

GITALY_SERVER_VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8274bcec3ce5fd5059d83e724a4671bc3dcd2d68
1+
940db3886e3b8096f8d7dfcb9eacb2576ed2b9c9

app/assets/javascripts/init_confirm_danger.js

+43-40
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,52 @@ import { parseBoolean } from './lib/utils/common_utils';
44
import ConfirmDanger from './vue_shared/components/confirm_danger/confirm_danger.vue';
55

66
export default () => {
7-
const el = document.querySelector('.js-confirm-danger');
8-
if (!el) return null;
7+
const elements = document.querySelectorAll('.js-confirm-danger');
98

10-
const {
11-
removeFormId = null,
12-
phrase,
13-
buttonText,
14-
buttonClass = '',
15-
buttonTestid,
16-
buttonVariant,
17-
confirmDangerMessage,
18-
confirmButtonText = null,
19-
disabled,
20-
additionalInformation,
21-
htmlConfirmationMessage,
22-
} = el.dataset;
9+
if (!elements.length) return;
2310

24-
return new Vue({
25-
el,
26-
provide: pickBy(
27-
{
28-
htmlConfirmationMessage,
29-
confirmDangerMessage,
30-
additionalInformation,
31-
confirmButtonText,
32-
},
33-
(v) => Boolean(v),
34-
),
35-
render: (createElement) =>
36-
createElement(ConfirmDanger, {
37-
props: {
38-
phrase,
39-
buttonText,
40-
buttonClass,
41-
buttonVariant,
42-
buttonTestid,
43-
disabled: parseBoolean(disabled),
11+
elements.forEach((element) => {
12+
const {
13+
removeFormId = null,
14+
phrase,
15+
buttonText,
16+
buttonClass = '',
17+
buttonTestid,
18+
buttonVariant,
19+
confirmDangerMessage,
20+
confirmButtonText = null,
21+
disabled,
22+
additionalInformation,
23+
htmlConfirmationMessage,
24+
} = element.dataset;
25+
26+
return new Vue({
27+
el: element,
28+
provide: pickBy(
29+
{
30+
htmlConfirmationMessage,
31+
confirmDangerMessage,
32+
additionalInformation,
33+
confirmButtonText,
4434
},
45-
on: {
46-
confirm: () => {
47-
if (removeFormId) document.getElementById(removeFormId)?.submit();
35+
(v) => Boolean(v),
36+
),
37+
render: (createElement) =>
38+
createElement(ConfirmDanger, {
39+
props: {
40+
phrase,
41+
buttonText,
42+
buttonClass,
43+
buttonVariant,
44+
buttonTestid,
45+
disabled: parseBoolean(disabled),
4846
},
49-
},
50-
}),
47+
on: {
48+
confirm: () => {
49+
if (removeFormId) document.getElementById(removeFormId)?.submit();
50+
},
51+
},
52+
}),
53+
});
5154
});
5255
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import initConfirmDanger from '~/init_confirm_danger';
2+
3+
initConfirmDanger();

app/helpers/groups/settings_helper.rb

-21
This file was deleted.

app/helpers/groups_helper.rb

+13-1
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,20 @@ def group_lfs_status(group)
9898
end
9999
end
100100

101+
def group_confirm_modal_data(group:, remove_form_id: nil, permanently_remove: false, button_text: nil)
102+
{
103+
remove_form_id: remove_form_id,
104+
button_text: button_text.nil? ? _('Delete group') : button_text,
105+
button_testid: 'remove-group-button',
106+
disabled: group.prevent_delete?.to_s,
107+
confirm_danger_message: remove_group_message(group, permanently_remove),
108+
phrase: group.full_path,
109+
html_confirmation_message: 'true'
110+
}
111+
end
112+
101113
# Overridden in EE
102-
def remove_group_message(group)
114+
def remove_group_message(group, permanently_remove)
103115
content_tag :div do
104116
content = ''.html_safe
105117
content << content_tag(:span, _("You are about to delete the group %{group_name}.") % { group_name: group.name })

app/models/user_preference.rb

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# frozen_string_literal: true
22

33
class UserPreference < MainClusterwide::ApplicationRecord
4+
include IgnorableColumns
5+
6+
ignore_column :use_web_ide_extension_marketplace, remove_with: '17.4', remove_after: '2024-08-15'
7+
48
# We could use enums, but Rails 4 doesn't support multiple
59
# enum options with same name for multiple fields, also it creates
610
# extra methods that aren't really needed here.

app/views/admin/groups/_group.html.haml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
- group = local_assigns.fetch(:group)
2+
- remove_form_id = "js-remove-group-#{group.id}-form"
23

34
%li.group-row.gl-py-3.gl-align-items-center{ class: 'gl-display-flex!', data: { testid: 'group-row-content' } }
45
= render Pajamas::AvatarComponent.new(group, size: 32, alt: '')
@@ -29,8 +30,9 @@
2930
%span.gl-ml-5.visibility-icon.has-tooltip{ data: { container: 'body', placement: 'left' }, title: visibility_icon_description(group) }
3031
= visibility_level_icon(group.visibility_level)
3132

32-
.controls.gl-flex-shrink-0.gl-ml-5
33+
.controls.gl-flex.gl-flex-shrink-0.gl-ml-5
3334
= render Pajamas::ButtonComponent.new(href: admin_group_edit_path(group), button_options: { id: "edit_#{dom_id(group)}" }) do
3435
= _('Edit')
35-
= render Pajamas::ButtonComponent.new(href: [:admin, group], variant: :danger, button_options: { data: { confirm: _("Are you sure you want to delete %{group_name}?") % { group_name: group.name }, confirm_btn_variant: 'danger', method: :delete } }) do
36-
= _('Delete')
36+
37+
= form_tag([:admin, group], method: :delete, id: remove_form_id) do
38+
.js-confirm-danger{ data: group_confirm_modal_data(group: group, remove_form_id: remove_form_id, permanently_remove: true, button_text: _('Delete')) }

app/views/groups/settings/_remove_button.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
- c.with_body do
77
= html_escape(_("This group can't be removed because it is linked to a subscription. To remove this group, %{linkStart}link the subscription%{linkEnd} with a different group.")) % { linkStart: "<a href=\"#{help_page_path('subscriptions/gitlab_com/index', anchor: 'change-the-linked-namespace')}\">".html_safe, linkEnd: '</a>'.html_safe }
88

9-
.js-confirm-danger{ data: group_settings_confirm_modal_data(group, remove_form_id, button_text) }
9+
.js-confirm-danger{ data: group_confirm_modal_data(group: group, remove_form_id: remove_form_id, button_text: button_text) }

db/docs/merge_request_diff_commit_users.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ feature_categories:
77
description: Store commit user information for merge request diffs
88
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63669
99
milestone: '14.1'
10-
gitlab_schema: gitlab_main_cell
11-
sharding_key_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/444232
10+
gitlab_schema: gitlab_main_clusterwide

doc/administration/settings/jira_cloud_app.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Alternatively, you might want to [install the GitLab for Jira Cloud app manually
9696
- The instance must be publicly available.
9797
- The instance must be on GitLab version 15.7 or later.
9898
- You must set up [OAuth authentication](#set-up-oauth-authentication).
99-
- If your instance uses HTTPS, your GitLab certificate must be publicly trusted or contain the full chain certificate.
99+
- Your GitLab instance must use HTTPS _and_ your GitLab certificate must be publicly trusted or contain the full chain certificate.
100100
- Your network must allow inbound and outbound connections between your self-managed instance,
101101
Jira, and GitLab.com. For self-managed instances that are behind a
102102
firewall and cannot be directly accessed from the internet, you must:

doc/ci/testing/code_coverage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ coverage in the tool's output:
5555
| Name | Language | Command | Example |
5656
|--------------|--------------|--------------|--------------|
5757
| Simplecov | Ruby | None | `/\(\d+.\d+\%\) covered/` |
58-
| pytest-cov | Python | None | `/TOTAL.*? (100(?:\.0+)?\%\|[1-9]?\d(?:\.\d+)?\%)$/` |
58+
| pytest-cov | Python | None | `/TOTAL.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/` |
5959
| Scoverage | Scala | None | `/(?i)total.*? (100(?:\.0+)?\%\|[1-9]?\d(?:\.\d+)?\%)$/` |
6060
| pest | PHP | `pest --coverage --colors=never` | `/Statement coverage[A-Za-z\.*]\s*:\s*([^%]+)/` |
6161
| phpunit | PHP | `phpunit --coverage-text --colors=never` | `/^\s*Lines:\s*\d+.\d+\%/` |

doc/user/application_security/secret_detection/index.md

+16-6
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,23 @@ DETAILS:
1010
**Tier:** Free, Premium, Ultimate
1111
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
1212

13-
People sometimes accidentally commit secrets like keys or API tokens to Git repositories. After a
14-
sensitive value is pushed to a remote repository, anyone with access to the repository can
15-
impersonate the authorized user of the secret for malicious purposes. Most organizations require
16-
exposed secrets to be revoked and replaced to address this risk.
13+
Your application might use external resources, including a CI/CD
14+
service, a database, or external storage. Access to these resources
15+
requires authentication, usually using static methods like private
16+
keys and tokens. These methods are called "secrets" because they're
17+
not meant to be shared with anyone else.
1718

18-
Secret Detection scans your repository to help prevent your secrets from being exposed. Secret
19-
Detection scanning works on all text files, regardless of the language or framework used.
19+
People sometimes accidentally commit secrets to Git
20+
repositories. After a sensitive value is pushed to a remote
21+
repository, anyone with access to the repository can use the secret to
22+
impersonate the authorized user for malicious purposes. To address
23+
this risk, you should store your secrets outside your remote
24+
repositories. If a secret is exposed, you should revoke and replace it
25+
as soon as possible.
26+
27+
Secret Detection scans your repository to help prevent your secrets
28+
from being exposed. Secret Detection scanning works on all text files,
29+
regardless of the language or framework used.
2030

2131
GitLab has two methods for detecting secrets which can be used simultaneously:
2232

doc/user/application_security/vulnerabilities/index.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ The following data is shared with third-party AI APIs:
8989
## Vulnerability resolution
9090

9191
DETAILS:
92-
**Tier:** Ultimate with [GitLab Duo Enterprise](../../../subscriptions/subscription-add-ons.md)
93-
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
92+
**Tier:** For a limited time, Ultimate. In the future, [GitLab Duo Enterprise](../../../subscriptions/subscription-add-ons.md).
93+
**Offering:** GitLab.com
94+
**Status:** Experiment
9495

9596
> - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10779) in GitLab 16.7 as an [experiment](../../../policy/experiment-beta-support.md#experiment) on GitLab.com.
96-
> - [Generally available](https://gitlab.com/groups/gitlab-org/-/epics/10783) in GitLab 17.2.
9797
9898
Use GitLab Duo Vulnerability resolution to automatically create a merge request that
9999
resolves the vulnerability. By default, it is powered by Anthropic's [`claude-3-haiku`](https://docs.anthropic.com/en/docs/about-claude/models#claude-3-a-new-generation-of-ai)
@@ -104,7 +104,7 @@ explanation with caution.
104104

105105
Prerequisites:
106106

107-
- You must have the GitLab Ultimate subscription tier and GitLab Duo Enterprise.
107+
- You must have the GitLab Ultimate subscription tier.
108108
- You must be a member of the project.
109109
- The vulnerability must be a SAST finding.
110110

doc/user/gitlab_duo/index.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,6 @@ DETAILS:
118118
- LLM: Anthropic's [`claude-3-haiku`](https://docs.anthropic.com/en/docs/about-claude/models#claude-3-a-new-generation-of-ai).
119119
- [View documentation](../application_security/vulnerabilities/index.md#explaining-a-vulnerability).
120120

121-
### Vulnerability resolution
122-
123-
DETAILS:
124-
**Tier:** Ultimate with [GitLab Duo Enterprise](../../subscriptions/subscription-add-ons.md) add-on
125-
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
126-
127-
- Help resolve a vulnerability by generating a merge request that addresses it.
128-
- LLM: Anthropic's [`claude-3-haiku`](https://docs.anthropic.com/en/docs/about-claude/models#claude-3-a-new-generation-of-ai).
129-
- [View documentation](../application_security/vulnerabilities/index.md#vulnerability-resolution).
130-
131121
## Beta features
132122

133123
### Merge request template population
@@ -213,6 +203,16 @@ DETAILS:
213203
- LLM: Vertex AI Codey [`text-bison`](https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/text-bison)
214204
- [View documentation](experiments.md#troubleshoot-failed-cicd-jobs-with-root-cause-analysis).
215205

206+
### Vulnerability resolution
207+
208+
**Tier:** For a limited time, Ultimate. In the future, [GitLab Duo Enterprise](../../subscriptions/subscription-add-ons.md).
209+
**Offering:** GitLab.com
210+
**Status:** Experiment
211+
212+
- Help resolve a vulnerability by generating a merge request that addresses it.
213+
- LLM: Anthropic's [`claude-3-haiku`](https://docs.anthropic.com/en/docs/about-claude/models#claude-3-a-new-generation-of-ai).
214+
- [View documentation](../application_security/vulnerabilities/index.md#vulnerability-resolution).
215+
216216
### Product Analytics
217217

218218
DETAILS:

lib/banzai/filter/base_sanitization_filter.rb

+4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ def customize_allowlist(allowlist)
7272

7373
private
7474

75+
def render_timeout
76+
SANITIZATION_RENDER_TIMEOUT
77+
end
78+
7579
# If sanitization times out, we can not return partial un-sanitized results.
7680
# It's ok to allow any following filters to run since this is safe HTML.
7781
def returned_timeout_value

lib/banzai/filter/concerns/timeout_filter_handler.rb

+8
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ module TimeoutFilterHandler
1717
extend ActiveSupport::Concern
1818

1919
RENDER_TIMEOUT = 2.seconds
20+
21+
# [TODO] Seeing several complaints about rendering being too complex.
22+
# https://gitlab.com/gitlab-org/gitlab/-/issues/469683
23+
# The default 2 seconds seems to be too aggressive at the moment.
24+
# It can also depend in the hardware that we're running on.
25+
# So let's make it 5. Currently the overall pipeline timeout
26+
# (pipeline_timing_check.rb) is set to 5.
27+
SANITIZATION_RENDER_TIMEOUT = 5.seconds
2028
COMPLEX_MARKDOWN_MESSAGE =
2129
<<~HTML
2230
<p>Rendering aborted due to complexity issues. If this is valid markdown, please feel free to open an issue

lib/banzai/filter/external_link_filter.rb

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ def call_with_timeout
3838

3939
private
4040

41+
def render_timeout
42+
SANITIZATION_RENDER_TIMEOUT
43+
end
44+
4145
# Since this filter does a level of sanitization, we can not return
4246
# partial un-sanitized results.
4347
# It's ok to allow any following filters to run since this is safe HTML.

locale/gitlab.pot

+1-4
Original file line numberDiff line numberDiff line change
@@ -6964,9 +6964,6 @@ msgstr ""
69646964
msgid "Are you sure you want to continue?"
69656965
msgstr ""
69666966

6967-
msgid "Are you sure you want to delete %{group_name}?"
6968-
msgstr ""
6969-
69706967
msgid "Are you sure you want to delete %{name}?"
69716968
msgstr ""
69726969

@@ -46835,7 +46832,7 @@ msgstr ""
4683546832
msgid "ScanResultPolicy|Remove all approvals with new commit"
4683646833
msgstr ""
4683746834

46838-
msgid "ScanResultPolicy|Require the user's password to approve"
46835+
msgid "ScanResultPolicy|Require user re-authentication (password or SAML) to approve"
4683946836
msgstr ""
4684046837

4684146838
msgid "ScanResultPolicy|Required number of approvals became higher than available, valid approvers."

0 commit comments

Comments
 (0)