Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-20 06:08:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-20 06:08:24 +0300
commitda87ccca5c1e2cdb077702fcb63884d652179c2f (patch)
tree69daae8b0c5541c50c9b98c166298074f83f2741
parent81377eafe174ecc408597fbb3578ea127952190e (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/assets/javascripts/work_items/components/work_item_links/work_item_link_child.vue12
-rw-r--r--app/assets/javascripts/work_items/components/work_item_links/work_item_link_child_metadata.vue39
-rw-r--r--app/assets/javascripts/work_items/graphql/work_item_metadata_widgets.fragment.graphql4
-rw-r--r--app/assets/stylesheets/utilities.scss6
-rw-r--r--doc/administration/job_artifacts.md3
-rw-r--r--doc/administration/lfs/index.md4
-rw-r--r--doc/administration/merge_request_diffs.md3
-rw-r--r--doc/administration/object_storage.md2
-rw-r--r--doc/administration/packages/dependency_proxy.md9
-rw-r--r--doc/administration/pages/index.md4
-rw-r--r--doc/administration/terraform_state.md4
-rw-r--r--doc/administration/uploads.md10
-rw-r--r--doc/ci/yaml/index.md10
-rw-r--r--lib/gitlab/ci/config/entry/trigger.rb2
-rw-r--r--spec/frontend/work_items/components/work_item_links/work_item_link_child_metadata_spec.js15
-rw-r--r--spec/frontend/work_items/components/work_item_links/work_item_link_child_spec.js1
-rw-r--r--spec/frontend/work_items/mock_data.js5
-rw-r--r--spec/lib/gitlab/ci/config/entry/trigger_spec.rb44
18 files changed, 90 insertions, 87 deletions
diff --git a/app/assets/javascripts/work_items/components/work_item_links/work_item_link_child.vue b/app/assets/javascripts/work_items/components/work_item_links/work_item_link_child.vue
index 14d2512ffc8..763f2f338a3 100644
--- a/app/assets/javascripts/work_items/components/work_item_links/work_item_link_child.vue
+++ b/app/assets/javascripts/work_items/components/work_item_links/work_item_link_child.vue
@@ -10,7 +10,6 @@ import {
STATE_OPEN,
TASK_TYPE_NAME,
WORK_ITEM_TYPE_VALUE_OBJECTIVE,
- WIDGET_TYPE_PROGRESS,
WIDGET_TYPE_MILESTONE,
WIDGET_TYPE_HIERARCHY,
WIDGET_TYPE_ASSIGNEES,
@@ -114,15 +113,7 @@ export default {
return this.isExpanded ? __('Collapse') : __('Expand');
},
hasMetadata() {
- return (
- this.progress !== undefined ||
- this.milestone !== undefined ||
- this.assignees.length > 0 ||
- this.labels.length > 0
- );
- },
- progress() {
- return this.getWidgetByType(this.childItem, WIDGET_TYPE_PROGRESS)?.progress;
+ return this.milestone || this.assignees.length > 0 || this.labels.length > 0;
},
milestone() {
return this.getWidgetByType(this.childItem, WIDGET_TYPE_MILESTONE)?.milestone;
@@ -240,7 +231,6 @@ export default {
<work-item-link-child-metadata
v-if="hasMetadata"
:allows-scoped-labels="allowsScopedLabels"
- :progress="progress"
:milestone="milestone"
:assignees="assignees"
:labels="labels"
diff --git a/app/assets/javascripts/work_items/components/work_item_links/work_item_link_child_metadata.vue b/app/assets/javascripts/work_items/components/work_item_links/work_item_link_child_metadata.vue
index a7660dc4f25..7be7e1f3496 100644
--- a/app/assets/javascripts/work_items/components/work_item_links/work_item_link_child_metadata.vue
+++ b/app/assets/javascripts/work_items/components/work_item_links/work_item_link_child_metadata.vue
@@ -1,12 +1,5 @@
<script>
-import {
- GlIcon,
- GlLabel,
- GlAvatar,
- GlAvatarLink,
- GlAvatarsInline,
- GlTooltipDirective,
-} from '@gitlab/ui';
+import { GlLabel, GlAvatar, GlAvatarLink, GlAvatarsInline, GlTooltipDirective } from '@gitlab/ui';
import { s__, sprintf } from '~/locale';
import { isScopedLabel } from '~/lib/utils/common_utils';
@@ -15,7 +8,6 @@ import ItemMilestone from '~/issuable/components/issue_milestone.vue';
export default {
components: {
- GlIcon,
GlLabel,
GlAvatar,
GlAvatarLink,
@@ -31,11 +23,6 @@ export default {
required: false,
default: false,
},
- progress: {
- type: Number,
- required: false,
- default: 0,
- },
milestone: {
type: Object,
required: false,
@@ -53,9 +40,6 @@ export default {
},
},
computed: {
- hasProgress() {
- return !(this.progress === null || this.progress === undefined);
- },
assigneesCollapsedTooltip() {
if (this.assignees.length > 2) {
return sprintf(s__('WorkItem|%{count} more assignees'), {
@@ -72,6 +56,12 @@ export default {
}
return '';
},
+ labelsContainerClass() {
+ if (this.milestone || this.assignees.length) {
+ return 'gl-sm-ml-5';
+ }
+ return '';
+ },
},
methods: {
showScopedLabel(label) {
@@ -83,16 +73,6 @@ export default {
<template>
<div class="gl-display-flex gl-flex-wrap gl-align-items-center">
- <div
- v-if="hasProgress"
- v-gl-tooltip.bottom
- :title="__('Progress')"
- class="gl-display-flex gl-align-items-center gl-mr-5 gl-cursor-help gl-line-height-normal"
- data-testid="item-progress"
- >
- <gl-icon name="progress" />
- <span class="gl-text-primary gl-ml-2">{{ progress }}%</span>
- </div>
<item-milestone
v-if="milestone"
:milestone="milestone"
@@ -107,7 +87,6 @@ export default {
badge-tooltip-prop="name"
:badge-sr-only-text="assigneesCollapsedTooltip"
:class="assigneesContainerClass"
- class="gl-mr-5"
>
<template #avatar="{ avatar }">
<gl-avatar-link v-gl-tooltip target="blank" :href="avatar.webUrl" :title="avatar.name">
@@ -115,7 +94,7 @@ export default {
</gl-avatar-link>
</template>
</gl-avatars-inline>
- <div v-if="labels.length" class="gl-display-flex gl-flex-wrap">
+ <div v-if="labels.length" class="gl-display-flex gl-flex-wrap" :class="labelsContainerClass">
<gl-label
v-for="label in labels"
:key="label.id"
@@ -123,7 +102,7 @@ export default {
:background-color="label.color"
:description="label.description"
:scoped="showScopedLabel(label)"
- class="gl-mt-3 gl-sm-mt-0 gl-mr-2 gl-mb-auto gl-label-sm"
+ class="gl-mt-2 gl-sm-mt-0 gl-mr-2 gl-mb-auto gl-label-sm"
tooltip-placement="top"
/>
</div>
diff --git a/app/assets/javascripts/work_items/graphql/work_item_metadata_widgets.fragment.graphql b/app/assets/javascripts/work_items/graphql/work_item_metadata_widgets.fragment.graphql
index 6e2acba5b92..baefcdaea93 100644
--- a/app/assets/javascripts/work_items/graphql/work_item_metadata_widgets.fragment.graphql
+++ b/app/assets/javascripts/work_items/graphql/work_item_metadata_widgets.fragment.graphql
@@ -3,10 +3,6 @@
#import "~/work_items/graphql/milestone.fragment.graphql"
fragment WorkItemMetadataWidgets on WorkItemWidget {
- ... on WorkItemWidgetProgress {
- type
- progress
- }
... on WorkItemWidgetMilestone {
type
milestone {
diff --git a/app/assets/stylesheets/utilities.scss b/app/assets/stylesheets/utilities.scss
index 3f1f7fbfb7e..714dd932147 100644
--- a/app/assets/stylesheets/utilities.scss
+++ b/app/assets/stylesheets/utilities.scss
@@ -236,6 +236,12 @@ to @gitlab/ui by https://gitlab.com/gitlab-org/gitlab-ui/-/issues/1709
}
}
+// TODO: Remove once https: //gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/3198 is merged
+.gl-sm-ml-5 {
+ @include gl-media-breakpoint-up(sm) {
+ @include gl-ml-5;
+ }
+}
/* End gitlab-ui#1709 */
diff --git a/doc/administration/job_artifacts.md b/doc/administration/job_artifacts.md
index c5d98f95c68..fb2f73876e8 100644
--- a/doc/administration/job_artifacts.md
+++ b/doc/administration/job_artifacts.md
@@ -100,8 +100,7 @@ In a multi-server setup you must use one of the options to
#### Object Storage Settings
-NOTE:
-In GitLab 13.2 and later, we recommend using the
+In GitLab 13.2 and later, you should use the
[consolidated object storage settings](object_storage.md#consolidated-object-storage-configuration).
This section describes the earlier configuration format.
diff --git a/doc/administration/lfs/index.md b/doc/administration/lfs/index.md
index 4075f15bbbd..cf80b05a5e0 100644
--- a/doc/administration/lfs/index.md
+++ b/doc/administration/lfs/index.md
@@ -66,9 +66,9 @@ You can also use external object storage in a private local network. For example
[Read more about using object storage with GitLab](../object_storage.md).
NOTE:
-In GitLab 13.2 and later, we recommend using the
+In GitLab 13.2 and later, you should use the
[consolidated object storage settings](../object_storage.md#consolidated-object-storage-configuration).
-This section describes the earlier configuration format.
+This section describes the earlier configuration format. [Migration steps still apply](#migrating-to-object-storage).
1. User pushes an `lfs` file to the GitLab instance.
1. GitLab-workhorse uploads the file directly to the external object storage.
diff --git a/doc/administration/merge_request_diffs.md b/doc/administration/merge_request_diffs.md
index 4dec9e52c19..25dba00beb9 100644
--- a/doc/administration/merge_request_diffs.md
+++ b/doc/administration/merge_request_diffs.md
@@ -104,8 +104,7 @@ be configured already.
### Object Storage Settings
-NOTE:
-In GitLab 13.2 and later, we recommend using the
+In GitLab 13.2 and later, you should use the
[consolidated object storage settings](object_storage.md#consolidated-object-storage-configuration).
This section describes the earlier configuration format.
diff --git a/doc/administration/object_storage.md b/doc/administration/object_storage.md
index b304aaa3adc..0cae46faf28 100644
--- a/doc/administration/object_storage.md
+++ b/doc/administration/object_storage.md
@@ -536,7 +536,7 @@ supported by consolidated configuration form, refer to the following guides:
| [Uploads](uploads.md#using-object-storage) | **{check-circle}** Yes |
| [Container Registry](packages/container_registry.md#use-object-storage) (optional feature) | **{dotted-circle}** No |
| [Merge request diffs](merge_request_diffs.md#using-object-storage) | **{check-circle}** Yes |
-| [Mattermost](https://docs.mattermost.com/administration/config-settings.html#file-storage)| **{dotted-circle}** No |
+| [Mattermost](https://docs.mattermost.com/configure/file-storage-configuration-settings.html)| **{dotted-circle}** No |
| [Packages](packages/index.md#use-object-storage) (optional feature) | **{check-circle}** Yes |
| [Dependency Proxy](packages/dependency_proxy.md#using-object-storage) (optional feature) | **{check-circle}** Yes |
| [Autoscale runner caching](https://docs.gitlab.com/runner/configuration/autoscale.html#distributed-runners-caching) (optional for improved performance) | **{dotted-circle}** No |
diff --git a/doc/administration/packages/dependency_proxy.md b/doc/administration/packages/dependency_proxy.md
index f6eb6f85274..78efd75bbe3 100644
--- a/doc/administration/packages/dependency_proxy.md
+++ b/doc/administration/packages/dependency_proxy.md
@@ -121,15 +121,12 @@ To change the local storage path:
### Using object storage
Instead of relying on the local storage, you can use an object storage to
-store the blobs of the Dependency Proxy.
+store the blobs of the Dependency Proxy. In GitLab 13.2 and later, you should use the
+[consolidated object storage settings](../object_storage.md#consolidated-object-storage-configuration).
+This section describes the earlier configuration format. [Migration steps still apply](#migrate-local-dependency-proxy-blobs-and-manifests-to-object-storage).
[Read more about using object storage with GitLab](../object_storage.md).
-NOTE:
-In GitLab 13.2 and later, we recommend using the
-[consolidated object storage settings](../object_storage.md#consolidated-object-storage-configuration).
-This section describes the earlier configuration format.
-
**Omnibus GitLab installations**
1. Edit `/etc/gitlab/gitlab.rb` and add the following lines (uncomment where
diff --git a/doc/administration/pages/index.md b/doc/administration/pages/index.md
index 5749afded13..2a28df96ef4 100644
--- a/doc/administration/pages/index.md
+++ b/doc/administration/pages/index.md
@@ -941,6 +941,10 @@ If you want to stop using and disconnect the NFS server, you need to
#### S3-compatible connection settings
+In GitLab 13.2 and later, you should use the
+[consolidated object storage settings](../object_storage.md#consolidated-object-storage-configuration).
+This section describes the earlier configuration format.
+
See [the available connection settings for different providers](../object_storage.md#connection-settings).
In Omnibus installations:
diff --git a/doc/administration/terraform_state.md b/doc/administration/terraform_state.md
index 02a95e28747..d3b941bd129 100644
--- a/doc/administration/terraform_state.md
+++ b/doc/administration/terraform_state.md
@@ -160,6 +160,10 @@ sudo find /var/opt/gitlab/gitlab-rails/shared/terraform_state -type f | grep -v
### S3-compatible connection settings
+In GitLab 13.2 and later, you should use the
+[consolidated object storage settings](object_storage.md#consolidated-object-storage-configuration).
+This section describes the earlier configuration format.
+
See [the available connection settings for different providers](object_storage.md#connection-settings).
**In Omnibus installations:**
diff --git a/doc/administration/uploads.md b/doc/administration/uploads.md
index 13796cc9c25..ff0b8ecf178 100644
--- a/doc/administration/uploads.md
+++ b/doc/administration/uploads.md
@@ -57,10 +57,12 @@ This configuration relies on valid AWS credentials to be configured already.
[Read more about using object storage with GitLab](object_storage.md).
-You should use the [consolidated object storage settings](object_storage.md#consolidated-object-storage-configuration). The following instructions apply to the original configuration format.
-
### Object Storage Settings
+In GitLab 13.2 and later, you should use the
+[consolidated object storage settings](object_storage.md#consolidated-object-storage-configuration).
+This section describes the earlier configuration format.
+
For source installations the following settings are nested under `uploads:` and then `object_store:`. On Omnibus GitLab installs they are prefixed by `uploads_object_store_`.
| Setting | Description | Default |
@@ -104,7 +106,7 @@ _The uploads are stored by default in
```
1. Save the file and [reconfigure GitLab](restart_gitlab.md#omnibus-gitlab-reconfigure) for the changes to take effect.
-1. Migrate any existing local uploads to the object storage using [`gitlab:uploads:migrate:all` Rake task](raketasks/uploads/migrate.md).
+1. Migrate any existing local uploads to the object storage with the [`gitlab:uploads:migrate:all` Rake task](raketasks/uploads/migrate.md).
**In installations from source:**
@@ -127,4 +129,4 @@ _The uploads are stored by default in
```
1. Save the file and [restart GitLab](restart_gitlab.md#installations-from-source) for the changes to take effect.
-1. Migrate any existing local uploads to the object storage using [`gitlab:uploads:migrate:all` Rake task](raketasks/uploads/migrate.md).
+1. Migrate any existing local uploads to the object storage with the [`gitlab:uploads:migrate:all` Rake task](raketasks/uploads/migrate.md).
diff --git a/doc/ci/yaml/index.md b/doc/ci/yaml/index.md
index 072279d2dd7..dffe409b193 100644
--- a/doc/ci/yaml/index.md
+++ b/doc/ci/yaml/index.md
@@ -3747,7 +3747,7 @@ job:
### `services`
-Use `services` to specify an additional Docker image to run scripts in. The [`services` image](../services/index.md) is linked
+Use `services` to specify any additional Docker images that your scripts require to run successfully. The [`services` image](../services/index.md) is linked
to the image specified in the [`image`](#image) keyword.
**Keyword type**: Job keyword. You can use it only as part of a job or in the
@@ -3783,9 +3783,11 @@ test:
- bundle exec rake spec
```
-In this example, the job launches a Ruby container. Then, from that container, the job launches
-another container that's running PostgreSQL. Then the job then runs scripts
-in that container.
+In this example, GitLab launches two containers for the job:
+
+- A Ruby container that runs the `script` commands.
+- A PostgreSQL container. The `script` commands in the Ruby container can connect to
+ the PostgreSQL database at the `db-postgrest` hostname.
**Related topics**:
diff --git a/lib/gitlab/ci/config/entry/trigger.rb b/lib/gitlab/ci/config/entry/trigger.rb
index 0f94b3f94fe..4c254a4fa07 100644
--- a/lib/gitlab/ci/config/entry/trigger.rb
+++ b/lib/gitlab/ci/config/entry/trigger.rb
@@ -41,7 +41,7 @@ module Gitlab
validations do
validates :config, presence: true
validates :config, allowed_keys: ALLOWED_KEYS
- validates :project, presence: true
+ validates :project, type: String, presence: true
validates :branch, type: String, allow_nil: true
validates :strategy, type: String, inclusion: { in: %w[depend], message: 'should be depend' }, allow_nil: true
end
diff --git a/spec/frontend/work_items/components/work_item_links/work_item_link_child_metadata_spec.js b/spec/frontend/work_items/components/work_item_links/work_item_link_child_metadata_spec.js
index 6b3023173f5..47489d4796b 100644
--- a/spec/frontend/work_items/components/work_item_links/work_item_link_child_metadata_spec.js
+++ b/spec/frontend/work_items/components/work_item_links/work_item_link_child_metadata_spec.js
@@ -1,4 +1,4 @@
-import { GlIcon, GlLabel, GlAvatarsInline } from '@gitlab/ui';
+import { GlLabel, GlAvatarsInline } from '@gitlab/ui';
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
@@ -12,7 +12,6 @@ describe('WorkItemLinkChildMetadata', () => {
const createComponent = ({
allowsScopedLabels = true,
- progress = 10,
milestone = mockMilestone,
assignees = mockAssignees,
labels = mockLabels,
@@ -20,7 +19,6 @@ describe('WorkItemLinkChildMetadata', () => {
wrapper = shallowMountExtended(WorkItemLinkChildMetadata, {
propsData: {
allowsScopedLabels,
- progress,
milestone,
assignees,
labels,
@@ -32,16 +30,7 @@ describe('WorkItemLinkChildMetadata', () => {
createComponent();
});
- it('renders item progress', () => {
- const progressEl = wrapper.findByTestId('item-progress');
-
- expect(progressEl.exists()).toBe(true);
- expect(progressEl.attributes('title')).toBe('Progress');
- expect(progressEl.text().trim()).toBe('10%');
- expect(progressEl.findComponent(GlIcon).props('name')).toBe('progress');
- });
-
- it('renders item milestone', () => {
+ it('renders milestone link button', () => {
const milestoneLink = wrapper.findComponent(ItemMilestone);
expect(milestoneLink.exists()).toBe(true);
diff --git a/spec/frontend/work_items/components/work_item_links/work_item_link_child_spec.js b/spec/frontend/work_items/components/work_item_links/work_item_link_child_spec.js
index d8e0e80db79..73d498ad055 100644
--- a/spec/frontend/work_items/components/work_item_links/work_item_link_child_spec.js
+++ b/spec/frontend/work_items/components/work_item_links/work_item_link_child_spec.js
@@ -149,7 +149,6 @@ describe('WorkItemLinkChild', () => {
expect(metadataEl.exists()).toBe(true);
expect(metadataEl.props()).toMatchObject({
allowsScopedLabels: true,
- progress: 10,
milestone: mockMilestone,
assignees: mockAssignees,
labels: mockLabels,
diff --git a/spec/frontend/work_items/mock_data.js b/spec/frontend/work_items/mock_data.js
index e88b45a160b..f7301701dc3 100644
--- a/spec/frontend/work_items/mock_data.js
+++ b/spec/frontend/work_items/mock_data.js
@@ -969,11 +969,6 @@ export const workItemObjectiveWithChild = {
__typename: 'WorkItemWidgetHierarchy',
},
{
- type: 'PROGRESS',
- __typename: 'WorkItemWidgetProgress',
- progress: 10,
- },
- {
type: 'MILESTONE',
__typename: 'WorkItemWidgetMilestone',
milestone: mockMilestone,
diff --git a/spec/lib/gitlab/ci/config/entry/trigger_spec.rb b/spec/lib/gitlab/ci/config/entry/trigger_spec.rb
index d0116c961d7..f47923af45a 100644
--- a/spec/lib/gitlab/ci/config/entry/trigger_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/trigger_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Gitlab::Ci::Config::Entry::Trigger do
+RSpec.describe Gitlab::Ci::Config::Entry::Trigger, feature_category: :pipeline_authoring do
subject { described_class.new(config) }
context 'when trigger config is a non-empty string' do
@@ -35,6 +35,48 @@ RSpec.describe Gitlab::Ci::Config::Entry::Trigger do
end
context 'when trigger is a hash - cross-project' do
+ context 'when project is a string' do
+ context 'when project is a non-empty string' do
+ let(:config) { { project: 'some/project' } }
+
+ it 'is valid' do
+ expect(subject).to be_valid
+ end
+ end
+
+ context 'when project is an empty string' do
+ let(:config) { { project: '' } }
+
+ it 'returns error' do
+ expect(subject).not_to be_valid
+ expect(subject.errors.first)
+ .to match /project can't be blank/
+ end
+ end
+ end
+
+ context 'when project is not a string' do
+ context 'when project is an array' do
+ let(:config) { { project: ['some/project'] } }
+
+ it 'returns error' do
+ expect(subject).not_to be_valid
+ expect(subject.errors.first)
+ .to match /should be a string/
+ end
+ end
+
+ context 'when project is a boolean' do
+ let(:config) { { project: true } }
+
+ it 'returns error' do
+ expect(subject).not_to be_valid
+ expect(subject.errors.first)
+ .to match /should be a string/
+ end
+ end
+ end
+
context 'when branch is provided' do
let(:config) { { project: 'some/project', branch: 'feature' } }