Skip to content

Commit 4965365

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

File tree

212 files changed

+2544
-866
lines changed

Some content is hidden

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

212 files changed

+2544
-866
lines changed

.gitlab/ci/cng/main.gitlab-ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ include:
8080
SKIP_IMAGE_VERIFICATION: "true"
8181
# set specific arch list
8282
ARCH_LIST: amd64
83+
# use larger runner for complex rails build jobs
84+
HIGH_CAPACITY_RUNNER_TAG: high-cpu
8385
trigger:
8486
project: '${CI_PROJECT_NAMESPACE}/$[[ inputs.cng_path ]]'
8587
branch: $TRIGGER_BRANCH

.gitlab/ci/global.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- export GOPATH=$CI_PROJECT_DIR/.go
1717
- mkdir -p $GOPATH
1818
- source scripts/utils.sh
19-
- log_disk_usage before_script # https://gitlab.com/gitlab-org/gitlab/-/issues/478880
19+
- log_disk_usage "false" # https://gitlab.com/gitlab-org/gitlab/-/issues/478880
2020

2121
.default-before_script:
2222
before_script:

.gitlab/ci/rails/shared.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ include:
102102
- rspec_section rspec_parallelized_job "--fail-fast=${RSPEC_FAIL_FAST_THRESHOLD} --tag ~quarantine --tag ~level:background_migration --tag ~click_house"
103103
after_script:
104104
- source scripts/utils.sh
105-
- log_disk_usage after_script # https://gitlab.com/gitlab-org/gitlab/-/issues/478880
105+
- log_disk_usage # https://gitlab.com/gitlab-org/gitlab/-/issues/478880
106106
- bundle exec gem list gitlab_quality-test_tooling
107107
- |
108108
section_start "failed-test-issues" "Report test failures"

.gitlab/ci/rules.gitlab-ci.yml

+7
Original file line numberDiff line numberDiff line change
@@ -2558,6 +2558,13 @@
25582558
- <<: *if-default-refs
25592559
changes: *code-backstage-qa-patterns
25602560

