From c5ea865e079027d5d12cb14b0041d0c5cd70fc3b Mon Sep 17 00:00:00 2001
From: Marcel Amirault <mamirault@gitlab.com>
Date: Wed, 10 May 2023 22:17:03 +0900
Subject: [PATCH] Clean up yaml lint warnings

Most warnings caused by too few spaces before comment,
or comment indentation
---
 .gitlab/ci/build-images.gitlab-ci.yml              |  4 ++--
 .gitlab/ci/global.gitlab-ci.yml                    |  2 +-
 .gitlab/ci/preflight.gitlab-ci.yml                 |  2 +-
 .gitlab/ci/qa.gitlab-ci.yml                        |  2 +-
 .gitlab/ci/review-apps/main.gitlab-ci.yml          |  2 +-
 .gitlab/ci/rules.gitlab-ci.yml                     | 12 ++++++------
 .gitlab/ci/setup.gitlab-ci.yml                     |  2 +-
 .gitlab/ci/test-metadata.gitlab-ci.yml             |  2 +-
 data/deprecations/15-10-gitaly-legacy-config.yml   |  2 +-
 data/deprecations/15-10-helm-chart-updates.yml     |  2 +-
 data/deprecations/15-11-geo-project-redownload.yml |  2 +-
 .../15-11-runner-images-alpine-3.12-3.13-3.14.yml  | 14 +++++++-------
 data/deprecations/15-8-third-party-registries.yml  |  2 +-
 .../16-0-CiRunner-projects-default-sort.yml        |  4 ++--
 ...0-graphql-CiRunnerUpgradeStatusType-renamed.yml |  2 +-
 data/removals/15_10/15_10-non-public-artifacts.yml |  4 ++--
 .../templates/Terraform/Module-Base.gitlab-ci.yml  |  4 ++--
 17 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/.gitlab/ci/build-images.gitlab-ci.yml b/.gitlab/ci/build-images.gitlab-ci.yml
index c1123b29d677e..b866446c6e07e 100644
--- a/.gitlab/ci/build-images.gitlab-ci.yml
+++ b/.gitlab/ci/build-images.gitlab-ci.yml
@@ -1,13 +1,13 @@
 .base-image-build:
   extends: .use-kaniko
   variables:
-    GIT_LFS_SKIP_SMUDGE: 1 # disable pulling objects from lfs
+    GIT_LFS_SKIP_SMUDGE: 1  # disable pulling objects from lfs
   retry: 2
 
 .base-image-build-buildx:
   extends: .use-buildx
   variables:
-    GIT_LFS_SKIP_SMUDGE: 1 # disable pulling objects from lfs
+    GIT_LFS_SKIP_SMUDGE: 1  # disable pulling objects from lfs
   retry: 2
 
 # This image is used by:
diff --git a/.gitlab/ci/global.gitlab-ci.yml b/.gitlab/ci/global.gitlab-ci.yml
index 23f4aef866c99..4362269103b9a 100644
--- a/.gitlab/ci/global.gitlab-ci.yml
+++ b/.gitlab/ci/global.gitlab-ci.yml
@@ -437,7 +437,7 @@
         docker run --rm --privileged ${QEMU_IMAGE} --uninstall qemu-*;
         docker run --rm --privileged ${QEMU_IMAGE} --install all;
       fi
-    - docker buildx create --use # creates and set's to active buildkit builder
+    - docker buildx create --use  # creates and set's to active buildkit builder
 
 .use-kube-context:
   before_script:
diff --git a/.gitlab/ci/preflight.gitlab-ci.yml b/.gitlab/ci/preflight.gitlab-ci.yml
index 526492a75c750..7dee87ee71565 100644
--- a/.gitlab/ci/preflight.gitlab-ci.yml
+++ b/.gitlab/ci/preflight.gitlab-ci.yml
@@ -31,7 +31,7 @@ rails-production-server-boot:
   script:
     - source scripts/utils.sh
     - bundle exec rails server -e production &
