diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-29 15:08:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-29 15:08:33 +0000 |
commit | 44b15934c77bcae799de0ada49e49e971e97cbbd (patch) | |
tree | e0f0f2df207e5d49fe2d26870b8cbf27326f4d83 | |
parent | 4ef4c552f3b1a5c25ec716f0f2c4e3c92a078e2b (diff) | |
download | gitlab-ce-44b15934c77bcae799de0ada49e49e971e97cbbd.tar.gz |
Add latest changes from gitlab-org/gitlab@master
15 files changed, 47 insertions, 100 deletions
diff --git a/app/assets/javascripts/packages_and_registries/container_registry/explorer/components/list_page/registry_header.vue b/app/assets/javascripts/packages_and_registries/container_registry/explorer/components/list_page/registry_header.vue index 154e176dc6e..4ffd8390e4d 100644 --- a/app/assets/javascripts/packages_and_registries/container_registry/explorer/components/list_page/registry_header.vue +++ b/app/assets/javascripts/packages_and_registries/container_registry/explorer/components/list_page/registry_header.vue @@ -7,7 +7,6 @@ import TitleArea from '~/vue_shared/components/registry/title_area.vue'; import { CONTAINER_REGISTRY_TITLE, - LIST_INTRO_TEXT, EXPIRATION_POLICY_WILL_RUN_IN, EXPIRATION_POLICY_DISABLED_TEXT, SET_UP_CLEANUP, @@ -87,19 +86,12 @@ export default { ? sprintf(EXPIRATION_POLICY_WILL_RUN_IN, { time: this.timeTillRun }) : EXPIRATION_POLICY_DISABLED_TEXT; }, - infoMessages() { - return [{ text: LIST_INTRO_TEXT, link: this.helpPagePath }]; - }, }, }; </script> <template> - <title-area - :title="$options.i18n.CONTAINER_REGISTRY_TITLE" - :info-messages="infoMessages" - :metadata-loading="metadataLoading" - > + <title-area :title="$options.i18n.CONTAINER_REGISTRY_TITLE" :metadata-loading="metadataLoading"> <template #right-actions> <slot name="commands"></slot> </template> diff --git a/app/assets/javascripts/packages_and_registries/container_registry/explorer/constants/list.js b/app/assets/javascripts/packages_and_registries/container_registry/explorer/constants/list.js index c7022d6070f..ceaf8a65a10 100644 --- a/app/assets/javascripts/packages_and_registries/container_registry/explorer/constants/list.js +++ b/app/assets/javascripts/packages_and_registries/container_registry/explorer/constants/list.js @@ -8,9 +8,6 @@ export const CONNECTION_ERROR_TITLE = s__('ContainerRegistry|Docker connection e export const CONNECTION_ERROR_MESSAGE = s__( `ContainerRegistry|We are having trouble connecting to the Container Registry. Please try refreshing the page. If this error persists, please review %{docLinkStart}the troubleshooting documentation%{docLinkEnd}.`, ); -export const LIST_INTRO_TEXT = s__( - `ContainerRegistry|With the GitLab Container Registry, every project can have its own space to store images. %{docLinkStart}More information%{docLinkEnd}`, -); export const LIST_DELETE_BUTTON_DISABLED = s__( 'ContainerRegistry|Missing or insufficient permission, delete button disabled', ); diff --git a/app/assets/javascripts/packages_and_registries/dependency_proxy/app.vue b/app/assets/javascripts/packages_and_registries/dependency_proxy/app.vue index 5689e0c04f3..9ecd0dd70fe 100644 --- a/app/assets/javascripts/packages_and_registries/dependency_proxy/app.vue +++ b/app/assets/javascripts/packages_and_registries/dependency_proxy/app.vue @@ -16,10 +16,7 @@ import Api from '~/api'; import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; import TitleArea from '~/vue_shared/components/registry/title_area.vue'; import ManifestsList from '~/packages_and_registries/dependency_proxy/components/manifests_list.vue'; -import { - DEPENDENCY_PROXY_SETTINGS_DESCRIPTION, - DEPENDENCY_PROXY_DOCS_PATH, -} from '~/packages_and_registries/settings/group/constants'; +import { DEPENDENCY_PROXY_DOCS_PATH } from '~/packages_and_registries/settings/group/constants'; import { GRAPHQL_PAGE_SIZE } from '~/packages_and_registries/dependency_proxy/constants'; import getDependencyProxyDetailsQuery from '~/packages_and_registries/dependency_proxy/graphql/queries/get_dependency_proxy_details.query.graphql'; @@ -89,15 +86,6 @@ export default { }, }, computed: { - infoMessages() { - return [ - { - text: DEPENDENCY_PROXY_SETTINGS_DESCRIPTION, - link: DEPENDENCY_PROXY_DOCS_PATH, - }, - ]; - }, - queryVariables() { return { fullPath: this.groupPath, first: GRAPHQL_PAGE_SIZE }; }, @@ -181,7 +169,7 @@ export default { > {{ deleteCacheAlertMessage }} </gl-alert> - <title-area :title="$options.i18n.pageTitle" :info-messages="infoMessages"> + <title-area :title="$options.i18n.pageTitle"> <template v-if="showDeleteDropdown" #right-actions> <gl-dropdown icon="ellipsis_v" diff --git a/app/assets/javascripts/packages_and_registries/package_registry/components/list/package_title.vue b/app/assets/javascripts/packages_and_registries/package_registry/components/list/package_title.vue index bf41c36e09b..440e11a99f2 100644 --- a/app/assets/javascripts/packages_and_registries/package_registry/components/list/package_title.vue +++ b/app/assets/javascripts/packages_and_registries/package_registry/components/list/package_title.vue @@ -27,21 +27,15 @@ export default { packageAmountText() { return n__(`%d Package`, `%d Packages`, this.count); }, - infoMessages() { - return [{ text: this.$options.i18n.LIST_INTRO_TEXT, link: this.helpUrl }]; - }, }, i18n: { LIST_TITLE_TEXT: s__('PackageRegistry|Package Registry'), - LIST_INTRO_TEXT: s__( - 'PackageRegistry|Publish and share packages for a variety of common package managers. %{docLinkStart}More information%{docLinkEnd}', - ), }, }; </script> <template> - <title-area :title="$options.i18n.LIST_TITLE_TEXT" :info-messages="infoMessages"> + <title-area :title="$options.i18n.LIST_TITLE_TEXT"> <template #metadata-amount> <metadata-item v-if="showPackageCount" icon="package" :text="packageAmountText" /> </template> diff --git a/app/assets/javascripts/packages_and_registries/settings/group/components/dependency_proxy_settings.vue b/app/assets/javascripts/packages_and_registries/settings/group/components/dependency_proxy_settings.vue index fd62fe144b2..a5189201112 100644 --- a/app/assets/javascripts/packages_and_registries/settings/group/components/dependency_proxy_settings.vue +++ b/app/assets/javascripts/packages_and_registries/settings/group/components/dependency_proxy_settings.vue @@ -13,7 +13,6 @@ import { import { DEPENDENCY_PROXY_HEADER, - DEPENDENCY_PROXY_SETTINGS_DESCRIPTION, DEPENDENCY_PROXY_DOCS_PATH, } from '~/packages_and_registries/settings/group/constants'; @@ -28,7 +27,6 @@ export default { }, i18n: { DEPENDENCY_PROXY_HEADER, - DEPENDENCY_PROXY_SETTINGS_DESCRIPTION, enabledProxyLabel: s__('DependencyProxy|Enable Dependency Proxy'), enabledProxyHelpText: s__( 'DependencyProxy|To see the image prefix and what is in the cache, visit the %{linkStart}Dependency Proxy%{linkEnd}', @@ -140,19 +138,6 @@ export default { data-qa-selector="dependency_proxy_settings_content" > <template #title> {{ $options.i18n.DEPENDENCY_PROXY_HEADER }} </template> - <template #description> - <span data-testid="description"> - <gl-sprintf :message="$options.i18n.DEPENDENCY_PROXY_SETTINGS_DESCRIPTION"> - <template #docLink="{ content }"> - <gl-link - data-testid="description-link" - :href="$options.links.DEPENDENCY_PROXY_DOCS_PATH" - >{{ content }}</gl-link - > - </template> - </gl-sprintf> - </span> - </template> <template #default> <div> <gl-toggle diff --git a/app/assets/javascripts/packages_and_registries/settings/group/constants.js b/app/assets/javascripts/packages_and_registries/settings/group/constants.js index c858f96cac7..0249b475e46 100644 --- a/app/assets/javascripts/packages_and_registries/settings/group/constants.js +++ b/app/assets/javascripts/packages_and_registries/settings/group/constants.js @@ -19,9 +19,6 @@ export const DUPLICATES_SETTINGS_EXCEPTION_LEGEND = s__( ); export const DEPENDENCY_PROXY_HEADER = s__('DependencyProxy|Dependency Proxy'); -export const DEPENDENCY_PROXY_SETTINGS_DESCRIPTION = s__( - 'DependencyProxy|Create a local proxy for storing frequently used upstream images. %{docLinkStart}Learn more%{docLinkEnd} about dependency proxies.', -); // Parameters diff --git a/doc/administration/troubleshooting/log_parsing.md b/doc/administration/troubleshooting/log_parsing.md index c5b1d302db2..d8f21f1676c 100644 --- a/doc/administration/troubleshooting/log_parsing.md +++ b/doc/administration/troubleshooting/log_parsing.md @@ -81,7 +81,7 @@ jq 'select(.status >= 500)' <FILE> #### Top 10 slowest requests ```shell -jq -s 'sort_by(-.duration) | limit(10; .[])' <FILE> +jq -s 'sort_by(-.duration_s) | limit(10; .[])' <FILE> ``` #### Find and pretty print all requests related to a project @@ -93,7 +93,7 @@ grep <PROJECT_NAME> <FILE> | jq . #### Find all requests with a total duration > 5 seconds ```shell -jq 'select(.duration > 5000)' <FILE> +jq 'select(.duration_s > 5000)' <FILE> ``` #### Find all project requests with more than 5 rugged calls @@ -105,13 +105,13 @@ grep <PROJECT_NAME> <FILE> | jq 'select(.rugged_calls > 5)' #### Find all requests with a Gitaly duration > 10 seconds ```shell -jq 'select(.gitaly_duration > 10000)' <FILE> +jq 'select(.gitaly_duration_s > 10000)' <FILE> ``` #### Find all requests with a queue duration > 10 seconds ```shell -jq 'select(.queue_duration > 10000)' <FILE> +jq 'select(.queue_duration_s > 10000)' <FILE> ``` #### Top 10 requests by # of Gitaly calls @@ -125,7 +125,7 @@ jq -s 'map(select(.gitaly_calls != null)) | sort_by(-.gitaly_calls) | limit(10; #### Print the top three controller methods by request volume and their three longest durations ```shell -jq -s -r 'group_by(.controller+.action) | sort_by(-length) | limit(3; .[]) | sort_by(-.duration) | "CT: \(length)\tMETHOD: \(.[0].controller)#\(.[0].action)\tDURS: \(.[0].duration), \(.[1].duration), \(.[2].duration)"' production_json.log +jq -s -r 'group_by(.controller+.action) | sort_by(-length) | limit(3; .[]) | sort_by(-.duration_s) | "CT: \(length)\tMETHOD: \(.[0].controller)#\(.[0].action)\tDURS: \(.[0].duration_s), \(.[1].duration_s), \(.[2].duration_s)"' production_json.log ``` **Example output** @@ -141,7 +141,7 @@ CT: 1328 METHOD: Projects::NotesController#index DURS: 403.99, 386.29, 384.3 #### Print top three routes with request count and their three longest durations ```shell -jq -s -r 'group_by(.route) | sort_by(-length) | limit(3; .[]) | sort_by(-.duration) | "CT: \(length)\tROUTE: \(.[0].route)\tDURS: \(.[0].duration), \(.[1].duration), \(.[2].duration)"' api_json.log +jq -s -r 'group_by(.route) | sort_by(-length) | limit(3; .[]) | sort_by(-.duration_s) | "CT: \(length)\tROUTE: \(.[0].route)\tDURS: \(.[0].duration_s), \(.[1].duration_s), \(.[2].duration_s)"' api_json.log ``` **Example output** diff --git a/doc/api/job_artifacts.md b/doc/api/job_artifacts.md index 517ffde0046..ee9f1678b18 100644 --- a/doc/api/job_artifacts.md +++ b/doc/api/job_artifacts.md @@ -171,6 +171,9 @@ Download a single artifact file for a specific job of the latest successful pipeline for the given reference name from inside the job's artifacts archive. The file is extracted from the archive and streamed to the client. +The artifact file provides more detail than what is available in the +[CSV export](../user/application_security/vulnerability_report/index.md#export-vulnerability-details). + In [GitLab 13.5](https://gitlab.com/gitlab-org/gitlab/-/issues/201784) and later, artifacts for [parent and child pipelines](../ci/pipelines/parent_child_pipelines.md) are searched in hierarchical order from parent to child. For example, if both parent and child pipelines have a diff --git a/doc/user/application_security/sast/index.md b/doc/user/application_security/sast/index.md index 8f006f258b6..05418c0e57f 100644 --- a/doc/user/application_security/sast/index.md +++ b/doc/user/application_security/sast/index.md @@ -13,12 +13,17 @@ The whitepaper ["A Seismic Shift in Application Security"](https://about.gitlab. explains how 4 of the top 6 attacks were application based. Download it to learn how to protect your organization. -If you're using [GitLab CI/CD](../../../ci/index.md), you can use Static Application Security -Testing (SAST) to check your source code for known vulnerabilities. -If the pipeline is associated with a merge request, the SAST analysis is compared with the results of -the target branch's analysis (if available). The results of that comparison are shown in the merge -request. If the pipeline is running from the default branch, the results of the SAST -analysis are available in the [security dashboards](../security_dashboard/index.md). +If you’re using [GitLab CI/CD](../../../ci/index.md), you can use Static Application Security +Testing (SAST) to check your source code for known vulnerabilities. You can run SAST analyzers in +any GitLab tier. The analyzers output JSON-formatted reports as job artifacts. + +With GitLab Ultimate, SAST results are also processed so you can: + +- See them in merge requests. +- Use them in approval workflows. +- Review them in the security dashboard. + +For more details, see the [Summary of features per tier](#summary-of-features-per-tier). ![SAST results shown in the MR widget](img/sast_results_in_mr_v14_0.png) diff --git a/doc/user/application_security/vulnerability_report/index.md b/doc/user/application_security/vulnerability_report/index.md index a9cef15e3e8..1e390b1a319 100644 --- a/doc/user/application_security/vulnerability_report/index.md +++ b/doc/user/application_security/vulnerability_report/index.md @@ -190,13 +190,19 @@ Fields included are: - Scanner name - Status - Vulnerability -- Details +- Basic details - Additional information - Severity - [CVE](https://cve.mitre.org/) (Common Vulnerabilities and Exposures) - [CWE](https://cwe.mitre.org/) (Common Weakness Enumeration) - Other identifiers +NOTE: +Full details are available through our +[Job Artifacts API](../../../api/job_artifacts.md#download-a-single-artifact-file-from-specific-tag-or-branch). +Use one of the `gl-*-report.json` report filenames in place of `*artifact_path` +to obtain, for example, the path of files in which vulnerabilities were detected. + ### Export details in CSV format To export details of all vulnerabilities listed in the Vulnerability Report, select **Export**. diff --git a/doc/user/usage_quotas.md b/doc/user/usage_quotas.md index 84a2449f481..21aa93d3f8b 100644 --- a/doc/user/usage_quotas.md +++ b/doc/user/usage_quotas.md @@ -48,6 +48,19 @@ The following storage usage statistics are available to a maintainer: - Total excess storage used: Total amount of storage used that exceeds their allocated storage. - Purchased storage available: Total storage that has been purchased but is not yet used. +## Manage your storage usage + +You can use several methods to manage and reduce your usage for some storage types. + +For more information, see the following pages: + +- [Reduce package registry storage](packages/package_registry/reduce_package_registry_storage.md) +- [Reduce dependency proxy storage](packages/dependency_proxy/reduce_dependency_proxy_storage.md) +- [Reduce repository size](project/repository/reducing_the_repo_size_using_git.md) +- [Reduce container registry storage](packages/container_registry/reduce_container_registry_storage.md) +- [Reduce container registry data transfers](packages/container_registry/reduce_container_registry_data_transfer.md) +- [Reduce wiki repository size](../administration/wikis/index.md#reduce-wiki-repository-size) + ## Excess storage usage Excess storage usage is the amount that a project's repository exceeds the free storage quota. If no diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 8292a398295..369c7f20923 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -10035,9 +10035,6 @@ msgstr "" msgid "ContainerRegistry|With the Container Registry, every project can have its own space to store its Docker images. Push at least one Docker image in one of this group's projects in order to show up here. %{docLinkStart}More Information%{docLinkEnd}" msgstr "" -msgid "ContainerRegistry|With the GitLab Container Registry, every project can have its own space to store images. %{docLinkStart}More information%{docLinkEnd}" -msgstr "" - msgid "ContainerRegistry|You are about to remove %{item} tags. Are you sure?" msgstr "" @@ -12312,9 +12309,6 @@ msgstr "" msgid "DependencyProxy|Copy prefix" msgstr "" -msgid "DependencyProxy|Create a local proxy for storing frequently used upstream images. %{docLinkStart}Learn more%{docLinkEnd} about dependency proxies." -msgstr "" - msgid "DependencyProxy|Dependency Proxy" msgstr "" @@ -27038,9 +27032,6 @@ msgstr "" msgid "PackageRegistry|Project-level" msgstr "" -msgid "PackageRegistry|Publish and share packages for a variety of common package managers. %{docLinkStart}More information%{docLinkEnd}" -msgstr "" - msgid "PackageRegistry|Publish packages if their name or version matches this regex." msgstr "" diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/registry_header_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/registry_header_spec.js index 7d09c09d03b..f811468550d 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/registry_header_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/list_page/registry_header_spec.js @@ -4,7 +4,6 @@ import { nextTick } from 'vue'; import Component from '~/packages_and_registries/container_registry/explorer/components/list_page/registry_header.vue'; import { CONTAINER_REGISTRY_TITLE, - LIST_INTRO_TEXT, EXPIRATION_POLICY_DISABLED_TEXT, SET_UP_CLEANUP, } from '~/packages_and_registries/container_registry/explorer/constants'; @@ -135,9 +134,7 @@ describe('registry_header', () => { it('is correctly bound to title_area props', () => { mountComponent({ helpPagePath: 'foo' }); - expect(findTitleArea().props('infoMessages')).toEqual([ - { text: LIST_INTRO_TEXT, link: 'foo' }, - ]); + expect(findTitleArea().props('infoMessages')).toEqual([]); }); }); }); diff --git a/spec/frontend/packages_and_registries/package_registry/components/list/packages_title_spec.js b/spec/frontend/packages_and_registries/package_registry/components/list/packages_title_spec.js index e992ba12faa..23e5c7330d5 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/list/packages_title_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/list/packages_title_spec.js @@ -37,7 +37,7 @@ describe('PackageTitle', () => { expect(findTitleArea().props()).toMatchObject({ title: PackageTitle.i18n.LIST_TITLE_TEXT, - infoMessages: [{ text: PackageTitle.i18n.LIST_INTRO_TEXT, link: 'foo' }], + infoMessages: [], }); }); }); diff --git a/spec/frontend/packages_and_registries/settings/group/components/dependency_proxy_settings_spec.js b/spec/frontend/packages_and_registries/settings/group/components/dependency_proxy_settings_spec.js index 94f56e5c979..22754d31f93 100644 --- a/spec/frontend/packages_and_registries/settings/group/components/dependency_proxy_settings_spec.js +++ b/spec/frontend/packages_and_registries/settings/group/components/dependency_proxy_settings_spec.js @@ -6,11 +6,7 @@ import createMockApollo from 'helpers/mock_apollo_helper'; import waitForPromises from 'helpers/wait_for_promises'; import component from '~/packages_and_registries/settings/group/components/dependency_proxy_settings.vue'; -import { - DEPENDENCY_PROXY_HEADER, - DEPENDENCY_PROXY_SETTINGS_DESCRIPTION, - DEPENDENCY_PROXY_DOCS_PATH, -} from '~/packages_and_registries/settings/group/constants'; +import { DEPENDENCY_PROXY_HEADER } from '~/packages_and_registries/settings/group/constants'; import updateDependencyProxySettings from '~/packages_and_registries/settings/group/graphql/mutations/update_dependency_proxy_settings.mutation.graphql'; import updateDependencyProxyImageTtlGroupPolicy from '~/packages_and_registries/settings/group/graphql/mutations/update_dependency_proxy_image_ttl_group_policy.mutation.graphql'; @@ -91,8 +87,6 @@ describe('DependencyProxySettings', () => { const findSettingsBlock = () => wrapper.findComponent(SettingsBlock); const findSettingsTitles = () => wrapper.findComponent(SettingsTitles); - const findDescription = () => wrapper.findByTestId('description'); - const findDescriptionLink = () => wrapper.findByTestId('description-link'); const findEnableProxyToggle = () => wrapper.findByTestId('dependency-proxy-setting-toggle'); const findEnableTtlPoliciesToggle = () => wrapper.findByTestId('dependency-proxy-ttl-policies-toggle'); @@ -126,21 +120,6 @@ describe('DependencyProxySettings', () => { expect(wrapper.text()).toContain(DEPENDENCY_PROXY_HEADER); }); - it('has the correct description text', () => { - mountComponent(); - - expect(findDescription().text()).toMatchInterpolatedText(DEPENDENCY_PROXY_SETTINGS_DESCRIPTION); - }); - - it('has the correct link', () => { - mountComponent(); - - expect(findDescriptionLink().attributes()).toMatchObject({ - href: DEPENDENCY_PROXY_DOCS_PATH, - }); - expect(findDescriptionLink().text()).toBe('Learn more'); - }); - describe('enable toggle', () => { it('exists', () => { mountComponent(); |