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--GITLAB_KAS_VERSION2
-rw-r--r--app/assets/javascripts/issuable/issuable_label_selector.js2
-rw-r--r--app/assets/javascripts/sidebar/components/labels/labels_select_widget/embedded_labels_list.vue4
-rw-r--r--app/assets/javascripts/sidebar/components/labels/labels_select_widget/graphql/merge_request_labels.query.graphql1
-rw-r--r--app/assets/javascripts/sidebar/components/labels/labels_select_widget/labels_select_root.vue12
-rw-r--r--app/assets/javascripts/sidebar/mount_sidebar.js1
-rw-r--r--app/assets/javascripts/vue_shared/issuable/create/components/issuable_label_selector.vue4
-rw-r--r--app/controllers/projects/merge_requests/application_controller.rb3
-rw-r--r--doc/user/compliance/compliance_center/index.md7
-rw-r--r--lib/gitlab/checks/global_file_size_check.rb33
-rw-r--r--locale/gitlab.pot9
-rw-r--r--spec/frontend/sidebar/components/labels/labels_select_widget/mock_data.js1
-rw-r--r--spec/frontend/vue_shared/issuable/create/components/issuable_label_selector_spec.js4
-rw-r--r--spec/lib/gitlab/checks/global_file_size_check_spec.rb5
14 files changed, 49 insertions, 39 deletions
diff --git a/GITLAB_KAS_VERSION b/GITLAB_KAS_VERSION
index 98fb152f096..20a6283b8f5 100644
--- a/GITLAB_KAS_VERSION
+++ b/GITLAB_KAS_VERSION
@@ -1 +1 @@
-v16.7.0-rc3
+v16.7.0
diff --git a/app/assets/javascripts/issuable/issuable_label_selector.js b/app/assets/javascripts/issuable/issuable_label_selector.js
index 0793ad2d3e0..9065fc9c1fd 100644
--- a/app/assets/javascripts/issuable/issuable_label_selector.js
+++ b/app/assets/javascripts/issuable/issuable_label_selector.js
@@ -42,13 +42,13 @@ export default () => {
fullPath,
initialLabels: JSON.parse(initialLabels),
issuableType,
+ issuableSupportsLockOnMerge: parseBoolean(supportsLockOnMerge),
labelType: WORKSPACE_PROJECT,
labelsFilterBasePath,
labelsManagePath,
variant: VARIANT_EMBEDDED,
workspaceType: WORKSPACE_PROJECT,
toggleAttrs: { 'data-testid': 'issuable-label-dropdown' },
- supportsLockOnMerge: parseBoolean(supportsLockOnMerge),
},
render(createElement) {
return createElement(IssuableLabelSelector);
diff --git a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/embedded_labels_list.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/embedded_labels_list.vue
index 9af25130424..93c3dce4308 100644
--- a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/embedded_labels_list.vue
+++ b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/embedded_labels_list.vue
@@ -51,7 +51,9 @@ export default {
return this.allowScopedLabels && isScopedLabel(label);
},
isLabelLocked(label) {
- return label.lockOnMerge && this.supportsLockOnMerge;
+ // These particular labels were initialized from HAML data, so the attributes are
+ // in snake case instead of camel case
+ return label.lock_on_merge && this.supportsLockOnMerge;
},
showCloseButton(label) {
return this.allowLabelRemove && !this.isLabelLocked(label);
diff --git a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/graphql/merge_request_labels.query.graphql b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/graphql/merge_request_labels.query.graphql
index 8daa6e1138f..5280054f0cc 100644
--- a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/graphql/merge_request_labels.query.graphql
+++ b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/graphql/merge_request_labels.query.graphql
@@ -5,6 +5,7 @@ query mergeRequestLabels($fullPath: ID!, $iid: String!) {
id
issuable: mergeRequest(iid: $iid) {
id
+ supportsLockOnMerge
labels {
nodes {
...Label
diff --git a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/labels_select_root.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/labels_select_root.vue
index 7125ccdb8ca..e0d7400f7a6 100644
--- a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/labels_select_root.vue
+++ b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/labels_select_root.vue
@@ -52,11 +52,6 @@ export default {
required: false,
default: false,
},
- enforceLockedLabelsOnMerge: {
- type: Boolean,
- required: false,
- default: false,
- },
showEmbeddedLabelsList: {
type: Boolean,
required: false,
@@ -106,6 +101,11 @@ export default {
type: String,
required: true,
},
+ issuableSupportsLockOnMerge: {
+ type: Boolean,
+ required: false,
+ default: false,
+ },
workspaceType: {
type: String,
required: true,
@@ -157,7 +157,7 @@ export default {
return this.showEmbeddedLabelsList && isDropdownVariantEmbedded(this.variant);
},
isLockOnMergeSupported() {
- return this.enforceLockedLabelsOnMerge;
+ return this.issuableSupportsLockOnMerge || this.issuable?.supportsLockOnMerge;
},
},
apollo: {
diff --git a/app/assets/javascripts/sidebar/mount_sidebar.js b/app/assets/javascripts/sidebar/mount_sidebar.js
index 802eb9a1867..12e60a9ed4e 100644
--- a/app/assets/javascripts/sidebar/mount_sidebar.js
+++ b/app/assets/javascripts/sidebar/mount_sidebar.js
@@ -355,7 +355,6 @@ export function mountSidebarLabelsWidget() {
workspaceType: WORKSPACE_PROJECT,
attrWorkspacePath: el.dataset.projectPath,
labelCreateType: WORKSPACE_PROJECT,
- enforceLockedLabelsOnMerge: gon.features.enforceLockedLabelsOnMerge,
},
class: ['block labels js-labels-block'],
scopedSlots: {
diff --git a/app/assets/javascripts/vue_shared/issuable/create/components/issuable_label_selector.vue b/app/assets/javascripts/vue_shared/issuable/create/components/issuable_label_selector.vue
index 52e992a2729..1828208bd0f 100644
--- a/app/assets/javascripts/vue_shared/issuable/create/components/issuable_label_selector.vue
+++ b/app/assets/javascripts/vue_shared/issuable/create/components/issuable_label_selector.vue
@@ -18,7 +18,7 @@ export default {
'initialLabels',
'issuableType',
'labelType',
- 'supportsLockOnMerge',
+ 'issuableSupportsLockOnMerge',
'variant',
'workspaceType',
],
@@ -77,7 +77,7 @@ export default {
:issuable-type="issuableType"
:label-create-type="labelType"
:selected-labels="selectedLabels"
- :supports-lock-on-merge="supportsLockOnMerge"
+ :issuable-supports-lock-on-merge="issuableSupportsLockOnMerge"
@updateSelectedLabels="handleUpdateSelectedLabels"
@onLabelRemove="handleLabelRemove"
>
diff --git a/app/controllers/projects/merge_requests/application_controller.rb b/app/controllers/projects/merge_requests/application_controller.rb
index fe2a4080e0c..1af0ce3c35e 100644
--- a/app/controllers/projects/merge_requests/application_controller.rb
+++ b/app/controllers/projects/merge_requests/application_controller.rb
@@ -4,9 +4,6 @@ class Projects::MergeRequests::ApplicationController < Projects::ApplicationCont
before_action :check_merge_requests_available!
before_action :merge_request
before_action :authorize_read_merge_request!
- before_action do
- push_force_frontend_feature_flag(:enforce_locked_labels_on_merge, project&.supports_lock_on_merge?)
- end
feature_category :code_review_workflow
diff --git a/doc/user/compliance/compliance_center/index.md b/doc/user/compliance/compliance_center/index.md
index f745259c763..63b4560a498 100644
--- a/doc/user/compliance/compliance_center/index.md
+++ b/doc/user/compliance/compliance_center/index.md
@@ -16,6 +16,7 @@ See report and manage standards adherence, violations, and compliance frameworks
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/125444) standards adherence dashboard in GitLab 16.3 [with a flag](../../../administration/feature_flags.md) named `adherence_report_ui`. Disabled by default.
> - [Enabled](https://gitlab.com/gitlab-org/gitlab/-/issues/414495) in GitLab 16.5.
> - [Feature flag `compliance_adherence_report` and `adherence_report_ui`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137398) removed in GitLab 16.7.
+> - Standards adherence filtering [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/413734) in GitLab 16.7.
Standards adherence dashboard lists the adherence status of projects complying to GitLab standard.
@@ -33,6 +34,12 @@ To view the standards adherence dashboard for a group:
1. On the left sidebar, select **Search or go to** and find your group.
1. Select **Secure > Compliance center**.
+You can filter the standards adherence dashboard on:
+
+- The project that the check was performed on.
+- The type of check that was performed on a project.
+- The standard that the check belongs to.
+
### GitLab standard
GitLab standard consists of three rules:
diff --git a/lib/gitlab/checks/global_file_size_check.rb b/lib/gitlab/checks/global_file_size_check.rb
index ff24467e9cc..5dc41b2a4cc 100644
--- a/lib/gitlab/checks/global_file_size_check.rb
+++ b/lib/gitlab/checks/global_file_size_check.rb
@@ -3,6 +3,8 @@
module Gitlab
module Checks
class GlobalFileSizeCheck < BaseBulkChecker
+ include ActionView::Helpers::NumberHelper
+
LOG_MESSAGE = 'Checking for blobs over the file size limit'
def validate!
@@ -17,31 +19,24 @@ module Gitlab
).find
if oversized_blobs.present?
-
- blob_details = {}
- blob_id_size_msg = ""
- oversized_blobs.each do |blob|
- blob_details[blob.id] = { "size" => blob.size }
-
- # blob size is in byte, divide it by "/ 1024.0 / 1024.0" to get MiB
- blob_id_size_msg += "- #{blob.id} (#{(blob.size / 1024.0 / 1024.0).round(2)} MiB) \n"
- end
+ blob_id_size_msg = oversized_blobs.map do |blob|
+ "- #{blob.id} (#{number_to_human_size(blob.size)})"
+ end.join("\n")
oversize_err_msg = <<~OVERSIZE_ERR_MSG
- You are attempting to check in one or more blobs which exceed the #{file_size_limit}MiB limit:
-
- #{blob_id_size_msg}
- To resolve this error, you must either reduce the size of the above blobs, or utilize LFS.
- You may use "git ls-tree -r HEAD | grep $BLOB_ID" to see the file path.
- Please refer to #{Rails.application.routes.url_helpers.help_page_url('user/free_push_limit')} and
- #{Rails.application.routes.url_helpers.help_page_url('administration/settings/account_and_limit_settings')}
- for further information.
+ You are attempting to check in one or more blobs which exceed the #{file_size_limit}MiB limit:
+
+ #{blob_id_size_msg}
+ To resolve this error, you must either reduce the size of the above blobs, or utilize LFS.
+ You may use "git ls-tree -r HEAD | grep $BLOB_ID" to see the file path.
+ Please refer to #{Rails.application.routes.url_helpers.help_page_url('user/free_push_limit')} and
+ #{Rails.application.routes.url_helpers.help_page_url('administration/settings/account_and_limit_settings')}
+ for further information.
OVERSIZE_ERR_MSG
Gitlab::AppJsonLogger.info(
message: 'Found blob over global limit',
- blob_sizes: oversized_blobs.map(&:size),
- blob_details: blob_details
+ blob_details: oversized_blobs.map { |blob| { "id" => blob.id, "size" => blob.size } }
)
raise ::Gitlab::GitAccess::ForbiddenError, oversize_err_msg if enforce_global_file_size_limit?
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 77f2418edab..b3c99f9c6ff 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -9960,6 +9960,9 @@ msgstr ""
msgid "ChatMessage|in %{project_link}"
msgstr ""
+msgid "Check"
+msgstr ""
+
msgid "Check again"
msgstr ""
@@ -12846,6 +12849,12 @@ msgstr ""
msgid "ComplianceStandardsAdherence|Project"
msgstr ""
+msgid "ComplianceStandardsAdherence|Raw filter values is not currently supported. Please use available values."
+msgstr ""
+
+msgid "ComplianceStandardsAdherence|Raw text search is not currently supported. Please use the available filters."
+msgstr ""
+
msgid "ComplianceStandardsAdherence|Requirement"
msgstr ""
diff --git a/spec/frontend/sidebar/components/labels/labels_select_widget/mock_data.js b/spec/frontend/sidebar/components/labels/labels_select_widget/mock_data.js
index 2e586961be1..5039f00fe4b 100644
--- a/spec/frontend/sidebar/components/labels/labels_select_widget/mock_data.js
+++ b/spec/frontend/sidebar/components/labels/labels_select_widget/mock_data.js
@@ -21,6 +21,7 @@ export const mockLockedLabel = {
color: '#DADA55',
textColor: '#FFFFFF',
lockOnMerge: true,
+ lock_on_merge: true,
};
export const mockLabels = [
diff --git a/spec/frontend/vue_shared/issuable/create/components/issuable_label_selector_spec.js b/spec/frontend/vue_shared/issuable/create/components/issuable_label_selector_spec.js
index a7fade4fc5c..94234a03664 100644
--- a/spec/frontend/vue_shared/issuable/create/components/issuable_label_selector_spec.js
+++ b/spec/frontend/vue_shared/issuable/create/components/issuable_label_selector_spec.js
@@ -16,8 +16,8 @@ const fullPath = '/full-path';
const labelsFilterBasePath = '/labels-filter-base-path';
const initialLabels = [];
const issuableType = 'issue';
+const issuableSupportsLockOnMerge = false;
const labelType = WORKSPACE_PROJECT;
-const supportsLockOnMerge = false;
const variant = VARIANT_EMBEDDED;
const workspaceType = WORKSPACE_PROJECT;
@@ -37,8 +37,8 @@ describe('IssuableLabelSelector', () => {
labelsFilterBasePath,
initialLabels,
issuableType,
+ issuableSupportsLockOnMerge,
labelType,
- supportsLockOnMerge,
variant,
workspaceType,
...injectedProps,
diff --git a/spec/lib/gitlab/checks/global_file_size_check_spec.rb b/spec/lib/gitlab/checks/global_file_size_check_spec.rb
index db615053356..9e3be2fd2ec 100644
--- a/spec/lib/gitlab/checks/global_file_size_check_spec.rb
+++ b/spec/lib/gitlab/checks/global_file_size_check_spec.rb
@@ -36,7 +36,7 @@ RSpec.describe Gitlab::Checks::GlobalFileSizeCheck, feature_category: :source_co
context 'when there are oversized blobs' do
let(:mock_blob_id) { "88acbfafb1b8fdb7c51db870babce21bd861ac4f" }
let(:mock_blob_size) { 300 * 1024 * 1024 } # 300 MiB
- let(:size_msg) { "300.0" } # it is (mock_blob_size / 1024.0 / 1024.0).round(2).to_s
+ let(:size_msg) { "300" }
let(:blob_double) { instance_double(Gitlab::Git::Blob, size: mock_blob_size, id: mock_blob_id) }
before do
@@ -53,8 +53,7 @@ RSpec.describe Gitlab::Checks::GlobalFileSizeCheck, feature_category: :source_co
expect(Gitlab::AppJsonLogger).to receive(:info).with('Checking for blobs over the file size limit')
expect(Gitlab::AppJsonLogger).to receive(:info).with(
message: 'Found blob over global limit',
- blob_sizes: [mock_blob_size],
- blob_details: { mock_blob_id => { "size" => mock_blob_size } }
+ blob_details: [{ "id" => mock_blob_id, "size" => mock_blob_size }]
)
expect do
subject.validate!