-    - sleep 40 # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114124#note_1309506358
+    - sleep 40  # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114124#note_1309506358
     - retry_times_sleep 10 5 "curl http://0.0.0.0:3000"
     - kill $(jobs -p)
 
diff --git a/.gitlab/ci/qa.gitlab-ci.yml b/.gitlab/ci/qa.gitlab-ci.yml
index 97a2883c9e8a5..81127b7c11337 100644
--- a/.gitlab/ci/qa.gitlab-ci.yml
+++ b/.gitlab/ci/qa.gitlab-ci.yml
@@ -26,7 +26,7 @@
     GITLAB_QA_IMAGE: "${CI_REGISTRY_IMAGE}/gitlab-ee-qa:${CI_COMMIT_SHA}"
     RUN_WITH_BUNDLE: "true"  # instructs pipeline to install and run gitlab-qa gem via bundler
     QA_PATH: qa  # sets the optional path for bundler to run from
-    DYNAMIC_PIPELINE_YML: package-and-test-pipeline.yml # yml files are generated by scripts/generate-e2e-pipeline script
+    DYNAMIC_PIPELINE_YML: package-and-test-pipeline.yml  # yml files are generated by scripts/generate-e2e-pipeline script
   inherit:
     variables:
       - CHROME_VERSION
diff --git a/.gitlab/ci/review-apps/main.gitlab-ci.yml b/.gitlab/ci/review-apps/main.gitlab-ci.yml
index aa61e67de083a..28416c89f68c8 100644
--- a/.gitlab/ci/review-apps/main.gitlab-ci.yml
+++ b/.gitlab/ci/review-apps/main.gitlab-ci.yml
@@ -110,7 +110,7 @@ review-deploy:
   image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}dtzar/helm-kubectl:3.9.3
   needs:
     - review-build-cng
-    - review-delete-deployment # We always want to start from a clean slate (i.e. no helm release, no k8s namespace)
+    - review-delete-deployment  # We always want to start from a clean slate (i.e. no helm release, no k8s namespace)
   cache:
     key: "review-deploy-dependencies-charts-${GITLAB_HELM_CHART_REF}-v1"
     paths:
diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml
index cccf81b73a460..45a7924fb1eb8 100644
--- a/.gitlab/ci/rules.gitlab-ci.yml
+++ b/.gitlab/ci/rules.gitlab-ci.yml
@@ -1403,7 +1403,7 @@
       allow_failure: true
     - <<: *if-merge-request
       changes:
-        - qa/Gemfile.lock # qa/Gemfile.lock is a part of *qa-patterns, so this rule must be placed before the one with *qa-patterns changes
+        - qa/Gemfile.lock  # qa/Gemfile.lock is a part of *qa-patterns, so this rule must be placed before the one with *qa-patterns changes
       variables:
         UPDATE_QA_CACHE: "true"
     - <<: *if-merge-request
@@ -1430,7 +1430,7 @@
         KNAPSACK_GENERATE_REPORT: "true"
         UPDATE_QA_CACHE: "true"
         QA_SAVE_TEST_METRICS: "true"
-        QA_EXPORT_TEST_METRICS: "false" # on main runs, metrics are exported to separate bucket via rake task for better consistency
+        QA_EXPORT_TEST_METRICS: "false"  # on main runs, metrics are exported to separate bucket via rake task for better consistency
 
 .qa:rules:package-and-test-ee:
   rules:
@@ -2287,7 +2287,7 @@
       variables:
         KNAPSACK_GENERATE_REPORT: "true"
         QA_SAVE_TEST_METRICS: "true"
-        QA_EXPORT_TEST_METRICS: "false" # on main runs, metrics are exported to separate bucket via rake task for better consistency
+        QA_EXPORT_TEST_METRICS: "false"  # on main runs, metrics are exported to separate bucket via rake task for better consistency
 
 # The following rules needs to be the same as the one for .review:rules:start-review-app-pipeline
 # except that:
@@ -2534,9 +2534,9 @@
     - !reference [".as-if-jh-default-exclusion-rules", rules]
     - <<: *if-merge-request-labels-as-if-jh
       changes: *dependency-patterns
