summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-18 21:09:55 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-18 21:09:55 +0000
commit5d3b84924481aa7d7c67f712c547edcd8f04fe52 (patch)
tree8fe98bb4a2348867290642b03b68931b43387b90
parentf6c037b73c90ac251625c17720e6b8307c1698cc (diff)
downloadgitlab-ce-5d3b84924481aa7d7c67f712c547edcd8f04fe52.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--GITALY_SERVER_VERSION2
-rw-r--r--app/assets/javascripts/api/packages_api.js32
-rw-r--r--app/assets/javascripts/projects/commit/constants.js2
-rw-r--r--app/assets/javascripts/repository/components/upload_blob_modal.vue4
-rw-r--r--app/assets/javascripts/repository/constants.js2
-rw-r--r--app/helpers/tree_helper.rb2
-rw-r--r--doc/administration/geo/replication/datatypes.md4
-rw-r--r--doc/api/graphql/reference/index.md1
-rw-r--r--doc/user/infrastructure/clusters/index.md2
-rw-r--r--locale/gitlab.pot19
-rw-r--r--spec/features/projects/files/user_creates_files_spec.rb2
-rw-r--r--spec/frontend/api/packages_api_spec.js53
-rw-r--r--spec/frontend/repository/components/upload_blob_modal_spec.js4
13 files changed, 109 insertions, 20 deletions
diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION
index c6de3340f58..df08b18725a 100644
--- a/GITALY_SERVER_VERSION
+++ b/GITALY_SERVER_VERSION
@@ -1 +1 @@
-15bfbf4430778f416e42f931a5bf813e1a9c7fc5
+37118baf7b10c95f533230797d849d2251805236
diff --git a/app/assets/javascripts/api/packages_api.js b/app/assets/javascripts/api/packages_api.js
new file mode 100644
index 00000000000..47f51c7e80e
--- /dev/null
+++ b/app/assets/javascripts/api/packages_api.js
@@ -0,0 +1,32 @@
+import axios from '../lib/utils/axios_utils';
+import { buildApiUrl } from './api_utils';
+
+const PUBLISH_PACKAGE_PATH =
+ '/api/:version/projects/:id/packages/generic/:package_name/:package_version/:file_name';
+
+export function publishPackage(
+ { projectPath, name, version, fileName, files },
+ options,
+ axiosOptions = {},
+) {
+ const url = buildApiUrl(PUBLISH_PACKAGE_PATH)
+ .replace(':id', encodeURIComponent(projectPath))
+ .replace(':package_name', name)
+ .replace(':package_version', version)
+ .replace(':file_name', fileName);
+
+ const defaults = {
+ status: 'default',
+ };
+
+ const formData = new FormData();
+ formData.append('file', files[0]);
+
+ return axios.put(url, formData, {
+ headers: {
+ 'Content-Type': 'multipart/form-data',
+ },
+ params: Object.assign(defaults, options),
+ ...axiosOptions,
+ });
+}
diff --git a/app/assets/javascripts/projects/commit/constants.js b/app/assets/javascripts/projects/commit/constants.js
index d553bca360e..eb3673461bd 100644
--- a/app/assets/javascripts/projects/commit/constants.js
+++ b/app/assets/javascripts/projects/commit/constants.js
@@ -11,7 +11,7 @@ export const I18N_MODAL = {
'ChangeTypeAction|Your changes will be committed to %{branchName} because a merge request is open.',
),
branchInFork: s__(
- 'ChangeTypeAction|A new branch will be created in your fork and a new merge request will be started.',
+ 'ChangeTypeAction|GitLab will create a branch in your fork and start a merge request.',
),
newMergeRequest: __('new merge request'),
actionCancelText: __('Cancel'),
diff --git a/app/assets/javascripts/repository/components/upload_blob_modal.vue b/app/assets/javascripts/repository/components/upload_blob_modal.vue
index 11e5b5608cb..b56c9ce5247 100644
--- a/app/assets/javascripts/repository/components/upload_blob_modal.vue
+++ b/app/assets/javascripts/repository/components/upload_blob_modal.vue
@@ -24,10 +24,10 @@ import {
} from '../constants';
const PRIMARY_OPTIONS_TEXT = __('Upload file');
-const MODAL_TITLE = __('Upload New File');
+const MODAL_TITLE = __('Upload new file');
const REMOVE_FILE_TEXT = __('Remove file');
const NEW_BRANCH_IN_FORK = __(
- 'A new branch will be created in your fork and a new merge request will be started.',
+ 'GitLab will create a branch in your fork and start a merge request.',
);
const ERROR_MESSAGE = __('Error uploading file. Please try again.');
diff --git a/app/assets/javascripts/repository/constants.js b/app/assets/javascripts/repository/constants.js
index 152fabbd7cc..b4363c51165 100644
--- a/app/assets/javascripts/repository/constants.js
+++ b/app/assets/javascripts/repository/constants.js
@@ -11,7 +11,7 @@ export const COMMIT_LABEL = __('Commit message');
export const TARGET_BRANCH_LABEL = __('Target branch');
export const TOGGLE_CREATE_MR_LABEL = __('Start a new merge request with these changes');
export const NEW_BRANCH_IN_FORK = __(
- 'A new branch will be created in your fork and a new merge request will be started.',
+ 'GitLab will create a branch in your fork and start a merge request.',
);
export const COMMIT_MESSAGE_SUBJECT_MAX_LENGTH = 52;
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb
index d1f33f99ad0..d089b540282 100644
--- a/app/helpers/tree_helper.rb
+++ b/app/helpers/tree_helper.rb
@@ -81,7 +81,7 @@ module TreeHelper
end
def commit_in_fork_help
- _("A new branch will be created in your fork and a new merge request will be started.")
+ _("GitLab will create a branch in your fork and start a merge request.")
end
def commit_in_single_accessible_branch
diff --git a/doc/administration/geo/replication/datatypes.md b/doc/administration/geo/replication/datatypes.md
index c98436157fc..a213c936be1 100644
--- a/doc/administration/geo/replication/datatypes.md
+++ b/doc/administration/geo/replication/datatypes.md
@@ -51,7 +51,7 @@ verification methods:
| Blobs | Infrastructure registry _(object storage)_ | Geo with API/Managed (*2*) | _Not implemented_ |
| Blobs | Versioned Terraform State _(file system)_ | Geo with API | SHA256 checksum |
| Blobs | Versioned Terraform State _(object storage)_ | Geo with API/Managed (*2*) | _Not implemented_ |
-| Blobs | External Merge Request Diffs _(file system)_ | Geo with API | _Not implemented_ |
+| Blobs | External Merge Request Diffs _(file system)_ | Geo with API | SHA256 checksum |
| Blobs | External Merge Request Diffs _(object storage)_ | Geo with API/Managed (*2*) | _Not implemented_ |
| Blobs | Pipeline artifacts _(file system)_ | Geo with API | SHA256 checksum |
| Blobs | Pipeline artifacts _(object storage)_ | Geo with API/Managed (*2*) | SHA256 checksum |
@@ -196,7 +196,7 @@ successfully, you must replicate their data using some other means.
|[Project designs repository](../../../user/project/issues/design_management.md) | **Yes** (12.7) | [No](https://gitlab.com/gitlab-org/gitlab/-/issues/32467) | No | Designs also require replication of LFS objects and Uploads. |
|[Package Registry](../../../user/packages/package_registry/index.md) | **Yes** (13.2) | [**Yes**](#limitation-of-verification-for-files-in-object-storage) (13.10) | Via Object Storage provider if supported. Native Geo support (Beta). | Behind feature flag `geo_package_file_replication`, enabled by default. |
|[Versioned Terraform State](../../terraform_state.md) | **Yes** (13.5) | [**Yes**](#limitation-of-verification-for-files-in-object-storage) (13.12) | Via Object Storage provider if supported. Native Geo support (Beta). | Replication is behind the feature flag `geo_terraform_state_version_replication`, enabled by default. Verification was behind the feature flag `geo_terraform_state_version_verification`, which was removed in 14.0|
-|[External merge request diffs](../../merge_request_diffs.md) | **Yes** (13.5) | No | Via Object Storage provider if supported. Native Geo support (Beta). | Replication is behind the feature flag `geo_merge_request_diff_replication`, enabled by default. Verification is under development, behind the feature flag `geo_merge_request_diff_verification`, introduced in 14.0.|
+|[External merge request diffs](../../merge_request_diffs.md) | **Yes** (13.5) | **Yes** (14.5) | Via Object Storage provider if supported. Native Geo support (Beta). | Replication is behind the feature flag `geo_merge_request_diff_replication`, enabled by default. Verification is behind the feature flag `geo_merge_request_diff_verification`, enabled by default in 14.5.|
|[Versioned snippets](../../../user/snippets.md#versioned-snippets) | [**Yes** (13.7)](https://gitlab.com/groups/gitlab-org/-/epics/2809) | [**Yes** (14.2)](https://gitlab.com/groups/gitlab-org/-/epics/2810) | No | Verification was implemented behind the feature flag `geo_snippet_repository_verification` in 13.11, and the feature flag was removed in 14.2. |
|[GitLab Pages](../../pages/index.md) | [**Yes** (14.3)](https://gitlab.com/groups/gitlab-org/-/epics/589) | No | Via Object Storage provider if supported. Native Geo support (Beta). | Behind feature flag `geo_pages_deployment_replication`, enabled by default. |
|[Server-side Git hooks](../../server_hooks.md) | [Not planned](https://gitlab.com/groups/gitlab-org/-/epics/1867) | No | No | Not planned because of current implementation complexity, low customer interest, and availability of alternatives to hooks. |
diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md
index 34af9736056..826c404796e 100644
--- a/doc/api/graphql/reference/index.md
+++ b/doc/api/graphql/reference/index.md
@@ -18291,6 +18291,7 @@ Field that are available while modifying the custom mapping attributes for an HT
| <a id="boardissueinputepicid"></a>`epicId` | [`EpicID`](#epicid) | Filter by epic ID. Incompatible with epicWildcardId. |
| <a id="boardissueinputepicwildcardid"></a>`epicWildcardId` | [`EpicWildcardId`](#epicwildcardid) | Filter by epic ID wildcard. Incompatible with epicId. |
| <a id="boardissueinputiids"></a>`iids` | [`[String!]`](#string) | List of IIDs of issues. For example `["1", "2"]`. |
+| <a id="boardissueinputiterationcadenceid"></a>`iterationCadenceId` | [`[IterationsCadenceID!]`](#iterationscadenceid) | Filter by a list of iteration cadence IDs. |
| <a id="boardissueinputiterationid"></a>`iterationId` | [`[IterationID!]`](#iterationid) | Filter by a list of iteration IDs. Incompatible with iterationWildcardId. |
| <a id="boardissueinputiterationtitle"></a>`iterationTitle` | [`String`](#string) | Filter by iteration title. |
| <a id="boardissueinputiterationwildcardid"></a>`iterationWildcardId` | [`IterationWildcardId`](#iterationwildcardid) | Filter by iteration ID wildcard. |
diff --git a/doc/user/infrastructure/clusters/index.md b/doc/user/infrastructure/clusters/index.md
index fefdbfb0ea7..181fc9e095c 100644
--- a/doc/user/infrastructure/clusters/index.md
+++ b/doc/user/infrastructure/clusters/index.md
@@ -52,7 +52,7 @@ the Kubernetes Agent model on the [Agent's blueprint documentation](../../../arc
- [Cluster integrations](../../clusters/integrations.md)
- [Cluster cost management](../../clusters/cost_management.md)
- [Cluster environments](../../clusters/environments.md)
-- [Canary Deployments](../../project/canary_deployments.md)
+- [Advanced traffic control with Canary Ingress](../../project/canary_deployments.md#advanced-traffic-control-with-canary-ingress-deprecated)
- [Serverless](../../project/clusters/serverless/index.md)
- [Deploy Boards](../../project/deploy_boards.md)
- [Pod logs](../../project/clusters/kubernetes_pod_logs.md)
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 6694d6b5e89..2e048110328 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -1500,9 +1500,6 @@ msgstr ""
msgid "A new Release %{tag} for %{name} was published. Visit the Releases page to read more about it:"
msgstr ""
-msgid "A new branch will be created in your fork and a new merge request will be started."
-msgstr ""
-
msgid "A new impersonation token has been created."
msgstr ""
@@ -6519,10 +6516,10 @@ msgstr ""
msgid "ChangeReviewer|Unassigned"
msgstr ""
-msgid "ChangeTypeAction|A new branch will be created in your fork and a new merge request will be started."
+msgid "ChangeTypeAction|Cherry-pick"
msgstr ""
-msgid "ChangeTypeAction|Cherry-pick"
+msgid "ChangeTypeAction|GitLab will create a branch in your fork and start a merge request."
msgstr ""
msgid "ChangeTypeAction|Pick into branch"
@@ -15853,6 +15850,9 @@ msgstr ""
msgid "GitLab version"
msgstr ""
+msgid "GitLab will create a branch in your fork and start a merge request."
+msgstr ""
+
msgid "GitLab.com"
msgstr ""
@@ -37245,6 +37245,9 @@ msgstr ""
msgid "Upload license"
msgstr ""
+msgid "Upload new file"
+msgstr ""
+
msgid "Upload object map"
msgstr ""
@@ -41436,6 +41439,9 @@ msgstr ""
msgid "mrWidget|Merge blocked: all threads must be resolved."
msgstr ""
+msgid "mrWidget|Merge blocked: denied licenses must be removed."
+msgstr ""
+
msgid "mrWidget|Merge blocked: fast-forward merge is not possible. To merge this request, first rebase locally."
msgstr ""
@@ -41574,9 +41580,6 @@ msgstr ""
msgid "mrWidget|What is a merge train?"
msgstr ""
-msgid "mrWidget|You can merge after removing denied licenses"
-msgstr ""
-
msgid "mrWidget|You can only merge once this merge request is approved."
msgstr ""
diff --git a/spec/features/projects/files/user_creates_files_spec.rb b/spec/features/projects/files/user_creates_files_spec.rb
index fd83547d064..7159418deda 100644
--- a/spec/features/projects/files/user_creates_files_spec.rb
+++ b/spec/features/projects/files/user_creates_files_spec.rb
@@ -170,7 +170,7 @@ RSpec.describe 'Projects > Files > User creates files', :js do
end
it 'shows a message saying the file will be committed in a fork' do
- message = "A new branch will be created in your fork and a new merge request will be started."
+ message = "GitLab will create a branch in your fork and start a merge request."
expect(page).to have_content(message)
end
diff --git a/spec/frontend/api/packages_api_spec.js b/spec/frontend/api/packages_api_spec.js
new file mode 100644
index 00000000000..3286dccb1b2
--- /dev/null
+++ b/spec/frontend/api/packages_api_spec.js
@@ -0,0 +1,53 @@
+import MockAdapter from 'axios-mock-adapter';
+import { publishPackage } from '~/api/packages_api';
+import axios from '~/lib/utils/axios_utils';
+import httpStatus from '~/lib/utils/http_status';
+
+describe('Api', () => {
+ const dummyApiVersion = 'v3000';
+ const dummyUrlRoot = '/gitlab';
+ const dummyGon = {
+ api_version: dummyApiVersion,
+ relative_url_root: dummyUrlRoot,
+ };
+ let originalGon;
+ let mock;
+
+ beforeEach(() => {
+ mock = new MockAdapter(axios);
+ originalGon = window.gon;
+ window.gon = { ...dummyGon };
+ });
+
+ afterEach(() => {
+ mock.restore();
+ window.gon = originalGon;
+ });
+
+ describe('packages', () => {
+ const projectPath = 'project_a';
+ const name = 'foo';
+ const packageVersion = '0';
+ const apiResponse = [{ id: 1, name: 'foo' }];
+
+ describe('publishPackage', () => {
+ it('publishes the package', () => {
+ const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/projects/${projectPath}/packages/generic/${name}/${packageVersion}/${name}`;
+
+ jest.spyOn(axios, 'put');
+ mock.onPut(expectedUrl).replyOnce(httpStatus.OK, apiResponse);
+
+ return publishPackage(
+ { projectPath, name, version: 0, fileName: name, files: [{}] },
+ { status: 'hidden', select: 'package_file' },
+ ).then(({ data }) => {
+ expect(data).toEqual(apiResponse);
+ expect(axios.put).toHaveBeenCalledWith(expectedUrl, expect.any(FormData), {
+ headers: { 'Content-Type': 'multipart/form-data' },
+ params: { select: 'package_file', status: 'hidden' },
+ });
+ });
+ });
+ });
+ });
+});
diff --git a/spec/frontend/repository/components/upload_blob_modal_spec.js b/spec/frontend/repository/components/upload_blob_modal_spec.js
index 36847107558..e9dfa3cd495 100644
--- a/spec/frontend/repository/components/upload_blob_modal_spec.js
+++ b/spec/frontend/repository/components/upload_blob_modal_spec.js
@@ -212,8 +212,8 @@ describe('UploadBlobModal', () => {
createComponent();
});
- it('displays the default "Upload New File" modal title ', () => {
- expect(findModal().props('title')).toBe('Upload New File');
+ it('displays the default "Upload new file" modal title ', () => {
+ expect(findModal().props('title')).toBe('Upload new file');
});
it('display the defaul primary button text', () => {