Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-07-26 15:08:30 +00:00
parent c4af99d56f
commit 81f9ca3c64
45 changed files with 360 additions and 171 deletions

View File

@ -24,6 +24,7 @@ pages:
script:
- mv public/ .public/
- mkdir public/
- mkdir -p public/$(dirname "$KNAPSACK_RSPEC_SUITE_REPORT_PATH") public/$(dirname "$FLAKY_RSPEC_SUITE_REPORT_PATH") public/$(dirname "$RSPEC_PACKED_TESTS_MAPPING_PATH")
- mv coverage/ public/coverage-ruby/ || true
- mv coverage-frontend/ public/coverage-frontend/ || true
- mv coverage-javascript/ public/coverage-javascript/ || true

View File

@ -2,6 +2,7 @@ import Cookies from 'js-cookie';
import Vue from 'vue';
import { mapActions, mapState, mapGetters } from 'vuex';
import { parseBoolean } from '~/lib/utils/common_utils';
import { getParameterValues } from '~/lib/utils/url_utility';
import FindFile from '~/vue_shared/components/file_finder/index.vue';
import eventHub from '../notes/event_hub';
import diffsApp from './components/app.vue';
@ -115,6 +116,11 @@ export default function initDiffsApp(store) {
trackClick: false,
});
}
const vScrollingParam = getParameterValues('virtual_scrolling')[0];
if (vScrollingParam === 'false' || vScrollingParam === 'true') {
Cookies.set('diffs_virtual_scrolling', vScrollingParam);
}
},
methods: {
...mapActions('diffs', ['setRenderTreeList', 'setShowWhitespace']),

View File

@ -1,3 +1,4 @@
import Cookies from 'js-cookie';
import { getParameterValues } from '~/lib/utils/url_utility';
import { __, n__ } from '~/locale';
import {
@ -173,7 +174,16 @@ export function suggestionCommitMessage(state, _, rootState) {
});
}
export const isVirtualScrollingEnabled = (state) =>
!state.viewDiffsFileByFile &&
(window.gon?.features?.diffsVirtualScrolling ||
getParameterValues('virtual_scrolling')[0] === 'true');
export const isVirtualScrollingEnabled = (state) => {
const vSrollerCookie = Cookies.get('diffs_virtual_scrolling');
if (vSrollerCookie) {
return vSrollerCookie === 'true';
}
return (
!state.viewDiffsFileByFile &&
(window.gon?.features?.diffsVirtualScrolling ||
getParameterValues('virtual_scrolling')[0] === 'true')
);
};

View File