-    # Ideally, we should be able to do this:
-    # - <<: *if-dot-com-gitlab-org-merge-request
-    #   changes: *feature-flag-development-config-patterns && *dependency-patterns
+      # Ideally, we should be able to do this:
+      # - <<: *if-dot-com-gitlab-org-merge-request
+      #   changes: *feature-flag-development-config-patterns && *dependency-patterns
 
 # This rule should share the same logic with .as-if-jh:rules:prepare-as-if-jh
 # Because the jobs using this need jobs using the preparation rules
diff --git a/.gitlab/ci/setup.gitlab-ci.yml b/.gitlab/ci/setup.gitlab-ci.yml
index 8e80598bc784b..36e2c3387480f 100644
--- a/.gitlab/ci/setup.gitlab-ci.yml
+++ b/.gitlab/ci/setup.gitlab-ci.yml
@@ -106,7 +106,7 @@ detect-tests:
   variables:
     RSPEC_TESTS_MAPPING_ENABLED: "true"
   before_script:
-    - apt-get update && apt-get install -y curl # Not present in ruby-slim, so we add it manually
+    - apt-get update && apt-get install -y curl  # Not present in ruby-slim, so we add it manually
   script:
     - source ./scripts/utils.sh
     - source ./scripts/rspec_helpers.sh
diff --git a/.gitlab/ci/test-metadata.gitlab-ci.yml b/.gitlab/ci/test-metadata.gitlab-ci.yml
index 20d768c9e907a..41fd0b49173fc 100644
--- a/.gitlab/ci/test-metadata.gitlab-ci.yml
+++ b/.gitlab/ci/test-metadata.gitlab-ci.yml
@@ -18,7 +18,7 @@ retrieve-tests-metadata:
   image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION}-slim
   stage: prepare
   script:
-    - apt-get update && apt-get install -y curl # Not present in ruby-slim, so we add it manually
+    - apt-get update && apt-get install -y curl  # Not present in ruby-slim, so we add it manually
     - install_gitlab_gem
     - source ./scripts/rspec_helpers.sh
     - retrieve_tests_metadata
diff --git a/data/deprecations/15-10-gitaly-legacy-config.yml b/data/deprecations/15-10-gitaly-legacy-config.yml
index 77f045defb1a7..cbfc923a16fbc 100644
--- a/data/deprecations/15-10-gitaly-legacy-config.yml
+++ b/data/deprecations/15-10-gitaly-legacy-config.yml
@@ -30,6 +30,6 @@
   # OTHER OPTIONAL FIELDS
   #
   tiers:  # (optional - may be required in the future) An array of tiers that the feature is available in currently.  e.g., [Free, Silver, Gold, Core, Premium, Ultimate]
-  documentation_url: https://docs.gitlab.com/ee/administration/gitaly/configure_gitaly.html # (optional) This is a link to the current documentation page
+  documentation_url: https://docs.gitlab.com/ee/administration/gitaly/configure_gitaly.html  # (optional) This is a link to the current documentation page
   image_url:  # (optional) This is a link to a thumbnail image depicting the feature
   video_url:  # (optional) Use the youtube thumbnail URL with the structure of https://img.youtube.com/vi/UNIQUEID/hqdefault.jpg
diff --git a/data/deprecations/15-10-helm-chart-updates.yml b/data/deprecations/15-10-helm-chart-updates.yml
index edfdf1b7ae028..08be6fd477cc7 100644
--- a/data/deprecations/15-10-helm-chart-updates.yml
+++ b/data/deprecations/15-10-helm-chart-updates.yml
@@ -23,7 +23,7 @@
   breaking_change: true  # (required) Change to false if this is not a breaking change.
   reporter: twk3  # (required) GitLab username of the person reporting the change
   stage: enablement  # (required) String value of the stage that the feature was created in. e.g., Growth