2561+
.static-analysis:rules:ensure-application-settings-have-definition-file:
2562+
rules:
2563+
- <<: *if-default-refs
2564+
changes:
2565+
- db/structure.sql
2566+
- config/application_setting_columns/*.yml
2567+
25612568
.static-analysis:rules:haml-lint:
25622569
rules:
25632570
- <<: *if-default-refs

.gitlab/ci/static-analysis.gitlab-ci.yml

+10
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,16 @@ feature-flags-usage:
169169
paths:
170170
- tmp/feature_flags/
171171

172+
ensure-application-settings-have-definition-file:
173+
image: ruby:${RUBY_VERSION}-alpine
174+
extends:
175+
- .static-analysis-base
176+
- .static-analysis:rules:ensure-application-settings-have-definition-file
177+
variables:
178+
USE_BUNDLE_INSTALL: "false"
179+
script:
180+
- run_timed_command "scripts/cells/ci-ensure-application-settings-have-definition-file.rb"
181+
172182
semgrep-appsec-custom-rules:
173183
stage: lint
174184
extends:

.gitlab/ci/test-on-cng/main.gitlab-ci.yml

-5
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@ build-cng:
105105
variables:
106106
# use larger runner for complex rails build jobs
107107
HIGH_CAPACITY_RUNNER_TAG: e2e
108-
# quality specific fork, see: https://gitlab.com/gitlab-org/quality/quality-engineering/team-tasks/-/issues/2839
109-
trigger:
110-
project: ${CI_PROJECT_NAMESPACE}/quality/quality-engineering/CNG-mirror
111-
branch: $TRIGGER_BRANCH
112-
strategy: depend
113108

114109
download-knapsack-report:
115110
extends:

.lefthook/gitleaks.sh

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
MINIMUM_VERSION="v8.20"
5+
SCRIPT_NAME=$(basename "$0")
6+
HOOK_TYPE="${1:-}"
7+
8+
if ! command -v gitleaks &>/dev/null; then
9+
cat >&2 <<EOF
10+
WARNING: gitleaks is not installed. Skipping secrets detection.
11+
Please install at least version v$MINIMUM_VERSION using "asdf install" or see:
12+
https://gitlab.com/gitlab-com/gl-security/security-research/gitleaks-endpoint-installer.
13+
EOF
14+
exit 0
15+
fi
16+
17+
if [ -z "$HOOK_TYPE" ]; then
18+
cat >&2 <<EOF
19+
ERROR: Hook type argument is required.
20+
Usage: ./$SCRIPT_NAME [pre-commit|pre-push]
21+
Please specify 'pre-commit' or 'pre-push' as the argument.
22+
EOF
23+
exit 1
24+
fi
25+
26+
if [ "$HOOK_TYPE" == "pre-commit" ]; then
27+
gitleaks git --pre-commit --staged --no-banner --redact --verbose
28+
elif [ "$HOOK_TYPE" == "pre-push" ]; then
29+
BASE_COMMIT=$(git merge-base origin/master HEAD)
30+
gitleaks git --log-opts="$BASE_COMMIT..HEAD" --no-banner --redact --verbose
31+
else
32+
cat >&2 <<EOF
33+
ERROR: Unsupported hook type '$HOOK_TYPE'.
34+
Usage: ./$SCRIPT_NAME [pre-commit|pre-push]
35+
EOF
36+
exit 1
37+
fi

.rubocop_todo/layout/line_length.yml

-2
Original file line numberDiff line numberDiff line change
@@ -1986,7 +1986,6 @@ Layout/LineLength:
19861986
- 'ee/spec/services/quick_actions/interpret_service_spec.rb'
19871987
- 'ee/spec/services/requirements_management/export_csv_service_spec.rb'
19881988
- 'ee/spec/services/resource_events/change_weight_service_spec.rb'
1989-
- 'ee/spec/services/search/global_service_spec.rb'
19901989
- 'ee/spec/services/search/snippet_service_spec.rb'
19911990
- 'ee/spec/services/security/ingestion/finding_map_collection_spec.rb'
19921991
- 'ee/spec/services/security/ingestion/ingest_report_service_spec.rb'
@@ -3865,7 +3864,6 @@ Layout/LineLength:
38653864
- 'spec/requests/api/feature_flags_spec.rb'
38663865
- 'spec/requests/api/features_spec.rb'
38673866
- 'spec/requests/api/files_spec.rb'
3868-
- 'spec/requests/api/generic_packages_spec.rb'
38693867
- 'spec/requests/api/go_proxy_spec.rb'
38703868
- 'spec/requests/api/graphql/boards/board_list_issues_query_spec.rb'
38713869
- 'spec/requests/api/graphql/boards/board_list_query_spec.rb'

.rubocop_todo/rails/strong_params.yml

-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,6 @@ Rails/StrongParams:
325325
- 'ee/app/controllers/security/projects_controller.rb'
326326
- 'ee/app/controllers/smartcard_controller.rb'
327327
- 'ee/app/controllers/subscriptions/groups_controller.rb'
328-
- 'ee/app/controllers/subscriptions/hand_raise_leads_controller.rb'
329328
- 'ee/app/controllers/subscriptions_controller.rb'
330329
- 'ee/app/controllers/users/base_identity_verification_controller.rb'
331330
- 'ee/app/controllers/users/registrations_identity_verification_controller.rb'

.rubocop_todo/rspec/context_wording.yml

-1
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,6 @@ RSpec/ContextWording:
733733
- 'ee/spec/services/requirements_management/export_csv_service_spec.rb'
734734
- 'ee/spec/services/resource_access_tokens/create_service_spec.rb'
735735
- 'ee/spec/services/resource_access_tokens/revoke_service_spec.rb'
736-
- 'ee/spec/services/search/global_service_spec.rb'
737736
- 'ee/spec/services/search/snippet_service_spec.rb'
738737
- 'ee/spec/services/security/ingestion/tasks/ingest_vulnerabilities/create_spec.rb'
739738
- 'ee/spec/services/security/ingestion/tasks/update_vulnerability_uuids_spec.rb'

GITALY_SERVER_VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6175a5f017f01e11959045c0dc24d9ca237865e6
1+
39a5e315d1b3e112db13930382d11061bfa95964

Gemfile.checksum

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@
292292
{"name":"graphiql-rails","version":"1.10.0","platform":"ruby","checksum":"b557f989a737c8b9e985142609bec52fb1e9393a701eb50e02a7c14422891040"},
293293
{"name":"graphlient","version":"0.8.0","platform":"ruby","checksum":"98c408da1d083454e9f5e274f3b0b6261e2a0c2b5f2ed7b3ef9441d46f8e7cb1"},
294294
{"name":"graphlyte","version":"1.0.0","platform":"ruby","checksum":"b5af4ab67dde6e961f00ea1c18f159f73b52ed11395bb4ece297fe628fa1804d"},
295-
{"name":"graphql","version":"2.3.16","platform":"ruby","checksum":"6ac9966998914c5b470e527c7105d936db70af2306ec0445f88953404bce49c7"},
295+
{"name":"graphql","version":"2.3.17","platform":"ruby","checksum":"5e03655bf8ab07cd9710821f7f991ca6f5e86cf632261350ab185527169554e3"},
296296
{"name":"graphql-client","version":"0.23.0","platform":"ruby","checksum":"f238b8e451676baad06bd15f95396e018192243dcf12c4e6d13fb41d9a2babc1"},
297297
{"name":"graphql-docs","version":"5.0.0","platform":"ruby","checksum":"76baca6e5a803a4b6a9fbbbfdbf16742b7c4c546c8592b6e1a7aa4e79e562d04"},
298298
{"name":"grpc","version":"1.63.0","platform":"aarch64-linux","checksum":"dc75c5fd570b819470781d9512105dddfdd11d984f38b8e60bb946f92d1f79ee"},

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ GEM
919919
faraday (~> 2.0)
920920
graphql-client
921921
graphlyte (1.0.0)
922-
graphql (2.3.16)
922+
graphql (2.3.17)
923923
base64
924924
fiber-storage
925925
graphql-client (0.23.0)

Gemfile.next.checksum

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@
293293
{"name":"graphiql-rails","version":"1.10.0","platform":"ruby","checksum":"b557f989a737c8b9e985142609bec52fb1e9393a701eb50e02a7c14422891040"},
294294
{"name":"graphlient","version":"0.8.0","platform":"ruby","checksum":"98c408da1d083454e9f5e274f3b0b6261e2a0c2b5f2ed7b3ef9441d46f8e7cb1"},
295295
{"name":"graphlyte","version":"1.0.0","platform":"ruby","checksum":"b5af4ab67dde6e961f00ea1c18f159f73b52ed11395bb4ece297fe628fa1804d"},
296-
{"name":"graphql","version":"2.3.16","platform":"ruby","checksum":"6ac9966998914c5b470e527c7105d936db70af2306ec0445f88953404bce49c7"},
296+
{"name":"graphql","version":"2.3.17","platform":"ruby","checksum":"5e03655bf8ab07cd9710821f7f991ca6f5e86cf632261350ab185527169554e3"},
297297
{"name":"graphql-client","version":"0.23.0","platform":"ruby","checksum":"f238b8e451676baad06bd15f95396e018192243dcf12c4e6d13fb41d9a2babc1"},
298298
{"name":"graphql-docs","version":"5.0.0","platform":"ruby","checksum":"76baca6e5a803a4b6a9fbbbfdbf16742b7c4c546c8592b6e1a7aa4e79e562d04"},
299299
{"name":"grpc","version":"1.63.0","platform":"aarch64-linux","checksum":"dc75c5fd570b819470781d9512105dddfdd11d984f38b8e60bb946f92d1f79ee"},

Gemfile.next.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ GEM
929929
faraday (~> 2.0)
930930
graphql-client
931931
graphlyte (1.0.0)
932-
graphql (2.3.16)
932+
graphql (2.3.17)
933933
base64
934934
fiber-storage
935935
graphql-client (0.23.0)

Guardfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require "guard/rspec/dsl"
66

77
cmd = ENV['GUARD_CMD'] || (ENV['SPRING'] ? 'spring rspec' : 'bundle exec rspec')
88

9-
directories %w[app ee keeps lib rubocop tooling spec]
9+
directories %w[app ee keeps lib rubocop scripts spec tooling]
1010

1111
rspec_context_for = proc do |context_path|
1212
OpenStruct.new(to_s: "spec").tap do |rspec| # rubocop:disable Style/OpenStructUse
@@ -45,6 +45,7 @@ guard_setup = proc do |context_path|
4545
watch(%r{^#{context_path}(lib/.+)\.rb$}) { |m| rspec.spec.call(m[1]) }
4646
watch(%r{^#{context_path}(rubocop/.+)\.rb$}) { |m| rspec.spec.call(m[1]) }
4747
watch(%r{^#{context_path}(tooling/.+)\.rb$}) { |m| rspec.spec.call(m[1]) }
48+
watch(%r{^#{context_path}(scripts/.+)\.rb$}) { |m| rspec.spec.call(m[1].tr('-', '_')) }
4849

4950
# Rails files
5051
rails = rails_context_for.call(context_path, %w[erb haml slim])

app/assets/javascripts/batch_comments/components/preview_dropdown.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default {
6565
6666
<template #header>
6767
<div
68-
class="gl-flex gl-min-h-8 gl-items-center gl-border-b-1 gl-border-b-gray-200 !gl-p-4 gl-border-b-solid"
68+
class="gl-flex gl-min-h-8 gl-items-center gl-border-b-1 gl-border-b-dropdown !gl-p-4 gl-border-b-solid"
6969
>
7070
<span class="gl-grow gl-pr-2 gl-text-sm gl-font-bold">
7171
{{ n__('%d pending comment', '%d pending comments', draftsCount) }}

app/assets/javascripts/boards/components/board_column.vue

+1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ export default {
133133
:column-index="columnIndex"
134134
@toggleNewForm="toggleNewForm"
135135
@setFilters="$emit('setFilters', $event)"
136+
@cannot-find-active-item="$emit('cannot-find-active-item')"
136137
/>
137138
</div>
138139
<div

app/assets/javascripts/boards/components/board_content.vue

+12
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import BoardAddNewColumn from 'ee_else_ce/boards/components/board_add_new_column
77
import BoardAddNewColumnTrigger from '~/boards/components/board_add_new_column_trigger.vue';
88
import WorkItemDrawer from '~/work_items/components/work_item_drawer.vue';
99
import { s__ } from '~/locale';
10+
import { removeParams, updateHistory } from '~/lib/utils/url_utility';
1011
import { defaultSortableOptions, DRAG_DELAY } from '~/sortable/constants';
1112
import { mapWorkItemWidgetsToIssuableFields } from '~/issues/list/utils';
1213
import {
@@ -19,6 +20,7 @@ import {
1920
DEFAULT_BOARD_LIST_ITEMS_SIZE,
2021
BoardType,
2122
} from 'ee_else_ce/boards/constants';
23+
import { DETAIL_VIEW_QUERY_PARAM_NAME } from '~/work_items/constants';
2224
import { calculateNewPosition } from 'ee_else_ce/boards/boards_util';
2325
import { setError } from '../graphql/cache_updates';
2426
import BoardColumn from './board_column.vue';
@@ -88,6 +90,7 @@ export default {
8890
return {
8991
boardHeight: null,
9092
highlightedLists: [],
93+
columnsThatCannotFindActiveItem: 0,
9194
};
9295
},
9396
computed: {
@@ -245,6 +248,14 @@ export default {
245248
isLastList(index) {
246249
return this.boardListsToUse.length - 1 === index;
247250
},
251+
handleCannotFindActiveItem() {
252+
this.columnsThatCannotFindActiveItem += 1;
253+
if (this.columnsThatCannotFindActiveItem === this.boardListsToUse.length) {
254+
updateHistory({
255+
url: removeParams([DETAIL_VIEW_QUERY_PARAM_NAME]),
256+
});
257+
}
258+
},
248259
},
249260
};
250261
</script>
@@ -281,6 +292,7 @@ export default {
281292
@setActiveList="$emit('setActiveList', $event)"
282293
@setFilters="$emit('setFilters', $event)"
283294
@addNewListAfter="$emit('setAddColumnFormVisibility', $event)"
295+
@cannot-find-active-item="handleCannotFindActiveItem"
284296
/>
285297
286298
<transition mode="out-in" name="slide" @after-enter="afterFormEnters">

app/assets/javascripts/boards/components/board_list.vue

+36-8
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { ESC_KEY_CODE } from '~/lib/utils/keycodes';
77
import { defaultSortableOptions, DRAG_DELAY } from '~/sortable/constants';
88
import { sortableStart, sortableEnd } from '~/sortable/utils';
99
import Tracking from '~/tracking';
10+
import { getParameterByName } from '~/lib/utils/url_utility';
1011
import listQuery from 'ee_else_ce/boards/graphql/board_lists_deferred.query.graphql';
1112
import setActiveBoardItemMutation from 'ee_else_ce/boards/graphql/client/set_active_board_item.mutation.graphql';
1213
import BoardNewIssue from 'ee_else_ce/boards/components/board_new_issue.vue';
@@ -18,6 +19,7 @@ import {
1819
listIssuablesQueries,
1920
ListType,
2021
} from 'ee_else_ce/boards/constants';
22+
import { DETAIL_VIEW_QUERY_PARAM_NAME } from '~/work_items/constants';
2123
import {
2224
addItemToList,
2325
removeItemFromList,
@@ -90,6 +92,7 @@ export default {
9092
addItemToListInProgress: false,
9193
updateIssueOrderInProgress: false,
9294
dragCancelled: false,
95+
hasMadeDrawerAttempt: false,
9396
};
9497
},
9598
apollo: {
@@ -128,6 +131,28 @@ export default {
128131
message: s__('Boards|An error occurred while fetching a list. Please try again.'),
129132
});
130133
},
134+
result({ data }) {
135+
if (this.hasMadeDrawerAttempt) {
136+
return;
137+
}
138+
const queryParam = getParameterByName(DETAIL_VIEW_QUERY_PARAM_NAME);
139+
140+
if (!data || !queryParam) {
141+
return;
142+
}
143+
144+
const { iid, full_path: fullPath } = JSON.parse(atob(queryParam));
145+
const boardItem = this.boardListItems.find(
146+
(item) => item.iid === iid && item.referencePath.includes(fullPath),
147+
);
148+
149+
if (boardItem) {
150+
this.setActiveWorkItem(boardItem);
151+
} else {
152+
this.$emit('cannot-find-active-item');
153+
}
154+
this.hasMadeDrawerAttempt = true;
155+
},
131156
},
132157
toList: {
133158
query() {
@@ -603,16 +628,19 @@ export default {
603628
});
604629
} finally {
605630
this.addItemToListInProgress = false;
606-
this.$apollo.mutate({
607-
mutation: setActiveBoardItemMutation,
608-
variables: {
609-
boardItem: issuable,
610-
listId: this.list.id,
611-
isIssue: this.isIssueBoard,
612-
},
613-
});
631+
this.setActiveWorkItem(issuable);
614632
}
615633
},
634+
setActiveWorkItem(boardItem) {
635+
this.$apollo.mutate({
636+
mutation: setActiveBoardItemMutation,
637+
variables: {
638+
boardItem,
639+
listId: this.list.id,
640+
isIssue: this.isIssueBoard,
641+
},
642+
});
643+
},
616644
},
617645
};
618646
</script>

app/assets/javascripts/ci/artifacts/components/job_artifacts_table.vue

+12-8
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,18 @@ export default {
145145
return Number(this.pageInfo.hasNextPage);
146146
},
147147
fields() {
148-
return [
149-
this.canBulkDestroyArtifacts && {
150-
key: 'checkbox',
151-
label: '',
152-
thClass: 'gl-w-1/20',
153-
},
154-
...this.$options.fields,
155-
];
148+
if (this.canBulkDestroyArtifacts) {
149+
return [
150+
{
151+
key: 'checkbox',
152+
label: '',
153+
thClass: 'gl-w-1/20',
154+
},
155+
...this.$options.fields,
156+
];
157+
}
158+
159+
return this.$options.fields;
156160
},
157161
anyArtifactsSelected() {
158162
return Boolean(this.selectedArtifacts.length);

app/assets/javascripts/ci/pipeline_mini_graph/legacy_pipeline_mini_graph/legacy_job_item.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export default {
180180
:data-testid="testid"
181181
>
182182
<template #list-item>
183-
<div class="-gl-my-1 -gl-ml-2 gl-flex gl-items-center gl-justify-between">
183+
<div class="-gl-my-2 -gl-ml-2 gl-flex gl-items-center gl-justify-between">
184184
<job-name-component
185185
v-gl-tooltip.viewport.left
186186
:title="tooltipText"

app/assets/javascripts/ci/pipeline_mini_graph/legacy_pipeline_mini_graph/legacy_pipeline_stage.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export default {
137137

138138
<template #header>
139139
<div
140-
class="gl-flex gl-min-h-8 gl-items-center gl-border-b-1 gl-border-b-gray-200 !gl-p-4 gl-text-sm gl-font-bold gl-leading-1 gl-border-b-solid"
140+
class="gl-flex gl-min-h-8 gl-items-center gl-border-b-1 gl-border-b-dropdown !gl-p-4 gl-text-sm gl-font-bold gl-leading-1 gl-border-b-solid"
141141
>
142142
<template v-if="isLoading">
143143
<span>{{ $options.i18n.stage }}</span>

app/assets/javascripts/ci/pipeline_mini_graph/pipeline_stage.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export default {
133133
<template #header>
134134
<div
135135
data-testid="pipeline-stage-dropdown-menu-title"
136-
class="gl-flex gl-min-h-8 gl-items-center gl-border-b-1 gl-border-b-gray-200 !gl-p-4 gl-text-sm gl-font-bold gl-leading-1 gl-border-b-solid"
136+
class="gl-flex gl-min-h-8 gl-items-center gl-border-b-1 gl-border-b-dropdown !gl-p-4 gl-text-sm gl-font-bold gl-leading-1 gl-border-b-solid"
137137
>
138138
<span>{{ dropdownHeaderText }}</span>
139139
</div>

0 commit comments

Comments
 (0)