diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /.gitlab | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) | |
download | gitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to '.gitlab')
24 files changed, 551 insertions, 300 deletions
diff --git a/.gitlab/CODEOWNERS b/.gitlab/CODEOWNERS index b3efa7c61e4..c6d0ac6b69a 100644 --- a/.gitlab/CODEOWNERS +++ b/.gitlab/CODEOWNERS @@ -28,6 +28,9 @@ GITALY_SERVER_VERSION @project_278964_bot6 @gitlab-org/maintainers/rails-backend /doc/.vale/ @marcel.amirault @eread @aqualls @gitlab-org/tw-leadership /lib/tasks/gitlab/tw/codeowners.rake @aqualls @gitlab-org/tw-leadership +^[Source code editing] +.solargraph.yml.example @igor.drozdov + ^[Backend] *.rb @gitlab-org/maintainers/rails-backend *.rake @gitlab-org/maintainers/rails-backend @@ -438,7 +441,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/administration/environment_variables.md @axil /doc/administration/external_pipeline_validation.md @marcel.amirault /doc/administration/feature_flags.md @axil -/doc/administration/file_hooks.md @aqualls +/doc/administration/file_hooks.md @ashrafkhamis /doc/administration/geo/ @axil /doc/administration/geo/disaster_recovery/ @axil /doc/administration/geo/disaster_recovery/runbooks/ @axil @@ -472,7 +475,9 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/administration/monitoring/gitlab_self_monitoring_project/ @msedlakjakubowski /doc/administration/monitoring/ip_allowlist.md @jglassman1 /doc/administration/monitoring/performance/ @msedlakjakubowski +/doc/administration/monitoring/performance/performance_bar.md @jglassman1 /doc/administration/monitoring/prometheus/ @msedlakjakubowski +/doc/administration/monitoring/prometheus/gitlab_exporter.md @jglassman1 /doc/administration/monitoring/prometheus/index.md @axil /doc/administration/monitoring/prometheus/web_exporter.md @jglassman1 /doc/administration/nfs.md @axil @@ -485,6 +490,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/administration/pages/ @ashrafkhamis /doc/administration/polling.md @axil /doc/administration/postgresql/ @aqualls +/doc/administration/postgresql/multiple_databases.md @jglassman1 /doc/administration/raketasks/ @axil /doc/administration/raketasks/ldap.md @jglassman1 /doc/administration/raketasks/praefect.md @eread @@ -502,7 +508,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/administration/sidekiq/ @axil /doc/administration/sidekiq/sidekiq_memory_killer.md @jglassman1 /doc/administration/smime_signing_email.md @axil -/doc/administration/snippets/ @ashrafkhamis +/doc/administration/snippets/ @aqualls /doc/administration/static_objects_external_storage.md @ashrafkhamis /doc/administration/system_hooks.md @ashrafkhamis /doc/administration/terraform_state.md @phillipwells @@ -543,7 +549,6 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/api/error_tracking.md @msedlakjakubowski /doc/api/events.md @eread /doc/api/experiments.md @phillipwells -/doc/api/feature_flag_specs.md @rdickenson /doc/api/feature_flag_user_lists.md @rdickenson /doc/api/feature_flags.md @rdickenson /doc/api/features.md @rdickenson @@ -624,11 +629,11 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/api/project_level_variables.md @marcel.amirault /doc/api/project_relations_export.md @eread /doc/api/project_repository_storage_moves.md @eread -/doc/api/project_snippets.md @ashrafkhamis +/doc/api/project_snippets.md @aqualls /doc/api/project_statistics.md @aqualls /doc/api/project_templates.md @aqualls /doc/api/project_vulnerabilities.md @aqualls -/doc/api/projects.md @msedlakjakubowski +/doc/api/projects.md @lciutacu /doc/api/protected_branches.md @aqualls /doc/api/protected_environments.md @rdickenson /doc/api/protected_tags.md @aqualls @@ -650,8 +655,8 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/api/secure_files.md @marcel.amirault /doc/api/settings.md @jglassman1 /doc/api/sidekiq_metrics.md @axil -/doc/api/snippet_repository_storage_moves.md @ashrafkhamis -/doc/api/snippets.md @ashrafkhamis +/doc/api/snippet_repository_storage_moves.md @aqualls +/doc/api/snippets.md @aqualls /doc/api/statistics.md @jglassman1 /doc/api/status_checks.md @eread /doc/api/suggestions.md @aqualls @@ -673,7 +678,6 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/api/wikis.md @ashrafkhamis /doc/architecture/blueprints/database/scalability/patterns/ @aqualls /doc/architecture/blueprints/database_scaling/ @aqualls -/doc/architecture/blueprints/runner_tokens/ @fneill /doc/ci/ @marcel.amirault /doc/ci/caching/ @marcel.amirault /doc/ci/chatops/ @phillipwells @@ -762,10 +766,11 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/development/gitaly.md @eread /doc/development/gitlab_flavored_markdown/ @ashrafkhamis /doc/development/gitlab_flavored_markdown/specification_guide/ @ashrafkhamis +/doc/development/gitlab_shell/ @aqualls /doc/development/graphql_guide/ @ashrafkhamis /doc/development/graphql_guide/batchloader.md @aqualls /doc/development/i18n/ @eread -/doc/development/image_scaling.md @jglassman1 +/doc/development/image_scaling.md @lciutacu /doc/development/import_export.md @eread /doc/development/index.md @sselhorn /doc/development/integrations/codesandbox.md @sselhorn @@ -783,6 +788,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/development/logging.md @msedlakjakubowski /doc/development/maintenance_mode.md @axil /doc/development/merge_request_concepts/ @aqualls +/doc/development/merge_request_diffs.md @aqualls /doc/development/omnibus.md @axil /doc/development/packages/ @claytoncornell /doc/development/pages/ @ashrafkhamis @@ -792,6 +798,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/development/project_templates.md @lciutacu /doc/development/prometheus_metrics.md @msedlakjakubowski /doc/development/real_time.md @msedlakjakubowski +/doc/development/rubocop_development_guide.md @sselhorn /doc/development/sec/ @rdickenson /doc/development/sec/security_report_ingestion_overview.md @claytoncornell /doc/development/secure_coding_guidelines.md @sselhorn @@ -825,6 +832,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/integration/datadog.md @ashrafkhamis /doc/integration/external-issue-tracker.md @ashrafkhamis /doc/integration/gitpod.md @ashrafkhamis +/doc/integration/glab/ @aqualls /doc/integration/gmail_action_buttons_for_gitlab.md @ashrafkhamis /doc/integration/index.md @ashrafkhamis /doc/integration/jenkins.md @ashrafkhamis @@ -864,22 +872,21 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/topics/plan_and_track.md @msedlakjakubowski /doc/tutorials/ @kpaizee /doc/update/ @axil -/doc/update/mysql_to_postgresql.md @aqualls +/doc/update/background_migrations.md @aqualls /doc/update/package/ @axil -/doc/update/upgrading_postgresql_using_slony.md @aqualls /doc/user/admin_area/analytics/ @lciutacu /doc/user/admin_area/broadcast_messages.md @phillipwells /doc/user/admin_area/credentials_inventory.md @jglassman1 /doc/user/admin_area/custom_project_templates.md @eread /doc/user/admin_area/diff_limits.md @aqualls +/doc/user/admin_area/external_users.md @jglassman1 /doc/user/admin_area/geo_sites.md @axil /doc/user/admin_area/labels.md @msedlakjakubowski /doc/user/admin_area/license.md @fneill /doc/user/admin_area/license_file.md @fneill /doc/user/admin_area/merge_requests_approvals.md @aqualls /doc/user/admin_area/moderate_users.md @jglassman1 -/doc/user/admin_area/monitoring/background_migrations.md @aqualls -/doc/user/admin_area/monitoring/health_check.md @msedlakjakubowski +/doc/user/admin_area/monitoring/ @msedlakjakubowski /doc/user/admin_area/reporting/git_abuse_rate_limit.md @phillipwells /doc/user/admin_area/reporting/spamcheck.md @axil /doc/user/admin_area/review_abuse_reports.md @jglassman1 @@ -902,6 +909,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/admin_area/settings/rate_limit_on_notes_creation.md @msedlakjakubowski /doc/user/admin_area/settings/rate_limit_on_pipelines_creation.md @marcel.amirault /doc/user/admin_area/settings/rate_limit_on_users_api.md @jglassman1 +/doc/user/admin_area/settings/terraform_limits.md @phillipwells /doc/user/admin_area/settings/third_party_offers.md @lciutacu /doc/user/admin_area/settings/usage_statistics.md @claytoncornell /doc/user/admin_area/settings/visibility_and_access_controls.md @aqualls @@ -958,8 +966,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/group/repositories_analytics/ @marcel.amirault /doc/user/group/roadmap/ @msedlakjakubowski /doc/user/group/saml_sso/ @jglassman1 -/doc/user/group/settings/group_access_tokens.md @jglassman1 -/doc/user/group/settings/import_export.md @eread +/doc/user/group/settings/ @jglassman1 /doc/user/group/subgroups/ @lciutacu /doc/user/group/value_stream_analytics/ @lciutacu /doc/user/infrastructure/ @phillipwells @@ -970,8 +977,10 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/infrastructure/clusters/manage/management_project_applications/ @phillipwells /doc/user/infrastructure/clusters/manage/management_project_applications/runner.md @fneill /doc/user/infrastructure/iac/ @phillipwells -/doc/user/markdown.md @aqualls +/doc/user/markdown.md @msedlakjakubowski /doc/user/namespace/ @lciutacu +/doc/user/okrs.md @msedlakjakubowski +/doc/user/operations_dashboard/ @rdickenson /doc/user/packages/ @claytoncornell /doc/user/packages/composer_repository/ @claytoncornell /doc/user/packages/conan_repository/ @claytoncornell @@ -980,6 +989,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/packages/dependency_proxy/ @claytoncornell /doc/user/packages/generic_packages/ @claytoncornell /doc/user/packages/go_proxy/ @claytoncornell +/doc/user/packages/gradle_repository/ @claytoncornell /doc/user/packages/harbor_container_registry/ @claytoncornell /doc/user/packages/helm_repository/ @claytoncornell /doc/user/packages/infrastructure_registry/ @claytoncornell @@ -991,7 +1001,9 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/packages/rubygems_registry/ @claytoncornell /doc/user/packages/terraform_module_registry/ @claytoncornell /doc/user/packages/workflows/ @claytoncornell +/doc/user/packages/yarn_repository/ @claytoncornell /doc/user/permissions.md @jglassman1 +/doc/user/product_analytics/ @lciutacu /doc/user/profile/ @jglassman1 /doc/user/profile/account/ @jglassman1 /doc/user/profile/contributions_calendar.md @lciutacu @@ -1036,6 +1048,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/project/repository/managing_large_repositories.md @axil /doc/user/project/repository/mirror/ @aqualls /doc/user/project/repository/reducing_the_repo_size_using_git.md @eread +/doc/user/project/repository/ssh_signed_commits/ @aqualls /doc/user/project/repository/web_editor.md @ashrafkhamis /doc/user/project/repository/x509_signed_commits/ @aqualls /doc/user/project/requirements/ @msedlakjakubowski @@ -1046,13 +1059,16 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/project/settings/project_access_tokens.md @jglassman1 /doc/user/project/time_tracking.md @msedlakjakubowski /doc/user/project/web_ide/ @ashrafkhamis +/doc/user/project/web_ide_beta/ @ashrafkhamis /doc/user/project/wiki/ @ashrafkhamis /doc/user/project/working_with_projects.md @lciutacu /doc/user/public_access.md @lciutacu +/doc/user/read_only_namespaces.md @phillipwells +/doc/user/report_abuse.md @phillipwells /doc/user/reserved_names.md @lciutacu /doc/user/search/ @ashrafkhamis /doc/user/shortcuts.md @ashrafkhamis -/doc/user/snippets.md @ashrafkhamis +/doc/user/snippets.md @aqualls /doc/user/ssh.md @jglassman1 /doc/user/tasks.md @msedlakjakubowski /doc/user/todos.md @msedlakjakubowski @@ -1422,12 +1438,11 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /**/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_variable_list/ @gitlab-org/ci-cd/verify/frontend /app/assets/javascripts/ci/pipeline_schedules/ @gitlab-org/ci-cd/verify/frontend /ee/app/assets/javascripts/ci/ @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 +/ee/app/assets/javascripts/usage_quotas/pipelines/ @gitlab-org/ci-cd/verify/frontend @fulfillment-group/utilization-group/fe [Manage::Workspace] lib/api/entities/basic_project_details.rb @gitlab-org/manage/manage-workspace/backend-approvers @@ -1502,3 +1517,8 @@ ee/lib/ee/api/entities/project.rb @gitlab-org/manage/manage-workspace/backend-ap /ee/lib/ee/gitlab/audit/ @gitlab-org/govern/compliance /lib/gitlab/audit/auditor.rb @gitlab-org/govern/compliance /lib/gitlab/audit_json_logger.rb @gitlab-org/govern/compliance + +[Fulfillment::Utilization] +/ee/app/assets/javascripts/usage_quotas/components/ @fulfillment-group/utilization-group/fe +/ee/app/assets/javascripts/usage_quotas/seats/ @fulfillment-group/utilization-group/fe +/ee/app/assets/javascripts/usage_quotas/storage/ @fulfillment-group/utilization-group/fe diff --git a/.gitlab/ci/build-images.gitlab-ci.yml b/.gitlab/ci/build-images.gitlab-ci.yml index 09ffc87f087..05748cff266 100644 --- a/.gitlab/ci/build-images.gitlab-ci.yml +++ b/.gitlab/ci/build-images.gitlab-ci.yml @@ -23,6 +23,11 @@ build-qa-image: script: - run_timed_command "scripts/build_qa_image" +build-qa-image as-if-foss: + extends: + - build-qa-image + - .as-if-foss + build-assets-image: extends: - .base-image-build diff --git a/.gitlab/ci/docs.gitlab-ci.yml b/.gitlab/ci/docs.gitlab-ci.yml index 18954e7b8e0..02fc58f8580 100644 --- a/.gitlab/ci/docs.gitlab-ci.yml +++ b/.gitlab/ci/docs.gitlab-ci.yml @@ -70,21 +70,22 @@ docs-lint markdown: script: - scripts/lint-doc.sh -docs-code-quality: +docs code_quality: extends: - - .docs:rules:docs-code-quality + - .reports:rules:code_quality - .docs-markdown-lint-image stage: lint needs: [] + dependencies: [] allow_failure: true script: - - scripts/lint-doc-quality.sh + - vale --output=doc/.vale/vale-json.tmpl --minAlertLevel warning doc > gl-code-quality-report-docs.json || exit_code=$? artifacts: reports: codequality: gl-code-quality-report-docs.json paths: - gl-code-quality-report-docs.json - expire_in: 1 week + expire_in: 2 weeks when: always ui-docs-links lint: diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index cde023c149a..0c9cdc28136 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -204,15 +204,15 @@ jest: junit: junit_jest.xml parallel: 5 -jest minimal: +jest predictive: extends: - jest - - .frontend:rules:jest:minimal + - .frontend:rules:jest:predictive needs: - !reference [jest, needs] - "detect-tests" script: - - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]]; then run_timed_command "yarn jest:ci:minimal"; fi + - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then run_timed_command "yarn jest:ci:predictive"; fi jest as-if-foss: extends: @@ -222,16 +222,16 @@ jest as-if-foss: needs: ["rspec-all frontend_fixture as-if-foss"] parallel: 2 -jest minimal as-if-foss: +jest predictive as-if-foss: extends: - .jest-base - - .frontend:rules:jest:minimal:as-if-foss + - .frontend:rules:jest:predictive:as-if-foss - .as-if-foss needs: - "rspec-all frontend_fixture as-if-foss" - "detect-tests" script: - - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]]; then run_timed_command "yarn jest:ci:minimal"; fi + - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then run_timed_command "yarn jest:ci:predictive"; fi jest-integration: extends: @@ -252,7 +252,7 @@ coverage-frontend: needs: - job: "jest" optional: true - - job: "jest minimal" + - job: "jest predictive" optional: true stage: post-test script: diff --git a/.gitlab/ci/global.gitlab-ci.yml b/.gitlab/ci/global.gitlab-ci.yml index 5e35ae6aff3..90f00c887f7 100644 --- a/.gitlab/ci/global.gitlab-ci.yml +++ b/.gitlab/ci/global.gitlab-ci.yml @@ -288,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.5.2 + - name: elasticsearch:8.5.3 variables: POSTGRES_HOST_AUTH_METHOD: trust PG_VERSION: "12" @@ -350,7 +350,7 @@ variables: QEMU_IMAGE: tonistiigi/binfmt:qemu-v7.0.0 before_script: - - source scripts/utils.sh + - !reference [.default-utils-before_script, before_script] - echo "$CI_REGISTRY_PASSWORD" | docker login "$CI_REGISTRY" -u "$CI_REGISTRY_USER" --password-stdin - | if [[ "${ARCH}" =~ arm64 ]]; then diff --git a/.gitlab/ci/package-and-test/main.gitlab-ci.yml b/.gitlab/ci/package-and-test/main.gitlab-ci.yml index c53c3b1d32b..48059d9518f 100644 --- a/.gitlab/ci/package-and-test/main.gitlab-ci.yml +++ b/.gitlab/ci/package-and-test/main.gitlab-ci.yml @@ -7,7 +7,7 @@ include: - local: .gitlab/ci/package-and-test/rules.gitlab-ci.yml - local: .gitlab/ci/package-and-test/variables.gitlab-ci.yml - project: gitlab-org/quality/pipeline-common - ref: 1.7.0 + ref: 1.14.1 file: - /ci/base.gitlab-ci.yml - /ci/allure-report.yml @@ -396,13 +396,13 @@ ee:update-major: - if: $QA_SUITES =~ /Test::Instance::Smoke/ - !reference [.rules:test:manual, rules] -ee:gitab-pages: +ee:gitlab-pages: extends: .qa variables: QA_SCENARIO: Test::Integration::GitlabPages rules: - !reference [.rules:test:qa, rules] - - if: $QA_SUITES =~ /Test::Integration::GitlabPages/ + - if: $QA_SUITES =~ /Test::Instance::GitlabPages/ - !reference [.rules:test:manual, rules] ee:gitaly-cluster: @@ -440,7 +440,7 @@ ee:jira: JIRA_ADMIN_PASSWORD: $QA_JIRA_ADMIN_PASSWORD rules: - !reference [.rules:test:qa, rules] - - if: $QA_SUITES =~ /Test::Integration::Jira/ + - if: $QA_SUITES =~ /Test::Instance::Jira/ - !reference [.rules:test:manual, rules] ee:integrations: @@ -557,7 +557,7 @@ ee:cloud-activation: QA_RSPEC_TAGS: --tag cloud_activation rules: - !reference [.rules:test:qa, rules] - - if: $QA_SUITES =~ /Test::Integration::CloudActivation/ + - if: $QA_SUITES =~ /Test::Instance::CloudActivation/ - !reference [.rules:test:manual, rules] ee:large-setup: @@ -603,6 +603,7 @@ ee:importers: extends: .qa variables: QA_SCENARIO: Test::Integration::Import + QA_MOCK_GITHUB: "true" GITLAB_QA_OPTS: --set-feature-flags bulk_import_projects=enabled rules: - !reference [.rules:test:qa, rules] diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index 0e0aeb2954b..df3b3704a52 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -71,13 +71,27 @@ rspec migration pg12: extends: - .rspec-base-pg12 - .rspec-base-migration + - .rails:rules:ee-and-foss-migration - .rspec-migration-parallel -rspec migration pg12 minimal: +rspec migration pg12 predictive: extends: - rspec migration pg12 - - .minimal-rspec-tests - - .rails:rules:ee-and-foss-migration:minimal + - .predictive-rspec-tests + - .rails:rules:ee-and-foss-migration:predictive + +rspec background_migration pg12: + extends: + - .rspec-base-pg12 + - .rspec-base-migration + - .rails:rules:ee-and-foss-background-migration + - .rspec-background-migration-parallel + +rspec background_migration pg12 predictive: + extends: + - rspec background_migration pg12 + - .predictive-rspec-tests + - .rails:rules:ee-and-foss-background-migration:predictive rspec migration pg12 single-db: extends: @@ -85,23 +99,35 @@ rspec migration pg12 single-db: - .single-db-rspec - .rails:rules:single-db +rspec background_migration pg12 single-db: + extends: + - rspec background_migration pg12 + - .single-db-rspec + - .rails:rules:single-db + rspec migration pg12 praefect: extends: - rspec migration pg12 - .praefect-with-db - .rails:rules:praefect-with-db +rspec background_migration pg12 praefect: + extends: + - rspec background_migration pg12 + - .praefect-with-db + - .rails:rules:praefect-with-db + rspec unit pg12: extends: - .rspec-base-pg12 - .rails:rules:ee-and-foss-unit - .rspec-unit-parallel -rspec unit pg12 minimal: +rspec unit pg12 predictive: extends: - rspec unit pg12 - - .minimal-rspec-tests - - .rails:rules:ee-and-foss-unit:minimal + - .predictive-rspec-tests + - .rails:rules:ee-and-foss-unit:predictive rspec unit pg12 single-db: extends: @@ -121,11 +147,11 @@ rspec integration pg12: - .rails:rules:ee-and-foss-integration - .rspec-integration-parallel -rspec integration pg12 minimal: +rspec integration pg12 predictive: extends: - rspec integration pg12 - - .minimal-rspec-tests - - .rails:rules:ee-and-foss-integration:minimal + - .predictive-rspec-tests + - .rails:rules:ee-and-foss-integration:predictive rspec integration pg12 single-db: extends: @@ -147,11 +173,11 @@ rspec system pg12: variables: DEBUG_GITLAB_TRANSACTION_STACK: "true" -rspec system pg12 minimal: +rspec system pg12 predictive: extends: - rspec system pg12 - - .minimal-rspec-tests - - .rails:rules:ee-and-foss-system:minimal + - .predictive-rspec-tests + - .rails:rules:ee-and-foss-system:predictive rspec system pg12 single-db: extends: @@ -187,7 +213,7 @@ rspec fast_spec_helper: db:rollback: extends: .db-job-base script: - - scripts/db_tasks db:migrate VERSION=20210301200959 + - scripts/db_tasks db:migrate VERSION=20210602155110 - scripts/db_tasks db:migrate SKIP_SCHEMA_VERSION_CHECK=true db:rollback single-db: @@ -287,7 +313,9 @@ gitlab:setup: - log/*.log db:backup_and_restore: - extends: .db-job-base + extends: + - .db-job-base + - .rails:rules:db-backup variables: SETUP_DB: "false" GITLAB_ASSUME_YES: "1" @@ -298,16 +326,12 @@ db:backup_and_restore: - bundle exec rake gitlab:backup:create - date - bundle exec rake gitlab:backup:restore - rules: - - changes: - - "lib/backup/**/*" - - "lib/tasks/gitlab/backup.rake" db:backup_and_restore single-db: extends: - db:backup_and_restore - .single-db - - .rails:rules:single-db + - .rails:rules:db-backup rspec:deprecations: extends: @@ -321,10 +345,12 @@ rspec:deprecations: # so we use `dependencies` here. dependencies: - rspec migration pg12 + - rspec background_migration pg12 - rspec unit pg12 - rspec integration pg12 - rspec system pg12 - rspec-ee migration pg12 + - rspec-ee background_migration pg12 - rspec-ee unit pg12 - rspec-ee integration pg12 - rspec-ee system pg12 @@ -351,31 +377,37 @@ rspec:coverage: - setup-test-env # FOSS/EE jobs - rspec migration pg12 + - rspec background_migration pg12 - rspec unit pg12 - rspec integration pg12 - rspec system pg12 - # FOSS/EE minimal jobs - - rspec migration pg12 minimal - - rspec unit pg12 minimal - - rspec integration pg12 minimal - - rspec system pg12 minimal + # FOSS/EE predictive jobs + - rspec migration pg12 predictive + - rspec background_migration pg12 predictive + - rspec unit pg12 predictive + - rspec integration pg12 predictive + - rspec system pg12 predictive # FOSS/EE single-db jobs - rspec migration pg12 single-db + - rspec background_migration pg12 single-db - rspec unit pg12 single-db - rspec integration pg12 single-db - rspec system pg12 single-db # EE jobs - rspec-ee migration pg12 + - rspec-ee background_migration pg12 - rspec-ee unit pg12 - rspec-ee integration pg12 - rspec-ee system pg12 - # EE minimal jobs - - rspec-ee migration pg12 minimal - - rspec-ee unit pg12 minimal - - rspec-ee integration pg12 minimal - - rspec-ee system pg12 minimal + # EE predictive jobs + - rspec-ee migration pg12 predictive + - rspec-ee background_migration pg12 predictive + - rspec-ee unit pg12 predictive + - rspec-ee integration pg12 predictive + - rspec-ee system pg12 predictive # EE single-db jobs - rspec-ee migration pg12 single-db + - rspec-ee background_migration pg12 single-db - rspec-ee unit pg12 single-db - rspec-ee integration pg12 single-db - rspec-ee system pg12 single-db @@ -383,16 +415,19 @@ rspec:coverage: - memory-on-boot # As-if-FOSS jobs - rspec migration pg12-as-if-foss - - rspec migration pg12-as-if-foss minimal + - rspec migration pg12-as-if-foss predictive - rspec migration pg12-as-if-foss single-db + - rspec background_migration pg12-as-if-foss + - rspec background_migration pg12-as-if-foss predictive + - rspec background_migration pg12-as-if-foss single-db - rspec unit pg12-as-if-foss - - rspec unit pg12-as-if-foss minimal + - rspec unit pg12-as-if-foss predictive - rspec unit pg12-as-if-foss single-db - rspec integration pg12-as-if-foss - - rspec integration pg12-as-if-foss minimal + - rspec integration pg12-as-if-foss predictive - rspec integration pg12-as-if-foss single-db - rspec system pg12-as-if-foss - - rspec system pg12-as-if-foss minimal + - rspec system pg12-as-if-foss predictive - rspec system pg12-as-if-foss single-db script: - run_timed_command "bundle exec scripts/merge-simplecov" @@ -478,11 +513,24 @@ rspec migration pg12-as-if-foss: - .rails:rules:as-if-foss-migration - .rspec-migration-parallel -rspec migration pg12-as-if-foss minimal: +rspec migration pg12-as-if-foss predictive: extends: - rspec migration pg12-as-if-foss - - .minimal-rspec-tests - - .rails:rules:as-if-foss-migration:minimal + - .predictive-rspec-tests + - .rails:rules:as-if-foss-migration:predictive + +rspec background_migration pg12-as-if-foss: + extends: + - .rspec-base-pg12-as-if-foss + - .rspec-base-migration + - .rails:rules:as-if-foss-background-migration + - .rspec-background-migration-parallel + +rspec background_migration pg12-as-if-foss predictive: + extends: + - rspec background_migration pg12-as-if-foss + - .predictive-rspec-tests + - .rails:rules:as-if-foss-background-migration:predictive rspec migration pg12-as-if-foss single-db: extends: @@ -490,17 +538,23 @@ rspec migration pg12-as-if-foss single-db: - .single-db-rspec - .rails:rules:single-db +rspec background_migration pg12-as-if-foss single-db: + extends: + - rspec background_migration pg12-as-if-foss + - .single-db-rspec + - .rails:rules:single-db + rspec unit pg12-as-if-foss: extends: - .rspec-base-pg12-as-if-foss - .rails:rules:as-if-foss-unit - .rspec-unit-parallel -rspec unit pg12-as-if-foss minimal: +rspec unit pg12-as-if-foss predictive: extends: - rspec unit pg12-as-if-foss - - .minimal-rspec-tests - - .rails:rules:as-if-foss-unit:minimal + - .predictive-rspec-tests + - .rails:rules:as-if-foss-unit:predictive rspec unit pg12-as-if-foss single-db: extends: @@ -514,11 +568,11 @@ rspec integration pg12-as-if-foss: - .rails:rules:as-if-foss-integration - .rspec-integration-parallel -rspec integration pg12-as-if-foss minimal: +rspec integration pg12-as-if-foss predictive: extends: - rspec integration pg12-as-if-foss - - .minimal-rspec-tests - - .rails:rules:as-if-foss-integration:minimal + - .predictive-rspec-tests + - .rails:rules:as-if-foss-integration:predictive rspec integration pg12-as-if-foss single-db: extends: @@ -532,11 +586,11 @@ rspec system pg12-as-if-foss: - .rails:rules:as-if-foss-system - .rspec-system-parallel -rspec system pg12-as-if-foss minimal: +rspec system pg12-as-if-foss predictive: extends: - rspec system pg12-as-if-foss - - .minimal-rspec-tests - - .rails:rules:as-if-foss-system:minimal + - .predictive-rspec-tests + - .rails:rules:as-if-foss-system:predictive rspec system pg12-as-if-foss single-db: extends: @@ -551,11 +605,24 @@ rspec-ee migration pg12: - .rails:rules:ee-only-migration - .rspec-ee-migration-parallel -rspec-ee migration pg12 minimal: +rspec-ee migration pg12 predictive: extends: - rspec-ee migration pg12 - - .minimal-rspec-tests - - .rails:rules:ee-only-migration:minimal + - .predictive-rspec-tests + - .rails:rules:ee-only-migration:predictive + +rspec-ee background_migration pg12: + extends: + - .rspec-ee-base-pg12 + - .rspec-base-migration + - .rails:rules:ee-only-background-migration + - .rspec-ee-background-migration-parallel + +rspec-ee background_migration pg12 predictive: + extends: + - rspec-ee background_migration pg12 + - .predictive-rspec-tests + - .rails:rules:ee-only-background-migration:predictive rspec-ee migration pg12 single-db: extends: @@ -563,6 +630,24 @@ rspec-ee migration pg12 single-db: - .single-db-rspec - .rails:rules:single-db +rspec-ee background_migration pg12 single-db: + extends: + - rspec-ee background_migration pg12 + - .single-db-rspec + - .rails:rules:single-db + +rspec-ee migration pg12 praefect: + extends: + - rspec migration pg12 + - .praefect-with-db + - .rails:rules:praefect-with-db + +rspec-ee background_migration pg12 praefect: + extends: + - rspec background_migration pg12 + - .praefect-with-db + - .rails:rules:praefect-with-db + rspec-ee unit pg12: extends: - .rspec-ee-base-pg12 @@ -574,11 +659,11 @@ rspec-ee unit pg12 es8: - .rspec-ee-base-pg12-es8 - .rspec-ee-unit-parallel -rspec-ee unit pg12 minimal: +rspec-ee unit pg12 predictive: extends: - rspec-ee unit pg12 - - .minimal-rspec-tests - - .rails:rules:ee-only-unit:minimal + - .predictive-rspec-tests + - .rails:rules:ee-only-unit:predictive rspec-ee unit pg12 single-db: extends: @@ -597,11 +682,11 @@ rspec-ee integration pg12 es8: - .rspec-ee-base-pg12-es8 - .rspec-ee-integration-parallel -rspec-ee integration pg12 minimal: +rspec-ee integration pg12 predictive: extends: - rspec-ee integration pg12 - - .minimal-rspec-tests - - .rails:rules:ee-only-integration:minimal + - .predictive-rspec-tests + - .rails:rules:ee-only-integration:predictive rspec-ee integration pg12 single-db: extends: @@ -620,11 +705,11 @@ rspec-ee system pg12 es8: - .rspec-ee-base-pg12-es8 - .rspec-ee-system-parallel -rspec-ee system pg12 minimal: +rspec-ee system pg12 predictive: extends: - rspec-ee system pg12 - - .minimal-rspec-tests - - .rails:rules:ee-only-system:minimal + - .predictive-rspec-tests + - .rails:rules:ee-only-system:predictive rspec-ee system pg12 single-db: extends: @@ -650,25 +735,32 @@ rspec migration pg11: extends: - .rspec-base-pg11 - .rspec-base-migration - - .rails:rules:default-branch-schedule-nightly--code-backstage + - .rails:rules:rspec-on-pg11 - .rspec-migration-parallel +rspec background_migration pg11: + extends: + - .rspec-base-pg11 + - .rspec-base-migration + - .rails:rules:rspec-on-pg11 + - .rspec-background-migration-parallel + rspec unit pg11: extends: - .rspec-base-pg11 - - .rails:rules:default-branch-schedule-nightly--code-backstage + - .rails:rules:rspec-on-pg11 - .rspec-unit-parallel rspec integration pg11: extends: - .rspec-base-pg11 - - .rails:rules:default-branch-schedule-nightly--code-backstage + - .rails:rules:rspec-on-pg11 - .rspec-integration-parallel rspec system pg11: extends: - .rspec-base-pg11 - - .rails:rules:default-branch-schedule-nightly--code-backstage + - .rails:rules:rspec-on-pg11 - .rspec-system-parallel # PG13 @@ -679,6 +771,13 @@ rspec migration pg13: - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-migration-parallel +rspec background_migration pg13: + extends: + - .rspec-base-pg13 + - .rspec-base-migration + - .rails:rules:default-branch-schedule-nightly--code-backstage + - .rspec-background-migration-parallel + rspec unit pg13: extends: - .rspec-base-pg13 @@ -710,6 +809,13 @@ rspec-ee migration pg11: - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-migration-parallel +rspec-ee background_migration pg11: + extends: + - .rspec-ee-base-pg11 + - .rspec-base-migration + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + - .rspec-ee-background-migration-parallel + rspec-ee unit pg11: extends: - .rspec-ee-base-pg11 @@ -729,12 +835,6 @@ rspec-ee system pg11: - .rspec-ee-system-parallel # PG12 -rspec-ee unit pg12 es7: - extends: - - .rspec-ee-base-pg12-es7 - - .rspec-ee-unit-parallel - - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - rspec-ee unit pg12 opensearch1: extends: - .rspec-ee-base-pg12-opensearch1 @@ -747,12 +847,6 @@ rspec-ee unit pg12 opensearch2: - .rspec-ee-unit-parallel - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only -rspec-ee integration pg12 es7: - extends: - - .rspec-ee-base-pg12-es7 - - .rspec-ee-integration-parallel - - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - rspec-ee integration pg12 opensearch1: extends: - .rspec-ee-base-pg12-opensearch1 @@ -765,12 +859,6 @@ rspec-ee integration pg12 opensearch2: - .rspec-ee-integration-parallel - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only -rspec-ee system pg12 es7: - extends: - - .rspec-ee-base-pg12-es7 - - .rspec-ee-system-parallel - - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - rspec-ee system pg12 opensearch1: extends: - .rspec-ee-base-pg12-opensearch1 @@ -791,6 +879,13 @@ rspec-ee migration pg13: - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-migration-parallel +rspec-ee background_migration pg13: + extends: + - .rspec-ee-base-pg13 + - .rspec-base-migration + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + - .rspec-ee-background-migration-parallel + rspec-ee unit pg13: extends: - .rspec-ee-base-pg13 diff --git a/.gitlab/ci/rails/shared.gitlab-ci.yml b/.gitlab/ci/rails/shared.gitlab-ci.yml index e282781b7b5..4ca82f55b63 100644 --- a/.gitlab/ci/rails/shared.gitlab-ci.yml +++ b/.gitlab/ci/rails/shared.gitlab-ci.yml @@ -28,7 +28,7 @@ include: - run_timed_command "scripts/gitaly-test-spawn" # Do not use 'bundle exec' here - echo -e "\e[0Ksection_end:`date +%s`:gitaly-test-spawn\r\e[0K" -.minimal-rspec-tests: +.predictive-rspec-tests: variables: RSPEC_TESTS_MAPPING_ENABLED: "true" @@ -58,10 +58,13 @@ include: 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" + # We need to exclude background migration because unit tests run with + # spec/lib, yet background migration tests are also sitting there, + # and they should run on their own jobs so we don't need to run them + # in unit tests again. + - rspec_paralellized_job "--tag ~quarantine --tag ~level:background_migration" allow_failure: - # the exit code listed here must match the one defined for the variable SUCCESSFULLY_RETRIED_TEST_EXIT_CODE - exit_codes: 137 + exit_codes: !reference [.rspec-base, variables, SUCCESSFULLY_RETRIED_TEST_EXIT_CODE] .base-artifacts: artifacts: @@ -80,14 +83,9 @@ include: junit: ${JUNIT_RESULT_FILE} .rspec-base-migration: - extends: - - .base-artifacts - - .rails:rules:ee-and-foss-migration - variables: - RSPEC_TESTS_FILTER_FILE: "${RSPEC_MATCHING_TESTS_PATH}" script: - !reference [.base-script, script] - - rspec_paralellized_job "--tag ~quarantine --tag level:migration" + - rspec_paralellized_job "--tag ~quarantine" .rspec-base-pg11: extends: @@ -121,12 +119,6 @@ include: - .rspec-base - .use-pg12-es7-ee -.rspec-ee-base-pg12-es7: - extends: - - .rspec-base - - .use-pg12-es7-ee - - .rails:rules:run-search-tests - .rspec-ee-base-pg12-es8: extends: - .rspec-base @@ -163,11 +155,17 @@ include: ############################ # rspec job parallel configs .rspec-migration-parallel: - parallel: 12 + parallel: 8 -.rspec-ee-migration-parallel: +.rspec-background-migration-parallel: parallel: 4 +.rspec-ee-migration-parallel: + parallel: 2 + +.rspec-ee-background-migration-parallel: + parallel: 2 + .rspec-unit-parallel: parallel: 28 diff --git a/.gitlab/ci/review-apps/main.gitlab-ci.yml b/.gitlab/ci/review-apps/main.gitlab-ci.yml index b72afedc3b0..13e8ea330da 100644 --- a/.gitlab/ci/review-apps/main.gitlab-ci.yml +++ b/.gitlab/ci/review-apps/main.gitlab-ci.yml @@ -32,7 +32,7 @@ review-build-cng-env: extends: - .default-retry - .review:rules:review-build-cng - image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}:bundler-2.3 + image: ${GITLAB_DEPENDENCY_PROXY}ruby:${RUBY_VERSION}-alpine3.16 stage: prepare needs: # We need this job because we need its `cached-assets-hash.txt` artifact, so that we can pass the assets image tag to the downstream CNG pipeline. @@ -109,6 +109,7 @@ review-deploy: - .review-workflow-base - .review:rules:review-deploy stage: deploy + image: ${GITLAB_DEPENDENCY_PROXY}dtzar/helm-kubectl:3.10.3 needs: ["review-build-cng"] cache: key: "review-deploy-dependencies-charts-${GITLAB_HELM_CHART_REF}-v1" @@ -130,6 +131,7 @@ review-deploy: - 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" || (display_deployment_debug && exit 1) + - run_timed_command "verify_commit_sha" || (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. diff --git a/.gitlab/ci/review-apps/qa.gitlab-ci.yml b/.gitlab/ci/review-apps/qa.gitlab-ci.yml index d28819208b7..01a738127f7 100644 --- a/.gitlab/ci/review-apps/qa.gitlab-ci.yml +++ b/.gitlab/ci/review-apps/qa.gitlab-ci.yml @@ -1,6 +1,6 @@ include: - project: gitlab-org/quality/pipeline-common - ref: 1.7.0 + ref: 1.14.1 file: - /ci/base.gitlab-ci.yml - /ci/allure-report.yml diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index 8b7aee8de9d..9596594ad26 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -21,7 +21,7 @@ if: '$FORCE_GITLAB_CI' .if-default-refs: &if-default-refs - if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable(-ee)?$/ || $CI_COMMIT_REF_NAME =~ /^\d+-\d+-auto-deploy-\d+$/ || $CI_COMMIT_REF_NAME =~ /^security\// || $CI_COMMIT_REF_NAME == "ruby3" || $CI_MERGE_REQUEST_IID || $CI_COMMIT_TAG || $FORCE_GITLAB_CI' + if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable(-ee)?$/ || $CI_COMMIT_REF_NAME =~ /^\d+-\d+-auto-deploy-\d+$/ || $CI_COMMIT_REF_NAME =~ /^security\// || $CI_COMMIT_REF_NAME == "ruby2" || $CI_MERGE_REQUEST_IID || $CI_COMMIT_TAG || $FORCE_GITLAB_CI' .if-default-branch-refs: &if-default-branch-refs if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_MERGE_REQUEST_IID == null' @@ -55,8 +55,8 @@ .if-merge-request-targeting-stable-branch: &if-merge-request-targeting-stable-branch if: '$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^[\d-]+-stable(-ee)?$/' -.if-merge-request-labels-run-in-ruby3: &if-merge-request-labels-run-in-ruby3 - if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-in-ruby3/' +.if-merge-request-labels-run-in-ruby2: &if-merge-request-labels-run-in-ruby2 + if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-in-ruby2/' .if-merge-request-labels-as-if-foss: &if-merge-request-labels-as-if-foss if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-as-if-foss/' @@ -79,6 +79,9 @@ .if-merge-request-labels-run-review-app: &if-merge-request-labels-run-review-app if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-review-app/' +.if-merge-request-labels-run-on-pg11: &if-merge-request-labels-run-on-pg11 + if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-on-pg11/' + .if-merge-request-labels-skip-undercoverage: &if-merge-request-labels-skip-undercoverage if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:skip-undercoverage/' @@ -89,7 +92,7 @@ if: '$CI_MERGE_REQUEST_LABELS =~ /group::global search/' .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: '($CI_MERGE_REQUEST_LABELS =~ /master:(foss-)?broken/ || $CI_MERGE_REQUEST_TITLE =~ /^[Rr]evert/) && $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/' @@ -109,8 +112,8 @@ .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-ruby2-branch-schedule-nightly: &if-ruby2-branch-schedule-nightly + if: '$CI_COMMIT_BRANCH == "ruby2" && $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "nightly"' .if-security-schedule: &if-security-schedule if: '$CI_PROJECT_NAMESPACE == "gitlab-org/security" && $CI_PIPELINE_SOURCE == "schedule"' @@ -142,8 +145,8 @@ .if-dot-com-gitlab-org-and-security-tag: &if-dot-com-gitlab-org-and-security-tag if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/security$)/ && $CI_COMMIT_TAG' -.if-ruby3-branch: &if-ruby3-branch - if: '$CI_COMMIT_BRANCH == "ruby3"' +.if-ruby2-branch: &if-ruby2-branch + if: '$CI_COMMIT_BRANCH == "ruby2"' # For Security merge requests, the gitlab-release-tools-bot triggers a new # pipeline for the "Pipelines for merged results" feature. If the pipeline @@ -217,9 +220,6 @@ - "scripts/lint-doc.sh" - ".gitlab/ci/docs.gitlab-ci.yml" -.docs-code-quality-patterns: &docs-code-quality-patterns - - "doc/**/*.md" - .docs-deprecations-and-removals-patterns: &docs-deprecations-and-removals-patterns - "doc/update/deprecations.md" - "doc/update/removals.md" @@ -350,6 +350,11 @@ - ".gitlab-ci.yml" - ".gitlab/ci/**/*" +# DB backup patterns +.db-backup-patterns: &db-backup-patterns + - "lib/backup/**/*" + - "lib/tasks/gitlab/backup.rake" + .db-library-patterns: &db-library-patterns - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/database/**/*" - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/database{,_spec}.rb" @@ -586,7 +591,7 @@ - <<: *if-merge-request-targeting-stable-branch when: never -.rails:rules:minimal-default-rules: +.rails:rules:predictive-default-rules: rules: - <<: *if-merge-request-approved when: never @@ -614,7 +619,7 @@ - <<: *if-merge-request-not-approved when: never -.rails:rules:as-if-foss-migration-unit-integration:minimal-default-rules: +.rails:rules:as-if-foss-migration-unit-integration:predictive-default-rules: rules: - <<: *if-merge-request changes: *core-backend-patterns @@ -623,11 +628,11 @@ changes: *ci-patterns when: never -.rails:rules:unit-integration:minimal-default-rules: +.rails:rules:unit-integration:predictive-default-rules: rules: - <<: *if-merge-request-labels-run-all-rspec when: never - - !reference [".rails:rules:as-if-foss-migration-unit-integration:minimal-default-rules", rules] + - !reference [".rails:rules:as-if-foss-migration-unit-integration:predictive-default-rules", rules] .rails:rules:system-default-rules: rules: @@ -643,7 +648,7 @@ - <<: *if-merge-request-not-approved when: never -.rails:rules:system:minimal-default-rules: +.rails:rules:system:predictive-default-rules: rules: - <<: *if-merge-request-labels-run-all-rspec when: never @@ -705,7 +710,7 @@ variables: ARCH: amd64,arm64 - <<: *if-force-ci - - <<: *if-ruby3-branch + - <<: *if-ruby2-branch .build-images:rules:build-assets-image: rules: @@ -714,7 +719,7 @@ - <<: *if-merge-request-targeting-stable-branch - <<: *if-merge-request-labels-run-review-app - <<: *if-auto-deploy-branches - - <<: *if-ruby3-branch + - <<: *if-ruby2-branch - <<: *if-default-refs changes: *ci-build-images-patterns - <<: *if-default-refs @@ -812,11 +817,6 @@ when: manual allow_failure: true -.docs:rules:docs-code-quality: - rules: - - <<: *if-merge-request - changes: *docs-code-quality-patterns - .docs:rules:docs-lint: rules: - <<: *if-default-refs @@ -871,7 +871,7 @@ # Frontend rules # ################## -.frontend:rules:minimal-default-rules: +.frontend:rules:predictive-default-rules: rules: - <<: *if-merge-request-approved when: never @@ -887,7 +887,7 @@ - <<: *if-merge-request-targeting-stable-branch - <<: *if-merge-request-labels-run-review-app - <<: *if-auto-deploy-branches - - <<: *if-ruby3-branch + - <<: *if-ruby2-branch - <<: *if-default-refs changes: *ci-build-images-patterns - <<: *if-default-refs @@ -963,11 +963,11 @@ - <<: *if-default-refs changes: *code-backstage-patterns -.frontend:rules:jest:minimal: +.frontend:rules:jest:predictive: rules: - <<: *if-fork-merge-request changes: *code-backstage-patterns - - !reference [".frontend:rules:minimal-default-rules", rules] + - !reference [".frontend:rules:predictive-default-rules", rules] - <<: *if-merge-request-labels-run-all-jest when: never - <<: *if-merge-request-labels-frontend-and-feature-flag @@ -995,10 +995,10 @@ - <<: *if-merge-request changes: *frontend-patterns-for-as-if-foss -.frontend:rules:jest:minimal:as-if-foss: +.frontend:rules:jest:predictive:as-if-foss: rules: - !reference [".strict-ee-only-rules", rules] - - !reference [".frontend:rules:minimal-default-rules", rules] + - !reference [".frontend:rules:predictive-default-rules", rules] - <<: *if-merge-request-labels-as-if-foss when: never - <<: *if-merge-request-labels-run-all-jest @@ -1107,7 +1107,7 @@ allow_failure: true - <<: *if-force-ci allow_failure: true - - <<: *if-ruby3-branch + - <<: *if-ruby2-branch .qa:rules:package-and-test: rules: @@ -1119,7 +1119,7 @@ when: never - <<: *if-merge-request-targeting-stable-branch allow_failure: true - - <<: *if-ruby3-branch + - <<: *if-ruby2-branch allow_failure: true - <<: *if-dot-com-gitlab-org-and-security-merge-request-manual-ff-package-and-e2e changes: *feature-flag-development-config-patterns @@ -1172,6 +1172,16 @@ changes: *db-patterns - <<: *if-default-branch-schedule-nightly +.rails:rules:db-backup: + rules: + - <<: *if-merge-request-labels-run-all-rspec + - <<: *if-default-refs + changes: *db-backup-patterns + - <<: *if-merge-request-not-approved + when: never + - <<: *if-default-refs + changes: *db-patterns + .rails:rules:praefect-with-db: rules: - if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-praefect-with-db/' @@ -1188,27 +1198,35 @@ # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68840. - <<: *if-merge-request changes: *db-patterns - - <<: *if-automated-merge-request - changes: *db-patterns - - <<: *if-security-merge-request - changes: *db-patterns - <<: *if-merge-request-not-approved when: never - <<: *if-default-refs changes: *db-patterns -.rails:rules:ee-and-foss-migration:minimal: +.rails:rules:ee-and-foss-migration:predictive: rules: - <<: *if-fork-merge-request changes: *db-patterns - - !reference [".rails:rules:minimal-default-rules", rules] - - !reference [".rails:rules:unit-integration:minimal-default-rules", rules] + - !reference [".rails:rules:predictive-default-rules", rules] + - !reference [".rails:rules:unit-integration:predictive-default-rules", rules] # When DB schema changes, many migrations spec may be affected. However, the test mapping from Crystalball does not map db change to a specific migration spec well. # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68840. - <<: *if-merge-request changes: *db-patterns when: never +.rails:rules:ee-and-foss-background-migration: + rules: + - !reference [".rails:rules:ee-and-foss-migration", rules] + - <<: *if-default-refs + changes: *backend-patterns + +.rails:rules:ee-and-foss-background-migration:predictive: + rules: + - !reference [".rails:rules:ee-and-foss-migration:predictive", rules] + - <<: *if-merge-request + changes: *backend-patterns + .rails:rules:ee-and-foss-mr-with-migration: rules: - <<: *if-merge-request @@ -1231,12 +1249,12 @@ - <<: *if-default-refs changes: *backend-patterns -.rails:rules:ee-and-foss-unit:minimal: +.rails:rules:ee-and-foss-unit:predictive: rules: - <<: *if-fork-merge-request changes: *backend-patterns - - !reference [".rails:rules:minimal-default-rules", rules] - - !reference [".rails:rules:unit-integration:minimal-default-rules", rules] + - !reference [".rails:rules:predictive-default-rules", rules] + - !reference [".rails:rules:unit-integration:predictive-default-rules", rules] - <<: *if-merge-request changes: *backend-patterns @@ -1248,12 +1266,12 @@ - <<: *if-default-refs changes: *backend-patterns -.rails:rules:ee-and-foss-integration:minimal: +.rails:rules:ee-and-foss-integration:predictive: rules: - <<: *if-fork-merge-request changes: *backend-patterns - - !reference [".rails:rules:minimal-default-rules", rules] - - !reference [".rails:rules:unit-integration:minimal-default-rules", rules] + - !reference [".rails:rules:predictive-default-rules", rules] + - !reference [".rails:rules:unit-integration:predictive-default-rules", rules] - <<: *if-merge-request changes: *backend-patterns @@ -1265,12 +1283,12 @@ - <<: *if-default-refs changes: *code-backstage-patterns -.rails:rules:ee-and-foss-system:minimal: +.rails:rules:ee-and-foss-system:predictive: rules: - <<: *if-fork-merge-request changes: *code-backstage-patterns - - !reference [".rails:rules:minimal-default-rules", rules] - - !reference [".rails:rules:system:minimal-default-rules", rules] + - !reference [".rails:rules:predictive-default-rules", rules] + - !reference [".rails:rules:system:predictive-default-rules", rules] .rails:rules:ee-and-foss-fast_spec_helper: rules: @@ -1306,18 +1324,30 @@ - <<: *if-default-refs changes: *db-patterns -.rails:rules:ee-only-migration:minimal: +.rails:rules:ee-only-migration:predictive: rules: - <<: *if-not-ee when: never - - !reference [".rails:rules:minimal-default-rules", rules] - - !reference [".rails:rules:unit-integration:minimal-default-rules", rules] + - !reference [".rails:rules:predictive-default-rules", rules] + - !reference [".rails:rules:unit-integration:predictive-default-rules", rules] # When DB schema changes, many migrations spec may be affected. However, the test mapping from Crystalball does not map db change to a specific migration spec well. # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68840. - <<: *if-merge-request changes: *db-patterns when: never +.rails:rules:ee-only-background-migration: + rules: + - !reference [".rails:rules:ee-only-migration", rules] + - <<: *if-default-refs + changes: *backend-patterns + +.rails:rules:ee-only-background-migration:predictive: + rules: + - !reference [".rails:rules:ee-only-migration:predictive", rules] + - <<: *if-merge-request + changes: *backend-patterns + .rails:rules:ee-only-unit: rules: - <<: *if-not-ee @@ -1328,14 +1358,14 @@ - <<: *if-default-refs changes: *backend-patterns -.rails:rules:ee-only-unit:minimal: +.rails:rules:ee-only-unit:predictive: rules: - <<: *if-not-ee when: never - <<: *if-fork-merge-request changes: *backend-patterns - - !reference [".rails:rules:minimal-default-rules", rules] - - !reference [".rails:rules:unit-integration:minimal-default-rules", rules] + - !reference [".rails:rules:predictive-default-rules", rules] + - !reference [".rails:rules:unit-integration:predictive-default-rules", rules] - <<: *if-merge-request changes: *backend-patterns @@ -1349,14 +1379,14 @@ - <<: *if-default-refs changes: *backend-patterns -.rails:rules:ee-only-integration:minimal: +.rails:rules:ee-only-integration:predictive: rules: - <<: *if-not-ee when: never - <<: *if-fork-merge-request changes: *backend-patterns - - !reference [".rails:rules:minimal-default-rules", rules] - - !reference [".rails:rules:unit-integration:minimal-default-rules", rules] + - !reference [".rails:rules:predictive-default-rules", rules] + - !reference [".rails:rules:unit-integration:predictive-default-rules", rules] - <<: *if-merge-request changes: *backend-patterns @@ -1370,14 +1400,14 @@ - <<: *if-default-refs changes: *code-backstage-patterns -.rails:rules:ee-only-system:minimal: +.rails:rules:ee-only-system:predictive: rules: - <<: *if-not-ee when: never - <<: *if-fork-merge-request changes: *code-backstage-patterns - - !reference [".rails:rules:minimal-default-rules", rules] - - !reference [".rails:rules:system:minimal-default-rules", rules] + - !reference [".rails:rules:predictive-default-rules", rules] + - !reference [".rails:rules:system:predictive-default-rules", rules] .rails:rules:as-if-foss-migration: rules: @@ -1397,18 +1427,30 @@ - <<: *if-merge-request-not-approved when: never -.rails:rules:as-if-foss-migration:minimal: +.rails:rules:as-if-foss-migration:predictive: rules: - <<: *if-not-ee when: never - - !reference [".rails:rules:minimal-default-rules", rules] - - !reference [".rails:rules:as-if-foss-migration-unit-integration:minimal-default-rules", rules] + - !reference [".rails:rules:predictive-default-rules", rules] + - !reference [".rails:rules:as-if-foss-migration-unit-integration:predictive-default-rules", rules] # When DB schema changes, many migrations spec may be affected. However, the test mapping from Crystalball does not map db change to a specific migration spec well. # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68840. - <<: *if-merge-request-labels-as-if-foss changes: *db-patterns when: never +.rails:rules:as-if-foss-background-migration: + rules: + - !reference [".rails:rules:as-if-foss-migration", rules] + - <<: *if-merge-request-labels-as-if-foss + changes: *backend-patterns + +.rails:rules:as-if-foss-background-migration:predictive: + rules: + - !reference [".rails:rules:as-if-foss-migration:predictive", rules] + - <<: *if-merge-request-labels-as-if-foss + changes: *backend-patterns + .rails:rules:as-if-foss-unit: rules: - <<: *if-not-ee @@ -1419,14 +1461,14 @@ - <<: *if-merge-request-labels-as-if-foss changes: *backend-patterns -.rails:rules:as-if-foss-unit:minimal: +.rails:rules:as-if-foss-unit:predictive: rules: - <<: *if-not-ee when: never - <<: *if-fork-merge-request when: never - - !reference [".rails:rules:minimal-default-rules", rules] - - !reference [".rails:rules:as-if-foss-migration-unit-integration:minimal-default-rules", rules] + - !reference [".rails:rules:predictive-default-rules", rules] + - !reference [".rails:rules:as-if-foss-migration-unit-integration:predictive-default-rules", rules] - <<: *if-merge-request-labels-as-if-foss changes: *backend-patterns @@ -1440,14 +1482,14 @@ - <<: *if-merge-request-labels-as-if-foss changes: *backend-patterns -.rails:rules:as-if-foss-integration:minimal: +.rails:rules:as-if-foss-integration:predictive: rules: - <<: *if-not-ee when: never - <<: *if-fork-merge-request when: never - - !reference [".rails:rules:minimal-default-rules", rules] - - !reference [".rails:rules:as-if-foss-migration-unit-integration:minimal-default-rules", rules] + - !reference [".rails:rules:predictive-default-rules", rules] + - !reference [".rails:rules:as-if-foss-migration-unit-integration:predictive-default-rules", rules] - <<: *if-merge-request-labels-as-if-foss changes: *backend-patterns @@ -1461,13 +1503,13 @@ - <<: *if-merge-request-labels-as-if-foss changes: *code-backstage-patterns -.rails:rules:as-if-foss-system:minimal: +.rails:rules:as-if-foss-system:predictive: rules: - <<: *if-not-ee when: never - <<: *if-fork-merge-request when: never - - !reference [".rails:rules:minimal-default-rules", rules] + - !reference [".rails:rules:predictive-default-rules", rules] - <<: *if-merge-request changes: *core-backend-patterns when: never @@ -1485,6 +1527,7 @@ - <<: *if-default-refs changes: *db-library-patterns - <<: *if-merge-request-labels-run-all-rspec + - <<: *if-merge-request-labels-run-on-pg11 .rails:rules:ee-mr-and-default-branch-only: rules: @@ -1548,7 +1591,7 @@ - <<: *if-not-ee when: never - <<: *if-default-branch-schedule-nightly - - <<: *if-ruby3-branch-schedule-nightly + - <<: *if-ruby2-branch-schedule-nightly - <<: *if-merge-request-labels-run-all-rspec .rails:rules:rspec-coverage: @@ -1574,6 +1617,11 @@ - <<: *if-merge-request changes: *backend-patterns +.rails:rules:rspec-on-pg11: + rules: + - <<: *if-merge-request-labels-run-on-pg11 + - !reference [".rails:rules:default-branch-schedule-nightly--code-backstage-default-rules", rules] + .rails:rules:default-branch-schedule-nightly--code-backstage-default-rules: rules: - <<: *if-default-branch-schedule-nightly @@ -1768,6 +1816,8 @@ - <<: *if-default-branch-refs - <<: *if-default-refs changes: *code-backstage-qa-patterns + - <<: *if-default-refs + changes: *docs-patterns .reports:rules:brakeman-sast: rules: @@ -2062,9 +2112,9 @@ - <<: *if-default-refs changes: *code-backstage-patterns -.setup:rules:verify-ruby-2.7: +.setup:rules:verify-ruby-3.0: rules: - - <<: *if-merge-request-labels-run-in-ruby3 + - <<: *if-merge-request-labels-run-in-ruby2 .setup:rules:verify-tests-yml: rules: @@ -2145,6 +2195,8 @@ - !reference [".strict-ee-only-rules", rules] - !reference [".as-if-jh-default-exclusion-rules", rules] - <<: *if-merge-request-labels-as-if-jh + - <<: *if-dot-com-gitlab-org-merge-request + changes: *feature-flag-development-config-patterns # This rule should share the same logic with .as-if-jh:rules:prepare-as-if-jh # Because the jobs using this need jobs using the preparation rules @@ -2154,3 +2206,6 @@ - !reference [".as-if-jh-default-exclusion-rules", rules] - <<: *if-merge-request-labels-as-if-jh allow_failure: true # See https://gitlab.com/gitlab-org/gitlab/-/issues/351136 + - <<: *if-dot-com-gitlab-org-merge-request + changes: *feature-flag-development-config-patterns + allow_failure: true # See https://gitlab.com/gitlab-org/gitlab/-/issues/351136 diff --git a/.gitlab/ci/setup.gitlab-ci.yml b/.gitlab/ci/setup.gitlab-ci.yml index e417b054cd6..852c4739d9d 100644 --- a/.gitlab/ci/setup.gitlab-ci.yml +++ b/.gitlab/ci/setup.gitlab-ci.yml @@ -22,21 +22,21 @@ cache gems: - vendor/cache expire_in: 31d -.minimal-job: +.predictive-job: extends: - .default-retry needs: [] -.absolutely-minimal-job: +.absolutely-predictive-job: extends: - - .minimal-job + - .predictive-job image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}alpine:edge variables: GIT_STRATEGY: none dont-interrupt-me: extends: - - .absolutely-minimal-job + - .absolutely-predictive-job - .setup:rules:dont-interrupt-me stage: sync interruptible: false @@ -45,7 +45,7 @@ dont-interrupt-me: gitlab_git_test: extends: - - .minimal-job + - .predictive-job - .setup:rules:gitlab_git_test stage: test script: @@ -53,7 +53,7 @@ gitlab_git_test: no-ee-check: extends: - - .minimal-job + - .predictive-job - .setup:rules:no-ee-check stage: test script: @@ -61,19 +61,19 @@ no-ee-check: no-jh-check: extends: - - .minimal-job + - .predictive-job - .setup:rules:no-jh-check stage: test script: - scripts/no-dir-check jh -verify-ruby-2.7: +verify-ruby-3.0: extends: - - .absolutely-minimal-job - - .setup:rules:verify-ruby-2.7 + - .absolutely-predictive-job + - .setup:rules:verify-ruby-3.0 stage: prepare script: - - echo 'Please remove label ~"pipeline:run-in-ruby3" so we do test against Ruby 2.7 (default version) before merging the merge request' + - echo 'Please remove label ~"pipeline:run-in-ruby2" so we do test against Ruby 3.0 (default version) before merging the merge request' - exit 1 verify-tests-yml: @@ -89,7 +89,7 @@ verify-tests-yml: verify-approvals: extends: - - .minimal-job + - .predictive-job - .setup:rules:jh-contribution script: - source scripts/utils.sh @@ -116,11 +116,13 @@ generate-frontend-fixtures-mapping: detect-tests: extends: .rails:rules:detect-tests - image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION} + image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION}-slim needs: [] stage: prepare variables: RSPEC_TESTS_MAPPING_ENABLED: "true" + before_script: + - apt-get update && apt-get install -y curl # Not present in ruby-slim, so we add it manually script: - source ./scripts/utils.sh - source ./scripts/rspec_helpers.sh @@ -135,17 +137,20 @@ detect-tests: tooling/bin/find_tests ${RSPEC_CHANGED_FILES_PATH} ${RSPEC_MATCHING_TESTS_PATH}; tooling/bin/find_changes ${RSPEC_CHANGED_FILES_PATH} ${RSPEC_MATCHING_TESTS_PATH} ${FRONTEND_FIXTURES_MAPPING_PATH}; filter_rspec_matched_foss_tests ${RSPEC_MATCHING_TESTS_PATH} ${RSPEC_MATCHING_TESTS_FOSS_PATH}; + tooling/bin/view_to_js_mappings ${RSPEC_CHANGED_FILES_PATH} ${RSPEC_MATCHING_JS_FILES_PATH}; echoinfo "Changed files: $(cat $RSPEC_CHANGED_FILES_PATH)"; echoinfo "Related RSpec tests: $(cat $RSPEC_MATCHING_TESTS_PATH)"; echoinfo "Related FOSS RSpec tests: $(cat $RSPEC_MATCHING_TESTS_FOSS_PATH)"; + echoinfo "Related JS files: $(cat $RSPEC_MATCHING_JS_FILES_PATH)"; fi artifacts: expire_in: 7d paths: + - ${FRONTEND_FIXTURES_MAPPING_PATH} - ${RSPEC_CHANGED_FILES_PATH} - - ${RSPEC_MATCHING_TESTS_PATH} + - ${RSPEC_MATCHING_JS_FILES_PATH} - ${RSPEC_MATCHING_TESTS_FOSS_PATH} - - ${FRONTEND_FIXTURES_MAPPING_PATH} + - ${RSPEC_MATCHING_TESTS_PATH} detect-previous-failed-tests: extends: @@ -167,7 +172,7 @@ detect-previous-failed-tests: e2e-test-pipeline-generate: extends: - .qa-job-base - - .minimal-job + - .predictive-job - .qa:rules:determine-e2e-tests stage: prepare variables: diff --git a/.gitlab/ci/static-analysis.gitlab-ci.yml b/.gitlab/ci/static-analysis.gitlab-ci.yml index 6df2c5f403f..13013d9a9db 100644 --- a/.gitlab/ci/static-analysis.gitlab-ci.yml +++ b/.gitlab/ci/static-analysis.gitlab-ci.yml @@ -32,7 +32,7 @@ static-analysis: parallel: 2 script: - yarn_install_script - - scripts/static-analysis + - fail_on_warnings scripts/static-analysis static-analysis as-if-foss: extends: diff --git a/.gitlab/ci/test-metadata.gitlab-ci.yml b/.gitlab/ci/test-metadata.gitlab-ci.yml index e147305e25a..3f6760394c4 100644 --- a/.gitlab/ci/test-metadata.gitlab-ci.yml +++ b/.gitlab/ci/test-metadata.gitlab-ci.yml @@ -14,8 +14,11 @@ retrieve-tests-metadata: extends: - .tests-metadata-state - .test-metadata:rules:retrieve-tests-metadata + # We use a smaller image for this job only (update-tests-metadata compiles some gems) + image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION}-slim stage: prepare script: + - apt-get update && apt-get install -y curl # Not present in ruby-slim, so we add it manually - install_gitlab_gem - source ./scripts/rspec_helpers.sh - retrieve_tests_metadata diff --git a/.gitlab/ci/workhorse.gitlab-ci.yml b/.gitlab/ci/workhorse.gitlab-ci.yml index 3aa9eaee6f8..389906dbbff 100644 --- a/.gitlab/ci/workhorse.gitlab-ci.yml +++ b/.gitlab/ci/workhorse.gitlab-ci.yml @@ -37,8 +37,9 @@ workhorse:test go: workhorse:test fips: extends: .workhorse:test + image: registry.gitlab.com/gitlab-org/gitlab-omnibus-builder/ubuntu_20.04_fips:4.0.0 variables: - WORKHORSE_TEST_FIPS_ENABLED: 1 + FIPS_MODE: 1 workhorse:test race: extends: .workhorse:test diff --git a/.gitlab/issue_templates/Broken Master - Flaky.md b/.gitlab/issue_templates/Broken Master - Flaky.md index bea12615e41..b87d9b5ee1f 100644 --- a/.gitlab/issue_templates/Broken Master - Flaky.md +++ b/.gitlab/issue_templates/Broken Master - Flaky.md @@ -16,7 +16,7 @@ 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 +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 @@ -25,4 +25,6 @@ learn more about how to reproduce them. 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::3" ~"type::bug" ~"bug::transient" +Once the flaky failure has been fixed on the default branch, open merge requests to cherry-pick the fix to the active stable branches. + +/label ~"type::maintenance" ~"failure::flaky-test" ~"priority::3" ~"severity::3" diff --git a/.gitlab/issue_templates/Broken Master - Non-flaky.md b/.gitlab/issue_templates/Broken Master - Non-flaky.md index 43e73fc5c5a..d2dc616ead8 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" ~"type::bug" ~"bug::transient" +/label ~"master:broken" ~"Engineering Productivity" ~"priority::1" ~"severity::1" ~"type::maintenance" ~"maintenance::pipelines" diff --git a/.gitlab/issue_templates/Doc_cleanup.md b/.gitlab/issue_templates/Doc_cleanup.md index 3ea692ed1ac..1eb3829e281 100644 --- a/.gitlab/issue_templates/Doc_cleanup.md +++ b/.gitlab/issue_templates/Doc_cleanup.md @@ -1,5 +1,3 @@ -/labels ~"documentation" ~"docs-only" ~"documentation" ~"docs::improvement" ~"type::maintenance" ~"maintenance::refactor" ~"Seeking community contributions" ~"quick win" ~"Technical Writing" - <!-- * Use this template for documentation issues identified * by [Vale](https://docs.gitlab.com/ee/development/documentation/testing.html#vale) @@ -16,6 +14,8 @@ Do you want to work on this issue? - **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. + To be fair to others, do not ask for more than three issues at a time. + - **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. ## To resolve the issue @@ -35,4 +35,4 @@ Thank you again for contributing to the GitLab documentation! :tada: ## Documentation issue - +/labels ~"documentation" ~"docs-only" ~"documentation" ~"docs::improvement" ~"type::maintenance" ~"maintenance::refactor" ~"Seeking community contributions" ~"quick win" ~"Technical Writing" diff --git a/.gitlab/issue_templates/Experiment Successful Cleanup.md b/.gitlab/issue_templates/Experiment Successful Cleanup.md index 1dd57332b8e..14a29452e49 100644 --- a/.gitlab/issue_templates/Experiment Successful Cleanup.md +++ b/.gitlab/issue_templates/Experiment Successful Cleanup.md @@ -11,6 +11,8 @@ The changes need to become an official part of the product. - [ ] Determine whether the feature should apply to EE - and which tiers - and/or Core - [ ] Determine if tracking should be kept as is, removed, or modified. - [ ] Ensure any relevant documentation has been updated. +- [ ] Determine whether there are other concerns that need to be considered before removing the feature flag. + - These are typically captured in the `Experiment Successful Cleanup Concerns` section of the rollout issue. - [ ] Consider changes to any `feature_category:` introduced by the experiment if ownership is changing (PM for Growth and PM for the new category as DRIs) - [ ] Check to see if the experiment introduced new design assets. Add them to the appropriate repos and document them if needed. - [ ] Optional: Migrate experiment to a default enabled [feature flag](https://docs.gitlab.com/ee/development/feature_flags) for one milestone and add a changelog. Converting to a feature flag can be skipped at the ICs discretion if risk is deemed low with consideration to both SaaS and (if applicable) self managed diff --git a/.gitlab/issue_templates/Feature Flag Roll Out.md b/.gitlab/issue_templates/Feature Flag Roll Out.md index 3972368ddc4..8aa631dce76 100644 --- a/.gitlab/issue_templates/Feature Flag Roll Out.md +++ b/.gitlab/issue_templates/Feature Flag Roll Out.md @@ -113,12 +113,14 @@ For visibility, all `/chatops` commands that target production should be execute 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`). - [ ] [Incrementally roll out](https://docs.gitlab.com/ee/development/feature_flags/controls.html#process) the feature. + - [ ] Between every step wait for at least 15 minutes and monitor the appropriate graphs on https://dashboards.gitlab.net. - If the feature flag in code has [an actor](https://docs.gitlab.com/ee/development/feature_flags/#feature-actors), perform **actor-based** rollout. - [ ] `/chatops run feature set <feature-flag-name> <rollout-percentage> --actors` - If the feature flag in code does **NOT** have [an actor](https://docs.gitlab.com/ee/development/feature_flags/#feature-actors), perform time-based rollout (**random** rollout). - [ ] `/chatops run feature set <feature-flag-name> <rollout-percentage> --random` - Enable the feature globally on production environment. - [ ] `/chatops run feature set <feature-flag-name> true` +- [ ] Observe appropriate graphs on https://dashboards.gitlab.net and verify that services are not affected. - [ ] Leave a comment on [the feature issue][main-issue] announcing that the feature has been globally enabled. - [ ] Wait for [at least one day for the verification term](https://about.gitlab.com/handbook/product-development-flow/feature-flag-lifecycle/#including-a-feature-behind-feature-flag-in-the-final-release). 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 571b0db0a30..97f756f0d02 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 @@ -18,7 +18,7 @@ If your Model's pluralized form is non-standard, i.e. it doesn't just end in `s` --> -## Replicate Cool Widgets +## Replicate Cool Widgets - Repository This issue is for implementing Geo replication and verification of Cool Widgets. @@ -39,8 +39,6 @@ You can look into the following example for implementing replication/verificatio ### Modify database schemas to prepare to add Geo support for Cool Widgets -You might do this section in its own merge request, but it is not required. - #### Add the registry table to track replication and verification state Geo secondary sites have a [Geo tracking database](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/geo.md#tracking-database) independent of the main database. It is used to track the replication and verification state of all replicables. Every Model has a corresponding "registry" table in the Geo tracking database. @@ -114,7 +112,7 @@ Geo secondary sites have a [Geo tracking database](https://gitlab.com/gitlab-org bin/rake db:migrate:geo ``` -- [ ] Be sure to commit the relevant changes in `ee/db/geo/structure.sql` +- [ ] Be sure to commit the relevant changes in `ee/db/geo/structure.sql` and the file under `ee/db/geo/schema_migrations` ### Add verification state to the Model @@ -146,7 +144,7 @@ The Geo primary site needs to checksum every replicable so secondaries can verif t.datetime_with_timezone :verified_at t.references :cool_widget, primary_key: true, default: nil, index: false, foreign_key: { on_delete: :cascade } t.integer :verification_state, default: 0, limit: 2, null: false - t.integer :verification_retry_count, limit: 2 + t.integer :verification_retry_count, default: 0, limit: 2, null: false t.binary :verification_checksum, using: 'verification_checksum::bytea' t.text :verification_failure, limit: 255 @@ -185,7 +183,21 @@ The Geo primary site needs to checksum every replicable so secondaries can verif bin/rake db:migrate ``` -- [ ] Be sure to commit the relevant changes in `db/structure.sql` +- [ ] Be sure to commit the relevant changes in `db/structure.sql` and the file under `db/schema_migrations` + +- [ ] Add an entry for the state table in `db/docs/cool_widget_states.yml` + + ```yaml + --- + table_name: cool_widget_states + classes: + - Geo::CoolWidgetState + feature_categories: + - geo_replication + description: Separate table for cool widget verification states + introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/XXXXX + milestone: 'XX.Y' + ``` That's all of the required database changes. @@ -371,7 +383,6 @@ That's all of the required database changes. ```shell bin/feature-flag --ee geo_cool_widget_replication --type development --group 'group::geo' - bin/feature-flag --ee geo_cool_widget_verification --type development --group 'group::geo' ``` - [ ] Add this replicator class to the method `replicator_classes` in @@ -382,7 +393,6 @@ That's all of the required database changes. ::Geo::PackageFileReplicator, ::Geo::CoolWidgetReplicator ] - end ``` - [ ] Create `ee/spec/replicators/geo/cool_widget_replicator_spec.rb` and perform the necessary setup to define the `model_record` variable for the shared examples: @@ -478,25 +488,29 @@ That's all of the required database changes. end ``` -- [ ] Add the following to `spec/factories/cool_widgets.rb`: +- [ ] Add the following to `ee/spec/factories/cool_widgets.rb`: ```ruby - trait :verification_succeeded do - with_file - verification_checksum { 'abc' } - verification_state { CoolWidget.verification_state_value(:verification_succeeded) } - end + FactoryBot.modify do + trait :verification_succeeded do + with_file + verification_checksum { 'abc' } + verification_state { CoolWidget.verification_state_value(:verification_succeeded) } + end - trait :verification_failed do - with_file - verification_failure { 'Could not calculate the checksum' } - verification_state { CoolWidget.verification_state_value(:verification_failed) } + trait :verification_failed do + with_file + verification_failure { 'Could not calculate the checksum' } + verification_state { CoolWidget.verification_state_value(:verification_failed) } + end end ``` + If there is not an existing factory for the object in `spec/factories/cool_widgets.rb`, wrap the traits in `FactoryBot.create` instead of `FactoryBot.modify`. + - [ ] Make sure the factory also allows setting a `project` attribute. If the model does not have a direct relation to a project, you can use a `transient` attribute. Check out `spec/factories/merge_request_diffs.rb` for an example. -- [ ] Following [the example of Merge Request Diffs](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63309) add a `Geo::CoolWidgetState` model in `ee/app/models/ee/geo/cool_widget_state.rb`: +- [ ] Following [the example of Merge Request Diffs](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63309) add a `Geo::CoolWidgetState` model in `ee/app/models/geo/cool_widget_state.rb`: ``` ruby # frozen_string_literal: true @@ -536,6 +550,8 @@ That's all of the required database changes. end ``` +- [ ] Add `[:cool_widget, :remote_store]` and `[:geo_cool_widget_state, any]` to `skipped` in `spec/models/factories_spec.rb` + #### Step 2. Implement metrics gathering Metrics are gathered by `Geo::MetricsUpdateWorker`, persisted in `GeoNodeStatus` for display in the UI, and sent to Prometheus: @@ -556,16 +572,18 @@ Metrics are gathered by `Geo::MetricsUpdateWorker`, persisted in `GeoNodeStatus` - [ ] Add the same fields to `GET /geo_nodes/status` example response in `ee/spec/fixtures/api/schemas/public_api/v4/geo_node_status.json`. - [ ] Add the following fields to the `Sidekiq metrics` table in `doc/administration/monitoring/prometheus/gitlab_metrics.md`: - - `geo_cool_widgets` - - `geo_cool_widgets_checksum_total` - - `geo_cool_widgets_checksummed` - - `geo_cool_widgets_checksum_failed` - - `geo_cool_widgets_synced` - - `geo_cool_widgets_failed` - - `geo_cool_widgets_registry` - - `geo_cool_widgets_verification_total` - - `geo_cool_widgets_verified` - - `geo_cool_widgets_verification_failed` + ```markdown + | `geo_cool_widgets` | Gauge | XX.Y | Number of Cool Widgets on primary | `url` | + | `geo_cool_widgets_checksum_total` | Gauge | XX.Y | Number of Cool Widgets checksummed successfully on primary | `url` | + | `geo_cool_widgets_checksummed` | Gauge | XX.Y | Number of Cool Widgets failed to calculate the checksum on primary | `url` | + | `geo_cool_widgets_checksum_failed` | Gauge | XX.Y | Number of Cool Widgets tried to checksum on primary | `url` | + | `geo_cool_widgets_synced` | Gauge | XX.Y | Number of syncable Cool Widgets synced on secondary | `url` | + | `geo_cool_widgets_failed` | Gauge | XX.Y | Number of syncable Cool Widgets failed to sync on secondary | `url` | + | `geo_cool_widgets_registry` | Gauge | XX.Y | Number of Cool Widgets in the registry | `url` | + | `geo_cool_widgets_verification_total` | Gauge | XX.Y | Number of Cool Widgets verified on secondary | `url` | + | `geo_cool_widgets_verified` | Gauge | XX.Y | Number of Cool Widgets' verifications failed on secondary | `url` | + | `geo_cool_widgets_verification_failed` | Gauge | XX.Y | Number of Cool Widgets' verifications tried on secondary | `url` | + ``` Cool Widget replication and verification metrics should now be available in the API, the `Admin > Geo > Nodes` view, and Prometheus. @@ -731,6 +749,14 @@ As illustrated by the above two examples, batch destroy logic cannot be handled end end ``` + +### Code Review + +When requesting review from database reviewers: + +- [ ] Include a comment mentioning that the change is based on a documented template. +- [ ] `replicables_for_current_secondary` and `available_replicables` may differ per Model. If their queries are new, then add [query plans](https://docs.gitlab.com/ee/development/database_review.html#query-plans) to the MR description. An easy place to gather SQL queries is your GDK's `log/test.log` when running tests of these methods. + ### Release Geo support of Cool Widgets - [ ] In the rollout issue you created when creating the feature flag, modify the Roll Out Steps: 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 121dbdf035f..9dfc83309cc 100644 --- a/.gitlab/issue_templates/Geo Replicate a new blob type.md +++ b/.gitlab/issue_templates/Geo Replicate a new blob type.md @@ -18,7 +18,7 @@ If your Model's pluralized form is non-standard, i.e. it doesn't just end in `s` --> -## Replicate Cool Widgets +## Replicate Cool Widgets - Blob This issue is for implementing Geo replication and verification of Cool Widgets. @@ -41,8 +41,6 @@ You can look into the following examples of MRs for implementing replication/ver ### Modify database schemas to prepare to add Geo support for Cool Widgets -You might do this section in its own merge request, but it is not required. - #### Add the registry table to track replication and verification state Geo secondary sites have a [Geo tracking database](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/geo.md#tracking-database) independent of the main database. It is used to track the replication and verification state of all replicables. Every Model has a corresponding "registry" table in the Geo tracking database. @@ -114,7 +112,7 @@ Geo secondary sites have a [Geo tracking database](https://gitlab.com/gitlab-org bin/rake db:migrate:geo ``` -- [ ] Be sure to commit the relevant changes in `ee/db/geo/structure.sql` +- [ ] Be sure to commit the relevant changes in `ee/db/geo/structure.sql` and the file created under `ee/db/geo/schema_migrations` ### Add verification state fields on the Geo primary site @@ -148,7 +146,7 @@ The Geo primary site needs to checksum every replicable so secondaries can verif t.datetime_with_timezone :verified_at t.references :cool_widget, primary_key: true, default: nil, index: false, foreign_key: { on_delete: :cascade } t.integer :verification_state, default: 0, limit: 2, null: false - t.integer :verification_retry_count, limit: 2 + t.integer :verification_retry_count, default: 0, limit: 2, null: false t.binary :verification_checksum, using: 'verification_checksum::bytea' t.text :verification_failure, limit: 255 @@ -189,7 +187,21 @@ The Geo primary site needs to checksum every replicable so secondaries can verif - [ ] If `cool_widgets` is a high-traffic table, follow [the database documentation to use `with_lock_retries`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/migration_style_guide.md#when-to-use-the-helper-method) -- [ ] Be sure to commit the relevant changes in `db/structure.sql` +- [ ] Be sure to commit the relevant changes in `db/structure.sql` and the file under `db/schema_migrations` + +- [ ] Add an entry for the state table in `db/docs/cool_widget_states.yml` + + ```yaml + --- + table_name: cool_widget_states + classes: + - Geo::CoolWidgetState + feature_categories: + - geo_replication + description: Separate table for cool widget verification states + introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/XXXXX + milestone: 'XX.Y' + ``` That's all of the required database changes. @@ -248,7 +260,7 @@ That's all of the required database changes. # @param primary_key_in [Range, CoolWidget] arg to pass to primary_key_in scope # @return [ActiveRecord::Relation<CoolWidget>] everything that should be synced to this node, restricted by primary key - def self.replicables_for_current_secondary(primary_key_in) + def replicables_for_current_secondary(primary_key_in) # This issue template does not help you write this method. # # This method is called only on Geo secondary sites. It is called when @@ -329,7 +341,6 @@ That's all of the required database changes. ```shell bin/feature-flag --ee geo_cool_widget_replication --type development --group 'group::geo' - bin/feature-flag --ee geo_cool_widget_verification --type development --group 'group::geo' ``` - [ ] Add this replicator class to the method `replicator_classes` in @@ -340,7 +351,6 @@ That's all of the required database changes. ::Geo::PackageFileReplicator, ::Geo::CoolWidgetReplicator ] - end ``` - [ ] Create `ee/spec/replicators/geo/cool_widget_replicator_spec.rb` and perform the necessary setup to define the `model_record` variable for the shared examples: @@ -439,22 +449,33 @@ That's all of the required database changes. - [ ] Add the following to `spec/factories/cool_widgets.rb`: ```ruby - trait :verification_succeeded do - with_file - verification_checksum { 'abc' } - verification_state { CoolWidget.verification_state_value(:verification_succeeded) } - end + FactoryBot.modify do + trait :verification_succeeded do + with_file + verification_checksum { 'abc' } + verification_state { CoolWidget.verification_state_value(:verification_succeeded) } + end - trait :verification_failed do - with_file - verification_failure { 'Could not calculate the checksum' } - verification_state { CoolWidget.verification_state_value(:verification_failed) } + trait :verification_failed do + with_file + verification_failure { 'Could not calculate the checksum' } + verification_state { CoolWidget.verification_state_value(:verification_failed) } + end end ``` + If there is not an existing factory for the object in `spec/factories/cool_widgets.rb`, wrap the traits in `FactoryBot.create` instead of `FactoryBot.modify` + + [ ] Make sure the factory supports the `:remote_store` trait. If not, add something like + + ```ruby + trait :remote_store do + file_store { CoolWidget::FileUploader::Store::REMOTE } + end + ``` - [ ] Make sure the factory also allows setting a `project` attribute. If the model does not have a direct relation to a project, you can use a `transient` attribute. Check out `spec/factories/merge_request_diffs.rb` for an example. -- [ ] Following [the example of Merge Request Diffs](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63309) add a `Geo::CoolWidgetState` model in `ee/app/models/ee/geo/cool_widget_state.rb`: +- [ ] Following [the example of Merge Request Diffs](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63309) add a `Geo::CoolWidgetState` model in `ee/app/models/geo/cool_widget_state.rb`: ``` ruby # frozen_string_literal: true @@ -494,6 +515,8 @@ That's all of the required database changes. end ``` +- [ ] Add `[:cool_widget, :remote_store]` and `[:geo_cool_widget_state, any]` to `skipped` in `spec/models/factories_spec.rb` + #### Step 2. Implement metrics gathering Metrics are gathered by `Geo::MetricsUpdateWorker`, persisted in `GeoNodeStatus` for display in the UI, and sent to Prometheus: @@ -514,18 +537,21 @@ Metrics are gathered by `Geo::MetricsUpdateWorker`, persisted in `GeoNodeStatus` - [ ] Add the same fields to `GET /geo_nodes/status` example response in `ee/spec/fixtures/api/schemas/public_api/v4/geo_node_status.json`. - [ ] Add the following fields to the `Sidekiq metrics` table in `doc/administration/monitoring/prometheus/gitlab_metrics.md`: - - `geo_cool_widgets` - - `geo_cool_widgets_checksum_total` - - `geo_cool_widgets_checksummed` - - `geo_cool_widgets_checksum_failed` - - `geo_cool_widgets_synced` - - `geo_cool_widgets_failed` - - `geo_cool_widgets_registry` - - `geo_cool_widgets_verification_total` - - `geo_cool_widgets_verified` - - `geo_cool_widgets_verification_failed` - -Cool Widget replication and verification metrics should now be available in the API, the `Admin > Geo > Nodes` view, and Prometheus. + + ```markdown + | `geo_cool_widgets` | Gauge | XX.Y | Number of Cool Widgets on primary | `url` | + | `geo_cool_widgets_checksum_total` | Gauge | XX.Y | Number of Cool Widgets checksummed successfully on primary | `url` | + | `geo_cool_widgets_checksummed` | Gauge | XX.Y | Number of Cool Widgets failed to calculate the checksum on primary | `url` | + | `geo_cool_widgets_checksum_failed` | Gauge | XX.Y | Number of Cool Widgets tried to checksum on primary | `url` | + | `geo_cool_widgets_synced` | Gauge | XX.Y | Number of syncable Cool Widgets synced on secondary | `url` | + | `geo_cool_widgets_failed` | Gauge | XX.Y | Number of syncable Cool Widgets failed to sync on secondary | `url` | + | `geo_cool_widgets_registry` | Gauge | XX.Y | Number of Cool Widgets in the registry | `url` | + | `geo_cool_widgets_verification_total` | Gauge | XX.Y | Number of Cool Widgets verified on secondary | `url` | + | `geo_cool_widgets_verified` | Gauge | XX.Y | Number of Cool Widgets' verifications failed on secondary | `url` | + | `geo_cool_widgets_verification_failed` | Gauge | XX.Y | Number of Cool Widgets' verifications tried on secondary | `url` | + ``` + + Cool Widget replication and verification metrics should now be available in the API, the `Admin > Geo > Nodes` view, and Prometheus. #### Step 3. Implement the GraphQL API @@ -690,6 +716,13 @@ As illustrated by the above two examples, batch destroy logic cannot be handled end ``` +### Code Review + +When requesting review from database reviewers: + +- [ ] Include a comment mentioning that the change is based on a documented template. +- [ ] `replicables_for_current_secondary` and `available_replicables` may differ per Model. If their queries are new, then add [query plans](https://docs.gitlab.com/ee/development/database_review.html#query-plans) to the MR description. An easy place to gather SQL queries is your GDK's `log/test.log` when running tests of these methods. + ### Release Geo support of Cool Widgets - [ ] In the rollout issue you created when creating the feature flag, modify the Roll Out Steps: diff --git a/.gitlab/merge_request_templates/New Version of gitlab-styles.md b/.gitlab/merge_request_templates/New Version of gitlab-styles.md index e6cde691e19..5e7f2319650 100644 --- a/.gitlab/merge_request_templates/New Version of gitlab-styles.md +++ b/.gitlab/merge_request_templates/New Version of gitlab-styles.md @@ -1,10 +1,11 @@ -<!-- Title suggestion: Upgrade `gilab-styles` to <VERSION X.Y.Z> - dry-run --> +<!-- Title suggestion: Upgrade `gitlab-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` @@ -13,8 +14,8 @@ This MR can be reused to upgrade `gitlab-styles` in this project after a new ver - [ ] 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) [Generate TODOs](https://docs.gitlab.com/ee/development/rubocop_development_guide.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/rubocop_development_guide.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` @@ -32,9 +33,7 @@ This MR can be reused to upgrade `gitlab-styles` in this project after a new ver - [ ] (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). + - [ ] (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 diff --git a/.gitlab/merge_request_templates/Security Release.md b/.gitlab/merge_request_templates/Security Release.md index 334bcb16023..b443dd7570e 100644 --- a/.gitlab/merge_request_templates/Security Release.md +++ b/.gitlab/merge_request_templates/Security Release.md @@ -27,7 +27,7 @@ See [the general developer security release guidelines](https://gitlab.com/gitla - [ ] 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. +**Note:** Reviewer/maintainer should not be a [Release Manager]. ## Maintainer checklist @@ -45,3 +45,4 @@ See [the general developer security release guidelines](https://gitlab.com/gitla [Approval Guidelines]: https://docs.gitlab.com/ee/development/code_review.html#approval-guidelines [Canonical repository]: https://gitlab.com/gitlab-org/gitlab [`e2e:package-and-test` job]: https://docs.gitlab.com/ee/development/testing_guide/end_to_end/#using-the-package-and-test-job +[Release Manager]: https://about.gitlab.com/community/release-managers/ |