-  issue_url: https://gitlab.com/gitlab-org/charts/gitlab/-/issues/3442 # (required) Link to the deprecation issue in GitLab
+  issue_url: https://gitlab.com/gitlab-org/charts/gitlab/-/issues/3442  # (required) Link to the deprecation issue in GitLab
   body: |  # (required) Do not modify this line, instead modify the lines below.
     To coincide with GitLab 16.0, the GitLab Helm Chart will release the 7.0 major version. The following major bundled chart updates will be included:
 
diff --git a/data/deprecations/15-11-geo-project-redownload.yml b/data/deprecations/15-11-geo-project-redownload.yml
index 6b53a0fb6f8fe..229bab04b0a43 100644
--- a/data/deprecations/15-11-geo-project-redownload.yml
+++ b/data/deprecations/15-11-geo-project-redownload.yml
@@ -39,7 +39,7 @@
   #
   # OTHER OPTIONAL FIELDS
   #
-  tiers: ["Premium", "Ultimate"] # (optional - may be required in the future) An array of tiers that the feature is available in currently.  e.g., [Free, Silver, Gold, Core, Premium, Ultimate]
+  tiers: ["Premium", "Ultimate"]  # (optional - may be required in the future) An array of tiers that the feature is available in currently.  e.g., [Free, Silver, Gold, Core, Premium, Ultimate]
   documentation_url:  # (optional) This is a link to the current documentation page
   image_url:  # (optional) This is a link to a thumbnail image depicting the feature
   video_url:  # (optional) Use the youtube thumbnail URL with the structure of https://img.youtube.com/vi/UNIQUEID/hqdefault.jpg
diff --git a/data/deprecations/15-11-runner-images-alpine-3.12-3.13-3.14.yml b/data/deprecations/15-11-runner-images-alpine-3.12-3.13-3.14.yml
index 493b3807aae8b..d9cd4bfb26204 100644
--- a/data/deprecations/15-11-runner-images-alpine-3.12-3.13-3.14.yml
+++ b/data/deprecations/15-11-runner-images-alpine-3.12-3.13-3.14.yml
@@ -2,11 +2,11 @@
   announcement_milestone: "15.11"  # (required) The milestone when this feature was first announced as deprecated.
   announcement_date: "2023-04-22"  # (required) The date of the milestone release when this feature was first announced as deprecated. This should almost always be the 22nd of a month (YYYY-MM-22), unless you did an out of band blog post.
   removal_milestone: "16.1"  # (required) The milestone when this feature is planned to be removed
-  removal_date: "2023-06-22" # (required) The date of the milestone release when this feature is planned to be removed. This should almost always be the 22nd of a month (YYYY-MM-22), unless you did an out of band blog post.
+  removal_date: "2023-06-22"  # (required) The date of the milestone release when this feature is planned to be removed. This should almost always be the 22nd of a month (YYYY-MM-22), unless you did an out of band blog post.
   breaking_change: false  # (required) If this deprecation is a breaking change, set this value to true
   reporter: DarrenEastman  # (required) GitLab username of the person reporting the deprecation
-  stage: Verify # (required) String value of the stage that the feature was created in. e.g., Growth
-  issue_url: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/29639 # (required) Link to the deprecation issue in GitLab
+  stage: Verify  # (required) String value of the stage that the feature was created in. e.g., Growth
+  issue_url: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/29639  # (required) Link to the deprecation issue in GitLab
   body: |  # (required) Do not modify this line, instead modify the lines below.
     We will stop publishing runner images based on the following, end-of-life Alpine versions:
 
@@ -14,11 +14,11 @@
     - Alpine 3.13
     - Alpine 3.14 (end-of-life on 2023-05-23)
   end_of_support_milestone: "16.1"  # (optional) Use "XX.YY" format. The milestone when support for this feature will end.
-  end_of_support_date: "2023-06-22" # (optional) The date of the milestone release when support for this feature will end.
+  end_of_support_date: "2023-06-22"  # (optional) The date of the milestone release when support for this feature will end.
 
-# OTHER OPTIONAL FIELDS
-#
+  # OTHER OPTIONAL FIELDS
+  #
   tiers:  # (optional - may be required in the future) An array of tiers that the feature is available in currently.  e.g., [Free, Silver, Gold, Core, Premium, Ultimate]
