diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index dcd1a54b521..0304e8020fc 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -5c57bbfef4f37bcca64e3db2e147265450b86300 +080f9fb5c6d7e1e5e3c3e2a5202b3f0a83ddd180 diff --git a/app/controllers/admin/application_settings/appearances_controller.rb b/app/controllers/admin/application_settings/appearances_controller.rb index 47b2356a60f..cf765c96a8f 100644 --- a/app/controllers/admin/application_settings/appearances_controller.rb +++ b/app/controllers/admin/application_settings/appearances_controller.rb @@ -4,6 +4,7 @@ class Admin::ApplicationSettings::AppearancesController < Admin::ApplicationCont before_action :set_appearance, except: :create feature_category :navigation + urgency :low def show end diff --git a/app/controllers/admin/broadcast_messages_controller.rb b/app/controllers/admin/broadcast_messages_controller.rb index 8b672929f88..865af244773 100644 --- a/app/controllers/admin/broadcast_messages_controller.rb +++ b/app/controllers/admin/broadcast_messages_controller.rb @@ -6,6 +6,7 @@ class Admin::BroadcastMessagesController < Admin::ApplicationController before_action :finder, only: [:edit, :update, :destroy] feature_category :navigation + urgency :low # rubocop: disable CodeReuse/ActiveRecord def index diff --git a/app/controllers/groups/autocomplete_sources_controller.rb b/app/controllers/groups/autocomplete_sources_controller.rb index a2eb475d360..171494e66bd 100644 --- a/app/controllers/groups/autocomplete_sources_controller.rb +++ b/app/controllers/groups/autocomplete_sources_controller.rb @@ -5,8 +5,7 @@ class Groups::AutocompleteSourcesController < Groups::ApplicationController feature_category :team_planning, [:issues, :labels, :milestones, :commands] feature_category :code_review, [:merge_requests] - urgency :low, [:issues, :labels, :milestones, :commands] - urgency :low, [:merge_requests] + urgency :low, [:issues, :labels, :milestones, :commands, :merge_requests, :members] def members render json: ::Groups::ParticipantsService.new(@group, current_user).execute(target) diff --git a/app/controllers/groups/email_campaigns_controller.rb b/app/controllers/groups/email_campaigns_controller.rb index 70c8a23d918..38087e3fc11 100644 --- a/app/controllers/groups/email_campaigns_controller.rb +++ b/app/controllers/groups/email_campaigns_controller.rb @@ -4,6 +4,7 @@ class Groups::EmailCampaignsController < Groups::ApplicationController EMAIL_CAMPAIGNS_SCHEMA_URL = 'iglu:com.gitlab/email_campaigns/jsonschema/1-0-0' feature_category :navigation + urgency :low before_action :check_params diff --git a/app/controllers/projects/usage_quotas_controller.rb b/app/controllers/projects/usage_quotas_controller.rb index f45ee265432..07a3c010f4f 100644 --- a/app/controllers/projects/usage_quotas_controller.rb +++ b/app/controllers/projects/usage_quotas_controller.rb @@ -6,6 +6,7 @@ class Projects::UsageQuotasController < Projects::ApplicationController layout "project_settings" feature_category :utilization + urgency :low def index @hide_search_settings = true diff --git a/app/controllers/pwa_controller.rb b/app/controllers/pwa_controller.rb index 2345182a624..8de1b10e1f1 100644 --- a/app/controllers/pwa_controller.rb +++ b/app/controllers/pwa_controller.rb @@ -4,6 +4,7 @@ class PwaController < ApplicationController # rubocop:disable Gitlab/NamespacedC layout 'errors' feature_category :navigation + urgency :low skip_before_action :authenticate_user! diff --git a/app/controllers/users/callouts_controller.rb b/app/controllers/users/callouts_controller.rb index fe308d9dd1e..f94ef9063c3 100644 --- a/app/controllers/users/callouts_controller.rb +++ b/app/controllers/users/callouts_controller.rb @@ -3,6 +3,7 @@ module Users class CalloutsController < ApplicationController feature_category :navigation + urgency :low def create if callout.persisted? diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 794d60e733d..37c4ffe2a5e 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -34,8 +34,8 @@ class UsersController < ApplicationController feature_category :snippets, [:snippets] # TODO: Set higher urgency after resolving https://gitlab.com/gitlab-org/gitlab/-/issues/357914 - urgency :low, [:show, :calendar_activities, :contributed, :activity, :projects, :groups] - urgency :default, [:calendar, :followers, :following, :starred] + urgency :low, [:show, :calendar_activities, :contributed, :activity, :projects, :groups, :calendar] + urgency :default, [:followers, :following, :starred] urgency :high, [:exists] def show diff --git a/app/controllers/whats_new_controller.rb b/app/controllers/whats_new_controller.rb index 6f389aa4924..4decd7f1bee 100644 --- a/app/controllers/whats_new_controller.rb +++ b/app/controllers/whats_new_controller.rb @@ -9,6 +9,7 @@ class WhatsNewController < ApplicationController before_action :check_valid_page_param, :set_pagination_headers feature_category :navigation + urgency :low def index respond_to do |format| diff --git a/app/models/namespace/root_storage_statistics.rb b/app/models/namespace/root_storage_statistics.rb index 96715863892..6a0aa52393d 100644 --- a/app/models/namespace/root_storage_statistics.rb +++ b/app/models/namespace/root_storage_statistics.rb @@ -44,15 +44,28 @@ class Namespace::RootStorageStatistics < ApplicationRecord def merged_attributes attributes_from_project_statistics.merge!( attributes_from_personal_snippets, - attributes_from_namespace_statistics + attributes_from_namespace_statistics, + attributes_for_container_registry_size ) { |key, v1, v2| v1 + v2 } end + def attributes_for_container_registry_size + return {} unless Feature.enabled?(:container_registry_namespace_statistics, namespace) + + container_registry_size = namespace.container_repositories_size || 0 + + { + storage_size: container_registry_size, + container_registry_size: container_registry_size + }.with_indifferent_access + end + def attributes_from_project_statistics from_project_statistics - .take - .attributes - .slice(*STATISTICS_ATTRIBUTES) + .take + .attributes + .slice(*STATISTICS_ATTRIBUTES) + .with_indifferent_access end def from_project_statistics @@ -74,7 +87,10 @@ class Namespace::RootStorageStatistics < ApplicationRecord def attributes_from_personal_snippets return {} unless namespace.user_namespace? - from_personal_snippets.take.slice(SNIPPETS_SIZE_STAT_NAME) + from_personal_snippets + .take + .slice(SNIPPETS_SIZE_STAT_NAME) + .with_indifferent_access end def from_personal_snippets @@ -102,7 +118,12 @@ class Namespace::RootStorageStatistics < ApplicationRecord # guard clause. return {} unless namespace.group_namespace? - from_namespace_statistics.take.slice(*self.class.namespace_statistics_attributes) + from_namespace_statistics + .take + .slice( + *self.class.namespace_statistics_attributes + ) + .with_indifferent_access end end diff --git a/config/feature_flags/development/container_registry_namespace_statistics.yml b/config/feature_flags/development/container_registry_namespace_statistics.yml new file mode 100644 index 00000000000..8142f757606 --- /dev/null +++ b/config/feature_flags/development/container_registry_namespace_statistics.yml @@ -0,0 +1,8 @@ +--- +name: container_registry_namespace_statistics +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/87080 +rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/361960 +milestone: '15.0' +type: development +group: group::utilization +default_enabled: false diff --git a/db/migrate/20220221102333_change_maintainer_note_limit_in_ci_runner.rb b/db/migrate/20220221102333_change_maintainer_note_limit_in_ci_runner.rb new file mode 100644 index 00000000000..a3d71a060b8 --- /dev/null +++ b/db/migrate/20220221102333_change_maintainer_note_limit_in_ci_runner.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +class ChangeMaintainerNoteLimitInCiRunner < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + add_text_limit( + :ci_runners, + :maintainer_note, + 1024, + constraint_name: check_constraint_name(:ci_runners, :maintainer_note, 'max_length_1MB') + ) + + remove_text_limit( + :ci_runners, + :maintainer_note, + constraint_name: check_constraint_name(:ci_runners, :maintainer_note, 'max_length') + ) + end + + def down + # no-op: Danger of failing if there are records with length(maintainer_note) > 255 + end +end diff --git a/db/migrate/20220221102333_change_maintenance_note_limit_in_ci_runner.rb db/migrate/20220221102333_change_maintainer_note_limit_in_ci_runner.rb b/db/migrate/20220221102333_change_maintenance_note_limit_in_ci_runner.rb db/migrate/20220221102333_change_maintainer_note_limit_in_ci_runner.rb deleted file mode 100644 index 98930691b3b..00000000000 --- a/db/migrate/20220221102333_change_maintenance_note_limit_in_ci_runner.rb db/migrate/20220221102333_change_maintainer_note_limit_in_ci_runner.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class ChangeMaintainerNoteLimitInCiRunner < Gitlab::Database::Migration[1.0] - disable_ddl_transaction! - - def up - add_text_limit :ci_runners, :maintainer_note, 1024, constraint_name: check_constraint_name(:ci_runners, :maintainer_note, 'max_length_1MB') - remove_text_limit :ci_runners, :maintainer_note, constraint_name: check_constraint_name(:ci_runners, :maintainer_note, 'max_length') - end - - def down - # no-op: Danger of failing if there are records with length(maintainer_note) > 255 - end -end diff --git a/doc/ci/pipelines/cicd_minutes.md b/doc/ci/pipelines/cicd_minutes.md index 8242deca996..55a81933e82 100644 --- a/doc/ci/pipelines/cicd_minutes.md +++ b/doc/ci/pipelines/cicd_minutes.md @@ -131,6 +131,7 @@ so be sure to select the correct group. 1. On the top bar, select **Menu > Groups** and find your group. 1. On the left sidebar, select **Settings > Usage Quotas**. +1. Select **Pipelines**. 1. Select **Buy additional minutes**. 1. Complete the details of the transaction. diff --git a/doc/development/pages/index.md b/doc/development/pages/index.md new file mode 100644 index 00000000000..8049d8c0a48 --- /dev/null +++ b/doc/development/pages/index.md @@ -0,0 +1,218 @@ +--- +type: reference, dev +stage: Create +group: Editor +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 +description: "GitLab's development guidelines for GitLab Pages" +--- + +# Getting started with development + +## Configuring GitLab Pages hostname + +GitLab Pages needs a hostname or domain, as each different GitLab Pages site is accessed via a +subdomain. GitLab Pages hostname can be set in different manners: + +- [Without wildcard, editing your hosts file](#without-wildcard-editing-your-hosts-file). +- [With DNS wildcard alternatives](#with-dns-wildcard-alternatives). + +### Without wildcard, editing your hosts file + +As `/etc/hosts` don't support wildcard hostnames, you must configure one entry +for GitLab Pages, and then one entry for each page site: + + ```plaintext + 127.0.0.1 gdk.test # If you're using GDK + 127.0.0.1 pages.gdk.test # Pages host + # Any namespace/group/user needs to be added + # as a subdomain to the pages host. This is because + # /etc/hosts doesn't accept wildcards + 127.0.0.1 root.pages.gdk.test # for the root pages + ``` + +### With DNS wildcard alternatives + +If instead of editing your `/etc/hosts` you'd prefer to use a DNS wildcard, you can use: + +- [`nip.io`](https://nip.io) +- [`dnsmasq`](https://wiki.debian.org/dnsmasq) + +## Configuring GitLab Pages without GDK + +Create a `gitlab-pages.conf` in the root of the GitLab Pages site, like: + +```toml +# Default port is 3010, but you can use any other +listen-http=:3010 + +# Your local GitLab Pages domain +pages-domain=pages.gdk.test + +# Directory where the pages are stored +pages-root=shared/pages + +# Show more information in the logs +log-verbose=true +``` + +To see more options you can check +[`internal/config/flags.go`](https://gitlab.com/gitlab-org/gitlab-pages/blob/master/internal/config/flags.go) +or run `gitlab-pages --help`. + +### Running GitLab Pages manually + +For any changes in the code, you must run `make` to build the app. It's best to just always run +it before you start the app. It's quick to build so don't worry! + +```shell +make && ./gitlab-pages -config=gitlab-pages.conf +``` + +## Configuring GitLab Pages with GDK + +In the following steps, `$GDK_ROOT` is the directory where you cloned GDK. + +1. Set up the [GDK hostname](https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/local_network.md). +1. Add a [GitLab Pages hostname](#configuring-gitlab-pages-hostname) to the `gdk.yml`: + + ```yaml + gitlab_pages: + enabled: true # enable GitLab Pages to be managed by gdk + port: 3010 # default port is 3010 + host: pages.gdk.test # the GitLab Pages domain + auto_update: true # if gdk must update GitLab Pages git + verbose: true # show more information in the logs + ``` + +### Running GitLab Pages with GDK + +After these configurations are set, GDK manages a GitLab Pages process, giving you access to +it with commands like: + +- Start: `gdk start gitlab-pages` +- Stop: `gdk stop gitlab-pages` +- Restart: `gdk restart gitlab-pages` +- Tail logs: `gdk tail gitlab-pages` + +### Running GitLab Pages manually + +You can also build and start the app independent of GDK processes management. + +For any changes in the code, you must run `make` to build the app. It's best to just always run +it before you start the app. It's quick to build so don't worry! + +```shell +make && ./gitlab-pages -config=gitlab-pages.conf +``` + +#### Building GitLab Pages in FIPS mode + +```shell +FIPS_MODE=1 make && ./gitlab-pages -config=gitlab-pages.conf +``` + +### Creating GitLab Pages site + +To build a GitLab Pages site locally you must +[configure `gitlab-runner`](https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/runner.md) + +Check the [user manual](../../user/project/pages/index.md). + +### Enabling access control + +GitLab Pages support private sites. Private sites can be accessed only by users +who have access to your GitLab project. + +GitLab Pages access control is disabled by default. To enable it: + +1. Enable the GitLab Pages access control in GitLab itself, which can be done by either: + - If you're not using GDK, editing `gitlab.yml`: + + ```yaml + # gitlab/config/gitlab.yml + pages: + access_control: true + ``` + + - Editing `gdk.yml` if you're using GDK: + + ```yaml + # $GDK_ROOT/gdk.yml + gitlab_pages: + enabled: true + access_control: true + ``` + +1. Restart GitLab (if running through the GDK, run `gdk restart`). Running + `gdk reconfigure` overwrites the value of `access_control` in `config/gitlab.yml`. +1. In your local GitLab instance, in the browser go to `http://gdk.test:3000/admin/applications`. +1. Create an [Instance-wide OAuth application](../../integration/oauth_provider.md#instance-wide-applications) + with the `api` scope. +1. Set the value of your `redirect-uri` to the `pages-domain` authorization endpoint + - `http://pages.gdk.test:3010/auth`, for example + - The `redirect-uri` must not contain any GitLab Pages site domain. +1. Add the auth client configuration: + + - With GDK, in `gdk.yml`: + + ```yaml + gitlab_pages: + enabled: true + access_control: true + auth_client_id: $CLIENT_ID # the OAuth application id created in http://gdk.test:3000/admin/applications + auth_client_secret: $CLIENT_SECRET # the OAuth application secret created in http://gdk.test:3000/admin/applications + ``` + + GDK generates random `auth_secret` and builds the `auth_redirect_uri` based on GitLab Pages + host configuration. + + - Without GDK, in `gitlab-pages.conf`: + + ```conf + ## the following are only needed if you want to test auth for private projects + auth-client-id=$CLIENT_ID # the OAuth application id created in http://gdk.test:3000/admin/applications + auth-client-secret=$CLIENT_SECRET # the OAuth application secret created in http://gdk.test:3000/admin/applications + auth-secret=$SOME_RANDOM_STRING # should be at least 32 bytes long + auth-redirect-uri=http://pages.gdk.test:3010/auth # the authentication callback url for GitLab Pages + ``` + +1. If running Pages inside the GDK, you can use GDK's `protected_config_files` section under `gdk` in + your `gdk.yml` to avoid getting `gitlab-pages.conf` configuration rewritten: + + ```yaml + gdk: + protected_config_files: + - 'gitlab-pages/gitlab-pages.conf' + ``` + +## Linting + +```shell +# Run the linter locally +make lint +``` + +## Testing + +To run tests, you can use these commands: + +```shell +# This will run all of the tests in the codebase +make test + +# Run a specfic test file +go test ./internal/serving/disk/ + +# Run a specific test in a file +go test ./internal/serving/disk/ -run TestDisk_ServeFileHTTP + +# Run all unit tests except acceptance_test.go +go test ./... -short + +# Run acceptance_test.go only +make acceptance +# Run specific acceptance tests +# We add `make` here because acceptance tests use the last binary that was compiled, +# so we want to have the latest changes in the build that is tested +make && go test ./ -run TestRedirect +``` diff --git a/doc/subscriptions/self_managed/index.md b/doc/subscriptions/self_managed/index.md index 6270ad935be..cd6601ccb76 100644 --- a/doc/subscriptions/self_managed/index.md +++ b/doc/subscriptions/self_managed/index.md @@ -273,7 +273,7 @@ If you are an administrator, you can export your license usage into a CSV: 1. On the left sidebar, select **Subscription**. 1. In the top right, select **Export license usage file**. -This file contains the information GitLab uses to manually process quarterly reconciliations or renewals. If your instance is firewalled or air-gapped, you must provide GitLab with this information. +This file contains the information GitLab uses to manually process quarterly reconciliations or renewals. If your instance is firewalled or in an offline environment, you must provide GitLab with this information. The **License Usage** CSV includes the following details: diff --git a/doc/topics/git/feature_branch_development.md b/doc/topics/git/feature_branch_development.md index 771aa8c7a95..b205cedbdaa 100644 --- a/doc/topics/git/feature_branch_development.md +++ b/doc/topics/git/feature_branch_development.md @@ -75,7 +75,7 @@ In this case, the feature branch would be `release-X-Y`. Assuming the `release-X ![Create merge request](img/create_merge_request_v13_1.png) -1. After you click **Create merge request**, an option to **Change branches** displays. Select that option. +1. After you select **Create merge request**, an option to **Change branches** displays. Select that option. 1. In the **New Merge Request** screen, you can now select the **Source** and **Target** branches. In the screenshot shown, diff --git a/doc/user/admin_area/license.md b/doc/user/admin_area/license.md index 773f91d3076..ac5e5ded859 100644 --- a/doc/user/admin_area/license.md +++ b/doc/user/admin_area/license.md @@ -36,7 +36,7 @@ To activate your instance with an activation code: The subscription is activated. -If you have an offline or air gapped environment, +If you have an offline environment, [activate GitLab EE with a license file or key](license_file.md) instead. If you have questions or need assistance activating your instance, @@ -64,6 +64,6 @@ This error occurs when you use an activation code to activate your instance, but You may have connectivity issues due to the following reasons: -- **You have an offline or air gapped environment**: Configure your setup to allow connection to GitLab servers. If connection to GitLab servers is not possible, contact [GitLab support](https://about.gitlab.com/support/#contact-support) to request a license key. +- **You have an offline environment**: Configure your setup to allow connection to GitLab servers. If connection to GitLab servers is not possible, contact [GitLab support](https://about.gitlab.com/support/#contact-support) to request a license key. - **Firewall settings**: Enable an encrypted HTTPS connection from your GitLab instance to `customers.gitlab.com` (with IP addresses 104.18.26.123 and 104.18.27.123) on port 443. - **Customers Portal is not operational**: To check for performance or service disruptions, check the Customers Portal [status](https://status.gitlab.com/). diff --git a/doc/user/application_security/api_fuzzing/index.md b/doc/user/application_security/api_fuzzing/index.md index 7b9655f0b6e..e7eb73e8aed 100644 --- a/doc/user/application_security/api_fuzzing/index.md +++ b/doc/user/application_security/api_fuzzing/index.md @@ -1296,7 +1296,7 @@ variables: The `api-fuzzing-exclude-parameters.json` is a JSON document that follows the structure of [exclude parameters document](#exclude-parameters-using-a-json-document). -### Exclude URLS +### Exclude URLs > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/357195) in GitLab 14.10. diff --git a/doc/user/application_security/dast_api/index.md b/doc/user/application_security/dast_api/index.md index 72e495924fa..f7bda972ad3 100644 --- a/doc/user/application_security/dast_api/index.md +++ b/doc/user/application_security/dast_api/index.md @@ -1250,7 +1250,7 @@ variables: The `dast-api-exclude-parameters.json` is a JSON document that follows the structure of [exclude parameters document](#exclude-parameters-using-a-json-document). -### Exclude URLS +### Exclude URLs > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/357195) in GitLab 14.10. diff --git a/doc/user/application_security/index.md b/doc/user/application_security/index.md index d4b5c029b26..b44941c22d8 100644 --- a/doc/user/application_security/index.md +++ b/doc/user/application_security/index.md @@ -132,7 +132,7 @@ For each compatible analyzer, a job is created in the `test`, `dast` or `fuzz` s Features such as the [Security Dashboard](security_dashboard/index.md), [Vulnerability Report](vulnerability_report/index.md), and [Dependency List](dependency_list/index.md) that rely on this scan data only show results from pipelines on the default branch, only if all jobs are finished, including manual ones. One tool might use many analyzers. -Our language and package manager specific jobs attempt to assess which analyzer(s) they should run for your project so that you can do less configuration. +Our language and package manager specific jobs attempt to assess which analyzers they should run for your project so that you can do less configuration. If you want to override this to increase the pipeline speed you may choose which analyzers to exclude if you know they are not applicable (languages or package managers not contained in your project) by following variable customization directions for that specific tool. @@ -560,18 +560,18 @@ When overriding the template to control job execution, previous instances of [`only` or `except`](../../ci/yaml/index.md#only--except) are no longer compatible and must be transitioned to [the `rules` syntax](../../ci/yaml/index.md#rules). -If your override is aimed at limiting jobs to only run on `master`, the previous syntax +If your override is aimed at limiting jobs to only run on `main`, the previous syntax would look similar to: ```yaml include: - template: Security/SAST.gitlab-ci.yml -# Ensure that the scanning is only executed on master or merge requests +# Ensure that the scanning is only executed on main or merge requests spotbugs-sast: only: refs: - - master + - main - merge_requests ``` @@ -582,10 +582,10 @@ would be written as follows: include: - template: Security/SAST.gitlab-ci.yml -# Ensure that the scanning is only executed on master or merge requests +# Ensure that the scanning is only executed on main or merge requests spotbugs-sast: rules: - - if: $CI_COMMIT_BRANCH == "master" + - if: $CI_COMMIT_BRANCH == "main" - if: $CI_MERGE_REQUEST_ID ``` diff --git a/doc/user/infrastructure/iac/terraform_state.md b/doc/user/infrastructure/iac/terraform_state.md index eeb65a46f0f..1eb8fdacc2f 100644 --- a/doc/user/infrastructure/iac/terraform_state.md +++ b/doc/user/infrastructure/iac/terraform_state.md @@ -22,8 +22,13 @@ In GitLab, you can: - Lock and unlock states. - Remotely execute `terraform plan` and `terraform apply` commands. -For self-managed instances, before you can use GitLab for your Terraform state files, -an administrator must [set up Terraform state storage](../../../administration/terraform_state.md). +## Prerequisites + +For self-managed GitLab, before you can use GitLab for your Terraform state files: + +- An administrator must [set up Terraform state storage](../../../administration/terraform_state.md). +- You must enable [Operations](../../../operations/index.md) for your project. Go to **Settings > General**, + expand **Visibility, project features, permissions**, and under **Operations**, turn on the toggle. ## Initialize a Terraform state as a backend by using GitLab CI/CD diff --git a/doc/user/project/clusters/add_eks_clusters.md b/doc/user/project/clusters/add_eks_clusters.md index 49671cd67aa..8e1cd48f833 100644 --- a/doc/user/project/clusters/add_eks_clusters.md +++ b/doc/user/project/clusters/add_eks_clusters.md @@ -140,7 +140,7 @@ In the [IAM Management Console](https://console.aws.amazon.com/iam/home), create another IAM role (**role B**) for GitLab authentication with AWS: 1. On the AWS IAM console, select **Roles** from the left panel. -1. Click **Create role**. +1. Select **Create role**. 1. Under **Select type of trusted entity**, select **Another AWS account**. 1. Enter the Account ID from GitLab into the **Account ID** field. 1. Check **Require external ID**. diff --git a/doc/user/project/clusters/add_gke_clusters.md b/doc/user/project/clusters/add_gke_clusters.md index cb8d04e0e28..2e1c8766ae3 100644 --- a/doc/user/project/clusters/add_gke_clusters.md +++ b/doc/user/project/clusters/add_gke_clusters.md @@ -64,8 +64,8 @@ cluster certificates: cluster. - Group's **{cloud-gear}** **Kubernetes** page, for a group-level cluster. - **Menu > Admin > Kubernetes** page, for an instance-level cluster. -1. Click **Integrate with a cluster certificate**. -1. Under the **Create new cluster** tab, click **Google GKE**. +1. Select **Integrate with a cluster certificate**. +1. Under the **Create new cluster** tab, select **Google GKE**. 1. Connect your Google account if you haven't done already by clicking the **Sign in with Google** button. 1. Choose your cluster's settings: @@ -83,7 +83,7 @@ cluster certificates: See the [Cloud Run for Anthos section](#cloud-run-for-anthos) for more information. - **GitLab-managed cluster** - Leave this checked if you want GitLab to manage namespaces and service accounts for this cluster. See the [Managed clusters section](gitlab_managed_clusters.md) for more information. -1. Finally, click the **Create Kubernetes cluster** button. +1. Finally, select the **Create Kubernetes cluster** button. After a couple of minutes, your cluster is ready. diff --git a/doc/user/project/clusters/add_remove_clusters.md b/doc/user/project/clusters/add_remove_clusters.md index 8cdd1792e7f..13516f42fb9 100644 --- a/doc/user/project/clusters/add_remove_clusters.md +++ b/doc/user/project/clusters/add_remove_clusters.md @@ -22,7 +22,7 @@ When you successfully connect an existing cluster using cluster certificates, th - **Menu > Admin > Kubernetes** page, for an instance-level cluster. 1. Select the name of the cluster you want to disable. 1. Toggle **GitLab Integration** off (in gray). -1. Click **Save changes**. +1. Select **Save changes**. ## Remove a cluster diff --git a/doc/user/project/clusters/gitlab_managed_clusters.md b/doc/user/project/clusters/gitlab_managed_clusters.md index e295abf8d31..3b85d29fb4a 100644 --- a/doc/user/project/clusters/gitlab_managed_clusters.md +++ b/doc/user/project/clusters/gitlab_managed_clusters.md @@ -47,7 +47,7 @@ To clear the cache: 1. Navigate to your project's **Infrastructure > Kubernetes clusters** page, and select your cluster. 1. Expand the **Advanced settings** section. -1. Click **Clear cluster cache**. +1. Select **Clear cluster cache**. ## Base domain @@ -66,10 +66,10 @@ You can either: To determine the external Ingress IP address, or external Ingress hostname: - *If the cluster is on GKE*: - 1. Click the **Google Kubernetes Engine** link in the **Advanced settings**, + 1. Select the **Google Kubernetes Engine** link in the **Advanced settings**, or go directly to the [Google Kubernetes Engine dashboard](https://console.cloud.google.com/kubernetes/). 1. Select the proper project and cluster. - 1. Click **Connect** + 1. Select **Connect**. 1. Execute the `gcloud` command in a local terminal or using the **Cloud Shell**. - *If the cluster is not on GKE*: Follow the specific instructions for your diff --git a/doc/user/project/clusters/kubernetes_pod_logs.md b/doc/user/project/clusters/kubernetes_pod_logs.md index b1158be9fb6..0e81e23a406 100644 --- a/doc/user/project/clusters/kubernetes_pod_logs.md +++ b/doc/user/project/clusters/kubernetes_pod_logs.md @@ -52,7 +52,7 @@ is required to use Logs. ## Accessing the log explorer -To access the **Log explorer**, click the **More actions** **{ellipsis_v}** menu on +To access the **Log explorer**, select the **More actions** **{ellipsis_v}** menu on a [metrics dashboard](../../../operations/metrics/index.md) and select **View logs**, or: 1. Sign in as a user with the _View pod logs_ @@ -68,7 +68,7 @@ a [metrics dashboard](../../../operations/metrics/index.md) and select **View lo 1. When mousing over the list of pods, GitLab displays a tooltip with the exact pod name and status. ![deploy boards pod list](img/pod_logs_deploy_board.png) - 1. Click on the desired pod to display the **Log Explorer**. + 1. Select on the desired pod to display the **Log Explorer**. ### Logs view @@ -97,7 +97,7 @@ Support for historical data is coming When you enable [Elastic Stack](../../clusters/integrations.md#elastic-stack-cluster-integration) on your cluster, you can filter logs displayed in the **Log Explorer** by date. -Click **Show last** in the **Log Explorer** to see the available options. +Select **Show last** in the **Log Explorer** to see the available options. ### Full text search diff --git a/doc/user/project/clusters/runbooks/index.md b/doc/user/project/clusters/runbooks/index.md index 086e1fccf6c..0024462aa4b 100644 --- a/doc/user/project/clusters/runbooks/index.md +++ b/doc/user/project/clusters/runbooks/index.md @@ -153,15 +153,15 @@ the components outlined above and the pre-loaded demo runbook. ``` 1. After JupyterHub has been installed successfully, open the **Jupyter Hostname** - in your browser. Click the **Sign in with GitLab** button to log in to + in your browser. Select **Sign in with GitLab** button to log in to JupyterHub and start the server. Authentication is enabled for any user of the GitLab instance with OAuth2. This button redirects you to a page at GitLab requesting authorization for JupyterHub to use your GitLab account. ![authorize Jupyter](img/authorize-jupyter.png) -1. Click **Authorize**, and GitLab redirects you to the JupyterHub application. -1. Click **Start My Server** to start the server in a few seconds. +1. Select **Authorize**, and GitLab redirects you to the JupyterHub application. +1. Select **Start My Server** to start the server in a few seconds. 1. To configure the runbook's access to your GitLab project, you must enter your [GitLab Access Token](../../../profile/personal_access_tokens.md) and your Project ID in the **Setup** section of the demo runbook: @@ -208,9 +208,9 @@ the components outlined above and the pre-loaded demo runbook. ![GitLab variables](img/gitlab-variables.png) - 1. Click **Save variables**. + 1. Select **Save variables**. - 1. In Jupyter, click the **Run SQL queries in Notebook** heading, and then click + 1. In Jupyter, select the **Run SQL queries in Notebook** heading, and then click **Run**. The results are displayed inline as follows: ![PostgreSQL query](img/postgres-query.png) diff --git a/doc/user/project/import/jira.md b/doc/user/project/import/jira.md index a44669e738e..8fb495cd0db 100644 --- a/doc/user/project/import/jira.md +++ b/doc/user/project/import/jira.md @@ -71,19 +71,19 @@ To import Jira issues to a GitLab project: ![Import issues from Jira form](img/jira/import_issues_from_jira_form_v13_2.png) -1. Click the **Import from** dropdown list and select the Jira project that you wish to import issues from. +1. Select the **Import from** dropdown list and select the Jira project that you wish to import issues from. In the **Jira-GitLab user mapping template** section, the table shows to which GitLab users your Jira users are mapped. When the form appears, the dropdown list defaults to the user conducting the import. -1. To change any of the mappings, click the dropdown list in the **GitLab username** column and +1. To change any of the mappings, select the dropdown list in the **GitLab username** column and select the user you want to map to each Jira user. The dropdown list may not show all the users, so use the search bar to find a specific user in this GitLab project. -1. Click **Continue**. You're presented with a confirmation that import has started. +1. Select **Continue**. You're presented with a confirmation that import has started. While the import is running in the background, you can navigate away from the import status page to the issues page, and you can see the new issues appearing in the issues list. diff --git a/doc/user/project/import/manifest.md b/doc/user/project/import/manifest.md index 131732d2bae..5e37c4e5f6b 100644 --- a/doc/user/project/import/manifest.md +++ b/doc/user/project/import/manifest.md @@ -53,13 +53,13 @@ As a result, the following projects are created: To start the import: -1. From your GitLab dashboard click **New project**. +1. From your GitLab dashboard select **New project**. 1. Switch to the **Import project** tab. -1. Click on the **Manifest file** button. +1. Select on the **Manifest file** button. 1. Provide GitLab with a manifest XML file. 1. Select a group you want to import to (you need to create a group first if you don't have one). -1. Click **List available repositories**. At this point, you are redirected +1. Select **List available repositories**. At this point, you are redirected to the import status page with projects list based on the manifest file. -1. Check the list and click **Import all repositories** to start the import. +1. Check the list and select **Import all repositories** to start the import. ![Manifest status](img/manifest_status_v13_3.png) diff --git a/doc/user/project/integrations/webex_teams.md b/doc/user/project/integrations/webex_teams.md index dd4cdb632e6..e8b2470cf13 100644 --- a/doc/user/project/integrations/webex_teams.md +++ b/doc/user/project/integrations/webex_teams.md @@ -33,6 +33,6 @@ notifications: 1. Ensure that the **Active** toggle is enabled. 1. Select the checkboxes corresponding to the GitLab events you want to receive in Webex Teams. 1. Paste the **Webhook** URL for the Webex Teams space. -1. Configure the remaining options and then click **Test settings and save changes**. +1. Configure the remaining options and then select **Test settings and save changes**. The Webex Teams space begins to receive all applicable GitLab events. diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md index d731ceb5aca..c8ecb2fd2e6 100644 --- a/doc/user/project/issue_board.md +++ b/doc/user/project/issue_board.md @@ -70,17 +70,17 @@ GitLab automatically loads the last board you visited. To create a new issue board: -1. Click the dropdown with the current board name in the upper left corner of the issue boards page. -1. Click **Create new board**. +1. Select the dropdown with the current board name in the upper left corner of the issue boards page. +1. Select **Create new board**. 1. Enter the new board's name and select its scope: milestone, labels, assignee, or weight. ### Delete an issue board To delete the currently active issue board: -1. Click the dropdown with the current board name in the upper left corner of the issue boards page. -1. Click **Delete board**. -1. Click **Delete** to confirm. +1. Select the dropdown with the current board name in the upper left corner of the issue boards page. +1. Select **Delete board**. +1. Select **Delete** to confirm. ## Issue boards use cases @@ -289,7 +289,7 @@ assignee list: Now that the assignee list is added, you can assign or unassign issues to that user by [moving issues](#move-issues-and-lists) to and from an assignee list. -To remove an assignee list, just as with a label list, click the trash icon. +To remove an assignee list, just as with a label list, select the trash icon. ![Assignee lists](img/issue_board_assignee_lists_v14_1.png) @@ -307,7 +307,7 @@ milestone, giving you more freedom and visibility on the issue board. To add a m Like the assignee lists, you're able to [drag issues](#move-issues-and-lists) to and from a milestone list to manipulate the milestone of the dragged issues. -As in other list types, click the trash icon to remove a list. +As in other list types, select the trash icon to remove a list. ![Milestone lists](img/issue_board_milestone_lists_v14_1.png) @@ -392,8 +392,8 @@ Examples: To set a WIP limit for a list: 1. Navigate to a Project or Group board of which you're a member. -1. Click the settings icon in a list's header. -1. Next to **Work In Progress Limit**, click **Edit**. +1. Select the settings icon in a list's header. +1. Next to **Work In Progress Limit**, select **Edit**. 1. Enter the maximum number of issues. 1. Press Enter to save. diff --git a/doc/user/project/issues/related_issues.md b/doc/user/project/issues/related_issues.md index b8151ac873a..028dd2ea473 100644 --- a/doc/user/project/issues/related_issues.md +++ b/doc/user/project/issues/related_issues.md @@ -61,7 +61,7 @@ You can also add a linked issue from a commit message or the description in anot ## Remove a linked issue -In the **Linked issues** section of an issue, click the remove button (**{close}**) on the +In the **Linked issues** section of an issue, select the remove button (**{close}**) on the right-side of each issue token to remove. Due to the bi-directional relationship, the relationship no longer appears in either issue. diff --git a/doc/user/project/pages/custom_domains_ssl_tls_certification/ssl_tls_concepts.md b/doc/user/project/pages/custom_domains_ssl_tls_certification/ssl_tls_concepts.md index 0c848a24dec..b080bee85aa 100644 --- a/doc/user/project/pages/custom_domains_ssl_tls_certification/ssl_tls_concepts.md +++ b/doc/user/project/pages/custom_domains_ssl_tls_certification/ssl_tls_concepts.md @@ -23,7 +23,7 @@ highly recommendable. Let's start with an introduction to the importance of HTTPS. -## Why should I care about HTTPS? +## Why should you care about HTTPS? This might be your first question. If our sites are hosted by GitLab Pages, they are static, hence we are not dealing with server-side scripts @@ -42,7 +42,7 @@ Now we have a different picture. [According to Josh Aas](https://letsencrypt.org > _We've since come to realize that HTTPS is important for almost all websites. It's important for any website that allows people to log in with a password, any website that [tracks its users](https://www.washingtonpost.com/news/the-switch/wp/2013/12/10/nsa-uses-google-cookies-to-pinpoint-targets-for-hacking/) in any way, any website that [doesn't want its content altered](https://arstechnica.com/tech-policy/2014/09/why-comcasts-javascript-ad-injections-threaten-security-net-neutrality/), and for any site that offers content people might not want others to know they are consuming. We've also learned that any site not secured by HTTPS [can be used to attack other sites](https://krebsonsecurity.com/2015/04/dont-be-fodder-for-chinas-great-cannon/)._ Therefore, the reason why certificates are so important is that they encrypt -the connection between the **client** (you, me, your visitors) +the connection between the **client** (you, your visitors) and the **server** (where you site lives), through a keychain of authentications and validations. diff --git a/doc/user/project/pages/introduction.md b/doc/user/project/pages/introduction.md index 23cb62e479f..1ea7500273e 100644 --- a/doc/user/project/pages/introduction.md +++ b/doc/user/project/pages/introduction.md @@ -259,20 +259,20 @@ for both the `/data` and `/data/` URL paths. ## Frequently Asked Questions -### Can I download my generated pages? +### Can you download your generated pages? Sure. All you need to do is download the artifacts archive from the job page. -### Can I use GitLab Pages if my project is private? +### Can you use GitLab Pages if your project is private? Yes. GitLab Pages doesn't care whether you set your project's visibility level to private, internal or public. -### Can I create a personal or a group website +### Can you create a personal or a group website? Yes. See the documentation about [GitLab Pages domain names, URLs, and base URLs](getting_started_part_one.md). -### Do I need to create a user/group website before creating a project website? +### Do you need to create a user/group website before creating a project website? No, you don't. You can create your project first and access it under `http(s)://namespace.example.io/projectname`. diff --git a/doc/user/project/protected_tags.md b/doc/user/project/protected_tags.md index 5df34fcdcc4..68fa25b9a3a 100644 --- a/doc/user/project/protected_tags.md +++ b/doc/user/project/protected_tags.md @@ -31,7 +31,7 @@ To protect a tag, you must have at least the Maintainer role. 1. Go to the project's **Settings > Repository**. -1. From the **Tag** dropdown list, select the tag you want to protect or type and click **Create wildcard**. In the screenshot below, we chose to protect all tags matching `v*`: +1. From the **Tag** dropdown list, select the tag you want to protect or type and select **Create wildcard**. In the screenshot below, we chose to protect all tags matching `v*`: ![Protected tags page](img/protected_tags_page_v12_3.png) diff --git a/doc/user/project/repository/branches/index.md b/doc/user/project/repository/branches/index.md index 351daaaca3b..14ad550fe79 100644 --- a/doc/user/project/repository/branches/index.md +++ b/doc/user/project/repository/branches/index.md @@ -50,7 +50,7 @@ To compare branches in a repository: 1. Select **Repository > Compare** in the sidebar. 1. Select the target repository to compare with the [repository filter search box](#repository-filter-search-box). 1. Select branches to compare using the [branch filter search box](#branch-filter-search-box). -1. Click **Compare** to view the changes inline: +1. Select **Compare** to view the changes inline: ![compare branches](img/compare_branches_v13_12.png) diff --git a/doc/user/project/repository/git_blame.md b/doc/user/project/repository/git_blame.md index 198993e21f3..0026834ae83 100644 --- a/doc/user/project/repository/git_blame.md +++ b/doc/user/project/repository/git_blame.md @@ -27,7 +27,7 @@ are shown. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/19299) in GitLab 12.7. -To see earlier revisions of a specific line, click **View blame prior to this change** +To see earlier revisions of a specific line, select **View blame prior to this change** until you've found the changes you're interested in viewing: ![Blame previous commit](img/file_blame_previous_commit_v12_7.png "Blame previous commit") diff --git a/doc/user/project/settings/index.md b/doc/user/project/settings/index.md index 1e63472763d..48ab7693981 100644 --- a/doc/user/project/settings/index.md +++ b/doc/user/project/settings/index.md @@ -353,8 +353,8 @@ in project listings. To archive a project: 1. Navigate to your project's **Settings > General**. -1. Under **Advanced**, click **Expand**. -1. In the **Archive project** section, click the **Archive project** button. +1. Under **Advanced**, select **Expand**. +1. In the **Archive project** section, select **Archive project**. 1. Confirm the action when asked to. #### Unarchiving a project @@ -373,13 +373,13 @@ To find an archived project: 1. Select **Explore projects**. 1. In the **Sort projects** dropdown box, select **Show archived projects**. 1. In the **Filter by name** field, provide the project's name. - 1. Click the link to the project to open its **Details** page. + 1. Select the link to the project to open its **Details** page. Next, to unarchive the project: 1. Navigate to your project's **Settings > General**. -1. Under **Advanced**, click **Expand**. -1. In the **Unarchive project** section, click the **Unarchive project** button. +1. Under **Advanced**, select **Expand**. +1. In the **Unarchive project** section, select **Unarchive project**. 1. Confirm the action when asked to. #### Renaming a repository @@ -395,9 +395,9 @@ project via a browser) and its place on the file disk where GitLab is installed. To rename a repository: 1. Navigate to your project's **Settings > General**. -1. Under **Advanced**, click **Expand**. +1. Under **Advanced**, select **Expand**. 1. Under **Change path**, update the repository's path. -1. Click **Change path**. +1. Select **Change path**. Remember that this can have unintended side effects since everyone with the old URL can't push or pull. Read more about what happens with the @@ -512,7 +512,7 @@ The following are deleted: To restore a project marked for deletion: 1. Navigate to your project, and select **Settings > General > Advanced**. -1. In the Restore project section, click the **Restore project** button. +1. In the Restore project section, select **Restore project**. #### Removing a fork relationship @@ -529,7 +529,7 @@ To restore the fork relationship, [use the API](../../../api/projects.md#create- To do so: 1. Navigate to your project's **Settings > General > Advanced**. -1. Under **Remove fork relationship**, click the likewise-labeled button. +1. Under **Remove fork relationship**, select the likewise-labeled button. 1. Confirm the action by typing the project's path as instructed. NOTE: diff --git a/lib/api/appearance.rb b/lib/api/appearance.rb index 1eaa4167a7d..e599abf4aaf 100644 --- a/lib/api/appearance.rb +++ b/lib/api/appearance.rb @@ -5,6 +5,7 @@ module API before { authenticated_as_admin! } feature_category :navigation + urgency :low helpers do def current_appearance diff --git a/lib/api/avatar.rb b/lib/api/avatar.rb index bd9fb37e18b..0fb7a4cd435 100644 --- a/lib/api/avatar.rb +++ b/lib/api/avatar.rb @@ -3,7 +3,7 @@ module API class Avatar < ::API::Base feature_category :users - urgency :high + urgency :medium resource :avatar do desc 'Return avatar url for a user' do diff --git a/lib/api/badges.rb b/lib/api/badges.rb index 68095fb2975..f969eec8431 100644 --- a/lib/api/badges.rb +++ b/lib/api/badges.rb @@ -32,7 +32,7 @@ module API params do use :pagination end - get ":id/badges", urgency: :default do + get ":id/badges", urgency: :low do source = find_source(source_type, params[:id]) badges = source.badges @@ -91,7 +91,7 @@ module API requires :image_url, type: String, desc: 'URL of the badge image' optional :name, type: String, desc: 'Name for the badge' end - post ":id/badges", urgency: :default do + post ":id/badges" do source = find_source_if_admin(source_type) badge = ::Badges::CreateService.new(declared_params(include_missing: false)).execute(source) diff --git a/lib/api/broadcast_messages.rb b/lib/api/broadcast_messages.rb index e081265b418..b5d68ca5de2 100644 --- a/lib/api/broadcast_messages.rb +++ b/lib/api/broadcast_messages.rb @@ -5,6 +5,7 @@ module API include PaginationParams feature_category :navigation + urgency :low resource :broadcast_messages do helpers do diff --git a/lib/api/groups.rb b/lib/api/groups.rb index 60bb51bf48f..c17bc432404 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -417,7 +417,7 @@ module API requires :group_access, type: Integer, values: Gitlab::Access.all_values, desc: 'The group access level' optional :expires_at, type: Date, desc: 'Share expiration date' end - post ":id/share", feature_category: :subgroups do + post ":id/share", feature_category: :subgroups, urgency: :low do shared_with_group = find_group!(params[:group_id]) group_link_create_params = { diff --git a/lib/api/user_counts.rb b/lib/api/user_counts.rb index 756901c5717..d0b1e458a27 100644 --- a/lib/api/user_counts.rb +++ b/lib/api/user_counts.rb @@ -3,6 +3,7 @@ module API class UserCounts < ::API::Base feature_category :navigation + urgency :low resource :user_counts do desc 'Return the user specific counts' do diff --git a/lib/api/users.rb b/lib/api/users.rb index c7aa4b43d4d..5ef826ae628 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -10,7 +10,7 @@ module API feature_category :users, ['/users/:id/custom_attributes', '/users/:id/custom_attributes/:key'] - urgency :high, ['/users/:id/custom_attributes', '/users/:id/custom_attributes/:key'] + urgency :medium, ['/users/:id/custom_attributes', '/users/:id/custom_attributes/:key'] resource :users, requirements: { uid: /[0-9]*/, id: /[0-9]*/ } do include CustomAttributesEndpoints @@ -145,7 +145,7 @@ module API use :with_custom_attributes end # rubocop: disable CodeReuse/ActiveRecord - get ":id", feature_category: :users, urgency: :medium do + get ":id", feature_category: :users, urgency: :default do forbidden!('Not authorized!') unless current_user unless current_user.admin? @@ -170,7 +170,7 @@ module API params do requires :user_id, type: String, desc: 'The ID or username of the user' end - get ":user_id/status", requirements: API::USER_REQUIREMENTS, feature_category: :users, urgency: :high do + get ":user_id/status", requirements: API::USER_REQUIREMENTS, feature_category: :users, urgency: :default do user = find_user(params[:user_id]) not_found!('User') unless user && can?(current_user, :read_user, user) @@ -921,7 +921,7 @@ module API desc 'Get the currently authenticated user' do success Entities::UserPublic end - get feature_category: :users, urgency: :medium do + get feature_category: :users, urgency: :default do entity = if current_user.admin? Entities::UserWithAdmin diff --git a/lib/backup/gitaly_backup.rb b/lib/backup/gitaly_backup.rb index a8b0e7ad157..077eabdd131 100644 --- a/lib/backup/gitaly_backup.rb +++ b/lib/backup/gitaly_backup.rb @@ -19,6 +19,10 @@ module Backup def start(type, backup_repos_path, backup_id: nil) raise Error, 'already started' if started? + if type == :create && !incremental? + FileUtils.rm_rf(backup_repos_path) + end + command = case type when :create 'create' @@ -34,7 +38,7 @@ module Backup if Feature.enabled?(:incremental_repository_backup) args += ['-layout', 'pointer'] if type == :create - args += ['-incremental'] if @incremental + args += ['-incremental'] if incremental? args += ['-id', backup_id] if backup_id end end @@ -68,6 +72,10 @@ module Backup private + def incremental? + @incremental + end + # Schedule a new backup job through a non-blocking JSON based pipe protocol # # @see https://gitlab.com/gitlab-org/gitaly/-/blob/master/doc/gitaly-backup.md diff --git a/lib/sidebars/projects/menus/monitor_menu.rb b/lib/sidebars/projects/menus/monitor_menu.rb index c35bc1f5481..311c44f5f80 100644 --- a/lib/sidebars/projects/menus/monitor_menu.rb +++ b/lib/sidebars/projects/menus/monitor_menu.rb @@ -10,7 +10,6 @@ module Sidebars add_item(metrics_dashboard_menu_item) add_item(logs_menu_item) - add_item(tracing_menu_item) add_item(error_tracking_menu_item) add_item(alert_management_menu_item) add_item(incidents_menu_item) @@ -72,21 +71,6 @@ module Sidebars ) end - def tracing_menu_item - if !Feature.enabled?(:monitor_tracing, context.project) || - !can?(context.current_user, :read_environment, context.project) || - !can?(context.current_user, :admin_project, context.project) - return ::Sidebars::NilMenuItem.new(item_id: :tracing) - end - - ::Sidebars::MenuItem.new( - title: _('Tracing'), - link: project_tracing_path(context.project), - active_routes: { path: 'tracings#show' }, - item_id: :tracing - ) - end - def error_tracking_menu_item unless can?(context.current_user, :read_sentry_issue, context.project) return ::Sidebars::NilMenuItem.new(item_id: :error_tracking) diff --git a/spec/lib/backup/gitaly_backup_spec.rb b/spec/lib/backup/gitaly_backup_spec.rb index 399e4ffa72b..ab198fcbe1f 100644 --- a/spec/lib/backup/gitaly_backup_spec.rb +++ b/spec/lib/backup/gitaly_backup_spec.rb @@ -59,6 +59,16 @@ RSpec.describe Backup::GitalyBackup do expect(File).to exist(File.join(destination, project_snippet.disk_path, backup_id, '001.bundle')) end + it 'erases any existing repository backups' do + existing_file = File.join(destination, 'some_existing_file') + IO.write(existing_file, "Some existing file.\n") + + subject.start(:create, destination, backup_id: backup_id) + subject.finish! + + expect(File).not_to exist(existing_file) + end + context 'parallel option set' do let(:max_parallelism) { 3 } diff --git a/spec/lib/sidebars/projects/menus/monitor_menu_spec.rb b/spec/lib/sidebars/projects/menus/monitor_menu_spec.rb index b11c9db4e46..9d5845d20e5 100644 --- a/spec/lib/sidebars/projects/menus/monitor_menu_spec.rb +++ b/spec/lib/sidebars/projects/menus/monitor_menu_spec.rb @@ -82,20 +82,6 @@ RSpec.describe Sidebars::Projects::Menus::MonitorMenu do end end - describe 'Tracing' do - let(:item_id) { :tracing } - - it_behaves_like 'access rights checks' - - context 'when feature disabled' do - before do - stub_feature_flags(monitor_tracing: false) - end - - specify { is_expected.to be_nil } - end - end - describe 'Error Tracking' do let(:item_id) { :error_tracking } diff --git a/spec/models/namespace/root_storage_statistics_spec.rb b/spec/models/namespace/root_storage_statistics_spec.rb index c399a0084fb..f2ba8cdd16a 100644 --- a/spec/models/namespace/root_storage_statistics_spec.rb +++ b/spec/models/namespace/root_storage_statistics_spec.rb @@ -58,6 +58,32 @@ RSpec.describe Namespace::RootStorageStatistics, type: :model do expect(root_storage_statistics.uploads_size).to eq(total_uploads_size) end + it 'aggregates container_repositories_size and storage_size' do + allow(namespace).to receive(:container_repositories_size).and_return(999) + + root_storage_statistics.recalculate! + + root_storage_statistics.reload + + total_storage_size = project_stat1.storage_size + project_stat2.storage_size + 999 + + expect(root_storage_statistics.container_registry_size).to eq(999) + expect(root_storage_statistics.storage_size).to eq(total_storage_size) + end + + it 'does not aggregate container_repositories_size when FF is disabled' do + stub_feature_flags(container_registry_namespace_statistics: false) + + root_storage_statistics.recalculate! + + root_storage_statistics.reload + + total_storage_size = project_stat1.storage_size + project_stat2.storage_size + + expect(root_storage_statistics.container_registry_size).to eq(0) + expect(root_storage_statistics.storage_size).to eq(total_storage_size) + end + it 'works when there are no projects' do Project.delete_all diff --git a/spec/support/shared_contexts/navbar_structure_context.rb b/spec/support/shared_contexts/navbar_structure_context.rb index ef6ff7be840..552687fdfa9 100644 --- a/spec/support/shared_contexts/navbar_structure_context.rb +++ b/spec/support/shared_contexts/navbar_structure_context.rb @@ -84,7 +84,6 @@ RSpec.shared_context 'project navbar structure' do nav_sub_items: [ _('Metrics'), _('Logs'), - _('Tracing'), _('Error Tracking'), _('Alerts'), _('Incidents'), diff --git a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb index 3943355bffd..7f961b3a4e9 100644 --- a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb @@ -437,32 +437,6 @@ RSpec.describe 'layouts/nav/sidebar/_project' do end end - describe 'Tracing' do - it 'has a link to the tracing page' do - render - - expect(rendered).to have_link('Tracing', href: project_tracing_path(project)) - end - - context 'without project.tracing_external_url' do - it 'has a link to the tracing page' do - render - - expect(rendered).to have_link('Tracing', href: project_tracing_path(project)) - end - end - - describe 'when the user does not have access' do - let(:user) { nil } - - it 'does not have a link to the tracing page' do - render - - expect(rendered).not_to have_text 'Tracing' - end - end - end - describe 'Error Tracking' do it 'has a link to the error tracking page' do render