diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 14:22:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 14:22:11 +0000 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /.gitlab | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) | |
download | gitlab-ce-0c872e02b2c822e3397515ec324051ff540f0cd5.tar.gz |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to '.gitlab')
34 files changed, 592 insertions, 271 deletions
diff --git a/.gitlab/CODEOWNERS b/.gitlab/CODEOWNERS index 2bb47c77ba5..b3efa7c61e4 100644 --- a/.gitlab/CODEOWNERS +++ b/.gitlab/CODEOWNERS @@ -18,7 +18,7 @@ GITALY_SERVER_VERSION @project_278964_bot6 @gitlab-org/maintainers/rails-backend /doc/**/*.md /doc/**/*.png /data/deprecations/*.yml -/data/removals/*.yml +/data/removals/**/*.yml ## Technical writing files that do need approval /data/deprecations/templates/ @marcel.amirault @gitlab-org/tw-leadership @sarahgerman @@ -108,6 +108,9 @@ Dangerfile @gl-quality/eng-prod /ee/app/models/project_alias.rb @patrickbajao /ee/lib/api/project_aliases.rb @patrickbajao +^[Distribution] +/lib/support/ @gitlab-org/distribution + # Secure & Threat Management ownership delineation # https://about.gitlab.com/handbook/engineering/development/threat-management/delineate-secure-threat-management.html#technical-boundaries ^[Threat Insights] @@ -339,11 +342,30 @@ Dangerfile @gl-quality/eng-prod /spec/models/onboarding/ @gitlab-org/growth/engineers /app/services/onboarding/ @gitlab-org/growth/engineers /spec/services/onboarding/ @gitlab-org/growth/engineers -/ee/app/controllers/registrations/ @gitlab-org/growth/engineers /ee/app/components/namespaces/free_user_cap/ @gitlab-org/growth/engineers /ee/spec/components/namespaces/free_user_cap/ @gitlab-org/growth/engineers /ee/app/models/namespaces/free_user_cap/ @gitlab-org/growth/engineers /ee/spec/models/namespaces/free_user_cap/ @gitlab-org/growth/engineers +/app/controllers/registrations_controller.rb @gitlab-org/growth/engineers +/spec/controllers/registrations_controller_spec.rb @gitlab-org/growth/engineers +/app/controllers/registrations/ @gitlab-org/growth/engineers +/spec/controllers/registrations/ @gitlab-org/growth/engineers +/app/controllers/confirmations_controller.rb @gitlab-org/growth/engineers +/spec/controllers/confirmations_controller_spec.rb @gitlab-org/growth/engineers +/ee/app/controllers/trial_registrations_controller.rb @gitlab-org/growth/engineers +/ee/spec/controllers/trial_registrations_controller_spec.rb @gitlab-org/growth/engineers +/ee/spec/requests/trial_registrations_controller_spec.rb @gitlab-org/growth/engineers +/ee/app/controllers/registrations/ @gitlab-org/growth/engineers +/ee/spec/controllers/registrations/ @gitlab-org/growth/engineers +/ee/spec/requests/registrations/ @gitlab-org/growth/engineers +/ee/app/controllers/ee/registrations_controller.rb @gitlab-org/growth/engineers +/ee/spec/controllers/ee/registrations_controller_spec.rb @gitlab-org/growth/engineers +/ee/app/controllers/ee/registrations/ @gitlab-org/growth/engineers +/ee/app/controllers/ee/confirmations_controller.rb @gitlab-org/growth/engineers +/ee/app/controllers/subscriptions_controller.rb @gitlab-org/growth/engineers +/ee/spec/controllers/subscriptions_controller_spec.rb @gitlab-org/growth/engineers +/ee/app/controllers/subscriptions/ @gitlab-org/growth/engineers +/ee/spec/controllers/subscriptions/ @gitlab-org/growth/engineers /app/services/users/in_product_marketing_email_records.rb @gitlab-org/growth/engineers /spec/services/users/in_product_marketing_email_records_spec.rb @gitlab-org/growth/engineers /app/workers/namespaces/in_product_marketing_emails_worker.rb @gitlab-org/growth/engineers @@ -922,6 +944,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/free_user_limit.md @phillipwells /doc/user/group/ @lciutacu /doc/user/group/clusters/ @phillipwells +/doc/user/group/compliance_frameworks.md @eread /doc/user/group/contribution_analytics/ @lciutacu /doc/user/group/custom_project_templates.md @eread /doc/user/group/devops_adoption/ @lciutacu @@ -931,6 +954,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/group/issues_analytics/ @msedlakjakubowski /doc/user/group/iterations/ @msedlakjakubowski /doc/user/group/planning_hierarchy/ @msedlakjakubowski +/doc/user/group/reporting/ @phillipwells /doc/user/group/repositories_analytics/ @marcel.amirault /doc/user/group/roadmap/ @msedlakjakubowski /doc/user/group/saml_sso/ @jglassman1 @@ -1017,6 +1041,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/project/requirements/ @msedlakjakubowski /doc/user/project/service_desk.md @msedlakjakubowski /doc/user/project/settings/import_export.md @eread +/doc/user/project/settings/import_export_troubleshooting.md @eread /doc/user/project/settings/index.md @lciutacu /doc/user/project/settings/project_access_tokens.md @jglassman1 /doc/user/project/time_tracking.md @msedlakjakubowski @@ -1026,7 +1051,6 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/public_access.md @lciutacu /doc/user/reserved_names.md @lciutacu /doc/user/search/ @ashrafkhamis -/doc/user/search/global_search/ @ashrafkhamis /doc/user/shortcuts.md @ashrafkhamis /doc/user/snippets.md @ashrafkhamis /doc/user/ssh.md @jglassman1 @@ -1041,7 +1065,6 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /app/assets/javascripts/alerts_settings/graphql/mutations/reset_http_token.mutation.graphql @gitlab-org/manage/authentication-and-authorization/approvers /app/assets/javascripts/authentication/ @gitlab-org/manage/authentication-and-authorization/approvers /app/assets/javascripts/ide/components/shared/tokened_input.vue @gitlab-org/manage/authentication-and-authorization/approvers -/app/assets/javascripts/invite_members/components/members_token_select.vue @gitlab-org/manage/authentication-and-authorization/approvers /app/assets/javascripts/packages_and_registries/package_registry/components/list/tokens/ @gitlab-org/manage/authentication-and-authorization/approvers /app/assets/javascripts/pages/admin/impersonation_tokens/ @gitlab-org/manage/authentication-and-authorization/approvers /app/assets/javascripts/pages/groups/settings/access_tokens/ @gitlab-org/manage/authentication-and-authorization/approvers @@ -1117,7 +1140,6 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /app/services/users/email_verification/validate_token_service.rb @gitlab-org/manage/authentication-and-authorization/approvers /app/services/users/refresh_authorized_projects_service.rb @gitlab-org/manage/authentication-and-authorization/approvers /app/services/webauthn/ @gitlab-org/manage/authentication-and-authorization/approvers -/app/validators/json_schemas/build_metadata_id_tokens.json @gitlab-org/manage/authentication-and-authorization/approvers /app/validators/json_schemas/cluster_agent_authorization_configuration.json @gitlab-org/manage/authentication-and-authorization/approvers /app/views/admin/application_settings/_external_authorization_service_form.html.haml @gitlab-org/manage/authentication-and-authorization/approvers /app/views/admin/impersonation_tokens/ @gitlab-org/manage/authentication-and-authorization/approvers @@ -1211,6 +1233,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /ee/app/services/ee/auth/ @gitlab-org/manage/authentication-and-authorization/approvers /ee/app/services/ee/personal_access_tokens/ @gitlab-org/manage/authentication-and-authorization/approvers /ee/app/services/ee/resource_access_tokens/ @gitlab-org/manage/authentication-and-authorization/approvers +/ee/app/services/ee/users/authorized_build_service.rb @gitlab-org/manage/authentication-and-authorization/approvers /ee/app/services/personal_access_tokens/ @gitlab-org/manage/authentication-and-authorization/approvers /ee/app/services/security/token_revocation_service.rb @gitlab-org/manage/authentication-and-authorization/approvers /ee/app/validators/password/ @gitlab-org/manage/authentication-and-authorization/approvers @@ -1297,7 +1320,6 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /app/controllers/projects/runner_projects_controller.rb @gitlab-org/maintainers/cicd-verify /app/controllers/projects/runners_controller.rb @gitlab-org/maintainers/cicd-verify /app/controllers/projects/triggers_controller.rb @gitlab-org/maintainers/cicd-verify -/app/controllers/projects/usage_quotas_controller.rb @gitlab-org/maintainers/cicd-verify /app/controllers/projects/variables_controller.rb @gitlab-org/maintainers/cicd-verify /app/models/commit_status.rb @gitlab-org/maintainers/cicd-verify /app/models/external_pull_request.rb @gitlab-org/maintainers/cicd-verify @@ -1306,6 +1328,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /app/models/project_ci_cd_setting.rb @gitlab-org/maintainers/cicd-verify /app/presenters/commit_status_presenter.rb @gitlab-org/maintainers/cicd-verify /app/presenters/generic_commit_status_presenter.rb @gitlab-org/maintainers/cicd-verify +/app/validators/json_schemas/build_metadata_id_tokens.json @gitlab-org/maintainers/cicd-verify /app/views/projects/artifacts/ @gitlab-org/maintainers/cicd-verify /app/views/projects/generic_commit_statuses/ @gitlab-org/maintainers/cicd-verify /app/views/projects/jobs/ @gitlab-org/maintainers/cicd-verify @@ -1347,17 +1370,64 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /ee/app/workers/clear_shared_runners_minutes_worker.rb @gitlab-org/maintainers/cicd-verify /ee/lib/**/ci/ @gitlab-org/maintainers/cicd-verify /ee/lib/ee/api/entities/merge_train.rb @gitlab-org/maintainers/cicd-verify +/spec/**/ci @gitlab-org/maintainers/cicd-verify +/spec/controllers/admin/jobs_controller_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/controllers/admin/runner_projects_controller_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/controllers/admin/runners_controller_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/controllers/projects/artifacts_controller_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/controllers/projects/jobs_controller_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/requests/runner_setup_controller_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/controllers/projects/pipeline_schedules_controller_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/requests/projects/pipelines_controller_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/controllers/projects/pipelines_settings_controller_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/controllers/projects/runners_controller_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/controllers/groups/variables_controller_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/models/commit_status_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/models/external_pull_request_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/models/generic_commit_status_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/models/namespace_ci_cd_setting_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/models/project_ci_cd_setting_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/presenters/commit_status_presenter_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/views/projects/jobs/ @gitlab-org/maintainers/cicd-verify +/spec/views/projects/pipeline_schedules/ @gitlab-org/maintainers/cicd-verify +/spec/views/projects/pipelines/ @gitlab-org/maintainers/cicd-verify +/spec/workers/build_hooks_worker_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/workers/build_queue_worker_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/workers/build_success_worker_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/workers/ci_platform_metrics_update_cron_worker_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/workers/create_pipeline_worker_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/workers/expire_build_artifacts_worker_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/workers/pipeline_hooks_worker_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/workers/pipeline_metrics_worker_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/workers/pipeline_notification_worker_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/workers/pipeline_process_worker_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/workers/pipeline_schedule_worker_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/workers/run_pipeline_schedule_worker_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/workers/stuck_ci_jobs_worker_spec.rb @gitlab-org/maintainers/cicd-verify +/spec/workers/update_external_pull_requests_worker_spec.rb @gitlab-org/maintainers/cicd-verify +/ee/spec/**/ci @gitlab-org/maintainers/cicd-verify +/ee/spec/**/merge_trains @gitlab-org/maintainers/cicd-verify +/ee/spec/models/merge_train_spec.rb @gitlab-org/maintainers/cicd-verify +/ee/spec/finders/merge_trains_finder_spec.rb @gitlab-org/maintainers/cicd-verify +/ee/spec/services/auto_merge/add_to_merge_train_when_pipeline_succeeds_service_spec.rb @gitlab-org/maintainers/cicd-verify +/ee/spec/services/auto_merge/merge_train_service_spec.rb @gitlab-org/maintainers/cicd-verify +/ee/spec/services/system_notes/merge_train_service_spec.rb @gitlab-org/maintainers/cicd-verify +/ee/spec/controllers/projects/subscriptions_controller_spec.rb @gitlab-org/maintainers/cicd-verify +/ee/spec/helpers/ee/projects/pipeline_helper_spec.rb @gitlab-org/maintainers/cicd-verify +/ee/spec/views/projects/pipelines/ @gitlab-org/maintainers/cicd-verify +/ee/spec/views/projects/settings/ci_cd/ @gitlab-org/maintainers/cicd-verify +/ee/spec/workers/clear_shared_runners_minutes_worker_spec.rb @gitlab-org/maintainers/cicd-verify +/ee/spec/lib/**/ci/ @gitlab-org/maintainers/cicd-verify +/ee/spec/lib/ee/api/entities/merge_train_spec.rb @gitlab-org/maintainers/cicd-verify /**/javascripts/jobs/ @gitlab-org/ci-cd/verify/frontend /**/javascripts/pipelines/ @gitlab-org/ci-cd/verify/frontend /app/assets/javascripts/ci/ @gitlab-org/ci-cd/verify/frontend /app/assets/javascripts/pipeline_new/ @gitlab-org/ci-cd/verify/frontend -/app/assets/javascripts/ci_lint/ @gitlab-org/ci-cd/verify/frontend /app/assets/javascripts/ci_variable_list/ @gitlab-org/ci-cd/verify/frontend /app/assets/javascripts/ci/pipeline_schedules/ @gitlab-org/ci-cd/verify/frontend -/app/assets/javascripts/pipeline_editor/ @gitlab-org/ci-cd/verify/frontend /ee/app/assets/javascripts/ci/ @gitlab-org/ci-cd/verify/frontend -/ee/app/assets/javascripts/reports/ @gitlab-org/ci-cd/verify/frontend /app/assets/javascripts/token_access/ @gitlab-org/ci-cd/verify/frontend +/app/assets/javascripts/admin/application_settings/runner_token_expiration/ @gitlab-org/ci-cd/verify/frontend [Manage::Workspace] lib/api/entities/basic_project_details.rb @gitlab-org/manage/manage-workspace/backend-approvers diff --git a/.gitlab/ci/build-images.gitlab-ci.yml b/.gitlab/ci/build-images.gitlab-ci.yml index a60a5f6040c..09ffc87f087 100644 --- a/.gitlab/ci/build-images.gitlab-ci.yml +++ b/.gitlab/ci/build-images.gitlab-ci.yml @@ -23,9 +23,6 @@ build-qa-image: script: - run_timed_command "scripts/build_qa_image" -# This image is used by: -# - 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: - .base-image-build @@ -33,7 +30,11 @@ 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 + - skopeo login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - 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/docs.gitlab-ci.yml b/.gitlab/ci/docs.gitlab-ci.yml index c6d2b30046c..18954e7b8e0 100644 --- a/.gitlab/ci/docs.gitlab-ci.yml +++ b/.gitlab/ci/docs.gitlab-ci.yml @@ -76,14 +76,16 @@ docs-code-quality: - .docs-markdown-lint-image stage: lint needs: [] + allow_failure: true script: - - vale --output=doc/.vale/vale-json.tmpl --minAlertLevel warning doc > gl-code-quality-report-docs.json || exit_code=$? + - scripts/lint-doc-quality.sh artifacts: reports: codequality: gl-code-quality-report-docs.json paths: - gl-code-quality-report-docs.json expire_in: 1 week + when: always ui-docs-links lint: extends: diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index 6be77fe52c8..cde023c149a 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -28,6 +28,7 @@ fi fi - assets_compile_script + - echo -n "${GITLAB_ASSETS_HASH}" > "cached-assets-hash.txt" compile-production-assets: extends: @@ -43,6 +44,7 @@ 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 @@ -73,9 +75,6 @@ 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: @@ -274,32 +273,6 @@ coverage-frontend: coverage_format: cobertura path: coverage-frontend/cobertura-coverage.xml -.qa-frontend-node: - extends: - - .default-retry - - .default-utils-before_script - - .qa-frontend-node-cache - - .frontend:rules:qa-frontend-node - stage: test - needs: [] - script: - - yarn_install_script - - run_timed_command "retry yarn run webpack-prod" - -qa-frontend-node:14: - extends: .qa-frontend-node - image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}node:14 - -qa-frontend-node:16: - extends: .qa-frontend-node - image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}node:16 - -qa-frontend-node:latest: - extends: - - .qa-frontend-node - - .frontend:rules:qa-frontend-node-latest - image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}node:latest - webpack-dev-server: extends: - .default-retry diff --git a/.gitlab/ci/global.gitlab-ci.yml b/.gitlab/ci/global.gitlab-ci.yml index add728a9983..5e35ae6aff3 100644 --- a/.gitlab/ci/global.gitlab-ci.yml +++ b/.gitlab/ci/global.gitlab-ci.yml @@ -82,19 +82,6 @@ <<: *node-modules-cache policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up. -.assets-cache: &assets-cache - key: "assets-debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}-node-${NODE_ENV}-v5" - # This list should match GITLAB_ASSETS_PATHS_LIST from scripts/gitlab_component_helpers.sh - paths: - - cached-assets-hash.txt - - app/assets/javascripts/locale/**/app.js - - public/assets/ - policy: pull - -.assets-cache-push: &assets-cache-push - <<: *assets-cache - policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up. - .assets-tmp-cache: &assets-tmp-cache key: "assets-tmp-debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}-node-${NODE_ENV}-v1" paths: @@ -214,11 +201,6 @@ cache: - *node-modules-cache -.qa-frontend-node-cache: - cache: - - *node-modules-cache - - *assets-tmp-cache - .assets-compile-cache: cache: - *ruby-gems-cache @@ -306,7 +288,7 @@ - name: postgres:12 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] - name: redis:6.0-alpine - - name: elasticsearch:8.4.1 + - name: elasticsearch:8.5.2 variables: POSTGRES_HOST_AUTH_METHOD: trust PG_VERSION: "12" @@ -378,3 +360,8 @@ docker run --rm --privileged ${QEMU_IMAGE} --install all; fi - docker buildx create --use # creates and set's to active buildkit builder + +.use-kube-context: + before_script: + - export KUBE_CONTEXT="gitlab-org/gitlab:review-apps" + - kubectl config use-context ${KUBE_CONTEXT} diff --git a/.gitlab/ci/notify.gitlab-ci.yml b/.gitlab/ci/notify.gitlab-ci.yml index ae77caa140a..84fb5a55ed1 100644 --- a/.gitlab/ci/notify.gitlab-ci.yml +++ b/.gitlab/ci/notify.gitlab-ci.yml @@ -59,7 +59,9 @@ notify-pipeline-failure: fi - | scripts/generate-failed-pipeline-slack-message.rb -i ${BROKEN_MASTER_INCIDENT_JSON} -f ${FAILED_PIPELINE_SLACK_MESSAGE_FILE}; - curl -X POST -H 'Content-Type: application/json' --data @${FAILED_PIPELINE_SLACK_MESSAGE_FILE} "$CI_SLACK_WEBHOOK_URL"; + curl -X POST -H 'Content-Type: application/json' --data @${FAILED_PIPELINE_SLACK_MESSAGE_FILE} "$CI_SLACK_WEBHOOK_URL" || + scripts/slack ${SLACK_CHANNEL} "☠️ Broken pipeline notification failed! ☠️ See ${CI_JOB_URL}" ci_failing "Failed pipeline reporter" + artifacts: paths: - ${BROKEN_MASTER_INCIDENT_JSON} diff --git a/.gitlab/ci/package-and-test/main.gitlab-ci.yml b/.gitlab/ci/package-and-test/main.gitlab-ci.yml index f0bf79f009d..c53c3b1d32b 100644 --- a/.gitlab/ci/package-and-test/main.gitlab-ci.yml +++ b/.gitlab/ci/package-and-test/main.gitlab-ci.yml @@ -38,23 +38,6 @@ 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" @@ -108,9 +91,42 @@ dont-interrupt-me: trigger-omnibus-env: extends: - - .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 + before_script: + - | + # This is duplicating the function from `scripts/utils.sh` since `.gitlab/ci/package-and-test/main.gitlab-ci.yml` can be included in other projects. + function assets_image_tag() { + local cache_assets_hash_file="cached-assets-hash.txt" + + if [[ -n "${CI_COMMIT_TAG}" ]]; then + echo -n "${CI_COMMIT_REF_NAME}" + elif [[ -f "${cache_assets_hash_file}" ]]; then + echo -n "assets-hash-$(cat ${cache_assets_hash_file} | cut -c1-10)" + else + echo -n "${CI_COMMIT_SHA}" + fi + } + 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 @@ -128,6 +144,7 @@ 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 @@ -426,6 +443,15 @@ ee:jira: - if: $QA_SUITES =~ /Test::Integration::Jira/ - !reference [.rules:test:manual, rules] +ee:integrations: + extends: .qa + variables: + QA_SCENARIO: Test::Integration::Integrations + rules: + - !reference [.rules:test:qa, rules] + - if: $QA_SUITES =~ /Test::Integration::Integrations/ + - !reference [.rules:test:manual, rules] + ee:ldap-no-server: extends: .qa variables: @@ -573,6 +599,16 @@ ee:registry-object-storage-tls: GITLAB_TLS_CERTIFICATE: $QA_GITLAB_TLS_CERTIFICATE GITLAB_QA_OPTS: --omnibus-config registry_object_storage +ee:importers: + extends: .qa + variables: + QA_SCENARIO: Test::Integration::Import + GITLAB_QA_OPTS: --set-feature-flags bulk_import_projects=enabled + rules: + - !reference [.rules:test:qa, rules] + - if: $QA_SUITES =~ /Test::Integration::Import/ + - !reference [.rules:test:manual, rules] + # ========================================== # Post test stage # ========================================== diff --git a/.gitlab/ci/qa.gitlab-ci.yml b/.gitlab/ci/qa.gitlab-ci.yml index 8740a5fe17d..f6668d7864e 100644 --- a/.gitlab/ci/qa.gitlab-ci.yml +++ b/.gitlab/ci/qa.gitlab-ci.yml @@ -74,6 +74,8 @@ 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/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index f4f832b84d0..0e0aeb2954b 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -333,7 +333,7 @@ rspec:deprecations: script: - grep -h -R "keyword" deprecations/ | awk '{$1=$1};1' | sort | uniq -c | sort - grep -R "keyword" deprecations/ | wc - - run_timed_command "bundle exec rubocop --only Lint/LastKeywordArgument --parallel" + - run_timed_command "fail_on_warnings bundle exec rubocop --only Lint/LastKeywordArgument --parallel" artifacts: expire_in: 31d when: always @@ -878,23 +878,28 @@ fail-pipeline-early: script: - fail_pipeline_early -rspec rspec-pg12-rerun-previous-failed-tests: +.base-rspec-pg12-rerun-previous-failed-tests: extends: - - .rspec-base-pg12 - .rails:rules:rerun-previous-failed-tests stage: test needs: ["setup-test-env", "compile-test-assets", "detect-previous-failed-tests"] script: - !reference [.base-script, script] - - rspec_rerun_previous_failed_tests tmp/previous_failed_tests/rspec_failed_files.txt + - rspec_rerun_previous_failed_tests "${PREVIOUS_FAILED_TESTS_FILE}" + +rspec rspec-pg12-rerun-previous-failed-tests: + extends: + - .rspec-base-pg12 + - .base-rspec-pg12-rerun-previous-failed-tests + variables: + PREVIOUS_FAILED_TESTS_FILE: tmp/previous_failed_tests/rspec_failed_files.txt rspec rspec-ee-pg12-rerun-previous-failed-tests: extends: - - "rspec rspec-pg12-rerun-previous-failed-tests" - .rspec-ee-base-pg12 - script: - - !reference [.base-script, script] - - rspec_rerun_previous_failed_tests tmp/previous_failed_tests/rspec_ee_failed_files.txt + - .base-rspec-pg12-rerun-previous-failed-tests + variables: + PREVIOUS_FAILED_TESTS_FILE: tmp/previous_failed_tests/rspec_ee_failed_files.txt # EE: Canonical MR pipelines ################################################## diff --git a/.gitlab/ci/rails/shared.gitlab-ci.yml b/.gitlab/ci/rails/shared.gitlab-ci.yml index d47bac5e433..e282781b7b5 100644 --- a/.gitlab/ci/rails/shared.gitlab-ci.yml +++ b/.gitlab/ci/rails/shared.gitlab-ci.yml @@ -54,10 +54,14 @@ include: RECORD_DEPRECATIONS: "true" GEO_SECONDARY_PROXY: 0 RSPEC_TESTS_FILTER_FILE: "${RSPEC_MATCHING_TESTS_PATH}" + SUCCESSFULLY_RETRIED_TEST_EXIT_CODE: 137 needs: ["setup-test-env", "retrieve-tests-metadata", "compile-test-assets", "detect-tests"] script: - !reference [.base-script, script] - rspec_paralellized_job "--tag ~quarantine --tag ~level:migration" + allow_failure: + # the exit code listed here must match the one defined for the variable SUCCESSFULLY_RETRIED_TEST_EXIT_CODE + exit_codes: 137 .base-artifacts: artifacts: @@ -68,6 +72,7 @@ include: - crystalball/ - deprecations/ - knapsack/ + - query_recorder/ - rspec/ - tmp/capybara/ - log/*.log diff --git a/.gitlab/ci/reports.gitlab-ci.yml b/.gitlab/ci/reports.gitlab-ci.yml index 5fdcdc12fc8..b87e5ad9bba 100644 --- a/.gitlab/ci/reports.gitlab-ci.yml +++ b/.gitlab/ci/reports.gitlab-ci.yml @@ -88,7 +88,7 @@ yarn-audit-dependency_scanning: extends: .default-retry stage: test image: - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/security-products/package-hunter-cli:v1.3.2@sha256:7529deaef9ea21aab56bfb74ae1abbc121311affdb6ece49ce7b1c360f997ca2 + name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/security-products/package-hunter-cli:v1.3.3@sha256:1d3af9a61aa01549a62be17fa655fcf06271ac9e1b1e822c2a7930fa1d4a8a6b entrypoint: [""] variables: HTR_user: '$PACKAGE_HUNTER_USER' diff --git a/.gitlab/ci/review-apps/main.gitlab-ci.yml b/.gitlab/ci/review-apps/main.gitlab-ci.yml index 85c5c7d1b1d..b72afedc3b0 100644 --- a/.gitlab/ci/review-apps/main.gitlab-ci.yml +++ b/.gitlab/ci/review-apps/main.gitlab-ci.yml @@ -34,19 +34,25 @@ review-build-cng-env: - .review:rules:review-build-cng image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}:bundler-2.3 stage: prepare - needs: [] + 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 + variables: + BUILD_ENV: build.env before_script: - source ./scripts/utils.sh - install_gitlab_gem script: - - ruby -r./scripts/trigger-build.rb -e "puts Trigger.variables_for_env_file(Trigger::CNG.new.variables)" > build.env + - 'ruby -r./scripts/trigger-build.rb -e "puts Trigger.variables_for_env_file(Trigger::CNG.new.variables)" > $BUILD_ENV' + - echo "GITLAB_ASSETS_TAG=$(assets_image_tag)" >> $BUILD_ENV - ruby -e 'puts "FULL_RUBY_VERSION=#{RUBY_VERSION}"' >> build.env - - cat build.env + - cat $BUILD_ENV artifacts: reports: - dotenv: build.env + dotenv: $BUILD_ENV paths: - - build.env + - $BUILD_ENV expire_in: 7 days when: always @@ -96,7 +102,7 @@ review-build-cng: name: review/${CI_COMMIT_REF_SLUG}${SCHEDULE_TYPE} # No separator for SCHEDULE_TYPE so it's compatible as before and looks nice without it url: https://gitlab-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN} on_stop: review-stop - auto_stop_in: 48 hours + auto_stop_in: 6 hours review-deploy: extends: @@ -108,6 +114,8 @@ review-deploy: key: "review-deploy-dependencies-charts-${GITLAB_HELM_CHART_REF}-v1" paths: - "gitlab-${GITLAB_HELM_CHART_REF}" + environment: + action: start before_script: - export GITLAB_SHELL_VERSION=$(<GITLAB_SHELL_VERSION) - export GITALY_VERSION=$(<GITALY_SERVER_VERSION) @@ -115,12 +123,13 @@ review-deploy: - echo "${CI_ENVIRONMENT_URL}" > environment_url.txt - echo "QA_GITLAB_URL=${CI_ENVIRONMENT_URL}" > environment.env - *base-before_script + - !reference [".use-kube-context", before_script] script: - run_timed_command "check_kube_domain" - run_timed_command "download_chart" - run_timed_command "deploy" || (display_deployment_debug && exit 1) - - run_timed_command "verify_deploy"|| (display_deployment_debug && exit 1) - - run_timed_command "disable_sign_ups" + - run_timed_command "verify_deploy" || (display_deployment_debug && exit 1) + - run_timed_command "disable_sign_ups" || (display_deployment_debug && exit 1) after_script: # Run seed-dast-test-data.sh only when DAST_RUN is set to true. This is to pupulate review app with data for DAST scan. # Set DAST_RUN to true when jobs are manually scheduled. @@ -128,6 +137,7 @@ review-deploy: artifacts: paths: - environment_url.txt + - curl-logs/ reports: dotenv: environment.env expire_in: 7 days @@ -139,12 +149,15 @@ review-deploy-sample-projects: - .review:rules:review-deploy stage: deploy needs: ["review-deploy"] + environment: + action: prepare before_script: - export GITLAB_SHELL_VERSION=$(<GITLAB_SHELL_VERSION) - export GITALY_VERSION=$(<GITALY_SERVER_VERSION) - export GITLAB_WORKHORSE_VERSION=$(<GITLAB_WORKHORSE_VERSION) - echo "${CI_ENVIRONMENT_URL}" > environment_url.txt - *base-before_script + - !reference [".use-kube-context", before_script] script: - date - create_sample_projects @@ -160,7 +173,9 @@ review-deploy-sample-projects: # See https://gitlab.com/gitlab-org/gitlab/issues/191273 GIT_DEPTH: 1 before_script: - - *base-before_script + - source ./scripts/utils.sh + - source ./scripts/review_apps/review-apps.sh + - !reference [".use-kube-context", before_script] review-delete-deployment: extends: @@ -174,7 +189,7 @@ review-stop: extends: - .review-stop-base - .review:rules:review-stop - resource_group: review/${CI_COMMIT_REF_SLUG}${SCHEDULE_TYPE} # CI_ENVIRONMENT_SLUG is not available here and we want this to be the same as the environment + resource_group: review/${CI_COMMIT_REF_SLUG}${SCHEDULE_TYPE} # CI_ENVIRONMENT_SLUG is not available here and we want this to be the same as the environment stage: deploy needs: [] script: diff --git a/.gitlab/ci/review-apps/qa.gitlab-ci.yml b/.gitlab/ci/review-apps/qa.gitlab-ci.yml index 69ce028987a..d28819208b7 100644 --- a/.gitlab/ci/review-apps/qa.gitlab-ci.yml +++ b/.gitlab/ci/review-apps/qa.gitlab-ci.yml @@ -99,6 +99,7 @@ review-qa-non-blocking: variables: QA_SCENARIO: Test::Instance::ReviewNonBlocking QA_RUN_TYPE: review-qa-non-blocking + when: manual allow_failure: true review-qa-non-blocking-parallel: extends: diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml index 35df4de6513..b6c273aeb99 100644 --- a/.gitlab/ci/review.gitlab-ci.yml +++ b/.gitlab/ci/review.gitlab-ci.yml @@ -6,15 +6,48 @@ review-cleanup: stage: prepare environment: name: review/regular-cleanup - action: stop + action: access before_script: - source scripts/utils.sh - - source scripts/review_apps/gcp_cleanup.sh + - !reference [".use-kube-context", before_script] - install_gitlab_gem - - setup_gcp_dependencies + - setup_gcloud script: - - scripts/review_apps/automated_cleanup.rb - - gcp_cleanup + - scripts/review_apps/automated_cleanup.rb || (scripts/slack review-apps-monitoring "☠️ \`${CI_JOB_NAME}\` failed! ☠️ See ${CI_JOB_URL} - <https://gitlab.com/gitlab-org/quality/engineering-productivity/team/-/blob/main/runbooks/review-apps.md#review-cleanup-job-failed|📗 RUNBOOK 📕>" warning "GitLab Bot" && exit 1); + +.base-review-checks: + extends: + - .default-retry + image: ${REVIEW_APPS_IMAGE} + stage: prepare + before_script: + - source scripts/utils.sh + - setup_gcloud + - !reference [".use-kube-context", before_script] + +review-k8s-resources-count-checks: + extends: + - .base-review-checks + - .review:rules:review-k8s-resources-count-checks + needs: + - job: review-cleanup + optional: true + environment: + name: review/k8s-resources-count-checks + action: verify + script: + - scripts/review_apps/k8s-resources-count-checks.sh || (scripts/slack review-apps-monitoring "☠️ \`${CI_JOB_NAME}\` failed! ☠️ See ${CI_JOB_URL} - <https://gitlab.com/gitlab-org/quality/engineering-productivity/team/-/blob/main/runbooks/review-apps.md#review-k8s-resources-count-checks-job-failed|📗 RUNBOOK 📕>" warning "GitLab Bot" && exit 1); + +review-gcp-quotas-checks: + extends: + - .base-review-checks + - .review:rules:review-gcp-quotas-checks + needs: [] + environment: + name: review/gcp-quotas-checks + action: verify + script: + - ruby scripts/review_apps/gcp-quotas-checks.rb || (scripts/slack review-apps-monitoring "☠️ \`${CI_JOB_NAME}\` failed! ☠️ See ${CI_JOB_URL} - <https://gitlab.com/gitlab-org/quality/engineering-productivity/team/-/blob/main/runbooks/review-apps.md#review-gcp-quotas-checks-job-failed|📗 RUNBOOK 📕>" warning "GitLab Bot" && exit 1); start-review-app-pipeline: extends: @@ -29,6 +62,8 @@ 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/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index c6cfb491e61..8b7aee8de9d 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -38,11 +38,16 @@ # Once https://gitlab.com/gitlab-org/gitlab/-/issues/373904 is implemented, we should be able to change this back to # if: '$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_APPROVALS_COUNT > 0' # or any similar condition to check that the MR has *any* approval (not just required approval). +# +# Temprorarily adding || $CI_MERGE_REQUEST_LABELS =~ /pipeline:run-full-rspec/ for backward compatibility, +# remove once https://gitlab.com/gitlab-org/quality/quality-engineering/team-tasks/-/issues/1557 is fully rolled out .if-merge-request-approved: &if-merge-request-approved - if: '$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_LABELS =~ /pipeline:run-full-rspec/' + if: '$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_LABELS =~ /pipeline:mr-approved/ || $CI_MERGE_REQUEST_LABELS =~ /pipeline:run-full-rspec/' +# Temprorarily adding && $CI_MERGE_REQUEST_LABELS !~ /pipeline:run-full-rspec/ for backward compatibility, +# remove once https://gitlab.com/gitlab-org/quality/quality-engineering/team-tasks/-/issues/1557 is fully rolled out .if-merge-request-not-approved: &if-merge-request-not-approved - if: '$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_LABELS !~ /pipeline:run-full-rspec/' + if: '$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_LABELS !~ /pipeline:mr-approved/ && $CI_MERGE_REQUEST_LABELS !~ /pipeline:run-full-rspec/' .if-automated-merge-request: &if-automated-merge-request if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == "release-tools/update-gitaly" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /stable-ee$/' @@ -83,8 +88,8 @@ .if-merge-request-labels-group-global-search: &if-merge-request-labels-group-global-search if: '$CI_MERGE_REQUEST_LABELS =~ /group::global search/' -.if-merge-request-labels-pipeline-expedite-master-fixing: &if-merge-request-labels-pipeline-expedite-master-fixing - if: '$CI_MERGE_REQUEST_LABELS =~ /master:(foss-)?broken/ && $CI_MERGE_REQUEST_LABELS =~ /pipeline:expedite-master-fixing/' +.if-merge-request-labels-pipeline-expedite: &if-merge-request-labels-pipeline-expedite + if: '$CI_MERGE_REQUEST_LABELS =~ /master:(foss-)?broken/ && $CI_MERGE_REQUEST_LABELS =~ /pipeline:expedite/' .if-merge-request-labels-frontend-and-feature-flag: &if-merge-request-labels-frontend-and-feature-flag if: '$CI_MERGE_REQUEST_LABELS =~ /frontend/ && $CI_MERGE_REQUEST_LABELS =~ /feature flag/' @@ -95,26 +100,26 @@ .if-fork-merge-request: &if-fork-merge-request if: '$CI_PROJECT_NAMESPACE !~ /^gitlab(-org)?($|\/)/ && $CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_LABELS !~ /pipeline:run-all-rspec/' -.if-default-branch-schedule-maintenance: &if-default-branch-schedule-maintenance - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "maintenance"' +.if-schedule-pipeline: &if-schedule-pipeline + if: '$CI_PIPELINE_SOURCE == "schedule"' + +.if-schedule-maintenance: &if-schedule-maintenance + if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "maintenance"' .if-default-branch-schedule-nightly: &if-default-branch-schedule-nightly if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "nightly"' +.if-ruby3-branch-schedule-nightly: &if-ruby3-branch-schedule-nightly + if: '$CI_COMMIT_BRANCH == "ruby3" && $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "nightly"' + .if-security-schedule: &if-security-schedule if: '$CI_PROJECT_NAMESPACE == "gitlab-org/security" && $CI_PIPELINE_SOURCE == "schedule"' .if-dot-com-gitlab-org-schedule: &if-dot-com-gitlab-org-schedule if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org" && $CI_PIPELINE_SOURCE == "schedule"' -.if-dot-com-ee-schedule: &if-dot-com-ee-schedule - if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_PATH == "gitlab-org/gitlab" && $CI_PIPELINE_SOURCE == "schedule"' - -.if-dot-com-ee-schedule-maintenance: &if-dot-com-ee-schedule-maintenance - if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_PATH == "gitlab-org/gitlab" && $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "maintenance"' - -.if-dot-com-ee-schedule-nightly: &if-dot-com-ee-schedule-nightly - if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_PATH == "gitlab-org/gitlab" && $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "nightly"' +.if-dot-com-ee-schedule-default-branch-maintenance: &if-dot-com-ee-schedule-default-branch-maintenance + if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_PATH == "gitlab-org/gitlab" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "maintenance"' .if-dot-com-ee-schedule-nightly-child-pipeline: &if-dot-com-ee-schedule-nightly-child-pipeline if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_PATH == "gitlab-org/gitlab" && $CI_PIPELINE_SOURCE == "parent_pipeline" && $SCHEDULE_TYPE == "nightly"' @@ -192,8 +197,7 @@ - "spec/support/gitlab-git-test.git/**/*" .yaml-lint-patterns: &yaml-lint-patterns - - "*.yml" - - "**/*.yml" + - "**/*.{yml,yaml}{,.*}" .lint-pipeline-yaml-patterns: &lint-pipeline-yaml-patterns - ".gitlab-ci.yml" @@ -315,6 +319,7 @@ - "scripts/rspec_helpers.sh" # Mapped patterns (see tests.yml) - "data/whats_new/*.yml" + - "doc/index.md" .search-backend-patterns: &search-backend-patterns - "{,jh/}Gemfile.lock" @@ -332,6 +337,7 @@ - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/background_migration/**/*" - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/background_migration{,_spec}.rb" - "{,ee/,jh/}spec/support/helpers/database/**/*" + - "{,ee/,jh/}spec/support/helpers/migrations_helpers/**/*" - "lib/gitlab/markdown_cache/active_record/**/*" - "lib/api/admin/batched_background_migrations.rb" - "spec/requests/api/admin/batched_background_migrations_spec.rb" @@ -384,6 +390,7 @@ - ".gitlab/ci/**/*" # Mapped patterns (see tests.yml) - "data/whats_new/*.yml" + - "doc/index.md" # .code-patterns + .backstage-patterns .code-backstage-patterns: &code-backstage-patterns @@ -414,6 +421,7 @@ - "{,spec/}tooling/**/*" # Mapped patterns (see tests.yml) - "data/whats_new/*.yml" + - "doc/index.md" # .code-patterns + .qa-patterns .code-qa-patterns: &code-qa-patterns @@ -440,6 +448,7 @@ - "{,jh/}qa/**/*" # Mapped patterns (see tests.yml) - "data/whats_new/*.yml" + - "doc/index.md" # .code-patterns + .backstage-patterns + .qa-patterns .code-backstage-qa-patterns: &code-backstage-qa-patterns @@ -474,6 +483,7 @@ - "{,jh/}qa/**/*" # Mapped patterns (see tests.yml) - "data/whats_new/*.yml" + - "doc/index.md" # .code-backstage-qa-patterns + .workhorse-patterns # NOTE: `setup-test-env-patterns` intentionally does not include docs files, because this would @@ -496,7 +506,9 @@ - "config.ru" - "{,ee/,jh/}{app,bin,config,db,generator_templates,haml_lint,lib,locale,public,scripts,storybook,symbol,vendor}/**/*" - "doc/api/graphql/reference/*" # Files in this folder are auto-generated + # Mapped patterns (see tests.yml) - "data/whats_new/*.yml" + - "doc/index.md" # CI changes - ".gitlab-ci.yml" - ".gitlab/ci/**/*" @@ -660,7 +672,7 @@ ################ .shared:rules:update-cache: rules: - - <<: *if-default-branch-schedule-maintenance + - <<: *if-schedule-maintenance - <<: *if-security-schedule - <<: *if-merge-request-labels-update-caches @@ -684,6 +696,8 @@ - <<: *if-dot-com-gitlab-org-and-security-merge-request changes: *code-qa-patterns - <<: *if-auto-deploy-branches + variables: + ARCH: amd64,arm64 - <<: *if-default-branch-or-tag variables: ARCH: amd64,arm64 @@ -713,7 +727,7 @@ rules: # That would run for any project that has a "maintenance" pipeline schedule # but in fact, the cache package is only uploaded for gitlab.com/gitlab-org/gitlab and jihulab.com/gitlab-cn/gitlab - - <<: *if-default-branch-schedule-maintenance + - <<: *if-schedule-maintenance - <<: *if-dot-com-gitlab-org-default-branch changes: ["workhorse/**/*"] - <<: *if-dot-com-gitlab-org-merge-request @@ -730,7 +744,7 @@ when: never # That would run for any project that has a "maintenance" pipeline schedule # but in fact, the cache package is only uploaded for gitlab.com/gitlab-org/gitlab and jihulab.com/gitlab-cn/gitlab - - <<: *if-default-branch-schedule-maintenance + - <<: *if-schedule-maintenance - <<: *if-dot-com-gitlab-org-default-branch changes: *assets-compilation-patterns - <<: *if-dot-com-gitlab-org-merge-request @@ -748,7 +762,7 @@ when: never # That would run for any project that has a "maintenance" pipeline schedule # but in fact, the cache package is only uploaded for gitlab.com/gitlab-org/gitlab and jihulab.com/gitlab-cn/gitlab - - <<: *if-default-branch-schedule-maintenance + - <<: *if-schedule-maintenance - <<: *if-dot-com-gitlab-org-merge-request changes: - ".gitlab/ci/caching.gitlab-ci.yml" @@ -800,8 +814,7 @@ .docs:rules:docs-code-quality: rules: - - <<: *if-default-branch-refs - - <<: *if-default-refs + - <<: *if-merge-request changes: *docs-code-quality-patterns .docs:rules:docs-lint: @@ -896,6 +909,7 @@ when: never - <<: *if-merge-request-labels-as-if-foss - <<: *if-merge-request-labels-run-all-rspec + - <<: *if-merge-request-labels-frontend-and-feature-flag - <<: *if-default-refs changes: *code-backstage-qa-patterns - <<: *if-default-refs @@ -926,6 +940,7 @@ - !reference [".strict-ee-only-rules", rules] - !reference [".frontend:rules:default-frontend-jobs-as-if-foss", rules] - <<: *if-merge-request-labels-run-all-jest + - <<: *if-merge-request-labels-frontend-and-feature-flag - <<: *if-merge-request changes: *frontend-patterns-for-as-if-foss @@ -1007,29 +1022,13 @@ rules: - <<: *if-not-ee when: never - - <<: *if-merge-request-labels-pipeline-expedite-master-fixing + - <<: *if-merge-request-labels-pipeline-expedite when: never - <<: *if-merge-request changes: *code-backstage-patterns - <<: *if-default-branch-refs changes: *code-backstage-patterns -.frontend:rules:qa-frontend-node: - rules: - - <<: *if-default-branch-refs - changes: *frontend-dependency-patterns - - <<: *if-merge-request - changes: *frontend-dependency-patterns - -.frontend:rules:qa-frontend-node-latest: - rules: - - <<: *if-default-branch-refs - changes: *frontend-dependency-patterns - allow_failure: true - - <<: *if-merge-request - changes: *frontend-dependency-patterns - allow_failure: true - .frontend:rules:bundle-size-review: rules: - <<: *if-not-canonical-namespace @@ -1066,7 +1065,7 @@ ############### .pages:rules: rules: - - <<: *if-dot-com-ee-schedule-maintenance + - <<: *if-dot-com-ee-schedule-default-branch-maintenance ############ # QA rules # @@ -1116,7 +1115,7 @@ when: never - <<: *if-not-ee when: never - - <<: *if-merge-request-labels-pipeline-expedite-master-fixing + - <<: *if-merge-request-labels-pipeline-expedite when: never - <<: *if-merge-request-targeting-stable-branch allow_failure: true @@ -1549,24 +1548,25 @@ - <<: *if-not-ee when: never - <<: *if-default-branch-schedule-nightly + - <<: *if-ruby3-branch-schedule-nightly - <<: *if-merge-request-labels-run-all-rspec .rails:rules:rspec-coverage: rules: - <<: *if-not-ee when: never - - <<: *if-merge-request-labels-pipeline-expedite-master-fixing + - <<: *if-merge-request-labels-pipeline-expedite when: never - <<: *if-merge-request changes: *code-backstage-patterns - - <<: *if-default-branch-schedule-maintenance + - <<: *if-schedule-maintenance - <<: *if-merge-request-labels-run-all-rspec .rails:rules:rspec-undercoverage: rules: - <<: *if-not-ee when: never - - <<: *if-merge-request-labels-pipeline-expedite-master-fixing + - <<: *if-merge-request-labels-pipeline-expedite when: never - <<: *if-merge-request-labels-skip-undercoverage when: never @@ -1601,7 +1601,7 @@ rules: - <<: *if-not-ee when: never - - <<: *if-merge-request-labels-pipeline-expedite-master-fixing + - <<: *if-merge-request-labels-pipeline-expedite when: never - if: '$SKIP_FLAKY_TESTS_AUTOMATICALLY == "true" || $RETRY_FAILED_TESTS_IN_NEW_PROCESS == "true"' changes: *code-backstage-patterns @@ -1849,7 +1849,7 @@ rules: - if: "$PACKAGE_HUNTER_USER == null || $PACKAGE_HUNTER_USER == ''" when: never - - <<: *if-default-branch-schedule-maintenance + - <<: *if-schedule-maintenance - <<: *if-merge-request changes: ["yarn.lock"] @@ -1857,7 +1857,7 @@ rules: - if: "$PACKAGE_HUNTER_USER == null || $PACKAGE_HUNTER_USER == ''" when: never - - <<: *if-default-branch-schedule-maintenance + - <<: *if-schedule-maintenance - <<: *if-merge-request changes: ["Gemfile.lock"] @@ -1882,37 +1882,39 @@ rules: - <<: *if-not-ee when: never - - <<: *if-merge-request-labels-pipeline-expedite-master-fixing + - <<: *if-merge-request-labels-pipeline-expedite when: never - <<: *if-merge-request-labels-run-review-app - <<: *if-dot-com-gitlab-org-merge-request changes: *ci-review-patterns - when: never + allow_failure: true - <<: *if-dot-com-gitlab-org-merge-request changes: *frontend-build-patterns variables: *review-change-pattern - when: never + allow_failure: true - <<: *if-dot-com-gitlab-org-merge-request changes: *controllers-patterns variables: *review-change-pattern - when: never + when: manual + allow_failure: true - <<: *if-dot-com-gitlab-org-merge-request changes: *models-patterns variables: *review-change-pattern - when: never + when: manual + allow_failure: true - <<: *if-dot-com-gitlab-org-merge-request changes: *lib-gitlab-patterns variables: *review-change-pattern - when: never + when: manual + allow_failure: true - <<: *if-dot-com-gitlab-org-merge-request changes: *qa-patterns - when: never + allow_failure: true - <<: *if-dot-com-gitlab-org-merge-request changes: *code-patterns when: manual allow_failure: true - <<: *if-dot-com-gitlab-org-schedule - when: never allow_failure: true variables: KNAPSACK_GENERATE_REPORT: "true" @@ -1948,7 +1950,7 @@ rules: - <<: *if-not-ee when: never - - <<: *if-merge-request-labels-pipeline-expedite-master-fixing + - <<: *if-merge-request-labels-pipeline-expedite when: never - <<: *if-merge-request-labels-run-review-app when: manual @@ -1984,6 +1986,24 @@ - <<: *if-dot-com-gitlab-org-schedule allow_failure: true +.review:rules:review-k8s-resources-count-checks: + rules: + - <<: *if-dot-com-gitlab-org-schedule + allow_failure: true + - <<: *if-dot-com-gitlab-org-merge-request + changes: + - "scripts/review_apps/k8s-resources-count-checks.sh" + allow_failure: true + +.review:rules:review-gcp-quotas-checks: + rules: + - <<: *if-dot-com-gitlab-org-schedule + allow_failure: true + - <<: *if-dot-com-gitlab-org-merge-request + changes: + - "scripts/review_apps/gcp-quotas-checks.rb" + allow_failure: true + .review:rules:review-stop: rules: - when: manual @@ -2016,6 +2036,8 @@ rules: - <<: *if-default-branch-or-tag allow_failure: true + - <<: *if-schedule-pipeline + allow_failure: true - <<: *if-auto-deploy-branches allow_failure: true - when: manual @@ -2061,7 +2083,7 @@ rules: - <<: *if-not-ee when: never - - <<: *if-dot-com-ee-schedule-maintenance + - <<: *if-dot-com-ee-schedule-default-branch-maintenance - <<: *if-default-refs changes: - ".gitlab/ci/setup.gitlab-ci.yml" @@ -2083,7 +2105,7 @@ rules: - <<: *if-not-ee when: never - - <<: *if-dot-com-ee-schedule-maintenance + - <<: *if-dot-com-ee-schedule-default-branch-maintenance - <<: *if-default-refs changes: - ".gitlab/ci/test-metadata.gitlab-ci.yml" diff --git a/.gitlab/ci/static-analysis.gitlab-ci.yml b/.gitlab/ci/static-analysis.gitlab-ci.yml index 0a310691cd7..6df2c5f403f 100644 --- a/.gitlab/ci/static-analysis.gitlab-ci.yml +++ b/.gitlab/ci/static-analysis.gitlab-ci.yml @@ -22,7 +22,7 @@ update-static-analysis-cache: # Silence cop offenses for rules with "grace period". # This will notify Slack if offenses were silenced. # For the moment we only cache `tmp/rubocop_cache` so we don't need to run all the tasks. - - run_timed_command "bundle exec rake rubocop:check:graceful" + - run_timed_command "fail_on_warnings bundle exec rake rubocop:check:graceful" static-analysis: extends: @@ -132,12 +132,12 @@ rubocop: # We won't notify Slack if offenses were silenced to avoid frequent messages. # Job `update-static-analysis-cache` takes care of Slack notifications every 2 hours. unset CI_SLACK_WEBHOOK_URL - run_timed_command "bundle exec rake rubocop:check:graceful" + run_timed_command "fail_on_warnings bundle exec rake rubocop:check:graceful" else cat "${RSPEC_CHANGED_FILES_PATH}" | ruby -e 'print $stdin.read.split(" ").select { |f| File.exist?(f) }.join(" ")' > "$RUBOCOP_TARGET_FILES" # Skip running RuboCop if there's no target files if [ -s "${RUBOCOP_TARGET_FILES}" ]; then - run_timed_command "bundle exec rubocop --parallel --force-exclusion $(cat ${RUBOCOP_TARGET_FILES})" + run_timed_command "fail_on_warnings bundle exec rubocop --parallel --force-exclusion $(cat ${RUBOCOP_TARGET_FILES})" else echoinfo "Nothing interesting changed for RuboCop. Skipping." fi @@ -177,7 +177,7 @@ feature-flags-usage: script: # We need to disable the cache for this cop since it creates files under tmp/feature_flags/*.used, # the cache would prevent these files from being created. - - run_timed_command "bundle exec rubocop --only Gitlab/MarkUsedFeatureFlags --cache false" + - run_timed_command "fail_on_warnings bundle exec rubocop --only Gitlab/MarkUsedFeatureFlags --cache false" artifacts: expire_in: 31d when: always diff --git a/.gitlab/issue_templates/Broken Master - Flaky.md b/.gitlab/issue_templates/Broken Master - Flaky.md index 6b56845ba8c..bea12615e41 100644 --- a/.gitlab/issue_templates/Broken Master - Flaky.md +++ b/.gitlab/issue_templates/Broken Master - Flaky.md @@ -16,10 +16,13 @@ Please read the below documentations for a workflow of triaging and resolving br <!-- If the pipeline failure is reproducible, provide steps to recreate the issue locally. Please use an ordered list. --> +Please refer to [Flaky tests documentation](https://docs.gitlab.com/ee/development/testing_guide/flaky_tests.html) to +learn more about how to reproduce them. + ### Proposed Resolution <!-- Describe the proposed change to restore master stability. --> Please refer to the [Resolution guidance](https://about.gitlab.com/handbook/engineering/workflow/#resolution-of-broken-master) to learn more about resolution of broken master. -/label ~"failure::flaky-test" ~"Engineering Productivity" ~"priority::2" ~"severity::2" +/label ~"failure::flaky-test" ~"Engineering Productivity" ~"priority::2" ~"severity::3" ~"type::bug" ~"bug::transient" diff --git a/.gitlab/issue_templates/Broken Master - Non-flaky.md b/.gitlab/issue_templates/Broken Master - Non-flaky.md index 97a34aa759d..43e73fc5c5a 100644 --- a/.gitlab/issue_templates/Broken Master - Non-flaky.md +++ b/.gitlab/issue_templates/Broken Master - Non-flaky.md @@ -21,4 +21,4 @@ Please read the below documentations for a workflow of triaging and resolving br Please refer to the [Resolution guidance](https://about.gitlab.com/handbook/engineering/workflow/#resolution-of-broken-master) to learn more about resolution of broken master. -/label ~"master:broken" ~"Engineering Productivity" ~"priority::1" ~"severity::1" +/label ~"master:broken" ~"Engineering Productivity" ~"priority::1" ~"severity::1" ~"type::bug" ~"bug::transient" diff --git a/.gitlab/issue_templates/Doc_cleanup.md b/.gitlab/issue_templates/Doc_cleanup.md index 79cf2662b07..3ea692ed1ac 100644 --- a/.gitlab/issue_templates/Doc_cleanup.md +++ b/.gitlab/issue_templates/Doc_cleanup.md @@ -1,72 +1,38 @@ +/labels ~"documentation" ~"docs-only" ~"documentation" ~"docs::improvement" ~"type::maintenance" ~"maintenance::refactor" ~"Seeking community contributions" ~"quick win" ~"Technical Writing" + <!-- -* Use this issue template for identifying issues to work on in existing documentation, normally identified -* with our [Vale](https://docs.gitlab.com/ee/development/documentation/testing.html#vale) or [markdownlint](https://docs.gitlab.com/ee/development/documentation/testing.html#markdownlint) tools. Much of this identified work is suitable for first-time contributors or +* Use this template for documentation issues identified +* by [Vale](https://docs.gitlab.com/ee/development/documentation/testing.html#vale) +* or [markdownlint](https://docs.gitlab.com/ee/development/documentation/testing.html#markdownlint). +* This template is meant to describe work for first-time contributors or * for work during Hackathons. * -* Normal documentation updates should use the Documentation template, and documentation work as part of -* feature development should use the Feature Request template. +* Feature development work should not use this template. Use the Feature Request template instead. --> -If you are a community contributor, **do not work on the issue if it is not assigned to you yet**. - -Additionally, please review these points before working on this issue: - -1. If you would like to work on the issue, type `@gl-docsteam I would like to work on this issue.` - in a comment. A technical writer will assign the issue to you. If someone has already chosen this issue, - pick another issue, or view docs [in the docs directory](https://gitlab.com/gitlab-org/gitlab/-/tree/master/doc) - and open a merge request for any page you feel can be improved. -1. Carefully review the [merge request guidelines for contributors](https://docs.gitlab.com/ee/development/contributing/merge_request_workflow.html#merge-request-guidelines-for-contributors). -1. Carefully review the [commit message guidelines](https://docs.gitlab.com/ee/development/contributing/merge_request_workflow.html#commit-messages-guidelines). -1. Create a merge request for the issue: - - If you were not assigned the issue, do not create a merge request. It will not be accepted. - - If this is for a Hackathon, do not create the merge request before the Hackathon has started - or it will not be counted towards the Hackathon. - - Unless otherwise stated below, we expect one merge request per issue, so combine - all changes together. If there is too much work for you to handle in one merge request, - you can create more, but try to keep the number of merge requests as small as possible. - - Select the **Documentation** merge request description template, and fill it out - with the details of your work. - - Copy the link to this issue and add it to the merge request's description, - which links the merge request and the issue together. -1. After your merge request is accepted and merged, close this issue. +## Hi community contributors! :wave: -If you notice things you'd like to fix that are not part of the issue, open separate merge requests for those issues. +Do you want to work on this issue? -We're sorry for all the rules but we want everyone to have a good experience, and it can be hard when we get an influx of contributions. +- **If the issue is unassigned**, in a comment, type `@docs-hackathon I would like to work on this issue` and a writer will assign it to you. -Thank you again for contributing to the GitLab documentation! +- **If the issue is assigned to someone already**, choose another issue. Do not open a merge request for this issue if you are not assigned. -## Identified documentation issue +## To resolve the issue -<!-- -* Include information about the issue that needs resolution. If the item is from an automated test, -* be sure to include a copy/paste from the the test results. [This issue](https://gitlab.com/gitlab-org/gitlab/-/issues/339543) is an example of text to include with a Vale issue. -* -* Limit the identified work to be related to one another, and keep it to a reasonable amount. For example, -* several moderate changes on one page, a few intermediate changes across five pages, or several very small -* changes for up to 10 pages. Larger items should be broken out into other issues to better distribute -* the opportunities for contributors. -* -* If you expect the work to take more than one MR to resolve, explain approximately -* how many MRs you expect to receive for the issue. ---> - -## Additional information - -<!-- -* Any concepts, procedures, reference info we could add to make it easier to successfully use GitLab? -* Include use cases, benefits, and/or goals for this work. -* If adding content: What audience is it intended for? (What roles and scenarios?) - For ideas, see personas at https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/ or the persona labels at - https://gitlab.com/groups/gitlab-org/-/labels?subscribed=&search=persona%3A ---> +[Follow these instructions to create a merge request](https://docs.gitlab.com/ee/development/documentation/workflow.html#how-to-update-the-docs). -### Who can address the issue +- Don't submit your merge request until after the Hackathon has started. +- Try to address the issue in a single merge request. +- Try to stick to the scope of the issue. If you see other improvements that can be made in the file, open a separate merge request. +- When you create the merge request, select the **Documentation** merge request description template. +- In the merge request's description, add a link to this issue. +- Follow the [commit message guidelines](https://docs.gitlab.com/ee/development/contributing/merge_request_workflow.html#commit-messages-guidelines). + Use three to five words for your commit message, start with message with a capital letter, and do **not** end it in a period. + Other commit messages can cause the pipeline to fail. -<!-- What if any special expertise is required to resolve this issue? --> +Thank you again for contributing to the GitLab documentation! :tada: -### Other links/references +## Documentation issue -<!-- For example, related GitLab issues/MRs --> -/label ~documentation diff --git a/.gitlab/issue_templates/Feature Flag Roll Out.md b/.gitlab/issue_templates/Feature Flag Roll Out.md index 40ee1c125da..3972368ddc4 100644 --- a/.gitlab/issue_templates/Feature Flag Roll Out.md +++ b/.gitlab/issue_templates/Feature Flag Roll Out.md @@ -66,9 +66,12 @@ _Consider adding links to check for Sentry errors, Production logs for 5xx, 302s ## Rollout Steps +Note: Please make sure to run the chatops commands in the slack channel that gets impacted by the command. + ### Rollout on non-production environments -- Ensure that the feature MRs have been deployed to non-production environments. +- [ ] Verify the MR with the feature flag is merged to master. +- Verify that the feature MRs have been deployed to non-production environments with: - [ ] `/chatops run auto_deploy status <merge-commit-of-your-feature>` - [ ] Enable the feature globally on non-production environments. - [ ] `/chatops run feature set <feature-flag-name> true --dev --staging --staging-ref` @@ -79,13 +82,16 @@ _Consider adding links to check for Sentry errors, Production logs for 5xx, 302s ### Specific rollout on production +For visibility, all `/chatops` commands that target production should be executed in the `#production` slack channel and cross-posted (with the command results) to the responsible team's slack channel (`#g_TEAM_NAME`). + - Ensure that the feature MRs have been deployed to both production and canary. - [ ] `/chatops run auto_deploy status <merge-commit-of-your-feature>` -- If you're using [project-actor](https://docs.gitlab.com/ee/development/feature_flags/#feature-actors), you must enable the feature on these entries: +- Depending on the [type of actor](https://docs.gitlab.com/ee/development/feature_flags/#feature-actors) you are using, pick one of these options: + - If you're using **project-actor**, you must enable the feature on these entries: - [ ] `/chatops run feature set --project=gitlab-org/gitlab,gitlab-org/gitlab-foss,gitlab-com/www-gitlab-com <feature-flag-name> true` -- If you're using [group-actor](https://docs.gitlab.com/ee/development/feature_flags/#feature-actors), you must enable the feature on these entries: + - If you're using **group-actor**, you must enable the feature on these entries: - [ ] `/chatops run feature set --group=gitlab-org,gitlab-com <feature-flag-name> true` -- If you're using [user-actor](https://docs.gitlab.com/ee/development/feature_flags/#feature-actors), you must enable the feature on these entries: + - If you're using **user-actor**, you must enable the feature on these entries: - [ ] `/chatops run feature set --user=<your-username> <feature-flag-name> true` - [ ] Verify that the feature works on the specific entries. Posting the QA result in this issue is preferable. @@ -124,7 +130,7 @@ To do so, follow these steps: - [ ] Create a merge request with the following changes. Ask for review and merge it. - [ ] Set the `default_enabled` attribute in [the feature flag definition](https://docs.gitlab.com/ee/development/feature_flags/#feature-flag-definition-and-validation) to `true`. - - [ ] Create [a changelog entry](https://docs.gitlab.com/ee/development/feature_flags/#changelog). + - [ ] Review [what warrants a changelog entry](https://docs.gitlab.com/ee/development/changelog.html#what-warrants-a-changelog-entry) and decide if [a changelog entry](https://docs.gitlab.com/ee/development/feature_flags/#changelog) is needed. - [ ] Ensure that the default-enabling MR has been included in the release package. If the merge request was deployed before [the monthly release was tagged](https://about.gitlab.com/handbook/engineering/releases/#self-managed-releases-1), the feature can be officially announced in a release blog post. @@ -165,7 +171,7 @@ You can either [create a follow-up issue for Feature Flag Cleanup](https://gitla the feature can be officially announced in a release blog post. - [ ] `/chatops run release check <merge-request-url> <milestone>` - [ ] Close [the feature issue][main-issue] to indicate the feature will be released in the current milestone. -- [ ] If not already done, clean up the feature flag from all environments by running these chatops command in `#production` channel: +- [ ] Clean up the feature flag from all environments by running these chatops command in `#production` channel: - [ ] `/chatops run feature delete <feature-flag-name> --dev --staging --staging-ref --production` - [ ] Close this rollout issue. diff --git a/.gitlab/issue_templates/Geo Replicate a new Git repository type.md b/.gitlab/issue_templates/Geo Replicate a new Git repository type.md index 2348fa5b86f..571b0db0a30 100644 --- a/.gitlab/issue_templates/Geo Replicate a new Git repository type.md +++ b/.gitlab/issue_templates/Geo Replicate a new Git repository type.md @@ -94,11 +94,19 @@ Geo secondary sites have a [Geo tracking database](https://gitlab.com/gitlab-org - [ ] If deviating from the above example, then be sure to order columns according to [our guidelines](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/ordering_table_columns.md). -- [ ] Add the new table to the GitLab Schema defined in [`ee/lib/ee/gitlab/database/gitlab_schemas.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/lib/ee/gitlab/database/gitlab_schemas.yml). - - ```yaml - cool_widget_registry: :gitlab_geo - ``` +- [ ] Add the new table to the [database dictionary](database_dictionary.md) defined in [`ee/db/docs/`](https://gitlab.com/gitlab-org/gitlab/-/tree/master/ee/db/docs): + + ```yaml + table_name: cool_widget_registry + description: Description example + introduced_by_url: Merge request link + milestone: Milestone example + feature_categories: + - Feature category example + classes: + - Class example + gitlab_schema: gitlab_geo + ``` - [ ] Run Geo tracking database migrations: @@ -157,11 +165,19 @@ The Geo primary site needs to checksum every replicable so secondaries can verif - [ ] If deviating from the above example, then be sure to order columns according to [our guidelines](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/ordering_table_columns.md). -- [ ] Add the new table to the GitLab Schema defined in [`lib/gitlab/database/gitlab_schemas.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/database/gitlab_schemas.yml) with the databases they need to be added to. - - ```yaml - cool_widget_states: :gitlab_main - ``` +- [ ] Add the new table to the [database dictionary](database_dictionary.md) defined in [`db/docs/`](https://gitlab.com/gitlab-org/gitlab/-/tree/master/db/docs): + + ```yaml + table_name: cool_widget_states + description: Description example + introduced_by_url: Merge request link + milestone: Milestone example + feature_categories: + - Feature category example + classes: + - Class example + gitlab_schema: gitlab_main + ``` - [ ] Run database migrations: @@ -316,6 +332,15 @@ That's all of the required database changes. true end + override :housekeeping_enabled? + def self.housekeeping_enabled? + # Remove this method if the new Git repository type supports git + # repository housekeeping and the ::CoolWidget#git_garbage_collect_worker_klass + # is implemented. If the data type requires any action to be performed + # before running the housekeeping override the `before_housekeeping` method + # (see `RepositoryReplicatorStrategy#before_housekeeping`) + false + end end end ``` diff --git a/.gitlab/issue_templates/Geo Replicate a new blob type.md b/.gitlab/issue_templates/Geo Replicate a new blob type.md index 2bb8918df60..121dbdf035f 100644 --- a/.gitlab/issue_templates/Geo Replicate a new blob type.md +++ b/.gitlab/issue_templates/Geo Replicate a new blob type.md @@ -94,11 +94,19 @@ Geo secondary sites have a [Geo tracking database](https://gitlab.com/gitlab-org - [ ] If deviating from the above example, then be sure to order columns according to [our guidelines](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/ordering_table_columns.md). -- [ ] Add the new table to the GitLab Schema defined in [`ee/lib/ee/gitlab/database/gitlab_schemas.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/lib/ee/gitlab/database/gitlab_schemas.yml). - - ```yaml - cool_widget_registry: :gitlab_geo - ``` +- [ ] Add the new table to the [database dictionary](database_dictionary.md) defined in [`ee/db/docs/`](https://gitlab.com/gitlab-org/gitlab/-/tree/master/ee/db/docs): + + ```yaml + table_name: cool_widget_registry + description: Description example + introduced_by_url: Merge request link + milestone: Milestone example + feature_categories: + - Feature category example + classes: + - Class example + gitlab_schema: gitlab_geo + ``` - [ ] Run Geo tracking database migrations: @@ -159,11 +167,19 @@ The Geo primary site needs to checksum every replicable so secondaries can verif - [ ] If deviating from the above example, then be sure to order columns according to [our guidelines](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/ordering_table_columns.md). -- [ ] Add the new table to the GitLab Schema defined in [`lib/gitlab/database/gitlab_schemas.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/database/gitlab_schemas.yml) with the databases they need to be added to. - - ```yaml - cool_widget_states: :gitlab_main - ``` +- [ ] Add the new table to the database dictionary defined in [`db/docs/`](https://gitlab.com/gitlab-org/gitlab/-/tree/master/db/docs): + + ```yaml + table_name: cool_widget_states + description: Description example + introduced_by_url: Merge request link + milestone: Milestone example + feature_categories: + - Feature category example + classes: + - Class example + gitlab_schema: gitlab_main + ``` - [ ] Run database migrations: diff --git a/.gitlab/issue_templates/Global Search - bug.md b/.gitlab/issue_templates/Global Search - bug.md new file mode 100644 index 00000000000..2f568fe32bc --- /dev/null +++ b/.gitlab/issue_templates/Global Search - bug.md @@ -0,0 +1,30 @@ +## Summary + +<!-- Summarize the bug encountered concisely. --> + +## Steps to reproduce + +<!-- Describe how one can reproduce the issue - this is very important. Please use an ordered list. --> + +## What is the current *bug* behavior? + +<!-- Describe what actually happens. --> + +## What is the expected *correct* behavior? + +<!-- Describe what you should see instead. --> + +## Relevant logs and/or screenshots + +<!-- Paste any relevant logs - please use code blocks (```) to format console output, logs, and code + as it's tough to read otherwise. --> + +## Possible fixes + +<!-- If you can, link to the line of code that might be responsible for the problem. --> + +<!-- Please add a label for the type of bug as per https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification --> +/label ~"type::bug" +/label ~"group::global search" +/label ~"workflow::solution validation" +/milestone %Backlog
\ No newline at end of file diff --git a/.gitlab/issue_templates/Global Search - feature.md b/.gitlab/issue_templates/Global Search - feature.md new file mode 100644 index 00000000000..ebc4248b7fd --- /dev/null +++ b/.gitlab/issue_templates/Global Search - feature.md @@ -0,0 +1,13 @@ +## Problem to solve + +<!-- What problem do we solve? Try to define the who/what/why of the opportunity as a user story. For example, "As a (who), I want (what), so I can (why/value)." --> + +## Proposal + +<!-- Use this section to explain the feature and how it will work. It can be helpful to add technical details, design proposals, and links to related epics or issues. --> + +<!-- Please add a label for the type of feature as per https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification --> +/label ~"type::feature" +/label ~"group::global search" +/label ~"workflow::solution validation" +/milestone %Backlog
\ No newline at end of file diff --git a/.gitlab/issue_templates/Global Search - maintenance.md b/.gitlab/issue_templates/Global Search - maintenance.md new file mode 100644 index 00000000000..38ce56479f2 --- /dev/null +++ b/.gitlab/issue_templates/Global Search - maintenance.md @@ -0,0 +1,11 @@ +## Background + +## Proposal + +<!-- Use this section to explain the feature and how it will work. It can be helpful to add technical details, design proposals, and links to related epics or issues. --> + +<!-- Please add a label for the type of maintenance as per https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification --> +/label ~"type::maintenance" +/label ~"group::global search" +/label ~"workflow::solution validation" +/milestone %Backlog
\ No newline at end of file diff --git a/.gitlab/issue_templates/Navigation - Left Sidebar Proposals.md b/.gitlab/issue_templates/Navigation Proposals.md index 3939fca44f1..72c8f43cc97 100644 --- a/.gitlab/issue_templates/Navigation - Left Sidebar Proposals.md +++ b/.gitlab/issue_templates/Navigation Proposals.md @@ -6,8 +6,9 @@ ### Checklist -- [ ] If your proposal includes changes to the menu items within the left sidebar, engage the [Foundations Product Manager](https://about.gitlab.com/handbook/product/categories/#foundations-group) for approval. The Foundations DRI will work with UX partners in product design, research, and technical writing, as applicable. +- [ ] Add relevant information to the issue description detailing your proposal, including usage and business drivers. - [ ] Follow the [product development workflow](https://about.gitlab.com/handbook/product-development-flow/#validation-phase-2-problem-validation) validation process to ensure you are solving a well understood problem and that the proposed change is understandable and non-disruptive to users. Navigation-specific research is strongly encouraged. +- [ ] Engage the [Foundations Product Manager](https://about.gitlab.com/handbook/product/categories/#foundations-group) for approval. The Foundations DRI will work with UX partners in product design, research, and technical writing, as applicable. - [ ] Engage the [Foundations](https://about.gitlab.com/handbook/product/categories/#foundations-group) team to ensure your proposal is in alignment with holistic changes happening to the left side bar. - [ ] Consider whether you need to communicate the change somehow, or if you will have an interim period in the UI where your nav item will live in more than one place. diff --git a/.gitlab/issue_templates/Security developer workflow.md b/.gitlab/issue_templates/Security developer workflow.md index daad4c19803..7c6c86f5e78 100644 --- a/.gitlab/issue_templates/Security developer workflow.md +++ b/.gitlab/issue_templates/Security developer workflow.md @@ -10,11 +10,11 @@ Set the title to: `Description of the original issue` - [ ] Read the [security process for developers] if you are not familiar with it. - [ ] Make sure the [issue really needs to follow the security release workflow]. +- [ ] Add a `~severity::x` label to the issue and all associated merge requests. - [ ] **IMPORTANT**: Mark this [issue as linked] to the Security Release Tracking Issue. You can find it [here](https://gitlab.com/gitlab-org/gitlab/-/issues?sort=created_date&state=opened&label_name[]=upcoming+security+release). This issue MUST be linked for the release bot to know that the associated merge requests should be merged for this security release. - Fill out the [Links section](#links): - [ ] Next to **Issue on GitLab**, add a link to the `gitlab-org/gitlab` issue that describes the security vulnerability. -- [ ] Add one of the `~severity::x` labels to the issue and all associated merge requests. - [ ] If this change affects the public interface (public API or UI) of the product, post in the `#support_gitlab-com` Slack channel to explain the impact and discuss a mitigation plan for users that might be affected. If you need Support feedback or approval, reach out in `#spt_managers` Slack channel or mention `@gitlab-com/support/managers`. ## Development @@ -38,6 +38,8 @@ After your merge request has been approved according to our [approval guidelines ## Documentation and final details +- [ ] To avoid release delays, please nominate a developer in a different timezone who will be able to respond to any pipeline or merge failures in your absence `@gitlab-username` +- [ ] Ensure `~severity::x` label is on this issue, all associated issues, and merge requests - [ ] Ensure the [Links section](#links) is completed. - [ ] Add the GitLab [versions](https://gitlab.com/gitlab-org/release/docs/-/blob/master/general/security/developer.md#versions-affected) and editions affected to the [details section](#details) * The Git history of the files affected may help you associate the issue with a [release](https://about.gitlab.com/releases/) diff --git a/.gitlab/issue_templates/UX Theme.md b/.gitlab/issue_templates/UX Theme.md index 2ba60523e20..b015c3d44e6 100644 --- a/.gitlab/issue_templates/UX Theme.md +++ b/.gitlab/issue_templates/UX Theme.md @@ -1,11 +1,11 @@ -<!-- A majority of the work designers do will be on themes in the (Now) Next 1-3 milestone column. These themes are comprised of high-confidence outcomes and validated needs. The UX theme issue is where collaboration should occur, including plans and discussion on subthemes, research, and design feedback. Related issues for design exploration and solution validation should stem from the theme issue. +<!-- A majority of the work designers do will be on themes in the (Now) Next 1-3 milestone column of their UX Roadmap. These themes are comprised of high-confidence outcomes and validated needs. The UX theme issue is where collaboration should occur, including plans and discussion on subthemes, research, and design feedback. Related issues for design exploration and solution validation should stem from the theme issue. One of the advantages of working with UX themes is that it allows us to think and design holistically by designing the theme as a whole as opposed to a single issue at a time trying to piece them together as you go. For more details please refer to this section of the handbook when creating UX Themes: https://about.gitlab.com/handbook/product/ux/product-design/ux-roadmaps/#theme-structure --> -### UX Theme -<!-- A theme is written as a statement that combines the beneficiary, their need, and the expected outcome when the work is delivered. Well-defined statements are concise without sacrificing the substance of the theme so that anyone can understand it at a glance. (For instance; Reduce the effort for security teams to identify and escalate business-critical risks) +<!-- Theme Issue Title {UX Theme: <theme statement here>} --> +<!-- Theme Statement: A theme is written as a statement that combines the beneficiary, their need, and the expected outcome when the work is delivered. Well-defined statements are concise without sacrificing the substance of the theme so that anyone can understand it at a glance. (For instance; Reduce the effort for security teams to identify and escalate business-critical risks) -!!Note: The theme statement is the defacto title that will be used to reference the theme and serve as the theme issue title.!! +!!Note: The theme statement is the defacto title that will be used to reference the theme and serve as the theme issue title.!! It should be something that is easily understood, that quickly communicates the intent of the theme allowing team members to easily understand and recognize the expected work that will be done. --> ---- @@ -21,8 +21,8 @@ One of the advantages of working with UX themes is that it allows us to think an #### Need & Primary JTBD <!-- What is the JTBD and what are the needs related to the beneficiary and theme? -- JTBD = The JTBD statement, for instance, (When I am triaging vulns, I want to address business-critical risks, So I can ensure there is no unattended risk in my orgs assets.) -- Need = Abstracted from the JTBD, for instance, (Identify and escalate business-critical risks detected in my orgs assets.) +- JTBD: The JTBD statement, for instance, (When I am triaging vulns, I want to address business-critical risks, So I can ensure there is no unattended risk in my orgs assets.) +- Need: Abstracted from the JTBD, for instance, (Identify and escalate business-critical risks detected in my orgs assets.) --> - **JTBD:** @@ -44,16 +44,29 @@ One of the advantages of working with UX themes is that it allows us to think an | --- | --- | | [High/Medium/Low] | [research/insight issue](Link) | +### User-stories +<!-- Product designers should work with their PMs to gather up all of the relevant user stories. Look for alignment with the JTBD added above. Overall, the solution you and your team come up with should help to support the user stories. --> -### Subthemes & Requirements -<!-- Subthemes are more granular validated needs, goals, and additional details that the theme encompasses. These are typically reserved for themes in the next (1-3 milestones) column. Subthemes may also consist of existing feature or design issues that exist in GitLab and directly relate to the theme. Subthemes answer “how” we are going to solve the user need while the theme itself answers “what” the need is and “who” will be benefiting from the solution. +- [user-story here] +- [user-story here] +- [user-story here] +- [etc.] -Note: This is not a backlog. If the subthemes can not be delivered in the theme timeframe then the theme is too big and needs to be broken down into multiple themes. --> +### Requirements +<!-- Requirements can be taken from existing features or design issues that were used to build this theme. Any related issues should be linked with this issue in the Feature/solution issues section below. They are more granular validated needs, goals, and additional details that the theme encompasses. These are typically reserved for themes in the next (1-3 milestones) column. Requirements should answer “what” the beneficiary of this theme needs from the solution. -#### Feature/solution subthemes -<!-- Use this table to track feature issues related to this theme (if applicable). Not all themes require subthemes as subthemes are typically discovered while working on the theme itself. Think of subthemes as if they were the result of design breaking down the issue into discrete work items. +Note: This is not a backlog. If the issue can not be delivered in the theme timeframe then the theme is too big and needs to be broken down into multiple themes. --> -Note: if feature issues already exist then you can add them to this table. Keep in mind that subthemes require validation if they are assumptive +The beneficieray needs to be able to: +- [need here] +- [need here] +- [need here] +- [etc.] + +#### Feature/solution issues +<!-- Use this table to track feature issues related to this theme (if applicable). Not all themes require sub-issues as they are typically discovered while working on the theme itself. Think of these issues as if they were the result of breaking down the design into discrete work items. + +Note: if feature issues already exist then you can add them to this table. Keep in mind that these issues will require validation if they are being added to a Theme that's in the Next (1-3 milestones) container and are assumptive. Refer to https://about.gitlab.com/handbook/product/ux/product-designer/#ux-issue-weights for calculating UX weights. --> @@ -64,7 +77,7 @@ Refer to https://about.gitlab.com/handbook/product/ux/product-designer/#ux-issue | [Issue](link) | `0 - 10` | | [Issue](link) | `0 - 10` | -#### Research subthemes +#### Research <!-- Use this table to track UX research related to this theme. This may include, problem validation and/or solution validation activities. --> @@ -73,5 +86,17 @@ Refer to https://about.gitlab.com/handbook/product/ux/product-designer/#ux-issue | [Issue]() | <!--Solution validation, Problem validation, etc., --> | <!-- Planned, In Progress, Complete, etc.,--> | | [Issue]() | <!--Solution validation, Problem validation, etc., --> | <!-- Planned, In Progress, Complete, etc.,--> | +#### Ready for design checklist +The items are self-check suggestions; they could be contributed by designers, product managers or researchers +* [ ] The stated `Problem to solve` has high confidence (derived from research or other data-gathering techniques) +* [ ] Relevant issues, research, and other background information are linked to the Related issues section +* [ ] The stated `Beneficiary` has been defined +* [ ] There is high confidence in the stated `Need & Primary JTBD` (derived from research or other data gathering techniques) +* [ ] The `Expected outcome` has been defined +* [ ] The `Business objective` has been defined +* [ ] The theme `Confidence` has been defined as High +* [ ] `User-stories` have been defined +* [ ] The `Requirements` have been defined and the scope has been agreed upon +* [ ] This UX Theme contains everyhting necessary to complete a design solution and is ready for design /label ~"UX" ~"UX Theme" diff --git a/.gitlab/merge_request_templates/Default.md b/.gitlab/merge_request_templates/Default.md index ecb8505e0df..f670882a72f 100644 --- a/.gitlab/merge_request_templates/Default.md +++ b/.gitlab/merge_request_templates/Default.md @@ -44,3 +44,5 @@ This checklist encourages us to confirm any changes have been analyzed to reduce * [ ] I have evaluated the [MR acceptance checklist](https://docs.gitlab.com/ee/development/code_review.html#acceptance-checklist) for this MR. <!-- template sourced from https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/merge_request_templates/Default.md --> + +/assign me diff --git a/.gitlab/merge_request_templates/Deprecations.md b/.gitlab/merge_request_templates/Deprecations.md index 6a5ee6e74e7..9b84dde72df 100644 --- a/.gitlab/merge_request_templates/Deprecations.md +++ b/.gitlab/merge_request_templates/Deprecations.md @@ -43,6 +43,7 @@ They are frequently updated, and everyone should make sure they are aware of the - [ ] Set yourself as the Assignee, meaning you are the DRI. - [ ] If the deprecation is a [breaking change](https://about.gitlab.com/handbook/product/gitlab-the-product/#breaking-change), add label `breaking change`. - [ ] Follow the process to [create a deprecation YAML file](https://about.gitlab.com/handbook/marketing/blog/release-posts/#creating-a-deprecation-entry). +- [ ] Make sure that the milestone dates are based on the dates in [Product milestone creation](https://about.gitlab.com/handbook/product/milestones/#product-milestone-creation). - [ ] Add reviewers by the 10th. - [ ] When ready to be merged and not later than the 15th, add the `~ready` label and @ message the TW for final review and merge. @@ -73,7 +74,8 @@ yourself as a reviewer if it's not ready for merge yet. - [ ] Title: - Length limit: 7 words (not including articles or prepositions). - Capitalization: ensure the title is [sentence cased](https://design.gitlab.com/content/punctuation#case). - - Rewrite to exclude the words `deprecation`, `deprecate`, `removal`, and `remove` if necessary. +- [ ] Dates: + - Make sure that the milestone dates are based on the dates in [Product milestone creation](https://about.gitlab.com/handbook/product/milestones/#product-milestone-creation). - [ ] Consistency: - Ensure that all resources (docs, deprecation, etc.) refer to the feature with the same term / feature name. - [ ] Content: diff --git a/.gitlab/merge_request_templates/New Version of gitlab-styles.md b/.gitlab/merge_request_templates/New Version of gitlab-styles.md new file mode 100644 index 00000000000..e6cde691e19 --- /dev/null +++ b/.gitlab/merge_request_templates/New Version of gitlab-styles.md @@ -0,0 +1,45 @@ +<!-- Title suggestion: Upgrade `gilab-styles` to <VERSION X.Y.Z> - dry-run --> + +## What does this MR do and why? + +Validating upcoming release of `gitlab-styles` <VERSION X.Y.Z>. See <LINK TO RELEASE MR>. + +This MR can be reused to upgrade `gitlab-styles` in this project after a new version of `gitlab-styles` is released. +### Checklist + +- [ ] Verify upcoming release of `gitlab-styles` + - [ ] Point to "Release" MR of `gitlab-styles` in `Gemfile` + - For example, `gem 'gitlab-styles', '~> 9.1.0', require: false, git: 'https://gitlab.com/gitlab-org/ruby/gems/gitlab-styles.git', ref: 'ddieulivol-upgrade_to_9.1.0'` + - [ ] Update [bundler's checksum file](https://docs.gitlab.com/ee/development/gemfile.html#updating-the-checksum-file) via `bundle exec bundler-checksum init` + - [ ] `rubocop` job + - [ ] Inspect any warnings/errors + - [ ] (Optional) [Generate TODOs](https://docs.gitlab.com/ee/development/contributing/style_guides.html#resolving-rubocop-exceptions) for pending offenses + - [ ] Put :new: cop rules (or if configuration is changed) in "grace period". See [docs](https://docs.gitlab.com/ee/development/contributing/style_guides.html#enabling-a-new-cop). + - [ ] (Optional) Remove any offenses for disabled cops + - Use `grep --perl-regexp -o ":\d+\d+: \w: \[\S+\] ([\w/]+)" raw_job_output.log | awk '{print $4}' | sort | uniq -c` to get a list of cop rules with offenses. Where `raw_job_output.log` is the raw output of the `rubocop` job + - [ ] Ignore offenses related to temporary changes in `Gemfile` + - [ ] (Optional) Autocorrect offenses + - [ ] Compare the total runtime of `rubocop --parallel` scan with previous runs + - [ ] Make sure CI passes :green_heart: + - [ ] Don't merge this MR yet! + - [ ] Wait for `gitlab-styles` to be released +- [ ] Upgrade released version of `gitlab-styles` + - [ ] Make sure release is complete + - [ ] Rephrase the title and MR description to match final upgrade + - [ ] Point to released version in `Gemfile` + - [ ] `gem 'gitlab-styles', '~> 9.1.0', require: false` + - [ ] Update [bundler's checksum file](https://docs.gitlab.com/ee/development/gemfile.html#updating-the-checksum-file) via `bundle exec bundler-checksum init` + - [ ] (Optional) Regenerate TODOs for new/changed cop rules + - [ ] Make sure CI passes :green_heart: + - [ ] Let the MR being reviewed again and merged + - [ ] Make sure CI passes :green_heart: + - [ ] Let the MR being reviewed again and merged + - [ ] (Optional) Refine this [MR template](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/merge_request_templates/New%20Version%20of%20gitlab-styles.md). + +## MR acceptance checklist + +This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability. + +* [ ] I have evaluated the [MR acceptance checklist](https://docs.gitlab.com/ee/development/code_review.html#acceptance-checklist) for this MR. + +/label ~"type::maintenance" ~"maintenance::dependency" ~backend ~"Engineering Productivity" ~"static code analysis" diff --git a/.gitlab/merge_request_templates/Removals.md b/.gitlab/merge_request_templates/Removals.md index 6f31f3cefd2..f616df56480 100644 --- a/.gitlab/merge_request_templates/Removals.md +++ b/.gitlab/merge_request_templates/Removals.md @@ -46,6 +46,7 @@ Please review: - [ ] Set yourself as the Assignee, meaning you are the DRI. - [ ] If the removal is a [breaking change](https://about.gitlab.com/handbook/product/gitlab-the-product/#breaking-change), add label `breaking change`. - [ ] Follow the process to [create a removal YAML file](https://about.gitlab.com/handbook/marketing/blog/release-posts/#creating-a-removal-entry). +- [ ] Make sure that the milestone dates are based on the dates in [Product milestone creation](https://about.gitlab.com/handbook/product/milestones/#product-milestone-creation). - [ ] Add reviewers by the 10th. - [ ] When ready to be merged and not later than the 15th, add the ~ready label and @ message the TW for final review and merge. - Removal notices should not be merged before the code is removed from the product. Do not mark ~ready until the removal is complete, or you are certain it will be completed within the current milestone and released. If PMs are not sure, they should confirm with their Engineering Manager. @@ -78,7 +79,8 @@ yourself as a reviewer if it's not yet ready for merge. - [ ] Title: - Length limit: 7 words (not including articles or prepositions). - Capitalization: ensure the title is [sentence cased](https://design.gitlab.com/content/punctuation#case). - - Rewrite to exclude the words `removal` and `remove` if necessary. +- [ ] Dates: + - Make sure that the milestone dates are based on the dates in [Product milestone creation](https://about.gitlab.com/handbook/product/milestones/#product-milestone-creation). - [ ] Consistency: - Ensure that all resources (docs, removal, etc.) refer to the feature with the same term / feature name. - [ ] Content: diff --git a/.gitlab/merge_request_templates/Revert To Resolve Incident.md b/.gitlab/merge_request_templates/Revert To Resolve Incident.md new file mode 100644 index 00000000000..17ff239bbd4 --- /dev/null +++ b/.gitlab/merge_request_templates/Revert To Resolve Incident.md @@ -0,0 +1,14 @@ +## Purpose of Revert + +<!-- Please link to the relevant incident --> + +### Check-list + +- [ ] Create an issue to reinstate the merge request and assign it to the author of the reverted merge request. +- [ ] If the revert is to resolve a ['broken master' incident](https://about.gitlab.com/handbook/engineering/workflow/#broken-master), please read through the [Responsibilities of the Broken 'Master' resolution DRI](https://about.gitlab.com/handbook/engineering/workflow/#responsibilities-of-the-resolution-dri) +- [ ] Add the appropriate labels **before** the MR is created (we can only skip CI/CD jobs if the labels are added **before** the CI/CD pipeline gets created) + +/label ~"pipeline:expedite" ~"master:broken" + +<!-- If applicable, specifying the regression label in the current milestone will skip additional CI/CD jobs (e.g. Danger changelog checks) --> +<!-- /label ~regression: --> diff --git a/.gitlab/merge_request_templates/Security Release.md b/.gitlab/merge_request_templates/Security Release.md index 14130ca42c2..334bcb16023 100644 --- a/.gitlab/merge_request_templates/Security Release.md +++ b/.gitlab/merge_request_templates/Security Release.md @@ -25,6 +25,7 @@ See [the general developer security release guidelines](https://gitlab.com/gitla - [ ] For a backport MR targeting a versioned stable branch (`X-Y-stable-ee`). - [ ] Milestone is set to the version this backport applies to. A closed milestone can be assigned via [quick actions]. - [ ] Ensure it's approved by a maintainer. +- [ ] Ensure this merge request and the related security issue have a `~severity::x` label **Note:** Reviewer/maintainer should not be a Release Manager. @@ -32,6 +33,7 @@ See [the general developer security release guidelines](https://gitlab.com/gitla - [ ] Correct milestone is applied and the title is matching across all backports. - [ ] Assigned (_not_ as reviewer) to `@gitlab-release-tools-bot` with passing CI pipelines. +- [ ] Correct `~severity::x` label is applied to this merge request and the related security issue. /label ~security |