Skip to content

Commit 026ef03

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 514ada7 commit 026ef03

File tree

32 files changed

+258
-140
lines changed

32 files changed

+258
-140
lines changed

app/assets/javascripts/deprecated_notes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class-methods-use-this */
1010
deprecated_notes_spec.js is the spec for the legacy, jQuery notes application. It has nothing to do with the new, fancy Vue notes app.
1111
*/
1212

13-
import { GlDeprecatedSkeletonLoading as GlSkeletonLoading } from '@gitlab/ui';
13+
import { GlSkeletonLoader } from '@gitlab/ui';
1414
import Autosize from 'autosize';
1515
import $ from 'jquery';
1616
import { escape, uniqueId } from 'lodash';
@@ -1233,10 +1233,10 @@ export default class Notes {
12331233
new Vue({
12341234
el,
12351235
components: {
1236-
GlSkeletonLoading,
1236+
GlSkeletonLoader,
12371237
},
12381238
render(createElement) {
1239-
return createElement('gl-skeleton-loading');
1239+
return createElement('gl-skeleton-loader');
12401240
},
12411241
});
12421242
}

app/assets/javascripts/runner/admin_runners/admin_runners_app.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
fromSearchToVariables,
1212
isSearchFiltered,
1313
} from 'ee_else_ce/runner/runner_search_utils';
14-
import runnersAdminQuery from 'ee_else_ce/runner/graphql/list/admin_runners.query.graphql';
14+
import allRunnersQuery from 'ee_else_ce/runner/graphql/list/all_runners.query.graphql';
1515
1616
import RegistrationDropdown from '../components/registration/registration_dropdown.vue';
1717
import RunnerFilteredSearchBar from '../components/runner_filtered_search_bar.vue';
@@ -64,7 +64,7 @@ export default {
6464
},
6565
apollo: {
6666
runners: {
67-
query: runnersAdminQuery,
67+
query: allRunnersQuery,
6868
fetchPolicy: fetchPolicies.NETWORK_ONLY,
6969
variables() {
7070
return this.variables;

app/assets/javascripts/runner/components/stat/runner_count.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script>
22
import { fetchPolicies } from '~/lib/graphql';
33
import { captureException } from '../../sentry_utils';
4-
import runnersAdminCountQuery from '../../graphql/list/admin_runners_count.query.graphql';
4+
import allRunnersCountQuery from '../../graphql/list/all_runners_count.query.graphql';
55
import groupRunnersCountQuery from '../../graphql/list/group_runners_count.query.graphql';
66
import { INSTANCE_TYPE, GROUP_TYPE } from '../../constants';
77
@@ -53,7 +53,7 @@ export default {
5353
count: {
5454
query() {
5555
if (this.scope === INSTANCE_TYPE) {
56-
return runnersAdminCountQuery;
56+
return allRunnersCountQuery;
5757
} else if (this.scope === GROUP_TYPE) {
5858
return groupRunnersCountQuery;
5959
}

app/assets/javascripts/runner/graphql/list/admin_runners.query.graphql renamed to app/assets/javascripts/runner/graphql/list/all_runners.query.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#import "ee_else_ce/runner/graphql/list/list_item.fragment.graphql"
22
#import "~/graphql_shared/fragments/page_info.fragment.graphql"
33

4-
query getRunners(
4+
query getAllRunners(
55
$before: String
66
$after: String
77
$first: Int

app/assets/javascripts/runner/graphql/list/admin_runners_count.query.graphql renamed to app/assets/javascripts/runner/graphql/list/all_runners_count.query.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
query getRunnersCount(
1+
query getAllRunnersCount(
22
$paused: Boolean
33
$status: CiRunnerStatus
44
$type: CiRunnerType

app/helpers/groups_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def render_setting_to_allow_project_access_token_creation?(group)
126126
group.root? && current_user.can?(:admin_setting_to_allow_project_access_token_creation, group)
127127
end
128128

129-
def show_thanks_for_purchase_banner?
129+
def show_thanks_for_purchase_alert?
130130
params.key?(:purchased_quantity) && params[:purchased_quantity].to_i > 0
131131
end
132132

app/services/work_items/create_service.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@ def execute
3333
end
3434

3535
def transaction_create(work_item)
36-
super
37-
38-
execute_widgets(work_item: work_item, callback: :after_create_in_transaction, widget_params: @widget_params)
36+
super.tap do |save_result|
37+
if save_result
38+
execute_widgets(work_item: work_item, callback: :after_create_in_transaction,
39+
widget_params: @widget_params)
40+
end
41+
end
3942
end
4043

4144
private

app/views/groups/show.html.haml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
- @skip_current_level_breadcrumb = true
44
- add_page_specific_style 'page_bundles/group'
55

6-
- if show_thanks_for_purchase_banner?
7-
= render_if_exists 'shared/thanks_for_purchase_banner', plan_title: plan_title, quantity: params[:purchased_quantity].to_i
6+
- if show_thanks_for_purchase_alert?
7+
= render_if_exists 'shared/thanks_for_purchase_alert', plan_title: plan_title, quantity: params[:purchased_quantity].to_i
88

99
= render_if_exists 'shared/qrtly_reconciliation_alert', group: @group
1010
= render_if_exists 'shared/free_user_cap_alert', source: @group

app/views/projects/triggers/_form.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
= form_for [@project, @trigger], html: { class: 'gl-show-field-errors' } do |f|
2-
= form_errors(@trigger)
2+
= form_errors(@trigger, pajamas_alert: true)
33

44
- if @trigger.token
55
.form-group

app/views/shared/deploy_keys/_project_group_form.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
= gitlab_ui_form_for [@project.namespace, @project, @deploy_keys.new_key], url: namespace_project_deploy_keys_path, html: { class: "js-requires-input container" } do |f|
2-
= form_errors(@deploy_keys.new_key)
2+
= form_errors(@deploy_keys.new_key, pajamas_alert: true)
33
.form-group.row
44
= f.label :title, class: "label-bold"
55
= f.text_field :title, class: 'form-control gl-form-input', required: true, data: { qa_selector: 'deploy_key_title_field' }

doc/administration/geo/replication/troubleshooting.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,8 +651,11 @@ to start again from scratch, there are a few steps that can help you:
651651

652652
1. Reset the Tracking Database.
653653

654+
WARNING:
655+
If you skipped the optional step 3, be sure both `geo-postgresql` and `postgresql` services are running.
656+
654657
```shell
655-
gitlab-rake db:drop:geo # on a secondary app node
658+
gitlab-rake db:drop:geo DISABLE_DATABASE_ENVIRONMENT_CHECK=1 # on a secondary app node
656659
gitlab-ctl reconfigure # on the tracking database node
657660
gitlab-rake db:migrate:geo # on a secondary app node
658661
```

doc/user/application_security/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,8 @@ Feedback is welcome on our vision for [unifying the user experience for these tw
502502

503503
## Troubleshooting
504504

505+
<!-- NOTE: The below subsection(`### Secure job failing with exit code 1`) documentation URL is referred in the [/gitlab-org/security-products/analyzers/command](https://gitlab.com/gitlab-org/security-products/analyzers/command/-/blob/main/command.go#L19) repository. If this section/subsection changes, please ensure to update the corresponding URL in the mentioned repository.
506+
-->
505507
### Secure job failing with exit code 1
506508

507509
If a Secure job is failing and it's unclear why, add `SECURE_LOG_LEVEL: "debug"` as a global CI/CD variable for

lib/api/terraform/modules/v1/packages.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,15 @@ def package_file
115115
redirect(download_path)
116116
end
117117

118+
get do
119+
latest_package = packages.order_version.last
120+
121+
render_api_error!({ error: "No version found for #{params[:module_name]} module" }, :not_found) if latest_package&.version.nil?
122+
123+
presenter = ::Terraform::ModuleVersionPresenter.new(latest_package, params[:module_system])
124+
present presenter, with: ::API::Entities::Terraform::ModuleVersion
125+
end
126+
118127
params do
119128
includes :module_version
120129
end

lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ code_quality:
88
variables:
99
DOCKER_DRIVER: overlay2
1010
DOCKER_TLS_CERTDIR: ""
11-
CODE_QUALITY_IMAGE: "registry.gitlab.com/gitlab-org/ci-cd/codequality:0.85.26"
11+
CODE_QUALITY_IMAGE: "registry.gitlab.com/gitlab-org/ci-cd/codequality:0.85.29"
1212
needs: []
1313
script:
1414
- export SOURCE_CODE=$PWD

locale/gitlab.pot

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11454,9 +11454,6 @@ msgstr ""
1145411454
msgid "CycleAnalyticsStage|should be under a group"
1145511455
msgstr ""
1145611456

11457-
msgid "CycleAnalytics|%{selectedLabelsCount} selected (%{maxLabels} max)"
11458-
msgstr ""
11459-
1146011457
msgid "CycleAnalytics|'%{name}' is collecting the data. This can take a few minutes."
1146111458
msgstr ""
1146211459

@@ -11481,9 +11478,6 @@ msgstr ""
1148111478
msgid "CycleAnalytics|Date"
1148211479
msgstr ""
1148311480

11484-
msgid "CycleAnalytics|Display chart filters"
11485-
msgstr ""
11486-
1148711481
msgid "CycleAnalytics|If you have recently upgraded to GitLab Premium, it can take up to 30 minutes for data to collect and display."
1148811482
msgstr ""
1148911483

@@ -11493,20 +11487,11 @@ msgstr ""
1149311487
msgid "CycleAnalytics|Number of tasks"
1149411488
msgstr ""
1149511489

11496-
msgid "CycleAnalytics|Only %{maxLabels} labels can be selected at this time"
11497-
msgstr ""
11498-
1149911490
msgid "CycleAnalytics|Project selected"
1150011491
msgid_plural "CycleAnalytics|%d projects selected"
1150111492
msgstr[0] ""
1150211493
msgstr[1] ""
1150311494

11504-
msgid "CycleAnalytics|Select labels"
11505-
msgstr ""
11506-
11507-
msgid "CycleAnalytics|Show"
11508-
msgstr ""
11509-
1151011495
msgid "CycleAnalytics|Stage time: %{title}"
1151111496
msgstr ""
1151211497

@@ -36141,6 +36126,9 @@ msgstr ""
3614136126
msgid "Showing version #%{versionNumber}"
3614236127
msgstr ""
3614336128

36129+
msgid "Shows issues and %{labels_count} label for group '%{group_name}' from Nov 1, 2019 to Dec 31, 2019"
36130+
msgstr ""
36131+
3614436132
msgid "Shows issues and %{labels_count} labels for group '%{group_name}' from Nov 1, 2019 to Dec 31, 2019"
3614536133
msgstr ""
3614636134

@@ -37596,9 +37584,6 @@ msgstr ""
3759637584
msgid "Succeeded"
3759737585
msgstr ""
3759837586

37599-
msgid "Successful purchase image"
37600-
msgstr ""
37601-
3760237587
msgid "Successfully activated"
3760337588
msgstr ""
3760437589

qa/qa/page/project/web_ide/edit.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def commit_sha
192192
find_element(:commit_sha_content).text
193193
end
194194

195-
def commit_changes(commit_message = nil, open_merge_request: false)
195+
def commit_changes(commit_message = nil, open_merge_request: false, wait_for_success: true)
196196
# Clicking :begin_commit_button switches from the
197197
# edit to the commit view
198198
click_element(:begin_commit_button)
@@ -226,13 +226,17 @@ def commit_changes(commit_message = nil, open_merge_request: false)
226226
end
227227
click_element(:commit_button) if has_element?(:commit_button)
228228

229+
break unless wait_for_success
230+
229231
# If this is the first commit, the commit SHA only appears after reloading
230232
wait_until(reload: true) do
231233
active_element?(:edit_mode_tab) && commit_sha != original_commit
232234
end
233235
end
234236

235-
raise "The changes do not appear to have been committed successfully." unless commit_success
237+
if wait_for_success
238+
raise "The changes do not appear to have been committed successfully." unless commit_success
239+
end
236240
end
237241
end
238242

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# frozen_string_literal: true
2+
3+
module QA
4+
RSpec.describe 'Create', :skip_live_env, except: { job: 'review-qa-*' } do
5+
describe 'Git Server Hooks' do
6+
let(:file_path) { File.absolute_path(File.join('qa', 'fixtures', 'web_ide', 'README.md')) }
7+
8+
let(:project) do
9+
Resource::Project.fabricate_via_api! do |project|
10+
# Projects that have names that include pattern 'reject-prereceive' trigger a server hook on orchestrated env
11+
# that returns an error string using GL-HOOK-ERR
12+
project.name = "project-reject-prereceive-#{SecureRandom.hex(8)}"
13+
end
14+
end
15+
16+
before do
17+
Flow::Login.sign_in
18+
project.visit!
19+
end
20+
21+
context 'Custom error messages' do
22+
it 'renders preconfigured error message when user hook failed on commit in WebIDE',
23+
testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/364751' do
24+
Page::Project::Show.perform(&:open_web_ide_via_shortcut)
25+
Page::Project::WebIDE::Edit.perform do |ide|
26+
ide.upload_file(file_path)
27+
ide.commit_changes(wait_for_success: false)
28+
expect(ide).to have_text('Custom error message rejecting prereceive hook for projects with GL_PROJECT_PATH')
29+
end
30+
end
31+
end
32+
end
33+
end
34+
end

spec/features/groups_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
end
2323

2424
describe 'as a non-admin' do
25-
it 'creates a group and persists visibility radio selection', :js, :saas do
25+
it 'creates a group and persists visibility radio selection', :js do
2626
stub_application_setting(default_group_visibility: :private)
2727

2828
fill_in 'Group name', with: 'test-group'

spec/frontend/fixtures/runner.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,33 +39,33 @@
3939
end
4040

4141
describe GraphQL::Query, type: :request do
42-
admin_runners_query = 'list/admin_runners.query.graphql'
42+
all_runners_query = 'list/all_runners.query.graphql'
4343

4444
let_it_be(:query) do
45-
get_graphql_query_as_string("#{query_path}#{admin_runners_query}")
45+
get_graphql_query_as_string("#{query_path}#{all_runners_query}")
4646
end
4747

48-
it "#{fixtures_path}#{admin_runners_query}.json" do
48+
it "#{fixtures_path}#{all_runners_query}.json" do
4949
post_graphql(query, current_user: admin, variables: {})
5050

5151
expect_graphql_errors_to_be_empty
5252
end
5353

54-
it "#{fixtures_path}#{admin_runners_query}.paginated.json" do
54+
it "#{fixtures_path}#{all_runners_query}.paginated.json" do
5555
post_graphql(query, current_user: admin, variables: { first: 2 })
5656

5757
expect_graphql_errors_to_be_empty
5858
end
5959
end
6060

6161
describe GraphQL::Query, type: :request do
62-
admin_runners_count_query = 'list/admin_runners_count.query.graphql'
62+
all_runners_count_query = 'list/all_runners_count.query.graphql'
6363

6464
let_it_be(:query) do
65-
get_graphql_query_as_string("#{query_path}#{admin_runners_count_query}")
65+
get_graphql_query_as_string("#{query_path}#{all_runners_count_query}")
6666
end
6767

68-
it "#{fixtures_path}#{admin_runners_count_query}.json" do
68+
it "#{fixtures_path}#{all_runners_count_query}.json" do
6969
post_graphql(query, current_user: admin, variables: {})
7070

7171
expect_graphql_errors_to_be_empty

0 commit comments

Comments
 (0)