Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
3837dbda37
commit
de3e5b6772
|
@ -29,4 +29,5 @@ This issue template is for an actionable insight that requires a change in the p
|
|||
|
||||
/confidential
|
||||
/label ~"Actionable Insight::Product change"
|
||||
/label ~"SUS"
|
||||
|
||||
|
|
18
.rubocop.yml
18
.rubocop.yml
|
@ -517,24 +517,6 @@ Graphql/Descriptions:
|
|||
RSpec/ImplicitSubject:
|
||||
Enabled: false
|
||||
|
||||
# WIP See https://gitlab.com/gitlab-org/gitlab/-/issues/211580
|
||||
RSpec/LeakyConstantDeclaration:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
- 'spec/db/schema_spec.rb'
|
||||
- 'spec/lib/feature_spec.rb'
|
||||
- 'spec/lib/gitlab/config/entry/simplifiable_spec.rb'
|
||||
- 'spec/lib/gitlab/quick_actions/dsl_spec.rb'
|
||||
- 'spec/lib/marginalia_spec.rb'
|
||||
- 'spec/mailers/notify_spec.rb'
|
||||
- 'spec/models/concerns/batch_destroy_dependent_associations_spec.rb'
|
||||
- 'spec/models/concerns/bulk_insert_safe_spec.rb'
|
||||
- 'spec/models/concerns/bulk_insertable_associations_spec.rb'
|
||||
- 'spec/models/concerns/triggerable_hooks_spec.rb'
|
||||
- 'spec/models/repository_spec.rb'
|
||||
- 'spec/services/clusters/applications/check_installation_progress_service_spec.rb'
|
||||
- 'spec/support/shared_examples/quick_actions/issuable/issuable_quick_actions_shared_examples.rb'
|
||||
|
||||
RSpec/EmptyLineAfterHook:
|
||||
Enabled: false
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
RSpec/LeakyConstantDeclaration:
|
||||
Exclude:
|
||||
- spec/db/schema_spec.rb
|
||||
- spec/lib/gitlab/config/entry/simplifiable_spec.rb
|
||||
- spec/lib/gitlab/quick_actions/dsl_spec.rb
|
||||
- spec/lib/marginalia_spec.rb
|
||||
- spec/mailers/notify_spec.rb
|
||||
- spec/models/concerns/batch_destroy_dependent_associations_spec.rb
|
||||
- spec/models/concerns/bulk_insert_safe_spec.rb
|
||||
- spec/models/concerns/bulk_insertable_associations_spec.rb
|
||||
- spec/models/concerns/triggerable_hooks_spec.rb
|
||||
- spec/models/repository_spec.rb
|
||||
- spec/services/clusters/applications/check_installation_progress_service_spec.rb
|
||||
- spec/support/shared_examples/quick_actions/issuable/issuable_quick_actions_shared_examples.rb
|
|
@ -22,7 +22,7 @@
|
|||
- [Code format](#code-format)
|
||||
- [Issue fixed in newer version](#issue-fixed-in-newer-version)
|
||||
- [Improperly formatted merge request](#improperly-formatted-merge-request)
|
||||
- [Accepting merge requests](#accepting-merge-requests)
|
||||
- [Seeking community contributions](#seeking-community-contributions)
|
||||
- [Only accepting merge requests with green tests](#only-accepting-merge-requests-with-green-tests)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
@ -195,14 +195,14 @@ Thanks for your interest in improving the GitLab codebase!
|
|||
Please update your merge request according to the [contributing guidelines](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/development/contributing/merge_request_workflow.md#merge-request-guidelines).
|
||||
```
|
||||
|
||||
### Accepting merge requests
|
||||
### Seeking community contributions
|
||||
|
||||
```
|
||||
Is there an issue on the
|
||||
[issue tracker](https://gitlab.com/gitlab-org/gitlab/issues) that is
|
||||
similar to this? Could you please link it here?
|
||||
Please be aware that new functionality that is not marked
|
||||
[`Accepting merge requests`](https://docs.gitlab.com/ee/development/contributing/issue_workflow.html#label-for-community-contributors)
|
||||
[`Seeking community contributions`](https://docs.gitlab.com/ee/development/contributing/issue_workflow.html#label-for-community-contributors)
|
||||
might not make it into GitLab.
|
||||
```
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import { GlDaterangePicker, GlSprintf, GlIcon, GlTooltipDirective } from '@gitlab/ui';
|
||||
import { GlDaterangePicker, GlSprintf } from '@gitlab/ui';
|
||||
import { getDayDifference } from '~/lib/utils/datetime_utility';
|
||||
import { __, sprintf } from '~/locale';
|
||||
import { OFFSET_DATE_BY_ONE } from '../constants';
|
||||
|
@ -8,10 +8,6 @@ export default {
|
|||
components: {
|
||||
GlDaterangePicker,
|
||||
GlSprintf,
|
||||
GlIcon,
|
||||
},
|
||||
directives: {
|
||||
GlTooltip: GlTooltipDirective,
|
||||
},
|
||||
props: {
|
||||
show: {
|
||||
|
@ -56,7 +52,7 @@ export default {
|
|||
return {
|
||||
maxDateRangeTooltip: sprintf(
|
||||
__(
|
||||
'Showing data for workflow items created in this date range. Date range cannot exceed %{maxDateRange} days.',
|
||||
'Showing data for workflow items created in this date range. Date range limited to %{maxDateRange} days.',
|
||||
),
|
||||
{
|
||||
maxDateRange: this.maxDateRange,
|
||||
|
@ -94,28 +90,15 @@ export default {
|
|||
:max-date-range="maxDateRange"
|
||||
:default-max-date="maxDate"
|
||||
:same-day-selection="includeSelectedDate"
|
||||
:tooltip="maxDateRangeTooltip"
|
||||
theme="animate-picker"
|
||||
start-picker-class="js-daterange-picker-from gl-display-flex gl-flex-direction-column gl-lg-flex-direction-row gl-lg-align-items-center gl-lg-mr-3 gl-mb-2 gl-lg-mb-0"
|
||||
end-picker-class="js-daterange-picker-to d-flex flex-column flex-lg-row align-items-lg-center"
|
||||
end-picker-class="js-daterange-picker-to d-flex flex-column flex-lg-row align-items-lg-center gl-mb-2 gl-lg-mb-0"
|
||||
label-class="gl-mb-2 gl-lg-mb-0"
|
||||
/>
|
||||
<div
|
||||
v-if="maxDateRange"
|
||||
class="daterange-indicator d-flex flex-row flex-lg-row align-items-flex-start align-items-lg-center"
|
||||
>
|
||||
<span class="number-of-days pl-2 pr-1">
|
||||
<gl-sprintf :message="n__('1 day selected', '%d days selected', numberOfDays)">
|
||||
<template #numberOfDays>{{ numberOfDays }}</template>
|
||||
</gl-sprintf>
|
||||
</span>
|
||||
<gl-icon
|
||||
v-gl-tooltip
|
||||
data-testid="helper-icon"
|
||||
:title="maxDateRangeTooltip"
|
||||
name="question"
|
||||
:size="14"
|
||||
class="text-secondary"
|
||||
/>
|
||||
</div>
|
||||
<gl-sprintf :message="n__('1 day selected', '%d days selected', numberOfDays)">
|
||||
<template #numberOfDays>{{ numberOfDays }}</template>
|
||||
</gl-sprintf>
|
||||
</gl-daterange-picker>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
<script>
|
||||
import { GlDropdown, GlDropdownItem, GlModalDirective, GlTooltipDirective } from '@gitlab/ui';
|
||||
import {
|
||||
GlDropdown,
|
||||
GlDropdownItem,
|
||||
GlModalDirective,
|
||||
GlTooltipDirective,
|
||||
GlDropdownDivider,
|
||||
GlDropdownSectionHeader,
|
||||
} from '@gitlab/ui';
|
||||
|
||||
import { INSTALL_AGENT_MODAL_ID, CLUSTERS_ACTIONS } from '../constants';
|
||||
|
||||
export default {
|
||||
|
@ -8,6 +16,8 @@ export default {
|
|||
components: {
|
||||
GlDropdown,
|
||||
GlDropdownItem,
|
||||
GlDropdownDivider,
|
||||
GlDropdownSectionHeader,
|
||||
},
|
||||
directives: {
|
||||
GlModalDirective,
|
||||
|
@ -36,15 +46,18 @@ export default {
|
|||
split
|
||||
right
|
||||
>
|
||||
<gl-dropdown-item :href="newClusterPath" data-testid="new-cluster-link" @click.stop>
|
||||
{{ $options.i18n.createNewCluster }}
|
||||
</gl-dropdown-item>
|
||||
<gl-dropdown-section-header>{{ $options.i18n.agent }}</gl-dropdown-section-header>
|
||||
<gl-dropdown-item
|
||||
v-gl-modal-directive="$options.INSTALL_AGENT_MODAL_ID"
|
||||
data-testid="connect-new-agent-link"
|
||||
>
|
||||
{{ $options.i18n.connectWithAgent }}
|
||||
</gl-dropdown-item>
|
||||
<gl-dropdown-divider />
|
||||
<gl-dropdown-section-header>{{ $options.i18n.certificate }}</gl-dropdown-section-header>
|
||||
<gl-dropdown-item :href="newClusterPath" data-testid="new-cluster-link" @click.stop>
|
||||
{{ $options.i18n.createNewCluster }}
|
||||
</gl-dropdown-item>
|
||||
<gl-dropdown-item :href="addClusterPath" data-testid="connect-cluster-link" @click.stop>
|
||||
{{ $options.i18n.connectExistingCluster }}
|
||||
</gl-dropdown-item>
|
||||
|
|
|
@ -234,6 +234,8 @@ export const CLUSTERS_ACTIONS = {
|
|||
createNewCluster: s__('ClusterAgents|Create a new cluster'),
|
||||
connectWithAgent: s__('ClusterAgents|Connect with agent'),
|
||||
connectExistingCluster: s__('ClusterAgents|Connect with a certificate'),
|
||||
agent: s__('ClusterAgents|Agent'),
|
||||
certificate: s__('ClusterAgents|Certificate'),
|
||||
dropdownDisabledHint: s__(
|
||||
'ClusterAgents|Requires a Maintainer or greater role to perform these actions',
|
||||
),
|
||||
|
|
|
@ -9,6 +9,7 @@ import {
|
|||
} from '@gitlab/ui';
|
||||
import { __, s__ } from '~/locale';
|
||||
import { truncate } from '~/lib/utils/text_utility';
|
||||
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
|
||||
import isLastDeployment from '../graphql/queries/is_last_deployment.query.graphql';
|
||||
import ExternalUrl from './environment_external_url.vue';
|
||||
import Actions from './environment_actions.vue';
|
||||
|
@ -35,6 +36,7 @@ export default {
|
|||
Monitoring,
|
||||
Pin,
|
||||
Terminal,
|
||||
TimeAgoTooltip,
|
||||
Delete,
|
||||
},
|
||||
directives: {
|
||||
|
@ -66,6 +68,7 @@ export default {
|
|||
emptyState: s__(
|
||||
'Environments|There are no deployments for this environment yet. %{linkStart}Learn more about setting up deployments.%{linkEnd}',
|
||||
),
|
||||
autoStopIn: s__('Environment|Auto stop %{time}'),
|
||||
},
|
||||
data() {
|
||||
return { visible: false };
|
||||
|
@ -185,7 +188,14 @@ export default {
|
|||
{{ displayName }}
|
||||
</gl-link>
|
||||
</div>
|
||||
<div>
|
||||
<div class="gl-display-flex gl-align-items-center">
|
||||
<p v-if="canShowAutoStopDate" class="gl-font-sm gl-text-gray-700 gl-mr-5 gl-mb-0">
|
||||
<gl-sprintf :message="$options.i18n.autoStopIn">
|
||||
<template #time>
|
||||
<time-ago-tooltip :time="environment.autoStopAt" css-class="gl-font-weight-bold" />
|
||||
</template>
|
||||
</gl-sprintf>
|
||||
</p>
|
||||
<div class="btn-group table-action-buttons" role="group">
|
||||
<external-url
|
||||
v-if="externalUrl"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import Visibility from 'visibilityjs';
|
||||
import createFlash from '~/flash';
|
||||
import { historyPushState, buildUrlWithCurrentLocation } from '~/lib/utils/common_utils';
|
||||
import httpStatusCodes from '~/lib/utils/http_status';
|
||||
import Poll from '~/lib/utils/poll';
|
||||
import { __ } from '~/locale';
|
||||
import { validateParams } from '~/pipelines/utils';
|
||||
|
@ -195,11 +196,20 @@ export default {
|
|||
this.$toast.show(TOAST_MESSAGE);
|
||||
this.updateTable();
|
||||
})
|
||||
.catch(() => {
|
||||
.catch((e) => {
|
||||
const unauthorized = e.response.status === httpStatusCodes.UNAUTHORIZED;
|
||||
const badRequest = e.response.status === httpStatusCodes.BAD_REQUEST;
|
||||
|
||||
let errorMessage = __(
|
||||
'An error occurred while trying to run a new pipeline for this merge request.',
|
||||
);
|
||||
|
||||
if (unauthorized || badRequest) {
|
||||
errorMessage = __('You do not have permission to run a pipeline on this branch.');
|
||||
}
|
||||
|
||||
createFlash({
|
||||
message: __(
|
||||
'An error occurred while trying to run a new pipeline for this merge request.',
|
||||
),
|
||||
message: errorMessage,
|
||||
});
|
||||
})
|
||||
.finally(() => this.store.toggleIsRunningPipeline(false));
|
||||
|
|
|
@ -11,7 +11,7 @@ export default {
|
|||
WelcomePage,
|
||||
LegacyContainer,
|
||||
CreditCardVerification: () =>
|
||||
import('ee_component/pages/groups/new/components/credit_card_verification.vue'),
|
||||
import('ee_component/namespaces/verification/components/credit_card_verification.vue'),
|
||||
},
|
||||
directives: {
|
||||
SafeHtml,
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
.float-right
|
||||
%span.light.vertical-align-middle= group_member.human_access
|
||||
- unless group_member.owner?
|
||||
= link_to group_group_member_path(group, group_member), data: { confirm: remove_member_message(group_member), testid: 'remove-user' }, method: :delete, remote: true, class: "btn btn-sm btn-danger gl-button btn-icon gl-ml-3", title: _('Remove user from group') do
|
||||
= link_to group_group_member_path(group, group_member), data: { confirm: remove_member_message(group_member), confirm_btn_variant: 'danger', testid: 'remove-user' }, aria: { label: _('Remove') }, method: :delete, remote: true, class: "btn btn-sm btn-danger gl-button btn-icon gl-ml-3", title: _('Remove user from group') do
|
||||
= sprite_icon('remove', size: 16, css_class: 'gl-icon')
|
||||
|
||||
.row
|
||||
|
@ -46,7 +46,7 @@
|
|||
%span.light.vertical-align-middle= member.human_access
|
||||
|
||||
- if member.respond_to? :project
|
||||
= link_to project_project_member_path(project, member), data: { confirm: remove_member_message(member) }, remote: true, method: :delete, class: "btn btn-sm btn-danger gl-button btn-icon gl-ml-3", title: _('Remove user from project') do
|
||||
= link_to project_project_member_path(project, member), data: { confirm: remove_member_message(member), confirm_btn_variant: 'danger' }, aria: { label: _('Remove') }, remote: true, method: :delete, class: "btn btn-sm btn-danger gl-button btn-icon gl-ml-3", title: _('Remove user from project') do
|
||||
= sprite_icon('remove', size: 16, css_class: 'gl-icon')
|
||||
|
||||
= render partial: 'admin/users/modals'
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
= check_box_tag checkbox_id, nil, false, class: "check-all-issues left"
|
||||
- if is_epic_board
|
||||
#js-board-filtered-search{ data: { full_path: @group&.full_path } }
|
||||
- elsif Feature.enabled?(:issue_boards_filtered_search, ff_resource) && board
|
||||
- elsif Feature.enabled?(:issue_boards_filtered_search, ff_resource, default_enabled: :yaml) && board
|
||||
#js-issue-board-filtered-search
|
||||
- else
|
||||
.issues-other-filters.filtered-search-wrapper.d-flex.flex-column.flex-md-row
|
||||
|
|
|
@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/331649
|
|||
milestone: '14.1'
|
||||
type: development
|
||||
group: group::product planning
|
||||
default_enabled: false
|
||||
default_enabled: true
|
||||
|
|
|
@ -91,7 +91,7 @@ Sign up for the mailing list, answer GitLab questions on StackOverflow or respon
|
|||
If you would like to contribute to GitLab:
|
||||
|
||||
- Issues with the
|
||||
[`~Accepting merge requests` label](issue_workflow.md#label-for-community-contributors)
|
||||
[`~Seeking community contributions` label](issue_workflow.md#label-for-community-contributors)
|
||||
are a great place to start.
|
||||
- Optimizing our tests is another great opportunity to contribute. You can use
|
||||
[RSpec profiling statistics](https://gitlab-org.gitlab.io/rspec_profiling_stats/) to identify
|
||||
|
|
|
@ -282,12 +282,12 @@ Please refer to the issue triage [severity label](https://about.gitlab.com/handb
|
|||
|
||||
### Label for community contributors
|
||||
|
||||
Issues that are beneficial to our users, 'nice to haves', that we currently do
|
||||
not have the capacity for or want to give the priority to, are labeled as
|
||||
~"Accepting merge requests", so the community can make a contribution.
|
||||
There are many issues that have a clear solution with uncontroversial benefit to GitLab users.
|
||||
However, GitLab might not have the capacity for all these proposals in the current roadmap.
|
||||
These issues are labeled ~"Seeking community contributions" because we welcome merge requests to resolve them.
|
||||
|
||||
Community contributors can submit merge requests for any issue they want, but
|
||||
the ~"Accepting merge requests" label has a special meaning. It points to
|
||||
the ~"Seeking community contributions" label has a special meaning. It points to
|
||||
changes that:
|
||||
|
||||
1. We already agreed on,
|
||||
|
@ -295,20 +295,24 @@ changes that:
|
|||
1. Are likely to get accepted by a maintainer.
|
||||
|
||||
We want to avoid a situation when a contributor picks an
|
||||
~"Accepting merge requests" issue and then their merge request gets closed,
|
||||
~"Seeking community contributions" issue and then their merge request gets closed,
|
||||
because we realize that it does not fit our vision, or we want to solve it in a
|
||||
different way.
|
||||
|
||||
We automatically add the ~"Accepting merge requests" label to issues
|
||||
that match the [triage policy](https://about.gitlab.com/handbook/engineering/quality/triage-operations/#accepting-merge-requests).
|
||||
We manually add the ~"Seeking community contributions" label to issues
|
||||
that fit the criteria described above.
|
||||
We do not automatically add this label, because it requires human evaluation.
|
||||
|
||||
We recommend people that have never contributed to any open source project to
|
||||
look for issues labeled `~"Accepting merge requests"` with a [weight of 1](https://gitlab.com/groups/gitlab-org/-/issues?state=opened&label_name[]=Accepting+merge+requests&assignee_id=None&sort=weight&weight=1) or the `~"good for new contributors"` [label](https://gitlab.com/gitlab-org/gitlab/-/issues?scope=all&state=opened&label_name[]=good%20for%20new%20contributors&assignee_id=None) attached to it.
|
||||
look for issues labeled `~"Seeking community contributions"` with a
|
||||
[weight of 1](https://gitlab.com/groups/gitlab-org/-/issues?sort=created_date&state=opened&label_name[]=Seeking+community+contributions&assignee_id=None&weight=1) or the `~"good for new contributors"`
|
||||
[label](https://gitlab.com/gitlab-org/gitlab/-/issues?scope=all&state=opened&label_name[]=good%20for%20new%20contributors&assignee_id=None)
|
||||
attached to it.
|
||||
More experienced contributors are very welcome to tackle
|
||||
[any of them](https://gitlab.com/groups/gitlab-org/-/issues?state=opened&label_name[]=Accepting+merge+requests&assignee_id=None).
|
||||
[any of them](https://gitlab.com/groups/gitlab-org/-/issues?sort=created_date&state=opened&label_name[]=Seeking+community+contributions&assignee_id=None).
|
||||
|
||||
For more complex features that have a weight of 2 or more and clear scope, we recommend looking at issues
|
||||
with the [label `~"Community Challenge"`](https://gitlab.com/gitlab-org/gitlab/-/issues?scope=all&state=opened&label_name[]=Accepting%20merge%20requests&label_name[]=Community%20challenge).
|
||||
with the [label `~"Community Challenge"`](https://gitlab.com/gitlab-org/gitlab/-/issues?sort=created_date&state=opened&label_name[]=Seeking+community+contributions&label_name[]=Community+challenge).
|
||||
If your MR for the `~"Community Challenge"` issue gets merged, you will also have a chance to win a custom
|
||||
GitLab merchandise.
|
||||
|
||||
|
@ -319,7 +323,7 @@ members to further discuss scope, design, and technical considerations. This wil
|
|||
ensure that your contribution is aligned with the GitLab product and minimize
|
||||
any rework and delay in getting it merged into main.
|
||||
|
||||
GitLab team members who apply the ~"Accepting merge requests" label to an issue
|
||||
GitLab team members who apply the ~"Seeking community contributions" label to an issue
|
||||
should update the issue description with a responsible product manager, inviting
|
||||
any potential community contributor to @-mention per above.
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
We welcome merge requests from everyone, with fixes and improvements
|
||||
to GitLab code, tests, and documentation. The issues that are specifically suitable
|
||||
for community contributions are listed with the [`Accepting merge requests`](issue_workflow.md#label-for-community-contributors)
|
||||
for community contributions have the [`Seeking community contributions`](issue_workflow.md#label-for-community-contributors)
|
||||
label, but you are free to contribute to any issue you want.
|
||||
|
||||
If an issue is marked for the current milestone at any time, even
|
||||
|
@ -18,7 +18,7 @@ in order to ensure the work is finished before the release date.
|
|||
|
||||
If you want to add a new feature that is not labeled, it is best to first create
|
||||
an issue (if there isn't one already) and leave a comment asking for it
|
||||
to be marked as `Accepting merge requests`. See the [feature proposals](issue_workflow.md#feature-proposals)
|
||||
to be labeled as `Seeking community contributions`. See the [feature proposals](issue_workflow.md#feature-proposals)
|
||||
section.
|
||||
|
||||
Merge requests should be submitted to the appropriate project at GitLab.com, for example
|
||||
|
|
|
@ -13,7 +13,10 @@ onto your cluster.
|
|||
|
||||
## Prerequisites
|
||||
|
||||
- An existing Kubernetes cluster.
|
||||
- An existing Kubernetes cluster. If you don't have a cluster yet, you can create a new cluster on cloud providers, such as:
|
||||
- [Google Kubernetes Engine (GKE)](https://cloud.google.com/kubernetes-engine/docs/quickstart)
|
||||
- [Amazon Elastic Kubernetes Service (EKS)](https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html)
|
||||
- [Digital Ocean](https://docs.digitalocean.com/products/kubernetes/quickstart/)
|
||||
- On self-managed GitLab instances, a GitLab administrator needs to set up the [GitLab Agent Server (KAS)](../../../../administration/clusters/kas.md).
|
||||
|
||||
## Installation steps
|
||||
|
|
|
@ -384,6 +384,24 @@ Additional improvements to the
|
|||
[graphical interface for managing state files](https://gitlab.com/groups/gitlab-org/-/epics/4563)
|
||||
are planned.
|
||||
|
||||
## Manage individual Terraform state versions
|
||||
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/207347) in GitLab 13.4.
|
||||
|
||||
Individual state versions can be managed using the GitLab REST API.
|
||||
|
||||
Users with the [Developer role](../../permissions.md) can retrieve state versions using their serial number. To retrieve a version:
|
||||
|
||||
```shell
|
||||
curl --header "Private-Token: <your_access_token>" "https://gitlab.example.com/api/v4/projects/<your_project_id>/terraform/state/<your_state_name>/versions/<version-serial>"
|
||||
```
|
||||
|
||||
Users with the [Maintainer role](../../permissions.md) can remove state versions using their serial number. To remove a version:
|
||||
|
||||
```shell
|
||||
curl --header "Private-Token: <your_access_token>" --request DELETE "https://gitlab.example.com/api/v4/projects/<your_project_id>/terraform/state/<your_state_name>/versions/<version-serial>"
|
||||
```
|
||||
|
||||
## Remove a state file
|
||||
|
||||
Users with Maintainer and greater [permissions](../../permissions.md) can use the
|
||||
|
|
|
@ -89,7 +89,7 @@ You can view which pipeline published the package, and the commit and user who t
|
|||
## Reduce storage usage
|
||||
|
||||
For information on reducing your storage use for the Package Registry, see
|
||||
[Reduce Dependency Proxy storage use](reduce_package_registry_storage.md).
|
||||
[Reduce Package Registry storage use](reduce_package_registry_storage.md).
|
||||
|
||||
## Disable the Package Registry
|
||||
|
||||
|
|
|
@ -81,8 +81,9 @@ The following table lists project permissions available for each role:
|
|||
| [Clusters](infrastructure/clusters/index.md):<br>View clusters | | | ✓ | ✓ | ✓ |
|
||||
| [Clusters](infrastructure/clusters/index.md):<br>Manage clusters | | | | ✓ | ✓ |
|
||||
| [Container Registry](packages/container_registry/index.md):<br>Create, edit, delete cleanup policies | | | ✓ | ✓ | ✓ |
|
||||
| [Container Registry](packages/container_registry/index.md):<br>Remove a container registry image | | | ✓ | ✓ | ✓ |
|
||||
| [Container Registry](packages/container_registry/index.md):<br>Update container registry | | | ✓ | ✓ | ✓ |
|
||||
| [Container Registry](packages/container_registry/index.md):<br>Push an image to the Container Registry | | | ✓ | ✓ | ✓ |
|
||||
| [Container Registry](packages/container_registry/index.md):<br>Pull an image from the Container Registry | ✓ (*21*) | ✓ (*21*) | ✓ | ✓ | ✓ |
|
||||
| [Container Registry](packages/container_registry/index.md):<br>Remove a Container Registry image | | | ✓ | ✓ | ✓ |
|
||||
| [GitLab Pages](project/pages/index.md):<br>View Pages protected by [access control](project/pages/introduction.md#gitlab-pages-access-control) | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| [GitLab Pages](project/pages/index.md):<br>Manage | | | | ✓ | ✓ |
|
||||
| [GitLab Pages](project/pages/index.md):<br>Manage GitLab Pages domains and certificates | | | | ✓ | ✓ |
|
||||
|
@ -130,9 +131,10 @@ The following table lists project permissions available for each role:
|
|||
| [Metrics dashboards](../operations/metrics/dashboards/index.md):<br>Manage user-starred metrics dashboards (*7*) | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Metrics dashboards](../operations/metrics/dashboards/index.md):<br>View metrics dashboard annotations | | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Metrics dashboards](../operations/metrics/dashboards/index.md):<br>Create/edit/delete metrics dashboard annotations | | | ✓ | ✓ | ✓ |
|
||||
| [Package registry](packages/index.md):<br>Pull package | ✓ (*1*) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Package registry](packages/index.md):<br>Publish package | | | ✓ | ✓ | ✓ |
|
||||
| [Package registry](packages/index.md):<br>Delete package | | | | ✓ | ✓ |
|
||||
| [Package registry](packages/index.md):<br>Pull a package | ✓ (*1*) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Package registry](packages/index.md):<br>Publish a package | | | ✓ | ✓ | ✓ |
|
||||
| [Package registry](packages/index.md):<br>Delete a package | | | | ✓ | ✓ |
|
||||
| [Package registry](packages/index.md):<br>Delete a file associated with a package | | | | ✓ | ✓ |
|
||||
| [Project operations](../operations/index.md):<br>View [Error Tracking](../operations/error_tracking.md) list | | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Project operations](../operations/index.md):<br>Manage [Feature Flags](../operations/feature_flags.md) **(PREMIUM)** | | | ✓ | ✓ | ✓ |
|
||||
| [Project operations](../operations/index.md):<br>Manage [Error Tracking](../operations/error_tracking.md) | | | | ✓ | ✓ |
|
||||
|
@ -239,6 +241,7 @@ The following table lists project permissions available for each role:
|
|||
1. In projects that accept contributions from external members, users can create, edit, and close their own merge requests.
|
||||
1. Authors and assignees of issues can modify the title and description even if they don't have the Reporter role.
|
||||
1. Authors and assignees can close and reopen issues even if they don't have the Reporter role.
|
||||
1. The ability to view the Container Registry and pull images is controlled by the [Container Registry's visibility permissions](packages/container_registry/index.md#container-registry-visibility-permissions).
|
||||
|
||||
## Project features permissions
|
||||
|
||||
|
@ -284,7 +287,8 @@ read through the documentation on [permissions and access to confidential issues
|
|||
|
||||
### Container Registry visibility permissions
|
||||
|
||||
Find the visibility permissions for the Container Registry, as described in the
|
||||
The ability to view the Container Registry and pull images is controlled by the Container Registry's
|
||||
visibility permissions. Find these permissions for the Container Registry as described in the
|
||||
[related documentation](packages/container_registry/index.md#container-registry-visibility-permissions).
|
||||
|
||||
## Group members permissions
|
||||
|
@ -310,8 +314,11 @@ The following table lists group permissions available for each role:
|
|||
| Create/edit group epic **(PREMIUM)** | | ✓ | ✓ | ✓ | ✓ |
|
||||
| Create/edit/delete epic boards **(PREMIUM)** | | ✓ | ✓ | ✓ | ✓ |
|
||||
| Manage group labels | | ✓ | ✓ | ✓ | ✓ |
|
||||
| Publish [packages](packages/index.md) | | | ✓ | ✓ | ✓ |
|
||||
| Pull [packages](packages/index.md) | | ✓ | ✓ | ✓ | ✓ |
|
||||
| View a container registry | | ✓ | ✓ | ✓ | ✓ |
|
||||
| Delete [packages](packages/index.md | | | | ✓ | ✓ |
|
||||
| Pull a Container Registry image | ✓ (7) | ✓ | ✓ | ✓ | ✓ |
|
||||
| Remove a Container Registry image | | | ✓ | ✓ | ✓ |
|
||||
| View Group DevOps Adoption **(ULTIMATE)** | | ✓ | ✓ | ✓ | ✓ |
|
||||
| View metrics dashboard annotations | | ✓ | ✓ | ✓ | ✓ |
|
||||
| View Productivity analytics **(PREMIUM)** | | ✓ | ✓ | ✓ | ✓ |
|
||||
|
@ -322,7 +329,6 @@ The following table lists group permissions available for each role:
|
|||
| Create/edit/delete metrics dashboard annotations | | | ✓ | ✓ | ✓ |
|
||||
| Enable/disable a dependency proxy | | | ✓ | ✓ | ✓ |
|
||||
| Purge the dependency proxy for a group | | | | | ✓ |
|
||||
| Publish [packages](packages/index.md) | | | ✓ | ✓ | ✓ |
|
||||
| Use security dashboard **(ULTIMATE)** | | | ✓ | ✓ | ✓ |
|
||||
| View group Audit Events | | | ✓ (7) | ✓ (7) | ✓ |
|
||||
| Create subgroup | | | | ✓ (1) | ✓ |
|
||||
|
|
|
@ -34,7 +34,7 @@ Prerequisites:
|
|||
- An [Amazon Web Services](https://aws.amazon.com/) account.
|
||||
- Permissions to manage IAM resources.
|
||||
|
||||
For instance-level clusters, see [additional requirements for self-managed instances](#additional-requirements-for-self-managed-instances). **(FREE SELF)**
|
||||
For instance-level clusters, see [additional requirements for self-managed instances](#additional-requirements-for-self-managed-instances).
|
||||
|
||||
To create new Kubernetes clusters for your project, group, or instance through the certificate-based method:
|
||||
|
||||
|
@ -256,7 +256,7 @@ IAM user in the Amazon AWS console, and follow these steps:
|
|||
|
||||
#### EKS access key and ID
|
||||
|
||||
> Instance profiles were [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/291015) in GitLab 13.7.
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/291015) instance profiles in GitLab 13.7.
|
||||
|
||||
If you're using GitLab 13.7 or later, you can use instance profiles to
|
||||
dynamically retrieve temporary credentials from AWS when needed.
|
||||
|
|
|
@ -4,7 +4,7 @@ group: Configure
|
|||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
# Connect existing clusters through cluster certificates **(DEPRECATED)**
|
||||
# Connect existing clusters through cluster certificates (DEPRECATED) **(FREE)**
|
||||
|
||||
> [Deprecated](https://gitlab.com/groups/gitlab-org/configure/-/epics/8) in GitLab 14.5.
|
||||
|
||||
|
@ -27,7 +27,7 @@ To add any cluster to GitLab, you need:
|
|||
- Either a GitLab.com account or an account for a self-managed installation
|
||||
running GitLab 12.5 or later.
|
||||
- The Maintainer role for group-level and project-level clusters.
|
||||
- Access to the Admin area for instance-level clusters. **(FREE SELF)**
|
||||
- Access to the Admin area for instance-level clusters.
|
||||
- A Kubernetes cluster.
|
||||
- Cluster administration access to the cluster with `kubectl`.
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
# Multiple clusters per project with cluster certificates (DEPRECATED) **(FREE)**
|
||||
|
||||
> - Introduced in [GitLab Premium](https://about.gitlab.com/pricing/) 10.3
|
||||
> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/35094) to GitLab Free in 13.2.
|
||||
> - Introduced in GitLab 10.3
|
||||
> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/35094) from GitLab Premium to GitLab Free in 13.2.
|
||||
> - [Deprecated](https://gitlab.com/groups/gitlab-org/configure/-/epics/8) in GitLab 14.5.
|
||||
|
||||
WARNING:
|
||||
|
|
|
@ -126,6 +126,14 @@ For information on automating user, group, and project import API calls, see
|
|||
|
||||
## Troubleshooting
|
||||
|
||||
### LFS objects not imported
|
||||
|
||||
If the project import completes but LFS objects can't be downloaded or cloned, you may be using a
|
||||
password or personal access token containing special characters. For more information, see
|
||||
[this issue](https://gitlab.com/gitlab-org/gitlab/-/issues/337769).
|
||||
|
||||
### General
|
||||
|
||||
If the GUI-based import tool does not work, you can try to:
|
||||
|
||||
- Use the [GitLab Import API](../../../api/import.md#import-repository-from-bitbucket-server) Bitbucket server endpoint.
|
||||
|
|
|
@ -300,6 +300,8 @@ When you move an issue, it's closed and copied to the target project.
|
|||
The original issue is not deleted. A system note, which indicates
|
||||
where it came from and went to, is added to both issues.
|
||||
|
||||
Be careful when moving an issue to a project with different access rules. Before moving the issue, make sure it does not contain sensitive data.
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- You must have at least the [Reporter role](../../permissions.md) for the project.
|
||||
|
|
|
@ -78,7 +78,7 @@ threads. Some quick actions might not be available to all subscription tiers.
|
|||
| `/lock` | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No | Lock the discussions. |
|
||||
| `/merge` | **{dotted-circle}** No | **{check-circle}** Yes | **{dotted-circle}** No | Merge changes. Depending on the project setting, this may be [when the pipeline succeeds](merge_requests/merge_when_pipeline_succeeds.md), or adding to a [Merge Train](../../ci/pipelines/merge_trains.md). |
|
||||
| `/milestone %milestone` | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No | Set milestone. |
|
||||
| `/move <path/to/project>` | **{check-circle}** Yes | **{dotted-circle}** No | **{dotted-circle}** No | Move this issue to another project. |
|
||||
| `/move <path/to/project>` | **{check-circle}** Yes | **{dotted-circle}** No | **{dotted-circle}** No | Move this issue to another project. Be careful when moving an issue to a project with different access rules. Before moving the issue, make sure it does not contain sensitive data. |
|
||||
| `/parent_epic <epic>` | **{dotted-circle}** No | **{dotted-circle}** No | **{check-circle}** Yes | Set parent epic to `<epic>`. The `<epic>` value should be in the format of `&epic`, `group&epic`, or a URL to an epic ([introduced in GitLab 12.1](https://gitlab.com/gitlab-org/gitlab/-/issues/10556)). |
|
||||
| `/promote` | **{check-circle}** Yes | **{dotted-circle}** No | **{dotted-circle}** No | Promote issue to epic. |
|
||||
| `/promote_to_incident` | **{check-circle}** Yes | **{dotted-circle}** No | **{dotted-circle}** No | Promote issue to incident ([introduced in GitLab 14.5](https://gitlab.com/gitlab-org/gitlab/-/issues/296787)). |
|
||||
|
|
|
@ -270,8 +270,13 @@ search, or choose a specific group or project.
|
|||
|
||||
To search through code or other documents in a single project, you can use
|
||||
the search field on the top-right of your screen while the project page is open.
|
||||
Code search shows only the first result in the file. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/327052)
|
||||
in GitLab 14.7, you can access Git blame from any line that returned a result from the code search:
|
||||
Code search shows only the first result in the file.
|
||||
|
||||
#### Git blame from code search **(PREMIUM)**
|
||||
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/327052) in GitLab 14.7.
|
||||
|
||||
You can access Git blame from any line that returned a result from the code search:
|
||||
|
||||
![code search results](img/code_search.png)
|
||||
|
||||
|
|
|
@ -13794,6 +13794,9 @@ msgstr ""
|
|||
msgid "Environments|protected"
|
||||
msgstr ""
|
||||
|
||||
msgid "Environment|Auto stop %{time}"
|
||||
msgstr ""
|
||||
|
||||
msgid "Epic"
|
||||
msgstr ""
|
||||
|
||||
|
@ -29102,7 +29105,7 @@ msgstr ""
|
|||
msgid "Purchase more storage"
|
||||
msgstr ""
|
||||
|
||||
msgid "PurchaseStep|An error occurred in the purchase step. If the problem persists please contact support@gitlab.com."
|
||||
msgid "PurchaseStep|An error occurred in the purchase step. If the problem persists please contact support at https://support.gitlab.com."
|
||||
msgstr ""
|
||||
|
||||
msgid "Push"
|
||||
|
@ -31861,7 +31864,7 @@ msgstr ""
|
|||
msgid "SecurityOrchestration|Status"
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityOrchestration|The %{scanners} %{severities} in an open merge request targeting the %{branches}."
|
||||
msgid "SecurityOrchestration|The %{scanners} %{severities} in an open merge request targeting %{branches}."
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityOrchestration|There was a problem creating the new security policy"
|
||||
|
@ -31885,6 +31888,9 @@ msgstr ""
|
|||
msgid "SecurityOrchestration|a"
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityOrchestration|all branches"
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityOrchestration|an"
|
||||
msgstr ""
|
||||
|
||||
|
@ -31912,6 +31918,9 @@ msgstr ""
|
|||
msgid "SecurityOrchestration|scanners find"
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityOrchestration|the %{branches}"
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityOrchestration|user with id"
|
||||
msgstr ""
|
||||
|
||||
|
@ -33106,7 +33115,7 @@ msgstr ""
|
|||
msgid "Showing data for group '%{group_name}' from Nov 1, 2019 to Dec 31, 2019"
|
||||
msgstr ""
|
||||
|
||||
msgid "Showing data for workflow items created in this date range. Date range cannot exceed %{maxDateRange} days."
|
||||
msgid "Showing data for workflow items created in this date range. Date range limited to %{maxDateRange} days."
|
||||
msgstr ""
|
||||
|
||||
msgid "Showing graphs based on events of the last %{timerange} days."
|
||||
|
@ -41056,6 +41065,9 @@ msgstr ""
|
|||
msgid "You do not have permission to leave this %{namespaceType}."
|
||||
msgstr ""
|
||||
|
||||
msgid "You do not have permission to run a pipeline on this branch."
|
||||
msgstr ""
|
||||
|
||||
msgid "You do not have permission to run the Web Terminal. Please contact a project administrator."
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import { GlDaterangePicker } from '@gitlab/ui';
|
||||
import { mount } from '@vue/test-utils';
|
||||
import { nextTick } from 'vue';
|
||||
import { GlDaterangePicker, GlSprintf } from '@gitlab/ui';
|
||||
import { shallowMount, mount } from '@vue/test-utils';
|
||||
import { useFakeDate } from 'helpers/fake_date';
|
||||
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
|
||||
import Daterange from '~/analytics/shared/components/daterange.vue';
|
||||
|
||||
const defaultProps = {
|
||||
|
@ -15,13 +13,13 @@ describe('Daterange component', () => {
|
|||
|
||||
let wrapper;
|
||||
|
||||
const factory = (props = defaultProps) => {
|
||||
wrapper = mount(Daterange, {
|
||||
const factory = (props = defaultProps, mountFn = shallowMount) => {
|
||||
wrapper = mountFn(Daterange, {
|
||||
propsData: {
|
||||
...defaultProps,
|
||||
...props,
|
||||
},
|
||||
directives: { GlTooltip: createMockDirective() },
|
||||
stubs: { GlSprintf },
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -29,9 +27,8 @@ describe('Daterange component', () => {
|
|||
wrapper.destroy();
|
||||
});
|
||||
|
||||
const findDaterangePicker = () => wrapper.find(GlDaterangePicker);
|
||||
|
||||
const findDateRangeIndicator = () => wrapper.find('.daterange-indicator');
|
||||
const findDaterangePicker = () => wrapper.findComponent(GlDaterangePicker);
|
||||
const findDateRangeIndicator = () => wrapper.findComponent(GlSprintf);
|
||||
|
||||
describe('template', () => {
|
||||
describe('when show is false', () => {
|
||||
|
@ -44,6 +41,7 @@ describe('Daterange component', () => {
|
|||
describe('when show is true', () => {
|
||||
it('renders the daterange picker', () => {
|
||||
factory({ show: true });
|
||||
|
||||
expect(findDaterangePicker().exists()).toBe(true);
|
||||
});
|
||||
});
|
||||
|
@ -54,14 +52,12 @@ describe('Daterange component', () => {
|
|||
const endDate = new Date('2019-09-30');
|
||||
const minDate = new Date('2019-06-01');
|
||||
|
||||
factory({ show: true, startDate, endDate, minDate });
|
||||
|
||||
factory({ show: true, startDate, endDate, minDate }, mount);
|
||||
const input = findDaterangePicker().find('input');
|
||||
|
||||
input.setValue('2019-01-01');
|
||||
input.trigger('change');
|
||||
await input.trigger('change');
|
||||
|
||||
await nextTick();
|
||||
expect(wrapper.emitted().change).toEqual([[{ startDate: minDate, endDate }]]);
|
||||
});
|
||||
});
|
||||
|
@ -76,16 +72,13 @@ describe('Daterange component', () => {
|
|||
});
|
||||
|
||||
it('displays the correct number of selected days in the indicator', () => {
|
||||
expect(findDateRangeIndicator().find('span').text()).toBe('10 days selected');
|
||||
expect(findDateRangeIndicator().text()).toMatchInterpolatedText('10 days selected');
|
||||
});
|
||||
|
||||
it('displays a tooltip', () => {
|
||||
const icon = wrapper.find('[data-testid="helper-icon"]');
|
||||
const tooltip = getBinding(icon.element, 'gl-tooltip');
|
||||
|
||||
expect(tooltip).toBeDefined();
|
||||
expect(icon.attributes('title')).toBe(
|
||||
'Showing data for workflow items created in this date range. Date range cannot exceed 30 days.',
|
||||
it('sets the tooltip', () => {
|
||||
const tooltip = findDaterangePicker().props('tooltip');
|
||||
expect(tooltip).toBe(
|
||||
'Showing data for workflow items created in this date range. Date range limited to 30 days.',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -7,6 +7,8 @@ import { extendedWrapper } from 'helpers/vue_test_utils_helper';
|
|||
import waitForPromises from 'helpers/wait_for_promises';
|
||||
import Api from '~/api';
|
||||
import PipelinesTable from '~/commit/pipelines/pipelines_table.vue';
|
||||
import httpStatusCodes from '~/lib/utils/http_status';
|
||||
import createFlash from '~/flash';
|
||||
import { TOAST_MESSAGE } from '~/pipelines/constants';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
|
||||
|
@ -14,6 +16,8 @@ const $toast = {
|
|||
show: jest.fn(),
|
||||
};
|
||||
|
||||
jest.mock('~/flash');
|
||||
|
||||
describe('Pipelines table in Commits and Merge requests', () => {
|
||||
let wrapper;
|
||||
let pipeline;
|
||||
|
@ -184,36 +188,61 @@ describe('Pipelines table in Commits and Merge requests', () => {
|
|||
mergeRequestId: 3,
|
||||
});
|
||||
|
||||
jest.spyOn(Api, 'postMergeRequestPipeline').mockReturnValue(Promise.resolve());
|
||||
|
||||
await waitForPromises();
|
||||
});
|
||||
describe('success', () => {
|
||||
beforeEach(() => {
|
||||
jest.spyOn(Api, 'postMergeRequestPipeline').mockReturnValue(Promise.resolve());
|
||||
});
|
||||
it('displays a toast message during pipeline creation', async () => {
|
||||
await findRunPipelineBtn().trigger('click');
|
||||
|
||||
it('displays a toast message during pipeline creation', async () => {
|
||||
await findRunPipelineBtn().trigger('click');
|
||||
expect($toast.show).toHaveBeenCalledWith(TOAST_MESSAGE);
|
||||
});
|
||||
|
||||
expect($toast.show).toHaveBeenCalledWith(TOAST_MESSAGE);
|
||||
it('on desktop, shows a loading button', async () => {
|
||||
await findRunPipelineBtn().trigger('click');
|
||||
|
||||
expect(findRunPipelineBtn().props('loading')).toBe(true);
|
||||
|
||||
await waitForPromises();
|
||||
|
||||
expect(findRunPipelineBtn().props('loading')).toBe(false);
|
||||
});
|
||||
|
||||
it('on mobile, shows a loading button', async () => {
|
||||
await findRunPipelineBtnMobile().trigger('click');
|
||||
|
||||
expect(findRunPipelineBtn().props('loading')).toBe(true);
|
||||
|
||||
await waitForPromises();
|
||||
|
||||
expect(findRunPipelineBtn().props('disabled')).toBe(false);
|
||||
expect(findRunPipelineBtn().props('loading')).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
it('on desktop, shows a loading button', async () => {
|
||||
await findRunPipelineBtn().trigger('click');
|
||||
describe('failure', () => {
|
||||
const permissionsMsg = 'You do not have permission to run a pipeline on this branch.';
|
||||
|
||||
expect(findRunPipelineBtn().props('loading')).toBe(true);
|
||||
it.each`
|
||||
status | message
|
||||
${httpStatusCodes.BAD_REQUEST} | ${permissionsMsg}
|
||||
${httpStatusCodes.UNAUTHORIZED} | ${permissionsMsg}
|
||||
${httpStatusCodes.INTERNAL_SERVER_ERROR} | ${'An error occurred while trying to run a new pipeline for this merge request.'}
|
||||
`('displays permissions error message', async ({ status, message }) => {
|
||||
const response = { response: { status } };
|
||||
|
||||
await waitForPromises();
|
||||
jest
|
||||
.spyOn(Api, 'postMergeRequestPipeline')
|
||||
.mockImplementation(() => Promise.reject(response));
|
||||
|
||||
expect(findRunPipelineBtn().props('loading')).toBe(false);
|
||||
});
|
||||
await findRunPipelineBtn().trigger('click');
|
||||
|
||||
it('on mobile, shows a loading button', async () => {
|
||||
await findRunPipelineBtnMobile().trigger('click');
|
||||
await waitForPromises();
|
||||
|
||||
expect(findRunPipelineBtn().props('loading')).toBe(true);
|
||||
|
||||
await waitForPromises();
|
||||
|
||||
expect(findRunPipelineBtn().props('disabled')).toBe(false);
|
||||
expect(findRunPipelineBtn().props('loading')).toBe(false);
|
||||
expect(createFlash).toHaveBeenCalledWith({ message });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -4,7 +4,8 @@ import { GlCollapse, GlIcon } from '@gitlab/ui';
|
|||
import createMockApollo from 'helpers/mock_apollo_helper';
|
||||
import { mountExtended, extendedWrapper } from 'helpers/vue_test_utils_helper';
|
||||
import { stubTransition } from 'helpers/stub_transition';
|
||||
import { __, s__ } from '~/locale';
|
||||
import { formatDate, getTimeago } from '~/lib/utils/datetime_utility';
|
||||
import { __, s__, sprintf } from '~/locale';
|
||||
import EnvironmentItem from '~/environments/components/new_environment_item.vue';
|
||||
import Deployment from '~/environments/components/deployment.vue';
|
||||
import { resolvedEnvironment } from './graphql/mock_data';
|
||||
|
@ -173,25 +174,92 @@ describe('~/environments/components/new_environment_item.vue', () => {
|
|||
});
|
||||
|
||||
describe('pin', () => {
|
||||
it('shows the option to pin the environment if there is an autostop date', () => {
|
||||
wrapper = createWrapper({
|
||||
propsData: {
|
||||
environment: { ...resolvedEnvironment, autoStopAt: new Date(Date.now() + 100000) },
|
||||
},
|
||||
apolloProvider: createApolloProvider(),
|
||||
describe('with autostop', () => {
|
||||
let environment;
|
||||
|
||||
beforeEach(() => {
|
||||
environment = {
|
||||
...resolvedEnvironment,
|
||||
autoStopAt: new Date(Date.now() + 100000).toString(),
|
||||
};
|
||||
wrapper = createWrapper({
|
||||
propsData: {
|
||||
environment,
|
||||
},
|
||||
apolloProvider: createApolloProvider(),
|
||||
});
|
||||
});
|
||||
|
||||
const rollback = wrapper.findByRole('menuitem', { name: __('Prevent auto-stopping') });
|
||||
it('shows the option to pin the environment if there is an autostop date', () => {
|
||||
const rollback = wrapper.findByRole('menuitem', { name: __('Prevent auto-stopping') });
|
||||
|
||||
expect(rollback.exists()).toBe(true);
|
||||
expect(rollback.exists()).toBe(true);
|
||||
});
|
||||
|
||||
it('shows when the environment auto stops', () => {
|
||||
const autoStop = wrapper.findByTitle(formatDate(environment.autoStopAt));
|
||||
|
||||
expect(autoStop.text()).toBe('in 1 minute');
|
||||
});
|
||||
});
|
||||
|
||||
it('does not show the option to pin the environment if there is no autostop date', () => {
|
||||
wrapper = createWrapper({ apolloProvider: createApolloProvider() });
|
||||
describe('without autostop', () => {
|
||||
beforeEach(() => {
|
||||
wrapper = createWrapper({ apolloProvider: createApolloProvider() });
|
||||
});
|
||||
|
||||
const rollback = wrapper.findByRole('menuitem', { name: __('Prevent auto-stopping') });
|
||||
it('does not show the option to pin the environment if there is no autostop date', () => {
|
||||
wrapper = createWrapper({ apolloProvider: createApolloProvider() });
|
||||
|
||||
expect(rollback.exists()).toBe(false);
|
||||
const rollback = wrapper.findByRole('menuitem', { name: __('Prevent auto-stopping') });
|
||||
|
||||
expect(rollback.exists()).toBe(false);
|
||||
});
|
||||
|
||||
it('does not show when the environment auto stops', () => {
|
||||
const autoStop = wrapper.findByText(
|
||||
sprintf(s__('Environment|Auto stop %{time}'), {
|
||||
time: getTimeago().format(resolvedEnvironment.autoStopAt),
|
||||
}),
|
||||
);
|
||||
|
||||
expect(autoStop.exists()).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('with past autostop', () => {
|
||||
let environment;
|
||||
|
||||
beforeEach(() => {
|
||||
environment = {
|
||||
...resolvedEnvironment,
|
||||
autoStopAt: new Date(Date.now() - 100000).toString(),
|
||||
};
|
||||
wrapper = createWrapper({
|
||||
propsData: {
|
||||
environment,
|
||||
},
|
||||
apolloProvider: createApolloProvider(),
|
||||
});
|
||||
});
|
||||
|
||||
it('does not show the option to pin the environment if there is no autostop date', () => {
|
||||
wrapper = createWrapper({ apolloProvider: createApolloProvider() });
|
||||
|
||||
const rollback = wrapper.findByRole('menuitem', { name: __('Prevent auto-stopping') });
|
||||
|
||||
expect(rollback.exists()).toBe(false);
|
||||
});
|
||||
|
||||
it('does not show when the environment auto stops', () => {
|
||||
const autoStop = wrapper.findByText(
|
||||
sprintf(s__('Environment|Auto stop %{time}'), {
|
||||
time: getTimeago().format(environment.autoStopAt),
|
||||
}),
|
||||
);
|
||||
|
||||
expect(autoStop.exists()).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -3,28 +3,12 @@
|
|||
require 'spec_helper'
|
||||
|
||||
RSpec.describe 'cross-database foreign keys' do
|
||||
# TODO: We are trying to empty out this list in
|
||||
# https://gitlab.com/groups/gitlab-org/-/epics/7249 . Once we are done we can
|
||||
# keep this test and assert that there are no cross-db foreign keys. We
|
||||
# should not be adding anything to this list but should instead only add new
|
||||
# loose foreign keys
|
||||
# https://docs.gitlab.com/ee/development/database/loose_foreign_keys.html .
|
||||
# Since we don't expect to have any cross-database foreign keys
|
||||
# this is empty. If we will have an entry like
|
||||
# `ci_daily_build_group_report_results.project_id`
|
||||
# should be added.
|
||||
let(:allowed_cross_database_foreign_keys) do
|
||||
%w(
|
||||
ci_build_report_results.project_id
|
||||
ci_daily_build_group_report_results.group_id
|
||||
ci_daily_build_group_report_results.project_id
|
||||
ci_freeze_periods.project_id
|
||||
ci_job_token_project_scope_links.added_by_id
|
||||
ci_pending_builds.namespace_id
|
||||
ci_pending_builds.project_id
|
||||
ci_pipeline_schedules.owner_id
|
||||
ci_resource_groups.project_id
|
||||
ci_runner_namespaces.namespace_id
|
||||
ci_running_builds.project_id
|
||||
ci_stages.project_id
|
||||
ci_unit_tests.project_id
|
||||
).freeze
|
||||
%w[].freeze
|
||||
end
|
||||
|
||||
def foreign_keys_for(table_name)
|
||||
|
|
Loading…
Reference in New Issue