From a149dffe2f221544ce239658e1e0fad06a2726a2 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 1 Nov 2022 00:10:27 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .gitlab/ci/build-images.gitlab-ci.yml | 11 +- .gitlab/ci/frontend.gitlab-ci.yml | 5 +- .../ci/package-and-test/main.gitlab-ci.yml | 41 +- .gitlab/ci/qa.gitlab-ci.yml | 2 - .gitlab/ci/review-apps/main.gitlab-ci.yml | 5 +- .gitlab/ci/review.gitlab-ci.yml | 2 - Dockerfile.assets | 2 +- Gemfile | 2 +- Gemfile.checksum | 2 +- Gemfile.lock | 4 +- app/helpers/application_helper.rb | 14 +- .../types/policy_project_updated.yml | 8 + doc/.vale/gitlab/AlertBoxStyle.yml | 6 +- doc/.vale/gitlab/BadPlurals.yml | 4 +- doc/.vale/gitlab/BadgeCapitalization.yml | 2 +- doc/.vale/gitlab/British.yml | 2 +- doc/.vale/gitlab/CIConfigFile.yml | 2 +- doc/.vale/gitlab/CodeblockFences.yml | 2 +- doc/.vale/gitlab/CurlStringsQuoted.yml | 2 +- doc/.vale/gitlab/CurrentStatus.yml | 4 +- doc/.vale/gitlab/DefaultBranch.yml | 6 +- doc/.vale/gitlab/Dropdown.yml | 2 +- doc/.vale/gitlab/EOLWhitespace.yml | 2 +- doc/.vale/gitlab/ElementDescriptors.yml | 2 +- doc/.vale/gitlab/FirstPerson.yml | 4 +- doc/.vale/gitlab/FutureTense.yml | 4 +- doc/.vale/gitlab/HeadingContent.yml | 4 +- doc/.vale/gitlab/HeadingDepth.yml | 2 +- doc/.vale/gitlab/InclusionAbleism.yml | 4 +- doc/.vale/gitlab/InclusionCultural.yml | 4 +- doc/.vale/gitlab/InclusionGender.yml | 4 +- doc/.vale/gitlab/InternalLinkCase.yml | 4 +- doc/.vale/gitlab/InternalLinkExtension.yml | 4 +- doc/.vale/gitlab/InternalLinkFormat.yml | 6 +- doc/.vale/gitlab/LatinTerms.yml | 4 +- doc/.vale/gitlab/Markdown_emoji.yml | 2 +- doc/.vale/gitlab/MeaningfulLinkWords.yml | 4 +- doc/.vale/gitlab/MergeConflictMarkers.yml | 2 +- doc/.vale/gitlab/MultiLineLinks.yml | 4 +- doc/.vale/gitlab/NonStandardQuotes.yml | 4 +- doc/.vale/gitlab/OutdatedVersions.yml | 4 +- doc/.vale/gitlab/OxfordComma.yml | 2 +- doc/.vale/gitlab/Possessive.yml | 4 +- doc/.vale/gitlab/ReadingLevel.yml | 2 +- doc/.vale/gitlab/ReferenceLinks.yml | 4 +- doc/.vale/gitlab/RelativeLinks.yml | 4 +- .../gitlab/RelativeLinksDoubleSlashes.yml | 4 +- doc/.vale/gitlab/Repetition.yml | 2 +- doc/.vale/gitlab/SentenceLength.yml | 2 +- doc/.vale/gitlab/SentenceSpacing.yml | 2 +- doc/.vale/gitlab/Simplicity.yml | 4 +- doc/.vale/gitlab/Spelling.yml | 2 +- doc/.vale/gitlab/SubstitutionSuggestions.yml | 32 +- doc/.vale/gitlab/SubstitutionWarning.yml | 2 +- doc/.vale/gitlab/Substitutions.yml | 2 +- doc/.vale/gitlab/ToDo.yml | 4 +- doc/.vale/gitlab/UnclearAntecedent.yml | 2 +- doc/.vale/gitlab/Uppercase.yml | 2 +- doc/.vale/gitlab/VersionText.yml | 2 +- doc/.vale/gitlab/VersionTextSingleLine.yml | 2 +- doc/.vale/gitlab/Wordy.yml | 2 +- doc/.vale/vale-json.tmpl | 6 +- doc/administration/environment_variables.md | 2 +- doc/administration/git_protocol.md | 2 +- doc/administration/object_storage.md | 2 +- .../reference_architectures/10k_users.md | 2 +- .../reference_architectures/25k_users.md | 2 +- .../reference_architectures/2k_users.md | 2 +- .../reference_architectures/3k_users.md | 2 +- .../reference_architectures/50k_users.md | 2 +- .../reference_architectures/5k_users.md | 2 +- .../gitlab_rails_cheat_sheet.md | 21 - doc/api/graphql/getting_started.md | 22 ++ doc/ci/docker/using_docker_build.md | 2 +- doc/ci/docker/using_docker_images.md | 2 +- .../laravel_with_gitlab_and_envoy/index.md | 2 +- .../site_architecture/deployment_process.md | 2 +- doc/development/go_guide/index.md | 2 +- doc/development/integrations/secure.md | 2 +- doc/development/service_ping/implement.md | 2 +- doc/install/docker.md | 2 +- doc/raketasks/backup_gitlab.md | 2 +- doc/user/packages/container_registry/index.md | 2 +- ...reduce_container_registry_data_transfer.md | 2 +- ..._projects_with_expiration_policy_metric.rb | 6 +- .../import/import_github_repo_spec.rb | 369 ++++++++---------- .../project/import_github_repo_spec.rb | 154 ++++---- .../github_import_shared_context.rb | 43 ++ scripts/build_assets_image | 70 +--- scripts/trigger-build.rb | 15 +- scripts/utils.sh | 16 +- spec/helpers/application_helper_spec.rb | 41 +- ...ects_with_expiration_policy_metric_spec.rb | 14 + spec/scripts/trigger-build_spec.rb | 23 -- workhorse/go.mod | 4 +- workhorse/go.sum | 41 +- 96 files changed, 575 insertions(+), 590 deletions(-) create mode 100644 config/audit_events/types/policy_project_updated.yml create mode 100644 qa/qa/specs/features/shared_contexts/github_import_shared_context.rb diff --git a/.gitlab/ci/build-images.gitlab-ci.yml b/.gitlab/ci/build-images.gitlab-ci.yml index bb18ba12c4b..3c7056a92c1 100644 --- a/.gitlab/ci/build-images.gitlab-ci.yml +++ b/.gitlab/ci/build-images.gitlab-ci.yml @@ -18,7 +18,7 @@ build-qa-image: - ./scripts/build_qa_image # This image is used by: -# - The `CNG` downstream pipelines (we pass the image tag via the `review-build-cng` job): https://gitlab.com/gitlab-org/gitlab/-/blob/c34e0834b01cd45c1f69a01b5e38dd6bc505f903/.gitlab/ci/review-apps/main.gitlab-ci.yml#L69 +# - The `CNG` pipelines (via the `review-build-cng` job): https://gitlab.com/gitlab-org/build/CNG/-/blob/cfc67136d711e1c8c409bf8e57427a644393da2f/.gitlab-ci.yml#L335 # - The `omnibus-gitlab` pipelines (via the `e2e:package-and-test` job): https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/dfd1ad475868fc84e91ab7b5706aa03e46dc3a86/.gitlab-ci.yml#L130 build-assets-image: extends: @@ -27,10 +27,7 @@ build-assets-image: stage: build-images needs: ["compile-production-assets"] script: + # TODO: Change the image tag to be the MD5 of assets files and skip image building if the image exists + # We'll also need to pass GITLAB_ASSETS_TAG to the trigerred omnibus-gitlab pipeline similarly to how we do it for trigerred CNG pipelines + # https://gitlab.com/gitlab-org/gitlab/issues/208389 - run_timed_command "scripts/build_assets_image" - artifacts: - expire_in: 7 days - paths: - # The `cached-assets-hash.txt` file is used in `review-build-cng-env` (`.gitlab/ci/review-apps/main.gitlab-ci.yml`) - # to pass the assets image tag to the CNG downstream pipeline. - - cached-assets-hash.txt diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index d7bd42aa016..3f1469156e6 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -23,7 +23,6 @@ gitlab_assets_archive_doesnt_exist || run_timed_command "download_and_extract_gitlab_assets" fi - assets_compile_script - - echo -n "${GITLAB_ASSETS_HASH}" > "cached-assets-hash.txt" compile-production-assets: extends: @@ -39,7 +38,6 @@ compile-production-assets: # These assets are used in multiple locations: # - in `build-assets-image` job to create assets image for packaging systems # - GitLab UI for integration tests: https://gitlab.com/gitlab-org/gitlab-ui/-/blob/e88493b3c855aea30bf60baee692a64606b0eb1e/.storybook/preview-head.pug#L1 - - cached-assets-hash.txt - public/assets/ - "${WEBPACK_COMPILE_LOG_PATH}" when: always @@ -70,6 +68,9 @@ update-assets-compile-production-cache: - .assets-compile-cache-push - .shared:rules:update-cache stage: prepare + script: + - !reference [compile-production-assets, script] + - echo -n "${GITLAB_ASSETS_HASH}" > "cached-assets-hash.txt" artifacts: {} # This job's purpose is only to update the cache. update-assets-compile-test-cache: diff --git a/.gitlab/ci/package-and-test/main.gitlab-ci.yml b/.gitlab/ci/package-and-test/main.gitlab-ci.yml index 64408838472..50b0b3531c7 100644 --- a/.gitlab/ci/package-and-test/main.gitlab-ci.yml +++ b/.gitlab/ci/package-and-test/main.gitlab-ci.yml @@ -4,7 +4,6 @@ default: interruptible: true include: - - local: .gitlab/ci/global.gitlab-ci.yml - local: .gitlab/ci/package-and-test/rules.gitlab-ci.yml - local: .gitlab/ci/package-and-test/variables.gitlab-ci.yml - project: gitlab-org/quality/pipeline-common @@ -39,6 +38,23 @@ stages: extends: - .gitlab-qa-install +.omnibus-env: + variables: + BUILD_ENV: build.env + script: + - | + SECURITY_SOURCES=$([[ ! "$CI_PROJECT_NAMESPACE" =~ ^gitlab-org\/security ]] || echo "true") + echo "SECURITY_SOURCES=${SECURITY_SOURCES:-false}" > $BUILD_ENV + echo "OMNIBUS_GITLAB_CACHE_UPDATE=${OMNIBUS_GITLAB_CACHE_UPDATE:-false}" >> $BUILD_ENV + for version_file in *_VERSION; do echo "$version_file=$(cat $version_file)" >> $BUILD_ENV; done + echo "OMNIBUS_GITLAB_RUBY3_BUILD=${OMNIBUS_GITLAB_RUBY3_BUILD:-false}" >> $BUILD_ENV + echo "OMNIBUS_GITLAB_CACHE_EDITION=${OMNIBUS_GITLAB_CACHE_EDITION:-GITLAB}" >> $BUILD_ENV + echo "Built environment file for omnibus build:" + cat $BUILD_ENV + artifacts: + reports: + dotenv: $BUILD_ENV + .update-script: script: - export QA_COMMAND="bundle exec gitlab-qa Test::Omnibus::UpdateFromPrevious $RELEASE $GITLAB_VERSION $UPDATE_TYPE -- $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS" @@ -92,29 +108,9 @@ dont-interrupt-me: trigger-omnibus-env: extends: - - .default-utils-before_script + - .omnibus-env - .rules:omnibus-build stage: .pre - needs: - # We need this job because we need its `cached-assets-hash.txt` artifact, so that we can pass the assets image tag to the downstream omnibus-gitlab pipeline. - - pipeline: $PARENT_PIPELINE_ID - job: build-assets-image - variables: - BUILD_ENV: build.env - script: - - | - SECURITY_SOURCES=$([[ ! "$CI_PROJECT_NAMESPACE" =~ ^gitlab-org\/security ]] || echo "true") - echo "SECURITY_SOURCES=${SECURITY_SOURCES:-false}" > $BUILD_ENV - echo "OMNIBUS_GITLAB_CACHE_UPDATE=${OMNIBUS_GITLAB_CACHE_UPDATE:-false}" >> $BUILD_ENV - for version_file in *_VERSION; do echo "$version_file=$(cat $version_file)" >> $BUILD_ENV; done - echo "OMNIBUS_GITLAB_RUBY3_BUILD=${OMNIBUS_GITLAB_RUBY3_BUILD:-false}" >> $BUILD_ENV - echo "OMNIBUS_GITLAB_CACHE_EDITION=${OMNIBUS_GITLAB_CACHE_EDITION:-GITLAB}" >> $BUILD_ENV - echo "GITLAB_ASSETS_TAG=$(assets_image_tag)" >> $BUILD_ENV - echo "Built environment file for omnibus build:" - cat $BUILD_ENV - artifacts: - reports: - dotenv: $BUILD_ENV trigger-omnibus: extends: .rules:omnibus-build @@ -132,7 +128,6 @@ trigger-omnibus: GITLAB_SHELL_VERSION: $GITLAB_SHELL_VERSION GITLAB_WORKHORSE_VERSION: $GITLAB_WORKHORSE_VERSION GITLAB_VERSION: $CI_COMMIT_SHA - GITLAB_ASSETS_TAG: $GITLAB_ASSETS_TAG IMAGE_TAG: $CI_COMMIT_SHA TOP_UPSTREAM_SOURCE_PROJECT: $CI_PROJECT_PATH SECURITY_SOURCES: $SECURITY_SOURCES diff --git a/.gitlab/ci/qa.gitlab-ci.yml b/.gitlab/ci/qa.gitlab-ci.yml index b365827b1c3..bd587cb4418 100644 --- a/.gitlab/ci/qa.gitlab-ci.yml +++ b/.gitlab/ci/qa.gitlab-ci.yml @@ -75,8 +75,6 @@ e2e:package-and-test: - build-qa-image - e2e-test-pipeline-generate variables: - # This is needed by `trigger-omnibus-env` (`.gitlab/ci/package-and-test/main.gitlab-ci.yml`). - PARENT_PIPELINE_ID: $CI_PIPELINE_ID SKIP_MESSAGE: Skipping package-and-test due to mr containing only quarantine changes! RELEASE: "${REGISTRY_HOST}/${REGISTRY_GROUP}/build/omnibus-gitlab-mirror/gitlab-ee:${CI_COMMIT_SHA}" GITLAB_QA_IMAGE: "${CI_REGISTRY_IMAGE}/gitlab-ee-qa:${CI_COMMIT_SHA}" diff --git a/.gitlab/ci/review-apps/main.gitlab-ci.yml b/.gitlab/ci/review-apps/main.gitlab-ci.yml index 01725d04c7b..1f801e0d803 100644 --- a/.gitlab/ci/review-apps/main.gitlab-ci.yml +++ b/.gitlab/ci/review-apps/main.gitlab-ci.yml @@ -34,10 +34,7 @@ review-build-cng-env: - .review:rules:review-build-cng image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:3.0-alpine3.13 stage: prepare - needs: - # We need this job because we need its `cached-assets-hash.txt` artifact, so that we can pass the assets image tag to the downstream CNG pipeline. - - pipeline: $PARENT_PIPELINE_ID - job: build-assets-image + needs: [] before_script: - source ./scripts/utils.sh - install_gitlab_gem diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml index 199f564464d..aefa96da159 100644 --- a/.gitlab/ci/review.gitlab-ci.yml +++ b/.gitlab/ci/review.gitlab-ci.yml @@ -33,8 +33,6 @@ start-review-app-pipeline: # They need to be explicitly passed on to the child pipeline. # https://docs.gitlab.com/ee/ci/pipelines/multi_project_pipelines.html#pass-cicd-variables-to-a-downstream-pipeline-by-using-the-variables-keyword variables: - # This is needed by `review-build-cng-env` (`.gitlab/ci/review-apps/main.gitlab-ci.yml`). - PARENT_PIPELINE_ID: $CI_PIPELINE_ID SCHEDULE_TYPE: $SCHEDULE_TYPE DAST_RUN: $DAST_RUN SKIP_MESSAGE: Skipping review-app due to mr containing only quarantine changes! diff --git a/Dockerfile.assets b/Dockerfile.assets index ba69a614e88..403d16cc4ab 100644 --- a/Dockerfile.assets +++ b/Dockerfile.assets @@ -1,4 +1,4 @@ # Simple container to store assets for later use FROM scratch -COPY public/assets /assets/ +ADD public/assets /assets/ CMD /bin/true diff --git a/Gemfile b/Gemfile index 9053b3b9e9d..68bb8c7d171 100644 --- a/Gemfile +++ b/Gemfile @@ -101,7 +101,7 @@ gem 'rubyzip', '~> 2.3.2', require: 'zip' gem 'acme-client', '~> 2.0' # Browser detection -gem 'browser', '~> 4.2' +gem 'browser', '~> 5.3.1' # OS detection for usage ping gem 'ohai', '~> 16.10' diff --git a/Gemfile.checksum b/Gemfile.checksum index ceb0e7807e2..8103a29a20d 100644 --- a/Gemfile.checksum +++ b/Gemfile.checksum @@ -59,7 +59,7 @@ {"name":"binding_ninja","version":"0.2.3","platform":"ruby","checksum":"4a85550a0066ee4721506b4e150857486808e50c9ddfeed04bdc896bb61eca9d"}, {"name":"bootsnap","version":"1.13.0","platform":"ruby","checksum":"c673282ec0f48506f093ca9acefe0f666d1ab9fda716e49fb95c9fe677653e78"}, {"name":"bootstrap_form","version":"4.2.0","platform":"ruby","checksum":"f578b3c900d2cf15fab641064d357318b29e285bd5fdf090f903727912889710"}, -{"name":"browser","version":"4.2.0","platform":"ruby","checksum":"fc194b422ea8b313f98443c6ec249ccf252e29007ce01bb99ebe828bd7fe3e60"}, +{"name":"browser","version":"5.3.1","platform":"ruby","checksum":"62745301701ff2c6c5d32d077bb12532b20be261929dcb52c6781ed0d5658b3c"}, {"name":"builder","version":"3.2.4","platform":"ruby","checksum":"99caf08af60c8d7f3a6b004029c4c3c0bdaebced6c949165fe98f1db27fbbc10"}, {"name":"bullet","version":"7.0.2","platform":"ruby","checksum":"4b7986b366f694bb05d5c1b4ea8ba949a99224d4511bf02f0c3944112f719c81"}, {"name":"bundler-audit","version":"0.7.0.1","platform":"ruby","checksum":"12d853cb0b92fa8868abbb539414d7a33da9e48b792e2ff28271d36c8ace8912"}, diff --git a/Gemfile.lock b/Gemfile.lock index 6589ab6e810..30063886ff8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -234,7 +234,7 @@ GEM bootstrap_form (4.2.0) actionpack (>= 5.0) activemodel (>= 5.0) - browser (4.2.0) + browser (5.3.1) builder (3.2.4) bullet (7.0.2) activesupport (>= 3.0.0) @@ -1567,7 +1567,7 @@ DEPENDENCIES better_errors (~> 2.9.1) bootsnap (~> 1.13.0) bootstrap_form (~> 4.2.0) - browser (~> 4.2) + browser (~> 5.3.1) bullet (~> 7.0.2) bundler-audit (~> 0.7.0.1) bundler-checksum (~> 0.1.0)! diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index bc640297834..ce6900d1779 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -377,13 +377,13 @@ module ApplicationHelper end def client_class_list - "gl-browser-#{browser.id} gl-platform-#{browser.platform.id}" + "gl-browser-#{browser_id} gl-platform-#{platform_id}" end def client_js_flags { - "is#{browser.id.to_s.titlecase}": true, - "is#{browser.platform.id.to_s.titlecase}": true + "is#{browser_id.titlecase}": true, + "is#{platform_id.titlecase}": true } end @@ -453,6 +453,14 @@ module ApplicationHelper private + def browser_id + browser.unknown? ? 'generic' : browser.id.to_s + end + + def platform_id + browser.platform.unknown? ? 'other' : browser.platform.id.to_s + end + def appearance ::Appearance.current end diff --git a/config/audit_events/types/policy_project_updated.yml b/config/audit_events/types/policy_project_updated.yml new file mode 100644 index 00000000000..8692486b5cb --- /dev/null +++ b/config/audit_events/types/policy_project_updated.yml @@ -0,0 +1,8 @@ +name: policy_project_updated +description: "This event is triggered whenever the security policy project is updated for a project." +introduced_by_issue: "https://gitlab.com/gitlab-org/gitlab/-/issues/377877" +introduced_by_mr: "https://gitlab.com/gitlab-org/gitlab/-/merge_requests/102154" +milestone: 15.6 +group: "govern::security policies" +saved_to_database: true +streamed: false diff --git a/doc/.vale/gitlab/AlertBoxStyle.yml b/doc/.vale/gitlab/AlertBoxStyle.yml index 299bd334eed..0a4514fa3c8 100644 --- a/doc/.vale/gitlab/AlertBoxStyle.yml +++ b/doc/.vale/gitlab/AlertBoxStyle.yml @@ -3,13 +3,13 @@ # # Makes sure alert boxes are used with block quotes. Checks for 3 formatting issues: # -# - Alert boxes inside a block quote (">") +# - Alert boxes inside a block quote ('>') # - Alert boxes with the note text on the same line -# - Alert boxes using words other than "NOTE" or "WARNING" +# - Alert boxes using words other than 'NOTE' or 'WARNING' # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Alert box "%s" must use the formatting in the style guide.' +message: "Update the format of the '%s' alert box. View the style guide for details." link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#alert-boxes level: error nonword: true diff --git a/doc/.vale/gitlab/BadPlurals.yml b/doc/.vale/gitlab/BadPlurals.yml index a1f53855de2..9cdb8661708 100644 --- a/doc/.vale/gitlab/BadPlurals.yml +++ b/doc/.vale/gitlab/BadPlurals.yml @@ -1,11 +1,11 @@ --- # Warning: gitlab.BadPlurals # -# Don't write plural words with the '(s)' construction. "HTTP(S)" is acceptable. +# Don't write plural words with the '(s)' construction. 'HTTP(S)' is acceptable. # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Rewrite "%s" to be plural, without parentheses.' +message: "Rewrite '%s' to be plural without parentheses." link: https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html#s level: warning ignorecase: true diff --git a/doc/.vale/gitlab/BadgeCapitalization.yml b/doc/.vale/gitlab/BadgeCapitalization.yml index b98ebf334e4..6e77c3fe822 100644 --- a/doc/.vale/gitlab/BadgeCapitalization.yml +++ b/doc/.vale/gitlab/BadgeCapitalization.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Badge "%s" must be capitalized.' +message: "Capitalize the '%s' badge." link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#product-tier-badges level: error scope: raw diff --git a/doc/.vale/gitlab/British.yml b/doc/.vale/gitlab/British.yml index 11652e41da7..432ed302e11 100644 --- a/doc/.vale/gitlab/British.yml +++ b/doc/.vale/gitlab/British.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: substitution -message: 'Use the US spelling "%s" instead of the British "%s".' +message: "Use the US spelling '%s' instead of the British '%s'." link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#language level: error ignorecase: true diff --git a/doc/.vale/gitlab/CIConfigFile.yml b/doc/.vale/gitlab/CIConfigFile.yml index 98fa1aa78e8..4d2ba454410 100644 --- a/doc/.vale/gitlab/CIConfigFile.yml +++ b/doc/.vale/gitlab/CIConfigFile.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'The CI/CD configuration file should be exactly: `.gitlab-ci.yml`' +message: "Change the file name to be exactly '.gitlab-ci.yml'." link: https://docs.gitlab.com/ee/development/documentation/versions.html level: error scope: raw diff --git a/doc/.vale/gitlab/CodeblockFences.yml b/doc/.vale/gitlab/CodeblockFences.yml index 6b7ad8d08b3..9d5efe7f60a 100644 --- a/doc/.vale/gitlab/CodeblockFences.yml +++ b/doc/.vale/gitlab/CodeblockFences.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Syntax highlighting hint "%s" must be one of: yaml, ruby, plaintext, markdown, javascript, shell, golang, python, dockerfile, or typescript.' +message: "Instead of '%s' for the code block, use yaml, ruby, plaintext, markdown, javascript, shell, golang, python, dockerfile, or typescript." link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#code-blocks level: error scope: raw diff --git a/doc/.vale/gitlab/CurlStringsQuoted.yml b/doc/.vale/gitlab/CurlStringsQuoted.yml index 8646ad45608..efe7aa23832 100644 --- a/doc/.vale/gitlab/CurlStringsQuoted.yml +++ b/doc/.vale/gitlab/CurlStringsQuoted.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'For consistency across all cURL examples, always wrap the URL in double quotes ("): %s' +message: "For the cURL example, use double quotes around the URL: %s" link: https://docs.gitlab.com/ee/development/documentation/restful_api_styleguide.html#curl-commands level: error scope: code diff --git a/doc/.vale/gitlab/CurrentStatus.yml b/doc/.vale/gitlab/CurrentStatus.yml index 213f470cb43..57b95dcf4ac 100644 --- a/doc/.vale/gitlab/CurrentStatus.yml +++ b/doc/.vale/gitlab/CurrentStatus.yml @@ -5,10 +5,10 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Avoid words like "%s" when you write about future features. Our documentation is about the current state of the product.' +message: "Remove '%s'. The documentation reflects the current state of the product." level: suggestion ignorecase: true -link: https://docs.gitlab.com/ee/development/documentation/styleguide/#promising-features-in-future-versions +link: https://docs.gitlab.com/ee/development/documentation/versions.html#promising-features-in-future-versions tokens: - currently - yet diff --git a/doc/.vale/gitlab/DefaultBranch.yml b/doc/.vale/gitlab/DefaultBranch.yml index 1ac7b84c440..86c627bcfe3 100644 --- a/doc/.vale/gitlab/DefaultBranch.yml +++ b/doc/.vale/gitlab/DefaultBranch.yml @@ -1,14 +1,14 @@ --- # Warning: gitlab.DefaultBranch # -# Do not refer to the default branch as the "master" branch, if possible. +# Do not refer to the default branch as the 'master' branch, if possible. # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Use "default branch" or `main` instead of `master`, when possible.' +message: "Use 'default branch' or `main` instead of `master`, when possible." level: warning ignorecase: true -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html +link: https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html#default-branch scope: raw raw: - '\`master\`' diff --git a/doc/.vale/gitlab/Dropdown.yml b/doc/.vale/gitlab/Dropdown.yml index 6163e765989..e756d45120d 100644 --- a/doc/.vale/gitlab/Dropdown.yml +++ b/doc/.vale/gitlab/Dropdown.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Use "dropdown list".' +message: "Use 'dropdown list'." link: https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html#dropdown-list level: suggestion ignorecase: true diff --git a/doc/.vale/gitlab/EOLWhitespace.yml b/doc/.vale/gitlab/EOLWhitespace.yml index 64f505b2bae..153786443cc 100644 --- a/doc/.vale/gitlab/EOLWhitespace.yml +++ b/doc/.vale/gitlab/EOLWhitespace.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Lines should not end with whitespace characters.' +message: "Remove whitespace characters from the end of the line." link: https://docs.gitlab.com/ee/development/documentation/versions.html level: warning scope: raw diff --git a/doc/.vale/gitlab/ElementDescriptors.yml b/doc/.vale/gitlab/ElementDescriptors.yml index 06121492e99..f3573f5ce65 100644 --- a/doc/.vale/gitlab/ElementDescriptors.yml +++ b/doc/.vale/gitlab/ElementDescriptors.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: substitution -message: 'When describing elements, %s "%s".' +message: "When describing elements, %s '%s'." link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#language level: suggestion ignorecase: true diff --git a/doc/.vale/gitlab/FirstPerson.yml b/doc/.vale/gitlab/FirstPerson.yml index ab7855a78db..e97b886b5ed 100644 --- a/doc/.vale/gitlab/FirstPerson.yml +++ b/doc/.vale/gitlab/FirstPerson.yml @@ -5,10 +5,10 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: '"%s" is a first-person pronoun. Use second- or third-person pronouns (like we, you, us, one) instead.' +message: "Instead of '%s', speak directly to the reader. Use 'you' or re-write to remove." level: warning ignorecase: true -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#usage-list +link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html tokens: - '\bI[ ,;:?!"]|\bI\x27.{1,2}' - me diff --git a/doc/.vale/gitlab/FutureTense.yml b/doc/.vale/gitlab/FutureTense.yml index 0809f5f9063..d1484b20008 100644 --- a/doc/.vale/gitlab/FutureTense.yml +++ b/doc/.vale/gitlab/FutureTense.yml @@ -5,10 +5,10 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Avoid using future tense: "%s". Use present tense instead.' +message: "Instead of future tense '%s', use present tense." ignorecase: true level: warning -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#usage-list +link: https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html#future-tense raw: - "(going to( |\n|[[:punct:]])[a-zA-Z]*|" - "will( |\n|[[:punct:]])[a-zA-Z]*|" diff --git a/doc/.vale/gitlab/HeadingContent.yml b/doc/.vale/gitlab/HeadingContent.yml index 50af625ce19..31ac3022934 100644 --- a/doc/.vale/gitlab/HeadingContent.yml +++ b/doc/.vale/gitlab/HeadingContent.yml @@ -5,10 +5,10 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Rename the subheading "%s", or re-purpose the content elsewhere.' +message: "Rename the heading '%s', or re-purpose the content elsewhere." level: warning scope: heading -link: https://docs.gitlab.com/ee/development/documentation/styleguide/#headings-1 +link: https://docs.gitlab.com/ee/development/documentation/topic_types/concept.html#concept-headings ignorecase: false tokens: - How it works diff --git a/doc/.vale/gitlab/HeadingDepth.yml b/doc/.vale/gitlab/HeadingDepth.yml index 466ab317226..7a3e5b4b552 100644 --- a/doc/.vale/gitlab/HeadingDepth.yml +++ b/doc/.vale/gitlab/HeadingDepth.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'The subheading "%s" is nested too deeply. Headings deeper than H5 suggest the section or page should be refactored.' +message: "Refactor the section or page to avoid headings greater than H5." link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#headings-in-markdown level: warning scope: raw diff --git a/doc/.vale/gitlab/InclusionAbleism.yml b/doc/.vale/gitlab/InclusionAbleism.yml index 66d89a26717..7419430c8a2 100644 --- a/doc/.vale/gitlab/InclusionAbleism.yml +++ b/doc/.vale/gitlab/InclusionAbleism.yml @@ -5,8 +5,8 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: substitution -message: 'Use inclusive language. Consider "%s" instead of "%s".' -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#inclusive-language +message: "Use inclusive language. Consider '%s' instead of '%s'." +link: https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html level: suggestion ignorecase: true swap: diff --git a/doc/.vale/gitlab/InclusionCultural.yml b/doc/.vale/gitlab/InclusionCultural.yml index 94662d4bc42..6de838e7f25 100644 --- a/doc/.vale/gitlab/InclusionCultural.yml +++ b/doc/.vale/gitlab/InclusionCultural.yml @@ -5,8 +5,8 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: substitution -message: 'Use inclusive language. Consider "%s" instead of "%s".' -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#inclusive-language +message: "Use inclusive language. Consider '%s' instead of '%s'." +link: https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html level: warning ignorecase: true swap: diff --git a/doc/.vale/gitlab/InclusionGender.yml b/doc/.vale/gitlab/InclusionGender.yml index 62302d21ae7..ce8861b6a09 100644 --- a/doc/.vale/gitlab/InclusionGender.yml +++ b/doc/.vale/gitlab/InclusionGender.yml @@ -5,8 +5,8 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: substitution -message: 'Use inclusive language. Consider "%s" instead of "%s".' -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#inclusive-language +message: "Use inclusive language. Consider '%s' instead of '%s'." +link: https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html level: suggestion ignorecase: true swap: diff --git a/doc/.vale/gitlab/InternalLinkCase.yml b/doc/.vale/gitlab/InternalLinkCase.yml index 45a0c88e47e..fded735812a 100644 --- a/doc/.vale/gitlab/InternalLinkCase.yml +++ b/doc/.vale/gitlab/InternalLinkCase.yml @@ -5,8 +5,8 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Links to subheadings in GitLab docs must be in lower-case: "%s"' -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#links-within-the-same-repository +message: "Use lowercase for the anchor link." +link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#anchor-links level: error scope: raw raw: diff --git a/doc/.vale/gitlab/InternalLinkExtension.yml b/doc/.vale/gitlab/InternalLinkExtension.yml index 5d5687966ee..364263f90c8 100644 --- a/doc/.vale/gitlab/InternalLinkExtension.yml +++ b/doc/.vale/gitlab/InternalLinkExtension.yml @@ -5,8 +5,8 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Link "%s" must link directly to a file and use the .md file extension.' -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#links-within-the-same-repository +message: "Link to a file and use the .md file extension instead of .html." +link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#links level: error scope: raw raw: diff --git a/doc/.vale/gitlab/InternalLinkFormat.yml b/doc/.vale/gitlab/InternalLinkFormat.yml index 08b48f9e3e5..be09a020846 100644 --- a/doc/.vale/gitlab/InternalLinkFormat.yml +++ b/doc/.vale/gitlab/InternalLinkFormat.yml @@ -1,12 +1,12 @@ --- # Error: gitlab.InternalLinkFormat # -# Checks that internal link paths don't start with "./", which is not needed. +# Checks that internal link paths don't start with './', which is not needed. # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Link "%s" must not start with "./".' -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#links-within-the-same-repository +message: "Edit the link so it does not start with './'." +link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#links level: error scope: raw raw: diff --git a/doc/.vale/gitlab/LatinTerms.yml b/doc/.vale/gitlab/LatinTerms.yml index 306ffb08355..0bac0448bb1 100644 --- a/doc/.vale/gitlab/LatinTerms.yml +++ b/doc/.vale/gitlab/LatinTerms.yml @@ -5,8 +5,8 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: substitution -message: 'Use "%s" instead of "%s", but consider rewriting the sentence.' -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#usage-list +message: "Use '%s' instead of '%s', but consider rewriting the sentence." +link: https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html level: warning nonword: true ignorecase: true diff --git a/doc/.vale/gitlab/Markdown_emoji.yml b/doc/.vale/gitlab/Markdown_emoji.yml index 2cb4f54859e..9873fb8becd 100644 --- a/doc/.vale/gitlab/Markdown_emoji.yml +++ b/doc/.vale/gitlab/Markdown_emoji.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'This appears to be GLFM emoji syntax. Replace "%s" with GitLab SVGs or Unicode emojis.' +message: "Replace '%s' with GitLab SVGs or Unicode emojis." link: https://docs.gitlab.com/ee/development/documentation/styleguide/#gitlab-svg-icons level: warning scope: text diff --git a/doc/.vale/gitlab/MeaningfulLinkWords.yml b/doc/.vale/gitlab/MeaningfulLinkWords.yml index c13ec2f0221..6fb41c7ce95 100644 --- a/doc/.vale/gitlab/MeaningfulLinkWords.yml +++ b/doc/.vale/gitlab/MeaningfulLinkWords.yml @@ -5,11 +5,11 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Improve SEO and accessibility by rewriting "%s" in the link text.' +message: "Improve SEO and accessibility by rewriting '%s' in the link text." level: warning scope: link ignorecase: true -link: https://about.gitlab.com/handbook/communication/#writing-style-guidelines +link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#text-for-links tokens: - here - this page diff --git a/doc/.vale/gitlab/MergeConflictMarkers.yml b/doc/.vale/gitlab/MergeConflictMarkers.yml index bbe01820a84..54e044f195d 100644 --- a/doc/.vale/gitlab/MergeConflictMarkers.yml +++ b/doc/.vale/gitlab/MergeConflictMarkers.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Merge conflict marker "%s" found.' +message: "Remove the merge conflict marker '%s'." link: https://docs.gitlab.com/ee/development/code_review.html#merging-a-merge-request level: error scope: raw diff --git a/doc/.vale/gitlab/MultiLineLinks.yml b/doc/.vale/gitlab/MultiLineLinks.yml index 3e73306e97d..32fe38277dc 100644 --- a/doc/.vale/gitlab/MultiLineLinks.yml +++ b/doc/.vale/gitlab/MultiLineLinks.yml @@ -5,8 +5,8 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Link "%s" must be on a single line, even if very long.' -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#basic-link-criteria +message: "Put the full link on one line, even if the link is very long." +link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#links level: error scope: raw raw: diff --git a/doc/.vale/gitlab/NonStandardQuotes.yml b/doc/.vale/gitlab/NonStandardQuotes.yml index c214488dfc0..6161a4cc000 100644 --- a/doc/.vale/gitlab/NonStandardQuotes.yml +++ b/doc/.vale/gitlab/NonStandardQuotes.yml @@ -5,10 +5,10 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Use standard single quotes or double quotes only. Do not use left or right quotes.' +message: "Use standard single quotes or double quotes only. Do not use left or right quotes." level: warning ignorecase: true -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html +link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#punctuation scope: raw raw: - '[‘’“”]' diff --git a/doc/.vale/gitlab/OutdatedVersions.yml b/doc/.vale/gitlab/OutdatedVersions.yml index b469304977e..10fbaa0a676 100644 --- a/doc/.vale/gitlab/OutdatedVersions.yml +++ b/doc/.vale/gitlab/OutdatedVersions.yml @@ -5,8 +5,8 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Can this reference to "%s" be refactored?' -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#gitlab-versions +message: "If possible, remove the reference to '%s'." +link: https://docs.gitlab.com/ee/development/documentation/versions.html level: suggestion nonword: true ignorecase: true diff --git a/doc/.vale/gitlab/OxfordComma.yml b/doc/.vale/gitlab/OxfordComma.yml index 814b0157699..81a9ae5c1fc 100644 --- a/doc/.vale/gitlab/OxfordComma.yml +++ b/doc/.vale/gitlab/OxfordComma.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Use a comma before the last "and" or "or" in a list of four or more items.' +message: "Use a comma before the last 'and' or 'or' in a list of four or more items." link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#punctuation level: warning raw: diff --git a/doc/.vale/gitlab/Possessive.yml b/doc/.vale/gitlab/Possessive.yml index 8f4f93ab93c..64c9481ac28 100644 --- a/doc/.vale/gitlab/Possessive.yml +++ b/doc/.vale/gitlab/Possessive.yml @@ -5,9 +5,9 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: "Rewrite '%s' to not use 's." +message: "Remove 's from %s." level: error ignorecase: true -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#trademark +link: https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html#gitlab tokens: - GitLab's diff --git a/doc/.vale/gitlab/ReadingLevel.yml b/doc/.vale/gitlab/ReadingLevel.yml index ca3ddea46bf..a1ddebec1ea 100644 --- a/doc/.vale/gitlab/ReadingLevel.yml +++ b/doc/.vale/gitlab/ReadingLevel.yml @@ -7,7 +7,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: metric -message: "The grade level - %s - refers to how hard the content is to understand. Aim for 8th grade or lower by using shorter sentences and words." +message: "The grade level is %s. Aim for 8th grade or lower by using shorter sentences and words." link: https://docs.gitlab.com/ee/development/documentation/testing.html#vale-readability-score level: suggestion formula: | diff --git a/doc/.vale/gitlab/ReferenceLinks.yml b/doc/.vale/gitlab/ReferenceLinks.yml index cc6f0c0a467..d9f20fa1bd6 100644 --- a/doc/.vale/gitlab/ReferenceLinks.yml +++ b/doc/.vale/gitlab/ReferenceLinks.yml @@ -5,8 +5,8 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Link "%s" must be inline.' -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#basic-link-criteria +message: "Put this link inline with the rest of the text." +link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#links level: error scope: raw raw: diff --git a/doc/.vale/gitlab/RelativeLinks.yml b/doc/.vale/gitlab/RelativeLinks.yml index 015e226ca39..6d46e432e08 100644 --- a/doc/.vale/gitlab/RelativeLinks.yml +++ b/doc/.vale/gitlab/RelativeLinks.yml @@ -5,8 +5,8 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Link "%s" must be a relative link with a .md extension.' -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#links-within-the-same-repository +message: "Use a relative link instead of a URL, and ensure the file name ends in .md and not .html." +link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#links level: error scope: raw raw: diff --git a/doc/.vale/gitlab/RelativeLinksDoubleSlashes.yml b/doc/.vale/gitlab/RelativeLinksDoubleSlashes.yml index 6f54ecbabc2..6a94c7f927a 100644 --- a/doc/.vale/gitlab/RelativeLinksDoubleSlashes.yml +++ b/doc/.vale/gitlab/RelativeLinksDoubleSlashes.yml @@ -5,8 +5,8 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Relative links must not include a double slash.' -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#links-within-the-same-repository +message: "Remove the double slash from this relative link." +link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#links level: error scope: raw raw: diff --git a/doc/.vale/gitlab/Repetition.yml b/doc/.vale/gitlab/Repetition.yml index 8f9d482b22b..cdeb29e7d45 100644 --- a/doc/.vale/gitlab/Repetition.yml +++ b/doc/.vale/gitlab/Repetition.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: repetition -message: '"%s" is repeated.' +message: "Remove this duplicate word: '%s'." level: error alpha: true tokens: diff --git a/doc/.vale/gitlab/SentenceLength.yml b/doc/.vale/gitlab/SentenceLength.yml index 394bcbf3c70..69b0d27072e 100644 --- a/doc/.vale/gitlab/SentenceLength.yml +++ b/doc/.vale/gitlab/SentenceLength.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: occurrence -message: 'Shorter sentences improve readability (max 25 words).' +message: "Improve readability by using fewer than 25 words in this sentence." scope: sentence link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#language level: warning diff --git a/doc/.vale/gitlab/SentenceSpacing.yml b/doc/.vale/gitlab/SentenceSpacing.yml index 8589f0ffa9b..9ca685b00b8 100644 --- a/doc/.vale/gitlab/SentenceSpacing.yml +++ b/doc/.vale/gitlab/SentenceSpacing.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: '"%s" must contain one and only one space.' +message: "Remove the extra space: '%s'" link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#punctuation level: error nonword: true diff --git a/doc/.vale/gitlab/Simplicity.yml b/doc/.vale/gitlab/Simplicity.yml index 86f38045bc0..89169c1aa46 100644 --- a/doc/.vale/gitlab/Simplicity.yml +++ b/doc/.vale/gitlab/Simplicity.yml @@ -5,10 +5,10 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Avoid words like "%s" that imply ease of use, because the user may find this action hard.' +message: "Remove '%s'. Be precise instead of subjective." level: suggestion ignorecase: true -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#usage-list +link: https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html tokens: - easy - easily diff --git a/doc/.vale/gitlab/Spelling.yml b/doc/.vale/gitlab/Spelling.yml index 5ea813d62b0..92c5cb13b29 100644 --- a/doc/.vale/gitlab/Spelling.yml +++ b/doc/.vale/gitlab/Spelling.yml @@ -10,7 +10,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: spelling -message: 'Spelling check: "%s"?' +message: "Check the spelling of '%s'. If the spelling is correct, add this word to the spelling exception list." level: warning ignore: - gitlab/spelling-exceptions.txt diff --git a/doc/.vale/gitlab/SubstitutionSuggestions.yml b/doc/.vale/gitlab/SubstitutionSuggestions.yml index 164ea5a32b6..21cabf1e0a7 100644 --- a/doc/.vale/gitlab/SubstitutionSuggestions.yml +++ b/doc/.vale/gitlab/SubstitutionSuggestions.yml @@ -6,24 +6,24 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: substitution -message: 'Consider %s instead of "%s".' +message: "Consider '%s' instead of '%s'." link: https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html level: suggestion ignorecase: true swap: - active user: '"billable user"' - active users: '"billable users"' - docs: '"documentation"' - e-mail: '"email"' - GLFM: '"GitLab Flavored Markdown"' - it is recommended: '"you should"' - we recommend: '"you should"' + active user: "billable user" + active users: "billable users" + docs: "documentation" + e-mail: "email" + GLFM: "GitLab Flavored Markdown" + it is recommended: "you should" + we recommend: "you should" navigate: go - OAuth2: '"OAuth 2.0"' - once that: '"after that"' - once the: '"after the"' - once you: '"after you"' - since: '"because" or "after"' - sub-group: '"subgroup"' - sub-groups: '"subgroups"' - within: '"in"' + OAuth2: "OAuth 2.0" + once that: "after that" + once the: "after the" + once you: "after you" + since: "because' or 'after" + sub-group: "subgroup" + sub-groups: "subgroups" + within: "in" diff --git a/doc/.vale/gitlab/SubstitutionWarning.yml b/doc/.vale/gitlab/SubstitutionWarning.yml index 65e4e7dacb2..34419d08fe8 100644 --- a/doc/.vale/gitlab/SubstitutionWarning.yml +++ b/doc/.vale/gitlab/SubstitutionWarning.yml @@ -6,7 +6,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: substitution -message: 'If possible, use "%s" instead of "%s".' +message: "If possible, use '%s' instead of '%s'." link: https://about.gitlab.com/handbook/communication/#top-misused-terms level: warning ignorecase: true diff --git a/doc/.vale/gitlab/Substitutions.yml b/doc/.vale/gitlab/Substitutions.yml index cc299665331..92791486491 100644 --- a/doc/.vale/gitlab/Substitutions.yml +++ b/doc/.vale/gitlab/Substitutions.yml @@ -6,7 +6,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: substitution -message: 'Use "%s" instead of "%s".' +message: "Use '%s' instead of '%s'." link: https://about.gitlab.com/handbook/communication/#top-misused-terms level: error ignorecase: true diff --git a/doc/.vale/gitlab/ToDo.yml b/doc/.vale/gitlab/ToDo.yml index 7781097c938..079f13baa28 100644 --- a/doc/.vale/gitlab/ToDo.yml +++ b/doc/.vale/gitlab/ToDo.yml @@ -5,8 +5,8 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: substitution -message: 'Use "to-do item" in most cases, or "Add a to do" if referring to the UI button.' -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#feature-names +message: "Use 'to-do item' in most cases, or 'Add a to do' if referring to the UI button." +link: https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html#to-do-item level: warning ignorecase: false swap: diff --git a/doc/.vale/gitlab/UnclearAntecedent.yml b/doc/.vale/gitlab/UnclearAntecedent.yml index 36de9fa532b..e5d43b6ab7d 100644 --- a/doc/.vale/gitlab/UnclearAntecedent.yml +++ b/doc/.vale/gitlab/UnclearAntecedent.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: "'%s' is not precise. Try rewriting with a specific subject and verb." +message: "Instead of '%s', try starting this sentence with a specific subject and verb." link: https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html#this-these-that-those level: warning ignorecase: false diff --git a/doc/.vale/gitlab/Uppercase.yml b/doc/.vale/gitlab/Uppercase.yml index d966d7d3001..179df5532ca 100644 --- a/doc/.vale/gitlab/Uppercase.yml +++ b/doc/.vale/gitlab/Uppercase.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: conditional -message: "'%s' is uppercase. Use lowercase or `backticks` if possible. Otherwise add this word to the rule's exception list." +message: "Instead of uppercase for '%s', use lowercase or backticks (`) if possible. Otherwise, add this word or acronym to the rule's exception list." link: https://docs.gitlab.com/ee/development/documentation/testing.html#vale-uppercase-acronym-test level: warning ignorecase: false diff --git a/doc/.vale/gitlab/VersionText.yml b/doc/.vale/gitlab/VersionText.yml index 6afce45e6d6..4fd80bc3f4e 100644 --- a/doc/.vale/gitlab/VersionText.yml +++ b/doc/.vale/gitlab/VersionText.yml @@ -11,7 +11,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'This introduced-in section is not formatted correctly. Each entry must start with `> -` and long entries must be on one line.' +message: "Start each entry with `> -`. Keep long entries on one line." link: https://docs.gitlab.com/ee/development/documentation/versions.html level: error scope: raw diff --git a/doc/.vale/gitlab/VersionTextSingleLine.yml b/doc/.vale/gitlab/VersionTextSingleLine.yml index e1f045efbd9..552ccb9951e 100644 --- a/doc/.vale/gitlab/VersionTextSingleLine.yml +++ b/doc/.vale/gitlab/VersionTextSingleLine.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: existence -message: 'Version text with only a single item must not start with a hyphen.' +message: "Do not use a hyphen '-' in version text if there is only a single item." link: https://docs.gitlab.com/ee/development/documentation/versions.html#add-a-version-history-item level: error scope: raw diff --git a/doc/.vale/gitlab/Wordy.yml b/doc/.vale/gitlab/Wordy.yml index 047df02adce..8fe8a12f161 100644 --- a/doc/.vale/gitlab/Wordy.yml +++ b/doc/.vale/gitlab/Wordy.yml @@ -5,7 +5,7 @@ # # For a list of all options, see https://vale.sh/docs/topics/styles/ extends: substitution -message: '%s "%s".' +message: "%s '%s'." link: https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html level: suggestion ignorecase: true diff --git a/doc/.vale/vale-json.tmpl b/doc/.vale/vale-json.tmpl index ed3c3259df3..f76ca03964c 100644 --- a/doc/.vale/vale-json.tmpl +++ b/doc/.vale/vale-json.tmpl @@ -21,13 +21,13 @@ {{- $error := "" -}} {{- if eq .Severity "error" -}} - {{- $error = .Severity -}} + {{- $error = "blocker" -}} {{- $e = add1 $e -}} {{- else if eq .Severity "warning" -}} - {{- $error = .Severity -}} + {{- $error = "major" -}} {{- $w = add1 $w -}} {{- else -}} - {{- $error = .Severity -}} + {{- $error ="info" -}} {{- $s = add1 $s -}} {{- end}} diff --git a/doc/administration/environment_variables.md b/doc/administration/environment_variables.md index beaef7afe57..d2edc3085f1 100644 --- a/doc/administration/environment_variables.md +++ b/doc/administration/environment_variables.md @@ -50,5 +50,5 @@ To set environment variables, follow [these instructions](https://docs.gitlab.co It's possible to preconfigure the GitLab Docker image by adding the environment variable `GITLAB_OMNIBUS_CONFIG` to the `docker run` command. -For more information, see the [Pre-configure Docker container](https://docs.gitlab.com/omnibus/docker/#pre-configure-docker-container) +For more information, see the [Pre-configure Docker container](../install/docker.md#pre-configure-docker-container) section of the Omnibus GitLab documentation. diff --git a/doc/administration/git_protocol.md b/doc/administration/git_protocol.md index f900c5a6867..7a7f8229f4b 100644 --- a/doc/administration/git_protocol.md +++ b/doc/administration/git_protocol.md @@ -25,7 +25,7 @@ From the server side, if we want to configure SSH we need to set the `sshd` server to accept the `GIT_PROTOCOL` environment. In installations using [GitLab Helm Charts](https://docs.gitlab.com/charts/) -and [All-in-one Docker image](https://docs.gitlab.com/omnibus/docker/), the SSH +and [All-in-one Docker image](../install/docker.md), the SSH service is already configured to accept the `GIT_PROTOCOL` environment. Users need not do anything more. diff --git a/doc/administration/object_storage.md b/doc/administration/object_storage.md index 6233aa217bd..f4741068584 100644 --- a/doc/administration/object_storage.md +++ b/doc/administration/object_storage.md @@ -18,7 +18,7 @@ GitLab has been tested by vendors and customers on a number of object storage pr - [Amazon S3](https://aws.amazon.com/s3/) - [Google Cloud Storage](https://cloud.google.com/storage) - [Digital Ocean Spaces](https://www.digitalocean.com/products/spaces) -- [Oracle Cloud Infrastructure](https://docs.cloud.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm) +- [Oracle Cloud Infrastructure](https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm) - [OpenStack Swift (S3 compatible mode)](https://docs.openstack.org/swift/latest/s3_compat.html) - [Azure Blob storage](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction) - On-premises hardware and appliances from various storage vendors, whose list is not officially established. diff --git a/doc/administration/reference_architectures/10k_users.md b/doc/administration/reference_architectures/10k_users.md index 45939b48f78..ce019976049 100644 --- a/doc/administration/reference_architectures/10k_users.md +++ b/doc/administration/reference_architectures/10k_users.md @@ -2155,7 +2155,7 @@ GitLab has been tested on a number of object storage providers: - [Amazon S3](https://aws.amazon.com/s3/) - [Google Cloud Storage](https://cloud.google.com/storage) - [Digital Ocean Spaces](https://www.digitalocean.com/products/spaces) -- [Oracle Cloud Infrastructure](https://docs.cloud.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm) +- [Oracle Cloud Infrastructure](https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm) - [OpenStack Swift (S3 compatibility mode)](https://docs.openstack.org/swift/latest/s3_compat.html) - MinIO. We have [a guide to deploying this](https://docs.gitlab.com/charts/advanced/external-object-storage/minio.html) within our Helm Chart documentation. diff --git a/doc/administration/reference_architectures/25k_users.md b/doc/administration/reference_architectures/25k_users.md index 7d67ac48b73..fba5e5ec6ae 100644 --- a/doc/administration/reference_architectures/25k_users.md +++ b/doc/administration/reference_architectures/25k_users.md @@ -2159,7 +2159,7 @@ GitLab has been tested on a number of object storage providers: - [Amazon S3](https://aws.amazon.com/s3/) - [Google Cloud Storage](https://cloud.google.com/storage) - [Digital Ocean Spaces](https://www.digitalocean.com/products/spaces) -- [Oracle Cloud Infrastructure](https://docs.cloud.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm) +- [Oracle Cloud Infrastructure](https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm) - [OpenStack Swift (S3 compatibility mode)](https://docs.openstack.org/swift/latest/s3_compat.html) - MinIO. We have [a guide to deploying this](https://docs.gitlab.com/charts/advanced/external-object-storage/minio.html) within our Helm Chart documentation. diff --git a/doc/administration/reference_architectures/2k_users.md b/doc/administration/reference_architectures/2k_users.md index 3f85fc5fd33..26a8d0e038a 100644 --- a/doc/administration/reference_architectures/2k_users.md +++ b/doc/administration/reference_architectures/2k_users.md @@ -878,7 +878,7 @@ GitLab has been tested on a number of object storage providers: - [Amazon S3](https://aws.amazon.com/s3/) - [Google Cloud Storage](https://cloud.google.com/storage) - [Digital Ocean Spaces](https://www.digitalocean.com/products/spaces) -- [Oracle Cloud Infrastructure](https://docs.cloud.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm) +- [Oracle Cloud Infrastructure](https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm) - [OpenStack Swift (S3 compatibility mode)](https://docs.openstack.org/swift/latest/s3_compat.html) - [Azure Blob storage](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction) - MinIO. We have [a guide to deploying this](https://docs.gitlab.com/charts/advanced/external-object-storage/minio.html) within our Helm Chart documentation. diff --git a/doc/administration/reference_architectures/3k_users.md b/doc/administration/reference_architectures/3k_users.md index 7484fafe1b0..1ce19877580 100644 --- a/doc/administration/reference_architectures/3k_users.md +++ b/doc/administration/reference_architectures/3k_users.md @@ -2112,7 +2112,7 @@ GitLab has been tested on a number of object storage providers: - [Amazon S3](https://aws.amazon.com/s3/) - [Google Cloud Storage](https://cloud.google.com/storage) - [Digital Ocean Spaces](https://www.digitalocean.com/products/spaces) -- [Oracle Cloud Infrastructure](https://docs.cloud.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm) +- [Oracle Cloud Infrastructure](https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm) - [OpenStack Swift (S3 compatibility mode)](https://docs.openstack.org/swift/latest/s3_compat.html) - MinIO. We have [a guide to deploying this](https://docs.gitlab.com/charts/advanced/external-object-storage/minio.html) within our Helm Chart documentation. diff --git a/doc/administration/reference_architectures/50k_users.md b/doc/administration/reference_architectures/50k_users.md index 88fc3649b3f..b87af8b27ac 100644 --- a/doc/administration/reference_architectures/50k_users.md +++ b/doc/administration/reference_architectures/50k_users.md @@ -2176,7 +2176,7 @@ GitLab has been tested on a number of object storage providers: - [Amazon S3](https://aws.amazon.com/s3/) - [Google Cloud Storage](https://cloud.google.com/storage) - [Digital Ocean Spaces](https://www.digitalocean.com/products/spaces) -- [Oracle Cloud Infrastructure](https://docs.cloud.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm) +- [Oracle Cloud Infrastructure](https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm) - [OpenStack Swift (S3 compatibility mode)](https://docs.openstack.org/swift/latest/s3_compat.html) - MinIO. We have [a guide to deploying this](https://docs.gitlab.com/charts/advanced/external-object-storage/minio.html) within our Helm Chart documentation. diff --git a/doc/administration/reference_architectures/5k_users.md b/doc/administration/reference_architectures/5k_users.md index c8cf35a2e59..510fa7c99b7 100644 --- a/doc/administration/reference_architectures/5k_users.md +++ b/doc/administration/reference_architectures/5k_users.md @@ -2111,7 +2111,7 @@ GitLab has been tested on a number of object storage providers: - [Amazon S3](https://aws.amazon.com/s3/) - [Google Cloud Storage](https://cloud.google.com/storage) - [Digital Ocean Spaces](https://www.digitalocean.com/products/spaces) -- [Oracle Cloud Infrastructure](https://docs.cloud.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm) +- [Oracle Cloud Infrastructure](https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm) - [OpenStack Swift (S3 compatibility mode)](https://docs.openstack.org/swift/latest/s3_compat.html) - MinIO. We have [a guide to deploying this](https://docs.gitlab.com/charts/advanced/external-object-storage/minio.html) within our Helm Chart documentation. diff --git a/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md b/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md index 193f58fa5d3..d87d2a1c55d 100644 --- a/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md +++ b/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md @@ -308,24 +308,3 @@ Moved to [Geo replication troubleshooting](../geo/replication/troubleshooting.md ## Generate Service Ping This content has been moved to [Service Ping Troubleshooting](../../development/service_ping/troubleshooting.md). - -## GraphQL - -Call a [GraphQL](../../api/graphql/getting_started.md) endpoint through the Rails console: - -```ruby -query = <<~EOQ -query securityGetProjects($search: String!) { - projects(search: $search) { - nodes { - path - } - } -} -EOQ - -variables = { "search": "gitlab" } - -result = GitlabSchema.execute(query, variables: variables, context: { current_user: current_user }) -result.to_h -``` diff --git a/doc/api/graphql/getting_started.md b/doc/api/graphql/getting_started.md index 20fb2f030f2..1945f528d67 100644 --- a/doc/api/graphql/getting_started.md +++ b/doc/api/graphql/getting_started.md @@ -18,6 +18,7 @@ The examples documented here can be run using: - The command line. - GraphiQL. +- Rails console. ### Command line @@ -73,6 +74,27 @@ NOTE: If you are running GitLab 12.0, enable the `graphql` [feature flag](../features.md#set-or-create-a-feature). +### Rails console **(FREE SELF)** + +GraphQL queries can be run in a [Rails console session](../../administration/operations/rails_console.md#starting-a-rails-console-session). For example, to search projects: + +```ruby +query = <<~EOQ +query securityGetProjects($search: String!) { + projects(search: $search) { + nodes { + path + } + } +} +EOQ + +variables = { "search": "gitlab" } + +result = GitlabSchema.execute(query, variables: variables, context: { current_user: current_user }) +result.to_h +``` + ## Queries and mutations The GitLab GraphQL API can be used to perform: diff --git a/doc/ci/docker/using_docker_build.md b/doc/ci/docker/using_docker_build.md index 06197d71690..43e537ee683 100644 --- a/doc/ci/docker/using_docker_build.md +++ b/doc/ci/docker/using_docker_build.md @@ -47,7 +47,7 @@ the Docker commands, but needs permission to do so. ``` 1. On the server where GitLab Runner is installed, install Docker Engine. - View a list of [supported platforms](https://docs.docker.com/engine/installation/). + View a list of [supported platforms](https://docs.docker.com/engine/install/). 1. Add the `gitlab-runner` user to the `docker` group: diff --git a/doc/ci/docker/using_docker_images.md b/doc/ci/docker/using_docker_images.md index 70680a44ed2..0ba510acdbc 100644 --- a/doc/ci/docker/using_docker_images.md +++ b/doc/ci/docker/using_docker_images.md @@ -64,7 +64,7 @@ For example, you can set the [Docker pull policy](https://docs.gitlab.com/runner to use local images. For more information about images and Docker Hub, see -the [Docker Fundamentals](https://docs.docker.com/engine/understanding-docker/) documentation. +the [Docker overview](https://docs.docker.com/get-started/overview/). ## Define `image` in the `.gitlab-ci.yml` file diff --git a/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md b/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md index 6c67d7ab212..28016216dbb 100644 --- a/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md +++ b/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md @@ -444,7 +444,7 @@ On your GitLab project repository navigate to the **Registry** tab. You may need to enable the Container Registry for your project to see this tab. You'll find it under your project's **Settings > General > Visibility, project features, permissions**. To start using Container Registry on our machine, we first need to sign in to the GitLab registry using our GitLab username and password. -Make sure you have [Docker](https://docs.docker.com/engine/installation/) installed on our machine, +Make sure you have [Docker](https://docs.docker.com/engine/install/) installed on our machine, then run the following commands: ```shell diff --git a/doc/development/documentation/site_architecture/deployment_process.md b/doc/development/documentation/site_architecture/deployment_process.md index 959c6a22777..18cc27adaaa 100644 --- a/doc/development/documentation/site_architecture/deployment_process.md +++ b/doc/development/documentation/site_architecture/deployment_process.md @@ -182,7 +182,7 @@ Dockerfiles to build and deploy . It is heavily inspire Although build images are built automatically via GitLab CI/CD, you can build and tag all tooling images locally: -1. Make sure you have [Docker installed](https://docs.docker.com/install/). +1. Make sure you have [Docker installed](https://docs.docker.com/get-docker/). 1. Make sure you're in the `dockerfiles/` directory of the `gitlab-docs` repository. 1. Build the images: diff --git a/doc/development/go_guide/index.md b/doc/development/go_guide/index.md index 197c7616d82..b561ebc4285 100644 --- a/doc/development/go_guide/index.md +++ b/doc/development/go_guide/index.md @@ -408,7 +408,7 @@ should be used in functions that can block and passed as the first parameter. Every project should have a `Dockerfile` at the root of their repository, to build and run the project. Since Go program are static binaries, they should not require any external dependency, and shells in the final image are useless. -We encourage [Multistage builds](https://docs.docker.com/develop/develop-images/multistage-build/): +We encourage [Multistage builds](https://docs.docker.com/build/building/multi-stage/): - They let the user build the project with the right Go version and dependencies. diff --git a/doc/development/integrations/secure.md b/doc/development/integrations/secure.md index f40caf29cfa..faba5e3540e 100644 --- a/doc/development/integrations/secure.md +++ b/doc/development/integrations/secure.md @@ -157,7 +157,7 @@ If the scanner requires a fully functional Linux environment, it is recommended to use a [Debian](https://www.debian.org/intro/about) "slim" distribution or [Alpine Linux](https://www.alpinelinux.org/). If possible, it is recommended to build the image from scratch, using the `FROM scratch` instruction, and to compile the scanner with all the libraries it needs. -[Multi-stage builds](https://docs.docker.com/develop/develop-images/multistage-build/) +[Multi-stage builds](https://docs.docker.com/build/building/multi-stage/) might also help with keeping the image small. To keep an image size small, consider using [dive](https://github.com/wagoodman/dive#dive) to analyze layers in a Docker image to diff --git a/doc/development/service_ping/implement.md b/doc/development/service_ping/implement.md index 8ab7786f012..48992256ae4 100644 --- a/doc/development/service_ping/implement.md +++ b/doc/development/service_ping/implement.md @@ -813,7 +813,7 @@ and run a local container instance: 1. On your local machine, make sure you are signed in to the GitLab Docker registry. You can find the instructions for this in [Authenticate to the GitLab Container Registry](../../user/packages/container_registry/index.md#authenticate-with-the-container-registry). 1. Once signed in, download the new image by using `docker pull registry.gitlab.com/gitlab-org/build/omnibus-gitlab-mirror/gitlab-ee:` -1. For more information about working with and running Omnibus GitLab containers in Docker, refer to [GitLab Docker images](https://docs.gitlab.com/omnibus/docker/README.html) in the Omnibus documentation. +1. For more information about working with and running Omnibus GitLab containers in Docker, refer to [GitLab Docker images](../../install/docker.md) documentation. ### Test with GitLab development toolkits diff --git a/doc/install/docker.md b/doc/install/docker.md index 93988454a27..22a6a2d8086 100644 --- a/doc/install/docker.md +++ b/doc/install/docker.md @@ -31,7 +31,7 @@ to community resources (such as IRC or forums) to seek help from other users. ## Prerequisites -Docker is required. See the [official installation documentation](https://docs.docker.com/install/). +Docker is required. See the [official installation documentation](https://docs.docker.com/get-docker/). ## Set up the volumes location diff --git a/doc/raketasks/backup_gitlab.md b/doc/raketasks/backup_gitlab.md index da004a1b774..47696fc1f99 100644 --- a/doc/raketasks/backup_gitlab.md +++ b/doc/raketasks/backup_gitlab.md @@ -139,7 +139,7 @@ For installation from source: - `/home/git/gitlab/config/secrets.yml` - `/home/git/gitlab/config/gitlab.yml` -For [Docker installations](https://docs.gitlab.com/omnibus/docker/), you must +For [Docker installations](../install/docker.md), you must back up the volume where the configuration files are stored. If you created the GitLab container according to the documentation, it should be in the `/srv/gitlab/config` directory. diff --git a/doc/user/packages/container_registry/index.md b/doc/user/packages/container_registry/index.md index 970f2e9b3cc..779af944674 100644 --- a/doc/user/packages/container_registry/index.md +++ b/doc/user/packages/container_registry/index.md @@ -70,7 +70,7 @@ To download and run a container image hosted in the GitLab Container Registry: [Authentication](#authenticate-with-the-container-registry) is needed to download images from private repository. For more information on running Docker containers, visit the -[Docker documentation](https://docs.docker.com/engine/userguide/intro/). +[Docker documentation](https://docs.docker.com/get-started/). ## Image naming convention diff --git a/doc/user/packages/container_registry/reduce_container_registry_data_transfer.md b/doc/user/packages/container_registry/reduce_container_registry_data_transfer.md index 459c759abe6..74cbcba2ffc 100644 --- a/doc/user/packages/container_registry/reduce_container_registry_data_transfer.md +++ b/doc/user/packages/container_registry/reduce_container_registry_data_transfer.md @@ -90,7 +90,7 @@ build process instead of trying to minify images afterward. ### Use multi-stage builds -With [multi-stage builds](https://docs.docker.com/develop/develop-images/multistage-build/), +With [multi-stage builds](https://docs.docker.com/build/building/multi-stage/), you use multiple `FROM` statements in your Dockerfile. Each `FROM` instruction can use a different base, and each begins a new build stage. You can selectively copy artifacts from one stage to another, leaving behind everything you don't want in the final image. This is especially useful when diff --git a/lib/gitlab/usage/metrics/instrumentations/distinct_count_projects_with_expiration_policy_metric.rb b/lib/gitlab/usage/metrics/instrumentations/distinct_count_projects_with_expiration_policy_metric.rb index 8811dec49d8..c7cf6c57059 100644 --- a/lib/gitlab/usage/metrics/instrumentations/distinct_count_projects_with_expiration_policy_metric.rb +++ b/lib/gitlab/usage/metrics/instrumentations/distinct_count_projects_with_expiration_policy_metric.rb @@ -12,7 +12,11 @@ module Gitlab cache_start_and_finish_as :project_id - relation ->(options) { ::ContainerExpirationPolicy.where(enabled: options[:enabled]) } + relation ->(options) do + options.each_with_object(::ContainerExpirationPolicy.all) do |(key, value), ar_relation| + ar_relation.where!(key => value) + end + end end end end diff --git a/qa/qa/specs/features/api/1_manage/import/import_github_repo_spec.rb b/qa/qa/specs/features/api/1_manage/import/import_github_repo_spec.rb index 1abd75a7439..c59a4f468df 100644 --- a/qa/qa/specs/features/api/1_manage/import/import_github_repo_spec.rb +++ b/qa/qa/specs/features/api/1_manage/import/import_github_repo_spec.rb @@ -1,227 +1,194 @@ # frozen_string_literal: true module QA - # Spec uses real github.com, which means outage of github.com can actually block deployment - # Keep spec in reliable bucket but don't run in blocking pipelines - # # https://github.com/gitlab-qa-github/import-test <- project under test - RSpec.describe 'Manage', :github, :reliable, :skip_live_env, :requires_admin, product_group: :import do - describe 'Project import', issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/353583' do - let!(:api_client) { Runtime::API::Client.as_admin } - let!(:group) { Resource::Group.fabricate_via_api! { |resource| resource.api_client = api_client } } - let!(:user) do - Resource::User.fabricate_via_api! do |resource| - resource.api_client = api_client - resource.hard_delete_on_api_removal = true + # + RSpec.describe 'Manage', product_group: :import do + describe 'GitHub import', :reliable do + include_context 'with github import' + + context 'when imported via api' do + it 'imports project', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347670' do + imported_project.reload! # import the project + + expect { imported_project.project_import_status[:import_status] }.to eventually_eq('finished') + .within(max_duration: 240, sleep_interval: 1) + + aggregate_failures do + verify_status_data + verify_repository_import + verify_protected_branches_import + verify_commits_import + verify_labels_import + verify_issues_import + verify_milestones_import + verify_wikis_import + verify_merge_requests_import + verify_release_import + end end - end - let!(:user_api_client) { Runtime::API::Client.new(user: user) } - - let(:imported_project) do - Resource::ProjectImportedFromGithub.fabricate_via_api! do |project| - project.name = 'imported-project' - project.group = group - project.github_personal_access_token = Runtime::Env.github_access_token - project.github_repository_path = 'gitlab-qa-github/import-test' - project.api_client = user_api_client - project.issue_events_import = true - project.full_notes_import = true + def verify_status_data + stats = imported_project.project_import_status.dig(:stats, :imported) + expect(stats).to include( + issue: 1, + label: 9, + milestone: 1, + note: 3, + pull_request: 1, + pull_request_review: 1, + diff_note: 1, + release: 1 + ) end - end - before do - group.add_member(user, Resource::Members::AccessLevel::MAINTAINER) - end - - after do - user.remove_via_api! - end - - it 'imports Github repo via api', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347670' do - imported_project.reload! # import the project - - expect { imported_project.project_import_status[:import_status] }.to eventually_eq('finished') - .within(max_duration: 240, sleep_interval: 1) - - aggregate_failures do - verify_status_data - verify_repository_import - verify_protected_branches_import - verify_commits_import - verify_labels_import - verify_issues_import - verify_milestones_import - verify_wikis_import - verify_merge_requests_import - verify_release_import + def verify_repository_import + expect(imported_project.reload!.description).to eq('Project for github import test') + expect(imported_project.api_response[:import_error]).to be_nil end - end - def verify_status_data - stats = imported_project.project_import_status.dig(:stats, :imported) - expect(stats).to include( - issue: 1, - label: 9, - milestone: 1, - note: 3, - pull_request: 1, - pull_request_review: 1, - diff_note: 1, - release: 1 - ) - end - - def verify_repository_import - expect(imported_project.reload!.description).to eq('Project for github import test') - expect(imported_project.api_response[:import_error]).to be_nil - end - - def verify_protected_branches_import - branches = imported_project.protected_branches.map do |branch| - branch.slice(:name, :allow_force_push, :code_owner_approval_required) + def verify_protected_branches_import + branches = imported_project.protected_branches.map do |branch| + branch.slice(:name, :allow_force_push, :code_owner_approval_required) + end + expect(branches.first).to include( + { + name: 'main' + # TODO: Add validation once https://gitlab.com/groups/gitlab-org/-/epics/8585 is closed + # At the moment both options are always set to false regardless of state in github + # allow_force_push: true, + # code_owner_approval_required: true + } + ) end - expect(branches.first).to include( - { - name: 'main' - # TODO: Add validation once https://gitlab.com/groups/gitlab-org/-/epics/8585 is closed - # At the moment both options are always set to false regardless of state in github - # allow_force_push: true, - # code_owner_approval_required: true - } - ) - # GitHub branch protection rule "Require signed commits" is mapped to the - # "Reject unsigned commits" push rule - expect(imported_project.push_rules[:reject_unsigned_commits]).to be_truthy - end + def verify_commits_import + expect(imported_project.commits.length).to eq(2) + end - def verify_commits_import - expect(imported_project.commits.length).to eq(2) - end + def verify_labels_import + labels = imported_project.labels.map { |label| label.slice(:name, :color) } - def verify_labels_import - labels = imported_project.labels.map { |label| label.slice(:name, :color) } + expect(labels).to include( + { name: 'bug', color: '#d73a4a' }, + { name: 'documentation', color: '#0075ca' }, + { name: 'duplicate', color: '#cfd3d7' }, + { name: 'enhancement', color: '#a2eeef' }, + { name: 'good first issue', color: '#7057ff' }, + { name: 'help wanted', color: '#008672' }, + { name: 'invalid', color: '#e4e669' }, + { name: 'question', color: '#d876e3' }, + { name: 'wontfix', color: '#ffffff' } + ) + end - expect(labels).to include( - { name: 'bug', color: '#d73a4a' }, - { name: 'documentation', color: '#0075ca' }, - { name: 'duplicate', color: '#cfd3d7' }, - { name: 'enhancement', color: '#a2eeef' }, - { name: 'good first issue', color: '#7057ff' }, - { name: 'help wanted', color: '#008672' }, - { name: 'invalid', color: '#e4e669' }, - { name: 'question', color: '#d876e3' }, - { name: 'wontfix', color: '#ffffff' } - ) - end + def verify_milestones_import + milestones = imported_project.milestones - def verify_milestones_import - milestones = imported_project.milestones + expect(milestones.length).to eq(1) + expect(milestones.first).to include(title: '0.0.1', description: nil, state: 'active') + end - expect(milestones.length).to eq(1) - expect(milestones.first).to include(title: '0.0.1', description: nil, state: 'active') - end + def verify_wikis_import + wikis = imported_project.wikis - def verify_wikis_import - wikis = imported_project.wikis + expect(wikis.length).to eq(1) + expect(wikis.first).to include(title: 'Home', format: 'markdown') + end - expect(wikis.length).to eq(1) - expect(wikis.first).to include(title: 'Home', format: 'markdown') - end + def verify_issues_import + issues = imported_project.issues + issue = Resource::Issue.init do |resource| + resource.project = imported_project + resource.iid = issues.first[:iid] + resource.api_client = user_api_client + end.reload! + comments, events = fetch_events_and_comments(issue) - def verify_issues_import - issues = imported_project.issues - issue = Resource::Issue.init do |resource| - resource.project = imported_project - resource.iid = issues.first[:iid] - resource.api_client = user_api_client - end.reload! - comments, events = fetch_events_and_comments(issue) + expect(issues.length).to eq(1) + expect(issue.api_resource).to include( + title: 'Test issue', + description: "*Created by: gitlab-qa-github*\n\nTest issue description", + labels: ['good first issue', 'help wanted', 'question'] + ) + expect(comments).to match_array( + [ + "*Created by: gitlab-qa-github*\n\nSome test comment", + "*Created by: gitlab-qa-github*\n\nAnother test comment" + ] + ) + expect(events).to match_array( + [ + { name: "add_label", label: "question" }, + { name: "add_label", label: "good first issue" }, + { name: "add_label", label: "help wanted" }, + { name: "add_milestone", label: "0.0.1" }, + { name: "closed" }, + { name: "reopened" } + ] + ) + end - expect(issues.length).to eq(1) - expect(issue.api_resource).to include( - title: 'Test issue', - description: "*Created by: gitlab-qa-github*\n\nTest issue description", - labels: ['good first issue', 'help wanted', 'question'] - ) - expect(comments).to match_array( - [ - "*Created by: gitlab-qa-github*\n\nSome test comment", - "*Created by: gitlab-qa-github*\n\nAnother test comment" + def verify_merge_requests_import + merge_requests = imported_project.merge_requests + merge_request = Resource::MergeRequest.init do |mr| + mr.project = imported_project + mr.iid = merge_requests.first[:iid] + mr.api_client = user_api_client + end.reload! + comments, events = fetch_events_and_comments(merge_request) + + expect(merge_requests.length).to eq(1) + expect(merge_request.api_resource).to include( + title: 'Test pull request', + state: 'opened', + target_branch: 'main', + source_branch: 'gitlab-qa-github-patch-1', + labels: %w[documentation], + description: "*Created by: gitlab-qa-github*\n\nTest pull request body" + ) + expect(comments).to match_array( + [ + "*Created by: gitlab-qa-github*\n\n**Review:** Commented\n\nGood but needs some improvement", + "*Created by: gitlab-qa-github*\n\n```suggestion:-0+0\nProject for GitHub import test to GitLab\r\n```", + "*Created by: gitlab-qa-github*\n\nSome test PR comment" + ] + ) + expect(events).to match_array( + [ + { name: "add_label", label: "documentation" }, + { name: "add_milestone", label: "0.0.1" } + ] + ) + end + + def verify_release_import + releases = imported_project.releases + + expect(releases.length).to eq(1) + expect(releases.first).to include( + tag_name: "0.0.1", + name: "0.0.1", + description: "Initial release", + created_at: "2022-03-07T07:59:22.000Z", + released_at: "2022-03-07T08:02:09.000Z" + ) + end + + # Fetch events and comments from issue or mr + # + # @param [QA::Resource::Issuable] issuable + # @return [Array] + def fetch_events_and_comments(issuable) + comments = issuable.comments.map { |comment| comment[:body] } + events = [ + *issuable.label_events.map { |e| { name: "#{e[:action]}_label", label: e.dig(:label, :name) } }, + *issuable.state_events.map { |e| { name: e[:state] } }, + *issuable.milestone_events.map { |e| { name: "#{e[:action]}_milestone", label: e.dig(:milestone, :title) } } ] - ) - expect(events).to match_array( - [ - { name: "add_label", label: "question" }, - { name: "add_label", label: "good first issue" }, - { name: "add_label", label: "help wanted" }, - { name: "add_milestone", label: "0.0.1" }, - { name: "closed" }, - { name: "reopened" } - ] - ) - end - def verify_merge_requests_import - merge_requests = imported_project.merge_requests - merge_request = Resource::MergeRequest.init do |mr| - mr.project = imported_project - mr.iid = merge_requests.first[:iid] - mr.api_client = user_api_client - end.reload! - comments, events = fetch_events_and_comments(merge_request) - - expect(merge_requests.length).to eq(1) - expect(merge_request.api_resource).to include( - title: 'Test pull request', - state: 'opened', - target_branch: 'main', - source_branch: 'gitlab-qa-github-patch-1', - labels: %w[documentation], - description: "*Created by: gitlab-qa-github*\n\nTest pull request body" - ) - expect(comments).to match_array( - [ - "*Created by: gitlab-qa-github*\n\n**Review:** Commented\n\nGood but needs some improvement", - "*Created by: gitlab-qa-github*\n\n```suggestion:-0+0\nProject for GitHub import test to GitLab\r\n```", - "*Created by: gitlab-qa-github*\n\nSome test PR comment" - ] - ) - expect(events).to match_array( - [ - { name: "add_label", label: "documentation" }, - { name: "add_milestone", label: "0.0.1" } - ] - ) - end - - def verify_release_import - releases = imported_project.releases - - expect(releases.length).to eq(1) - expect(releases.first).to include( - tag_name: "0.0.1", - name: "0.0.1", - description: "Initial release", - created_at: "2022-03-07T07:59:22.000Z", - released_at: "2022-03-07T08:02:09.000Z" - ) - end - - # Fetch events and comments from issue or mr - # - # @param [QA::Resource::Issuable] issuable - # @return [Array] - def fetch_events_and_comments(issuable) - comments = issuable.comments.map { |comment| comment[:body] } - events = [ - *issuable.label_events.map { |e| { name: "#{e[:action]}_label", label: e.dig(:label, :name) } }, - *issuable.state_events.map { |e| { name: e[:state] } }, - *issuable.milestone_events.map { |e| { name: "#{e[:action]}_milestone", label: e.dig(:milestone, :title) } } - ] - - [comments, events] + [comments, events] + end end end end diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb index 4f0f54c1a15..15563e3aa2a 100644 --- a/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb +++ b/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb @@ -4,88 +4,90 @@ module QA # Spec uses real github.com, which means outage of github can actually block deployment # Keep spec in reliable bucket but don't run in blocking pipelines RSpec.describe 'Manage', :github, :reliable, :skip_live_env, :requires_admin, product_group: :import do - describe 'Project import' do - let(:github_repo) { 'gitlab-qa-github/import-test' } - let(:api_client) { Runtime::API::Client.as_admin } - let(:group) { Resource::Group.fabricate_via_api! { |resource| resource.api_client = api_client } } - let(:user) do - Resource::User.fabricate_via_api! do |resource| - resource.api_client = api_client - resource.hard_delete_on_api_removal = true - end - end - - let(:imported_project) do - Resource::ProjectImportedFromGithub.init do |project| - project.import = true - project.group = group - project.github_personal_access_token = Runtime::Env.github_access_token - project.github_repository_path = github_repo - project.api_client = api_client - end - end - - let(:imported_issue) do - Resource::Issue.init do |resource| - resource.project = imported_project - resource.iid = imported_project.issues.first[:iid] - resource.api_client = api_client - end.reload! - end - - let(:imported_issue_events) do - imported_issue.label_events.map { |e| { name: "#{e[:action]}_label", label: e.dig(:label, :name) } } - end - - before do - group.add_member(user, Resource::Members::AccessLevel::MAINTAINER) - - Flow::Login.sign_in(as: user) - Page::Main::Menu.perform(&:go_to_create_project) - Page::Project::New.perform do |project_page| - project_page.click_import_project - project_page.click_github_link - end - end - - after do - user.remove_via_api! - end - - it 'imports a GitHub repo', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347877' do - Page::Project::Import::Github.perform do |import_page| - import_page.add_personal_access_token(Runtime::Env.github_access_token) - - import_page.select_advanced_option(:single_endpoint_issue_events_import) - import_page.select_advanced_option(:single_endpoint_notes_import) - import_page.select_advanced_option(:attachments_import) - - import_page.import!(github_repo, group.full_path, imported_project.name) - - aggregate_failures do - expect(import_page).to have_imported_project(github_repo, wait: 240) - # validate button is present instead of navigating to avoid dealing with multiple tabs - # which makes the test more complicated - expect(import_page).to have_go_to_project_button(github_repo) + describe 'GitHub import' do + context 'when imported via UI' do + let(:github_repo) { 'gitlab-qa-github/import-test' } + let(:api_client) { Runtime::API::Client.as_admin } + let(:group) { Resource::Group.fabricate_via_api! { |resource| resource.api_client = api_client } } + let(:user) do + Resource::User.fabricate_via_api! do |resource| + resource.api_client = api_client + resource.hard_delete_on_api_removal = true end end - imported_project.reload!.visit! - Page::Project::Show.perform do |project| - aggregate_failures do - expect(project).to have_content(imported_project.name) - expect(project).to have_content('Project for github import test') + let(:imported_project) do + Resource::ProjectImportedFromGithub.init do |project| + project.import = true + project.group = group + project.github_personal_access_token = Runtime::Env.github_access_token + project.github_repository_path = github_repo + project.api_client = api_client end end - # Validate :single_endpoint_issue_events_import option was triggered correctly and imported the events - expect(imported_issue_events).to match_array( - [ - { name: "add_label", label: "question" }, - { name: "add_label", label: "good first issue" }, - { name: "add_label", label: "help wanted" } - ] - ) + let(:imported_issue) do + Resource::Issue.init do |resource| + resource.project = imported_project + resource.iid = imported_project.issues.first[:iid] + resource.api_client = api_client + end.reload! + end + + let(:imported_issue_events) do + imported_issue.label_events.map { |e| { name: "#{e[:action]}_label", label: e.dig(:label, :name) } } + end + + before do + group.add_member(user, Resource::Members::AccessLevel::MAINTAINER) + + Flow::Login.sign_in(as: user) + Page::Main::Menu.perform(&:go_to_create_project) + Page::Project::New.perform do |project_page| + project_page.click_import_project + project_page.click_github_link + end + end + + after do + user.remove_via_api! + end + + it 'imports a project', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347877' do + Page::Project::Import::Github.perform do |import_page| + import_page.add_personal_access_token(Runtime::Env.github_access_token) + + import_page.select_advanced_option(:single_endpoint_issue_events_import) + import_page.select_advanced_option(:single_endpoint_notes_import) + import_page.select_advanced_option(:attachments_import) + + import_page.import!(github_repo, group.full_path, imported_project.name) + + aggregate_failures do + expect(import_page).to have_imported_project(github_repo, wait: 240) + # validate button is present instead of navigating to avoid dealing with multiple tabs + # which makes the test more complicated + expect(import_page).to have_go_to_project_button(github_repo) + end + end + + imported_project.reload!.visit! + Page::Project::Show.perform do |project| + aggregate_failures do + expect(project).to have_content(imported_project.name) + expect(project).to have_content('Project for github import test') + end + end + + # Validate :single_endpoint_issue_events_import option was triggered correctly and imported the events + expect(imported_issue_events).to match_array( + [ + { name: "add_label", label: "question" }, + { name: "add_label", label: "good first issue" }, + { name: "add_label", label: "help wanted" } + ] + ) + end end end end diff --git a/qa/qa/specs/features/shared_contexts/github_import_shared_context.rb b/qa/qa/specs/features/shared_contexts/github_import_shared_context.rb new file mode 100644 index 00000000000..c32f5d8bf4b --- /dev/null +++ b/qa/qa/specs/features/shared_contexts/github_import_shared_context.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +module QA + RSpec.shared_context "with github import", :github, :skip_live_env, :requires_admin do + let!(:api_client) { Runtime::API::Client.as_admin } + + let!(:group) do + Resource::Group.fabricate_via_api! do |resource| + resource.api_client = api_client + resource.path = "destination-group-for-import-#{SecureRandom.hex(4)}" + end + end + + let!(:user) do + Resource::User.fabricate_via_api! do |resource| + resource.api_client = api_client + resource.hard_delete_on_api_removal = true + end + end + + let!(:user_api_client) { Runtime::API::Client.new(user: user) } + + let(:imported_project) do + Resource::ProjectImportedFromGithub.fabricate_via_api! do |project| + project.name = 'imported-project' + project.group = group + project.github_personal_access_token = Runtime::Env.github_access_token + project.github_repository_path = 'gitlab-qa-github/import-test' + project.api_client = user_api_client + project.issue_events_import = true + project.full_notes_import = true + end + end + + before do + group.add_member(user, Resource::Members::AccessLevel::MAINTAINER) + end + + after do + user.remove_via_api! + end + end +end diff --git a/scripts/build_assets_image b/scripts/build_assets_image index f480cae9a7b..8aa6526061a 100755 --- a/scripts/build_assets_image +++ b/scripts/build_assets_image @@ -1,70 +1,36 @@ -#!/bin/sh - -. scripts/utils.sh - # Exit early if we don't want to build the image -if [ "${BUILD_ASSETS_IMAGE}" != "true" ] +if [[ "${BUILD_ASSETS_IMAGE}" != "true" ]] then exit 0 fi -get_repository_id() { - repository_name="${1}" - repositories_url="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/registry/repositories" - - curl --header "PRIVATE-TOKEN: ${PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE}" "${repositories_url}" | jq "map(select(.name == \"${repository_name}\")) | .[0].id" -} - # Generate the image name based on the project this is being run in ASSETS_IMAGE_NAME="gitlab-assets-ce" - # `dev.gitlab-org` still has gitlab-ee. -if [ "${CI_PROJECT_NAME}" = "gitlab" ] || [ "${CI_PROJECT_NAME}" = "gitlab-ee" ] +if [[ "${CI_PROJECT_NAME}" == "gitlab" ]] || [[ "${CI_PROJECT_NAME}" == "gitlab-ee" ]] then ASSETS_IMAGE_NAME="gitlab-assets-ee" fi -ASSETS_IMAGE_PATH="${CI_REGISTRY}/${CI_PROJECT_PATH}/${ASSETS_IMAGE_NAME}" -COMMIT_ASSETS_HASH_TAG="$(assets_image_tag)" -COMMIT_ASSETS_HASH_DESTINATION="${ASSETS_IMAGE_PATH}:${COMMIT_ASSETS_HASH_TAG}" - -DESTINATIONS="--destination=${COMMIT_ASSETS_HASH_DESTINATION}" - -# Also tag the image with GitLab version, if running on a tag pipeline, so -# other projects can simply use that instead of computing the slug. -if [ -n "${CI_COMMIT_TAG}" ]; then - COMMIT_REF_NAME_DESTINATION="${ASSETS_IMAGE_PATH}:${CI_COMMIT_REF_NAME}" - DESTINATIONS="$DESTINATIONS --destination=$COMMIT_REF_NAME_DESTINATION" -else - if [ -n "${PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE}" ]; then - echoinfo "Checking if the ${COMMIT_ASSETS_HASH_DESTINATION} image exists..." - repository_id=$(get_repository_id "${ASSETS_IMAGE_NAME}") - - if [ -n "${repository_id}" ]; then - api_image_url="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/registry/repositories/${repository_id}/tags/${COMMIT_ASSETS_HASH_TAG}" - echoinfo "api_image_url: ${api_image_url}" - - if test_url "${api_image_url}" "--header \"PRIVATE-TOKEN: ${PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE}\""; then - echosuccess "Image ${COMMIT_ASSETS_HASH_DESTINATION} already exists, no need to rebuild it." - exit 0 - else - echoinfo "Image ${COMMIT_ASSETS_HASH_DESTINATION} doesn't exist, we'll need to build it." - fi - else - echoerr "Repository ID couldn't be found for the '${ASSETS_IMAGE_NAME}' image!" - fi - else - echoinfo "The 'PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE' variable is not present, so we cannot check if the image already exists." - fi -fi +ASSETS_IMAGE_PATH=${CI_REGISTRY}/${CI_PROJECT_PATH}/${ASSETS_IMAGE_NAME} mkdir -p assets_container.build/public cp -r public/assets assets_container.build/public/ cp Dockerfile.assets assets_container.build/ -echo "Building assets image for destinations: ${DESTINATIONS}" +COMMIT_REF_SLUG_DESTINATION=${ASSETS_IMAGE_PATH}:${CI_COMMIT_REF_SLUG} -/kaniko/executor \ - --context="assets_container.build" \ - --dockerfile="assets_container.build/Dockerfile.assets" \ - ${DESTINATIONS} +COMMIT_SHA_DESTINATION=${ASSETS_IMAGE_PATH}:${CI_COMMIT_SHA} +COMMIT_REF_NAME_DESTINATION=${ASSETS_IMAGE_PATH}:${CI_COMMIT_REF_NAME} + +DESTINATIONS="--destination=$COMMIT_REF_SLUG_DESTINATION --destination=$COMMIT_SHA_DESTINATION" + +# Also tag the image with GitLab version, if running on a tag pipeline, so +# other projects can simply use that instead of computing the slug. +if [ -n "$CI_COMMIT_TAG" ]; then + DESTINATIONS="$DESTINATIONS --destination=$COMMIT_REF_NAME_DESTINATION" +fi + +echo "building assets image for destinations: $DESTINATIONS" + +/kaniko/executor --context=assets_container.build --dockerfile=assets_container.build/Dockerfile.assets $DESTINATIONS diff --git a/scripts/trigger-build.rb b/scripts/trigger-build.rb index 1167774f500..897ca9f473e 100755 --- a/scripts/trigger-build.rb +++ b/scripts/trigger-build.rb @@ -160,8 +160,6 @@ module Trigger end class CNG < Base - ASSETS_HASH = "cached-assets-hash.txt" - def variables # Delete variables that aren't useful when using native triggers. super.tap do |hash| @@ -189,7 +187,7 @@ module Trigger "TRIGGER_BRANCH" => ref, "GITLAB_VERSION" => ENV['CI_COMMIT_SHA'], "GITLAB_TAG" => ENV['CI_COMMIT_TAG'], # Always set a value, even an empty string, so that the downstream pipeline can correctly check it. - "GITLAB_ASSETS_TAG" => assets_image_tag, + "GITLAB_ASSETS_TAG" => ENV['CI_COMMIT_TAG'] ? ENV['CI_COMMIT_REF_NAME'] : ENV['CI_COMMIT_SHA'], "FORCE_RAILS_IMAGE_BUILDS" => 'true', "CE_PIPELINE" => Trigger.ee? ? nil : "true", # Always set a value, even an empty string, so that the downstream pipeline can correctly check it. "EE_PIPELINE" => Trigger.ee? ? "true" : nil # Always set a value, even an empty string, so that the downstream pipeline can correctly check it. @@ -206,17 +204,6 @@ module Trigger raw_version end end - - # We're doing the same operation in `scripts/utils.sh` in the `assets_image_tag` function. - def assets_image_tag - if ENV['CI_COMMIT_TAG'] - ENV['CI_COMMIT_REF_NAME'] - elsif File.exist?(ASSETS_HASH) - "assets-hash-#{File.read(ASSETS_HASH).strip[0...10]}" - else - ENV['CI_COMMIT_SHA'] - end - end end class Docs < Base diff --git a/scripts/utils.sh b/scripts/utils.sh index 5d18e724e5d..ea2b390f249 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -15,11 +15,9 @@ function retry() { function test_url() { local url="${1}" - local curl_args="${2}" local status - local cmd="curl ${curl_args} --output /dev/null -L -s -w ''%{http_code}'' \"${url}\"" - status=$(eval "${cmd}") + status=$(curl --output /dev/null -L -s -w ''%{http_code}'' "${url}") if [[ $status == "200" ]]; then return 0 @@ -205,15 +203,3 @@ function danger_as_local() { # We need to base SHA to help danger determine the base commit for this shallow clone. bundle exec danger dry_run --fail-on-errors=true --verbose --base="${CI_MERGE_REQUEST_DIFF_BASE_SHA}" --head="${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA:-$CI_COMMIT_SHA}" --dangerfile="${DANGER_DANGERFILE:-Dangerfile}" } - -# We're doing the same operation in `scripts/trigger-build.rb` in the `assets_image_tag` method. -function assets_image_tag() { - local cache_assets_hash_file="cached-assets-hash.txt" - - if [[ ! -f "${cache_assets_hash_file}" ]]; then - echoerr "The ${cache_assets_hash_file} is missing!" - exit 1 - else - echo -n "assets-hash-$(cat ${cache_assets_hash_file} | cut -c1-10)" - fi -} diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index b29c0ce6f42..7f838167bd2 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -253,17 +253,44 @@ RSpec.describe ApplicationHelper do end describe '#client_class_list' do - it 'returns string containing CSS classes representing client browser and platform' do - class_list = helper.client_class_list - expect(class_list).to eq('gl-browser-generic gl-platform-other') + context 'when browser or platform are unknown' do + it 'returns string containing CSS classes representing fallbacks' do + class_list = helper.client_class_list + expect(class_list).to eq('gl-browser-generic gl-platform-other') + end + end + + context 'when browser and platform are known' do + before do + allow(helper.controller).to receive(:browser).and_return(::Browser.new('Google Chrome/Linux')) + end + + it 'returns string containing CSS classes representing them' do + class_list = helper.client_class_list + expect(class_list).to eq('gl-browser-chrome gl-platform-linux') + end end end describe '#client_js_flags' do - it 'returns map containing JS flags representing client browser and platform' do - flags_list = helper.client_js_flags - expect(flags_list[:isGeneric]).to eq(true) - expect(flags_list[:isOther]).to eq(true) + context 'when browser or platform are unknown' do + it 'returns map containing JS flags representing falllbacks' do + flags_list = helper.client_js_flags + expect(flags_list[:isGeneric]).to eq(true) + expect(flags_list[:isOther]).to eq(true) + end + end + + context 'when browser and platform are known' do + before do + allow(helper.controller).to receive(:browser).and_return(::Browser.new('Google Chrome/Linux')) + end + + it 'returns map containing JS flags representing client browser and platform' do + flags_list = helper.client_js_flags + expect(flags_list[:isChrome]).to eq(true) + expect(flags_list[:isLinux]).to eq(true) + end end end diff --git a/spec/lib/gitlab/usage/metrics/instrumentations/distinct_count_projects_with_expiration_policy_metric_spec.rb b/spec/lib/gitlab/usage/metrics/instrumentations/distinct_count_projects_with_expiration_policy_metric_spec.rb index d46de893a8a..a1ca658a0d7 100644 --- a/spec/lib/gitlab/usage/metrics/instrumentations/distinct_count_projects_with_expiration_policy_metric_spec.rb +++ b/spec/lib/gitlab/usage/metrics/instrumentations/distinct_count_projects_with_expiration_policy_metric_spec.rb @@ -6,6 +6,12 @@ RSpec.describe Gitlab::Usage::Metrics::Instrumentations::DistinctCountProjectsWi before_all do create(:container_expiration_policy, enabled: false) create(:container_expiration_policy, enabled: false, created_at: 29.days.ago) + create(:container_expiration_policy, keep_n: nil) + create(:container_expiration_policy, keep_n: 5, enabled: true) + create(:container_expiration_policy, keep_n: 5, enabled: true) + create(:container_expiration_policy, keep_n: 5, enabled: true) + create(:container_expiration_policy, older_than: '7d') + create(:container_expiration_policy, cadence: '14d') create(:container_expiration_policy, enabled: true) end @@ -16,4 +22,12 @@ RSpec.describe Gitlab::Usage::Metrics::Instrumentations::DistinctCountProjectsWi it_behaves_like 'a correct instrumented metric value', { time_frame: 'all', options: { enabled: false } } do let(:expected_value) { 2 } end + + it_behaves_like 'a correct instrumented metric value', { time_frame: 'all', options: { keep_n: 5, enabled: true } } do + let(:expected_value) { 3 } + end + + it_behaves_like 'a correct instrumented metric value', { time_frame: 'all', options: { cadence: '14d' } } do + let(:expected_value) { 1 } + end end diff --git a/spec/scripts/trigger-build_spec.rb b/spec/scripts/trigger-build_spec.rb index 758336d251d..ac8e3c7797c 100644 --- a/spec/scripts/trigger-build_spec.rb +++ b/spec/scripts/trigger-build_spec.rb @@ -337,29 +337,6 @@ RSpec.describe Trigger do it 'sets GITLAB_ASSETS_TAG to CI_COMMIT_SHA' do expect(subject.variables['GITLAB_ASSETS_TAG']).to eq(env['CI_COMMIT_SHA']) end - - context 'when cached-assets-hash.txt does not exist' do - before do - expect(File).to receive(:exist?).with('cached-assets-hash.txt').and_return(false) - end - - it 'sets GITLAB_ASSETS_TAG to CI_COMMIT_SHA' do - expect(subject.variables['GITLAB_ASSETS_TAG']).to eq(env['CI_COMMIT_SHA']) - end - end - - context 'when cached-assets-hash.txt exists' do - before do - allow(File).to receive(:exist?).and_call_original - allow(File).to receive(:read).and_call_original - expect(File).to receive(:exist?).with('cached-assets-hash.txt').and_return(true) - expect(File).to receive(:read).with('cached-assets-hash.txt').and_return("42") - end - - it 'sets GITLAB_ASSETS_TAG to CI_COMMIT_SHA' do - expect(subject.variables['GITLAB_ASSETS_TAG']).to eq("assets-hash-42") - end - end end end diff --git a/workhorse/go.mod b/workhorse/go.mod index f2ca331f61b..83e91dfaeb1 100644 --- a/workhorse/go.mod +++ b/workhorse/go.mod @@ -26,7 +26,7 @@ require ( github.com/sirupsen/logrus v1.9.0 github.com/smartystreets/goconvey v1.7.2 github.com/stretchr/testify v1.8.1 - gitlab.com/gitlab-org/gitaly/v15 v15.4.2 + gitlab.com/gitlab-org/gitaly/v15 v15.5.1 gitlab.com/gitlab-org/golang-archive-zip v0.1.1 gitlab.com/gitlab-org/labkit v1.16.0 gocloud.dev v0.26.0 @@ -71,7 +71,7 @@ require ( github.com/go-ole/go-ole v1.2.4 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/google/go-cmp v0.5.8 // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/google/pprof v0.0.0-20210804190019-f964ff605595 // indirect github.com/google/uuid v1.3.0 // indirect github.com/google/wire v0.5.0 // indirect diff --git a/workhorse/go.sum b/workhorse/go.sum index 91b92d55bc6..0f21ee74030 100644 --- a/workhorse/go.sum +++ b/workhorse/go.sum @@ -141,18 +141,19 @@ github.com/HdrHistogram/hdrhistogram-go v1.1.1 h1:cJXY5VLMHgejurPjZH6Fo9rIwRGLef github.com/HdrHistogram/hdrhistogram-go v1.1.1/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Masterminds/sprig/v3 v3.2.0/go.mod h1:tWhwTbUTndesPNeF0C900vKoq283u6zp4APT9vaF3SI= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/ProtonMail/go-crypto v0.0.0-20220824120805-4b6e5c587895/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8= +github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= +github.com/ProtonMail/go-crypto v0.0.0-20220930113650-c6815a8c17ad/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= @@ -339,17 +340,18 @@ github.com/git-lfs/pktline v0.0.0-20210330133718-06e9096e2825/go.mod h1:fenKRzpX github.com/git-lfs/wildmatch/v2 v2.0.1/go.mod h1:EVqonpk9mXbREP3N8UkwoWdrF249uHpCUo5CPXY81gw= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-enry/go-enry/v2 v2.8.2/go.mod h1:GVzIiAytiS5uT/QiuakK7TF1u4xDab87Y8V5EJRpsIQ= +github.com/go-enry/go-enry/v2 v2.8.3/go.mod h1:GVzIiAytiS5uT/QiuakK7TF1u4xDab87Y8V5EJRpsIQ= github.com/go-enry/go-license-detector/v4 v4.3.0/go.mod h1:HaM4wdNxSlz/9Gw0uVOKSQS5JVFqf2Pk8xUPEn6bldI= github.com/go-enry/go-oniguruma v1.2.1/go.mod h1:bWDhYP+S6xZQgiRL7wlTScFYBe023B6ilRZbCAD5Hf4= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.1.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= github.com/go-git/go-git-fixtures/v4 v4.0.1/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= -github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= +github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= github.com/go-git/go-git/v5 v5.1.0/go.mod h1:ZKfuPUoY1ZqIG4QG9BDBh3G4gLM5zvPuSJAozQrZuyM= -github.com/go-git/go-git/v5 v5.3.0/go.mod h1:xdX4bWJ48aOrdhnl2XqHYstHbbp6+LFS4r4X+lNVprw= +github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -455,8 +457,9 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-replayers/grpcreplay v1.1.0 h1:S5+I3zYyZ+GQz68OfbURDdt/+cSMqCK1wrvNx7WBzTE= github.com/google/go-replayers/grpcreplay v1.1.0/go.mod h1:qzAvJ8/wi57zq7gWqaE6AwLM6miiXUQwP1S+I9icmhk= @@ -495,6 +498,7 @@ github.com/google/pprof v0.0.0-20210804190019-f964ff605595/go.mod h1:kpwsk12EmLe github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -554,6 +558,7 @@ github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbg github.com/hhatto/gorst v0.0.0-20181029133204-ca9f730cac5b/go.mod h1:HmaZGXHdSwQh1jnUlBGN2BeEYOHACLVGzYOXCbsLvxY= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -687,7 +692,7 @@ github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libgit2/git2go/v33 v33.0.9/go.mod h1:KdpqkU+6+++4oHna/MIOgx4GCQ92IPCdpVRMRI80J+4= +github.com/libgit2/git2go/v34 v34.0.0/go.mod h1:blVco2jDAw6YTXkErMMqzHLcAjKkwF0aWIRHBqiJkZ0= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20210210170715-a8dfcb80d3a7 h1:YjW+hUb8Fh2S58z4av4t/0cBMK/Q0aP48RocCFsC8yI= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20210210170715-a8dfcb80d3a7/go.mod h1:Spd59icnvRxSKuyijbbwe5AemzvcyXAUBgApa7VybMw= github.com/lightstep/lightstep-tracer-go v0.25.0 h1:sGVnz8h3jTQuHKMbUe2949nXm3Sg09N1UcR3VoQNN5E= @@ -698,6 +703,7 @@ github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPK github.com/markbates/errx v1.1.0/go.mod h1:PLa46Oex9KNbVDZhKel8v1OT7hD5JZ2eI7AHhA0wswc= github.com/markbates/oncer v1.0.0/go.mod h1:Z59JA581E9GP6w96jai+TGqafHPW+cPfRxz2aSZ0mcI= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.0.10-0.20170816031813-ad5389df28cd/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= @@ -721,14 +727,14 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-oci8 v0.1.1/go.mod h1:wjDx6Xm9q7dFtHJvIlrI99JytznLw5wQ4R+9mNXJwGI= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/cli v1.1.2/go.mod h1:6iaV0fGdElS6dPBx0EApTxHrcWvmJphyh2n8YBLPPZ4= +github.com/mitchellh/cli v1.1.4/go.mod h1:vTLESy5mRhKOs9KDp0/RATawxP1UqBmdrpVRMnpcvKQ= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= @@ -804,7 +810,6 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -833,7 +838,7 @@ github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6po github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/rubenv/sql-migrate v1.1.2/go.mod h1:/7TZymwxN8VWumcIxw1jjHEcR1djpdkMHQPT4FWdnbQ= +github.com/rubenv/sql-migrate v1.2.0/go.mod h1:Z5uVnq7vrIrPmHbVFfR4YLHRZquxeHpckCnRq0P/K9Y= github.com/rubyist/tracerx v0.0.0-20170927163412-787959303086/go.mod h1:YpdgDXpumPB/+EGmGTYHeiW/0QVFRzBYTNFaxWfPDk4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -951,8 +956,8 @@ github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= -gitlab.com/gitlab-org/gitaly/v15 v15.4.2 h1:evAILjEjT7M+pegcbP4QsViK4Hkt1I1IwJAr5AQjbdY= -gitlab.com/gitlab-org/gitaly/v15 v15.4.2/go.mod h1:anANn2UwrECvFOEvLx8DkXYYDQ6g3+jmv0kP2VDYm70= +gitlab.com/gitlab-org/gitaly/v15 v15.5.1 h1:EbkAYAeTLllJzX3N3Sy3ZcmKtBzI5OovT5c5MWI16Bo= +gitlab.com/gitlab-org/gitaly/v15 v15.5.1/go.mod h1:G5q5H6OYMSEDnKXsQoYTzI+ysCTfM4Of2z0v6xeHtRY= gitlab.com/gitlab-org/golang-archive-zip v0.1.1 h1:35k9giivbxwF03+8A05Cm8YoxoakU8FBCj5gysjCTCE= gitlab.com/gitlab-org/golang-archive-zip v0.1.1/go.mod h1:ZDtqpWPGPB9qBuZnZDrKQjIdJtkN7ZAoVwhT6H2o2kE= gitlab.com/gitlab-org/labkit v1.16.0 h1:Vm3NAMZ8RqAunXlvPWby3GJ2R35vsYGP6Uu0YjyMIlY= @@ -980,8 +985,9 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= @@ -1009,6 +1015,7 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1016,6 +1023,7 @@ golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -1239,6 +1247,7 @@ golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210503080704-8803ae5d1324/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=