-  documentation_url: https://docs.gitlab.com/runner/install/docker.html#gitlab-runner-container-images-support-lifecycle # (optional) This is a link to the current documentation page
+  documentation_url: https://docs.gitlab.com/runner/install/docker.html#gitlab-runner-container-images-support-lifecycle  # (optional) This is a link to the current documentation page
   image_url:  # (optional) This is a link to a thumbnail image depicting the feature
   video_url:  # (optional) Use the youtube thumbnail URL with the structure of https://img.youtube.com/vi/UNIQUEID/hqdefault.jpg
diff --git a/data/deprecations/15-8-third-party-registries.yml b/data/deprecations/15-8-third-party-registries.yml
index 6d583cd3d1991..8338058150558 100644
--- a/data/deprecations/15-8-third-party-registries.yml
+++ b/data/deprecations/15-8-third-party-registries.yml
@@ -21,4 +21,4 @@
 # If an End of Support period applies, the announcement should be shared with GitLab Support
 # in the `#spt_managers` channel in Slack, and mention `@gitlab-com/support` in this MR.
 #
-  end_of_support_milestone: 16.0 # (optional) Use "XX.YY" format. The milestone when support for this feature will end.
+  end_of_support_milestone: 16.0  # (optional) Use "XX.YY" format. The milestone when support for this feature will end.
diff --git a/data/deprecations/16-0-CiRunner-projects-default-sort.yml b/data/deprecations/16-0-CiRunner-projects-default-sort.yml
index 871406058e615..d462afb757b73 100644
--- a/data/deprecations/16-0-CiRunner-projects-default-sort.yml
+++ b/data/deprecations/16-0-CiRunner-projects-default-sort.yml
@@ -7,7 +7,7 @@
   breaking_change: true  # (required) Change to false if this is not a breaking change.
   reporter: pedropombeiro  # (required) GitLab username of the person reporting the change
   stage: Verify  # (required) String value of the stage that the feature was created in. e.g., Growth
-  issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/372117 # (required) Link to the deprecation issue in GitLab
+  issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/372117  # (required) Link to the deprecation issue in GitLab
   body: |  # (required) Do not modify this line, instead modify the lines below.
     The `CiRunner.projects`'s field default sort order value will change from `id_asc` to `id_desc`.
     If you rely on the order of the returned projects to be `id_asc`, change your scripts to make the choice explicit.
@@ -22,6 +22,6 @@
   # OTHER OPTIONAL FIELDS
   #
   tiers:  # (optional - may be required in the future) An array of tiers that the feature is available in currently.  e.g., [Free, Silver, Gold, Core, Premium, Ultimate]
-  documentation_url: https://docs.gitlab.com/ee/api/graphql/reference/index.html#cirunnerprojects # (optional) This is a link to the current documentation page
+  documentation_url: https://docs.gitlab.com/ee/api/graphql/reference/index.html#cirunnerprojects  # (optional) This is a link to the current documentation page
   image_url:  # (optional) This is a link to a thumbnail image depicting the feature
   video_url:  # (optional) Use the youtube thumbnail URL with the structure of https://img.youtube.com/vi/UNIQUEID/hqdefault.jpg
diff --git a/data/deprecations/16-0-graphql-CiRunnerUpgradeStatusType-renamed.yml b/data/deprecations/16-0-graphql-CiRunnerUpgradeStatusType-renamed.yml
index 4f17f60fc851a..cfe4b39deac33 100644
--- a/data/deprecations/16-0-graphql-CiRunnerUpgradeStatusType-renamed.yml
+++ b/data/deprecations/16-0-graphql-CiRunnerUpgradeStatusType-renamed.yml
@@ -19,6 +19,6 @@
   # OTHER OPTIONAL FIELDS
   #
   tiers:  # (optional - may be required in the future) An array of tiers that the feature is available in currently.  e.g., [Free, Silver, Gold, Core, Premium, Ultimate]
