Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2022-07-19 21:10:07 +00:00
parent f602da84d1
commit 0ea2d99b0b
14 changed files with 105 additions and 40 deletions

View File

@ -1 +1 @@
ca638e23ca921cf2f2f3cdc8a6ff033af667170b
3fc66dc23581de48bdbbf1b5a5d5ca9faf5f925b

View File

@ -101,7 +101,7 @@ export default {
>
<gl-tab :title="s__('Incident|Summary')">
<highlight-bar :alert="alert" />
<description-component v-bind="$attrs" />
<description-component v-bind="$attrs" v-on="$listeners" />
</gl-tab>
<incident-metric-tab />
<gl-tab

View File

@ -3,6 +3,7 @@ import { GlSkeletonLoader, GlSafeHtmlDirective, GlAlert } from '@gitlab/ui';
import createFlash from '~/flash';
import { __ } from '~/locale';
import axios from '~/lib/utils/axios_utils';
import { handleLocationHash } from '~/lib/utils/common_utils';
import { renderGFM } from '../render_gfm_facade';
export default {
@ -43,6 +44,7 @@ export default {
this.$nextTick()
.then(() => {
renderGFM(this.$refs.content);
handleLocationHash();
})
.catch(() =>
createFlash({

View File

@ -8,14 +8,16 @@ import runnersRegistrationTokenResetMutation from '~/runner/graphql/list/runners
import { captureException } from '~/runner/sentry_utils';
import { INSTANCE_TYPE, GROUP_TYPE, PROJECT_TYPE } from '../../constants';
const i18n = {
modalAction: s__('Runners|Reset token'),
modalCancel: __('Cancel'),
modalCopy: __('Are you sure you want to reset the registration token?'),
modalTitle: __('Reset registration token'),
};
export default {
name: 'RunnerRegistrationTokenReset',
i18n: {
modalAction: s__('Runners|Reset token'),
modalCancel: __('Cancel'),
modalCopy: __('Are you sure you want to reset the registration token?'),
modalTitle: __('Reset registration token'),
},
i18n,
components: {
GlDropdownItem,
GlLoadingIcon,
@ -68,6 +70,18 @@ export default {
return null;
}
},
actionPrimary() {
return {
text: i18n.modalAction,
attributes: [{ variant: 'danger' }],
};
},
actionSecondary() {
return {
text: i18n.modalCancel,
attributes: [{ variant: 'default' }],
};
},
},
methods: {
handleModalPrimary() {
@ -115,14 +129,8 @@ export default {
<gl-modal
size="sm"
:modal-id="$options.modalId"
:action-primary="/* eslint-disable @gitlab/vue-no-new-non-primitive-in-template */ {
text: $options.i18n.modalAction,
attributes: [{ variant: 'danger' }],
} /* eslint-enable @gitlab/vue-no-new-non-primitive-in-template */"
:action-secondary="/* eslint-disable @gitlab/vue-no-new-non-primitive-in-template */ {
text: $options.i18n.modalCancel,
attributes: [{ variant: 'default' }],
} /* eslint-enable @gitlab/vue-no-new-non-primitive-in-template */"
:action-primary="actionPrimary"
:action-secondary="actionSecondary"
:title="$options.i18n.modalTitle"
@primary="handleModalPrimary"
>

View File

@ -65,7 +65,7 @@ function simplifyWidgetName(componentName) {
function baseRedisEventName(extensionName) {
const redisEventName = extensionName.replace(/([A-Z])/g, '_$1').toLowerCase();
return `i_merge_request_widget_${redisEventName}`;
return `i_code_review_merge_request_widget_${redisEventName}`;
}
function whenable(bus) {

View File

@ -2,5 +2,6 @@
- add_to_breadcrumbs _("Incidents"), project_incidents_path(@project)
- breadcrumb_title @issue.to_reference
- page_title "#{@issue.title} (#{@issue.to_reference})", _("Incidents")
- add_page_specific_style 'page_bundles/issues_show'
= render 'projects/issuable/show', issuable: @issue

View File

@ -0,0 +1,8 @@
---
name: hard_failure_for_mirrors_without_license
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/92422
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/367851
milestone: '15.2'
type: development
group: group::source code
default_enabled: false

View File

@ -68,7 +68,7 @@ labels, you can _always_ add the type, stage, group, and often the category/feat
Type labels are very important. They define what kind of issue this is. Every
issue should have one and only one.
The current type labels are [available in the handbook](https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification)
The SSOT for type and subtype labels is [available in the handbook](https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification).
A number of type labels have a priority assigned to them, which automatically
makes them float to the top, depending on their importance.

View File

@ -50,3 +50,39 @@ To delete package files in the UI, from your group or project:
1. Expand the ellipsis and select **Delete file**.
The package files are permanently deleted.
## Cleanup policy
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/346153) in GitLab 15.2.
Depending on the number of packages to remove, the process of manually deleting the packages can take a long time to finish.
A cleanup policy defines a set of rules that, applied to a project, defines which package files you can automatically delete.
### Enable the cleanup policy
By default, the packages cleanup policy is disabled. To enable it:
1. Go to your project **Settings > Packages & Registries**.
1. Expand **Manage storage used by package assets**.
1. Set the rules appropriately.
NOTE:
To access these project settings, you must be at least a maintainer on the related project.
### Available rules
- `Number of duplicated assets to keep`. The number of duplicated assets to keep. Some package formats allow you
to upload more than one copy of an asset. You can limit the number of duplicated assets to keep and automatically
delete the oldest files once the limit is reached.
### Set cleanup limits to conserve resources
A background process executes the package-cleanup policies. This process can take a long time to finish and consumes
server resources while it is running.
You can use the following setting to limit the number of cleanup workers:
- `package_registry_cleanup_policies_worker_capacity`: the maximum number of cleanup workers running concurrently.
This number must be greater than or equal to `0`.
We recommend starting with a low number and increasing it after monitoring the resources used by the background workers.
To remove all workers and not execute the cleanup policies, set this to `0`. The default value is `2`.

View File

@ -4803,16 +4803,13 @@ msgstr ""
msgid "ApprovalSettings|Prevent approval by author"
msgstr ""
msgid "ApprovalSettings|Prevent approval by author."
msgstr ""
msgid "ApprovalSettings|Prevent approvals by users who add commits"
msgstr ""
msgid "ApprovalSettings|Prevent approvals by users who add commits."
msgid "ApprovalSettings|Prevent editing approval rules in merge requests"
msgstr ""
msgid "ApprovalSettings|Prevent editing approval rules in merge requests"
msgid "ApprovalSettings|Prevent editing approval rules in projects and merge requests"
msgstr ""
msgid "ApprovalSettings|Prevent editing approval rules in projects and merge requests."
@ -29533,7 +29530,7 @@ msgstr ""
msgid "Prevent auto-stopping"
msgstr ""
msgid "Prevent editing approval rules in projects and merge requests."
msgid "Prevent editing approval rules in projects and merge requests"
msgstr ""
msgid "Prevent environment from auto-stopping"

View File

@ -2,7 +2,12 @@
module QA
RSpec.describe 'Verify' do
describe 'Pipeline editor', :reliable do
# TODO: Remove this test when feature flag is removed
# Flag rollout issue https://gitlab.com/gitlab-org/gitlab/-/issues/364257
describe 'Pipeline editor', :reliable, feature_flag: {
name: :simulate_pipeline,
scope: :global
} do
let(:project) do
Resource::Project.fabricate_via_api! do |project|
project.name = 'pipeline-editor-project'
@ -37,7 +42,7 @@ module QA
end
before do
Runtime::Feature.disable(:simulate_pipeline)
Runtime::Feature.disable(:simulate_pipeline) if Runtime::Feature.enabled?(:simulate_pipeline)
Flow::Login.sign_in
project.visit!

View File

@ -7,8 +7,10 @@ import { renderGFM } from '~/pages/shared/wikis/render_gfm_facade';
import axios from '~/lib/utils/axios_utils';
import httpStatus from '~/lib/utils/http_status';
import waitForPromises from 'helpers/wait_for_promises';
import { handleLocationHash } from '~/lib/utils/common_utils';
jest.mock('~/pages/shared/wikis/render_gfm_facade');
jest.mock('~/lib/utils/common_utils');
describe('pages/shared/wikis/components/wiki_content', () => {
const PATH = '/test';
@ -76,6 +78,12 @@ describe('pages/shared/wikis/components/wiki_content', () => {
expect(renderGFM).toHaveBeenCalledWith(wrapper.element);
});
it('handles hash after render', async () => {
await nextTick();
expect(handleLocationHash).toHaveBeenCalled();
});
});
describe('when loading content fails', () => {

View File

@ -142,11 +142,11 @@ describe('Terraform extension', () => {
expect(api.trackRedisHllUserEvent).toHaveBeenCalledTimes(1);
expect(api.trackRedisHllUserEvent).toHaveBeenCalledWith(
'i_merge_request_widget_terraform_click_full_report',
'i_code_review_merge_request_widget_terraform_click_full_report',
);
expect(api.trackRedisCounterEvent).toHaveBeenCalledTimes(1);
expect(api.trackRedisCounterEvent).toHaveBeenCalledWith(
'i_merge_request_widget_terraform_count_click_full_report',
'i_code_review_merge_request_widget_terraform_count_click_full_report',
);
});
});

View File

@ -1080,17 +1080,17 @@ describe('MrWidgetOptions', () => {
// The default working extension is a "warning" type, which generates a second - more specific - telemetry event for expansions
expect(api.trackRedisHllUserEvent).toHaveBeenCalledTimes(2);
expect(api.trackRedisHllUserEvent).toHaveBeenCalledWith(
'i_merge_request_widget_test_extension_expand',
'i_code_review_merge_request_widget_test_extension_expand',
);
expect(api.trackRedisHllUserEvent).toHaveBeenCalledWith(
'i_merge_request_widget_test_extension_expand_warning',
'i_code_review_merge_request_widget_test_extension_expand_warning',
);
expect(api.trackRedisCounterEvent).toHaveBeenCalledTimes(2);
expect(api.trackRedisCounterEvent).toHaveBeenCalledWith(
'i_merge_request_widget_test_extension_count_expand',
'i_code_review_merge_request_widget_test_extension_count_expand',
);
expect(api.trackRedisCounterEvent).toHaveBeenCalledWith(
'i_merge_request_widget_test_extension_count_expand_warning',
'i_code_review_merge_request_widget_test_extension_count_expand_warning',
);
});
});
@ -1160,11 +1160,11 @@ describe('MrWidgetOptions', () => {
expect(api.trackRedisHllUserEvent).toHaveBeenCalledTimes(1);
expect(api.trackRedisHllUserEvent).toHaveBeenCalledWith(
'i_merge_request_widget_test_extension_view',
'i_code_review_merge_request_widget_test_extension_view',
);
expect(api.trackRedisCounterEvent).toHaveBeenCalledTimes(1);
expect(api.trackRedisCounterEvent).toHaveBeenCalledWith(
'i_merge_request_widget_test_extension_count_view',
'i_code_review_merge_request_widget_test_extension_count_view',
);
});
@ -1183,17 +1183,17 @@ describe('MrWidgetOptions', () => {
// The default working extension is a "warning" type, which generates a second - more specific - telemetry event for expansions
expect(api.trackRedisHllUserEvent).toHaveBeenCalledTimes(2);
expect(api.trackRedisHllUserEvent).toHaveBeenCalledWith(
'i_merge_request_widget_test_extension_expand',
'i_code_review_merge_request_widget_test_extension_expand',
);
expect(api.trackRedisHllUserEvent).toHaveBeenCalledWith(
'i_merge_request_widget_test_extension_expand_warning',
'i_code_review_merge_request_widget_test_extension_expand_warning',
);
expect(api.trackRedisCounterEvent).toHaveBeenCalledTimes(2);
expect(api.trackRedisCounterEvent).toHaveBeenCalledWith(
'i_merge_request_widget_test_extension_count_expand',
'i_code_review_merge_request_widget_test_extension_count_expand',
);
expect(api.trackRedisCounterEvent).toHaveBeenCalledWith(
'i_merge_request_widget_test_extension_count_expand_warning',
'i_code_review_merge_request_widget_test_extension_count_expand_warning',
);
});
@ -1236,11 +1236,11 @@ describe('MrWidgetOptions', () => {
expect(api.trackRedisHllUserEvent).toHaveBeenCalledTimes(1);
expect(api.trackRedisHllUserEvent).toHaveBeenCalledWith(
'i_merge_request_widget_test_extension_click_full_report',
'i_code_review_merge_request_widget_test_extension_click_full_report',
);
expect(api.trackRedisCounterEvent).toHaveBeenCalledTimes(1);
expect(api.trackRedisCounterEvent).toHaveBeenCalledWith(
'i_merge_request_widget_test_extension_count_click_full_report',
'i_code_review_merge_request_widget_test_extension_count_click_full_report',
);
});