@ -1,5 +1,5 @@
<script>
import { GlModal, GlFormGroup, GlFormInput, GlFormTextarea, GlToggle } from '@gitlab/ui';
import { GlModal, GlFormGroup, GlFormInput, GlFormTextarea, GlToggle, GlForm } from '@gitlab/ui';
import csrf from '~/lib/utils/csrf';
import { __ } from '~/locale';
import {
@ -17,6 +17,7 @@ export default {
GlFormInput,
GlFormTextarea,
GlToggle,
GlForm,
},
i18n: {
PRIMARY_OPTIONS_TEXT: __('Delete file'),
@ -102,7 +103,7 @@ export default {
submitForm(e) {
e.preventDefault(); // Prevent modal from closing
this.loading = true;
this.$refs.form.submit();
this.$refs.form.$el.submit();
},
},
};
@ -110,13 +111,15 @@ export default {
<template>
<gl-modal
v-bind="$attrs"
data-testid="modal-delete"
:modal-id="modalId"
:title="modalTitle"
:action-primary="primaryOptions"
:action-cancel="cancelOptions"
@primary="submitForm"
>
<form ref="form" :action="deletePath" method="post">
<gl-form ref="form" :action="deletePath" method="post">
<input type="hidden" name="_method" value="delete" />
<input :value="$options.csrf.token" type="hidden" name="authenticity_token" />
<template v-if="emptyRepo">
@ -146,6 +149,6 @@ export default {
:label="$options.i18n.TOGGLE_CREATE_MR_LABEL"
/>
</template>
</form>
</gl-form>
</gl-modal>
</template>

View File

@ -15,9 +15,7 @@ export default {
},
estimateText() {
return sprintf(
s__(
'estimateCommand|%{slash_command} will update the estimated time with the latest command.',
),
s__('estimateCommand|%{slash_command} overwrites the total estimated time.'),
{
slash_command: '<code>/estimate</code>',
},
@ -26,7 +24,7 @@ export default {
},
spendText() {
return sprintf(
s__('spendCommand|%{slash_command} will update the sum of the time spent.'),
s__('spendCommand|%{slash_command} adds or subtracts time already spent.'),
{
slash_command: '<code>/spend</code>',
},
@ -41,7 +39,7 @@ export default {
<div data-testid="helpPane" class="time-tracking-help-state">
<div class="time-tracking-info">
<h4>{{ __('Track time with quick actions') }}</h4>
<p>{{ __('Quick actions can be used in the issues description and comment boxes.') }}</p>
<p>{{ __('Quick actions can be used in description and comment boxes.') }}</p>
<p v-html="estimateText"></p>
<p v-html="spendText"></p>
<gl-button :href="href">{{ __('Learn more') }}</gl-button>

View File

@ -77,23 +77,16 @@ module Packages
validates container_type, presence: true
validates :file_store, presence: true
validates :file_signature, absence: true
validates :signing_keys, absence: true
validates :signed_file_store, presence: true
scope :with_container, ->(subject) { where(container_type => subject) }
scope :with_codename, ->(codename) { where(codename: codename) }
scope :with_suite, ->(suite) { where(suite: suite) }
scope :with_codename_or_suite, ->(codename_or_suite) { with_codename(codename_or_suite).or(with_suite(codename_or_suite)) }
attr_encrypted :signing_keys,
mode: :per_attribute_iv,
key: Settings.attr_encrypted_db_key_base_32,
algorithm: 'aes-256-gcm',
encode: false,
encode_iv: false
mount_file_store_uploader Packages::Debian::DistributionReleaseFileUploader
mount_uploader :signed_file, Packages::Debian::DistributionReleaseFileUploader
after_save :update_signed_file_store, if: :saved_change_to_signed_file?
def component_names
components.pluck(:name).sort
@ -131,6 +124,12 @@ module Packages
self.class.with_container(container).with_codename(suite).exists?
end
def update_signed_file_store
# The signed_file.object_store is set during `uploader.store!`
# which happens after object is inserted/updated
self.update_column(:signed_file_store, signed_file.object_store)
end
end
end
end

View File

@ -10,7 +10,12 @@ class Packages::Debian::DistributionReleaseFileUploader < GitlabUploader
alias_method :upload, :model
def filename
'Release'
case mounted_as
when :signed_file
'InRelease'
else
'Release'
end
end
def store_dir

View File

@ -1,8 +1,6 @@
- issues_count = cached_issuables_count(@group, type: :issues)
- merge_requests_count = cached_issuables_count(@group, type: :merge_requests)
= render_if_exists "layouts/nav/ee/epic_link", group: @group
- if group_sidebar_link?(:issues)
= nav_link(path: group_issues_sub_menu_items, unless: -> { current_path?('issues_analytics#show') }) do
= link_to issues_group_path(@group), data: { qa_selector: 'group_issues_item' }, class: 'has-sub-items' do

View File

@ -0,0 +1,13 @@
# frozen_string_literal: true
class AddSignedFileToPackagesDebianProjectDistributions < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
# rubocop:disable Migration/AddLimitToTextColumns
# limit is added in 20210721125620_add_text_limit_to_packages_debian_project_distributions_signed_files
def change
add_column :packages_debian_project_distributions, :signed_file, :text
add_column :packages_debian_project_distributions, :signed_file_store, :integer, limit: 2, default: 1, null: false
end
# rubocop:enable Migration/AddLimitToTextColumns
end

View File

@ -0,0 +1,13 @@
# frozen_string_literal: true
class AddSignedFileToPackagesDebianGroupDistributions < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
# rubocop:disable Migration/AddLimitToTextColumns
# limit is added in 20210721125637_add_text_limit_to_packages_debian_group_distributions_signed_files
def change
add_column :packages_debian_group_distributions, :signed_file, :text
add_column :packages_debian_group_distributions, :signed_file_store, :integer, limit: 2, default: 1, null: false
end
# rubocop:enable Migration/AddLimitToTextColumns
end

View File

@ -0,0 +1,14 @@
# frozen_string_literal: true
class AddTextLimitToPackagesDebianProjectDistributionsSignedFiles < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
def up
add_text_limit :packages_debian_project_distributions, :signed_file, 255
end
def down
remove_text_limit :packages_debian_project_distributions, :signed_file
end
end

View File

@ -0,0 +1,14 @@
# frozen_string_literal: true
class AddTextLimitToPackagesDebianGroupDistributionsSignedFiles < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
def up
add_text_limit :packages_debian_group_distributions, :signed_file, 255
end
def down
remove_text_limit :packages_debian_group_distributions, :signed_file
end
end

View File

@ -0,0 +1,10 @@
# frozen_string_literal: true
class RemoveSigningKeysFromPackagesDebianProjectDistributions < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
def change
remove_column :packages_debian_project_distributions, :encrypted_signing_keys, :text
remove_column :packages_debian_project_distributions, :encrypted_signing_keys_iv, :text
end
end

View File

@ -0,0 +1,10 @@
# frozen_string_literal: true
class RemoveSigningKeysFromPackagesDebianGroupDistributions < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
def change
remove_column :packages_debian_group_distributions, :encrypted_signing_keys, :text
remove_column :packages_debian_group_distributions, :encrypted_signing_keys_iv, :text
end
end

View File

@ -0,0 +1 @@
8ffb00b1a86fb1f9574b3811f88a65a1478f64cf59dc99a3324e04c4f4f0c7dd

View File

@ -0,0 +1 @@
8b43136ea6df74ad379537e28392c43770ecd8586eff8e830c52e65976f6978a

View File

@ -0,0 +1 @@
fa27f8e932f47946a67b2e739a978573e5f375ac0b1058ee79353e22d514755d

View File

@ -0,0 +1 @@
40f99f3c05290fe967cac6c1b90d913decacb491e1253fb166d4dd06363dd38b

View File

@ -0,0 +1 @@
5c6cc14f49d8fa9d0f0610eab731f93f874d6e9b5e3d49d5a127830241528488

View File

@ -0,0 +1 @@
7cba2fedb94fb5dc7fa5b796c6a93d2c5c8b57aee64b294e0c20dde07bf5253a

View File

@ -15866,17 +15866,16 @@ CREATE TABLE packages_debian_group_distributions (
label text,
version text,
description text,
encrypted_signing_keys text,
encrypted_signing_keys_iv text,
file text,
file_signature text,
signed_file text,
signed_file_store smallint DEFAULT 1 NOT NULL,
CONSTRAINT check_0007e0bf61 CHECK ((char_length(signed_file) <= 255)),
CONSTRAINT check_310ac457b8 CHECK ((char_length(description) <= 255)),
CONSTRAINT check_3d6f87fc31 CHECK ((char_length(file_signature) <= 4096)),
CONSTRAINT check_3fdadf4a0c CHECK ((char_length(version) <= 255)),
CONSTRAINT check_590e18405a CHECK ((char_length(codename) <= 255)),
CONSTRAINT check_9b90bc0f07 CHECK ((char_length(encrypted_signing_keys_iv) <= 255)),
CONSTRAINT check_b057cd840a CHECK ((char_length(origin) <= 255)),
CONSTRAINT check_b811ec1218 CHECK ((char_length(encrypted_signing_keys) <= 2048)),
CONSTRAINT check_be5ed8d307 CHECK ((char_length(file) <= 255)),
CONSTRAINT check_d3244bfc0b CHECK ((char_length(label) <= 255)),
CONSTRAINT check_e7c928a24b CHECK ((char_length(suite) <= 255))
@ -15992,20 +15991,19 @@ CREATE TABLE packages_debian_project_distributions (
label text,
version text,
description text,
encrypted_signing_keys text,
encrypted_signing_keys_iv text,
file text,
file_signature text,
signed_file text,
signed_file_store smallint DEFAULT 1 NOT NULL,
CONSTRAINT check_6177ccd4a6 CHECK ((char_length(origin) <= 255)),
CONSTRAINT check_6f6b55a4c4 CHECK ((char_length(label) <= 255)),
CONSTRAINT check_834dabadb6 CHECK ((char_length(codename) <= 255)),
CONSTRAINT check_96965792c2 CHECK ((char_length(version) <= 255)),
CONSTRAINT check_9e5e22b7ff CHECK ((char_length(signed_file) <= 255)),
CONSTRAINT check_a56ae58a17 CHECK ((char_length(suite) <= 255)),
CONSTRAINT check_a5a2ac6af2 CHECK ((char_length(file_signature) <= 4096)),
CONSTRAINT check_b93154339f CHECK ((char_length(description) <= 255)),
CONSTRAINT check_c25603a25b CHECK ((char_length(encrypted_signing_keys) <= 2048)),
CONSTRAINT check_cb4ac9599e CHECK ((char_length(file) <= 255)),
CONSTRAINT check_d488f8cce3 CHECK ((char_length(encrypted_signing_keys_iv) <= 255))
CONSTRAINT check_cb4ac9599e CHECK ((char_length(file) <= 255))
);
CREATE SEQUENCE packages_debian_project_distributions_id_seq

View File

@ -30,4 +30,4 @@ relevant compliance standards.
|**Separation of Duties using [Protected branches](../user/project/protected_branches.md#require-code-owner-approval-on-a-protected-branch) and [custom CI Configuration Paths](../ci/pipelines/settings.md#specify-a-custom-cicd-configuration-file)**<br> GitLab Premium users can leverage the GitLab cross-project YAML configurations to define deployers of code and developers of code. View the [Separation of Duties Deploy Project](https://gitlab.com/guided-explorations/separation-of-duties-deploy/blob/master/README.md) and [Separation of Duties Project](https://gitlab.com/guided-explorations/separation-of-duties/blob/master/README.md) to see how to use this set up to define these roles. | Premium+ | **{check-circle}** Yes | Project |
|**[Compliance frameworks](../user/project/settings/index.md#compliance-frameworks)**<br>Create a custom compliance framework at the group level to describe the type of compliance requirements any child project needs to follow. | Premium+ | **{check-circle}** Yes | Group |
|**[Compliance pipelines](../user/project/settings/index.md#compliance-pipeline-configuration)**<br>Define a pipeline configuration to run for any projects with a given compliance framework. | Ultimate | **{check-circle}** Yes | Group |
|**[Compliance dashboard](../user/compliance/compliance_dashboard/index.md)**<br>Quickly get visibility into the compliance posture of your organization. | Ultimate | **{check-circle}** Yes | Group |
|**[Compliance report](../user/compliance/compliance_report/index.md)**<br>Quickly get visibility into the compliance posture of your organization. | Ultimate | **{check-circle}** Yes | Group |

View File

@ -6,7 +6,8 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Namespaces API
Usernames and group names fall under a special category called namespaces.
Usernames and group names fall under a special category called
[namespaces](../user/group/index.md#namespaces).
For users and groups supported API calls see the [users](users.md) and
[groups](groups.md) documentation respectively.

View File

@ -11,7 +11,7 @@ This document lists the different implementations of CSV export in GitLab codeba
| Export type | How it works | Advantages | Disadvantages | Existing examples |
|---|---|---|---|---|
| Streaming | - Query and yield data in batches to a response stream.<br>- Download starts immediately. | - Report available immediately. | - No progress indicator.<br>- Requires a reliable connection. | [Export Audit Event Log](../administration/audit_events.md#export-to-csv) |
| Downloading | - Query and write data in batches to a temporary file.<br>- Loads the file into memory.<br>- Sends the file to the client. | - Report available immediately. | - Large amount of data might cause request timeout.<br>- Memory intensive.<br>- Request expires when user navigates to a different page. | [Export Chain of Custody Report](../user/compliance/compliance_dashboard/#chain-of-custody-report) |
| Downloading | - Query and write data in batches to a temporary file.<br>- Loads the file into memory.<br>- Sends the file to the client. | - Report available immediately. | - Large amount of data might cause request timeout.<br>- Memory intensive.<br>- Request expires when user navigates to a different page. | [Export Chain of Custody Report](../user/compliance/compliance_report/#chain-of-custody-report) |
| As email attachment | - Asynchronously process the query with background job.<br>- Email uses the export as an attachment. | - Asynchronous processing. | - Requires users use a different app (email) to download the CSV.<br>- Email providers may limit attachment size. | - [Export Issues](../user/project/issues/csv_export.md)<br>- [Export Merge Requests](../user/project/merge_requests/csv_export.md) |
| As downloadable link in email (*) | - Asynchronously process the query with background job.<br>- Email uses an export link. | - Asynchronous processing.<br>- Bypasses email provider attachment size limit. | - Requires users use a different app (email).<br>- Requires additional storage and cleanup. | [Export User Permissions](https://gitlab.com/gitlab-org/gitlab/-/issues/1772) |
| Polling (non-persistent state) | - Asynchronously processes the query with the background job.<br>- Frontend(FE) polls every few seconds to check if CSV file is ready. | - Asynchronous processing.<br>- Automatically downloads to local machine on completion.<br>- In-app solution. | - Non-persistable request - request expires when user navigates to a different page.<br>- API is processed for each polling request. | [Export Vulnerabilities](../user/application_security/vulnerability_report/#export-vulnerability-details) |

View File

@ -14,7 +14,7 @@ storage consumed by a group, and allow easy management.
## Proposal
1. Create a new ActiveRecord model to hold the namespaces' statistics in an aggregated form (only for root namespaces).
1. Create a new ActiveRecord model to hold the namespaces' statistics in an aggregated form (only for root [namespaces](../user/group/index.md#namespaces)).
1. Refresh the statistics in this model every time a project belonging to this namespace is changed.
## Problem

View File

@ -386,7 +386,7 @@ Tiers: `premium`, `ultimate`
### `compliance_unique_visits.g_compliance_dashboard`
Number of unique visitors to the compliance dashboard.
Number of unique visitors to the compliance report.
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216183904_g_compliance_dashboard.yml)
@ -7848,7 +7848,7 @@ Tiers: `free`, `premium`, `ultimate`
### `counts_monthly.aggregated_metrics.compliance_features_track_unique_visits_union`
Unique users that have used audit event screen, audit event API, compliance dashboard, or credential inventory
Unique users that have used audit event screen, audit event API, compliance report, or credential inventory
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216183201_compliance_features_track_unique_visits_union.yml)
@ -8100,7 +8100,7 @@ Tiers: `free`, `premium`, `ultimate`
### `counts_weekly.aggregated_metrics.compliance_features_track_unique_visits_union`
Unique users that have used audit event screen, audit event API, compliance dashboard, or credential inventory
Unique users that have used audit event screen, audit event API, compliance report, or credential inventory
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210216183211_compliance_features_track_unique_visits_union.yml)
@ -11824,7 +11824,7 @@ Tiers: `premium`, `ultimate`
### `redis_hll_counters.compliance.g_compliance_dashboard_monthly`
Unique users who have viewed the compliance dashboard in a given month.
Unique users who have viewed the compliance report in a given month.
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216183926_g_compliance_dashboard_monthly.yml)
@ -11838,7 +11838,7 @@ Tiers: `premium`, `ultimate`
### `redis_hll_counters.compliance.g_compliance_dashboard_weekly`
Unique users who have looked at the compliance dashboard in a given week
Unique users who have looked at the compliance report in a given week
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210216183924_g_compliance_dashboard_weekly.yml)

View File

@ -1,102 +1,9 @@
---
type: reference, howto
stage: Manage
group: Compliance
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
redirect_to: '../compliance_report/index.md'
remove_date: '2021-10-23'
---
# Compliance Dashboard **(ULTIMATE)**
This file was moved to [another location](../compliance_report/index.md).
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/36524) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.8.
The Compliance Dashboard gives you the ability to see a group's merge request activity
by providing a high-level view for all projects in the group. For example, code approved
for merging into production.
## Overview
To access the Compliance Dashboard for a group, navigate to **{shield}** **Security & Compliance > Compliance** on the group's menu.
![Compliance Dashboard](img/compliance_dashboard_v13_11.png)
NOTE:
The Compliance Dashboard shows only the latest MR on each project.
## Merge request drawer
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/299357) in GitLab 14.1.
When you click on a row, a drawer is shown that provides further details about the merge
request:
- Project name and [compliance framework label](../../project/settings/index.md#compliance-frameworks),
if the project has one assigned.
- Link to the merge request.
- The merge request's branch path in the format `[source] into [target]`.
- A list of users that committed changes to the merge request.
- A list of users that commented on the merge request.
- A list of users that approved the merge request.
- The user that merged the merge request.
## Use cases
This feature is for people who care about the compliance status of projects within their group.
You can use the dashboard to:
- Get an overview of the latest merge request for each project.
- See if merge requests were approved and by whom.
- See merge request authors.
- See the latest [CI Pipeline](../../../ci/pipelines/index.md) result for each merge request.
## Permissions
- On [GitLab Ultimate](https://about.gitlab.com/pricing/) tier.
- By **Administrators** and **Group Owners**.
## Approval status and separation of duties
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/217939) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.3.
We support a separation of duties policy between users who create and approve merge requests.
The approval status column can help you identify violations of this policy.
Our criteria for the separation of duties is as follows:
- [A merge request author is **not** allowed to approve their merge request](../../project/merge_requests/approvals/settings.md#prevent-authors-from-approving-their-own-work)
- [A merge request committer is **not** allowed to approve a merge request they have added commits to](../../project/merge_requests/approvals/settings.md#prevent-committers-from-approving-their-own-work)
- [The minimum number of approvals required to merge a merge request is **at least** two](../../project/merge_requests/approvals/rules.md)
The "Approval status" column shows you, at a glance, whether a merge request is complying with the above.
This column has four states:
| State | Description |
|:------|:------------|
| Empty | The merge request approval status is unknown |
| ![Failed](img/failed_icon_v13_3.png) | The merge request **does not** comply with any of the above criteria |
| ![Warning](img/warning_icon_v13_3.png) | The merge request complies with **some** of the above criteria |
| ![Success](img/success_icon_v13_3.png) | The merge request complies with **all** of the above criteria |
If you do not see the success icon in your Compliance dashboard; please review the above criteria for the merge requests
project to make sure it complies with the separation of duties described above.
## Chain of Custody report **(ULTIMATE)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/213364) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.3.
The Chain of Custody report allows customers to export a list of merge commits within the group.
The data provides a comprehensive view with respect to merge commits. It includes the merge commit SHA,
merge request author, merge request ID, merge user, pipeline ID, group name, project name, and merge request approvers.
Depending on the merge strategy, the merge commit SHA can either be a merge commit, squash commit or a diff head commit.
To download the Chain of Custody report, navigate to **{shield}** **Security & Compliance > Compliance** on the group's menu and click **List of all merge commits**
### Commit-specific Chain of Custody Report **(ULTIMATE)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/267629) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.6.
You can generate a commit-specific Chain of Custody report for a given commit SHA. To do so, select
the dropdown next to the **List of all merge commits** button at the top of the Compliance Dashboard.
NOTE:
The Chain of Custody report download is a CSV file, with a maximum size of 15 MB.
The remaining records are truncated when this limit is reached.
<!-- This redirect file can be deleted after <2021-10-23>. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,103 @@
---
type: reference, howto
stage: Manage
group: Compliance
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
# Compliance report **(ULTIMATE)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/36524) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.8.
> - [Renamed](https://gitlab.com/gitlab-org/gitlab/-/issues/299360) to compliance report in GitLab 14.2.
The compliance report gives you the ability to see a group's merge request activity
by providing a high-level view for all projects in the group. For example, code approved
for merging into production.
## Overview
To access the compliance report for a group, navigate to **{shield}** **Security & Compliance > Compliance** on the group's menu.
![Compliance report](img/compliance_report_v13_11.png)
NOTE:
The compliance report shows only the latest MR on each project.
## Merge request drawer
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/299357) in GitLab 14.1.
When you click on a row, a drawer is shown that provides further details about the merge
request:
- Project name and [compliance framework label](../../project/settings/index.md#compliance-frameworks),
if the project has one assigned.
- Link to the merge request.
- The merge request's branch path in the format `[source] into [target]`.
- A list of users that committed changes to the merge request.
- A list of users that commented on the merge request.
- A list of users that approved the merge request.
- The user that merged the merge request.
## Use cases
This feature is for people who care about the compliance status of projects within their group.
You can use the report to:
- Get an overview of the latest merge request for each project.
- See if merge requests were approved and by whom.
- See merge request authors.
- See the latest [CI Pipeline](../../../ci/pipelines/index.md) result for each merge request.
## Permissions
- On [GitLab Ultimate](https://about.gitlab.com/pricing/) tier.
- By **Administrators** and **Group Owners**.
## Approval status and separation of duties
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/217939) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.3.
We support a separation of duties policy between users who create and approve merge requests.
The approval status column can help you identify violations of this policy.
Our criteria for the separation of duties is as follows:
- [A merge request author is **not** allowed to approve their merge request](../../project/merge_requests/approvals/settings.md#prevent-authors-from-approving-their-own-work)
- [A merge request committer is **not** allowed to approve a merge request they have added commits to](../../project/merge_requests/approvals/settings.md#prevent-committers-from-approving-their-own-work)
- [The minimum number of approvals required to merge a merge request is **at least** two](../../project/merge_requests/approvals/rules.md)
The "Approval status" column shows you, at a glance, whether a merge request is complying with the above.
This column has four states:
| State | Description |
|:------|:------------|
| Empty | The merge request approval status is unknown |
| ![Failed](img/failed_icon_v13_3.png) | The merge request **does not** comply with any of the above criteria |
| ![Warning](img/warning_icon_v13_3.png) | The merge request complies with **some** of the above criteria |
| ![Success](img/success_icon_v13_3.png) | The merge request complies with **all** of the above criteria |
If you do not see the success icon in your compliance report; please review the above criteria for the merge requests
project to make sure it complies with the separation of duties described above.
## Chain of Custody report **(ULTIMATE)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/213364) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.3.
The Chain of Custody report allows customers to export a list of merge commits within the group.
The data provides a comprehensive view with respect to merge commits. It includes the merge commit SHA,
merge request author, merge request ID, merge user, pipeline ID, group name, project name, and merge request approvers.
Depending on the merge strategy, the merge commit SHA can either be a merge commit, squash commit or a diff head commit.
To download the Chain of Custody report, navigate to **{shield}** **Security & Compliance > Compliance** on the group's menu and click **List of all merge commits**
### Commit-specific Chain of Custody Report **(ULTIMATE)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/267629) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.6.
You can generate a commit-specific Chain of Custody report for a given commit SHA. To do so, select
the dropdown next to the **List of all merge commits** button at the top of the compliance report.
NOTE:
The Chain of Custody report download is a CSV file, with a maximum size of 15 MB.
The remaining records are truncated when this limit is reached.

View File

@ -10,7 +10,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
The compliance tools provided by GitLab let you keep an eye on various aspects of your project. The
following compliance tools are available:
- [Compliance Dashboard](compliance_dashboard/index.md): View recent merge request activity across
- [Compliance report](compliance_report/index.md): View recent merge request activity across
all projects in a group. This lets you see if merge requests were approved, and by whom.
- [License Compliance](license_compliance/index.md): Search your project's dependencies for their
licenses. This lets you determine if the licenses of your project's dependencies are compatible

View File

@ -707,6 +707,7 @@ The group's new subgroups have push rules set for them based on either:
- [Lock the sharing with group feature](#prevent-a-project-from-being-shared-with-groups).
- [Enforce two-factor authentication (2FA)](../../security/two_factor_authentication.md#enforcing-2fa-for-all-users-in-a-group): Enforce 2FA
for all group members.
- Namespaces [API](../../api/namespaces.md) and [Rake tasks](../../raketasks/features.md)..
## Troubleshooting

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -129,5 +129,5 @@ To learn more, see [Coverage check approval rule](../../../../ci/pipelines/setti
## Related links
- [Instance-level merge request approval settings](../../../admin_area/merge_requests_approvals.md)
- [Compliance Dashboard](../../../compliance/compliance_dashboard/index.md)
- [Compliance report](../../../compliance/compliance_report/index.md)
- [Merge request approvals API](../../../../api/merge_request_approvals.md)

View File

@ -14,8 +14,8 @@ requests in GitLab.
Use time tracking for these tasks:
- Record the time spent working on an issue or a merge request.
- Add an estimate of the amount of time needed to complete an issue or a merge
request.
- Add or update an estimate of the total time to complete an issue or a merge
request.
- View a breakdown of time spent working on an issue or a merge request.
You don't have to indicate an estimate to enter the time spent, and vice versa.
@ -45,9 +45,14 @@ For example, if you need to enter an estimate of 1 month, 2 weeks, 3 days, 4 hou
type `/estimate 1mo 2w 3d 4h 5m`.
Check the [time units you can use](#configuration).
Every time you enter a new time estimate, any previous time estimates are
overridden by this new value. There should only be one valid estimate in an
issue or a merge request.
The estimate is designed to show the total estimated time. The estimated
time remaining is automatically calculated and displayed when hovering over
the time tracking information in the right sidebar.
![Estimated time remaining](img/remaining_time_v14_2.png)
An issue or a merge request can have only one estimate. Every time you enter a
new time estimate, it overwrites the previous value.
To remove an estimation entirely, use `/remove_estimate`.

View File

@ -5,6 +5,8 @@
module Sidebars
module Concerns
module HasPill
include ActionView::Helpers::NumberHelper
def has_pill?
false
end
@ -18,6 +20,17 @@ module Sidebars
def pill_html_options
{}
end
def format_cached_count(count_service, count)
if count > count_service::CACHED_COUNT_THRESHOLD
number_to_human(
count,
units: { thousand: 'k', million: 'm' }, precision: 1, significant: false, format: '%n%u'
)
else
number_with_delimiter(count)
end
end
end
end
end

View File

@ -26810,7 +26810,7 @@ msgstr ""
msgid "Queued"
msgstr ""
msgid "Quick actions can be used in the issues description and comment boxes."
msgid "Quick actions can be used in description and comment boxes."
msgstr ""
msgid "Quick help"
@ -32443,9 +32443,6 @@ msgstr ""
msgid "The Advanced Search in GitLab is a powerful search service that saves you time. Instead of creating duplicate code and wasting time, you can now search for code within other teams that can help your own project."
msgstr ""
msgid "The Compliance Report captures merged changes that violate compliance best practices."
msgstr ""
msgid "The GitLab subscription service (customers.gitlab.com) is currently experiencing an outage. You can monitor the status and get updates at %{linkStart}status.gitlab.com%{linkEnd}."
msgstr ""
@ -32512,6 +32509,9 @@ msgstr ""
msgid "The comparison view may be inaccurate due to merge conflicts."
msgstr ""
msgid "The compliance report captures merged changes that violate compliance best practices."
msgstr ""
msgid "The connection will time out after %{timeout}. For repositories that take longer, use a clone/push combination."
msgstr ""
@ -38701,7 +38701,7 @@ msgstr ""
msgid "error"
msgstr ""
msgid "estimateCommand|%{slash_command} will update the estimated time with the latest command."
msgid "estimateCommand|%{slash_command} overwrites the total estimated time."
msgstr ""
msgid "exceeds the limit of %{bytes} bytes"
@ -39619,7 +39619,7 @@ msgstr ""
msgid "specified top is not part of the tree"
msgstr ""
msgid "spendCommand|%{slash_command} will update the sum of the time spent."
msgid "spendCommand|%{slash_command} adds or subtracts time already spent."
msgstr ""
msgid "ssh:"

View File

@ -57,7 +57,7 @@
"@babel/preset-env": "^7.10.1",
"@gitlab/at.js": "1.5.7",
"@gitlab/favicon-overlay": "2.0.0",
"@gitlab/svgs": "1.202.0",
"@gitlab/svgs": "1.205.0",
"@gitlab/tributejs": "1.0.0",
"@gitlab/ui": "31.6.0",
"@gitlab/visual-review-tools": "1.6.1",

View File

@ -1,5 +1,5 @@
import { GlFormTextarea, GlModal, GlFormInput, GlToggle } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import { GlFormTextarea, GlModal, GlFormInput, GlToggle, GlForm } from '@gitlab/ui';
import { shallowMount, mount } from '@vue/test-utils';
import { nextTick } from 'vue';
import DeleteBlobModal from '~/repository/components/delete_blob_modal.vue';
@ -19,17 +19,24 @@ const initialProps = {
describe('DeleteBlobModal', () => {
let wrapper;
const createComponent = (props = {}) => {
wrapper = shallowMount(DeleteBlobModal, {
const createComponentFactory = (mountFn) => (props = {}) => {
wrapper = mountFn(DeleteBlobModal, {
propsData: {
...initialProps,
...props,
},
attrs: {
static: true,
visible: true,
},
});
};
const createComponent = createComponentFactory(shallowMount);
const createFullComponent = createComponentFactory(mount);
const findModal = () => wrapper.findComponent(GlModal);
const findForm = () => wrapper.findComponent({ ref: 'form' });
const findForm = () => findModal().findComponent(GlForm);
afterEach(() => {
wrapper.destroy();
@ -59,7 +66,8 @@ describe('DeleteBlobModal', () => {
});
it('submits the form', async () => {
createComponent();
createFullComponent();
await nextTick();
const submitSpy = jest.spyOn(findForm().element, 'submit');
findModal().vm.$emit('primary', { preventDefault: () => {} });

View File

@ -0,0 +1,39 @@
# frozen_string_literal: true
RSpec.shared_examples_for 'pill_count formatted results' do
let(:count_service) { raise NotImplementedError }
subject(:pill_count) { menu.pill_count }
it 'returns all digits for count value under 1000' do
allow_next_instance_of(count_service) do |service|
allow(service).to receive(:count).and_return(999)
end
expect(pill_count).to eq('999')
end
it 'returns truncated digits for count value over 1000' do
allow_next_instance_of(count_service) do |service|
allow(service).to receive(:count).and_return(2300)
end
expect(pill_count).to eq('2.3k')
end
it 'returns truncated digits for count value over 10000' do
allow_next_instance_of(count_service) do |service|
allow(service).to receive(:count).and_return(12560)
end
expect(pill_count).to eq('12.6k')
end
it 'returns truncated digits for count value over 100000' do
allow_next_instance_of(count_service) do |service|
allow(service).to receive(:count).and_return(112560)
end
expect(pill_count).to eq('112.6k')
end
end

View File

@ -128,10 +128,6 @@ RSpec.shared_examples 'Debian Distribution' do |factory, container, can_freeze|
it { is_expected.not_to allow_value(12.hours.to_i).for(:valid_time_duration_seconds) }
end
describe '#signing_keys' do
it { is_expected.to validate_absence_of(:signing_keys) }
end
describe '#file' do
it { is_expected.not_to validate_presence_of(:file) }
end
@ -141,7 +137,15 @@ RSpec.shared_examples 'Debian Distribution' do |factory, container, can_freeze|
end
describe '#file_signature' do
it { is_expected.to validate_absence_of(:file_signature) }
it { is_expected.not_to validate_absence_of(:file_signature) }
end
describe '#signed_file' do
it { is_expected.not_to validate_presence_of(:signed_file) }
end
describe '#signed_file_store' do
it { is_expected.to validate_presence_of(:signed_file_store) }
end
end

View File

@ -47,6 +47,16 @@ RSpec.describe Packages::Debian::DistributionReleaseFileUploader do
end
end
end
describe '#filename' do
it { expect(subject.filename).to eq('Release')}
context 'with signed_file' do
let(:uploader) { described_class.new(distribution, :signed_file) }
it { expect(subject.filename).to eq('InRelease')}
end
end
end
end
end

View File

@ -898,10 +898,10 @@
stylelint-declaration-strict-value "1.7.7"
stylelint-scss "3.18.0"
"@gitlab/svgs@1.202.0":
version "1.202.0"
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.202.0.tgz#dbfad291fc5f597f0d31ca6a694fa8e78af57847"
integrity sha512-gnTSeb0o5UuUaDdjg1uzvVgETnXNyu0ta7arAHWOmLjDfXINwF6COR+ItM3ZVD//qUFSwYaCozgrDR642QAL4Q==
"@gitlab/svgs@1.205.0":
version "1.205.0"
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.205.0.tgz#f8c084b6ef6a5f7eec676710f2c873992ebc2c83"
integrity sha512-cO9uqVCKE8O5ABlCd0m4W9EQrKwQyc536sF9KjwoLAxbqel8mlIo0C3HVIb367NuOpS2IWZdjN7GlNhulwffVA==
"@gitlab/tributejs@1.0.0":
version "1.0.0"