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:
-rw-r--r--.eslintrc.yml5
-rw-r--r--.rubocop_todo/style/open_struct_use.yml2
-rw-r--r--GITALY_SERVER_VERSION2
-rw-r--r--app/assets/stylesheets/pages/issues.scss2
-rw-r--r--db/migrate/20220118015633_add_url_text_to_issuable_metric_images.rb10
-rw-r--r--db/migrate/20220118020026_add_url_text_limit_to_issuable_metric_images.rb13
-rw-r--r--db/schema_migrations/202201180156331
-rw-r--r--db/schema_migrations/202201180200261
-rw-r--r--db/structure.sql2
-rw-r--r--doc/api/issues.md39
-rw-r--r--doc/ci/environments/index.md8
-rw-r--r--doc/ci/jobs/job_control.md9
-rw-r--r--doc/ci/yaml/index.md2
-rw-r--r--doc/user/profile/account/delete_account.md25
-rw-r--r--doc/user/project/issues/related_issues.md11
-rw-r--r--lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml2
-rw-r--r--package.json2
-rw-r--r--spec/frontend/ide/components/preview/clientside_spec.js2
-rw-r--r--spec/models/design_management/design_action_spec.rb4
-rw-r--r--spec/models/design_management/design_at_version_spec.rb2
-rw-r--r--yarn.lock7
21 files changed, 123 insertions, 28 deletions
diff --git a/.eslintrc.yml b/.eslintrc.yml
index e80b2e6d9eb..17459804a7d 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -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/**/*'
diff --git a/.rubocop_todo/style/open_struct_use.yml b/.rubocop_todo/style/open_struct_use.yml
index 31485f51722..4f7faa8f484 100644
--- a/.rubocop_todo/style/open_struct_use.yml
+++ b/.rubocop_todo/style/open_struct_use.yml
@@ -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
diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION
index e5ae5401425..8b63c5b3f5a 100644
--- a/GITALY_SERVER_VERSION
+++ b/GITALY_SERVER_VERSION
@@ -1 +1 @@
-eea10ee3cb10380821d9ea095a1e247a1801fda7
+4b380e760d37508a2dc3c8e6a8fe1cfaae846916
diff --git a/app/assets/stylesheets/pages/issues.scss b/app/assets/stylesheets/pages/issues.scss
index 6411d5e1000..9bb4c5357e7 100644
--- a/app/assets/stylesheets/pages/issues.scss
+++ b/app/assets/stylesheets/pages/issues.scss
@@ -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;
}
diff --git a/db/migrate/20220118015633_add_url_text_to_issuable_metric_images.rb b/db/migrate/20220118015633_add_url_text_to_issuable_metric_images.rb
new file mode 100644
index 00000000000..55d820c1256
--- /dev/null
+++ b/db/migrate/20220118015633_add_url_text_to_issuable_metric_images.rb
@@ -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
diff --git a/db/migrate/20220118020026_add_url_text_limit_to_issuable_metric_images.rb b/db/migrate/20220118020026_add_url_text_limit_to_issuable_metric_images.rb
new file mode 100644
index 00000000000..2f0f27681cd
--- /dev/null
+++ b/db/migrate/20220118020026_add_url_text_limit_to_issuable_metric_images.rb
@@ -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
diff --git a/db/schema_migrations/20220118015633 b/db/schema_migrations/20220118015633
new file mode 100644
index 00000000000..8ba4a376bcd
--- /dev/null
+++ b/db/schema_migrations/20220118015633
@@ -0,0 +1 @@
+6a73f49306de7c799a39afa3ac1f761840860833a96f1a91cf992c9a3ebfef9b \ No newline at end of file
diff --git a/db/schema_migrations/20220118020026 b/db/schema_migrations/20220118020026
new file mode 100644
index 00000000000..fe9dcccbc0c
--- /dev/null
+++ b/db/schema_migrations/20220118020026
@@ -0,0 +1 @@
+77374c81456f235d3afeb45cdda14552e1ef8047de5aaa3f5bb0a82e4aebe849 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 1b19fa728a2..14da63d4b94 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -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))
);
diff --git a/doc/api/issues.md b/doc/api/issues.md
index 40ae6a3cd8c..5801f072062 100644
--- a/doc/api/issues.md
+++ b/doc/api/issues.md
@@ -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.
diff --git a/doc/ci/environments/index.md b/doc/ci/environments/index.md
index 9db8774a122..a499714218d 100644
--- a/doc/ci/environments/index.md
+++ b/doc/ci/environments/index.md
@@ -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.
diff --git a/doc/ci/jobs/job_control.md b/doc/ci/jobs/job_control.md
index 051c9935921..0423ada4b72 100644
--- a/doc/ci/jobs/job_control.md
+++ b/doc/ci/jobs/job_control.md
@@ -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:
diff --git a/doc/ci/yaml/index.md b/doc/ci/yaml/index.md
index 82562ee588e..fc39c984964 100644
--- a/doc/ci/yaml/index.md
+++ b/doc/ci/yaml/index.md
@@ -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`
diff --git a/doc/user/profile/account/delete_account.md b/doc/user/profile/account/delete_account.md
index 3d8d66f5a98..1a938574c9f 100644
--- a/doc/user/profile/account/delete_account.md
+++ b/doc/user/profile/account/delete_account.md
@@ -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.
diff --git a/doc/user/project/issues/related_issues.md b/doc/user/project/issues/related_issues.md
index 8a2a104c54d..ad39ec03cd2 100644
--- a/doc/user/project/issues/related_issues.md
+++ b/doc/user/project/issues/related_issues.md
@@ -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)**
diff --git a/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml b/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml
index 973db26bf2d..46756348e9d 100644
--- a/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml
@@ -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}"
diff --git a/package.json b/package.json
index ac61ab482b7..f8943cf35f6 100644
--- a/package.json
+++ b/package.json
@@ -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",
diff --git a/spec/frontend/ide/components/preview/clientside_spec.js b/spec/frontend/ide/components/preview/clientside_spec.js
index d6df061ad04..e253c4de4b2 100644
--- a/spec/frontend/ide/components/preview/clientside_spec.js
+++ b/spec/frontend/ide/components/preview/clientside_spec.js
@@ -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(),
diff --git a/spec/models/design_management/design_action_spec.rb b/spec/models/design_management/design_action_spec.rb
index 958b1dd9124..4d60ef77025 100644
--- a/spec/models/design_management/design_action_spec.rb
+++ b/spec/models/design_management/design_action_spec.rb
@@ -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) }
diff --git a/spec/models/design_management/design_at_version_spec.rb b/spec/models/design_management/design_at_version_spec.rb
index a7cf6a9652b..7f1fe7b1e13 100644
--- a/spec/models/design_management/design_at_version_spec.rb
+++ b/spec/models/design_management/design_at_version_spec.rb
@@ -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
diff --git a/yarn.lock b/yarn.lock
index 558362f2d93..98e9db70b62 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -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"