From 3b1af5cc7ed2666ff18b718ce5d30fa5a2756674 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 20 Jun 2023 10:43:29 +0000 Subject: Add latest changes from gitlab-org/gitlab@16-1-stable-ee --- .gitlab/CODEOWNERS | 267 +++++----- .gitlab/ci/as-if-jh.gitlab-ci.yml | 1 + .gitlab/ci/build-images.gitlab-ci.yml | 27 +- .gitlab/ci/caching.gitlab-ci.yml | 2 +- .gitlab/ci/ci-templates.gitlab-ci.yml | 2 +- .gitlab/ci/cng/main.gitlab-ci.yml | 61 +++ .gitlab/ci/database.gitlab-ci.yml | 3 +- .gitlab/ci/dev-fixtures.gitlab-ci.yml | 6 +- .gitlab/ci/docs.gitlab-ci.yml | 4 +- .gitlab/ci/frontend.gitlab-ci.yml | 14 +- .gitlab/ci/glfm.gitlab-ci.yml | 2 +- .gitlab/ci/global.gitlab-ci.yml | 133 ++++- .gitlab/ci/graphql.gitlab-ci.yml | 2 +- .gitlab/ci/memory.gitlab-ci.yml | 4 +- .gitlab/ci/notify.gitlab-ci.yml | 25 - .../ci/package-and-test-nightly/main.gitlab-ci.yml | 112 ++-- .gitlab/ci/package-and-test/main.gitlab-ci.yml | 307 +++++++---- .gitlab/ci/preflight.gitlab-ci.yml | 28 +- .gitlab/ci/qa-common/main.gitlab-ci.yml | 124 +---- .gitlab/ci/qa-common/rules.gitlab-ci.yml | 51 +- .gitlab/ci/qa-common/variables.gitlab-ci.yml | 1 - .gitlab/ci/qa.gitlab-ci.yml | 93 ++-- .gitlab/ci/rails.gitlab-ci.yml | 592 ++++++++++++++------- .../ci/rails/rspec-foss-impact.gitlab-ci.yml.erb | 2 +- .../ci/rails/rspec-predictive.gitlab-ci.yml.erb | 4 +- .gitlab/ci/rails/shared.gitlab-ci.yml | 59 +- .gitlab/ci/release-environments/main.gitlab-ci.yml | 68 +-- .gitlab/ci/reports.gitlab-ci.yml | 9 +- .gitlab/ci/review-apps/main.gitlab-ci.yml | 56 +- .gitlab/ci/review-apps/qa.gitlab-ci.yml | 48 +- .gitlab/ci/review.gitlab-ci.yml | 27 +- .gitlab/ci/rules.gitlab-ci.yml | 252 ++++++--- .gitlab/ci/setup.gitlab-ci.yml | 47 +- .gitlab/ci/static-analysis.gitlab-ci.yml | 4 +- .gitlab/ci/test-metadata.gitlab-ci.yml | 21 +- .gitlab/ci/test-on-gdk/main.gitlab-ci.yml | 189 +++++-- .gitlab/ci/workhorse.gitlab-ci.yml | 4 +- .gitlab/issue_templates/AI Project Proposal.md | 2 +- .gitlab/issue_templates/Design Sprint.md | 33 +- .gitlab/issue_templates/Documentation.md | 2 +- .../issue_templates/Experiment Implementation.md | 4 +- .gitlab/issue_templates/Feature Proposal - lean.md | 33 +- .../issue_templates/Feature proposal - detailed.md | 35 +- .../issue_templates/Fulfillment Group UX Issue.md | 33 +- .../Geo Replicate a new Git repository type.md | 46 +- .../Geo Replicate a new blob type.md | 39 +- .../Pipeline Authoring Issue Implementation.md | 2 +- .../Pipeline Security issue implementation | 98 ++++ .gitlab/issue_templates/Problem Validation.md | 2 +- .../Remote Development Group - issue.md | 68 +++ .../Service Ping reporting and monitoring.md | 6 +- .gitlab/merge_request_templates/Default.md | 8 +- .gitlab/merge_request_templates/Deprecations.md | 4 +- .gitlab/merge_request_templates/Removals.md | 4 +- 54 files changed, 1941 insertions(+), 1129 deletions(-) create mode 100644 .gitlab/ci/cng/main.gitlab-ci.yml create mode 100644 .gitlab/issue_templates/Pipeline Security issue implementation create mode 100644 .gitlab/issue_templates/Remote Development Group - issue.md (limited to '.gitlab') diff --git a/.gitlab/CODEOWNERS b/.gitlab/CODEOWNERS index 0d6bf442a92..5db7ba5b109 100644 --- a/.gitlab/CODEOWNERS +++ b/.gitlab/CODEOWNERS @@ -30,6 +30,8 @@ GITALY_SERVER_VERSION @project_278964_bot6 @gitlab-org/maintainers/rails-backend /doc/.markdownlint/ @marcel.amirault @eread @aqualls @gitlab-org/tw-leadership /doc/.vale/ @marcel.amirault @eread @aqualls @gitlab-org/tw-leadership /lib/tasks/gitlab/tw/codeowners.rake @aqualls @gitlab-org/tw-leadership +/scripts/lint-doc.sh @marcel.amirault @eread @axil @sarahgerman @gitlab-org/tw-leadership +/scripts/lint-docs-metadata.sh @marcel.amirault @eread @axil @sarahgerman @gitlab-org/tw-leadership ^[Source code editing] .solargraph.yml.example @igor.drozdov @@ -65,6 +67,7 @@ GITALY_SERVER_VERSION @project_278964_bot6 @gitlab-org/maintainers/rails-backend /.gitlab/ci/docs.gitlab-ci.yml @gl-quality/eng-prod @gl-docsteam /.gitlab/ci/package-and-test/ @gl-quality/eng-prod @gl-quality/qe-maintainers /.gitlab/ci/qa.gitlab-ci.yml @gl-quality/eng-prod @gl-quality/qe-maintainers +/.gitlab/ci/qa-common/ @gl-quality/eng-prod @gl-quality/qe-maintainers /.gitlab/ci/releases.gitlab-ci.yml @gl-quality/eng-prod @gitlab-org/delivery /.gitlab/ci/reports.gitlab-ci.yml @gl-quality/eng-prod @gitlab-com/gl-security/appsec /.gitlab/ci/review-apps/qa.gitlab-ci.yml @gl-quality/eng-prod @gl-quality/qe-maintainers @@ -254,7 +257,7 @@ Dangerfile /ee/app/workers/merge_requests/ @garyh @patrickbajao @marc_shaw @kerrizor @dskim_gitlab /ee/app/workers/merge_request_reset_approvals_worker.rb @garyh @patrickbajao @marc_shaw @kerrizor @dskim_gitlab -^[Merge Requests frontend] @viktomas @jboyson @iamphill @thomasrandolph +^[Merge Requests frontend] @slashmanov @iamphill @thomasrandolph /app/assets/javascripts/diffs /app/assets/javascripts/batch_comments/ /app/assets/javascripts/notes @@ -278,7 +281,7 @@ Dangerfile /ee/app/assets/javascripts/vue_shared/components/customizable_dashboard/panels_base.vue /ee/app/assets/javascripts/product_analytics/ -^[Analytics Instrumentation] @gitlab-org/analytics-section/product-intelligence/engineers +^[Analytics Instrumentation] @gitlab-org/analytics-section/analytics-instrumentation/engineers /ee/lib/gitlab/usage_data_counters/ /ee/lib/ee/gitlab/usage_data.rb /lib/gitlab/usage_data.rb @@ -311,8 +314,6 @@ Dangerfile /ee/spec/lib/ee/api/entities/experiment_spec.rb ^[Growth] @gitlab-org/growth/engineers -/ee/app/workers/onboarding/ -/ee/spec/workers/onboarding/ /app/models/onboarding/ /spec/models/onboarding/ /app/services/onboarding/ @@ -359,7 +360,8 @@ Dangerfile ^[Legal] @gitlab-org/legal-reviewers /config/dependency_decisions.yml -^[Workhorse] @nolith @patrickbajao @igor.drozdov +# https://gitlab.com/groups/gitlab-org/maintainers/gitlab-workhorse/-/group_members?with_inherited_permissions=exclude +^[Workhorse] @gitlab-org/maintainers/gitlab-workhorse /workhorse/ [Application Security] @gitlab-com/gl-security/appsec @@ -377,6 +379,7 @@ Dangerfile /lib/gitlab/url_blocker.rb /lib/gitlab/url_blockers/ /lib/gitlab/utils.rb +/lib/gitlab/path_traversal.rb ^[Gitaly] @proglottis @toon lib/gitlab/git_access.rb @@ -400,42 +403,42 @@ lib/gitlab/checks/** /doc/administration/audit_reports.md @eread /doc/administration/auditor_users.md @jglassman1 /doc/administration/auth/ @jglassman1 -/doc/administration/cicd.md @drcatherinepope +/doc/administration/cicd.md @marcel.amirault /doc/administration/clusters/ @phillipwells /doc/administration/compliance.md @eread /doc/administration/configure.md @axil /doc/administration/consul.md @axil -/doc/administration/dedicated/ @drcatherinepope /doc/administration/docs_self_host.md @axil /doc/administration/encrypted_configuration.md @axil /doc/administration/environment_variables.md @axil -/doc/administration/external_pipeline_validation.md @drcatherinepope +/doc/administration/external_pipeline_validation.md @marcel.amirault /doc/administration/feature_flags.md @axil /doc/administration/file_hooks.md @eread @ashrafkhamis /doc/administration/geo/ @axil /doc/administration/get_started.md @kpaizee -/doc/administration/git_protocol.md @aqualls +/doc/administration/git_protocol.md @aqualls @msedlakjakubowski /doc/administration/gitaly/ @eread /doc/administration/housekeeping.md @eread /doc/administration/inactive_project_deletion.md @eread /doc/administration/incoming_email.md @msedlakjakubowski /doc/administration/index.md @axil /doc/administration/instance_limits.md @axil +/doc/administration/integration/diagrams_net.md @aqualls @msedlakjakubowski /doc/administration/integration/kroki.md @msedlakjakubowski /doc/administration/integration/mailgun.md @msedlakjakubowski -/doc/administration/integration/plantuml.md @aqualls +/doc/administration/integration/plantuml.md @aqualls @msedlakjakubowski /doc/administration/integration/terminal.md @phillipwells /doc/administration/invalidate_markdown_cache.md @msedlakjakubowski /doc/administration/issue_closing_pattern.md @aqualls /doc/administration/job_artifacts.md @marcel.amirault /doc/administration/job_logs.md @fneill -/doc/administration/lfs/ @aqualls +/doc/administration/lfs/ @aqualls @msedlakjakubowski /doc/administration/libravatar.md @axil /doc/administration/load_balancer.md @axil /doc/administration/logs/ @axil /doc/administration/logs/index.md @msedlakjakubowski /doc/administration/maintenance_mode/ @axil -/doc/administration/merge_request_diffs.md @aqualls +/doc/administration/merge_request_diffs.md @aqualls @msedlakjakubowski /doc/administration/monitoring/github_imports.md @eread @ashrafkhamis /doc/administration/monitoring/index.md @msedlakjakubowski /doc/administration/monitoring/ip_allowlist.md @jglassman1 @@ -447,16 +450,17 @@ lib/gitlab/checks/** /doc/administration/monitoring/prometheus/index.md @axil /doc/administration/monitoring/prometheus/pgbouncer_exporter.md @aqualls /doc/administration/monitoring/prometheus/postgres_exporter.md @aqualls -/doc/administration/monitoring/prometheus/registry_exporter.md @marcel.amirault +/doc/administration/monitoring/prometheus/registry_exporter.md @phillipwells /doc/administration/monitoring/prometheus/web_exporter.md @jglassman1 /doc/administration/nfs.md @axil /doc/administration/object_storage.md @axil /doc/administration/operations/ @axil -/doc/administration/operations/fast_ssh_key_lookup.md @aqualls -/doc/administration/operations/gitlab_sshd.md @aqualls +/doc/administration/operations/fast_ssh_key_lookup.md @aqualls @msedlakjakubowski +/doc/administration/operations/gitlab_sshd.md @aqualls @msedlakjakubowski /doc/administration/operations/moving_repositories.md @eread /doc/administration/package_information/ @axil /doc/administration/packages/ @marcel.amirault +/doc/administration/packages/index.md @phillipwells /doc/administration/polling.md @axil /doc/administration/postgresql/ @aqualls /doc/administration/postgresql/multiple_databases.md @lciutacu @@ -477,7 +481,7 @@ lib/gitlab/checks/** /doc/administration/sidekiq/sidekiq_memory_killer.md @jglassman1 /doc/administration/silent_mode/ @axil /doc/administration/smime_signing_email.md @axil -/doc/administration/snippets/ @aqualls +/doc/administration/snippets/ @aqualls @msedlakjakubowski /doc/administration/static_objects_external_storage.md @ashrafkhamis /doc/administration/system_hooks.md @eread @ashrafkhamis /doc/administration/terraform_state.md @phillipwells @@ -496,10 +500,10 @@ lib/gitlab/checks/** /doc/api/avatar.md @jglassman1 /doc/api/award_emoji.md @msedlakjakubowski /doc/api/boards.md @msedlakjakubowski -/doc/api/branches.md @aqualls +/doc/api/branches.md @aqualls @msedlakjakubowski /doc/api/bulk_imports.md @eread @ashrafkhamis /doc/api/cluster_agents.md @phillipwells -/doc/api/commits.md @aqualls +/doc/api/commits.md @aqualls @msedlakjakubowski /doc/api/container_registry.md @marcel.amirault /doc/api/custom_attributes.md @msedlakjakubowski /doc/api/dependencies.md @rdickenson @@ -507,14 +511,13 @@ lib/gitlab/checks/** /doc/api/deploy_keys.md @phillipwells /doc/api/deploy_tokens.md @phillipwells /doc/api/deployments.md @phillipwells -/doc/api/discussions.md @aqualls +/doc/api/discussions.md @aqualls @msedlakjakubowski /doc/api/dora/ @lciutacu /doc/api/draft_notes.md @aqualls /doc/api/environments.md @phillipwells /doc/api/epic_issues.md @msedlakjakubowski /doc/api/epic_links.md @msedlakjakubowski /doc/api/epics.md @msedlakjakubowski -/doc/api/error_tracking.md @drcatherinepope /doc/api/events.md @eread /doc/api/feature_flag_user_lists.md @phillipwells /doc/api/feature_flags.md @phillipwells @@ -523,7 +526,7 @@ lib/gitlab/checks/** /doc/api/geo_nodes.md @axil /doc/api/geo_sites.md @axil /doc/api/graphql/audit_report.md @eread -/doc/api/graphql/branch_rules.md @aqualls +/doc/api/graphql/branch_rules.md @aqualls @msedlakjakubowski /doc/api/graphql/custom_emoji.md @msedlakjakubowski /doc/api/graphql/getting_started.md @eread @ashrafkhamis /doc/api/graphql/index.md @eread @ashrafkhamis @@ -542,7 +545,7 @@ lib/gitlab/checks/** /doc/api/group_labels.md @msedlakjakubowski /doc/api/group_level_variables.md @marcel.amirault /doc/api/group_milestones.md @msedlakjakubowski -/doc/api/group_protected_branches.md @aqualls +/doc/api/group_protected_branches.md @aqualls @msedlakjakubowski /doc/api/group_protected_environments.md @phillipwells /doc/api/group_relations_export.md @eread @ashrafkhamis /doc/api/group_releases.md @phillipwells @@ -558,20 +561,19 @@ lib/gitlab/checks/** /doc/api/issues_statistics.md @msedlakjakubowski /doc/api/iterations.md @msedlakjakubowski /doc/api/job_artifacts.md @marcel.amirault -/doc/api/jobs.md @drcatherinepope -/doc/api/keys.md @aqualls +/doc/api/jobs.md @marcel.amirault +/doc/api/keys.md @aqualls @msedlakjakubowski /doc/api/labels.md @msedlakjakubowski /doc/api/license.md @fneill /doc/api/linked_epics.md @msedlakjakubowski /doc/api/lint.md @marcel.amirault -/doc/api/managed_licenses.md @fneill /doc/api/markdown.md @msedlakjakubowski /doc/api/member_roles.md @jglassman1 /doc/api/members.md @jglassman1 -/doc/api/merge_request_approvals.md @aqualls +/doc/api/merge_request_approvals.md @aqualls @msedlakjakubowski /doc/api/merge_request_context_commits.md @aqualls /doc/api/merge_requests.md @aqualls -/doc/api/merge_trains.md @drcatherinepope +/doc/api/merge_trains.md @marcel.amirault /doc/api/metadata.md @phillipwells /doc/api/metrics_dashboard_annotations.md @msedlakjakubowski /doc/api/metrics_user_starred_dashboards.md @msedlakjakubowski @@ -581,35 +583,36 @@ lib/gitlab/checks/** /doc/api/notification_settings.md @msedlakjakubowski /doc/api/oauth2.md @jglassman1 /doc/api/openapi/ @eread @ashrafkhamis -/doc/api/packages.md @marcel.amirault -/doc/api/packages/ @marcel.amirault +/doc/api/packages.md @phillipwells +/doc/api/packages/ @phillipwells /doc/api/personal_access_tokens.md @eread -/doc/api/pipeline_schedules.md @drcatherinepope -/doc/api/pipeline_triggers.md @drcatherinepope -/doc/api/pipelines.md @drcatherinepope +/doc/api/pipeline_schedules.md @marcel.amirault +/doc/api/pipeline_triggers.md @marcel.amirault +/doc/api/pipelines.md @marcel.amirault /doc/api/plan_limits.md @jglassman1 /doc/api/product_analytics.md @lciutacu /doc/api/project_access_tokens.md @jglassman1 -/doc/api/project_aliases.md @aqualls -/doc/api/project_badges.md @aqualls +/doc/api/project_aliases.md @aqualls @msedlakjakubowski +/doc/api/project_badges.md @aqualls @msedlakjakubowski /doc/api/project_clusters.md @phillipwells -/doc/api/project_import_export.md @aqualls +/doc/api/project_import_export.md @aqualls @msedlakjakubowski +/doc/api/project_job_token_scopes.md @marcel.amirault /doc/api/project_level_variables.md @marcel.amirault /doc/api/project_relations_export.md @eread @ashrafkhamis /doc/api/project_repository_storage_moves.md @eread -/doc/api/project_snippets.md @aqualls -/doc/api/project_statistics.md @aqualls -/doc/api/project_templates.md @aqualls +/doc/api/project_snippets.md @aqualls @msedlakjakubowski +/doc/api/project_statistics.md @aqualls @msedlakjakubowski +/doc/api/project_templates.md @aqualls @msedlakjakubowski /doc/api/project_vulnerabilities.md @rdickenson /doc/api/projects.md @lciutacu -/doc/api/protected_branches.md @aqualls +/doc/api/protected_branches.md @aqualls @msedlakjakubowski /doc/api/protected_environments.md @phillipwells -/doc/api/protected_tags.md @aqualls +/doc/api/protected_tags.md @aqualls @msedlakjakubowski /doc/api/releases/ @phillipwells -/doc/api/remote_mirrors.md @aqualls -/doc/api/repositories.md @aqualls -/doc/api/repository_files.md @aqualls -/doc/api/repository_submodules.md @aqualls +/doc/api/remote_mirrors.md @aqualls @msedlakjakubowski +/doc/api/repositories.md @aqualls @msedlakjakubowski +/doc/api/repository_files.md @aqualls @msedlakjakubowski +/doc/api/repository_submodules.md @aqualls @msedlakjakubowski /doc/api/resource_groups.md @phillipwells /doc/api/resource_iteration_events.md @msedlakjakubowski /doc/api/resource_label_events.md @eread @@ -621,18 +624,19 @@ lib/gitlab/checks/** /doc/api/saml.md @jglassman1 /doc/api/scim.md @jglassman1 /doc/api/search.md @ashrafkhamis +/doc/api/search_admin.md @ashrafkhamis /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 @aqualls -/doc/api/snippets.md @aqualls +/doc/api/snippet_repository_storage_moves.md @aqualls @msedlakjakubowski +/doc/api/snippets.md @aqualls @msedlakjakubowski /doc/api/statistics.md @jglassman1 /doc/api/status_checks.md @eread -/doc/api/suggestions.md @aqualls +/doc/api/suggestions.md @aqualls @msedlakjakubowski /doc/api/system_hooks.md @eread @ashrafkhamis -/doc/api/tags.md @aqualls -/doc/api/templates/dockerfiles.md @aqualls -/doc/api/templates/gitignores.md @aqualls +/doc/api/tags.md @aqualls @msedlakjakubowski +/doc/api/templates/dockerfiles.md @aqualls @msedlakjakubowski +/doc/api/templates/gitignores.md @aqualls @msedlakjakubowski /doc/api/templates/gitlab_ci_ymls.md @marcel.amirault /doc/api/templates/licenses.md @rdickenson /doc/api/todos.md @msedlakjakubowski @@ -640,72 +644,47 @@ lib/gitlab/checks/** /doc/api/usage_data.md @lciutacu /doc/api/users.md @jglassman1 /doc/api/version.md @phillipwells -/doc/api/visual_review_discussions.md @drcatherinepope +/doc/api/visual_review_discussions.md @marcel.amirault /doc/api/vulnerabilities.md @rdickenson /doc/api/vulnerability_exports.md @rdickenson /doc/api/vulnerability_findings.md @rdickenson /doc/architecture/blueprints/cells/ @lciutacu /doc/architecture/blueprints/database/scalability/patterns/ @aqualls /doc/architecture/blueprints/database_scaling/ @aqualls -/doc/ci/ @drcatherinepope -/doc/ci/caching/ @marcel.amirault -/doc/ci/chatops/ @eread @ashrafkhamis +/doc/ci/ @marcel.amirault +/doc/ci/chatops/ @phillipwells /doc/ci/cloud_deployment/ @phillipwells -/doc/ci/cloud_services/ @marcel.amirault -/doc/ci/components/ @marcel.amirault -/doc/ci/directed_acyclic_graph/ @marcel.amirault /doc/ci/docker/using_docker_images.md @fneill /doc/ci/environments/ @phillipwells -/doc/ci/examples/authenticating-with-hashicorp-vault/ @marcel.amirault /doc/ci/examples/deployment/ @phillipwells -/doc/ci/examples/semantic-release.md @marcel.amirault +/doc/ci/examples/semantic-release.md @phillipwells /doc/ci/interactive_web_terminal/ @fneill -/doc/ci/introduction/ @marcel.amirault -/doc/ci/jobs/ @marcel.amirault /doc/ci/large_repositories/ @fneill -/doc/ci/lint.md @marcel.amirault -/doc/ci/migration/ @marcel.amirault -/doc/ci/pipeline_editor/ @marcel.amirault -/doc/ci/pipelines/downstream_pipelines.md @marcel.amirault -/doc/ci/pipelines/index.md @marcel.amirault -/doc/ci/pipelines/pipeline_architectures.md @marcel.amirault -/doc/ci/pipelines/pipeline_artifacts.md @marcel.amirault -/doc/ci/quick_start/ @marcel.amirault /doc/ci/resource_groups/ @phillipwells /doc/ci/runners/ @fneill -/doc/ci/secrets/ @marcel.amirault -/doc/ci/secure_files/ @marcel.amirault /doc/ci/services/ @fneill -/doc/ci/ssh_keys/ @marcel.amirault /doc/ci/test_cases/ @msedlakjakubowski /doc/ci/testing/code_quality.md @rdickenson -/doc/ci/triggers/ @marcel.amirault -/doc/ci/troubleshooting.md @marcel.amirault -/doc/ci/variables/ @marcel.amirault -/doc/ci/yaml/ @marcel.amirault -/doc/ci/yaml/artifacts_reports.md @drcatherinepope /doc/development/advanced_search.md @ashrafkhamis /doc/development/application_limits.md @axil /doc/development/audit_event_guide/ @eread /doc/development/auto_devops.md @phillipwells /doc/development/backend/ @sselhorn -/doc/development/backend/create_source_code_be/ @aqualls +/doc/development/backend/create_source_code_be/ @aqualls @msedlakjakubowski /doc/development/build_test_package.md @axil /doc/development/bulk_import.md @eread @ashrafkhamis /doc/development/cached_queries.md @jglassman1 /doc/development/cascading_settings.md @jglassman1 -/doc/development/chatops_on_gitlabcom.md @eread @ashrafkhamis +/doc/development/chatops_on_gitlabcom.md @phillipwells /doc/development/cicd/ @marcel.amirault -/doc/development/cicd/cicd_tables.md @drcatherinepope -/doc/development/cicd/index.md @drcatherinepope /doc/development/code_intelligence/ @aqualls -/doc/development/code_owners/ @aqualls +/doc/development/code_owners/ @aqualls @msedlakjakubowski /doc/development/contributing/ @sselhorn /doc/development/database/ @aqualls /doc/development/database/filtering_by_label.md @msedlakjakubowski /doc/development/database/multiple_databases.md @lciutacu /doc/development/database_review.md @aqualls -/doc/development/developing_with_solargraph.md @aqualls +/doc/development/developing_with_solargraph.md @aqualls @msedlakjakubowski /doc/development/development_processes.md @sselhorn /doc/development/distributed_tracing.md @msedlakjakubowski /doc/development/distribution/ @axil @@ -715,46 +694,51 @@ lib/gitlab/checks/** /doc/development/fe_guide/dark_mode.md @sselhorn /doc/development/fe_guide/graphql.md @sselhorn /doc/development/fe_guide/merge_request_widget_extensions.md @aqualls -/doc/development/fe_guide/source_editor.md @aqualls +/doc/development/fe_guide/source_editor.md @aqualls @msedlakjakubowski /doc/development/fe_guide/view_component.md @sselhorn /doc/development/feature_categorization/ @sselhorn /doc/development/feature_development.md @sselhorn /doc/development/feature_flags/ @sselhorn -/doc/development/fips_compliance.md @aqualls +/doc/development/fips_compliance.md @aqualls @msedlakjakubowski /doc/development/geo.md @axil /doc/development/geo/ @axil /doc/development/git_object_deduplication.md @eread /doc/development/gitaly.md @eread /doc/development/gitlab_flavored_markdown/ @ashrafkhamis -/doc/development/gitlab_shell/ @aqualls +/doc/development/gitlab_shell/ @aqualls @msedlakjakubowski /doc/development/graphql_guide/ @eread @ashrafkhamis /doc/development/graphql_guide/batchloader.md @aqualls /doc/development/i18n/ @eread @ashrafkhamis +/doc/development/identity_verification.md @phillipwells /doc/development/image_scaling.md @lciutacu /doc/development/import_export.md @eread @ashrafkhamis /doc/development/index.md @sselhorn /doc/development/integrations/ @eread @ashrafkhamis /doc/development/integrations/secure.md @rdickenson /doc/development/integrations/secure_partner_integration.md @rdickenson -/doc/development/internal_api/ @aqualls +/doc/development/internal_api/ @aqualls @msedlakjakubowski /doc/development/internal_users.md @sselhorn /doc/development/issuable-like-models.md @msedlakjakubowski /doc/development/issue_types.md @msedlakjakubowski /doc/development/kubernetes.md @phillipwells /doc/development/labels/ @sselhorn -/doc/development/lfs.md @aqualls +/doc/development/lfs.md @aqualls @msedlakjakubowski /doc/development/logging.md @msedlakjakubowski /doc/development/maintenance_mode.md @axil /doc/development/merge_request_concepts/ @aqualls +/doc/development/merge_request_concepts/rate_limits.md @aqualls @msedlakjakubowski /doc/development/migration_style_guide.md @aqualls /doc/development/navigation_sidebar.md @sselhorn /doc/development/omnibus.md @axil /doc/development/organization/ @lciutacu -/doc/development/packages/ @marcel.amirault +/doc/development/packages/ @phillipwells +/doc/development/packages/cleanup_policies.md @marcel.amirault +/doc/development/packages/dependency_proxy.md @marcel.amirault /doc/development/permissions.md @jglassman1 /doc/development/policies.md @jglassman1 -/doc/development/project_templates.md @aqualls +/doc/development/project_templates.md @aqualls @msedlakjakubowski /doc/development/prometheus_metrics.md @msedlakjakubowski +/doc/development/rails_endpoints/ @aqualls @msedlakjakubowski /doc/development/real_time.md @jglassman1 /doc/development/rubocop_development_guide.md @sselhorn /doc/development/search/ @ashrafkhamis @@ -769,10 +753,10 @@ lib/gitlab/checks/** /doc/development/value_stream_analytics/ @lciutacu /doc/development/work_items.md @msedlakjakubowski /doc/development/work_items_widgets.md @msedlakjakubowski -/doc/development/workhorse/ @aqualls +/doc/development/workhorse/ @aqualls @msedlakjakubowski /doc/downgrade_ee_to_ce/ @axil /doc/drawers/ @ashrafkhamis -/doc/gitlab-basics/ @aqualls +/doc/gitlab-basics/ @aqualls @msedlakjakubowski /doc/install/ @axil /doc/install/postgresql_extensions.md @aqualls /doc/integration/ @jglassman1 @@ -792,34 +776,33 @@ lib/gitlab/checks/** /doc/integration/recaptcha.md @phillipwells /doc/integration/security_partners/ @rdickenson /doc/integration/slash_commands.md @eread @ashrafkhamis -/doc/integration/sourcegraph.md @aqualls +/doc/integration/sourcegraph.md @aqualls @msedlakjakubowski /doc/integration/trello_power_up.md @eread @ashrafkhamis /doc/integration/vault.md @phillipwells -/doc/operations/error_tracking.md @drcatherinepope /doc/operations/feature_flags.md @phillipwells /doc/operations/incident_management/ @msedlakjakubowski /doc/operations/index.md @msedlakjakubowski -/doc/operations/metrics/ @msedlakjakubowski /doc/policy/ @axil /doc/raketasks/ @axil /doc/raketasks/generate_sample_prometheus_data.md @msedlakjakubowski /doc/raketasks/migrate_snippets.md @ashrafkhamis /doc/raketasks/spdx.md @rdickenson -/doc/raketasks/x509_signatures.md @aqualls +/doc/raketasks/x509_signatures.md @aqualls @msedlakjakubowski /doc/security/ @jglassman1 /doc/security/email_verification.md @phillipwells +/doc/security/identity_verification.md @phillipwells /doc/subscriptions/ @fneill -/doc/subscriptions/gitlab_dedicated/ @drcatherinepope /doc/topics/authentication/ @jglassman1 /doc/topics/autodevops/ @phillipwells /doc/topics/data_seeder.md @sselhorn -/doc/topics/git/ @aqualls -/doc/topics/gitlab_flow.md @aqualls +/doc/topics/git/ @aqualls @msedlakjakubowski +/doc/topics/gitlab_flow.md @aqualls @msedlakjakubowski /doc/topics/offline/ @axil /doc/topics/plan_and_track.md @msedlakjakubowski /doc/tutorials/ @kpaizee /doc/tutorials/boards_for_teams/ @msedlakjakubowski /doc/tutorials/compliance_pipeline/ @eread +/doc/tutorials/configure_gitlab_runner_to_use_gke/ @fneill /doc/tutorials/convert_personal_namespace_to_group/ @lciutacu /doc/tutorials/fuzz_testing/ @rdickenson /doc/tutorials/move_personal_project_to_group/ @lciutacu @@ -828,37 +811,37 @@ lib/gitlab/checks/** /doc/update/background_migrations.md @aqualls /doc/user/admin_area/analytics/ @lciutacu /doc/user/admin_area/credentials_inventory.md @jglassman1 -/doc/user/admin_area/custom_project_templates.md @aqualls -/doc/user/admin_area/diff_limits.md @aqualls +/doc/user/admin_area/custom_project_templates.md @aqualls @msedlakjakubowski +/doc/user/admin_area/diff_limits.md @aqualls @msedlakjakubowski /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/merge_requests_approvals.md @aqualls @msedlakjakubowski /doc/user/admin_area/moderate_users.md @jglassman1 /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 @phillipwells -/doc/user/admin_area/settings/account_and_limit_settings.md @aqualls -/doc/user/admin_area/settings/continuous_integration.md @drcatherinepope -/doc/user/admin_area/settings/deprecated_api_rate_limits.md @aqualls +/doc/user/admin_area/settings/account_and_limit_settings.md @aqualls @msedlakjakubowski +/doc/user/admin_area/settings/continuous_integration.md @marcel.amirault +/doc/user/admin_area/settings/deprecated_api_rate_limits.md @aqualls @msedlakjakubowski /doc/user/admin_area/settings/email.md @msedlakjakubowski /doc/user/admin_area/settings/external_authorization.md @jglassman1 -/doc/user/admin_area/settings/files_api_rate_limits.md @aqualls -/doc/user/admin_area/settings/git_lfs_rate_limits.md @aqualls +/doc/user/admin_area/settings/files_api_rate_limits.md @aqualls @msedlakjakubowski +/doc/user/admin_area/settings/git_lfs_rate_limits.md @aqualls @msedlakjakubowski /doc/user/admin_area/settings/gitaly_timeouts.md @eread /doc/user/admin_area/settings/import_export_rate_limits.md @eread @ashrafkhamis /doc/user/admin_area/settings/incident_management_rate_limits.md @msedlakjakubowski -/doc/user/admin_area/settings/index.md @aqualls -/doc/user/admin_area/settings/instance_template_repository.md @aqualls -/doc/user/admin_area/settings/package_registry_rate_limits.md @marcel.amirault +/doc/user/admin_area/settings/index.md @aqualls @msedlakjakubowski +/doc/user/admin_area/settings/instance_template_repository.md @aqualls @msedlakjakubowski +/doc/user/admin_area/settings/package_registry_rate_limits.md @phillipwells /doc/user/admin_area/settings/project_integration_management.md @eread @ashrafkhamis -/doc/user/admin_area/settings/push_event_activities_limit.md @aqualls +/doc/user/admin_area/settings/push_event_activities_limit.md @aqualls @msedlakjakubowski /doc/user/admin_area/settings/rate_limit_on_issues_creation.md @msedlakjakubowski /doc/user/admin_area/settings/rate_limit_on_notes_creation.md @msedlakjakubowski -/doc/user/admin_area/settings/rate_limit_on_pipelines_creation.md @drcatherinepope +/doc/user/admin_area/settings/rate_limit_on_pipelines_creation.md @marcel.amirault /doc/user/admin_area/settings/rate_limit_on_projects_api.md @lciutacu /doc/user/admin_area/settings/rate_limit_on_users_api.md @jglassman1 /doc/user/admin_area/settings/scim_setup.md @jglassman1 @@ -866,11 +849,11 @@ lib/gitlab/checks/** /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 @lciutacu -/doc/user/admin_area/settings/visibility_and_access_controls.md @aqualls +/doc/user/admin_area/settings/visibility_and_access_controls.md @aqualls @msedlakjakubowski /doc/user/analytics/ @lciutacu /doc/user/analytics/ci_cd_analytics.md @phillipwells /doc/user/application_security/ @rdickenson -/doc/user/asciidoc.md @aqualls +/doc/user/asciidoc.md @aqualls @msedlakjakubowski /doc/user/award_emojis.md @msedlakjakubowski /doc/user/clusters/ @phillipwells /doc/user/compliance/ @rdickenson @@ -880,36 +863,33 @@ lib/gitlab/checks/** /doc/user/discussions/ @aqualls /doc/user/enterprise_user/ @jglassman1 /doc/user/feature_flags.md @sselhorn -/doc/user/group/access_and_permissions.md @lciutacu +/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 @aqualls -/doc/user/group/devops_adoption/ @lciutacu +/doc/user/group/custom_project_templates.md @aqualls @msedlakjakubowski /doc/user/group/epics/ @msedlakjakubowski /doc/user/group/import/ @eread @ashrafkhamis -/doc/user/group/index.md @lciutacu -/doc/user/group/insights/ @lciutacu /doc/user/group/issues_analytics/ @msedlakjakubowski /doc/user/group/iterations/ @msedlakjakubowski -/doc/user/group/manage.md @lciutacu /doc/user/group/moderate_users.md @phillipwells /doc/user/group/planning_hierarchy/ @msedlakjakubowski /doc/user/group/reporting/ @phillipwells -/doc/user/group/repositories_analytics/ @drcatherinepope +/doc/user/group/repositories_analytics/ @marcel.amirault /doc/user/group/roadmap/ @msedlakjakubowski /doc/user/group/saml_sso/ @jglassman1 /doc/user/group/settings/ @jglassman1 -/doc/user/group/subgroups/ @lciutacu -/doc/user/group/value_stream_analytics/ @lciutacu /doc/user/infrastructure/ @phillipwells +/doc/user/infrastructure/clusters/manage/management_project_applications/ @phillipwells /doc/user/infrastructure/clusters/manage/management_project_applications/runner.md @fneill /doc/user/markdown.md @msedlakjakubowski /doc/user/namespace/ @lciutacu /doc/user/okrs.md @msedlakjakubowski /doc/user/operations_dashboard/ @phillipwells /doc/user/organization/ @lciutacu -/doc/user/packages/ @marcel.amirault +/doc/user/packages/ @phillipwells +/doc/user/packages/container_registry/ @marcel.amirault +/doc/user/packages/dependency_proxy/ @marcel.amirault +/doc/user/packages/harbor_container_registry/ @marcel.amirault /doc/user/permissions.md @jglassman1 /doc/user/product_analytics/ @lciutacu /doc/user/profile/account/ @jglassman1 @@ -920,47 +900,48 @@ lib/gitlab/checks/** /doc/user/profile/notifications.md @msedlakjakubowski /doc/user/profile/personal_access_tokens.md @jglassman1 /doc/user/profile/user_passwords.md @jglassman1 -/doc/user/project/autocomplete_characters.md @aqualls +/doc/user/project/autocomplete_characters.md @aqualls @msedlakjakubowski /doc/user/project/badges.md @lciutacu -/doc/user/project/changelogs.md @aqualls +/doc/user/project/changelogs.md @aqualls @msedlakjakubowski /doc/user/project/clusters/ @phillipwells /doc/user/project/code_intelligence.md @aqualls -/doc/user/project/codeowners/ @aqualls +/doc/user/project/codeowners/ @aqualls @msedlakjakubowski /doc/user/project/deploy_boards.md @phillipwells /doc/user/project/deploy_keys/ @phillipwells /doc/user/project/deploy_tokens/ @phillipwells /doc/user/project/description_templates.md @msedlakjakubowski -/doc/user/project/file_lock.md @aqualls -/doc/user/project/git_attributes.md @aqualls -/doc/user/project/highlighting.md @aqualls +/doc/user/project/file_lock.md @aqualls @msedlakjakubowski +/doc/user/project/git_attributes.md @aqualls @msedlakjakubowski +/doc/user/project/highlighting.md @aqualls @msedlakjakubowski /doc/user/project/import/ @eread @ashrafkhamis /doc/user/project/import/jira.md @msedlakjakubowski /doc/user/project/index.md @lciutacu /doc/user/project/insights/ @lciutacu /doc/user/project/integrations/ @eread @ashrafkhamis -/doc/user/project/integrations/prometheus.md @msedlakjakubowski -/doc/user/project/integrations/prometheus_library/ @msedlakjakubowski /doc/user/project/issue_board.md @msedlakjakubowski /doc/user/project/issues/ @msedlakjakubowski /doc/user/project/issues/csv_import.md @eread @ashrafkhamis /doc/user/project/labels.md @msedlakjakubowski /doc/user/project/members/ @lciutacu /doc/user/project/merge_requests/ @aqualls +/doc/user/project/merge_requests/approvals/ @aqualls @msedlakjakubowski +/doc/user/project/merge_requests/cherry_pick_changes.md @aqualls @msedlakjakubowski /doc/user/project/merge_requests/csv_export.md @eread +/doc/user/project/merge_requests/methods/ @aqualls @msedlakjakubowski +/doc/user/project/merge_requests/squash_and_merge.md @aqualls @msedlakjakubowski /doc/user/project/merge_requests/status_checks.md @eread /doc/user/project/milestones/ @msedlakjakubowski /doc/user/project/organize_work_with_projects.md @lciutacu -/doc/user/project/protected_branches.md @aqualls -/doc/user/project/protected_tags.md @aqualls -/doc/user/project/push_options.md @aqualls +/doc/user/project/protected_branches.md @aqualls @msedlakjakubowski +/doc/user/project/protected_tags.md @aqualls @msedlakjakubowski +/doc/user/project/push_options.md @aqualls @msedlakjakubowski /doc/user/project/quick_actions.md @msedlakjakubowski /doc/user/project/releases/ @phillipwells /doc/user/project/releases/release_evidence.md @eread /doc/user/project/remote_development/ @ashrafkhamis -/doc/user/project/repository/ @aqualls +/doc/user/project/repository/ @aqualls @msedlakjakubowski /doc/user/project/repository/file_finder.md @ashrafkhamis /doc/user/project/repository/managing_large_repositories.md @axil -/doc/user/project/repository/reducing_the_repo_size_using_git.md @eread /doc/user/project/repository/vscode.md @ashrafkhamis /doc/user/project/repository/web_editor.md @ashrafkhamis /doc/user/project/requirements/ @msedlakjakubowski @@ -969,7 +950,7 @@ lib/gitlab/checks/** /doc/user/project/settings/import_export_troubleshooting.md @eread @ashrafkhamis /doc/user/project/settings/index.md @lciutacu /doc/user/project/settings/project_access_tokens.md @jglassman1 -/doc/user/project/system_notes.md @aqualls +/doc/user/project/system_notes.md @aqualls @msedlakjakubowski /doc/user/project/time_tracking.md @msedlakjakubowski /doc/user/project/web_ide/ @ashrafkhamis /doc/user/project/working_with_projects.md @lciutacu @@ -978,7 +959,7 @@ lib/gitlab/checks/** /doc/user/reserved_names.md @lciutacu /doc/user/search/ @ashrafkhamis /doc/user/shortcuts.md @ashrafkhamis -/doc/user/snippets.md @aqualls +/doc/user/snippets.md @aqualls @msedlakjakubowski /doc/user/ssh.md @jglassman1 /doc/user/tasks.md @msedlakjakubowski /doc/user/todos.md @msedlakjakubowski @@ -1299,7 +1280,6 @@ lib/gitlab/checks/** /ee/app/views/ci_minutes_usage_mailer/ /ee/app/views/projects/pipelines/ /ee/app/views/projects/settings/ci_cd/ -/ee/app/workers/clear_shared_runners_minutes_worker.rb /ee/lib/api/merge_trains.rb /ee/lib/ee/api/entities/merge_train.rb @@ -1464,6 +1444,11 @@ ee/lib/ee/api/entities/project.rb /lib/sidebars/ /ee/lib/sidebars/ +[Global Search] @gitlab-org/search-team/migration-maintainers +/ee/elastic/migrate/ +/ee/spec/elastic/migrate/ +/ee/spec/support/elastic.rb + # JiHu GitLab rules. See https://gitlab.com/gitlab-jh/gitlab-jh-enablement/-/issues/213#note_1024367528 [JH Frontend] @jihulab/maintainers/frontend diff --git a/.gitlab/ci/as-if-jh.gitlab-ci.yml b/.gitlab/ci/as-if-jh.gitlab-ci.yml index ae589ddfc2c..ec9acdb5d4d 100644 --- a/.gitlab/ci/as-if-jh.gitlab-ci.yml +++ b/.gitlab/ci/as-if-jh.gitlab-ci.yml @@ -16,6 +16,7 @@ add-jh-files: - .as-if-jh:rules:prepare-as-if-jh image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION} stage: prepare + needs: [] before_script: - source ./scripts/utils.sh - source ./scripts/setup/as-if-jh.sh diff --git a/.gitlab/ci/build-images.gitlab-ci.yml b/.gitlab/ci/build-images.gitlab-ci.yml index b866446c6e0..1361f1fe412 100644 --- a/.gitlab/ci/build-images.gitlab-ci.yml +++ b/.gitlab/ci/build-images.gitlab-ci.yml @@ -29,33 +29,20 @@ build-qa-image as-if-foss: - .as-if-foss - .build-images:rules:build-qa-image-as-if-foss -# Prepares an image with GDK configured based on code in master. This saves some time in MRs because some installation -# and complilation will have already been performed. -build-qa-on-gdk-master-image: +build-gdk-image: extends: - .base-image-build-buildx - - .build-images:rules:build-qa-on-gdk-master-image + - .build-images:rules:build-gdk-image tags: - - e2e + - high-cpu stage: build-images needs: [] - variables: - QA_GDK_IMAGE: "${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-qa-gdk" - before_script: - - !reference [.use-buildx, before_script] - - sysctl -n -w fs.inotify.max_user_watches=524288 script: - - | - docker buildx build \ - --cache-to=type=inline \ - --cache-from ${QA_GDK_IMAGE}:master \ - --platform=${ARCH:-amd64} \ - --add-host gdk.test:127.0.0.1 \ - --tag ${QA_GDK_IMAGE}:master \ - --file="qa/gdk/Dockerfile" \ - --push \ - ${CI_PROJECT_DIR} + - run_timed_command "scripts/build_gdk_image" +# NOTE: release-tools verifies the presence on this job for a commit that is +# candidate to an auto-deploy package. This job name can't be changed without +# changing the code in release-tools. build-assets-image: extends: - .base-image-build diff --git a/.gitlab/ci/caching.gitlab-ci.yml b/.gitlab/ci/caching.gitlab-ci.yml index 31975e481bc..ae4bb94b301 100644 --- a/.gitlab/ci/caching.gitlab-ci.yml +++ b/.gitlab/ci/caching.gitlab-ci.yml @@ -2,7 +2,7 @@ cache-workhorse: extends: - .default-retry - .default-before_script - - .rails-cache + - .ruby-cache - .setup-test-env-cache - .caching:rules:cache-workhorse stage: prepare diff --git a/.gitlab/ci/ci-templates.gitlab-ci.yml b/.gitlab/ci/ci-templates.gitlab-ci.yml index c6681db9685..a00de8cb533 100644 --- a/.gitlab/ci/ci-templates.gitlab-ci.yml +++ b/.gitlab/ci/ci-templates.gitlab-ci.yml @@ -4,7 +4,7 @@ templates-shellcheck: - .default-before_script - .default-retry - .ruby-cache - - .use-pg14 + - .use-pg15 stage: test needs: - setup-test-env diff --git a/.gitlab/ci/cng/main.gitlab-ci.yml b/.gitlab/ci/cng/main.gitlab-ci.yml new file mode 100644 index 00000000000..325b06d59cd --- /dev/null +++ b/.gitlab/ci/cng/main.gitlab-ci.yml @@ -0,0 +1,61 @@ +--- +default: + interruptible: true + +stages: + - prepare + - deploy + +include: + - local: .gitlab/ci/global.gitlab-ci.yml + +review-build-cng-env: + image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}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. + - 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' + - echo "GITLAB_ASSETS_TAG=$(assets_image_tag)" >> $BUILD_ENV + - ruby -e 'puts "FULL_RUBY_VERSION=#{RUBY_VERSION}"' >> build.env + - cat $BUILD_ENV + artifacts: + reports: + dotenv: $BUILD_ENV + paths: + - $BUILD_ENV + expire_in: 7 days + when: always + +review-build-cng: + stage: prepare + inherit: + variables: false + variables: + GITLAB_REF_SLUG: "${GITLAB_REF_SLUG}" + # CNG pipeline specific variables + GITLAB_VERSION: "${GITLAB_VERSION}" + GITLAB_TAG: "${GITLAB_TAG}" + GITLAB_ASSETS_TAG: "${GITLAB_ASSETS_TAG}" + FORCE_RAILS_IMAGE_BUILDS: "${FORCE_RAILS_IMAGE_BUILDS}" + CE_PIPELINE: "${CE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$CE_PIPELINE'` will evaluate to `false` when this variable is empty + EE_PIPELINE: "${EE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$EE_PIPELINE'` will evaluate to `false` when this variable is empty + GITLAB_ELASTICSEARCH_INDEXER_VERSION: "${GITLAB_ELASTICSEARCH_INDEXER_VERSION}" + GITLAB_KAS_VERSION: "${GITLAB_KAS_VERSION}" + GITLAB_METRICS_EXPORTER_VERSION: "${GITLAB_METRICS_EXPORTER_VERSION}" + GITLAB_PAGES_VERSION: "${GITLAB_PAGES_VERSION}" + GITLAB_SHELL_VERSION: "${GITLAB_SHELL_VERSION}" + GITLAB_WORKHORSE_VERSION: "${GITLAB_WORKHORSE_VERSION}" + GITALY_SERVER_VERSION: "${GITALY_SERVER_VERSION}" + RUBY_VERSION: "${FULL_RUBY_VERSION}" + trigger: + project: gitlab-org/build/CNG-mirror + branch: $TRIGGER_BRANCH + strategy: depend diff --git a/.gitlab/ci/database.gitlab-ci.yml b/.gitlab/ci/database.gitlab-ci.yml index 941cb9224fb..37befd78bb5 100644 --- a/.gitlab/ci/database.gitlab-ci.yml +++ b/.gitlab/ci/database.gitlab-ci.yml @@ -72,6 +72,7 @@ db:check-schema-single-db: db:check-migrations: extends: - .db-job-base + - .use-pg13 # Should match the db same version used by GDK - .rails:rules:ee-and-foss-mr-with-migration script: - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME --depth 20 @@ -127,7 +128,7 @@ db:backup_and_restore: script: - . scripts/prepare_build.sh - bundle exec rake db:drop db:create db:schema:load db:seed_fu - - mkdir -p tmp/tests/public/uploads tmp/tests/{artifacts,pages,lfs-objects,terraform_state,registry,packages} + - mkdir -p tmp/tests/public/uploads tmp/tests/{artifacts,pages,lfs-objects,terraform_state,registry,packages,ci_secure_files} - bundle exec rake gitlab:backup:create - date - bundle exec rake gitlab:backup:restore diff --git a/.gitlab/ci/dev-fixtures.gitlab-ci.yml b/.gitlab/ci/dev-fixtures.gitlab-ci.yml index 891a5dd79ad..642bad53772 100644 --- a/.gitlab/ci/dev-fixtures.gitlab-ci.yml +++ b/.gitlab/ci/dev-fixtures.gitlab-ci.yml @@ -1,9 +1,9 @@ .run-dev-fixtures: extends: - .default-retry - - .rails-cache + - .ruby-cache - .default-before_script - - .use-pg13 + - .use-pg14 stage: test needs: ["setup-test-env"] variables: @@ -29,7 +29,7 @@ run-dev-fixtures-ee: extends: - .run-dev-fixtures - .dev-fixtures:rules:ee-only - - .use-pg13-es7-ee + - .use-pg14-es7-ee script: - cp ee/db/fixtures/development/* $FIXTURE_PATH - *run-dev-fixtures-script diff --git a/.gitlab/ci/docs.gitlab-ci.yml b/.gitlab/ci/docs.gitlab-ci.yml index a52372a7bb4..6c426749af3 100644 --- a/.gitlab/ci/docs.gitlab-ci.yml +++ b/.gitlab/ci/docs.gitlab-ci.yml @@ -42,7 +42,7 @@ review-docs-cleanup: docs-lint links: extends: - .docs:rules:docs-lint - image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-docs/lint-html:alpine-3.17-ruby-3.2.1-f53af000 + image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-docs/lint-html:alpine-3.17-ruby-3.2.2-c24946ab stage: lint needs: [] script: @@ -116,7 +116,7 @@ docs-lint deprecations-and-removals: SETUP_DB: "false" extends: - .default-retry - - .rails-cache + - .ruby-cache - .default-before_script - .docs:rules:deprecations-and-removals stage: lint diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index 708069d9b61..34c29a9e902 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -3,7 +3,7 @@ - .default-retry - .default-before_script - .assets-compile-cache - image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}-node-16.14:rubygems-${RUBYGEMS_VERSION}-git-2.33-lfs-2.9-yarn-1.22-graphicsmagick-1.3.36 + image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}-node-18.16:rubygems-${RUBYGEMS_VERSION}-git-2.33-lfs-2.9-yarn-1.22-graphicsmagick-1.3.36 variables: SETUP_DB: "false" WEBPACK_VENDOR_DLL: "true" @@ -12,6 +12,7 @@ BROWSERSLIST_IGNORE_OLD_DATA: "true" WEBPACK_COMPILE_LOG_PATH: "tmp/webpack-output.log" stage: prepare + needs: [] script: - yarn_install_script - export GITLAB_ASSETS_HASH=$(bin/rake gitlab:assets:hash_sum) @@ -109,6 +110,7 @@ retrieve-frontend-fixtures: - .default-retry - .frontend:rules:default-frontend-jobs stage: prepare + needs: [] script: - source scripts/utils.sh - source scripts/gitlab_component_helpers.sh @@ -128,8 +130,8 @@ retrieve-frontend-fixtures: extends: - .default-retry - .default-before_script - - .rails-cache - - .use-pg13 + - .ruby-cache + - .use-pg14 stage: fixtures needs: ["setup-test-env", "retrieve-tests-metadata", "retrieve-frontend-fixtures"] variables: @@ -206,7 +208,7 @@ graphql-schema-dump: SETUP_DB: "false" extends: - .default-retry - - .rails-cache + - .ruby-cache - .default-before_script - .frontend:rules:default-frontend-jobs stage: fixtures @@ -260,7 +262,7 @@ jest: - tmp/tests/frontend/ reports: junit: junit_jest.xml - parallel: 7 + parallel: 12 jest predictive: extends: @@ -278,7 +280,7 @@ jest as-if-foss: - .frontend:rules:jest:as-if-foss - .as-if-foss needs: ["rspec-all frontend_fixture as-if-foss"] - parallel: 4 + parallel: 10 jest predictive as-if-foss: extends: diff --git a/.gitlab/ci/glfm.gitlab-ci.yml b/.gitlab/ci/glfm.gitlab-ci.yml index 008bb03de25..3f9ddaa791c 100644 --- a/.gitlab/ci/glfm.gitlab-ci.yml +++ b/.gitlab/ci/glfm.gitlab-ci.yml @@ -2,7 +2,7 @@ glfm-verify: extends: - .rails-job-base - .glfm:rules:glfm-verify - - .use-pg13 + - .use-pg14 stage: test needs: ["setup-test-env"] script: diff --git a/.gitlab/ci/global.gitlab-ci.yml b/.gitlab/ci/global.gitlab-ci.yml index 4362269103b..b5578c25518 100644 --- a/.gitlab/ci/global.gitlab-ci.yml +++ b/.gitlab/ci/global.gitlab-ci.yml @@ -146,10 +146,6 @@ cache: - *ruby-gems-cache -.rails-cache: - cache: - - *ruby-gems-cache - .static-analysis-cache: cache: - *ruby-gems-cache @@ -222,6 +218,8 @@ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-12-pgvector-0.4.1 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] alias: postgres + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12 + alias: rediscluster # configure connections in config/redis.yml - name: redis:6.0-alpine variables: POSTGRES_HOST_AUTH_METHOD: trust @@ -232,6 +230,8 @@ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-13-pgvector-0.4.1 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] alias: postgres + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12 + alias: rediscluster # configure connections in config/redis.yml - name: redis:6.2-alpine variables: POSTGRES_HOST_AUTH_METHOD: trust @@ -242,20 +242,36 @@ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-14-pgvector-0.4.1 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] alias: postgres + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12 + alias: rediscluster # configure connections in config/redis.yml - name: redis:6.2-alpine variables: POSTGRES_HOST_AUTH_METHOD: trust PG_VERSION: "14" +.use-pg15: + services: + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-15-pgvector-0.4.1 + command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] + alias: postgres + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12 + alias: rediscluster # configure connections in config/redis.yml + - name: redis:6.2-alpine + variables: + POSTGRES_HOST_AUTH_METHOD: trust + PG_VERSION: "15" + .use-pg12-es7-ee: services: - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-12-pgvector-0.4.1 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] alias: postgres + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12 + alias: rediscluster # configure connections in config/redis.yml - name: redis:6.0-alpine - name: elasticsearch:7.17.6 command: ["elasticsearch", "-E", "discovery.type=single-node", "-E", "xpack.security.enabled=false"] - - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0 + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1 alias: zoekt-ci-image variables: POSTGRES_HOST_AUTH_METHOD: trust @@ -268,10 +284,12 @@ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-13-pgvector-0.4.1 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] alias: postgres + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12 + alias: rediscluster # configure connections in config/redis.yml - name: redis:6.2-alpine - name: elasticsearch:7.17.6 command: ["elasticsearch", "-E", "discovery.type=single-node", "-E", "xpack.security.enabled=false"] - - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0 + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1 alias: zoekt-ci-image variables: POSTGRES_HOST_AUTH_METHOD: trust @@ -284,10 +302,12 @@ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-14-pgvector-0.4.1 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] alias: postgres + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12 + alias: rediscluster # configure connections in config/redis.yml - name: redis:6.2-alpine - name: elasticsearch:7.17.6 command: ["elasticsearch", "-E", "discovery.type=single-node", "-E", "xpack.security.enabled=false"] - - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0 + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1 alias: zoekt-ci-image variables: POSTGRES_HOST_AUTH_METHOD: trust @@ -295,14 +315,34 @@ ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060 ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070 +.use-pg15-es7-ee: + services: + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-15-pgvector-0.4.1 + command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] + alias: postgres + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12 + alias: rediscluster # configure connections in config/redis.yml + - name: redis:6.2-alpine + - name: elasticsearch:7.17.6 + command: ["elasticsearch", "-E", "discovery.type=single-node", "-E", "xpack.security.enabled=false"] + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1 + alias: zoekt-ci-image + variables: + POSTGRES_HOST_AUTH_METHOD: trust + PG_VERSION: "15" + ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060 + ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070 + .use-pg13-es8-ee: services: - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-13-pgvector-0.4.1 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] alias: postgres + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12 + alias: rediscluster # configure connections in config/redis.yml - name: redis:6.0-alpine - name: elasticsearch:8.6.2 - - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0 + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1 alias: zoekt-ci-image variables: POSTGRES_HOST_AUTH_METHOD: trust @@ -317,9 +357,11 @@ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-14-pgvector-0.4.1 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] alias: postgres + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12 + alias: rediscluster # configure connections in config/redis.yml - name: redis:6.0-alpine - name: elasticsearch:8.6.2 - - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0 + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1 alias: zoekt-ci-image variables: POSTGRES_HOST_AUTH_METHOD: trust @@ -329,16 +371,37 @@ ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060 ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070 +.use-pg15-es8-ee: + services: + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-15-pgvector-0.4.1 + command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] + alias: postgres + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12 + alias: rediscluster # configure connections in config/redis.yml + - name: redis:6.0-alpine + - name: elasticsearch:8.6.2 + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1 + alias: zoekt-ci-image + variables: + POSTGRES_HOST_AUTH_METHOD: trust + PG_VERSION: "15" + ES_SETTING_DISCOVERY_TYPE: "single-node" + ES_SETTING_XPACK_SECURITY_ENABLED: "false" + ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060 + ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070 + .use-pg13-opensearch1-ee: services: - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-13-pgvector-0.4.1 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] alias: postgres + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12 + alias: rediscluster # configure connections in config/redis.yml - name: redis:6.0-alpine - name: opensearchproject/opensearch:1.3.5 alias: elasticsearch command: ["bin/opensearch", "-E", "discovery.type=single-node", "-E", "plugins.security.disabled=true"] - - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0 + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1 alias: zoekt-ci-image variables: POSTGRES_HOST_AUTH_METHOD: trust @@ -351,11 +414,13 @@ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-13-pgvector-0.4.1 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] alias: postgres + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12 + alias: rediscluster # configure connections in config/redis.yml - name: redis:6.0-alpine - name: opensearchproject/opensearch:2.2.1 alias: elasticsearch command: ["bin/opensearch", "-E", "discovery.type=single-node", "-E", "plugins.security.disabled=true"] - - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0 + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1 alias: zoekt-ci-image variables: POSTGRES_HOST_AUTH_METHOD: trust @@ -368,11 +433,13 @@ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-14-pgvector-0.4.1 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] alias: postgres + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12 + alias: rediscluster # configure connections in config/redis.yml - name: redis:6.0-alpine - name: opensearchproject/opensearch:1.3.5 alias: elasticsearch command: ["bin/opensearch", "-E", "discovery.type=single-node", "-E", "plugins.security.disabled=true"] - - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0 + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1 alias: zoekt-ci-image variables: POSTGRES_HOST_AUTH_METHOD: trust @@ -385,11 +452,13 @@ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-14-pgvector-0.4.1 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] alias: postgres + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12 + alias: rediscluster # configure connections in config/redis.yml - name: redis:6.0-alpine - name: opensearchproject/opensearch:2.2.1 alias: elasticsearch command: ["bin/opensearch", "-E", "discovery.type=single-node", "-E", "plugins.security.disabled=true"] - - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0 + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1 alias: zoekt-ci-image variables: POSTGRES_HOST_AUTH_METHOD: trust @@ -397,6 +466,44 @@ ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060 ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070 +.use-pg15-opensearch1-ee: + services: + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-15-pgvector-0.4.1 + command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] + alias: postgres + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12 + alias: rediscluster # configure connections in config/redis.yml + - name: redis:6.0-alpine + - name: opensearchproject/opensearch:1.3.5 + alias: elasticsearch + command: ["bin/opensearch", "-E", "discovery.type=single-node", "-E", "plugins.security.disabled=true"] + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1 + alias: zoekt-ci-image + variables: + POSTGRES_HOST_AUTH_METHOD: trust + PG_VERSION: "15" + ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060 + ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070 + +.use-pg15-opensearch2-ee: + services: + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-15-pgvector-0.4.1 + command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] + alias: postgres + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12 + alias: rediscluster # configure connections in config/redis.yml + - name: redis:6.0-alpine + - name: opensearchproject/opensearch:2.2.1 + alias: elasticsearch + command: ["bin/opensearch", "-E", "discovery.type=single-node", "-E", "plugins.security.disabled=true"] + - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1 + alias: zoekt-ci-image + variables: + POSTGRES_HOST_AUTH_METHOD: trust + PG_VERSION: "15" + ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060 + ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070 + .use-kaniko: image: name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:kaniko diff --git a/.gitlab/ci/graphql.gitlab-ci.yml b/.gitlab/ci/graphql.gitlab-ci.yml index c4c4d500fb5..e67a7753da7 100644 --- a/.gitlab/ci/graphql.gitlab-ci.yml +++ b/.gitlab/ci/graphql.gitlab-ci.yml @@ -3,7 +3,7 @@ graphql-verify: SETUP_DB: "false" extends: - .default-retry - - .rails-cache + - .ruby-cache - .default-before_script - .graphql:rules:graphql-verify stage: test diff --git a/.gitlab/ci/memory.gitlab-ci.yml b/.gitlab/ci/memory.gitlab-ci.yml index afef2b11ee7..33fbed15a23 100644 --- a/.gitlab/ci/memory.gitlab-ci.yml +++ b/.gitlab/ci/memory.gitlab-ci.yml @@ -1,7 +1,7 @@ .only-code-memory-job-base: extends: - .default-retry - - .rails-cache + - .ruby-cache - .default-before_script - .memory:rules variables: @@ -20,7 +20,7 @@ memory-on-boot: extends: - .only-code-memory-job-base - .production - - .use-pg13 + - .use-pg14 stage: test needs: ["setup-test-env", "compile-test-assets"] variables: diff --git a/.gitlab/ci/notify.gitlab-ci.yml b/.gitlab/ci/notify.gitlab-ci.yml index 1afc4eb8c97..b8f51a2540d 100644 --- a/.gitlab/ci/notify.gitlab-ci.yml +++ b/.gitlab/ci/notify.gitlab-ci.yml @@ -3,31 +3,6 @@ dependencies: [] cache: {} -create-issues-for-failing-tests: - extends: - - .notify-defaults - - .notify:rules:create-issues-for-failing-tests - image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION} - variables: - FAILED_TESTS_DIR: "${CI_PROJECT_DIR}/tmp/failed_tests" - FAILING_ISSUES_PROJECT: "gitlab-org/quality/engineering-productivity/flaky-tests-playground" - FAILING_ISSUE_JSON_DIR: "${CI_PROJECT_DIR}/tmp/issues" - before_script: - - source ./scripts/utils.sh - - source ./scripts/rspec_helpers.sh - - install_gitlab_gem - script: - - mkdir -p "${FAILING_ISSUE_JSON_DIR}" - - retrieve_failed_tests "${FAILED_TESTS_DIR}" "json" "latest" - - scripts/pipeline/create_test_failure_issues.rb --project "${FAILING_ISSUES_PROJECT}" --tests-report-file "${FAILED_TESTS_DIR}/rspec_failed_tests.json" --issues-json-folder "${FAILING_ISSUE_JSON_DIR}" --api-token "${FAILING_ISSUES_PROJECT_TOKEN}" - - scripts/pipeline/create_test_failure_issues.rb --project "${FAILING_ISSUES_PROJECT}" --tests-report-file "${FAILED_TESTS_DIR}/rspec_ee_failed_tests.json" --issues-json-folder "${FAILING_ISSUE_JSON_DIR}" --api-token "${FAILING_ISSUES_PROJECT_TOKEN}" - artifacts: - paths: - - ${FAILED_TESTS_DIR}/ - - ${FAILING_ISSUE_JSON_DIR}/ - when: always - expire_in: 2 days - notify-package-and-test-failure: extends: - .notify-defaults diff --git a/.gitlab/ci/package-and-test-nightly/main.gitlab-ci.yml b/.gitlab/ci/package-and-test-nightly/main.gitlab-ci.yml index a5474d00cb6..34b4e853415 100644 --- a/.gitlab/ci/package-and-test-nightly/main.gitlab-ci.yml +++ b/.gitlab/ci/package-and-test-nightly/main.gitlab-ci.yml @@ -5,7 +5,7 @@ include: workflow: rules: - - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "nightly"' + - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $SCHEDULE_TYPE == "nightly"' .ce: variables: @@ -18,48 +18,84 @@ workflow: # ========================================== # Prepare stage # ========================================== -# TODO: enable once ee jobs are added -# trigger-omnibus-env: -# extends: -# - .trigger-omnibus-env +download-knapsack-report: + extends: + - .download-knapsack-report + - .rules:download-knapsack + +# ========================================== +# Test stage +# ========================================== + +# ------------------------------------------ +# Network limiting jobs +# ------------------------------------------ +airgapped: + extends: + - .qa + - .ee + - .parallel + variables: + QA_SCENARIO: "Test::Instance::Airgapped" + QA_RSPEC_TAGS: "--tag '~github' --tag '~external_api_calls' --tag '~skip_live_env'" + +instance-image-slow-network: + extends: + - .qa + - .ee + - .parallel + variables: + QA_SIMULATE_SLOW_CONNECTION: "true" -trigger-omnibus-env-ce: +# ------------------------------------------ +# N+1 jobs +# ------------------------------------------ +nplus1-instance-image: extends: - - .trigger-omnibus-env-ce + - .qa + - .ee + - .parallel variables: - FOSS_ONLY: "1" # set FOSS_ONLY because we don't pass it via trigger job + CACHE_NAMESPACE_NAME: "false" + GITLAB_QA_OPTS: "--enable-feature gitaly_enforce_requests_limits" -# TODO: enable once ee jobs are added -# trigger-omnibus: -# extends: -# - .trigger-omnibus -# needs: -# - trigger-omnibus-env +# ------------------------------------------ +# Elasticsearch compatibility jobs +# ------------------------------------------ +integration-elasticsearch-compatibility-version-7: + extends: + - .qa + - .ee + variables: + ELASTIC_VERSION: "7.17.0" + QA_SCENARIO: "Test::Integration::Elasticsearch" -trigger-omnibus-ce: +integration-elasticsearch-compatibility-version-8: extends: - - .trigger-omnibus-ce - needs: - - trigger-omnibus-env-ce + - .qa + - .ee + variables: + ELASTIC_VERSION: "8.6.2" + QA_SCENARIO: "Test::Integration::Elasticsearch" -# TODO: enable when first parallel job is added -# download-knapsack-report: -# extends: -# - .download-knapsack-report -# - .rules:download-knapsack +# ------------------------------------------ +# Opensearch compatibility jobs +# ------------------------------------------ +integration-opensearch-compatibility-version-1: + extends: + - .qa + - .ee + variables: + OPENSEARCH_VERSION: "1.3.3" + QA_SCENARIO: "Test::Integration::Opensearch" -# ========================================== -# Test stage -# ========================================== -update-ee-to-ce: +integration-opensearch-compatibility-version-2: extends: - .qa - - .update-script - - .ce + - .ee variables: - UPDATE_TYPE: minor - UPDATE_FROM_EDITION: ee - QA_RSPEC_TAGS: --tag smoke + OPENSEARCH_VERSION: "2.0.1" + QA_SCENARIO: "Test::Integration::Opensearch" # ========================================== # Post test stage @@ -68,19 +104,17 @@ e2e-test-report: extends: - .e2e-test-report -# TODO: enable when first parallel job is added -# upload-knapsack-report: -# extends: -# - .upload-knapsack-report -# - .rules:report:process-results +upload-knapsack-report: + extends: + - .upload-knapsack-report export-test-metrics: extends: - .export-test-metrics -relate-test-failures: +generate-test-session: extends: - - .relate-test-failures + - .generate-test-session notify-slack: extends: diff --git a/.gitlab/ci/package-and-test/main.gitlab-ci.yml b/.gitlab/ci/package-and-test/main.gitlab-ci.yml index e90c0bbc7c4..fcea49e3103 100644 --- a/.gitlab/ci/package-and-test/main.gitlab-ci.yml +++ b/.gitlab/ci/package-and-test/main.gitlab-ci.yml @@ -20,30 +20,6 @@ check-release-set: echo "Omnibus installation image is set to '$RELEASE'" fi -trigger-omnibus-env: - extends: - - .trigger-omnibus-env - - .rules:omnibus-build - -trigger-omnibus-env-ce: - extends: - - .trigger-omnibus-env-ce - - .rules:omnibus-build-ce - -trigger-omnibus: - extends: - - .trigger-omnibus - - .rules:omnibus-build - needs: - - trigger-omnibus-env - -trigger-omnibus-ce: - extends: - - .trigger-omnibus-ce - - .rules:omnibus-build-ce - needs: - - trigger-omnibus-env-ce - download-knapsack-report: extends: - .download-knapsack-report @@ -103,6 +79,19 @@ instance-ff-inverse: # ------------------------------------------ # Jobs with parallel variant # ------------------------------------------ + +# ========== instance =========== +instance: + extends: + - .parallel + - .qa + variables: + QA_SCENARIO: Test::Instance::Image + rules: + - !reference [.rules:test:feature-flags-set, rules] # always run instance to validate ff change + - !reference [.rules:test:qa-parallel, rules] + - if: $QA_SUITES =~ /Test::Instance::All/ + instance-selective: extends: .qa variables: @@ -110,12 +99,31 @@ instance-selective: rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -instance: + +instance-selective-parallel: extends: - .parallel - - instance-selective + - .qa + variables: + QA_SCENARIO: Test::Instance::Image + rules: + - !reference [.rules:test:qa-selective-parallel, rules] + - if: $QA_SUITES =~ /Test::Instance::All/ + variables: + QA_TESTS: "" + +# ========== praefect =========== + +praefect: + extends: + - .parallel + - .qa + parallel: 2 + variables: + QA_SCENARIO: Test::Integration::Praefect + QA_CAN_TEST_PRAEFECT: "true" + KNAPSACK_TEST_FILE_PATTERN: "qa/specs/features/**/3_create/**/*_spec.rb" rules: - - !reference [.rules:test:feature-flags-set, rules] # always run instance to validate ff change - !reference [.rules:test:qa-parallel, rules] - if: $QA_SUITES =~ /Test::Instance::All/ @@ -127,10 +135,30 @@ praefect-selective: rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -praefect: + +praefect-selective-parallel: extends: + - .qa - .parallel - - praefect-selective + parallel: 2 + variables: + QA_SCENARIO: Test::Integration::Praefect + QA_CAN_TEST_PRAEFECT: "true" + KNAPSACK_TEST_FILE_PATTERN: "qa/specs/features/**/3_create/**/*_spec.rb" + rules: + - !reference [.rules:test:qa-selective-parallel, rules] + - if: $QA_SUITES =~ /Test::Instance::All/ + variables: + QA_TESTS: "" + +# ========== relative-url =========== + +relative-url: + extends: + - .qa + - .parallel + variables: + QA_SCENARIO: Test::Instance::RelativeUrl rules: - !reference [.rules:test:qa-parallel, rules] - if: $QA_SUITES =~ /Test::Instance::All/ @@ -142,10 +170,28 @@ relative-url-selective: rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -relative-url: + +relative-url-selective-parallel: extends: + - .qa - .parallel - - relative-url-selective + variables: + QA_SCENARIO: Test::Instance::RelativeUrl + rules: + - !reference [.rules:test:qa-selective-parallel, rules] + - if: $QA_SUITES =~ /Test::Instance::All/ + variables: + QA_TESTS: "" + +# ========== decomposition-single-db =========== + +decomposition-single-db: + extends: + - .qa + - .parallel + variables: + QA_SCENARIO: Test::Instance::Image + GITLAB_QA_OPTS: --omnibus-config decomposition_single_db $EXTRA_GITLAB_QA_OPTS rules: - !reference [.rules:test:qa-parallel, rules] - if: $QA_SUITES =~ /Test::Instance::All/ @@ -158,10 +204,30 @@ decomposition-single-db-selective: rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -decomposition-single-db: + +decomposition-single-db-selective-parallel: extends: + - .qa - .parallel - - decomposition-single-db-selective + variables: + QA_SCENARIO: Test::Instance::Image + GITLAB_QA_OPTS: --omnibus-config decomposition_single_db $EXTRA_GITLAB_QA_OPTS + rules: + - !reference [.rules:test:qa-selective-parallel, rules] + - if: $QA_SUITES =~ /Test::Instance::All/ + variables: + QA_TESTS: "" + +# ========== decomposition-multiple-db =========== + +decomposition-multiple-db: + extends: + - .qa + - .parallel + variables: + QA_SCENARIO: Test::Instance::Image + GITLAB_ALLOW_SEPARATE_CI_DATABASE: "true" + GITLAB_QA_OPTS: --omnibus-config decomposition_multiple_db $EXTRA_GITLAB_QA_OPTS rules: - !reference [.rules:test:qa-parallel, rules] - if: $QA_SUITES =~ /Test::Instance::All/ @@ -175,13 +241,33 @@ decomposition-multiple-db-selective: rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -decomposition-multiple-db: + +decomposition-multiple-db-selective-parallel: extends: + - .qa - .parallel - - decomposition-multiple-db-selective + variables: + QA_SCENARIO: Test::Instance::Image + GITLAB_ALLOW_SEPARATE_CI_DATABASE: "true" + GITLAB_QA_OPTS: --omnibus-config decomposition_multiple_db $EXTRA_GITLAB_QA_OPTS rules: - - !reference [.rules:test:qa-parallel, rules] + - !reference [.rules:test:qa-selective-parallel, rules] - if: $QA_SUITES =~ /Test::Instance::All/ + variables: + QA_TESTS: "" + +# ========== object-storage =========== + +object-storage: + extends: .qa + parallel: 2 + variables: + QA_SCENARIO: Test::Instance::Image + QA_RSPEC_TAGS: --tag object_storage + GITLAB_QA_OPTS: --omnibus-config object_storage $EXTRA_GITLAB_QA_OPTS + rules: + - !reference [.rules:test:qa-parallel, rules] + - if: $QA_SUITES =~ /Test::Instance::ObjectStorage/ object-storage-selective: extends: .qa @@ -192,12 +278,30 @@ object-storage-selective: rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::ObjectStorage/ -object-storage: - extends: object-storage-selective + +object-storage-selective-parallel: + extends: .qa parallel: 2 + variables: + QA_SCENARIO: Test::Instance::Image + QA_RSPEC_TAGS: --tag object_storage + GITLAB_QA_OPTS: --omnibus-config object_storage $EXTRA_GITLAB_QA_OPTS rules: - - !reference [.rules:test:qa-parallel, rules] + - !reference [.rules:test:qa-selective-parallel, rules] - if: $QA_SUITES =~ /Test::Instance::ObjectStorage/ + variables: + QA_TESTS: "" + +# ========== object-storage-aws =========== + +object-storage-aws: + extends: object-storage + variables: + AWS_S3_ACCESS_KEY: $QA_AWS_S3_ACCESS_KEY + AWS_S3_BUCKET_NAME: $QA_AWS_S3_BUCKET_NAME + AWS_S3_KEY_ID: $QA_AWS_S3_KEY_ID + AWS_S3_REGION: $QA_AWS_S3_REGION + GITLAB_QA_OPTS: --omnibus-config object_storage_aws $EXTRA_GITLAB_QA_OPTS object-storage-aws-selective: extends: object-storage-selective @@ -207,11 +311,27 @@ object-storage-aws-selective: AWS_S3_KEY_ID: $QA_AWS_S3_KEY_ID AWS_S3_REGION: $QA_AWS_S3_REGION GITLAB_QA_OPTS: --omnibus-config object_storage_aws $EXTRA_GITLAB_QA_OPTS -object-storage-aws: - extends: object-storage-aws-selective - parallel: 2 - rules: - - !reference [object-storage, rules] + +object-storage-aws-selective-parallel: + extends: object-storage-selective-parallel + variables: + AWS_S3_ACCESS_KEY: $QA_AWS_S3_ACCESS_KEY + AWS_S3_BUCKET_NAME: $QA_AWS_S3_BUCKET_NAME + AWS_S3_KEY_ID: $QA_AWS_S3_KEY_ID + AWS_S3_REGION: $QA_AWS_S3_REGION + GITLAB_QA_OPTS: --omnibus-config object_storage_aws $EXTRA_GITLAB_QA_OPTS + + +# ========== object-storage-gcs =========== + +object-storage-gcs: + extends: object-storage + variables: + GCS_BUCKET_NAME: $QA_GCS_BUCKET_NAME + GOOGLE_PROJECT: $QA_GOOGLE_PROJECT + GOOGLE_JSON_KEY: $QA_GOOGLE_JSON_KEY + GOOGLE_CLIENT_EMAIL: $QA_GOOGLE_CLIENT_EMAIL + GITLAB_QA_OPTS: --omnibus-config object_storage_gcs $EXTRA_GITLAB_QA_OPTS object-storage-gcs-selective: extends: object-storage-selective @@ -221,55 +341,19 @@ object-storage-gcs-selective: GOOGLE_JSON_KEY: $QA_GOOGLE_JSON_KEY GOOGLE_CLIENT_EMAIL: $QA_GOOGLE_CLIENT_EMAIL GITLAB_QA_OPTS: --omnibus-config object_storage_gcs $EXTRA_GITLAB_QA_OPTS -object-storage-gcs: - extends: object-storage-gcs-selective - parallel: 2 - rules: - - !reference [object-storage, rules] -packages-selective: - extends: .qa +object-storage-gcs-selective-parallel: + extends: object-storage-selective-parallel variables: - QA_SCENARIO: Test::Instance::Image - QA_RSPEC_TAGS: --tag packages - GITLAB_QA_OPTS: --omnibus-config packages $EXTRA_GITLAB_QA_OPTS - rules: - - !reference [.rules:test:qa-selective, rules] - - if: $QA_SUITES =~ /Test::Instance::Packages/ -packages: - extends: packages-selective - parallel: 2 - rules: - - !reference [.rules:test:qa-parallel, rules] - - if: $QA_SUITES =~ /Test::Instance::Packages/ + GCS_BUCKET_NAME: $QA_GCS_BUCKET_NAME + GOOGLE_PROJECT: $QA_GOOGLE_PROJECT + GOOGLE_JSON_KEY: $QA_GOOGLE_JSON_KEY + GOOGLE_CLIENT_EMAIL: $QA_GOOGLE_CLIENT_EMAIL + GITLAB_QA_OPTS: --omnibus-config object_storage_gcs $EXTRA_GITLAB_QA_OPTS # ------------------------------------------ # Non parallel jobs # ------------------------------------------ -update-minor: - extends: - - .qa - - .update-script - variables: - UPDATE_TYPE: minor - QA_RSPEC_TAGS: --tag smoke - rules: - - !reference [.rules:test:update, rules] - - if: $QA_SUITES =~ /Test::Instance::Smoke/ - - !reference [.rules:test:manual, rules] - -update-major: - extends: - - .qa - - .update-script - variables: - UPDATE_TYPE: major - QA_RSPEC_TAGS: --tag smoke - rules: - - !reference [.rules:test:update, rules] - - if: $QA_SUITES =~ /Test::Instance::Smoke/ - - !reference [.rules:test:manual, rules] - gitlab-pages: extends: .qa variables: @@ -474,7 +558,7 @@ elasticsearch: - !reference [.rules:test:manual, rules] registry-object-storage-tls: - extends: object-storage-aws-selective + extends: object-storage-aws-selective-parallel variables: QA_SCENARIO: Test::Integration::RegistryTLS QA_RSPEC_TAGS: "" @@ -491,6 +575,47 @@ importers: - if: $QA_SUITES =~ /Test::Integration::Import/ - !reference [.rules:test:manual, rules] +# ------------------------------------------ +# Update jobs +# ------------------------------------------ +update-minor: + extends: + - .qa + - .update-script + variables: + UPDATE_TYPE: minor + QA_RSPEC_TAGS: --tag smoke + rules: + - !reference [.rules:test:update, rules] + - if: $QA_SUITES =~ /Test::Instance::Smoke/ + - !reference [.rules:test:manual, rules] + +update-major: + extends: + - .qa + - .update-script + variables: + UPDATE_TYPE: major + QA_RSPEC_TAGS: --tag smoke + rules: + - !reference [.rules:test:update, rules] + - if: $QA_SUITES =~ /Test::Instance::Smoke/ + - !reference [.rules:test:manual, rules] + +update-ee-to-ce: + extends: + - .qa + - .update-script + variables: + UPDATE_TYPE: minor + UPDATE_FROM_EDITION: ee + QA_RSPEC_TAGS: --tag smoke + rules: + - !reference [.rules:test:ce-only, rules] + - !reference [.rules:test:update, rules] + - if: $QA_SUITES =~ /Test::Instance::Smoke/ + - !reference [.rules:test:manual, rules] + # ========================================== # Post test stage # ========================================== @@ -502,18 +627,12 @@ e2e-test-report: upload-knapsack-report: extends: - .upload-knapsack-report - - .rules:report:process-results export-test-metrics: extends: - .export-test-metrics - .rules:report:process-results -relate-test-failures: - extends: - - .relate-test-failures - - .rules:report:process-results - generate-test-session: extends: - .generate-test-session diff --git a/.gitlab/ci/preflight.gitlab-ci.yml b/.gitlab/ci/preflight.gitlab-ci.yml index e477466e5f3..968402b2ea5 100644 --- a/.gitlab/ci/preflight.gitlab-ci.yml +++ b/.gitlab/ci/preflight.gitlab-ci.yml @@ -16,20 +16,23 @@ - !reference [.default-before_script, before_script] - cd qa && bundle install -rails-production-server-boot: +.rails-production-server-boot: extends: - .preflight-job-base - .default-before_script - .production - .ruby-cache - - .setup:rules:rails-production-server-boot + - .preflight:rules:rails-production-server-boot - .use-pg13 variables: BUNDLE_WITHOUT: "development:test" BUNDLE_WITH: "production" - needs: [] + +# Test the puma configuration present in `config/puma.rb.example` +rails-production-server-boot-puma-example: + extends: + - .rails-production-server-boot script: - - source scripts/utils.sh - cp config/puma.rb.example config/puma.rb - sed --in-place "s:/home/git/gitlab:${PWD}:" config/puma.rb - echo 'bind "tcp://127.0.0.1:3000"' >> config/puma.rb @@ -38,17 +41,30 @@ rails-production-server-boot: - retry_times_sleep 10 5 "curl http://127.0.0.1:3000" - kill $(jobs -p) +# Test the puma configuration present in +# https://gitlab.com/gitlab-org/build/CNG/-/raw/master/gitlab-webservice/configuration/puma.rb +rails-production-server-boot-puma-cng: + extends: + - .rails-production-server-boot + script: + - curl --silent https://gitlab.com/gitlab-org/build/CNG/-/raw/master/gitlab-webservice/configuration/puma.rb > config/puma.rb + - sed --in-place "s:/srv/gitlab:${PWD}:" config/puma.rb + - bundle exec puma --environment production --config config/puma.rb & + - sleep 40 # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114124#note_1309506358 + - retry_times_sleep 10 5 "curl http://127.0.0.1:8080" + - kill $(jobs -p) + no-ee-check: extends: - .preflight-job-base - - .setup:rules:no-ee-check + - .preflight:rules:no-ee-check script: - scripts/no-dir-check ee no-jh-check: extends: - .preflight-job-base - - .setup:rules:no-jh-check + - .preflight:rules:no-jh-check script: - scripts/no-dir-check jh diff --git a/.gitlab/ci/qa-common/main.gitlab-ci.yml b/.gitlab/ci/qa-common/main.gitlab-ci.yml index de393f94551..3b6f42ba57e 100644 --- a/.gitlab/ci/qa-common/main.gitlab-ci.yml +++ b/.gitlab/ci/qa-common/main.gitlab-ci.yml @@ -6,7 +6,7 @@ workflow: include: - project: gitlab-org/quality/pipeline-common - ref: 5.1.1 + ref: 7.2.3 file: - /ci/base.gitlab-ci.yml - /ci/allure-report.yml @@ -28,13 +28,16 @@ stages: .ruby-image: # Because this pipeline template can be included directly in other projects, # image path and registry needs to be defined explicitly - image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-bullseye-ruby-${RUBY_VERSION}:bundler-2.3 + image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}:bundler-2.3 -.qa-install: +.bundler-variables: variables: BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES: "true" BUNDLE_SILENCE_ROOT_WARNING: "true" + +.qa-install: extends: + - .bundler-variables - .gitlab-qa-install .update-script: @@ -46,8 +49,8 @@ stages: .qa: extends: + - .bundler-variables - .qa-base - - .qa-install - .gitlab-qa-report stage: test tags: @@ -59,102 +62,11 @@ stages: GITLAB_LICENSE_MODE: test GITLAB_QA_ADMIN_ACCESS_TOKEN: $QA_ADMIN_ACCESS_TOKEN GITLAB_QA_OPTS: $EXTRA_GITLAB_QA_OPTS - # todo: remove in 16.1 milestone when not needed for backwards compatibility anymore - EE_LICENSE: $QA_EE_LICENSE - GITHUB_ACCESS_TOKEN: $QA_GITHUB_ACCESS_TOKEN # Allow QA jobs to fail as they are flaky. The top level `package-and-e2e:ee` # pipeline is not allowed to fail, so without allowing QA to fail, we will be # blocking merges due to flaky tests. allow_failure: true -.trigger-omnibus-env: - 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_RUBY2_BUILD=${OMNIBUS_GITLAB_RUBY2_BUILD:-false}" >> $BUILD_ENV - echo "OMNIBUS_GITLAB_CACHE_EDITION=${OMNIBUS_GITLAB_CACHE_EDITION:-GITLAB}" >> $BUILD_ENV - echo "OMNIBUS_GITLAB_BUILD_ON_ALL_OS=${OMNIBUS_GITLAB_BUILD_ON_ALL_OS:-false}" >> $BUILD_ENV - echo "GITLAB_ASSETS_TAG=$(assets_image_tag)" >> $BUILD_ENV - echo "EE=$([[ $FOSS_ONLY == '1' ]] && echo 'false' || echo 'true')" >> $BUILD_ENV - target_branch_name="${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_COMMIT_REF_NAME}}" - echo "TRIGGER_BRANCH=$([[ "${target_branch_name}" =~ ^[0-9-]+-stable(-ee)?$ ]] && echo ${target_branch_name%-ee} || echo 'master')" >> $BUILD_ENV - - | - echo "Built environment file for omnibus build:" - cat $BUILD_ENV - artifacts: - expire_in: 3 days - reports: - dotenv: $BUILD_ENV - paths: - - $BUILD_ENV - -.trigger-omnibus-env-ce: - extends: .trigger-omnibus-env - needs: - - pipeline: $PARENT_PIPELINE_ID - job: build-assets-image as-if-foss - -.trigger-omnibus: - stage: .pre - inherit: - variables: false - variables: - GITALY_SERVER_VERSION: $GITALY_SERVER_VERSION - GITLAB_ELASTICSEARCH_INDEXER_VERSION: $GITLAB_ELASTICSEARCH_INDEXER_VERSION - GITLAB_KAS_VERSION: $GITLAB_KAS_VERSION - GITLAB_METRICS_EXPORTER_VERSION: $GITLAB_METRICS_EXPORTER_VERSION - GITLAB_PAGES_VERSION: $GITLAB_PAGES_VERSION - 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 - CACHE_UPDATE: $OMNIBUS_GITLAB_CACHE_UPDATE - RUBY3_BUILD: $OMNIBUS_GITLAB_RUBY3_BUILD - RUBY2_BUILD: $OMNIBUS_GITLAB_RUBY2_BUILD - CACHE_EDITION: $OMNIBUS_GITLAB_CACHE_EDITION - BUILD_ON_ALL_OS: $OMNIBUS_GITLAB_BUILD_ON_ALL_OS - SKIP_QA_TEST: "true" - ee: $EE - trigger: - project: gitlab-org/build/omnibus-gitlab-mirror - branch: $TRIGGER_BRANCH - strategy: depend - -.trigger-omnibus-ce: - extends: - - .trigger-omnibus - variables: - # Override gitlab repository so that omnibus doesn't use foss repository for CE build - GITLAB_ALTERNATIVE_REPO: $CI_PROJECT_URL - .download-knapsack-report: extends: - .gitlab-qa-image @@ -163,8 +75,10 @@ stages: KNAPSACK_DIR: ${CI_PROJECT_DIR}/qa/knapsack GIT_STRATEGY: none script: + - echo "KNAPSACK_TEST_FILE_PATTERN is ${KNAPSACK_TEST_FILE_PATTERN}" # when using qa-image, code runs in /home/gitlab/qa folder - bundle exec rake "knapsack:download[test]" + - '[ -n "$QA_TESTS" ] && bundle exec rake "knapsack:create_reports_for_selective"' - mkdir -p "$KNAPSACK_DIR" && cp knapsack/*.json "${KNAPSACK_DIR}/" allow_failure: true artifacts: @@ -200,26 +114,6 @@ stages: script: - bundle exec rake "ci:export_test_metrics[$QA_METRICS_REPORT_FILE_PATTERN]" -.relate-test-failures: - extends: - - .qa-install - - .ruby-image - stage: report - when: always - variables: - QA_RSPEC_JSON_FILE_PATTERN: "${CI_PROJECT_DIR}/gitlab-qa-run-*/**/rspec-*.json" - script: - - | - if [ "$SUITE_FAILED" != "true" ] && [ "$SUITE_RAN" == "true" ]; then - echo "Test suite passed. Exiting..." - exit 0 - fi - - | - bundle exec relate-failure-issue \ - --input-files "${QA_RSPEC_JSON_FILE_PATTERN}" \ - --project "gitlab-org/gitlab" \ - --token "${QA_RELATE_FAILURE_ISSUE_TOKEN}" - .generate-test-session: extends: - .qa-install diff --git a/.gitlab/ci/qa-common/rules.gitlab-ci.yml b/.gitlab/ci/qa-common/rules.gitlab-ci.yml index 3580339921d..b5963d24b81 100644 --- a/.gitlab/ci/qa-common/rules.gitlab-ci.yml +++ b/.gitlab/ci/qa-common/rules.gitlab-ci.yml @@ -1,5 +1,5 @@ # Specific specs passed -.specific-specs: &specific-specs +.specs-specified: &specs-specified if: $QA_TESTS != "" # No specific specs passed @@ -10,6 +10,14 @@ .feature-flags-set: &feature-flags-set if: $QA_FEATURE_FLAGS =~ /enabled|disabled/ +# Specific specs specified +.spec-file-specified: &spec-file-specified + if: $QA_TESTS =~ /_spec\.rb/ + +# Specs directory specified +.spec-directory-specified: &spec-directory-specified + if: $QA_TESTS != "" && $QA_TESTS !~ /_spec\.rb/ + # Manually trigger job on ff changes but with default ff state instead of inverted .feature-flags-set-manual: &feature-flags-set-manual <<: *feature-flags-set @@ -48,18 +56,6 @@ rules: - when: always -.rules:omnibus-build: - rules: - - if: $SKIP_OMNIBUS_TRIGGER == "true" - when: never - - if: $FOSS_ONLY != "1" - -.rules:omnibus-build-ce: - rules: - - if: $SKIP_OMNIBUS_TRIGGER == "true" - when: never - - if: $FOSS_ONLY == "1" - .rules:update-cache: rules: - if: '$UPDATE_QA_CACHE == "true"' @@ -96,11 +92,25 @@ when: never - <<: *feature-flags-set when: never + - <<: *spec-directory-specified + when: never + +.rules:test:qa-selective-parallel: + rules: + # always run parallel with full suite when framework changes present or ff state changed + - <<: *qa-run-all-tests + when: never + - <<: *all-specs + when: never + - <<: *feature-flags-set + when: never + - <<: *spec-file-specified + when: never .rules:test:qa-parallel: rules: - *qa-run-all-tests - - <<: *specific-specs + - <<: *specs-specified when: manual allow_failure: true variables: @@ -113,6 +123,11 @@ - *qa-run-all-tests - *feature-flags-set-manual +.rules:test:ce-only: + rules: + - if: $FOSS_ONLY != "1" + when: never + .rules:test:ee-only: rules: - if: $FOSS_ONLY == "1" @@ -124,12 +139,10 @@ # these jobs need gitlab version because we can't reliably detect it from just the image - if: $GITLAB_SEMVER_VERSION !~ /^\d+\.\d+\.\d+/ when: never - # update type tests are used to check if gitlab upgrade can be performed correctly (mainly migrations) - # there isn't much benefit in running tests after update with new sidebar enabled and there - # is also an issue to properly pass feature toggle to this job due to how gitlab-qa parses cli args - - if: $QA_SUPER_SIDEBAR_ENABLED == "true" + # $QA_SUPER_SIDEBAR_ENABLED is now only present as a variable when testing old nav so we skip update jobs + # in pipeline where it is explicitly disabled + - if: $QA_SUPER_SIDEBAR_ENABLED when: never - - !reference [.rules:test:ee-only, rules] - !reference [.rules:test:qa, rules] .rules:test:qa-default-branch: diff --git a/.gitlab/ci/qa-common/variables.gitlab-ci.yml b/.gitlab/ci/qa-common/variables.gitlab-ci.yml index 0322247a89d..817f2e0020a 100644 --- a/.gitlab/ci/qa-common/variables.gitlab-ci.yml +++ b/.gitlab/ci/qa-common/variables.gitlab-ci.yml @@ -3,7 +3,6 @@ variables: REGISTRY_HOST: "registry.gitlab.com" REGISTRY_GROUP: "gitlab-org" - SKIP_REPORT_IN_ISSUES: "true" SKIP_OMNIBUS_TRIGGER: "true" OMNIBUS_GITLAB_CACHE_UPDATE: "false" OMNIBUS_GITLAB_RUBY3_BUILD: "false" diff --git a/.gitlab/ci/qa.gitlab-ci.yml b/.gitlab/ci/qa.gitlab-ci.yml index 81127b7c113..6d181a59214 100644 --- a/.gitlab/ci/qa.gitlab-ci.yml +++ b/.gitlab/ci/qa.gitlab-ci.yml @@ -1,5 +1,5 @@ .qa-job-base: - image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-bullseye-ruby-${RUBY_VERSION}:bundler-2.3-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION} + image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}:bundler-2.3-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION} extends: - .default-retry - .qa-cache @@ -27,11 +27,13 @@ RUN_WITH_BUNDLE: "true" # instructs pipeline to install and run gitlab-qa gem via bundler QA_PATH: qa # sets the optional path for bundler to run from DYNAMIC_PIPELINE_YML: package-and-test-pipeline.yml # yml files are generated by scripts/generate-e2e-pipeline script + EXTRA_GITLAB_QA_OPTS: --set-feature-flags super_sidebar_nav_enrolled=enabled inherit: variables: - CHROME_VERSION - RUBY_VERSION - DOCKER_VERSION + - DEBIAN_VERSION - REGISTRY_GROUP - REGISTRY_HOST - OMNIBUS_GITLAB_CACHE_EDITION @@ -68,15 +70,6 @@ qa:master-auto-quarantine-dequarantine: - bundle exec confiner -r .confiner/master.yml allow_failure: true -qa:nightly-auto-quarantine-dequarantine: - extends: - - .qa-job-base - rules: - - if: '$QA_TRIGGER_AUTO_QUARANTINE =~ /true|yes|1/i' - script: - - bundle exec confiner -r .confiner/nightly.yml - allow_failure: true - qa:update-qa-cache: extends: - .qa-job-base @@ -86,13 +79,58 @@ qa:update-qa-cache: script: - echo "Cache has been updated and ready to be uploaded." +trigger-omnibus: + stage: qa + extends: + - .qa:rules:trigger-omnibus + needs: + - trigger-omnibus-env + - build-assets-image + inherit: + variables: false + variables: + GITALY_SERVER_VERSION: $GITALY_SERVER_VERSION + GITLAB_ELASTICSEARCH_INDEXER_VERSION: $GITLAB_ELASTICSEARCH_INDEXER_VERSION + GITLAB_KAS_VERSION: $GITLAB_KAS_VERSION + GITLAB_METRICS_EXPORTER_VERSION: $GITLAB_METRICS_EXPORTER_VERSION + GITLAB_PAGES_VERSION: $GITLAB_PAGES_VERSION + 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 + CACHE_UPDATE: $OMNIBUS_GITLAB_CACHE_UPDATE + RUBY3_BUILD: $OMNIBUS_GITLAB_RUBY3_BUILD + RUBY2_BUILD: $OMNIBUS_GITLAB_RUBY2_BUILD + CACHE_EDITION: $OMNIBUS_GITLAB_CACHE_EDITION + BUILD_ON_ALL_OS: $OMNIBUS_GITLAB_BUILD_ON_ALL_OS + SKIP_QA_TEST: "true" + ee: $EE + trigger: + project: gitlab-org/build/omnibus-gitlab-mirror + branch: $TRIGGER_BRANCH + strategy: depend + +trigger-omnibus as-if-foss: + extends: + - trigger-omnibus + - .qa:rules:trigger-omnibus-ce + needs: + - trigger-omnibus-env as-if-foss + - build-assets-image as-if-foss + variables: + # Override gitlab repository so that omnibus doesn't use foss repository for CE build + GITLAB_ALTERNATIVE_REPO: $CI_PROJECT_URL + e2e:package-and-test-ee: extends: - .e2e-trigger-base - .qa:rules:package-and-test-ee needs: - - build-assets-image - build-qa-image + - trigger-omnibus - e2e-test-pipeline-generate variables: RELEASE: "${REGISTRY_HOST}/${REGISTRY_GROUP}/build/omnibus-gitlab-mirror/gitlab-ee:${CI_COMMIT_SHA}" @@ -105,8 +143,8 @@ e2e:package-and-test-ce: - e2e:package-and-test-ee - .qa:rules:package-and-test-ce needs: - - build-assets-image as-if-foss - build-qa-image as-if-foss + - trigger-omnibus as-if-foss - e2e-test-pipeline-generate variables: FOSS_ONLY: "1" @@ -116,27 +154,25 @@ e2e:package-and-test-ce: ALLURE_JOB_NAME: e2e-package-and-test-ce PIPELINE_NAME: E2E Omnibus GitLab CE -e2e:package-and-test-super-sidebar: +e2e:package-and-test-old-nav: extends: - - e2e:package-and-test-ee - - .qa:rules:package-and-test-sidebar - when: manual + - .e2e-trigger-base + - .qa:rules:package-and-test-old-nav variables: - QA_SUPER_SIDEBAR_ENABLED: "true" - EXTRA_GITLAB_QA_OPTS: --set-feature-flags super_sidebar_nav=enabled - QA_RUN_TYPE: e2e-package-and-test-super-sidebar - ALLURE_JOB_NAME: e2e-package-and-test-super-sidebar - PIPELINE_NAME: E2E Omnibus Super Sidebar + RELEASE: "${REGISTRY_HOST}/${REGISTRY_GROUP}/build/omnibus-gitlab-mirror/gitlab-ee:${CI_COMMIT_SHA}" + QA_RUN_TYPE: e2e-package-and-test-old-nav + ALLURE_JOB_NAME: e2e-package-and-test-old-nav + PIPELINE_NAME: E2E Omnibus Old Navigation + QA_SUPER_SIDEBAR_ENABLED: "false" + EXTRA_GITLAB_QA_OPTS: "" e2e:package-and-test-nightly: extends: - .e2e-trigger-base - .qa:rules:package-and-test-nightly needs: - - build-assets-image - - build-assets-image as-if-foss - build-qa-image - - build-qa-image as-if-foss + - trigger-omnibus - e2e-test-pipeline-generate variables: GITLAB_SEMVER_VERSION: $GITLAB_SEMVER_VERSION @@ -151,16 +187,13 @@ e2e:test-on-gdk: - .qa:rules:e2e:test-on-gdk stage: qa needs: - # In scheduled master pipelines we wait for the image to be built. - # In MRs we assume the last scheduled master pipeline built the image already. - - job: build-qa-on-gdk-master-image - optional: true - - job: e2e-test-pipeline-generate - artifacts: true + - build-gdk-image + - e2e-test-pipeline-generate variables: ALLURE_JOB_NAME: e2e-test-on-gdk QA_RUN_TYPE: e2e-test-on-gdk PIPELINE_NAME: E2E GDK DYNAMIC_PIPELINE_YML: test-on-gdk-pipeline.yml SKIP_MESSAGE: Skipping test-on-gdk due to mr containing only quarantine changes! + GDK_IMAGE: "${CI_REGISTRY_IMAGE}/gitlab-qa-gdk:${CI_COMMIT_SHA}" allow_failure: true diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index a4041f771d9..0df6ef0cacd 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -9,6 +9,7 @@ setup-test-env: - .setup-test-env-cache - .rails:rules:setup-test-env stage: prepare + needs: [] variables: SETUP_DB: "false" script: @@ -64,127 +65,145 @@ update-gitaly-binaries-cache: - export BUNDLE_WITHOUT="${BUNDLE_WITHOUT}:default:test:puma:kerberos:metrics:omnibus:ed25519" - bundle_install_script -rspec migration pg13: +rspec migration pg14: extends: - - .rspec-base-pg13 + - .rspec-base-pg14 - .rspec-base-migration - .rails:rules:ee-and-foss-migration - .rspec-migration-parallel -rspec background_migration pg13: +rspec background_migration pg14: extends: - - .rspec-base-pg13 + - .rspec-base-pg14 - .rspec-base-migration - .rails:rules:ee-and-foss-background-migration - .rspec-background-migration-parallel -rspec migration pg13 single-db: +rspec migration pg14 single-db: extends: - - rspec migration pg13 + - rspec migration pg14 - .single-db-rspec - .rails:rules:single-db -rspec background_migration pg13 single-db: +rspec background_migration pg14 single-db: extends: - - rspec background_migration pg13 + - rspec background_migration pg14 - .single-db-rspec - .rails:rules:single-db -rspec migration pg13 single-db-ci-connection: +rspec migration pg14 single-db-ci-connection: extends: - - rspec migration pg13 + - rspec migration pg14 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec background_migration pg13 single-db-ci-connection: +rspec background_migration pg14 single-db-ci-connection: extends: - - rspec background_migration pg13 + - rspec background_migration pg14 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec migration pg13 praefect: +rspec migration pg14 praefect: extends: - - rspec migration pg13 + - rspec migration pg14 - .praefect-with-db - .rails:rules:praefect-with-db -rspec background_migration pg13 praefect: +rspec background_migration pg14 praefect: extends: - - rspec background_migration pg13 + - rspec background_migration pg14 - .praefect-with-db - .rails:rules:praefect-with-db -rspec unit pg13: +rspec unit pg14: extends: - - .rspec-base-pg13 + - .rspec-base-pg14 - .rails:rules:ee-and-foss-unit - .rspec-unit-parallel -rspec unit pg13 single-db: +rspec unit pg14 single-redis: + extends: + - rspec unit pg14 + - .no-redis-cluster + - .rails:rules:single-redis + +rspec unit pg14 single-db: extends: - - rspec unit pg13 + - rspec unit pg14 - .single-db-rspec - .rails:rules:single-db -rspec unit pg13 single-db-ci-connection: +rspec unit pg14 single-db-ci-connection: extends: - - rspec unit pg13 + - rspec unit pg14 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec unit pg13 praefect: +rspec unit pg14 praefect: extends: - - rspec unit pg13 + - rspec unit pg14 - .praefect-with-db - .rails:rules:praefect-with-db -rspec integration pg13: +rspec integration pg14: extends: - - .rspec-base-pg13 + - .rspec-base-pg14 - .rails:rules:ee-and-foss-integration - .rspec-integration-parallel -rspec integration pg13 single-db: +rspec integration pg14 single-redis: extends: - - rspec integration pg13 + - rspec integration pg14 + - .no-redis-cluster + - .rails:rules:single-redis + +rspec integration pg14 single-db: + extends: + - rspec integration pg14 - .single-db-rspec - .rails:rules:single-db -rspec integration pg13 single-db-ci-connection: +rspec integration pg14 single-db-ci-connection: extends: - - rspec integration pg13 + - rspec integration pg14 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec integration pg13 praefect: +rspec integration pg14 praefect: extends: - - rspec integration pg13 + - rspec integration pg14 - .praefect-with-db - .rails:rules:praefect-with-db -rspec system pg13: +rspec system pg14: extends: - - .rspec-base-pg13 + - .rspec-base-pg14 - .rails:rules:ee-and-foss-system - .rspec-system-parallel variables: DEBUG_GITLAB_TRANSACTION_STACK: "true" -rspec system pg13 single-db: +rspec system pg14 single-redis: extends: - - rspec system pg13 + - rspec system pg14 + - .no-redis-cluster + - .rails:rules:single-redis + +rspec system pg14 single-db: + extends: + - rspec system pg14 - .single-db-rspec - .rails:rules:single-db -rspec system pg13 single-db-ci-connection: +rspec system pg14 single-db-ci-connection: extends: - - rspec system pg13 + - rspec system pg14 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec system pg13 praefect: +rspec system pg14 praefect: extends: - - rspec system pg13 + - rspec system pg14 - .praefect-with-db - .rails:rules:praefect-with-db @@ -198,9 +217,19 @@ rspec db-library-code pg12: - !reference [.base-script, script] - rspec_db_library_code -rspec fast_spec_helper: +# Dedicated job to test DB library code against PG13. +# Note that these are already tested against PG13 in the `rspec unit pg13` / `rspec-ee unit pg13` jobs. +rspec db-library-code pg13: extends: - .rspec-base-pg13 + - .rails:rules:ee-and-foss-db-library-code + script: + - !reference [.base-script, script] + - rspec_db_library_code + +rspec fast_spec_helper: + extends: + - .rspec-base-pg14 - .rails:rules:ee-and-foss-fast_spec_helper script: - fast_spec_helper_specs=$(git grep -l -E '^require.*fast_spec_helper') @@ -232,19 +261,15 @@ rspec:deprecations: - .rails:rules:deprecations stage: post-test allow_failure: true - # We cannot use needs since it would mean needing 84 jobs (since most are parallelized) - # so we use `dependencies` here. - dependencies: - - rspec migration pg13 - - rspec background_migration pg13 - - rspec unit pg13 - - rspec integration pg13 - - rspec system pg13 - - rspec-ee migration pg13 - - rspec-ee background_migration pg13 - - rspec-ee unit pg13 - - rspec-ee integration pg13 - - rspec-ee system pg13 + needs: + - job: rspec:artifact-collector unit + optional: true + - job: rspec:artifact-collector system + optional: true + - job: rspec:artifact-collector remainder + optional: true + - job: rspec:artifact-collector ee + optional: true variables: SETUP_DB: "false" script: @@ -257,35 +282,150 @@ rspec:deprecations: paths: - deprecations/ +# The jobs built upon `.artifact-collector` are to work around the +# needs: [] limit of a maximum of 50 dependencies. +# These intermediate jobs allow us to collect the artifacts of +# more than 50 jobs and still use `needs:` to ensure a timely execution +.artifact-collector: + stage: post-test + variables: + GIT_STRATEGY: none + image: alpine:3.17 + script: + - mkdir -p coverage deprecations rspec + - ls coverage/ deprecations/ rspec/ + artifacts: + expire_in: 7d + when: always + paths: + - coverage/ + - deprecations/ + - rspec/ + +rspec:artifact-collector unit: + extends: + - .artifact-collector + - .rails:rules:ee-and-foss-unit + needs: + - rspec unit pg14 # 28 jobs + +rspec:artifact-collector system: + extends: + - .artifact-collector + - .rails:rules:ee-and-foss-system + needs: + - rspec system pg14 # 28 jobs + +rspec:artifact-collector remainder: + extends: + - .artifact-collector + needs: + - job: rspec integration pg14 # 12 jobs + optional: true + - job: rspec migration pg14 # 8 jobs + optional: true + - job: rspec background_migration pg14 # 4 jobs + optional: true + +rspec:artifact-collector as-if-foss unit: + extends: + - .artifact-collector + - .rails:rules:as-if-foss-unit + needs: + - rspec unit pg14-as-if-foss # 28 jobs + +rspec:artifact-collector as-if-foss system: + extends: + - .artifact-collector + - .rails:rules:as-if-foss-system + needs: + - rspec system pg14-as-if-foss # 28 jobs + +rspec:artifact-collector as-if-foss remainder: + extends: + - .artifact-collector + needs: + - job: rspec integration pg14-as-if-foss # 12 jobs + optional: true + - job: rspec migration pg14-as-if-foss # 8 jobs + optional: true + - job: rspec background_migration pg14-as-if-foss # 4 jobs + optional: true + +rspec:artifact-collector single-redis: + extends: + - .artifact-collector + - .rails:rules:single-redis + needs: + - rspec unit pg14 single-redis # 28 jobs + - rspec integration pg14 single-redis # 12 jobs + +rspec:artifact-collector system single-redis: + extends: + - .artifact-collector + - .rails:rules:single-redis + needs: + - rspec system pg14 single-redis # 28 jobs + +rspec:artifact-collector ee single-redis: + extends: + - .artifact-collector + needs: + - job: rspec-ee unit pg14 single-redis # 18 jobs + optional: true + - job: rspec-ee integration pg14 single-redis # 6 jobs + optional: true + - job: rspec-ee system pg14 single-redis # 10 jobs + optional: true + +rspec:artifact-collector ee: + extends: + - .artifact-collector + needs: + - job: rspec-ee migration pg14 # 2 jobs + optional: true + - job: rspec-ee background_migration pg14 # 2 jobs + optional: true + - job: rspec-ee unit pg14 # 18 jobs + optional: true + - job: rspec-ee integration pg14 # 6 jobs + optional: true + - job: rspec-ee system pg14 # 10 jobs + optional: true + rspec:coverage: extends: - .coverage-base - .rails:rules:rspec-coverage stage: post-test - # We cannot use needs since it would mean needing 84 jobs (since most are parallelized) - # so we use `dependencies` here. - dependencies: + needs: - setup-test-env # FOSS/EE jobs - - rspec migration pg13 - - rspec background_migration pg13 - - rspec unit pg13 - - rspec integration pg13 - - rspec system pg13 + - job: rspec:artifact-collector unit + optional: true + - job: rspec:artifact-collector system + optional: true + - job: rspec:artifact-collector remainder + optional: true + - job: rspec:artifact-collector single-redis + optional: true + - job: rspec:artifact-collector system single-redis + optional: true # as-if-foss jobs - - rspec migration pg13-as-if-foss - - rspec background_migration pg13-as-if-foss - - rspec unit pg13-as-if-foss - - rspec integration pg13-as-if-foss - - rspec system pg13-as-if-foss + - job: rspec:artifact-collector as-if-foss unit + optional: true + - job: rspec:artifact-collector as-if-foss system + optional: true + - job: rspec:artifact-collector as-if-foss remainder + optional: true # EE jobs - - rspec-ee migration pg13 - - rspec-ee background_migration pg13 - - rspec-ee unit pg13 - - rspec-ee integration pg13 - - rspec-ee system pg13 + - job: rspec:artifact-collector ee single-redis + optional: true + - job: rspec:artifact-collector ee + optional: true # Memory jobs - - memory-on-boot + - job: memory-on-boot + optional: true script: - run_timed_command "bundle exec scripts/merge-simplecov" coverage: '/LOC \((\d+\.\d+%)\) covered.$/' @@ -342,9 +482,7 @@ rspec:flaky-tests-report: - .default-retry - .rails:rules:flaky-tests-report stage: post-test - # We cannot use needs since it would mean needing 84 jobs (since most are parallelized) - # so we use `dependencies` here. - dependencies: !reference ["rspec:coverage", "dependencies"] + needs: !reference ["rspec:coverage", "needs"] variables: SKIPPED_TESTS_REPORT_PATH: rspec/skipped_tests_report.txt RETRIED_TESTS_REPORT_PATH: rspec/flaky/retried_tests_report.txt @@ -413,214 +551,232 @@ rspec-ee:predictive:trigger: - artifact: "${RSPEC_PREDICTIVE_PIPELINE_TEMPLATE_YML}-ee.yml" job: rspec-predictive:pipeline-generate -rspec migration pg13-as-if-foss: +rspec migration pg14-as-if-foss: extends: - - .rspec-base-pg13-as-if-foss + - .rspec-base-pg14-as-if-foss - .rspec-base-migration - .rails:rules:as-if-foss-migration - .rspec-migration-parallel -rspec background_migration pg13-as-if-foss: +rspec background_migration pg14-as-if-foss: extends: - - .rspec-base-pg13-as-if-foss + - .rspec-base-pg14-as-if-foss - .rspec-base-migration - .rails:rules:as-if-foss-background-migration - .rspec-background-migration-parallel -rspec migration pg13-as-if-foss single-db: +rspec migration pg14-as-if-foss single-db: extends: - - rspec migration pg13-as-if-foss + - rspec migration pg14-as-if-foss - .single-db-rspec - .rails:rules:single-db -rspec background_migration pg13-as-if-foss single-db: +rspec background_migration pg14-as-if-foss single-db: extends: - - rspec background_migration pg13-as-if-foss + - rspec background_migration pg14-as-if-foss - .single-db-rspec - .rails:rules:single-db -rspec migration pg13-as-if-foss single-db-ci-connection: +rspec migration pg14-as-if-foss single-db-ci-connection: extends: - - rspec migration pg13-as-if-foss + - rspec migration pg14-as-if-foss - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec background_migration pg13-as-if-foss single-db-ci-connection: +rspec background_migration pg14-as-if-foss single-db-ci-connection: extends: - - rspec background_migration pg13-as-if-foss + - rspec background_migration pg14-as-if-foss - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec unit pg13-as-if-foss: +rspec unit pg14-as-if-foss: extends: - - .rspec-base-pg13-as-if-foss + - .rspec-base-pg14-as-if-foss - .rails:rules:as-if-foss-unit - .rspec-unit-parallel -rspec unit pg13-as-if-foss single-db: +rspec unit pg14-as-if-foss single-db: extends: - - rspec unit pg13-as-if-foss + - rspec unit pg14-as-if-foss - .single-db-rspec - .rails:rules:single-db -rspec unit pg13-as-if-foss single-db-ci-connection: +rspec unit pg14-as-if-foss single-db-ci-connection: extends: - - rspec unit pg13-as-if-foss + - rspec unit pg14-as-if-foss - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec integration pg13-as-if-foss: +rspec integration pg14-as-if-foss: extends: - - .rspec-base-pg13-as-if-foss + - .rspec-base-pg14-as-if-foss - .rails:rules:as-if-foss-integration - .rspec-integration-parallel -rspec integration pg13-as-if-foss single-db: +rspec integration pg14-as-if-foss single-db: extends: - - rspec integration pg13-as-if-foss + - rspec integration pg14-as-if-foss - .single-db-rspec - .rails:rules:single-db -rspec integration pg13-as-if-foss single-db-ci-connection: +rspec integration pg14-as-if-foss single-db-ci-connection: extends: - - rspec integration pg13-as-if-foss + - rspec integration pg14-as-if-foss - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec system pg13-as-if-foss: +rspec system pg14-as-if-foss: extends: - - .rspec-base-pg13-as-if-foss + - .rspec-base-pg14-as-if-foss - .rails:rules:as-if-foss-system - .rspec-system-parallel -rspec system pg13-as-if-foss single-db: +rspec system pg14-as-if-foss single-db: extends: - - rspec system pg13-as-if-foss + - rspec system pg14-as-if-foss - .single-db-rspec - .rails:rules:single-db -rspec system pg13-as-if-foss single-db-ci-connection: +rspec system pg14-as-if-foss single-db-ci-connection: extends: - - rspec system pg13-as-if-foss + - rspec system pg14-as-if-foss - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec-ee migration pg13: +rspec-ee migration pg14: extends: - - .rspec-ee-base-pg13 + - .rspec-ee-base-pg14 - .rspec-base-migration - .rails:rules:ee-only-migration - .rspec-ee-migration-parallel -rspec-ee background_migration pg13: +rspec-ee background_migration pg14: extends: - - .rspec-ee-base-pg13 + - .rspec-ee-base-pg14 - .rspec-base-migration - .rails:rules:ee-only-background-migration - .rspec-ee-background-migration-parallel -rspec-ee migration pg13 single-db: +rspec-ee migration pg14 single-db: extends: - - rspec-ee migration pg13 + - rspec-ee migration pg14 - .single-db-rspec - .rails:rules:single-db -rspec-ee background_migration pg13 single-db: +rspec-ee background_migration pg14 single-db: extends: - - rspec-ee background_migration pg13 + - rspec-ee background_migration pg14 - .single-db-rspec - .rails:rules:single-db -rspec-ee migration pg13 single-db-ci-connection: +rspec-ee migration pg14 single-db-ci-connection: extends: - - rspec-ee migration pg13 + - rspec-ee migration pg14 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec-ee background_migration pg13 single-db-ci-connection: +rspec-ee background_migration pg14 single-db-ci-connection: extends: - - rspec-ee background_migration pg13 + - rspec-ee background_migration pg14 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec-ee migration pg13 praefect: +rspec-ee migration pg14 praefect: extends: - - rspec migration pg13 + - rspec migration pg14 - .praefect-with-db - .rails:rules:praefect-with-db -rspec-ee background_migration pg13 praefect: +rspec-ee background_migration pg14 praefect: extends: - - rspec background_migration pg13 + - rspec background_migration pg14 - .praefect-with-db - .rails:rules:praefect-with-db -rspec-ee unit pg13: +rspec-ee unit pg14: extends: - - .rspec-ee-base-pg13 + - .rspec-ee-base-pg14 - .rails:rules:ee-only-unit - .rspec-ee-unit-parallel -rspec-ee unit pg13 es8: +rspec-ee unit pg14 es8: extends: - - .rspec-ee-base-pg13-es8 + - .rspec-ee-base-pg14-es8 - .rspec-ee-unit-parallel -rspec-ee unit pg13 single-db: +rspec-ee unit pg14 single-db: extends: - - rspec-ee unit pg13 + - rspec-ee unit pg14 - .single-db-rspec - .rails:rules:single-db -rspec-ee unit pg13 single-db-ci-connection: +rspec-ee unit pg14 single-redis: extends: - - rspec-ee unit pg13 + - rspec-ee unit pg14 + - .no-redis-cluster + - .rails:rules:single-redis + +rspec-ee unit pg14 single-db-ci-connection: + extends: + - rspec-ee unit pg14 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec-ee integration pg13: +rspec-ee integration pg14: extends: - - .rspec-ee-base-pg13 + - .rspec-ee-base-pg14 - .rails:rules:ee-only-integration - .rspec-ee-integration-parallel -rspec-ee integration pg13 es8: +rspec-ee integration pg14 es8: extends: - - .rspec-ee-base-pg13-es8 + - .rspec-ee-base-pg14-es8 - .rspec-ee-integration-parallel -rspec-ee integration pg13 single-db: +rspec-ee integration pg14 single-db: extends: - - rspec-ee integration pg13 + - rspec-ee integration pg14 - .single-db-rspec - .rails:rules:single-db -rspec-ee integration pg13 single-db-ci-connection: +rspec-ee integration pg14 single-redis: + extends: + - rspec-ee integration pg14 + - .no-redis-cluster + - .rails:rules:single-redis + +rspec-ee integration pg14 single-db-ci-connection: extends: - - rspec-ee integration pg13 + - rspec-ee integration pg14 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec-ee system pg13: +rspec-ee system pg14: extends: - - .rspec-ee-base-pg13 + - .rspec-ee-base-pg14 - .rails:rules:ee-only-system - .rspec-ee-system-parallel -rspec-ee system pg13 es8: +rspec-ee system pg14 es8: extends: - - .rspec-ee-base-pg13-es8 + - .rspec-ee-base-pg14-es8 - .rspec-ee-system-parallel -rspec-ee system pg13 single-db: +rspec-ee system pg14 single-db: extends: - - rspec-ee system pg13 + - rspec-ee system pg14 - .single-db-rspec - .rails:rules:single-db -rspec-ee system pg13 single-db-ci-connection: +rspec-ee system pg14 single-redis: + extends: + - rspec-ee system pg14 + - .no-redis-cluster + - .rails:rules:single-redis + +rspec-ee system pg14 single-db-ci-connection: extends: - - rspec-ee system pg13 + - rspec-ee system pg14 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection # EE: default refs (MRs, default branch, schedules) jobs # @@ -662,36 +818,69 @@ rspec system pg12: - .rails:rules:rspec-on-pg12 - .rspec-system-parallel -# PG14 -rspec migration pg14: +# PG13 +rspec migration pg13: extends: - - .rspec-base-pg14 + - .rspec-base-pg13 - .rspec-base-migration - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-migration-parallel -rspec background_migration pg14: +rspec background_migration pg13: extends: - - .rspec-base-pg14 + - .rspec-base-pg13 - .rspec-base-migration - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-background-migration-parallel -rspec unit pg14: +rspec unit pg13: extends: - - .rspec-base-pg14 + - .rspec-base-pg13 - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-unit-parallel -rspec integration pg14: +rspec integration pg13: extends: - - .rspec-base-pg14 + - .rspec-base-pg13 - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-integration-parallel -rspec system pg14: +rspec system pg13: extends: - - .rspec-base-pg14 + - .rspec-base-pg13 + - .rails:rules:default-branch-schedule-nightly--code-backstage + - .rspec-system-parallel + +# PG15 +rspec migration pg15: + extends: + - .rspec-base-pg15 + - .rspec-base-migration + - .rails:rules:default-branch-schedule-nightly--code-backstage + - .rspec-migration-parallel + +rspec background_migration pg15: + extends: + - .rspec-base-pg15 + - .rspec-base-migration + - .rails:rules:default-branch-schedule-nightly--code-backstage + - .rspec-background-migration-parallel + +rspec unit pg15: + extends: + - .rspec-base-pg15 + - .rails:rules:default-branch-schedule-nightly--code-backstage + - .rspec-unit-parallel + +rspec integration pg15: + extends: + - .rspec-base-pg15 + - .rails:rules:default-branch-schedule-nightly--code-backstage + - .rspec-integration-parallel + +rspec system pg15: + extends: + - .rspec-base-pg15 - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-system-parallel # EE/FOSS: default branch nightly scheduled jobs # @@ -801,51 +990,88 @@ rspec-ee system pg14 opensearch2: - .rspec-ee-system-parallel - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only -rspec-ee migration pg14: +# PG15 +rspec-ee unit pg15 opensearch1: extends: - - .rspec-ee-base-pg14 + - .rspec-ee-base-pg15-opensearch1 + - .rspec-ee-unit-parallel + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + +rspec-ee unit pg15 opensearch2: + extends: + - .rspec-ee-base-pg15-opensearch2 + - .rspec-ee-unit-parallel + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + +rspec-ee integration pg15 opensearch1: + extends: + - .rspec-ee-base-pg15-opensearch1 + - .rspec-ee-integration-parallel + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + +rspec-ee integration pg15 opensearch2: + extends: + - .rspec-ee-base-pg15-opensearch2 + - .rspec-ee-integration-parallel + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + +rspec-ee system pg15 opensearch1: + extends: + - .rspec-ee-base-pg15-opensearch1 + - .rspec-ee-system-parallel + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + +rspec-ee system pg15 opensearch2: + extends: + - .rspec-ee-base-pg15-opensearch2 + - .rspec-ee-system-parallel + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + +rspec-ee migration pg15: + extends: + - .rspec-ee-base-pg15 - .rspec-base-migration - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-migration-parallel -rspec-ee background_migration pg14: +rspec-ee background_migration pg15: extends: - - .rspec-ee-base-pg14 + - .rspec-ee-base-pg15 - .rspec-base-migration - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-background-migration-parallel -rspec-ee unit pg14: +rspec-ee unit pg15: extends: - - .rspec-ee-base-pg14 + - .rspec-ee-base-pg15 - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-unit-parallel -rspec-ee unit pg14 es8: +rspec-ee unit pg15 es8: extends: - - .rspec-ee-base-pg14-es8 + - .rspec-ee-base-pg15-es8 - .rspec-ee-unit-parallel -rspec-ee integration pg14: +rspec-ee integration pg15: extends: - - .rspec-ee-base-pg14 + - .rspec-ee-base-pg15 - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-integration-parallel -rspec-ee integration pg14 es8: +rspec-ee integration pg15 es8: extends: - - .rspec-ee-base-pg14-es8 + - .rspec-ee-base-pg15-es8 - .rspec-ee-integration-parallel -rspec-ee system pg14: +rspec-ee system pg15: extends: - - .rspec-ee-base-pg14 + - .rspec-ee-base-pg15 - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-system-parallel -rspec-ee system pg14 es8: +rspec-ee system pg15 es8: extends: - - .rspec-ee-base-pg14-es8 + - .rspec-ee-base-pg15-es8 - .rspec-ee-system-parallel # EE: default branch nightly scheduled jobs # ##################################### @@ -863,14 +1089,14 @@ rspec-ee system pg14 es8: rspec fail-fast: extends: - - .rspec-base-pg13 - - .rspec-fail-fast # extends from .rspec-fail-fast last to override script from .rspec-base-pg13 + - .rspec-base-pg14 + - .rspec-fail-fast # extends from .rspec-fail-fast last to override script from .rspec-base-pg14 variables: MATCHING_TESTS_PATH: "${RSPEC_MATCHING_TESTS_FOSS_PATH}" rspec-ee fail-fast: extends: - - .rspec-ee-base-pg13 + - .rspec-ee-base-pg14 - .rspec-fail-fast # extends from .rspec-fail-fast last to override script from .rspec-ee-base-pg13 variables: MATCHING_TESTS_PATH: "${RSPEC_MATCHING_TESTS_EE_PATH}" @@ -927,7 +1153,7 @@ fail-pipeline-early: script: - fail_pipeline_early -.base-rspec-pg13-rerun-previous-failed-tests: +.base-rspec-pg14-rerun-previous-failed-tests: extends: - .rails:rules:rerun-previous-failed-tests stage: test @@ -936,17 +1162,17 @@ fail-pipeline-early: - !reference [.base-script, script] - rspec_rerun_previous_failed_tests "${PREVIOUS_FAILED_TESTS_FILE}" -rspec rspec-pg13-rerun-previous-failed-tests: +rspec rspec-pg14-rerun-previous-failed-tests: extends: - - .rspec-base-pg13 - - .base-rspec-pg13-rerun-previous-failed-tests + - .rspec-base-pg14 + - .base-rspec-pg14-rerun-previous-failed-tests variables: PREVIOUS_FAILED_TESTS_FILE: tmp/previous_failed_tests/rspec_failed_tests.txt -rspec rspec-ee-pg13-rerun-previous-failed-tests: +rspec rspec-ee-pg14-rerun-previous-failed-tests: extends: - - .rspec-ee-base-pg13 - - .base-rspec-pg13-rerun-previous-failed-tests + - .rspec-ee-base-pg14 + - .base-rspec-pg14-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/rspec-foss-impact.gitlab-ci.yml.erb b/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb index 84aa67de4c9..dc469c30207 100644 --- a/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb +++ b/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb @@ -22,7 +22,7 @@ dont-interrupt-me: - echo "This jobs makes sure this pipeline won't be interrupted! See https://docs.gitlab.com/ee/ci/yaml/#interruptible." .base-rspec-foss-impact: - extends: .rspec-base-pg13-as-if-foss + extends: .rspec-base-pg14-as-if-foss needs: - pipeline: $PARENT_PIPELINE_ID job: detect-tests diff --git a/.gitlab/ci/rails/rspec-predictive.gitlab-ci.yml.erb b/.gitlab/ci/rails/rspec-predictive.gitlab-ci.yml.erb index fcd8754c76a..ddcb335d0dd 100644 --- a/.gitlab/ci/rails/rspec-predictive.gitlab-ci.yml.erb +++ b/.gitlab/ci/rails/rspec-predictive.gitlab-ci.yml.erb @@ -39,7 +39,7 @@ dont-interrupt-me: <% if test_suite_prefix.nil? %> .base-rspec-predictive: extends: - - .rspec-base-pg12 + - .rspec-base-pg13 - .base-predictive variables: # We're using the FOSS one here because we want to exclude EE-only ones @@ -98,7 +98,7 @@ rspec system predictive: <% if test_suite_prefix == 'ee/' %> .base-rspec-ee-predictive: extends: - - .rspec-ee-base-pg12 + - .rspec-ee-base-pg13 - .base-predictive variables: RSPEC_TESTS_FILTER_FILE: "${RSPEC_MATCHING_TESTS_EE_PATH}" diff --git a/.gitlab/ci/rails/shared.gitlab-ci.yml b/.gitlab/ci/rails/shared.gitlab-ci.yml index 33aef166afd..6ea6d8e523c 100644 --- a/.gitlab/ci/rails/shared.gitlab-ci.yml +++ b/.gitlab/ci/rails/shared.gitlab-ci.yml @@ -16,7 +16,7 @@ include: extends: - .default-retry - .default-before_script - - .rails-cache + - .ruby-cache .base-script: script: @@ -28,6 +28,10 @@ include: - section_start "gitaly-test-spawn" "Spawning Gitaly"; scripts/gitaly-test-spawn; section_end "gitaly-test-spawn" # Do not use 'bundle exec' here - echo -e "\e[0Ksection_end:`date +%s`:gitaly-test-spawn\r\e[0K" +.no-redis-cluster: + variables: + USE_REDIS_CLUSTER: "false" + .single-db: variables: DECOMPOSED_DB: "false" @@ -71,6 +75,14 @@ include: # 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" + after_script: + - echo -e "\e[0Ksection_start:`date +%s`:report_results_section[collapsed=true]\r\e[0KReport results" + - | + if [ "$CREATE_RAILS_TEST_FAILURE_ISSUES" == "true" ]; then + bundle exec relate-failure-issue --input-files "rspec/rspec-*.json" --system-log-files "log" --project "gitlab-org-sandbox/rails-test-failures" --token "${RAILS_TEST_FAILURES_PROJECT_TOKEN}"; + fi + - echo -e "\e[0Ksection_end:`date +%s`:report_results_section\r\e[0K" + allow_failure: exit_codes: !reference [.rspec-base, variables, SUCCESSFULLY_RETRIED_TEST_EXIT_CODE] @@ -88,12 +100,14 @@ include: - tmp/capybara/ - log/*.log reports: - junit: ${JUNIT_RESULT_FILE} + junit: "rspec/rspec-*.xml" .rspec-base-migration: script: - !reference [.base-script, script] - rspec_paralellized_job "--tag ~quarantine --tag ~zoekt" + after_script: + - !reference [.rspec-base, after_script] .rspec-base-pg12: extends: @@ -105,11 +119,16 @@ include: - .rspec-base - .use-pg13 -.rspec-base-pg13-as-if-foss: +.rspec-base-pg14: + extends: + - .rspec-base + - .use-pg14 + +.rspec-base-pg14-as-if-foss: extends: - .rspec-base - .as-if-foss - - .use-pg13 + - .use-pg14 needs: - job: "setup-test-env" - job: "retrieve-tests-metadata" @@ -117,10 +136,10 @@ include: - job: "detect-tests" optional: true -.rspec-base-pg14: +.rspec-base-pg15: extends: - .rspec-base - - .use-pg14 + - .use-pg15 .rspec-ee-base-pg12: extends: @@ -173,11 +192,34 @@ include: - .use-pg14-opensearch2-ee - .rails:rules:run-search-tests +.rspec-ee-base-pg15: + extends: + - .rspec-base + - .use-pg15-es7-ee + +.rspec-ee-base-pg15-es8: + extends: + - .rspec-base + - .use-pg15-es8-ee + - .rails:rules:run-search-tests + +.rspec-ee-base-pg15-opensearch1: + extends: + - .rspec-base + - .use-pg15-opensearch1-ee + - .rails:rules:run-search-tests + +.rspec-ee-base-pg15-opensearch2: + extends: + - .rspec-base + - .use-pg15-opensearch2-ee + - .rails:rules:run-search-tests + .db-job-base: extends: - .rails-job-base - .rails:rules:ee-and-foss-migration - - .use-pg13 + - .use-pg14 stage: test needs: ["setup-test-env"] # rspec job base specs @@ -185,6 +227,9 @@ include: ############################ # rspec job parallel configs +# Adjusting these parallel job counts has an impact on the +# rspec:artifact-collector jobs in .gitlab/ci/rails.gitlab-ci.yml +# Please double-check and adjust accordingly .rspec-migration-parallel: parallel: 8 diff --git a/.gitlab/ci/release-environments/main.gitlab-ci.yml b/.gitlab/ci/release-environments/main.gitlab-ci.yml index aa6afee57ae..6c28ba3e2dd 100644 --- a/.gitlab/ci/release-environments/main.gitlab-ci.yml +++ b/.gitlab/ci/release-environments/main.gitlab-ci.yml @@ -1,69 +1,17 @@ --- -default: - interruptible: true - -stages: - - prepare - - deploy - include: - - local: .gitlab/ci/global.gitlab-ci.yml + - local: .gitlab/ci/cng/main.gitlab-ci.yml -release-environments-build-cng-env: +review-build-cng-env: allow_failure: true - image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}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. - - 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' - - echo "GITLAB_ASSETS_TAG=$(assets_image_tag)" >> $BUILD_ENV - - ruby -e 'puts "FULL_RUBY_VERSION=#{RUBY_VERSION}"' >> build.env - - cat $BUILD_ENV - artifacts: - reports: - dotenv: $BUILD_ENV - paths: - - $BUILD_ENV - expire_in: 7 days - when: always -release-environments-build-cng: - allow_failure: true - stage: prepare - needs: ["release-environments-build-cng-env"] - inherit: - variables: false +review-build-cng: + needs: ["review-build-cng-env"] variables: - GITLAB_REF_SLUG: "${GITLAB_REF_SLUG}" - # CNG pipeline specific variables - GITLAB_VERSION: "${GITLAB_VERSION}" - GITLAB_TAG: "${GITLAB_TAG}" - GITLAB_ASSETS_TAG: "${GITLAB_ASSETS_TAG}" - FORCE_RAILS_IMAGE_BUILDS: "${FORCE_RAILS_IMAGE_BUILDS}" - CE_PIPELINE: "${CE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$CE_PIPELINE'` will evaluate to `false` when this variable is empty - EE_PIPELINE: "${EE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$EE_PIPELINE'` will evaluate to `false` when this variable is empty - GITLAB_ELASTICSEARCH_INDEXER_VERSION: "${GITLAB_ELASTICSEARCH_INDEXER_VERSION}" - GITLAB_KAS_VERSION: "${GITLAB_KAS_VERSION}" - GITLAB_METRICS_EXPORTER_VERSION: "${GITLAB_METRICS_EXPORTER_VERSION}" - GITLAB_PAGES_VERSION: "${GITLAB_PAGES_VERSION}" - GITLAB_SHELL_VERSION: "${GITLAB_SHELL_VERSION}" - GITALY_SERVER_VERSION: "${GITALY_SERVER_VERSION}" - RUBY_VERSION: "${FULL_RUBY_VERSION}" IMAGE_TAG_EXT: "-${CI_COMMIT_SHORT_SHA}" - trigger: - project: gitlab-org/build/CNG-mirror - branch: $TRIGGER_BRANCH - strategy: depend + allow_failure: true -release-environments-deploy-env: +review-deploy-env: allow_failure: true stage: deploy needs: ["release-environments-build-cng"] @@ -79,10 +27,10 @@ release-environments-deploy-env: expire_in: 7 days when: always -release-environments-deploy: +review-deploy: allow_failure: true stage: deploy - needs: ["release-environments-deploy-env"] + needs: ["review-deploy-env"] inherit: variables: false variables: diff --git a/.gitlab/ci/reports.gitlab-ci.yml b/.gitlab/ci/reports.gitlab-ci.yml index b072b3dc772..0290d0158b6 100644 --- a/.gitlab/ci/reports.gitlab-ci.yml +++ b/.gitlab/ci/reports.gitlab-ci.yml @@ -74,20 +74,13 @@ gemnasium-dependency_scanning: gemnasium-python-dependency_scanning: rules: !reference [".reports:rules:gemnasium-python-dependency_scanning", rules] -yarn-audit-dependency_scanning: - extends: .ds-analyzer - image: "${REGISTRY_HOST}/${REGISTRY_GROUP}/security-products/analyzers/npm-audit:1" - variables: - TOOL: yarn - rules: !reference [".reports:rules:yarn-audit-dependency_scanning", rules] - # Analyze dependencies for malicious behavior # See https://gitlab.com/gitlab-com/gl-security/security-research/package-hunter .package_hunter-base: extends: .default-retry stage: test image: - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/security-products/package-hunter-cli:v1.3.3@sha256:1d3af9a61aa01549a62be17fa655fcf06271ac9e1b1e822c2a7930fa1d4a8a6b + name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/security-products/package-hunter-cli:v2.1.0@sha256:1f1d31fdc81f6cf0ee305ff0291bfb56f22c5764fe042948ff1676f2f8c60352 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 680254a6640..3522dac39e4 100644 --- a/.gitlab/ci/review-apps/main.gitlab-ci.yml +++ b/.gitlab/ci/review-apps/main.gitlab-ci.yml @@ -10,6 +10,7 @@ stages: - dast include: + - local: .gitlab/ci/cng/main.gitlab-ci.yml - local: .gitlab/ci/global.gitlab-ci.yml - local: .gitlab/ci/review-apps/rules.gitlab-ci.yml - local: .gitlab/ci/review-apps/qa.gitlab-ci.yml @@ -31,63 +32,10 @@ review-build-cng-env: extends: - .default-retry - .review:rules:review-build-cng - image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}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. - - 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' - - echo "GITLAB_ASSETS_TAG=$(assets_image_tag)" >> $BUILD_ENV - - ruby -e 'puts "FULL_RUBY_VERSION=#{RUBY_VERSION}"' >> build.env - - cat $BUILD_ENV - artifacts: - reports: - dotenv: $BUILD_ENV - paths: - - $BUILD_ENV - expire_in: 7 days - when: always review-build-cng: extends: .review:rules:review-build-cng - stage: prepare needs: ["review-build-cng-env"] - inherit: - variables: false - variables: - TOP_UPSTREAM_SOURCE_PROJECT: "${TOP_UPSTREAM_SOURCE_PROJECT}" - TOP_UPSTREAM_SOURCE_REF: "${TOP_UPSTREAM_SOURCE_REF}" - TOP_UPSTREAM_SOURCE_JOB: "${TOP_UPSTREAM_SOURCE_JOB}" - TOP_UPSTREAM_SOURCE_SHA: "${TOP_UPSTREAM_SOURCE_SHA}" - TOP_UPSTREAM_MERGE_REQUEST_PROJECT_ID: "${TOP_UPSTREAM_MERGE_REQUEST_PROJECT_ID}" - TOP_UPSTREAM_MERGE_REQUEST_IID: "${TOP_UPSTREAM_MERGE_REQUEST_IID}" - GITLAB_REF_SLUG: "${GITLAB_REF_SLUG}" - # CNG pipeline specific variables - GITLAB_VERSION: "${GITLAB_VERSION}" - GITLAB_TAG: "${GITLAB_TAG}" - GITLAB_ASSETS_TAG: "${GITLAB_ASSETS_TAG}" - FORCE_RAILS_IMAGE_BUILDS: "${FORCE_RAILS_IMAGE_BUILDS}" - CE_PIPELINE: "${CE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$CE_PIPELINE'` will evaluate to `false` when this variable is empty - EE_PIPELINE: "${EE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$EE_PIPELINE'` will evaluate to `false` when this variable is empty - GITLAB_ELASTICSEARCH_INDEXER_VERSION: "${GITLAB_ELASTICSEARCH_INDEXER_VERSION}" - GITLAB_KAS_VERSION: "${GITLAB_KAS_VERSION}" - GITLAB_METRICS_EXPORTER_VERSION: "${GITLAB_METRICS_EXPORTER_VERSION}" - GITLAB_PAGES_VERSION: "${GITLAB_PAGES_VERSION}" - GITLAB_SHELL_VERSION: "${GITLAB_SHELL_VERSION}" - GITLAB_WORKHORSE_VERSION: "${GITLAB_WORKHORSE_VERSION}" - GITALY_SERVER_VERSION: "${GITALY_SERVER_VERSION}" - RUBY_VERSION: "${FULL_RUBY_VERSION}" - trigger: - project: gitlab-org/build/CNG-mirror - branch: $TRIGGER_BRANCH - strategy: depend .review-workflow-base: image: ${REVIEW_APPS_IMAGE} @@ -96,7 +44,7 @@ review-build-cng: variables: HOST_SUFFIX: "${CI_ENVIRONMENT_SLUG}" DOMAIN: "-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}" - GITLAB_HELM_CHART_REF: "febc4ad69acb7bba0eeb4a62daa577d0b7c3ee71" # 6.9.1: https://gitlab.com/gitlab-org/charts/gitlab/-/commit/febc4ad69acb7bba0eeb4a62daa577d0b7c3ee71 + GITLAB_HELM_CHART_REF: "75b1486a9aec212d0f49ef1251526d8e51004bbc" # 7.0.1: https://gitlab.com/gitlab-org/charts/gitlab/-/commit/75b1486a9aec212d0f49ef1251526d8e51004bbc environment: 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} diff --git a/.gitlab/ci/review-apps/qa.gitlab-ci.yml b/.gitlab/ci/review-apps/qa.gitlab-ci.yml index 9dd24f20c4f..ccbdfd3c298 100644 --- a/.gitlab/ci/review-apps/qa.gitlab-ci.yml +++ b/.gitlab/ci/review-apps/qa.gitlab-ci.yml @@ -1,10 +1,5 @@ include: - - project: gitlab-org/quality/pipeline-common - ref: 5.1.1 - file: - - /ci/base.gitlab-ci.yml - - /ci/allure-report.yml - - /ci/knapsack-report.yml + - local: .gitlab/ci/qa-common/main.gitlab-ci.yml - template: Verify/Browser-Performance.gitlab-ci.yml .test-variables: @@ -21,12 +16,12 @@ include: .bundle-base: extends: - .qa-cache - image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-bullseye-ruby-${RUBY_VERSION}:bundler-2.3 + - .ruby-image before_script: - cd qa && bundle install .review-qa-base: - image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-bullseye-ruby-${RUBY_VERSION}:bundler-2.3-git-2.36-lfs-2.9-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION}-gcloud-383-kubectl-1.23 + image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}:bundler-2.3-git-2.36-lfs-2.9-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION}-gcloud-383-kubectl-1.23 extends: - .use-docker-in-docker - .bundle-base @@ -75,8 +70,6 @@ review-qa-smoke: - .rules:qa-smoke variables: QA_SCENARIO: Test::Instance::Smoke - QA_RUN_TYPE: review-qa-smoke - retry: 1 review-qa-blocking: extends: @@ -84,7 +77,6 @@ review-qa-blocking: - .rules:qa-blocking variables: QA_SCENARIO: Test::Instance::ReviewBlocking - QA_RUN_TYPE: review-qa-blocking retry: 1 review-qa-blocking-parallel: extends: @@ -98,7 +90,6 @@ review-qa-non-blocking: - .rules: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: @@ -118,18 +109,12 @@ browser_performance: e2e-test-report: extends: - - .generate-allure-report-base + - .e2e-test-report - .rules:prepare-report stage: post-qa variables: - ALLURE_JOB_NAME: e2e-review-qa - ALLURE_PROJECT_PATH: $CI_PROJECT_PATH ALLURE_RESULTS_GLOB: qa/tmp/allure-results - ALLURE_MERGE_REQUEST_IID: $CI_MERGE_REQUEST_IID - GITLAB_AUTH_TOKEN: $PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE - GIT_STRATEGY: none - allow_failure: true - when: always + ALLURE_JOB_NAME: $QA_RUN_TYPE upload-knapsack-report: extends: @@ -145,38 +130,29 @@ delete-test-resources: - .rules:prepare-report stage: post-qa variables: - QA_TEST_RESOURCES_FILE_PATTERN: $CI_PROJECT_DIR/qa/tmp/test-resources-*.json GITLAB_QA_ACCESS_TOKEN: $REVIEW_APPS_ROOT_TOKEN script: - export GITLAB_ADDRESS="$QA_GITLAB_URL" - - bundle exec rake "test_resources:delete[$QA_TEST_RESOURCES_FILE_PATTERN]" + - bundle exec rake "test_resources:delete[$CI_PROJECT_DIR/qa/tmp/test-resources-*.json]" allow_failure: true - when: always notify-slack: extends: - - .notify-slack-qa - - .qa-cache + - .notify-slack - .rules:main-run stage: post-qa variables: + QA_RSPEC_XML_FILE_PATTERN: ${CI_PROJECT_DIR}/qa/tmp/rspec-*.xml RUN_WITH_BUNDLE: "true" - QA_PATH: qa - ALLURE_JOB_NAME: e2e-review-qa - SLACK_ICON_EMOJI: ci_failing - STATUS_SYM: ☠️ - STATUS: failed - TYPE: "(review-app) " + ALLURE_JOB_NAME: $QA_RUN_TYPE when: on_failure - script: - - bundle exec prepare-stage-reports --input-files "${CI_PROJECT_DIR}/qa/tmp/rspec-*.xml" - - !reference [.notify-slack-qa, script] export-test-metrics: extends: + - .export-test-metrics - .bundle-base - .rules:main-run stage: post-qa + variables: + QA_METRICS_REPORT_FILE_PATTERN: tmp/test-metrics-*.json when: always - script: - - bundle exec rake "ci:export_test_metrics[tmp/test-metrics-*.json]" diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml index 6d38c651985..68bfa682d0f 100644 --- a/.gitlab/ci/review.gitlab-ci.yml +++ b/.gitlab/ci/review.gitlab-ci.yml @@ -90,6 +90,7 @@ start-review-app-pipeline: - REVIEW_APPS_GCP_REGION - REVIEW_APPS_IMAGE - RUBY_VERSION + - DEBIAN_VERSION # These variables are set in the pipeline schedules. # They need to be explicitly passed on to the child pipeline. @@ -100,36 +101,30 @@ start-review-app-pipeline: SCHEDULE_TYPE: $SCHEDULE_TYPE DAST_RUN: $DAST_RUN SKIP_MESSAGE: Skipping review-app due to mr containing only quarantine changes! + QA_RUN_TYPE: e2e-review-qa trigger: strategy: depend include: - artifact: review-app-pipeline.yml job: e2e-test-pipeline-generate +include: + - remote: 'https://gitlab.com/gitlab-org/quality/pipeline-common/-/raw/6.4.0/ci/danger-review.yml' + danger-review: extends: - .default-retry - .ruby-node-cache - .review:rules:danger - stage: test - needs: [] + image: "${DEFAULT_CI_IMAGE}" before_script: - source scripts/utils.sh - bundle_install_script "--with danger" - yarn_install_script - script: - # ${DANGER_DANGERFILE} is used by Jihulab for customizing danger support: https://jihulab.com/gitlab-cn/gitlab/-/blob/main-jh/jh/.gitlab-ci.yml - - > - if [ -z "$DANGER_GITLAB_API_TOKEN" ]; then - run_timed_command danger_as_local - else - danger_id=$(echo -n ${DANGER_GITLAB_API_TOKEN} | md5sum | awk '{print $1}' | cut -c5-10) - run_timed_command "bundle exec danger --fail-on-errors=true --verbose --danger_id=\"${danger_id}\" --dangerfile=\"${DANGER_DANGERFILE:-Dangerfile}\"" - fi danger-review-local: - extends: - - danger-review - - .review:rules:danger-local - script: - - run_timed_command danger_as_local + extends: danger-review + before_script: + - !reference ["danger-review", "before_script"] + # We unset DANGER_GITLAB_API_TOKEN so that Danger will run as local from `danger-review:script` + - unset DANGER_GITLAB_API_TOKEN diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index 0b660c4c0a7..1c1f6cfa96a 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -12,10 +12,10 @@ if: '$CI_PROJECT_NAME != "gitlab-foss" && $CI_PROJECT_NAME != "gitlab-ce" && $CI_PROJECT_NAME != "gitlabhq"' .if-jh: &if-jh - # Example of these projects: + # Matches these two projects: # https://jihulab.com/gitlab-cn/gitlab # https://gitlab.com/gitlab-org-sandbox/gitlab-jh-validation - if: '$CI_PROJECT_PATH =~ /^gitlab-(jh|cn)\/.*/ || $CI_PROJECT_NAME =~ /^gitlab-jh/' + if: '$CI_PROJECT_PATH == "gitlab-cn/gitlab" || $CI_PROJECT_PATH == "gitlab-org-sandbox/gitlab-jh-validation"' .if-force-ci: &if-force-ci if: '$FORCE_GITLAB_CI' @@ -48,7 +48,7 @@ if: '($CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "detached") && $CI_MERGE_REQUEST_LABELS !~ /pipeline:mr-approved/' .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$/' + if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == "release-tools/update-gitaly" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /stable-(ee|jh)$/' .if-merge-request-targeting-stable-branch: &if-merge-request-targeting-stable-branch if: '($CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "detached") && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^[\d-]+-stable(-ee)?$/' @@ -169,6 +169,7 @@ - ".gitlab/ci/frontend.gitlab-ci.yml" - ".gitlab/ci/build-images.gitlab-ci.yml" - ".gitlab/ci/review.gitlab-ci.yml" + - ".gitlab/ci/cng/**/*" - ".gitlab/ci/review-apps/**/*" - "scripts/review_apps/**/*" - "scripts/trigger-build.rb" @@ -185,6 +186,7 @@ - ".gitlab/ci/package-and-test/*.yml" - ".gitlab/ci/review-apps/qa.gitlab-ci.yml" - ".gitlab/ci/review-apps/rules.gitlab-ci.yml" + - ".gitlab/ci/test-on-gdk/*.yml" .gitaly-patterns: &gitaly-patterns - "GITALY_SERVER_VERSION" @@ -338,6 +340,24 @@ - "{,ee/,jh/}{bin,config,db,generator_templates,lib}/**/*" - "{,ee/,jh/}spec/**/*" +# Redis patterns + feature flags +.redis-patterns: &redis-patterns + - "{,ee/,jh/}{,spec/}app/models/concerns/redis_cacheable{,_spec}.rb" + - "{,ee/,jh/}{,spec/}app/models/ci/build_trace_chunks/redis{,_base,_trace_chunks}{,_spec}.rb" + - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/usage_data_counters/{hll_redis_counter,redis_counter}{,_spec}.rb" + - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/usage/metrics/instrumentations/redis{_metric,hll_metric}{,_spec}.rb" + - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/usage/metrics/aggregates/sources/redis_hll{,_spec}.rb" + - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/patch/action_cable_redis_listener{,_spec}.rb" + - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/merge_requests/mergeability/redis_interface{,_spec}.rb" + - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/markdown_cache/redis/*.rb" + - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/redis/**/*.rb" + - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/instrumentation/*.rb" + - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/redis.rb" + - "{,ee/,jh/}config/initializers/7_redis.rb" + # Feature flag changes + - "{,ee/,jh/}{,spec/}lib/feature.rb" + - "config/feature_flags/**/*" + # DB patterns + .ci-patterns .db-patterns: &db-patterns - "{,ee/,jh/}{,spec/}{db,migrations}/**/*" @@ -522,9 +542,6 @@ - "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/**/*" @@ -538,6 +555,9 @@ # QA changes - ".dockerignore" - "{,jh/}qa/**/*" + # Mapped patterns (see tests.yml) + - "data/whats_new/*.yml" + - "doc/index.md" # Workhorse changes - "GITLAB_WORKHORSE_VERSION" - "workhorse/**/*" @@ -815,6 +835,7 @@ - <<: *if-merge-request-labels-pipeline-expedite when: never - <<: *if-merge-request-targeting-stable-branch + changes: *setup-test-env-patterns - <<: *if-merge-request-labels-run-review-app - <<: *if-merge-request changes: *ci-build-images-patterns @@ -856,19 +877,70 @@ .build-images:rules:build-qa-image-as-if-foss: rules: - !reference [".build-images:rules:build-qa-image-merge-requests", "rules"] + - <<: *if-default-branch-schedule-nightly + variables: + ARCH: amd64,arm64 -# We want to rebuild the master image when the full e2e test pipeline runs. Currently this happens on a 2 hour schedule. -.build-images:rules:build-qa-on-gdk-master-image: +# We use a multi-stage image to: +# - (re)build the first stage in master pipelines (including scheduled pipelines), and +# - build the final stage in code-change pipelines (including MRs), and scheduled pipelines +# This has to match ".qa:rules:e2e:test-on-gdk" otherwise there won't be an image available to run GDK in the test jobs. +# Unfortunately, we can't just include ".qa:rules:e2e:test-on-gdk" because some of the conditions are manual +.build-images:rules:build-gdk-image: rules: - if: '$QA_RUN_TESTS_ON_GDK !~ /true|yes|1/i' when: never - - <<: *if-not-canonical-namespace + - !reference [".qa:rules:package-and-test-never-run", rules] + - <<: *if-default-branch-schedule-nightly # already executed in the 2-hourly schedule when: never - - <<: *if-not-ee - when: never - - <<: *if-dot-com-gitlab-org-schedule + - <<: *if-default-branch-refs # Includes scheduled pipelines variables: - ARCH: amd64,arm64 + BUILD_GDK_BASE: "true" + allow_failure: true + # We want to also rebuild the base image if MRs change certain components. + - <<: *if-merge-request + variables: + BUILD_GDK_BASE: "true" + changes: + - qa/gdk/**/* + - Gemfile.lock + - yarn.lock + - workhorse/**/* + - VERSION + - GITLAB_METRICS_EXPORTER_VERSION + - GITLAB_SHELL_VERSION + - GITALY_SERVER_VERSION + allow_failure: true + # The rest are included to be consistent with .qa:rules:e2e:test-on-gdk + - <<: *if-merge-request-targeting-stable-branch + changes: *setup-test-env-patterns + allow_failure: true + - <<: *if-ruby2-branch + allow_failure: true + # We include the job under the matching conditions below, but unlike in .qa:rules:e2e:test-on-gdk we don't need to + # set OMNIBUS_GITLAB_BUILD_ON_ALL_OS when testing against GDK + - <<: *if-merge-request + changes: *dependency-patterns + allow_failure: true + - <<: *if-merge-request-labels-run-all-e2e + allow_failure: true + - <<: *if-merge-request + changes: *feature-flag-development-config-patterns + allow_failure: true + - <<: *if-merge-request + changes: *initializers-patterns + allow_failure: true + - <<: *if-merge-request + changes: *nodejs-patterns + allow_failure: true + - <<: *if-merge-request + changes: *ci-qa-patterns + allow_failure: true + - <<: *if-merge-request + changes: *code-qa-patterns + allow_failure: true + - <<: *if-force-ci + allow_failure: true .build-images:rules:build-assets-image: rules: @@ -877,6 +949,7 @@ - <<: *if-merge-request-labels-pipeline-expedite when: never - <<: *if-merge-request-targeting-stable-branch + changes: *setup-test-env-patterns - <<: *if-ruby2-branch - <<: *if-merge-request-labels-run-review-app - <<: *if-auto-deploy-branches @@ -884,7 +957,8 @@ changes: *ci-build-images-patterns - <<: *if-default-refs changes: *code-qa-patterns - # Rules to support .qa:rules:package-and-test-ee + # Rules to support .qa:rules:package-and-test + - <<: *if-default-branch-schedule-nightly - <<: *if-merge-request changes: *dependency-patterns - <<: *if-merge-request-labels-run-all-e2e @@ -902,8 +976,6 @@ rules: - <<: *if-not-ee when: never - - <<: *if-merge-request-labels-pipeline-expedite - when: never - !reference [".build-images:rules:build-assets-image", "rules"] ################# @@ -1072,10 +1144,12 @@ - <<: *if-merge-request-labels-pipeline-expedite when: never - <<: *if-merge-request-targeting-stable-branch + changes: *setup-test-env-patterns - <<: *if-merge-request-labels-run-review-app - <<: *if-merge-request-labels-run-all-e2e - <<: *if-auto-deploy-branches - <<: *if-ruby2-branch + - <<: *if-default-branch-schedule-nightly - <<: *if-default-refs changes: *ci-build-images-patterns - <<: *if-default-refs @@ -1280,17 +1354,6 @@ ########## # Notify # ########## -.notify:rules:create-issues-for-failing-tests: - rules: - - <<: *if-not-canonical-namespace - when: never - # Don't report child pipeline failures - - if: '$CI_PIPELINE_SOURCE == "parent_pipeline"' - when: never - - if: '$CREATE_ISSUES_FOR_FAILING_TESTS == "true"' - when: on_failure - allow_failure: true - .notify:rules:notify-package-and-test-failure: rules: - <<: *if-not-canonical-namespace @@ -1298,6 +1361,7 @@ - <<: *if-security-merge-request when: never - <<: *if-merge-request-targeting-stable-branch + changes: *setup-test-env-patterns when: always ############### @@ -1310,6 +1374,13 @@ ############ # QA rules # ############ +.qa:rules:code-merge-request-manual: + rules: + - <<: *if-merge-request + changes: *code-patterns + when: manual + allow_failure: true + .qa:rules:internal: rules: - <<: *if-default-refs @@ -1341,6 +1412,7 @@ - <<: *if-merge-request-labels-pipeline-expedite when: never - <<: *if-merge-request-targeting-stable-branch + changes: *setup-test-env-patterns allow_failure: true - <<: *if-merge-request changes: *code-backstage-qa-patterns @@ -1369,7 +1441,7 @@ - <<: *if-force-ci allow_failure: true -.qa:rules:package-and-test-common: +.qa:rules:package-and-test-never-run: rules: - <<: *if-not-canonical-namespace when: never @@ -1377,7 +1449,12 @@ when: never - <<: *if-merge-request-labels-pipeline-expedite when: never + +.qa:rules:package-and-test-common: + rules: + - !reference [".qa:rules:package-and-test-never-run", rules] - <<: *if-merge-request-targeting-stable-branch + changes: *setup-test-env-patterns allow_failure: true - <<: *if-ruby2-branch allow_failure: true @@ -1417,17 +1494,16 @@ - <<: *if-force-ci when: manual allow_failure: true - - <<: *if-merge-request - changes: *code-patterns - when: manual - allow_failure: true + # We used to have a rule at the end here that would catch any remaining code MRs and allow the job to be run + # manually. That rule is now in ".qa:rules:code-merge-request-manual" so it can be included when needed and we can + # still use ".qa:rules:package-and-test-common" in jobs we don't want to be manual. .qa:rules:package-and-test-schedule: rules: - <<: *if-dot-com-gitlab-org-schedule allow_failure: true variables: - SKIP_REPORT_IN_ISSUES: "false" + CREATE_TEST_FAILURE_ISSUES: "true" PROCESS_TEST_RESULTS: "true" KNAPSACK_GENERATE_REPORT: "true" UPDATE_QA_CACHE: "true" @@ -1436,17 +1512,15 @@ .qa:rules:package-and-test-ee: rules: + - <<: *if-default-branch-schedule-nightly # already executed in the 2-hourly schedule + when: never - !reference [".qa:rules:package-and-test-common", rules] - !reference [".qa:rules:package-and-test-schedule", rules] + - !reference [".qa:rules:code-merge-request-manual", rules] .qa:rules:package-and-test-ce: rules: - - <<: *if-not-canonical-namespace - when: never - - <<: *if-not-ee - when: never - - <<: *if-merge-request-labels-pipeline-expedite - when: never + - !reference [".qa:rules:package-and-test-never-run", rules] - <<: *if-dot-com-gitlab-org-and-security-merge-request changes: *ci-build-images-patterns when: manual @@ -1455,22 +1529,30 @@ changes: *code-qa-patterns when: manual allow_failure: true + - <<: *if-default-branch-schedule-nightly + allow_failure: true + variables: + CREATE_TEST_FAILURE_ISSUES: "true" + PROCESS_TEST_RESULTS: "true" + QA_SAVE_TEST_METRICS: "true" + QA_EXPORT_TEST_METRICS: "false" .qa:rules:e2e:test-on-gdk: rules: - if: '$QA_RUN_TESTS_ON_GDK !~ /true|yes|1/i' when: never + - <<: *if-default-branch-schedule-nightly # already executed in the 2-hourly schedule + when: never - !reference [".qa:rules:package-and-test-common", rules] - !reference [".qa:rules:package-and-test-schedule", rules] + # Run automatically in all other code MRs that weren't included in ".qa:rules:package-and-test-common". + - <<: *if-merge-request + changes: *code-patterns + allow_failure: true -.qa:rules:package-and-test-sidebar: +.qa:rules:package-and-test-old-nav: rules: - - <<: *if-not-canonical-namespace - when: never - - <<: *if-not-ee - when: never - - <<: *if-merge-request-labels-pipeline-expedite - when: never + - !reference [".qa:rules:package-and-test-never-run", rules] - <<: *if-merge-request changes: *code-patterns when: manual @@ -1478,7 +1560,7 @@ - <<: *if-default-branch-schedule-nightly allow_failure: true variables: - SKIP_REPORT_IN_ISSUES: "false" + CREATE_TEST_FAILURE_ISSUES: "true" PROCESS_TEST_RESULTS: "true" QA_SAVE_TEST_METRICS: "true" QA_EXPORT_TEST_METRICS: "false" @@ -1486,12 +1568,24 @@ .qa:rules:package-and-test-nightly: rules: - <<: *if-default-branch-schedule-nightly + allow_failure: true variables: KNAPSACK_GENERATE_REPORT: "true" - SKIP_REPORT_IN_ISSUES: "false" + PROCESS_TEST_RESULTS: "true" + CREATE_TEST_FAILURE_ISSUES: "true" QA_SAVE_TEST_METRICS: "true" QA_EXPORT_TEST_METRICS: "false" +.qa:rules:trigger-omnibus: + rules: + - !reference [".qa:rules:package-and-test-nightly", rules] + - !reference [".qa:rules:package-and-test-ee", rules] + +.qa:rules:trigger-omnibus-ce: + rules: + - !reference [".qa:rules:package-and-test-nightly", rules] + - !reference [".qa:rules:package-and-test-ce", rules] + ############### # Rails rules # ############### @@ -1501,6 +1595,15 @@ changes: *setup-test-env-patterns - <<: *if-merge-request-labels-run-all-rspec +.rails:rules:single-redis: + rules: + - <<: *if-merge-request-labels-run-single-db + - <<: *if-merge-request-labels-pipeline-expedite + when: never + - <<: *if-merge-request + changes: *redis-patterns + - <<: *if-default-branch-schedule-nightly + .rails:rules:single-db: rules: - <<: *if-merge-request-labels-run-single-db @@ -2210,17 +2313,6 @@ - <<: *if-default-refs changes: *python-patterns -.reports:rules:yarn-audit-dependency_scanning: - rules: - - <<: *if-merge-request-labels-pipeline-expedite - when: never - - if: '$DEPENDENCY_SCANNING_DISABLED || $GITLAB_FEATURES !~ /\bdependency_scanning\b/' - when: never - # Run Dependency Scanning on master until https://gitlab.com/gitlab-org/gitlab/-/issues/361657 is resolved - - <<: *if-default-branch-refs - - <<: *if-default-refs - changes: *nodejs-patterns - .reports:rules:test-dast: rules: - <<: *if-merge-request-labels-pipeline-expedite @@ -2411,25 +2503,6 @@ - <<: *if-default-refs changes: *code-backstage-patterns -.setup:rules:rails-production-server-boot: - rules: - - <<: *if-default-refs - changes: *code-patterns - -.setup:rules:no-ee-check: - rules: - - <<: *if-not-foss - when: never - - <<: *if-default-refs - changes: *code-backstage-patterns - -.setup:rules:no-jh-check: - rules: - - <<: *if-jh - when: never - - <<: *if-default-refs - changes: *code-backstage-patterns - .setup:rules:verify-ruby-3.0: rules: - <<: *if-merge-request-labels-run-in-ruby2 @@ -2460,6 +2533,29 @@ - ".gitlab/ci/test-metadata.gitlab-ci.yml" - "scripts/rspec_helpers.sh" +####################### +# Preflight rules # +####################### + +.preflight:rules:rails-production-server-boot: + rules: + - <<: *if-default-refs + changes: *code-patterns + +.preflight:rules:no-ee-check: + rules: + - <<: *if-not-foss + when: never + - <<: *if-default-refs + changes: *code-backstage-patterns + +.preflight:rules:no-jh-check: + rules: + - <<: *if-jh + when: never + - <<: *if-default-refs + changes: *code-backstage-patterns + ####################### # Test metadata rules # ####################### diff --git a/.gitlab/ci/setup.gitlab-ci.yml b/.gitlab/ci/setup.gitlab-ci.yml index 36e2c338748..85409d37fa4 100644 --- a/.gitlab/ci/setup.gitlab-ci.yml +++ b/.gitlab/ci/setup.gitlab-ci.yml @@ -83,8 +83,8 @@ verify-approvals: generate-frontend-fixtures-mapping: extends: - .setup:rules:generate-frontend-fixtures-mapping - - .use-pg13 - - .rails-cache + - .use-pg14 + - .ruby-cache needs: ["setup-test-env"] stage: prepare before_script: @@ -171,3 +171,46 @@ e2e-test-pipeline-generate: expire_in: 1 day paths: - '*-pipeline.yml' + - "${CI_PROJECT_DIR}/qa_tests_vars.env" + +trigger-omnibus-env: + stage: prepare + extends: + - .qa:rules:package-and-test-ee + 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. + - compile-production-assets + variables: + BUILD_ENV: build.env + before_script: + - source scripts/utils.sh + 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_RUBY2_BUILD=${OMNIBUS_GITLAB_RUBY2_BUILD:-false}" >> $BUILD_ENV + echo "OMNIBUS_GITLAB_CACHE_EDITION=${OMNIBUS_GITLAB_CACHE_EDITION:-GITLAB}" >> $BUILD_ENV + echo "OMNIBUS_GITLAB_BUILD_ON_ALL_OS=${OMNIBUS_GITLAB_BUILD_ON_ALL_OS:-false}" >> $BUILD_ENV + echo "GITLAB_ASSETS_TAG=$(assets_image_tag)" >> $BUILD_ENV + echo "EE=$([[ $FOSS_ONLY == '1' ]] && echo 'false' || echo 'true')" >> $BUILD_ENV + target_branch_name="${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_COMMIT_REF_NAME}}" + echo "TRIGGER_BRANCH=$([[ "${target_branch_name}" =~ ^[0-9-]+-stable(-ee)?$ ]] && echo ${target_branch_name%-ee} || echo 'master')" >> $BUILD_ENV + - | + echo "Built environment file for omnibus build:" + cat $BUILD_ENV + artifacts: + expire_in: 3 days + reports: + dotenv: $BUILD_ENV + paths: + - $BUILD_ENV + +trigger-omnibus-env as-if-foss: + extends: + - trigger-omnibus-env + - .qa:rules:package-and-test-ce + needs: + - compile-production-assets as-if-foss diff --git a/.gitlab/ci/static-analysis.gitlab-ci.yml b/.gitlab/ci/static-analysis.gitlab-ci.yml index b9c9200d78b..b351a63ecf0 100644 --- a/.gitlab/ci/static-analysis.gitlab-ci.yml +++ b/.gitlab/ci/static-analysis.gitlab-ci.yml @@ -45,7 +45,7 @@ static-verification-with-database: - .static-analysis-base - .rubocop-job-cache - .static-analysis:rules:static-verification-with-database - - .use-pg13 + - .use-pg14 script: - bundle exec rake lint:static_verification_with_database variables: @@ -211,7 +211,7 @@ ping-appsec-for-sast-findings: - .ping-appsec-for-sast-findings:rules variables: # Project Access Token bot ID for /gitlab-com/gl-security/appsec/sast-custom-rules - BOT_USER_ID: 13559989 + BOT_USER_ID: 14406065 needs: - semgrep-appsec-custom-rules script: diff --git a/.gitlab/ci/test-metadata.gitlab-ci.yml b/.gitlab/ci/test-metadata.gitlab-ci.yml index 41fd0b49173..85d3ea11ac6 100644 --- a/.gitlab/ci/test-metadata.gitlab-ci.yml +++ b/.gitlab/ci/test-metadata.gitlab-ci.yml @@ -17,6 +17,7 @@ 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 + needs: [] script: - apt-get update && apt-get install -y curl # Not present in ruby-slim, so we add it manually - install_gitlab_gem @@ -32,17 +33,17 @@ update-tests-metadata: - retrieve-tests-metadata - generate-frontend-fixtures-mapping - setup-test-env - - rspec migration pg13 + - rspec migration pg14 - rspec-all frontend_fixture - - rspec unit pg13 - - rspec integration pg13 - - rspec system pg13 - - rspec background_migration pg13 - - rspec-ee migration pg13 - - rspec-ee unit pg13 - - rspec-ee integration pg13 - - rspec-ee system pg13 - - rspec-ee background_migration pg13 + - rspec unit pg14 + - rspec integration pg14 + - rspec system pg14 + - rspec background_migration pg14 + - rspec-ee migration pg14 + - rspec-ee unit pg14 + - rspec-ee integration pg14 + - rspec-ee system pg14 + - rspec-ee background_migration pg14 script: - run_timed_command "retry gem install fog-aws mime-types activesupport rspec_profiling postgres-copy --no-document" - source ./scripts/rspec_helpers.sh diff --git a/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml b/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml index 6073098ef06..767dc8433d2 100644 --- a/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml +++ b/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml @@ -1,85 +1,166 @@ include: + - local: .gitlab/ci/global.gitlab-ci.yml - local: .gitlab/ci/qa-common/main.gitlab-ci.yml - local: .gitlab/ci/qa-common/rules.gitlab-ci.yml - local: .gitlab/ci/qa-common/variables.gitlab-ci.yml -.run-tests: +variables: + COLORIZED_LOGS: "true" + GIT_DEPTH: "20" + GIT_STRATEGY: "clone" # 'GIT_STRATEGY: clone' optimizes the pack-objects cache hit ratio + GIT_SUBMODULE_STRATEGY: "none" + +.gdk-qa-base: + image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}:bundler-2.3-git-2.36-lfs-2.9-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION}-gcloud-383-kubectl-1.23 + extends: + - .qa-cache stage: test - image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-bullseye-ruby-${RUBY_VERSION}:bundler-2.3-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION} services: - docker:${DOCKER_VERSION}-dind tags: - e2e - before_script: - - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - - sysctl -n -w fs.inotify.max_user_watches=524288 - - echo "SUITE_RAN=true" > suite_status.env variables: DOCKER_DRIVER: overlay2 DOCKER_HOST: tcp://docker:2375 - QA_GDK_IMAGE: "${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-qa-gdk:master" QA_GENERATE_ALLURE_REPORT: "true" QA_CAN_TEST_PRAEFECT: "false" QA_INTERCEPT_REQUESTS: "false" - TEST_LICENSE_MODE: $QA_TEST_LICENSE_MODE - EE_LICENSE: $QA_EE_LICENSE - GITHUB_ACCESS_TOKEN: $QA_GITHUB_ACCESS_TOKEN GITLAB_QA_ADMIN_ACCESS_TOKEN: $QA_ADMIN_ACCESS_TOKEN - RSPEC_REPORT_OPTS: "--format QA::Support::JsonFormatter --out tmp/rspec-${CI_JOB_ID}.json --format RspecJunitFormatter --out tmp/rspec-${CI_JOB_ID}.xml --format html --out tmp/rspec-${CI_JOB_ID}.htm --color --format documentation" - timeout: 2 hours - artifacts: - when: always - paths: - - test_output - - logs - expire_in: 7 days - reports: - junit: test_output/**/rspec-*.xml - dotenv: suite_status.env - script: + RSPEC_REPORT_OPTS: "--order random --force-color --format documentation --format RspecJunitFormatter --out tmp/rspec-${CI_JOB_ID}.xml --format QA::Support::JsonFormatter --out tmp/rspec-${CI_JOB_ID}.json --format html --out tmp/rspec-${CI_JOB_ID}.htm" + FF_NETWORK_PER_BUILD: 1 + GDK_URL: http://gdk.test:3000 + before_script: + - echo "SUITE_RAN=true" > suite_status.env - echo -e "\e[0Ksection_start:`date +%s`:pull_image\r\e[0KPull GDK QA image" - - docker pull ${QA_GDK_IMAGE} + - docker pull ${GDK_IMAGE} - echo -e "\e[0Ksection_end:`date +%s`:pull_image\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:launch_gdk_and_tests\r\e[0KLaunch GDK and run QA tests" - - cd qa && bundle install --jobs=$(nproc) --retry=3 --quiet - - mkdir -p $CI_PROJECT_DIR/test_output $CI_PROJECT_DIR/logs/gdk $CI_PROJECT_DIR/logs/gitlab + # Despite `incremental: false` and `static: true`, GDK sometimes fails to start without increasing max user watches + # This is why we're not running the GDK container as a service + - sysctl -n -w fs.inotify.max_user_watches=524288 + - echo -e "\e[0Ksection_start:`date +%s`:launch_gdk\r\e[0KLaunch GDK" + - mkdir -p $CI_PROJECT_DIR/log/gdk $CI_PROJECT_DIR/log/gitlab # This command matches the permissions of the user that runs GDK inside the container. - - chown -R 1000:1000 $CI_PROJECT_DIR/test_output $CI_PROJECT_DIR/logs $CI_PROJECT_DIR/qa/knapsack + - chown -R 1000:1000 $CI_PROJECT_DIR/log - | - docker run --rm --name gdk --add-host gdk.test:127.0.0.1 --shm-size=2gb \ - --env-file <(bundle exec rake ci:env_var_name_list) \ - --volume /var/run/docker.sock:/var/run/docker.sock:z \ - --volume $CI_PROJECT_DIR/test_output:/home/gdk/gdk/gitlab/qa/tmp:z \ - --volume $CI_PROJECT_DIR/logs/gdk:/home/gdk/gdk/log \ - --volume $CI_PROJECT_DIR/logs/gitlab:/home/gdk/gdk/gitlab/log \ - --volume $CI_PROJECT_DIR/qa/knapsack:/home/gdk/gdk/gitlab/qa/knapsack \ - ${QA_GDK_IMAGE} "${CI_COMMIT_SHA}" "$RSPEC_REPORT_OPTS $TEST_GDK_TAGS --tag ~requires_praefect" - # The above image's launch script takes two arguments only - first one is the commit sha and the second one Rspec Args - allow_failure: true + docker run -d --rm --name gdk --network host \ + --volume $CI_PROJECT_DIR/log/gdk:/home/gdk/gitlab-development-kit/log \ + --volume $CI_PROJECT_DIR/log/gitlab:/home/gdk/gitlab-development-kit/gitlab/log \ + ${GDK_IMAGE} + # With `FF_NETWORK_PER_BUILD=1` and `--network host` the IP of the gdk container should be 172.18.0.2, but we get it + # dynamically just in case + - echo "$(docker exec gdk bash -c "getent hosts \$HOSTNAME" | awk '{print $1}') gdk.test" >> /etc/hosts + - source scripts/utils.sh + - cd qa && bundle install + script: + - retry_exponential test_url ${GDK_URL}/users/sign_in + - echo -e "\e[0Ksection_end:`date +%s`:launch_gdk\r\e[0K" + - echo -e "\e[0Ksection_start:`date +%s`:run_tests\r\e[0KRun E2E tests" + - QA_COMMAND="bundle exec bin/qa Test::Instance::All ${GDK_URL} -- ${RSPEC_TAGS} ${RSPEC_REPORT_OPTS}" + - echo "Running - '${QA_COMMAND}'" + - eval "$QA_COMMAND" + - echo -e "\e[0Ksection_end:`date +%s`:run_tests\r\e[0K" after_script: - | if [ "$CI_JOB_STATUS" == "failed" ]; then echo "SUITE_FAILED=true" >> suite_status.env fi + - docker stop gdk + artifacts: + paths: + - qa/tmp + - log + reports: + junit: qa/tmp/rspec-*.xml + dotenv: suite_status.env + expire_in: 7 days + when: always + allow_failure: true -download-knapsack-report: +cache-gems: extends: - - .download-knapsack-report - - .rules:download-knapsack + - .ruby-image + - .qa-cache-push + - .rules:update-cache + stage: .pre + tags: + - e2e + script: + - cd qa && bundle install + +# Take the existing GDK docker image and reconfigure it with Postgres load +# balancing. Adding 5s lag to 1 of the replicas to validate robustness of +# the load balancer. +.gdk-with-load-balancer-setup: + before_script: + - !reference [".gdk-qa-base", "before_script"] + - | + docker exec gdk bash -c " + gdk config set postgresql.replica.enabled true &&\ + gdk config set postgresql.replica_2.enabled true &&\ + gdk config set load_balancing.enabled true &&\ + gdk reconfigure &&\ + gdk restart" -test-on-gdk-smoke: +gdk-qa-smoke: extends: - - .run-tests - parallel: 2 + - .gdk-qa-base variables: TEST_GDK_TAGS: "--tag smoke" + QA_RUN_TYPE: gdk-qa-smoke + RSPEC_TAGS: --tag smoke rules: - when: always -test-on-gdk-full: +gdk-qa-smoke-with-load-balancer: + extends: + - .gdk-qa-base + - .gdk-with-load-balancer-setup + variables: + TEST_GDK_TAGS: "--tag smoke" + QA_RUN_TYPE: gdk-qa-smoke + RSPEC_TAGS: --tag smoke + rules: + - changes: + - ".gitlab/ci/test-on-gdk/**" + - "lib/gitlab/database/load_balancing/**/*" + +# TODO: set non manual once smoke tests prove to be stable +gdk-qa-reliable: + extends: + - .gdk-qa-base + parallel: 5 + variables: + QA_RUN_TYPE: gdk-qa-blocking + QA_KNAPSACK_REPORT_NAME: ee-instance-parallel + RSPEC_TAGS: --tag smoke --tag reliable + allow_failure: true + rules: + - when: manual + +gdk-qa-reliable-with-load-balancer: extends: - - .run-tests + - .gdk-qa-base + - .gdk-with-load-balancer-setup parallel: 5 + variables: + QA_RUN_TYPE: gdk-qa-blocking + QA_KNAPSACK_REPORT_NAME: ee-instance-parallel + RSPEC_TAGS: --tag smoke --tag reliable + allow_failure: true + rules: + - changes: + - ".gitlab/ci/test-on-gdk/**" + - "lib/gitlab/database/load_balancing/**/*" + +gdk-qa-non-blocking: + extends: + - .gdk-qa-base + parallel: 5 + variables: + QA_RUN_TYPE: gdk-qa-non-blocking + QA_KNAPSACK_REPORT_NAME: ee-instance-parallel + QA_SKIP_SMOKE_RELIABLE: "true" + allow_failure: true rules: - when: manual @@ -91,39 +172,37 @@ e2e-test-report: - .e2e-test-report - .rules:report:allure-report variables: - ALLURE_RESULTS_GLOB: test_output/allure-results + ALLURE_RESULTS_GLOB: qa/tmp/allure-results upload-knapsack-report: extends: - .upload-knapsack-report - .rules:report:process-results variables: - QA_KNAPSACK_REPORT_FILE_PATTERN: $CI_PROJECT_DIR/test_output/knapsack/*/*.json + QA_KNAPSACK_REPORT_FILE_PATTERN: $CI_PROJECT_DIR/qa/tmp/knapsack/*/*.json export-test-metrics: extends: - .export-test-metrics - .rules:report:process-results variables: - QA_METRICS_REPORT_FILE_PATTERN: $CI_PROJECT_DIR/test_output/test-metrics-*.json + QA_METRICS_REPORT_FILE_PATTERN: $CI_PROJECT_DIR/qa/tmp/test-metrics-*.json -relate-test-failures: - extends: - - .relate-test-failures - - .rules:report:process-results +.gitlab-qa-report: variables: - QA_RSPEC_JSON_FILE_PATTERN: $CI_PROJECT_DIR/test_output/rspec-*.json + QA_RSPEC_JSON_FILE_PATTERN: $CI_PROJECT_DIR/qa/tmp/rspec-*.json + QA_SYSTEM_LOG_FILE_PATTERN: $CI_PROJECT_DIR/test_output/logs generate-test-session: extends: - .generate-test-session - .rules:report:process-results variables: - QA_RSPEC_JSON_FILE_PATTERN: $CI_PROJECT_DIR/test_output/rspec-*.json + QA_RSPEC_JSON_FILE_PATTERN: $CI_PROJECT_DIR/qa/tmp/rspec-*.json notify-slack: extends: - .notify-slack - .rules:report:process-results variables: - QA_RSPEC_XML_FILE_PATTERN: $CI_PROJECT_DIR/test_output/rspec-*.xml + QA_RSPEC_XML_FILE_PATTERN: $CI_PROJECT_DIR/qa/tmp/rspec-*.xml diff --git a/.gitlab/ci/workhorse.gitlab-ci.yml b/.gitlab/ci/workhorse.gitlab-ci.yml index ae0b15bbdb8..603f67079c2 100644 --- a/.gitlab/ci/workhorse.gitlab-ci.yml +++ b/.gitlab/ci/workhorse.gitlab-ci.yml @@ -26,7 +26,7 @@ workhorse:test go: extends: .workhorse:test parallel: matrix: - - GO_VERSION: ["1.18", "1.19"] + - GO_VERSION: ["1.18", "1.19", "1.20"] script: - make -C workhorse test-coverage coverage: '/\d+.\d+%/' @@ -38,7 +38,7 @@ workhorse:test fips: extends: .workhorse:test parallel: matrix: - - GO_VERSION: ["1.18", "1.19"] + - GO_VERSION: ["1.18", "1.19", "1.20"] image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/ubi-${UBI_VERSION}-ruby-${RUBY_VERSION}-golang-${GO_VERSION}-rust-${RUST_VERSION}:rubygems-${RUBYGEMS_VERSION}-git-2.36-exiftool-12.60 variables: FIPS_MODE: 1 diff --git a/.gitlab/issue_templates/AI Project Proposal.md b/.gitlab/issue_templates/AI Project Proposal.md index 072e7ed9ed3..9ec22c18b4a 100644 --- a/.gitlab/issue_templates/AI Project Proposal.md +++ b/.gitlab/issue_templates/AI Project Proposal.md @@ -14,7 +14,7 @@ The title should be something that is easily understood that quickly communicate This section should be completed prior to work on the Experiment beginning. -# [Experiment](https://docs.gitlab.com/ee/policy/alpha-beta-support.html#experiment) +# [Experiment](https://docs.gitlab.com/ee/policy/experiment-beta-support.html#experiment) ## Problem to be solved diff --git a/.gitlab/issue_templates/Design Sprint.md b/.gitlab/issue_templates/Design Sprint.md index f85d41a112e..9eaa9da3675 100644 --- a/.gitlab/issue_templates/Design Sprint.md +++ b/.gitlab/issue_templates/Design Sprint.md @@ -139,24 +139,25 @@ Each exercise should be explained and documented in a separate issue. You can us Deciding which persona we are focusing on will be part of the Day 1 discussions in the workshop. The personas we are going to consider are: - diff --git a/.gitlab/issue_templates/Documentation.md b/.gitlab/issue_templates/Documentation.md index c58b6d0cf06..82de14717a6 100644 --- a/.gitlab/issue_templates/Documentation.md +++ b/.gitlab/issue_templates/Documentation.md @@ -24,7 +24,7 @@ * 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 + For ideas, see personas at https://about.gitlab.com/handbook/product/personas/ or the persona labels at https://gitlab.com/groups/gitlab-org/-/labels?subscribed=&search=persona%3A --> diff --git a/.gitlab/issue_templates/Experiment Implementation.md b/.gitlab/issue_templates/Experiment Implementation.md index 56202240ef5..481389f8023 100644 --- a/.gitlab/issue_templates/Experiment Implementation.md +++ b/.gitlab/issue_templates/Experiment Implementation.md @@ -12,13 +12,13 @@ # Inclusions and exclusions -# Segmentation +# Segmentation # Tracking Details - [json schema](https://gitlab.com/gitlab-org/iglu/-/blob/master/public/schemas/com.gitlab/gitlab_experiment/jsonschema/0-3-0) used in `gitlab-experiment` tracking. -- see [event schema](https://docs.gitlab.com/ee/development/snowplow/index.html#event-schema) for a guide. +- see [event schema](../../doc/development/internal_analytics/snowplow/index.md#event-schema) for a guide. | sequence | activity | category | action | label | property | value | | -------- | -------- | ------ | ----- | ------- | -------- | ----- | diff --git a/.gitlab/issue_templates/Feature Proposal - lean.md b/.gitlab/issue_templates/Feature Proposal - lean.md index 3997ffa5c85..7b7402e4d18 100644 --- a/.gitlab/issue_templates/Feature Proposal - lean.md +++ b/.gitlab/issue_templates/Feature Proposal - lean.md @@ -18,24 +18,25 @@ The goal of this template is brevity for quick/smaller iterations. For a more th ### Feature Usage Metrics diff --git a/.gitlab/issue_templates/Feature proposal - detailed.md b/.gitlab/issue_templates/Feature proposal - detailed.md index dcf6d417155..b3398509684 100644 --- a/.gitlab/issue_templates/Feature proposal - detailed.md +++ b/.gitlab/issue_templates/Feature proposal - detailed.md @@ -12,24 +12,25 @@ @@ -112,7 +113,7 @@ Create tracking issue using the Snowplow event tracking template. See https://gi ### What is the type of buyer? - ### Is this a cross-stage feature? diff --git a/.gitlab/issue_templates/Fulfillment Group UX Issue.md b/.gitlab/issue_templates/Fulfillment Group UX Issue.md index 86db27e1c53..55bbc35089d 100644 --- a/.gitlab/issue_templates/Fulfillment Group UX Issue.md +++ b/.gitlab/issue_templates/Fulfillment Group UX Issue.md @@ -6,24 +6,25 @@ The goal of this template is to ensure we have captured all the information avai 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 05a643c967c..c63a5cb0032 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 @@ -376,7 +376,7 @@ That's all of the required database changes. ```ruby def replicate_cool_widget_changes(cool_widget) if ::Gitlab::Geo.primary? - cool_widget.replicator.handle_after_update if cool_widget + cool_widget.geo_handle_after_update if cool_widget end end ``` @@ -386,7 +386,7 @@ That's all of the required database changes. - [ ] Make sure the repository removal is also handled. You may need to add something like the following in the destroy service of the repository: ```ruby - cool_widget.replicator.handle_after_destroy if cool_widget.repository + cool_widget.replicator.geo_handle_after_destroy if cool_widget.repository ``` - [ ] Make sure a Geo secondary site can request and download Cool Widgets on the Geo primary site. You may need to make some changes to `Gitlab::GitAccessCoolWidget`. For example, see [this change for Group-level Wikis](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/54914/diffs?commit_id=0f2b36f66697b4addbc69bd377ee2818f648dd33). @@ -511,13 +511,13 @@ That's all of the required database changes. FactoryBot.modify do factory :cool_widget do trait :verification_succeeded do - with_file + repository verification_checksum { 'abc' } verification_state { CoolWidget.verification_state_value(:verification_succeeded) } end trait :verification_failed do - with_file + repository verification_failure { 'Could not calculate the checksum' } verification_state { CoolWidget.verification_state_value(:verification_failed) } end @@ -542,7 +542,6 @@ That's all of the required database changes. belongs_to :cool_widget, inverse_of: :cool_widget_state - validates :verification_failure, length: { maximum: 255 } validates :verification_state, :cool_widget, presence: true end end @@ -568,7 +567,6 @@ That's all of the required database changes. end ``` -- [ ] Add `[:geo_cool_widget_state, any]` to `skipped` in `spec/models/factories_spec.rb` #### Step 2. Implement metrics gathering @@ -588,7 +586,7 @@ Metrics are gathered by `Geo::MetricsUpdateWorker`, persisted in `GeoNodeStatus` - `cool_widgets_synced_in_percentage` - `cool_widgets_verified_in_percentage` - [ ] Add the same fields to `GET /geo_nodes/status` example response in - `ee/spec/fixtures/api/schemas/public_api/v4/geo_node_status.json`. + `ee/spec/fixtures/api/schemas/public_api/v4/geo_node_status.json` and `ee/spec/fixtures/api/schemas/public_api/v4/geo_site_status.json`. - [ ] Add the following fields to the `Sidekiq metrics` table in `doc/administration/monitoring/prometheus/gitlab_metrics.md`: ```markdown | `geo_cool_widgets` | Gauge | XX.Y | Number of Cool Widgets on primary | `url` | @@ -725,6 +723,40 @@ The GraphQL API is used by `Admin > Geo > Replication Details` views, and is dir } ``` +To allow the new replicable to resync and reverify via GraphQL: + +- [ ] Add the `CoolWidgetRegistryType` to the `GEO_REGISTRY_TYPE` constant in `ee/app/graphql/types/geo/registrable_type.rb`: + + ```ruby + GEO_REGISTRY_TYPES = { + ::Geo::CoolWidgetRegistry => Types::Geo::CoolWidgetRegistryType + } + ``` + +- [ ] Include the `CoolWidgetRegistry` in the `let(:registry_classes)` variable of `ee/spec/graphql/types/geo/registry_class_enum_spec.rb`: + + ```ruby + let(:registry_classes) do + %w[ + COOL_WIDGET_REGISTRY + ] + end + ``` + +- [ ] Include the new registry in the Rspec parameterized table of `ee/spec/support/shared_contexts/graphql/geo/registries_shared_context.rb`: + + ```ruby + # frozen_string_literal: true + + RSpec.shared_context 'with geo registries shared context' do + using RSpec::Parameterized::TableSyntax + + where(:registry_class, :registry_type, :registry_factory) do + Geo::CoolWidgetRegistry | Types::Geo::CoolWidgetRegistryType | :geo_cool_widget_registry + end + end + ``` + - [ ] Update the GraphQL reference documentation: ```shell 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 fc454919cec..91a86a96ac9 100644 --- a/.gitlab/issue_templates/Geo Replicate a new blob type.md +++ b/.gitlab/issue_templates/Geo Replicate a new blob type.md @@ -509,7 +509,6 @@ That's all of the required database changes. belongs_to :cool_widget, inverse_of: :cool_widget_state - validates :verification_failure, length: { maximum: 255 } validates :verification_state, :cool_widget, presence: true end end @@ -535,7 +534,7 @@ 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` +- [ ] Add `[:cool_widget, :remote_store]` to `skipped` in `spec/models/factories_spec.rb` #### Step 2. Implement metrics gathering @@ -555,7 +554,7 @@ Metrics are gathered by `Geo::MetricsUpdateWorker`, persisted in `GeoNodeStatus` - `cool_widgets_synced_in_percentage` - `cool_widgets_verified_in_percentage` - [ ] Add the same fields to `GET /geo_nodes/status` example response in - `ee/spec/fixtures/api/schemas/public_api/v4/geo_node_status.json`. + `ee/spec/fixtures/api/schemas/public_api/v4/geo_node_status.json` and `ee/spec/fixtures/api/schemas/public_api/v4/geo_site_status.json`. - [ ] Add the following fields to the `Sidekiq metrics` table in `doc/administration/monitoring/prometheus/gitlab_metrics.md`: ```markdown @@ -693,6 +692,40 @@ The GraphQL API is used by `Admin > Geo > Replication Details` views, and is dir } ``` +To allow the new replicable to resync and reverify via GraphQL: + +- [ ] Add the `CoolWidgetRegistryType` to the `GEO_REGISTRY_TYPE` constant in `ee/app/graphql/types/geo/registrable_type.rb`: + + ```ruby + GEO_REGISTRY_TYPES = { + ::Geo::CoolWidgetRegistry => Types::Geo::CoolWidgetRegistryType + } + ``` + +- [ ] Include the `CoolWidgetRegistry` in the `let(:registry_classes)` variable of `ee/spec/graphql/types/geo/registry_class_enum_spec.rb`: + + ```ruby + let(:registry_classes) do + %w[ + COOL_WIDGET_REGISTRY + ] + end + ``` + +- [ ] Include the new registry in the Rspec parameterized table of `ee/spec/support/shared_contexts/graphql/geo/registries_shared_context.rb`: + + ```ruby + # frozen_string_literal: true + + RSpec.shared_context 'with geo registries shared context' do + using RSpec::Parameterized::TableSyntax + + where(:registry_class, :registry_type, :registry_factory) do + Geo::CoolWidgetRegistry | Types::Geo::CoolWidgetRegistryType | :geo_cool_widget_registry + end + end + ``` + - [ ] Update the GraphQL reference documentation: ```shell diff --git a/.gitlab/issue_templates/Pipeline Authoring Issue Implementation.md b/.gitlab/issue_templates/Pipeline Authoring Issue Implementation.md index 26dc1c97a99..7fac499fd18 100644 --- a/.gitlab/issue_templates/Pipeline Authoring Issue Implementation.md +++ b/.gitlab/issue_templates/Pipeline Authoring Issue Implementation.md @@ -51,4 +51,4 @@ _NOTE: This section is optional, but can be used for easy access to any relevant -/label ~"group::pipeline authoring" ~"Category:Pipeline Composition" ~"section::ops" ~"devops::verify" ~"workflow::planning breakdown" +/label ~"group::pipeline authoring" ~"Category:Pipeline Composition" ~"section::ci" ~"devops::verify" ~"workflow::planning breakdown" diff --git a/.gitlab/issue_templates/Pipeline Security issue implementation b/.gitlab/issue_templates/Pipeline Security issue implementation new file mode 100644 index 00000000000..72807e98012 --- /dev/null +++ b/.gitlab/issue_templates/Pipeline Security issue implementation @@ -0,0 +1,98 @@ + + +## Summary + + + +### Why this matters and how we measure + + +### User Stories + + + +## Proposal + + +## Performance Considerations + + +## Out of Scope + + +## Acceptance Criteria + + +## Additional details + + +Some relevant technical details, if applicable, such as: + +- Does this need a ~"feature flag"? +- Does there need to be an associated ~"instrumentation" issue created related to this work? +- Is there an example response showing the data structure that should be returned (new endpoints only)? +- What permissions should be used? +- Which tier(s) is this for? + - [ ] ~"GitLab Ultimate" + - [ ] ~"GitLab Premium" + - [ ] ~"GitLab Free" +- Additional comments: + +## Implementation Table + + + + +| Group | Issue Link | +| ------ | ------ | +| ~backend | :point_left: You are here | +| ~frontend | [Issue Title](url) | +| ~documentation | [Issue Title](url) | +| Instrumentation | [Issue Title](url) | + + + +## Links/References + + + + +/label ~"group::pipeline security" +/milestone %Backlog + + + + diff --git a/.gitlab/issue_templates/Problem Validation.md b/.gitlab/issue_templates/Problem Validation.md index dee026ee752..dcd2283f4b6 100644 --- a/.gitlab/issue_templates/Problem Validation.md +++ b/.gitlab/issue_templates/Problem Validation.md @@ -8,7 +8,7 @@ Learn more about it in the handbook: https://about.gitlab.com/handbook/product-d ## Reach - + + + + +## Description + +TODO: Fill out (required) +`As a [user or stakeholder], I want [goal or objective] so that [reason or benefit].` + +## Acceptance Criteria + +TODO: Fill out (required) +- [ ] [Describe what must be achieved to complete this issue.] +- [ ] [Describe another requirement needed to complete this issue.] +- [ ] [Add additional acceptance criteria as needed.] + +## Technical Requirements + +TODO: Fill out or delete +[If applicable, please list out any technical requirements for this feature/enhancement.] + +## Design Requirements + +TODO: Fill out or delete +[If applicable, please provide a link to the design specifications for this feature/enhancement.] + +## Impact Assessment + +TODO: Fill out or delete +[Please describe the impact this feature/enhancement will have on the user experience and/or the product as a whole.] + +## User Story + +TODO: Fill out or delete +[Provide a user story to illustrate the use case for this feature/enhancement. Include examples to help communicate the intended functionality.] + + +/label ~"Category:Remote Development" +/label ~"section::dev" +/label ~"devops::create" +/label ~"group::ide" + + +/label ~"type::feature" + +/label ~"feature::addition" + + +/label ~"rd-workflow::unprioritized" + + +/label ~"workflow::refinement" diff --git a/.gitlab/issue_templates/Service Ping reporting and monitoring.md b/.gitlab/issue_templates/Service Ping reporting and monitoring.md index baa384a8aa2..d8d93ee73c4 100644 --- a/.gitlab/issue_templates/Service Ping reporting and monitoring.md +++ b/.gitlab/issue_templates/Service Ping reporting and monitoring.md @@ -1,6 +1,6 @@ - + -The [Product Intelligence group](https://about.gitlab.com/handbook/engineering/development/analytics/product-intelligence/) runs manual reporting of ServicePing for GitLab.com on a weekly basis. This issue: +The [Analytics Instrumentation group](https://about.gitlab.com/handbook/engineering/development/analytics/analytics-instrumentation/) runs manual reporting of ServicePing for GitLab.com on a weekly basis. This issue: - Captures the work required to complete the reporting process,. - Captures the follow-up tasks that are focused on metrics performance verification. @@ -123,7 +123,7 @@ If you get mentioned, check the failing metric and open an optimization issue. /confidential -/label ~"group::product intelligence" ~"devops::analytics" ~backend ~"section::analytics" ~"Category:Service Ping" +/label ~"group::analytics instrumentation" ~"devops::analytics" ~backend ~"section::analytics" ~"Category:Service Ping" /epic https://gitlab.com/groups/gitlab-org/-/epics/6000 /weight 5 /title Monitor and Generate GitLab.com Service Ping diff --git a/.gitlab/merge_request_templates/Default.md b/.gitlab/merge_request_templates/Default.md index 404a18ad074..3cb3f6473e6 100644 --- a/.gitlab/merge_request_templates/Default.md +++ b/.gitlab/merge_request_templates/Default.md @@ -1,8 +1,8 @@ ## What does this MR do and why? -_Describe in detail what your merge request does and why._ - +| Before | After | +| ------ | ------ | +| | | + ## How to set up and validate locally _Numbered steps to set up and validate the change are strongly suggested._ diff --git a/.gitlab/merge_request_templates/Deprecations.md b/.gitlab/merge_request_templates/Deprecations.md index 9e02e047efa..7e622dbe62c 100644 --- a/.gitlab/merge_request_templates/Deprecations.md +++ b/.gitlab/merge_request_templates/Deprecations.md @@ -71,8 +71,6 @@ 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). -- [ ] 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: @@ -100,7 +98,7 @@ must be updated before this MR is merged: If you want to double check that it worked, you can run `bin/rake gitlab:docs:check_deprecations` to verify that the doc is up to date. 1. Commit the updated file and push the changes. -1. Set the MR to merge when the pipeline succeeds (or merge if the pipeline is already complete). +1. Set the merge request to auto-merge, or if the pipeline is already complete, merge. If you have trouble running the Rake task, check the [troubleshooting steps](https://about.gitlab.com/handbook/marketing/blog/release-posts/#deprecation-rake-task-troubleshooting). diff --git a/.gitlab/merge_request_templates/Removals.md b/.gitlab/merge_request_templates/Removals.md index 39b99c00314..d2224a71e65 100644 --- a/.gitlab/merge_request_templates/Removals.md +++ b/.gitlab/merge_request_templates/Removals.md @@ -78,8 +78,6 @@ 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). -- [ ] 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: @@ -107,6 +105,6 @@ must be updated before this MR is merged: If you want to double check that it worked, you can run `bin/rake gitlab:docs:check_removals` to verify that the doc is up to date. 1. Commit the updated file and push the changes. -1. Set the MR to merge when the pipeline succeeds (or merge if the pipeline is already complete). +1. Set the merge request to auto-merge, or if the pipeline is already complete, merge. If you have trouble running the rake task, check the [troubleshooting steps](https://about.gitlab.com/handbook/marketing/blog/release-posts/#deprecation-rake-task-troubleshooting). -- cgit v1.2.3