Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2022-01-27 12:11:41 +00:00
parent 43511919ac
commit 115190b6cd
21 changed files with 123 additions and 28 deletions

View file

@ -95,7 +95,8 @@ rules:
order: ignore
overrides:
- files:
- '**/spec/**/*'
- 'ee/spec/frontend*/**/*'
- 'spec/frontend*/**/*'
rules:
'@gitlab/require-i18n-strings': off
'@gitlab/no-runtime-template-compiler': off
@ -103,6 +104,8 @@ overrides:
- error
- selector: CallExpression[callee.object.name=/(wrapper|vm)/][callee.property.name="setData"]
message: 'Avoid using "setData" on VTU wrapper'
- selector: MemberExpression[object.type!='ThisExpression'][property.type='Identifier'][property.name='$nextTick']
message: 'Using $nextTick from a component instance is discouraged. Import nextTick directly from the Vue package.'
- files:
- 'config/**/*'
- 'scripts/**/*'

View file

@ -30,8 +30,6 @@ Style/OpenStructUse:
- spec/lib/gitlab/gitaly_client/diff_stitcher_spec.rb
- spec/lib/gitlab/legacy_github_import/project_creator_spec.rb
- spec/lib/gitlab/quick_actions/command_definition_spec.rb
- spec/models/design_management/design_action_spec.rb
- spec/models/design_management/design_at_version_spec.rb
- spec/services/projects/import_service_spec.rb
- spec/services/system_note_service_spec.rb
- spec/support/helpers/import_spec_helper.rb

View file

@ -1 +1 @@
eea10ee3cb10380821d9ea095a1e247a1801fda7
4b380e760d37508a2dc3c8e6a8fe1cfaae846916

View file