-  documentation_url: https://docs.gitlab.com/ee/api/graphql/reference/index.html#cirunnerupgradestatus # (optional) This is a link to the current documentation page
+  documentation_url: https://docs.gitlab.com/ee/api/graphql/reference/index.html#cirunnerupgradestatus  # (optional) This is a link to the current documentation page
   image_url:  # (optional) This is a link to a thumbnail image depicting the feature
   video_url:  # (optional) Use the youtube thumbnail URL with the structure of https://img.youtube.com/vi/UNIQUEID/hqdefault.jpg
diff --git a/data/removals/15_10/15_10-non-public-artifacts.yml b/data/removals/15_10/15_10-non-public-artifacts.yml
index bea672d2f22b7..4a21cf8b612e1 100644
--- a/data/removals/15_10/15_10-non-public-artifacts.yml
+++ b/data/removals/15_10/15_10-non-public-artifacts.yml
@@ -19,7 +19,7 @@
 #
 # OPTIONAL FIELDS
 #
-  tiers: Free # (optional - may be required in the future) An array of tiers that the feature is available in currently. e.g., [Free, Silver, Gold, Core, Premium, Ultimate]
-  documentation_url: https://docs.gitlab.com/ee/ci/yaml/#artifactspublic # (optional) This is a link to the current documentation page
+  tiers: Free  # (optional - may be required in the future) An array of tiers that the feature is available in currently. e.g., [Free, Silver, Gold, Core, Premium, Ultimate]
+  documentation_url: https://docs.gitlab.com/ee/ci/yaml/#artifactspublic  # (optional) This is a link to the current documentation page
   image_url:  # (optional) This is a link to a thumbnail image depicting the feature
   video_url:  # (optional) Use the youtube thumbnail URL with the structure of https://img.youtube.com/vi/UNIQUEID/hqdefault.jpg
diff --git a/lib/gitlab/ci/templates/Terraform/Module-Base.gitlab-ci.yml b/lib/gitlab/ci/templates/Terraform/Module-Base.gitlab-ci.yml
index e73e619476078..6d5bd7c2172df 100644
--- a/lib/gitlab/ci/templates/Terraform/Module-Base.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Terraform/Module-Base.gitlab-ci.yml
@@ -14,7 +14,7 @@ variables:
   TERRAFORM_MODULE_DIR: ${CI_PROJECT_DIR}    # The relative path to the root directory of the Terraform project.
   TERRAFORM_MODULE_NAME: ${CI_PROJECT_NAME}  # The name of your Terraform module, must not have any spaces or underscores (will be translated to hyphens).
   TERRAFORM_MODULE_SYSTEM: local             # The system or provider your Terraform module targets (ex. local, aws, google).
-  TERRAFORM_MODULE_VERSION: ${CI_COMMIT_TAG} # The version - it's recommended to follow SemVer for Terraform Module Versioning.
+  TERRAFORM_MODULE_VERSION: ${CI_COMMIT_TAG}  # The version - it's recommended to follow SemVer for Terraform Module Versioning.
 
 .terraform-module:fmt:
   stage: validate
@@ -29,7 +29,7 @@ variables:
   stage: deploy
   image: $CI_TEMPLATE_REGISTRY_HOST/gitlab-org/terraform-images/stable:latest
   script:
-    - TERRAFORM_MODULE_NAME=$(echo "${TERRAFORM_MODULE_NAME}" | tr " _" -) # module-name must not have spaces or underscores, so translate them to hyphens
+    - TERRAFORM_MODULE_NAME=$(echo "${TERRAFORM_MODULE_NAME}" | tr " _" -)  # module-name must not have spaces or underscores, so translate them to hyphens
     # Builds the Terraform module artifact: a gzipped tar archive with the contents from `$TERRAFORM_MODULE_DIR` without a `.git` directory.
     - tar -vczf /tmp/${TERRAFORM_MODULE_NAME}-${TERRAFORM_MODULE_SYSTEM}-${TERRAFORM_MODULE_VERSION}.tgz -C ${TERRAFORM_MODULE_DIR} --exclude=./.git .
     # Uploads the Terraform module artifact to the GitLab Terraform Module Registry, see
-- 
GitLab