From 574ed32358d8e502793bf133099d1b6e3b8e3d76 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 11 Oct 2022 03:09:00 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- app/models/issue.rb | 6 +- ...ojects_with_expiration_policy_disabled.yml | 1 + .../package_information/index.md | 4 +- .../packages/container_registry.md | 2 +- doc/api/statistics.md | 2 +- .../cloud_native_gitlab_pages/index.md | 2 +- .../index.md | 6 +- .../blueprints/database_testing/index.md | 2 +- .../blueprints/runner_scaling/index.md | 2 +- .../blueprints/work_items/index.md | 6 +- doc/ci/ssh_keys/index.md | 2 +- doc/development/api_graphql_styleguide.md | 2 +- .../contributing/merge_request_workflow.md | 2 +- doc/development/contributing/style_guides.md | 2 +- .../database/efficient_in_operator_queries.md | 2 +- .../database/iterating_tables_in_batches.md | 2 +- .../database/understanding_explain_plans.md | 2 +- doc/development/diffs.md | 4 +- doc/development/elasticsearch.md | 4 +- .../fe_guide/development_process.md | 2 +- doc/development/fe_guide/graphql.md | 2 +- doc/development/feature_flags/index.md | 2 +- doc/development/fips_compliance.md | 2 +- doc/development/github_importer.md | 2 +- doc/development/graphql_guide/batchloader.md | 2 +- doc/development/image_scaling.md | 2 +- doc/development/integrations/secure.md | 2 +- doc/development/internal_api/index.md | 3 +- doc/development/licensing.md | 2 +- .../merge_request_performance_guidelines.md | 4 +- doc/development/migration_style_guide.md | 2 +- doc/development/performance.md | 2 +- doc/development/pipelines.md | 5 +- doc/development/profiling.md | 2 +- doc/development/project_templates.md | 2 +- doc/development/real_time.md | 2 +- doc/development/refactoring_guide/index.md | 4 +- doc/development/secure_coding_guidelines.md | 2 +- doc/development/service_measurement.md | 4 +- .../service_ping/metrics_lifecycle.md | 2 +- doc/development/sidekiq/worker_attributes.md | 4 +- doc/development/snowplow/troubleshooting.md | 2 +- doc/install/docker.md | 3 +- .../advanced_search/elasticsearch.md | 2 +- doc/integration/kerberos.md | 2 +- doc/security/asset_proxy.md | 2 +- doc/user/admin_area/appearance.md | 3 +- .../application_security/api_fuzzing/index.md | 2 +- .../application_security/dast_api/index.md | 2 +- .../sast/customize_rulesets.md | 8 +- doc/user/application_security/sast/index.md | 2 +- doc/user/group/saml_sso/index.md | 2 +- doc/user/group/saml_sso/troubleshooting.md | 2 +- .../management_project_applications/vault.md | 2 +- doc/user/project/deploy_boards.md | 2 +- .../prometheus_library/kubernetes.md | 2 +- doc/user/project/merge_requests/index.md | 4 +- .../project/merge_requests/reviews/index.md | 2 +- doc/user/project/merge_requests/widgets.md | 2 +- doc/user/project/pages/introduction.md | 3 +- lib/api/badges.rb | 1 + lib/gitlab/closing_issue_extractor.rb | 3 +- ..._with_expiration_policy_disabled_metric.rb | 20 +++ lib/gitlab/usage_data.rb | 1 - locale/gitlab.pot | 9 ++ .../{ => gradle}/build_install.gradle.erb | 0 .../{ => gradle}/build_upload.gradle.erb | 0 .../gradle_install_package.yaml.erb | 0 .../gradle_upload_package.yaml.erb | 0 .../consumer/gitlab_ci.yaml.erb} | 0 .../consumer/pom.xml.erb} | 4 +- .../maven/group/consumer/settings.xml.erb | 16 ++ .../producer/gitlab_ci.yaml.erb} | 0 .../producer/pom.xml.erb} | 0 .../{ => group/producer}/settings.xml.erb | 0 .../{ => group}/settings_with_pat.xml.erb | 0 .../maven/project/gitlab_ci.yaml.erb | 9 ++ .../maven/project/pom.xml.erb | 22 +++ .../maven/project/settings.xml.erb | 16 ++ .../maven/maven_group_level_spec.rb | 138 +++++------------- .../maven/maven_project_level_spec.rb | 101 ++----------- .../maven_gradle_repository_spec.rb | 8 +- .../gitlab/closing_issue_extractor_spec.rb | 32 +++- ..._expiration_policy_disabled_metric_spec.rb | 19 +++ spec/lib/gitlab/usage_data_spec.rb | 1 - spec/models/issue_spec.rb | 7 +- spec/support/helpers/usage_data_helpers.rb | 1 - 87 files changed, 274 insertions(+), 294 deletions(-) create mode 100644 lib/gitlab/usage/metrics/instrumentations/distinct_count_projects_with_expiration_policy_disabled_metric.rb rename qa/qa/fixtures/package_managers/maven/{ => gradle}/build_install.gradle.erb (100%) rename qa/qa/fixtures/package_managers/maven/{ => gradle}/build_upload.gradle.erb (100%) rename qa/qa/fixtures/package_managers/maven/{ => gradle}/gradle_install_package.yaml.erb (100%) rename qa/qa/fixtures/package_managers/maven/{ => gradle}/gradle_upload_package.yaml.erb (100%) rename qa/qa/fixtures/package_managers/maven/{maven_install_package.yaml.erb => group/consumer/gitlab_ci.yaml.erb} (100%) rename qa/qa/fixtures/package_managers/maven/{client_pom.xml.erb => group/consumer/pom.xml.erb} (72%) create mode 100644 qa/qa/fixtures/package_managers/maven/group/consumer/settings.xml.erb rename qa/qa/fixtures/package_managers/maven/{maven_upload_package.yaml.erb => group/producer/gitlab_ci.yaml.erb} (100%) rename qa/qa/fixtures/package_managers/maven/{package_pom.xml.erb => group/producer/pom.xml.erb} (100%) rename qa/qa/fixtures/package_managers/maven/{ => group/producer}/settings.xml.erb (100%) rename qa/qa/fixtures/package_managers/maven/{ => group}/settings_with_pat.xml.erb (100%) create mode 100644 qa/qa/fixtures/package_managers/maven/project/gitlab_ci.yaml.erb create mode 100644 qa/qa/fixtures/package_managers/maven/project/pom.xml.erb create mode 100644 qa/qa/fixtures/package_managers/maven/project/settings.xml.erb create mode 100644 spec/lib/gitlab/usage/metrics/instrumentations/distinct_count_projects_with_expiration_policy_disabled_metric_spec.rb diff --git a/app/models/issue.rb b/app/models/issue.rb index 470b7a3ba96..ea7acf9a5d1 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -166,7 +166,7 @@ class Issue < ApplicationRecord scope :with_api_entity_associations, -> { preload(:timelogs, :closed_by, :assignees, :author, :labels, :issuable_severity, milestone: { project: [:route, { namespace: :route }] }, - project: [:route, { namespace: :route }], + project: [:project_feature, :route, { namespace: :route }], duplicated_to: { project: [:project_feature] }) } scope :with_issue_type, ->(types) { where(issue_type: types) } @@ -622,7 +622,9 @@ class Issue < ApplicationRecord # for performance reasons, check commit: 002ad215818450d2cbbc5fa065850a953dc7ada8 # Make sure to sync this method with issue_policy.rb def readable_by?(user) - if user.can_read_all_resources? + if !project.issues_enabled? + false + elsif user.can_read_all_resources? true elsif project.personal? && project.team.owner?(user) true diff --git a/config/metrics/counts_all/20210216181014_projects_with_expiration_policy_disabled.yml b/config/metrics/counts_all/20210216181014_projects_with_expiration_policy_disabled.yml index 1d71cc632c4..c2294650494 100644 --- a/config/metrics/counts_all/20210216181014_projects_with_expiration_policy_disabled.yml +++ b/config/metrics/counts_all/20210216181014_projects_with_expiration_policy_disabled.yml @@ -10,6 +10,7 @@ value_type: number status: active time_frame: all data_source: database +instrumentation_class: DistinctCountProjectsWithExpirationPolicyDisabledMetric distribution: - ee - ce diff --git a/doc/administration/package_information/index.md b/doc/administration/package_information/index.md index bd5904b1e7c..4758b453135 100644 --- a/doc/administration/package_information/index.md +++ b/doc/administration/package_information/index.md @@ -53,7 +53,7 @@ Documentation on package signatures can be found at [Signed Packages](signed_pac Configuration file in `/etc/gitlab/gitlab.rb` is created on initial installation of the Omnibus GitLab package. On subsequent package upgrades, the configuration -file is not updated with new configuration. This is done in order to avoid +file is not updated with new configuration. This is done to avoid accidental overwrite of user configuration provided in `/etc/gitlab/gitlab.rb`. New configuration options are noted in the @@ -76,7 +76,7 @@ characters on each line. ## Init system detection -Omnibus GitLab attempts to query the underlying system in order to +Omnibus GitLab attempts to query the underlying system to check which init system it uses. This manifests itself as a `WARNING` during the `sudo gitlab-ctl reconfigure` run. diff --git a/doc/administration/packages/container_registry.md b/doc/administration/packages/container_registry.md index a8c4ccf9a38..a32d304e37d 100644 --- a/doc/administration/packages/container_registry.md +++ b/doc/administration/packages/container_registry.md @@ -1225,7 +1225,7 @@ and signed with the private key. The Registry then verifies that the signature matches the registry certificate specified in its configuration and allows the operation. GitLab background jobs processing (through Sidekiq) also interacts with Registry. -These jobs talk directly to Registry in order to handle image deletion. +These jobs talk directly to Registry to handle image deletion. ## Troubleshooting diff --git a/doc/api/statistics.md b/doc/api/statistics.md index 13221d940c1..691b03505a7 100644 --- a/doc/api/statistics.md +++ b/doc/api/statistics.md @@ -9,7 +9,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w ## Get current application statistics List the current statistics of the GitLab instance. You have to be an -administrator in order to perform this action. +administrator to perform this action. NOTE: These statistics are approximate. diff --git a/doc/architecture/blueprints/cloud_native_gitlab_pages/index.md b/doc/architecture/blueprints/cloud_native_gitlab_pages/index.md index b376733992d..127badabb71 100644 --- a/doc/architecture/blueprints/cloud_native_gitlab_pages/index.md +++ b/doc/architecture/blueprints/cloud_native_gitlab_pages/index.md @@ -20,7 +20,7 @@ company behind the project. This effort is described in more detail [in the infrastructure team handbook page](https://about.gitlab.com/handbook/engineering/infrastructure/production/kubernetes/gitlab-com/). -GitLab Pages is tightly coupled with NFS and in order to unblock Kubernetes +GitLab Pages is tightly coupled with NFS and to unblock Kubernetes migration a significant change to GitLab Pages' architecture is required. This is an ongoing work that we have started more than a year ago. This blueprint might be useful to understand why it is important, and what is the roadmap. diff --git a/doc/architecture/blueprints/composable_codebase_using_rails_engines/index.md b/doc/architecture/blueprints/composable_codebase_using_rails_engines/index.md index bfa6ba2b445..4111e2ef056 100644 --- a/doc/architecture/blueprints/composable_codebase_using_rails_engines/index.md +++ b/doc/architecture/blueprints/composable_codebase_using_rails_engines/index.md @@ -50,7 +50,7 @@ codebase without clear boundaries results in a number of problems and inefficien we usually need to run a whole test suite to confidently know which parts are affected. This to some extent can be improved by building a heuristic to aid this process, but it is prone to errors and hard to keep accurate at all times -- All components need to be loaded at all times in order to run only parts of the application +- All components need to be loaded at all times to run only parts of the application - Increased resource usage, as we load parts of the application that are rarely used in a given context - The high memory usage results in slowing the whole application as it increases GC cycles duration creating significantly longer latency for processing requests or worse cache usage of CPUs @@ -208,7 +208,7 @@ graph LR ### Application Layers on GitLab.com -Due to its scale, GitLab.com requires much more attention to run. This is needed in order to better manage resources +Due to its scale, GitLab.com requires much more attention to run. This is needed to better manage resources and provide SLAs for different functional parts. The chart below provides a simplistic view of GitLab.com application layers. It does not include all components, like Object Storage nor Gitaly nodes, but shows the GitLab Rails dependencies between different components and how they are configured on GitLab.com today: @@ -543,7 +543,7 @@ Controllers, Serializers, some presenters and some of the Grape:Entities are als Potential challenges with moving Controllers: -- We needed to extend `Gitlab::Patch::DrawRoute` in order to support `engines/web_engine/config/routes` and `engines/web_engine/ee/config/routes` in case when `web_engine` is loaded. Here is potential [solution](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/53720#note_506957398). +- We needed to extend `Gitlab::Patch::DrawRoute` to support `engines/web_engine/config/routes` and `engines/web_engine/ee/config/routes` in case when `web_engine` is loaded. Here is potential [solution](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/53720#note_506957398). - `Gitlab::Routing.url_helpers` paths are used in models and services, that could be used by Sidekiq (for example `Gitlab::Routing.url_helpers.project_pipelines_path` is used by [ExpirePipelineCacheService](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/services/ci/expire_pipeline_cache_service.rb#L20) in [ExpirePipelineCacheWorker](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/workers/expire_pipeline_cache_worker.rb#L18))) ### Packwerk diff --git a/doc/architecture/blueprints/database_testing/index.md b/doc/architecture/blueprints/database_testing/index.md index 3d50a9bd942..3f8041ea416 100644 --- a/doc/architecture/blueprints/database_testing/index.md +++ b/doc/architecture/blueprints/database_testing/index.md @@ -84,7 +84,7 @@ The short-term focus is on testing regular migrations (typically schema changes) In order to secure this process and meet compliance goals, the runner environment is treated as a *production* environment and similarly locked down, monitored and audited. Only Database Maintainers have access to the CI pipeline and its job output. Everyone else can only see the results and statistics posted back on the merge request. -We implement a secured CI pipeline on that adds the execution steps outlined above. The goal is to secure this pipeline in order to solve the following problem: +We implement a secured CI pipeline on that adds the execution steps outlined above. The goal is to secure this pipeline to solve the following problem: Make sure we strongly protect production data, even though we allow everyone (GitLab team/developers) to execute arbitrary code on the thin-clone which contains production data. diff --git a/doc/architecture/blueprints/runner_scaling/index.md b/doc/architecture/blueprints/runner_scaling/index.md index 700fd6367cd..2703ee0b873 100644 --- a/doc/architecture/blueprints/runner_scaling/index.md +++ b/doc/architecture/blueprints/runner_scaling/index.md @@ -261,7 +261,7 @@ abstraction. 1. Build an abstraction that serves our community well but allows us to ship it quickly. 1. Invest in a flexible solution, avoid one-way-door decisions, foster iteration. 1. When in doubts err on the side of making things more simple for the wider community. -1. Limit coupling between concerns in order to make the system more simple and extensible. +1. Limit coupling between concerns to make the system more simple and extensible. 1. Concerns should live on one side of the plug or the other--not both, which duplicates effort and increases coupling. diff --git a/doc/architecture/blueprints/work_items/index.md b/doc/architecture/blueprints/work_items/index.md index f86e8775e52..52cedf4dede 100644 --- a/doc/architecture/blueprints/work_items/index.md +++ b/doc/architecture/blueprints/work_items/index.md @@ -74,10 +74,10 @@ Task is a special Work Item type. Tasks can be added to issues as child items an ## Motivation -Work Items main goal is to enhance the planning toolset in order to become the most popular collaboration tool for knowledge workers in any industry. +Work Items main goal is to enhance the planning toolset to become the most popular collaboration tool for knowledge workers in any industry. -- Puts all like-items (issues, incidents, epics, test cases etc.) on a standard platform in order to simplify maintenance and increase consistency in experience -- Enables first-class support of common planning concepts in order to lower complexity and allow users to plan without learning GitLab-specific nuances. +- Puts all like-items (issues, incidents, epics, test cases etc.) on a standard platform to simplify maintenance and increase consistency in experience +- Enables first-class support of common planning concepts to lower complexity and allow users to plan without learning GitLab-specific nuances. ## Goals diff --git a/doc/ci/ssh_keys/index.md b/doc/ci/ssh_keys/index.md index b31c3148ab0..cc6efc1b698 100644 --- a/doc/ci/ssh_keys/index.md +++ b/doc/ci/ssh_keys/index.md @@ -12,7 +12,7 @@ environment (where the GitLab Runner runs). Use SSH keys when: -1. You want to checkout internal submodules +1. You want to check out internal submodules 1. You want to download private packages using your package manager (for example, Bundler) 1. You want to deploy your application to your own server, or, for example, Heroku 1. You want to execute SSH commands from the build environment to a remote server diff --git a/doc/development/api_graphql_styleguide.md b/doc/development/api_graphql_styleguide.md index 454fb4afaa1..d3053a1ca5f 100644 --- a/doc/development/api_graphql_styleguide.md +++ b/doc/development/api_graphql_styleguide.md @@ -436,7 +436,7 @@ By default, fields add `1` to a query's complexity score. This can be overridden [providing a custom `complexity`](https://graphql-ruby.org/queries/complexity_and_depth.html) value for a field. Developers should specify higher complexity for fields that cause more _work_ to be performed -by the server in order to return data. Fields that represent data that can be returned +by the server to return data. Fields that represent data that can be returned with little-to-no _work_, for example in most cases; `id` or `title`, can be given a complexity of `0`. ### `calls_gitaly` diff --git a/doc/development/contributing/merge_request_workflow.md b/doc/development/contributing/merge_request_workflow.md index 7db1385bf4f..b40df01cbe9 100644 --- a/doc/development/contributing/merge_request_workflow.md +++ b/doc/development/contributing/merge_request_workflow.md @@ -14,7 +14,7 @@ label, but you are free to contribute to any issue you want. If an issue is marked for the current milestone at any time, even when you are working on it, a GitLab Inc. team member may take over the merge request -in order to ensure the work is finished before the release date. +to ensure the work is finished before the release date. If you want to add a new feature that is not labeled, it is best to first create an issue (if there isn't one already) and leave a comment asking for it diff --git a/doc/development/contributing/style_guides.md b/doc/development/contributing/style_guides.md index 79057ba8142..9d04e1590d0 100644 --- a/doc/development/contributing/style_guides.md +++ b/doc/development/contributing/style_guides.md @@ -183,7 +183,7 @@ To fix this issue: When creating [node patterns](https://docs.rubocop.org/rubocop-ast/node_pattern.html) to match Ruby's AST, you can use [`scripts/rubocop-parse`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/scripts/rubocop-parse) -to display the AST of a Ruby expression, in order to help you create the matcher. +to display the AST of a Ruby expression, to help you create the matcher. See also [!97024](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/97024). ### Resolving RuboCop exceptions diff --git a/doc/development/database/efficient_in_operator_queries.md b/doc/development/database/efficient_in_operator_queries.md index 3f495696477..74b896225f9 100644 --- a/doc/development/database/efficient_in_operator_queries.md +++ b/doc/development/database/efficient_in_operator_queries.md @@ -1052,6 +1052,6 @@ Performance comparison for the `gitlab-org` group: | Optimized `IN` query | 9783 | 450ms | 22ms | NOTE: -Before taking measurements, the group lookup query was executed separately in order to make +Before taking measurements, the group lookup query was executed separately to make the group data available in the buffer cache. Since it's a frequently called query, it hits many shared buffers during the query execution in the production environment. diff --git a/doc/development/database/iterating_tables_in_batches.md b/doc/development/database/iterating_tables_in_batches.md index 73e9d08bf57..6357bed8b00 100644 --- a/doc/development/database/iterating_tables_in_batches.md +++ b/doc/development/database/iterating_tables_in_batches.md @@ -196,7 +196,7 @@ value is "excluded". The query looks at the index to get the location of the fiv rows on the disk and read the rows from the table. The returned array is processed in Ruby. The first iteration is done. For the next iteration, the last `id` value is reused from the -previous iteration in order to find out the next end `id` value. +previous iteration to find out the next end `id` value. ```sql SELECT "users"."id" FROM "users" WHERE "users"."id" >= 302 ORDER BY "users"."id" ASC LIMIT 1 OFFSET 5 diff --git a/doc/development/database/understanding_explain_plans.md b/doc/development/database/understanding_explain_plans.md index 82d93634857..d4b29a72af2 100644 --- a/doc/development/database/understanding_explain_plans.md +++ b/doc/development/database/understanding_explain_plans.md @@ -719,7 +719,7 @@ and through its [web interface](https://console.postgres.ai/gitlab/joe-instances With Joe Bot you can execute DDL statements (like creating indexes, tables, and columns) and get query plans for `SELECT`, `UPDATE`, and `DELETE` statements. -For example, in order to test new index on a column that is not existing on production yet, you can do the following: +For example, to test new index on a column that is not existing on production yet, you can do the following: Create the column: diff --git a/doc/development/diffs.md b/doc/development/diffs.md index c5c05d1143f..b38fcea4f00 100644 --- a/doc/development/diffs.md +++ b/doc/development/diffs.md @@ -148,7 +148,7 @@ This limit is hardcoded and only applied on GitLab. Diff Viewers, which can be found on `models/diff_viewer/*` are classes used to map metadata about each type of Diff File. It has information whether it's a binary, which partial should be used to render it or which File extensions this class accounts for. -`DiffViewer::Base` validates _blobs_ (old and new versions) content, extension and file type in order to check if it can be rendered. +`DiffViewer::Base` validates _blobs_ (old and new versions) content, extension and file type to check if it can be rendered. ## Merge request diffs against the `HEAD` of the target branch @@ -169,7 +169,7 @@ In order to display an up-to-date diff, in GitLab 12.9 we [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/27008) merge request diffs compared against `HEAD` of the target branch: the target branch is artificially merged into the source branch, then the resulting -merge ref is compared to the source branch in order to calculate an accurate +merge ref is compared to the source branch to calculate an accurate diff. Until we complete the epics ["use merge refs for diffs"](https://gitlab.com/groups/gitlab-org/-/epics/854) diff --git a/doc/development/elasticsearch.md b/doc/development/elasticsearch.md index bca0bf10e3e..ce7df23c178 100644 --- a/doc/development/elasticsearch.md +++ b/doc/development/elasticsearch.md @@ -64,7 +64,7 @@ Please see the `sha_tokenizer` explanation later below for an example. Used when indexing a blob's filename and content. Uses the `whitespace` tokenizer and the filters: [`code`](#code), `lowercase`, and `asciifolding` -The `whitespace` tokenizer was selected in order to have more control over how tokens are split. For example the string `Foo::bar(4)` needs to generate tokens like `Foo` and `bar(4)` in order to be properly searched. +The `whitespace` tokenizer was selected to have more control over how tokens are split. For example the string `Foo::bar(4)` needs to generate tokens like `Foo` and `bar(4)` to be properly searched. Please see the `code` filter for an explanation on how tokens are split. @@ -94,7 +94,7 @@ Example: #### `path_tokenizer` -This is a custom tokenizer that uses the [`path_hierarchy` tokenizer](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/analysis-pathhierarchy-tokenizer.html) with `reverse: true` in order to allow searches to find paths no matter how much or how little of the path is given as input. +This is a custom tokenizer that uses the [`path_hierarchy` tokenizer](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/analysis-pathhierarchy-tokenizer.html) with `reverse: true` to allow searches to find paths no matter how much or how little of the path is given as input. Example: diff --git a/doc/development/fe_guide/development_process.md b/doc/development/fe_guide/development_process.md index a9c6d773d53..fc91ff55b24 100644 --- a/doc/development/fe_guide/development_process.md +++ b/doc/development/fe_guide/development_process.md @@ -26,7 +26,7 @@ Use your best judgment when to use it and contribute new points through merge re - [ ] Check the current set weight of the issue, does it fit your estimate? - [ ] Are all [departments](https://about.gitlab.com/handbook/engineering/#engineering-teams) that are needed from your perspective already involved in the issue? (For example is UX missing?) - [ ] Is the specification complete? Are you missing decisions? How about error handling/defaults/edge cases? Take your time to understand the needed implementation and go through its flow. -- [ ] Are all necessary UX specifications available that you will need in order to implement? Are there new UX components/patterns in the designs? Then contact the UI component team early on. How should error messages or validation be handled? +- [ ] Are all necessary UX specifications available that you will need to implement? Are there new UX components/patterns in the designs? Then contact the UI component team early on. How should error messages or validation be handled? - [ ] **Library usage** Use Vuex as soon as you have even a medium state to manage, use Vue router if you need to have different views internally and want to link from the outside. Check what libraries we already have for which occasions. - [ ] **Plan your implementation:** - [ ] **Architecture plan:** Create a plan aligned with GitLab's architecture, how you are going to do the implementation, for example Vue application setup and its components (through [onion skinning](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/35873#note_39994091)), Store structure and data flow, which existing Vue components can you reuse. It's a good idea to go through your plan with another engineer to refine it. diff --git a/doc/development/fe_guide/graphql.md b/doc/development/fe_guide/graphql.md index 642d94fafab..1cf4c1d60b1 100644 --- a/doc/development/fe_guide/graphql.md +++ b/doc/development/fe_guide/graphql.md @@ -1318,7 +1318,7 @@ automatically find and index the schema. #### Testing Apollo components -If we use `ApolloQuery` or `ApolloMutation` in our components, in order to test their functionality we need to add a stub first: +If we use `ApolloQuery` or `ApolloMutation` in our components, to test their functionality we need to add a stub first: ```javascript import { ApolloMutation } from 'vue-apollo'; diff --git a/doc/development/feature_flags/index.md b/doc/development/feature_flags/index.md index e3cf36f6a0a..f1cde4ae1ea 100644 --- a/doc/development/feature_flags/index.md +++ b/doc/development/feature_flags/index.md @@ -52,7 +52,7 @@ When the feature implementation is delivered among multiple merge requests: 1. When the feature is ready to be announced, create a merge request that adds documentation about the feature, including [documentation for the feature flag itself](../documentation/feature_flags.md), and a [changelog entry](#changelog). In the same merge request either flip the feature flag to - be **on by default** or remove it entirely in order to enable the new behavior. + be **on by default** or remove it entirely to enable the new behavior. One might be tempted to think that feature flags will delay the release of a feature by at least one month (= one release). This is not the case. A feature diff --git a/doc/development/fips_compliance.md b/doc/development/fips_compliance.md index d0d73639f67..6cd88b49d7c 100644 --- a/doc/development/fips_compliance.md +++ b/doc/development/fips_compliance.md @@ -67,7 +67,7 @@ listed here that also do not work properly in FIPS mode: - [Static Application Security Testing (SAST)](../user/application_security/sast/index.md) supports a reduced set of [analyzers](../user/application_security/sast/index.md#fips-enabled-images) when operating in FIPS-compliant mode. -- Advanced Search is currently not included in FIPS mode. It must not be enabled in order to be FIPS-compliant. +- Advanced Search is currently not included in FIPS mode. It must not be enabled to be FIPS-compliant. - [Gravatar or Libravatar-based profile images](../administration/libravatar.md) are not FIPS-compliant. Additionally, these package repositories are disabled in FIPS mode: diff --git a/doc/development/github_importer.md b/doc/development/github_importer.md index af787633b06..6095c9c7cf6 100644 --- a/doc/development/github_importer.md +++ b/doc/development/github_importer.md @@ -199,7 +199,7 @@ GitHub has a rate limit of 5,000 API calls per hour. The number of requests necessary to import a project is largely dominated by the number of unique users involved in a project (for example, issue authors). Other data such as issue pages and comments typically only requires a few dozen requests to import. This is -because we need the Email address of users in order to map them to GitLab users. +because we need the Email address of users to map them to GitLab users. We handle this by doing the following: diff --git a/doc/development/graphql_guide/batchloader.md b/doc/development/graphql_guide/batchloader.md index 9f91f3d14bb..bde7ebdbf9c 100644 --- a/doc/development/graphql_guide/batchloader.md +++ b/doc/development/graphql_guide/batchloader.md @@ -146,7 +146,7 @@ def publisher ::Gitlab::Graphql::Loaders::BatchModelLoader.new(::Publisher, object.publisher_id).find end -# Here we need the publisher in order to generate the catalog URL +# Here we need the publisher to generate the catalog URL def catalog_url ::Gitlab::Graphql::Lazy.with_value(publisher) do |p| UrlHelpers.book_catalog_url(publisher, object.isbn) diff --git a/doc/development/image_scaling.md b/doc/development/image_scaling.md index 5a191c23df9..bb9ed671627 100644 --- a/doc/development/image_scaling.md +++ b/doc/development/image_scaling.md @@ -13,7 +13,7 @@ For a general introduction to the history of image scaling at GitLab, you might ## Why image scaling? -Since version 13.6, GitLab scales down images on demand in order to reduce the page data footprint. +Since version 13.6, GitLab scales down images on demand to reduce the page data footprint. This both reduces the amount of data "on the wire", but also helps with rendering performance, since the browser has less work to do. diff --git a/doc/development/integrations/secure.md b/doc/development/integrations/secure.md index 8d3ce0b7927..f40caf29cfa 100644 --- a/doc/development/integrations/secure.md +++ b/doc/development/integrations/secure.md @@ -452,7 +452,7 @@ The `scan.primary_identifiers` field is an optional field containing an array of This is an exhaustive list of all rulesets for which the analyzer performed the scan. Even when the [`Vulnerabilities`](#vulnerabilities) array for a given scan may be empty, this optional field -should contain the complete list of potential identifiers in order to inform the Rails application of which +should contain the complete list of potential identifiers to inform the Rails application of which rules were executed. When populated, the Rails application will automatically resolve previously detected vulnerabilities as no diff --git a/doc/development/internal_api/index.md b/doc/development/internal_api/index.md index 4b5cc2a49ae..e7dfcd58af6 100644 --- a/doc/development/internal_api/index.md +++ b/doc/development/internal_api/index.md @@ -665,8 +665,7 @@ Example response: ## Subscriptions -The subscriptions endpoint is used by [CustomersDot](https://gitlab.com/gitlab-org/customers-gitlab-com) (`customers.gitlab.com`) -in order to apply subscriptions including trials, and add-on purchases, for personal namespaces or top-level groups within GitLab.com. +The subscriptions endpoint is used by [CustomersDot](https://gitlab.com/gitlab-org/customers-gitlab-com) (`customers.gitlab.com`) to apply subscriptions including trials, and add-on purchases, for personal namespaces or top-level groups within GitLab.com. ### Creating a subscription diff --git a/doc/development/licensing.md b/doc/development/licensing.md index 60a01c39ce8..d7dfdb7357d 100644 --- a/doc/development/licensing.md +++ b/doc/development/licensing.md @@ -18,7 +18,7 @@ Some gems may not include their license information in their `gemspec` file, and ### License Finder commands -There are a few basic commands License Finder provides that you need in order to manage license detection. +There are a few basic commands License Finder provides that you need to manage license detection. To verify that the checks are passing, and/or to see what dependencies are causing the checks to fail: diff --git a/doc/development/merge_request_performance_guidelines.md b/doc/development/merge_request_performance_guidelines.md index 35810cbe16e..cead73a3034 100644 --- a/doc/development/merge_request_performance_guidelines.md +++ b/doc/development/merge_request_performance_guidelines.md @@ -281,7 +281,7 @@ be clearly mentioned in the merge request description. ## Batch process **Summary:** Iterating a single process to external services (for example, PostgreSQL, Redis, Object Storage) -should be executed in a **batch-style** in order to reduce connection overheads. +should be executed in a **batch-style** to reduce connection overheads. For fetching rows from various tables in a batch-style, please see [Eager Loading](#eager-loading) section. @@ -488,7 +488,7 @@ We can consider the following types of storages: - **Object-based persistent storage** (long term storage) this type of storage uses external services like [AWS S3](https://en.wikipedia.org/wiki/Amazon_S3). The Object Storage can be treated as infinitely scalable and redundant. Accessing this storage usually requires - downloading the file in order to manipulate it. The Object Storage can be considered as an ultimate + downloading the file to manipulate it. The Object Storage can be considered as an ultimate solution, as by definition it can be assumed that it can handle unlimited concurrent uploads and downloads of files. This is also ultimate solution required to ensure that application can run in containerized deployments (Kubernetes) at ease. diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md index 34ffdda9fa3..40cc1e58258 100644 --- a/doc/development/migration_style_guide.md +++ b/doc/development/migration_style_guide.md @@ -1281,7 +1281,7 @@ in a previous migration. ### Example: Add a column `my_column` to the users table -It is important not to leave out the `User.reset_column_information` command, in order to ensure that the old schema is dropped from the cache and ActiveRecord loads the updated schema information. +It is important not to leave out the `User.reset_column_information` command, to ensure that the old schema is dropped from the cache and ActiveRecord loads the updated schema information. ```ruby class AddAndSeedMyColumn < Gitlab::Database::Migration[2.0] diff --git a/doc/development/performance.md b/doc/development/performance.md index 5f2fa680b34..f07e64fa583 100644 --- a/doc/development/performance.md +++ b/doc/development/performance.md @@ -925,7 +925,7 @@ SOME_CONSTANT = 'bar' ## How to seed a database with millions of rows You might want millions of project rows in your local database, for example, -in order to compare relative query performance, or to reproduce a bug. You could +to compare relative query performance, or to reproduce a bug. You could do this by hand with SQL commands or using [Mass Inserting Rails Models](mass_insert.md) functionality. Assuming you are working with ActiveRecord models, you might also find these links helpful: diff --git a/doc/development/pipelines.md b/doc/development/pipelines.md index aa83544af65..047a2064f6f 100644 --- a/doc/development/pipelines.md +++ b/doc/development/pipelines.md @@ -394,8 +394,7 @@ In general, pipelines for an MR fall into one of the following types (from short A "pipeline type" is an abstract term that mostly describes the "critical path" (for example, the chain of jobs for which the sum of individual duration equals the pipeline's duration). -We use these "pipeline types" in [metrics dashboards](https://app.periscopedata.com/app/gitlab/858266/GitLab-Pipeline-Durations) -in order to detect what types and jobs need to be optimized first. +We use these "pipeline types" in [metrics dashboards](https://app.periscopedata.com/app/gitlab/858266/GitLab-Pipeline-Durations) to detect what types and jobs need to be optimized first. An MR that touches multiple areas would be associated with the longest type applicable. For instance, an MR that touches backend and frontend would fall into the "Frontend" pipeline type since this type takes longer to finish than the "Backend" pipeline type. @@ -751,7 +750,7 @@ This works well for the following reasons: ### Artifacts strategy -We limit the artifacts that are saved and retrieved by jobs to the minimum in order to reduce the upload/download time and costs, as well as the artifacts storage. +We limit the artifacts that are saved and retrieved by jobs to the minimum to reduce the upload/download time and costs, as well as the artifacts storage. ### Components caching diff --git a/doc/development/profiling.md b/doc/development/profiling.md index 0edb0e49e48..6fda781e569 100644 --- a/doc/development/profiling.md +++ b/doc/development/profiling.md @@ -286,7 +286,7 @@ The following table lists these variables along with their default values. ([Source](https://github.com/ruby/ruby/blob/45b29754cfba8435bc4980a87cd0d32c648f8a2e/gc.c#L254-L308)) -GitLab may decide to change these settings in order to speed up application performance, lower memory requirements, or both. +GitLab may decide to change these settings to speed up application performance, lower memory requirements, or both. You can see how each of these settings affect GC performance, memory use and application start-up time for an idle instance of GitLab by running the `scripts/perf/gc/collect_gc_stats.rb` script. It will output GC stats and general timing data to standard diff --git a/doc/development/project_templates.md b/doc/development/project_templates.md index 0828dad3fc1..2f1ded23e38 100644 --- a/doc/development/project_templates.md +++ b/doc/development/project_templates.md @@ -50,7 +50,7 @@ Before GitLab can implement the project template, you must [create a merge reque 1. [Export the project](../user/project/settings/import_export.md#export-a-project-and-its-data) and save the file as `.tar.gz`, where `` is the short name of the project. Move this file to the root directory of `gitlab-org/gitlab`. -1. In `gitlab-org/gitlab`, create and checkout a new branch. +1. In `gitlab-org/gitlab`, create and check out a new branch. 1. Edit the following files to include the project template: - For **non-Enterprise** project templates: - In `lib/gitlab/project_template.rb`, add details about the template diff --git a/doc/development/real_time.md b/doc/development/real_time.md index aa3c74a1951..2aa48fed8eb 100644 --- a/doc/development/real_time.md +++ b/doc/development/real_time.md @@ -19,7 +19,7 @@ out using the instructions below. ## Reuse an existing WebSocket connection Features reusing an existing connection incur minimal risk. Feature flag rollout -is recommended in order to give more control to self-hosting customers. However, +is recommended to give more control to self-hosting customers. However, it is not necessary to roll out in percentages, or to estimate new connections for GitLab.com. diff --git a/doc/development/refactoring_guide/index.md b/doc/development/refactoring_guide/index.md index eac5ad43e74..44beb0623a9 100644 --- a/doc/development/refactoring_guide/index.md +++ b/doc/development/refactoring_guide/index.md @@ -18,14 +18,14 @@ Pinning tests help you ensure that you don't unintentionally change the output o 1. For each possible input, identify the significant possible values. 1. Create a test to save a full detailed snapshot for each helpful combination values per input. This should guarantee that we have "pinned down" the current behavior. The snapshot could be literally a screenshot, a dump of HTML, or even an ordered list of debugging statements. 1. Run all the pinning tests against the code, before you start refactoring (Oracle) -1. Perform the refactor (or checkout the commit with the work done) +1. Perform the refactor (or check out the commit with the work done) 1. Run again all the pinning test against the post refactor code (Pin) 1. Compare the Oracle with the Pin. If the Pin is different, you know the refactoring doesn't preserve existing behavior. 1. Repeat the previous three steps as necessary until the refactoring is complete. ### Example commit history -Leaving in the commits for adding and removing pins helps others checkout and verify the result of the test. +Leaving in the commits for adding and removing pins helps others check out and verify the result of the test. ```shell AAAAAA Add pinning tests to funky_foo diff --git a/doc/development/secure_coding_guidelines.md b/doc/development/secure_coding_guidelines.md index 700de9e6b6e..11a15f38823 100644 --- a/doc/development/secure_coding_guidelines.md +++ b/doc/development/secure_coding_guidelines.md @@ -53,7 +53,7 @@ Each time you implement a new feature/endpoint, whether it is at UI, API or Grap Be careful to **also test [visibility levels](https://gitlab.com/gitlab-org/gitlab-foss/-/blob/master/doc/development/permissions.md#feature-specific-permissions)** and not only project access rights. -The HTTP status code returned when an authorization check fails should generally be `404 Not Found` in order to avoid revealing information +The HTTP status code returned when an authorization check fails should generally be `404 Not Found` to avoid revealing information about whether or not the requested resource exists. `403 Forbidden` may be appropriate if you need to display a specific message to the user about why they cannot access the resource. If you are displaying a generic message such as "access denied", consider returning `404 Not Found` instead. diff --git a/doc/development/service_measurement.md b/doc/development/service_measurement.md index 3481ad45191..9d22e9c376c 100644 --- a/doc/development/service_measurement.md +++ b/doc/development/service_measurement.md @@ -6,7 +6,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w # GitLab Developers Guide to service measurement -You can enable service measurement in order to debug any slow service's execution time, number of SQL calls, garbage collection stats, memory usage, etc. +You can enable service measurement to debug any slow service's execution time, number of SQL calls, garbage collection stats, memory usage, etc. ## Measuring module @@ -43,7 +43,7 @@ DummyService.prepend(Measurable) In case when you are prepending a module from the `EE` namespace with EE features, you need to prepend Measurable after prepending the `EE` module. -This way, `Measurable` is at the bottom of the ancestor chain, in order to measure execution of `EE` features as well: +This way, `Measurable` is at the bottom of the ancestor chain, to measure execution of `EE` features as well: ```ruby class DummyService diff --git a/doc/development/service_ping/metrics_lifecycle.md b/doc/development/service_ping/metrics_lifecycle.md index 858bd234181..f13aebeb16e 100644 --- a/doc/development/service_ping/metrics_lifecycle.md +++ b/doc/development/service_ping/metrics_lifecycle.md @@ -120,7 +120,7 @@ To remove a metric: Do not remove the metric's YAML definition altogether. Some self-managed instances might not immediately update to the latest version of GitLab, and therefore continue to report the removed metric. The Product Intelligence team - requires a record of all removed metrics in order to identify and filter them. + requires a record of all removed metrics to identify and filter them. For example please take a look at this [merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/60149/diffs#b01f429a54843feb22265100c0e4fec1b7da1240_10_10). diff --git a/doc/development/sidekiq/worker_attributes.md b/doc/development/sidekiq/worker_attributes.md index 682a22dc60d..48a222d65a0 100644 --- a/doc/development/sidekiq/worker_attributes.md +++ b/doc/development/sidekiq/worker_attributes.md @@ -60,7 +60,7 @@ that branch, but be told in the UI that the branch does not exist. We deem these jobs to be `urgency :high`. Extra effort is made to ensure that these jobs are started within a very short -period of time after being scheduled. However, in order to ensure throughput, +period of time after being scheduled. However, to ensure throughput, these jobs also have very strict execution duration requirements: 1. The median job execution time should be less than 1 second. @@ -117,7 +117,7 @@ Most background jobs in the GitLab application communicate with other GitLab services. For example, PostgreSQL, Redis, Gitaly, and Object Storage. These are considered to be "internal" dependencies for a job. -However, some jobs are dependent on external services in order to complete +However, some jobs are dependent on external services to complete successfully. Some examples include: 1. Jobs which call web-hooks configured by a user. diff --git a/doc/development/snowplow/troubleshooting.md b/doc/development/snowplow/troubleshooting.md index 8e4be55cfce..306040f8c9c 100644 --- a/doc/development/snowplow/troubleshooting.md +++ b/doc/development/snowplow/troubleshooting.md @@ -74,7 +74,7 @@ Enrichers are not scalling well for the amount of events we receive. See the [dashboard](https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#dashboards:name=SnowPlow). -Could we get assistance in order to fix the delay? +Could we get assistance to fix the delay? Thank you! ``` diff --git a/doc/install/docker.md b/doc/install/docker.md index aacbbf5b79f..1cda81233fd 100644 --- a/doc/install/docker.md +++ b/doc/install/docker.md @@ -303,8 +303,7 @@ To receive emails from GitLab you have to configure the have an SMTP server installed. You may also be interested in [enabling HTTPS](https://docs.gitlab.com/omnibus/settings/ssl.html). -After you make all the changes you want, you will need to restart the container -in order to reconfigure GitLab: +After you make all the changes you want, you will need to restart the container to reconfigure GitLab: ```shell sudo docker restart gitlab diff --git a/doc/integration/advanced_search/elasticsearch.md b/doc/integration/advanced_search/elasticsearch.md index bef2c068566..87b812f3f9b 100644 --- a/doc/integration/advanced_search/elasticsearch.md +++ b/doc/integration/advanced_search/elasticsearch.md @@ -742,7 +742,7 @@ Make sure to prepare for this task by having a ### Deleted documents -Whenever a change or deletion is made to an indexed GitLab object (a merge request description is changed, a file is deleted from the default branch in a repository, a project is deleted, etc), a document in the index is deleted. However, since these are "soft" deletes, the overall number of "deleted documents", and therefore wasted space, increases. Elasticsearch does intelligent merging of segments in order to remove these deleted documents. However, depending on the amount and type of activity in your GitLab installation, it's possible to see as much as 50% wasted space in the index. +Whenever a change or deletion is made to an indexed GitLab object (a merge request description is changed, a file is deleted from the default branch in a repository, a project is deleted, etc), a document in the index is deleted. However, since these are "soft" deletes, the overall number of "deleted documents", and therefore wasted space, increases. Elasticsearch does intelligent merging of segments to remove these deleted documents. However, depending on the amount and type of activity in your GitLab installation, it's possible to see as much as 50% wasted space in the index. In general, we recommend letting Elasticsearch merge and reclaim space automatically, with the default settings. From [Lucene's Handling of Deleted Documents](https://www.elastic.co/blog/lucenes-handling-of-deleted-documents "Lucene's Handling of Deleted Documents"), _"Overall, besides perhaps decreasing the maximum segment size, it is best to leave Lucene's defaults as-is and not fret too much about when deletes are reclaimed."_ diff --git a/doc/integration/kerberos.md b/doc/integration/kerberos.md index bcdacc3a0a6..c7cbc4389f5 100644 --- a/doc/integration/kerberos.md +++ b/doc/integration/kerberos.md @@ -295,7 +295,7 @@ this can happen in GitLab CI/CD jobs that [authenticate with the CI/CD job token 1. [Reconfigure GitLab](../administration/restart_gitlab.md#omnibus-gitlab-reconfigure) for the changes to take effect. After this change, Git remote URLs have to be updated to -`https://gitlab.example.com:8443/mygroup/myproject.git` in order to use +`https://gitlab.example.com:8443/mygroup/myproject.git` to use Kerberos ticket-based authentication. ## Upgrading from password-based to ticket-based Kerberos sign-ins diff --git a/doc/security/asset_proxy.md b/doc/security/asset_proxy.md index 7a47e1c16ff..cde377cbb73 100644 --- a/doc/security/asset_proxy.md +++ b/doc/security/asset_proxy.md @@ -11,7 +11,7 @@ the ability to steal a user's IP address by referencing images in issues and com For example, adding `![Example image](http://example.com/example.png)` to an issue description causes the image to be loaded from the external -server in order to be displayed. However, this also allows the external server +server to be displayed. However, this also allows the external server to log the IP address of the user. One way to mitigate this is by proxying any external images to a server you diff --git a/doc/user/admin_area/appearance.md b/doc/user/admin_area/appearance.md index 1e72b241bf3..8c4d6ab86ca 100644 --- a/doc/user/admin_area/appearance.md +++ b/doc/user/admin_area/appearance.md @@ -84,8 +84,7 @@ which brings you to the new project page so you can review the change. ## Libravatar [Libravatar](https://www.libravatar.org) is supported by GitLab for avatar images, but you must -[manually enable Libravatar support on the GitLab instance](../../administration/libravatar.md) -in order to use the service. +[manually enable Libravatar support on the GitLab instance](../../administration/libravatar.md) to use the service.