@ -249,7 +249,9 @@ ul.related-merge-requests > li gl-emoji {
@include media-breakpoint-up(sm) {
width: calc(100% - #{$gutter-collapsed-width});
}
}
.limit-container-width {
.issue-sticky-header-text {
max-width: $limited-layout-width;
}

View file

@ -0,0 +1,10 @@
# frozen_string_literal: true
class AddUrlTextToIssuableMetricImages < Gitlab::Database::Migration[1.0]
# rubocop:disable Migration/AddLimitToTextColumns
# limit is added in 20220118020026_add_url_text_limit_to_issuable_metric_images
def change
add_column :issuable_metric_images, :url_text, :text
end
# rubocop:enable Migration/AddLimitToTextColumns
end

View file

@ -0,0 +1,13 @@
# frozen_string_literal: true
class AddUrlTextLimitToIssuableMetricImages < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
def up
add_text_limit :issuable_metric_images, :url_text, 128
end
def down
remove_text_limit :issuable_metric_images, :url_text
end
end

View file

@ -0,0 +1 @@
6a73f49306de7c799a39afa3ac1f761840860833a96f1a91cf992c9a3ebfef9b

View file

@ -0,0 +1 @@
77374c81456f235d3afeb45cdda14552e1ef8047de5aaa3f5bb0a82e4aebe849

View file

@ -15353,6 +15353,8 @@ CREATE TABLE issuable_metric_images (
file_store smallint,
file text NOT NULL,
url text,
url_text text,
CONSTRAINT check_3bc6d47661 CHECK ((char_length(url_text) <= 128)),
CONSTRAINT check_5b3011e234 CHECK ((char_length(url) <= 255)),
CONSTRAINT check_7ed527062f CHECK ((char_length(file) <= 255))
);

View file

@ -2428,10 +2428,11 @@ POST /projects/:id/issues/:issue_iid/metric_images
| `issue_iid` | integer | yes | The internal ID of a project's issue |
| `file` | file | yes | The image file to be uploaded |
| `url` | string | no | The URL to view more metric information |
| `url_text` | string | no | A description of the image or URL |
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" --form 'file=@/path/to/file.png' \
--form 'url=http://example.com' "https://gitlab.example.com/api/v4/projects/5/issues/93/metric_images"
--form 'url=http://example.com' --form 'url_text=Example website' "https://gitlab.example.com/api/v4/projects/5/issues/93/metric_images"
```
Example response:
@ -2442,7 +2443,8 @@ Example response:
"created_at": "2020-11-13T00:06:18.084Z",
"filename": "file.png",
"file_path": "/uploads/-/system/issuable_metric_image/file/23/file.png",
"url": "http://example.com"
"url": "http://example.com",
"url_text": "Example website"
}
```
@ -2484,6 +2486,39 @@ Example response:
]
```
## Update metric image
Available only for Incident issues.
```plaintext
PUT /projects/:id/issues/:issue_iid/metric_images/:image_id
```
| Attribute | Type | Required | Description |
|-------------|---------|----------|--------------------------------------|
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
| `issue_iid` | integer | yes | The internal ID of a project's issue |
| `image_id` | integer | yes | The ID of the image |
| `url` | string | no | The URL to view more metric information |
| `url_text` | string | no | A description of the image or URL |
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" --request PUT --form 'url=http://example.com' --form 'url_text=Example website' "https://gitlab.example.com/api/v4/projects/5/issues/93/metric_images/1"
```
Example response:
```json
{
"id": 23,
"created_at": "2020-11-13T00:06:18.084Z",
"filename": "file.png",
"file_path": "/uploads/-/system/issuable_metric_image/file/23/file.png",
"url": "http://example.com",
"url_text": "Example website"
}
```
## Delete metric image
Available only for Incident issues.

View file

@ -312,6 +312,14 @@ Note the following:
for these jobs. This ensures that runners can fetch the repository even after a feature branch is
deleted. For more information, see [Ref Specs for Runners](../pipelines/index.md#ref-specs-for-runners).
NOTE:
For Windows runners, using `echo` to write to `.env` files may fail. Using the PowerShell `Add-Content`command
will help in such cases. For example:
```powershell
Add-Content -Path deploy.env -Value "DYNAMIC_ENVIRONMENT_URL=$DYNAMIC_ENVIRONMENT_URL"
```
## Track newly included merge requests per deployment
GitLab can track newly included merge requests per deployment.

View file

@ -704,9 +704,12 @@ deploystacks: [gcp, data]
deploystacks: [vultr, data]
```
In [GitLab 14.1 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/239737), you can
use the variables defined in `parallel: matrix` with the [`tags`](../yaml/index.md#tags) keyword for
dynamic runner selection.
### Select different runner tags for each parallel matrix job
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/239737) in GitLab 14.1.
You can use variables defined in `parallel: matrix` with the [`tags`](../yaml/index.md#tags)
keyword for dynamic runner selection:
```yaml
deploystacks:

View file

@ -2660,6 +2660,7 @@ deploystacks: [vultr, processing]
- [Run a one-dimensional matrix of parallel jobs](../jobs/job_control.md#run-a-one-dimensional-matrix-of-parallel-jobs).
- [Run a matrix of triggered parallel jobs](../jobs/job_control.md#run-a-matrix-of-parallel-trigger-jobs).
- [Select different runner tags for each parallel matrix job](../jobs/job_control.md#select-different-runner-tags-for-each-parallel-matrix-job).
### `release`
@ -3575,6 +3576,7 @@ In this example, only runners with *both* the `ruby` and `postgres` tags can run
**Related topics**:
- [Use tags to control which jobs a runner can run](../runners/configure_runners.md#use-tags-to-control-which-jobs-a-runner-can-run).
- [Select different runner tags for each parallel matrix job](../jobs/job_control.md#select-different-runner-tags-for-each-parallel-matrix-job).
### `timeout`

View file

@ -82,14 +82,21 @@ is a sole owner of. Administrators can also request this behavior when
deleting users from the [API](../../../api/users.md#user-deletion) or the
Admin Area.
<!-- ## Troubleshooting
## Troubleshooting
Include any troubleshooting steps that you can foresee. If you know beforehand what issues
one might have when setting this up, or when something is changed, or on upgrading, it's
important to describe those, too. Think of things that may go wrong and include them here.
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
### Deleting a user results in a PostgreSQL null value error
Each scenario can be a third-level heading, e.g. `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
There is [a known issue](https://gitlab.com/gitlab-org/gitlab/-/issues/349411) that results
in users not being deleted, and the following error generated:
```plaintext
ERROR: null value in column "user_id" violates not-null constraint
```
The error can be found in the [PostgreSQL log](../../../administration/logs.md#postgresql-logs) and
in the **Retries** section of the [background jobs view](../../admin_area/index.md#background-jobs) in the Admin Area.
If the user being deleted used the [iterations](../../group/iterations/index.md) feature, such
as adding an issue to an iteration, you must use
[the workaround documented in the issue](https://gitlab.com/gitlab-org/gitlab/-/issues/349411#workaround)
to delete the user.

View file

@ -9,7 +9,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> The simple "relates to" relationship [moved](https://gitlab.com/gitlab-org/gitlab/-/issues/212329) to [GitLab Free](https://about.gitlab.com/pricing/) in 13.4.
Linked issues are a bi-directional relationship between any two issues and appear in a block below
the issue description. Issues can be across groups and projects.
the issue description. You can link issues in different projects.
The relationship only shows up in the UI if the user can see both issues. When you try to close an
issue that has open blockers, a warning is displayed.
@ -23,9 +23,14 @@ To manage linked issues through our API, visit the [issue links API documentatio
> - [Improved](https://gitlab.com/gitlab-org/gitlab/-/issues/34239) to warn when attempting to close an issue that is blocked by others in GitLab 13.0.
> When you try to close an issue with open blockers, you see a warning that you can dismiss.
1. Link one issue to another by selecting the add linked issue button (**{plus}**) in the
**Linked issues** section of an issue.
Prerequisites:
- You must have at least the Reporter [role](../../permissions.md) for both projects.
To link one issue to another:
1. In the **Linked issues** section of an issue,
select the add linked issue button (**{plus}**).
1. Select the relationship between the two issues. Either:
- **relates to**
- **blocks** **(PREMIUM)**

View file

@ -1,5 +1,5 @@
variables:
AUTO_DEPLOY_IMAGE_VERSION: 'v2.17.0'
AUTO_DEPLOY_IMAGE_VERSION: 'v2.18.1'
.auto-deploy:
image: "registry.gitlab.com/gitlab-org/cluster-integration/auto-deploy-image:${AUTO_DEPLOY_IMAGE_VERSION}"

View file

@ -126,7 +126,7 @@
"dateformat": "^5.0.1",
"deckar01-task_list": "^2.3.1",
"diff": "^3.4.0",
"dompurify": "^2.3.4",
"dompurify": "^2.3.5",
"dropzone": "^4.2.0",
"editorconfig": "^0.15.3",
"emoji-regex": "^10.0.0",

View file

@ -121,7 +121,7 @@ describe('IDE clientside preview', () => {
it('pings usage success', async () => {
dispatchCodesandboxReady();
await wrapper.vm.$nextTick();
await nextTick();
expect(storeClientsideActions.pingUsage).toHaveBeenCalledTimes(2);
expect(storeClientsideActions.pingUsage).toHaveBeenCalledWith(
expect.anything(),

View file

@ -46,7 +46,7 @@ RSpec.describe DesignManagement::DesignAction do
describe '#gitaly_action' do
let(:path) { 'some/path/somewhere' }
let(:design) { OpenStruct.new(full_path: path) }
let(:design) { double('path', full_path: path) }
subject { described_class.new(design, action, content) }
@ -75,7 +75,7 @@ RSpec.describe DesignManagement::DesignAction do
describe '#issue_id' do
let(:issue_id) { :foo }
let(:design) { OpenStruct.new(issue_id: issue_id) }
let(:design) { double('id', issue_id: issue_id) }
subject { described_class.new(design, :delete) }

View file

@ -59,7 +59,7 @@ RSpec.describe DesignManagement::DesignAtVersion do
it 'rejects objects with the same id and the wrong class' do
dav = build_stubbed(:design_at_version)
expect(dav).not_to eq(OpenStruct.new(id: dav.id))
expect(dav).not_to eq(double('id', id: dav.id))
end
it 'expects objects to be of the same type, not subtypes' do

View file

@ -4964,11 +4964,16 @@ domhandler@^4.0.0, domhandler@^4.2.0:
dependencies:
domelementtype "^2.2.0"
dompurify@2.3.4, dompurify@^2.3.4:
dompurify@2.3.4:
version "2.3.4"
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.3.4.tgz#1cf5cf0105ccb4debdf6db162525bd41e6ddacc6"
integrity sha512-6BVcgOAVFXjI0JTjEvZy901Rghm+7fDQOrNIcxB4+gdhj6Kwp6T9VBhBY/AbagKHJocRkDYGd6wvI+p4/10xtQ==
dompurify@^2.3.4, dompurify@^2.3.5:
version "2.3.5"
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.3.5.tgz#c83ed5a3ae5ce23e52efe654ea052ffb358dd7e3"
integrity sha512-kD+f8qEaa42+mjdOpKeztu9Mfx5bv9gVLO6K9jRx4uGvh6Wv06Srn4jr1wPNY2OOUGGSKHNFN+A8MA3v0E0QAQ==
domutils@^1.5.1:
version "1.7.0"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a"