Skip to content

Commit cdd826b

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

File tree

63 files changed

+440
-244
lines changed

Some content is hidden

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

63 files changed

+440
-244
lines changed

.gitlab/issue_templates/Doc_cleanup.md

+20-13
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,26 @@
77
* feature development should use the Feature Request template.
88
-->
99

10+
If you are a community contributor:
11+
12+
1. To work on an issue, type `@gl-docsteam I would like to work on this issue.`
13+
in a comment. A technical writer
14+
will assign the issue to you. Do not work on the issue before it is assigned to you.
15+
If someone has already chosen the issue, pick another or view docs [in the docs directory](https://gitlab.com/gitlab-org/gitlab/-/tree/master/doc)
16+
and open a merge request for any page you feel can be improved.
17+
1. Create a merge request for the issue. If this is for a Hackathon, do not create the merge request
18+
before the Hackathon has started or it will not be counted towards the Hackathon. If you were not
19+
assigned the issue, do not create a merge request. It will not be accepted.
20+
1. Copy the link to this issue and add it to the merge request's description, which will link
21+
the merge request and the issue together.
22+
1. After your merge request is accepted and merged, close this issue.
23+
24+
If you notice things you'd like to fix that are not part of the issue, open separate merge requests for those issues.
25+
26+
We're sorry for all the rules but we want everyone to have a good experience, and it can be hard when we get an influx of contributions.
27+
28+
Thank you again for contributing to the GitLab documentation!
29+
1030
## Identified documentation issue
1131

1232
<!--
@@ -19,19 +39,6 @@
1939
* the opportunities for contributors.
2040
-->
2141

22-
## Process
23-
24-
If you, as a contributor, decide to take this work on, assign this issue to yourself, and create one or more linked
25-
merge requests that resolve this issue. Be sure to close this issue after all linked merge requests are completed.
26-
27-
The work for this issue should involve only what's listed in the previous section. If you identify other work that
28-
needs to be done, create separate, unlinked MRs as needed to address those items.
29-
30-
When using automated test results for identified work, use this issue to work only on the listed lines. For
31-
example, if the tests list several lines that show the word "admin" as needing to possibly be "administrator,"
32-
do not modify other parts of the page that may also include "admin," as the testing may have excluded those lines
33-
(for example, they may be part of the **Admin Area** of GitLab).
34-
3542
## Additional information
3643

3744
<!--

.rubocop_todo.yml

-56
Original file line numberDiff line numberDiff line change
@@ -146,25 +146,6 @@ Performance/CollectionLiteralInLoop:
146146
Performance/ConstantRegexp:
147147
Enabled: false
148148

149-
# Offense count: 14
150-
# Cop supports --auto-correct.
151-
# Configuration parameters: SafeMultiline.
152-
Performance/DeletePrefix:
153-
Exclude:
154-
- 'app/helpers/submodule_helper.rb'
155-
- 'app/workers/concerns/application_worker.rb'
156-
- 'ee/lib/gitlab/geo/git_ssh_proxy.rb'
157-
- 'lib/banzai/filter/repository_link_filter.rb'
158-
- 'lib/gitlab/auth/ldap/dn.rb'
159-
- 'lib/gitlab/gfm/uploads_rewriter.rb'
160-
- 'lib/gitlab/git/ref.rb'
161-
- 'lib/gitlab/project_template.rb'
162-
- 'lib/gitlab/setup_helper.rb'
163-
- 'lib/gitlab/time_tracking_formatter.rb'
164-
- 'spec/controllers/projects/artifacts_controller_spec.rb'
165-
- 'spec/lib/gitlab/gfm/uploads_rewriter_spec.rb'
166-
- 'spec/support/helpers/test_env.rb'
167-
168149
# Offense count: 121
169150
Performance/MethodObjectAsBlock:
170151
Enabled: false
@@ -398,22 +379,6 @@ Rails/WhereExists:
398379
Style/AccessorGrouping:
399380
Enabled: false
400381

401-
# Offense count: 11
402-
# Cop supports --auto-correct.
403-
Style/ArrayCoercion:
404-
Exclude:
405-
- 'app/controllers/admin/ci/variables_controller.rb'
406-
- 'app/controllers/groups/variables_controller.rb'
407-
- 'app/controllers/projects/variables_controller.rb'
408-
- 'db/migrate/20190620105427_change_null_private_profile_to_false.rb'
409-
- 'db/post_migrate/20190812070645_migrate_private_profile_nulls.rb'
410-
- 'db/post_migrate/20200311130802_schedule_populate_user_highest_roles_table.rb'
411-
- 'db/post_migrate/20200805152108_migrate_null_external_diff_store_to_local_value.rb'
412-
- 'db/post_migrate/20200806173633_migrate_null_package_files_file_store_to_local_value.rb'
413-
- 'ee/app/services/geo/repository_verification_secondary_service.rb'
414-
- 'ee/lib/ee/banzai/pipeline/gfm_pipeline.rb'
415-
- 'spec/support/helpers/lfs_http_helpers.rb'
416-
417382
# Offense count: 188
418383
# Cop supports --auto-correct.
419384
# Configuration parameters: EnforcedStyle.
@@ -433,20 +398,6 @@ Style/BisectedAttrAccessor:
433398
Style/CaseLikeIf:
434399
Enabled: false
435400

436-
# Offense count: 13
437-
Style/CombinableLoops:
438-
Exclude:
439-
- 'ee/db/fixtures/development/30_customizable_cycle_analytics.rb'
440-
- 'ee/lib/gitlab/audit/events/preloader.rb'
441-
- 'ee/spec/finders/snippets_finder_spec.rb'
442-
- 'ee/spec/lib/ee/gitlab/background_migration/remove_duplicate_cs_findings_spec.rb'
443-
- 'spec/features/merge_request/user_suggests_changes_on_diff_spec.rb'
444-
- 'spec/finders/packages/group_packages_finder_spec.rb'
445-
- 'spec/migrations/cleanup_optimistic_locking_nulls_pt2_fixed_spec.rb'
446-
- 'spec/migrations/cleanup_optimistic_locking_nulls_spec.rb'
447-
- 'spec/requests/api/members_spec.rb'
448-
- 'spec/support/shared_examples/features/protected_branches_access_control_ce_shared_examples.rb'
449-
450401
# Offense count: 5
451402
# Cop supports --auto-correct.
452403
Style/EachWithObject:
@@ -471,13 +422,6 @@ Style/EmptyElse:
471422
Style/EmptyMethod:
472423
Enabled: false
473424

474-
# Offense count: 2
475-
# Cop supports --auto-correct.
476-
Style/ExpandPathArguments:
477-
Exclude:
478-
- 'cable/config.ru'
479-
- 'config.ru'
480-
481425
# Offense count: 118
482426
# Cop supports --auto-correct.
483427
Style/ExplicitBlockArgument:

.rubocop_todo/rspec/verified_doubles.yml

-1
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,6 @@ RSpec/VerifiedDoubles:
878878
- spec/models/design_management/design_at_version_spec.rb
879879
- spec/models/diff_viewer/image_spec.rb
880880
- spec/models/environment_spec.rb
881-
- spec/models/error_tracking/project_error_tracking_setting_spec.rb
882881
- spec/models/event_spec.rb
883882
- spec/models/external_issue_spec.rb
884883
- spec/models/hooks/web_hook_spec.rb
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
# Cop supports --auto-correct.
3+
Style/ArrayCoercion:
4+
Exclude:
5+
- 'app/controllers/admin/ci/variables_controller.rb'
6+
- 'app/controllers/groups/variables_controller.rb'
7+
- 'app/controllers/projects/variables_controller.rb'
8+
- 'ee/app/services/geo/repository_verification_secondary_service.rb'
9+
- 'ee/lib/ee/banzai/pipeline/gfm_pipeline.rb'
10+
- 'spec/support/helpers/lfs_http_helpers.rb'
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
Style/CombinableLoops:
3+
Exclude:
4+
- 'ee/db/fixtures/development/30_customizable_cycle_analytics.rb'
5+
- 'ee/lib/gitlab/audit/events/preloader.rb'
6+
- 'ee/spec/finders/snippets_finder_spec.rb'
7+
- 'spec/features/merge_request/user_suggests_changes_on_diff_spec.rb'
8+
- 'spec/finders/packages/group_packages_finder_spec.rb'
9+
- 'spec/requests/api/members_spec.rb'
10+
- 'spec/support/shared_examples/features/protected_branches_access_control_ce_shared_examples.rb'

.rubocop_todo/style/open_struct_use.yml

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Style/OpenStructUse:
88
- ee/spec/lib/gitlab/auth/group_saml/failure_handler_spec.rb
99
- ee/spec/lib/gitlab/legacy_github_import/project_creator_spec.rb
1010
- lib/gitlab/testing/request_inspector_middleware.rb
11-
- spec/factories/go_module_versions.rb
1211
- spec/factories/wiki_pages.rb
1312
- spec/graphql/mutations/branches/create_spec.rb
1413
- spec/graphql/mutations/clusters/agent_tokens/create_spec.rb

app/assets/javascripts/clusters_list/components/agent_table.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default {
3737
anchor: 'update-the-agent-version',
3838
}),
3939
configHelpLink: helpPagePath('user/clusters/agent/install/index', {
40-
anchor: 'create-an-agent-without-configuration-file',
40+
anchor: 'create-an-agent-configuration-file',
4141
}),
4242
inject: ['gitlabVersion'],
4343
props: {

app/assets/javascripts/clusters_list/components/install_agent_modal.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default {
3131
EVENT_LABEL_MODAL,
3232
enableKasPath: helpPagePath('administration/clusters/kas'),
3333
registerAgentPath: helpPagePath('user/clusters/agent/install/index', {
34-
anchor: 'register-an-agent-with-gitlab',
34+
anchor: 'register-the-agent-with-gitlab',
3535
}),
3636
components: {
3737
AvailableAgentsDropdown,

app/assets/javascripts/environments/components/new_environment_item.vue

+13
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import {
33
GlCollapse,
44
GlDropdown,
5+
GlBadge,
56
GlButton,
67
GlLink,
78
GlSprintf,
@@ -26,6 +27,7 @@ export default {
2627
components: {
2728
GlCollapse,
2829
GlDropdown,
30+
GlBadge,
2931
GlButton,
3032
GlLink,
3133
GlSprintf,
@@ -74,6 +76,7 @@ export default {
7476
'Environments|There are no deployments for this environment yet. %{linkStart}Learn more about setting up deployments.%{linkEnd}',
7577
),
7678
autoStopIn: s__('Environment|Auto stop %{time}'),
79+
tierTooltip: s__('Environment|Deployment tier'),
7780
},
7881
data() {
7982
return { visible: false };
@@ -100,6 +103,9 @@ export default {
100103
hasDeployment() {
101104
return Boolean(this.environment?.upcomingDeployment || this.environment?.lastDeployment);
102105
},
106+
tier() {
107+
return this.lastDeployment?.tierInYaml;
108+
},
103109
hasOpenedAlert() {
104110
return this.environment?.hasOpenedAlert;
105111
},
@@ -206,6 +212,13 @@ export default {
206212
>
207213
{{ displayName }}
208214
</gl-link>
215+
<gl-badge
216+
v-if="tier"
217+
v-gl-tooltip
218+
:title="$options.i18n.tierTooltip"
219+
class="gl-ml-3 gl-font-monospace"
220+
>{{ tier }}</gl-badge
221+
>
209222
</div>
210223
<div class="gl-display-flex gl-align-items-center">
211224
<p v-if="canShowAutoStopDate" class="gl-font-sm gl-text-gray-700 gl-mr-5 gl-mb-0">

app/assets/javascripts/environments/graphql/resolvers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const mapNestedEnvironment = (env) => ({
2424
__typename: 'NestedLocalEnvironment',
2525
});
2626
const mapEnvironment = (env) => ({
27-
...convertObjectPropsToCamelCase(env),
27+
...convertObjectPropsToCamelCase(env, { deep: true }),
2828
__typename: 'LocalEnvironment',
2929
});
3030

app/assets/javascripts/issues/list/components/issue_card_time_info.vue

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script>
22
import { GlLink, GlIcon, GlTooltipDirective } from '@gitlab/ui';
3+
import { IssuableStatus } from '~/issues/constants';
34
import {
45
dateInWords,
56
getTimeRemainingInWords,
@@ -41,7 +42,10 @@ export default {
4142
return this.issue.dueDate && dateInWords(newDateAsLocaleTime(this.issue.dueDate), true);
4243
},
4344
showDueDateInRed() {
44-
return isInPast(newDateAsLocaleTime(this.issue.dueDate)) && !this.issue.closedAt;
45+
return (
46+
isInPast(newDateAsLocaleTime(this.issue.dueDate)) &&
47+
this.issue.state !== IssuableStatus.Closed
48+
);
4549
},
4650
timeEstimate() {
4751
return this.issue.humanTimeEstimate || this.issue.timeStats?.humanTimeEstimate;

app/assets/javascripts/issues/list/components/issues_list_app.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { convertToGraphQLId, getIdFromGraphQLId } from '~/graphql_shared/utils';
1919
import { ITEM_TYPE } from '~/groups/constants';
2020
import CsvImportExportButtons from '~/issuable/components/csv_import_export_buttons.vue';
2121
import IssuableByEmail from '~/issuable/components/issuable_by_email.vue';
22+
import { IssuableStatus } from '~/issues/constants';
2223
import axios from '~/lib/utils/axios_utils';
2324
import { scrollUp } from '~/lib/utils/scroll_utils';
2425
import { getParameterByName, joinPaths } from '~/lib/utils/url_utility';
@@ -480,10 +481,10 @@ export default {
480481
return `${this.exportCsvPath}${window.location.search}`;
481482
},
482483
getStatus(issue) {
483-
if (issue.closedAt && issue.moved) {
484+
if (issue.state === IssuableStatus.Closed && issue.moved) {
484485
return this.$options.i18n.closedMoved;
485486
}
486-
if (issue.closedAt) {
487+
if (issue.state === IssuableStatus.Closed) {
487488
return this.$options.i18n.closed;
488489
}
489490
return undefined;

app/assets/javascripts/issues/list/queries/issue.fragment.graphql

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ fragment IssueFragment on Issue {
22
__typename
33
id
44
iid
5-
closedAt
65
confidential
76
createdAt
87
downvotes
@@ -11,6 +10,7 @@ fragment IssueFragment on Issue {
1110
humanTimeEstimate
1211
mergeRequestsCount
1312
moved
13+
state
1414
title
1515
updatedAt
1616
upvotes

app/assets/javascripts/merge_request.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ MergeRequest.prototype.submitNoteForm = function (form, $button) {
124124

125125
MergeRequest.decreaseCounter = function (by = 1) {
126126
const $el = $('.js-merge-counter');
127-
const count = Math.max(parseInt($el.text().replace(/[^\d]/, ''), 10) - by, 0);
127+
const count = Math.max(parseInt($el.first().text().replace(/[^\d]/, ''), 10) - by, 0);
128128

129129
$el.text(addDelimiter(count));
130130
};

app/models/concerns/issuable_link.rb

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ def issuable_type
2929
validate :check_self_relation
3030
validate :check_opposite_relation
3131

32+
scope :for_source_or_target, ->(issuable) { where(source: issuable).or(where(target: issuable)) }
33+
3234
enum link_type: { TYPE_RELATES_TO => 0, TYPE_BLOCKS => 1 }
3335

3436
private

app/models/deployment.rb

+6
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,12 @@ def equal_to?(params)
380380
status == params[:status]
381381
end
382382

383+
def tier_in_yaml
384+
return unless deployable
385+
386+
deployable.environment_deployment_tier
387+
end
388+
383389
private
384390

385391
def update_status!(status)

app/models/error_tracking/project_error_tracking_setting.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def issue_latest_event(opts = {})
135135
end
136136
end
137137

138-
def update_issue(opts = {} )
138+
def update_issue(opts = {})
139139
handle_exceptions do
140140
{ updated: sentry_client.update_issue(opts) }
141141
end

app/serializers/deployment_entity.rb

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class DeploymentEntity < Grape::Entity
2323
expose :tag
2424
expose :last?
2525
expose :last?, as: :is_last
26+
expose :tier_in_yaml
2627

2728
expose :deployed_by, as: :user, using: UserEntity
2829

app/workers/container_registry/migration/enqueuer_worker.rb

+10
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ def handle_aborted_migration
4141
Gitlab::ErrorTracking.log_exception(e, next_aborted_repository_id: next_aborted_repository&.id)
4242

4343
true
44+
ensure
45+
log_repository_migration_state(next_aborted_repository)
4446
end
4547

4648
def handle_next_migration
@@ -59,6 +61,8 @@ def handle_next_migration
5961
next_repository&.abort_import
6062

6163
false
64+
ensure
65+
log_repository_migration_state(next_repository)
6266
end
6367

6468
def tag_count_too_high?
@@ -151,6 +155,12 @@ def log_repository(repository)
151155
log_extra_metadata_on_done(:container_repository_path, repository&.path)
152156
end
153157

158+
def log_repository_migration_state(repository)
159+
return unless repository
160+
161+
log_extra_metadata_on_done(:container_repository_migration_state, repository.migration_state)
162+
end
163+
154164
# used by ExclusiveLeaseGuard
155165
def lease_key
156166
'container_registry:migration:enqueuer_worker'

config.ru

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# This file is used by Rack-based servers to start the application.
44

5-
require ::File.expand_path('../config/environment', __FILE__)
5+
require ::File.expand_path('config/environment', __dir__)
66

77
warmup do |app|
88
client = Rack::MockRequest.new(app)

doc/ci/yaml/index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -2484,8 +2484,10 @@ Use `changes` in pipelines with the following refs:
24842484
- Paths to files.
24852485
- Wildcard paths for single directories, for example `path/to/directory/*`, or a directory
24862486
and all its subdirectories, for example `path/to/directory/**/*`.
2487-
- Wildcard ([glob](https://en.wikipedia.org/wiki/Glob_(programming))) paths for all
2487+
- Wildcard [glob](https://en.wikipedia.org/wiki/Glob_(programming)) paths for all
24882488
files with the same extension or multiple extensions, for example `*.md` or `path/to/directory/*.{rb,py,sh}`.
2489+
See the [Ruby `fnmatch` documentation](https://docs.ruby-lang.org/en/master/File.html#method-c-fnmatch)
2490+
for the supported syntax list.
24892491
- Wildcard paths to files in the root directory, or all directories, wrapped in double quotes.
24902492
For example `"*.json"` or `"**/*.json"`.
24912493

0 commit comments

Comments
 (0)