diff options
Diffstat (limited to '.gitlab')
27 files changed, 770 insertions, 549 deletions
diff --git a/.gitlab/CODEOWNERS b/.gitlab/CODEOWNERS index 02258c366c5..a7ecfebbafb 100644 --- a/.gitlab/CODEOWNERS +++ b/.gitlab/CODEOWNERS @@ -16,6 +16,7 @@ GITALY_SERVER_VERSION @project_278964_bot6 @gitlab-org/maintainers/rails-backend /.gitlab/merge_request_templates/*.md /doc/*.md /doc/**/*.md +/doc/**/*.jpg /doc/**/*.png /data/deprecations/*.yml /data/removals/**/*.yml @@ -415,6 +416,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /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 @@ -422,6 +424,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/administration/feature_flags.md @axil /doc/administration/file_hooks.md @ashrafkhamis /doc/administration/geo/ @axil +/doc/administration/get_started.md @kpaizee /doc/administration/git_protocol.md @aqualls /doc/administration/gitaly/ @eread /doc/administration/housekeeping.md @eread @@ -429,7 +432,6 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/administration/incoming_email.md @msedlakjakubowski /doc/administration/index.md @axil /doc/administration/instance_limits.md @axil -/doc/administration/instance_review.md @phillipwells /doc/administration/integration/kroki.md @msedlakjakubowski /doc/administration/integration/mailgun.md @msedlakjakubowski /doc/administration/integration/plantuml.md @aqualls @@ -458,11 +460,11 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/administration/operations/gitlab_sshd.md @aqualls /doc/administration/operations/moving_repositories.md @eread /doc/administration/package_information/ @axil -/doc/administration/packages/ @dianalogan +/doc/administration/packages/ @marcel.amirault /doc/administration/pages/ @ashrafkhamis /doc/administration/polling.md @axil /doc/administration/postgresql/ @aqualls -/doc/administration/postgresql/multiple_databases.md @jglassman1 +/doc/administration/postgresql/multiple_databases.md @lciutacu /doc/administration/raketasks/ @axil /doc/administration/raketasks/ldap.md @jglassman1 /doc/administration/raketasks/praefect.md @eread @@ -500,31 +502,29 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/api/award_emoji.md @msedlakjakubowski /doc/api/boards.md @msedlakjakubowski /doc/api/branches.md @aqualls -/doc/api/broadcast_messages.md @phillipwells /doc/api/bulk_imports.md @eread /doc/api/cluster_agents.md @phillipwells /doc/api/commits.md @aqualls -/doc/api/container_registry.md @dianalogan +/doc/api/container_registry.md @marcel.amirault /doc/api/custom_attributes.md @msedlakjakubowski /doc/api/dependencies.md @rdickenson -/doc/api/dependency_proxy.md @dianalogan -/doc/api/deploy_keys.md @rdickenson -/doc/api/deploy_tokens.md @rdickenson -/doc/api/deployments.md @rdickenson +/doc/api/dependency_proxy.md @marcel.amirault +/doc/api/deploy_keys.md @phillipwells +/doc/api/deploy_tokens.md @phillipwells +/doc/api/deployments.md @phillipwells /doc/api/discussions.md @aqualls /doc/api/dora/ @lciutacu /doc/api/draft_notes.md @aqualls -/doc/api/environments.md @rdickenson +/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/experiments.md @phillipwells -/doc/api/feature_flag_user_lists.md @rdickenson -/doc/api/feature_flags.md @rdickenson -/doc/api/features.md @rdickenson -/doc/api/freeze_periods.md @rdickenson +/doc/api/feature_flag_user_lists.md @phillipwells +/doc/api/feature_flags.md @phillipwells +/doc/api/features.md @phillipwells +/doc/api/freeze_periods.md @phillipwells /doc/api/geo_nodes.md @axil /doc/api/graphql/audit_report.md @eread /doc/api/graphql/branch_rules.md @aqualls @@ -546,9 +546,10 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/api/group_labels.md @msedlakjakubowski /doc/api/group_level_variables.md @marcel.amirault /doc/api/group_milestones.md @msedlakjakubowski -/doc/api/group_protected_environments.md @rdickenson +/doc/api/group_protected_branches.md @aqualls +/doc/api/group_protected_environments.md @phillipwells /doc/api/group_relations_export.md @eread -/doc/api/group_releases.md @rdickenson +/doc/api/group_releases.md @phillipwells /doc/api/group_repository_storage_moves.md @ashrafkhamis /doc/api/group_wikis.md @ashrafkhamis /doc/api/groups.md @lciutacu @@ -557,7 +558,6 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/api/instance_clusters.md @phillipwells /doc/api/instance_level_ci_variables.md @marcel.amirault /doc/api/integrations.md @ashrafkhamis -/doc/api/invitations.md @phillipwells /doc/api/issue_links.md @msedlakjakubowski /doc/api/issues.md @msedlakjakubowski /doc/api/issues_statistics.md @msedlakjakubowski @@ -586,8 +586,8 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/api/notification_settings.md @msedlakjakubowski /doc/api/oauth2.md @jglassman1 /doc/api/openapi/ @ashrafkhamis -/doc/api/packages.md @dianalogan -/doc/api/packages/ @dianalogan +/doc/api/packages.md @marcel.amirault +/doc/api/packages/ @marcel.amirault /doc/api/pages.md @ashrafkhamis /doc/api/pages_domains.md @ashrafkhamis /doc/api/personal_access_tokens.md @eread @@ -607,17 +607,17 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/api/project_snippets.md @aqualls /doc/api/project_statistics.md @aqualls /doc/api/project_templates.md @aqualls -/doc/api/project_vulnerabilities.md @aqualls +/doc/api/project_vulnerabilities.md @rdickenson /doc/api/projects.md @lciutacu /doc/api/protected_branches.md @aqualls -/doc/api/protected_environments.md @rdickenson +/doc/api/protected_environments.md @phillipwells /doc/api/protected_tags.md @aqualls -/doc/api/releases/ @rdickenson +/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/resource_groups.md @rdickenson +/doc/api/resource_groups.md @phillipwells /doc/api/resource_iteration_events.md @msedlakjakubowski /doc/api/resource_label_events.md @eread /doc/api/resource_milestone_events.md @msedlakjakubowski @@ -644,30 +644,30 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/api/templates/licenses.md @rdickenson /doc/api/todos.md @msedlakjakubowski /doc/api/topics.md @lciutacu -/doc/api/usage_data.md @dianalogan +/doc/api/usage_data.md @lciutacu /doc/api/users.md @jglassman1 /doc/api/version.md @phillipwells -/doc/api/visual_review_discussions.md @marcel.amirault -/doc/api/vulnerabilities.md @dianalogan -/doc/api/vulnerability_exports.md @dianalogan -/doc/api/vulnerability_findings.md @dianalogan +/doc/api/visual_review_discussions.md @drcatherinepope +/doc/api/vulnerabilities.md @rdickenson +/doc/api/vulnerability_exports.md @rdickenson +/doc/api/vulnerability_findings.md @rdickenson /doc/api/wikis.md @ashrafkhamis /doc/architecture/blueprints/database/scalability/patterns/ @aqualls /doc/architecture/blueprints/database_scaling/ @aqualls /doc/ci/ @drcatherinepope /doc/ci/caching/ @marcel.amirault /doc/ci/chatops/ @phillipwells -/doc/ci/cloud_deployment/ @rdickenson +/doc/ci/cloud_deployment/ @phillipwells /doc/ci/cloud_services/ @marcel.amirault /doc/ci/directed_acyclic_graph/ @marcel.amirault /doc/ci/docker/using_docker_images.md @fneill -/doc/ci/environments/ @rdickenson +/doc/ci/environments/ @phillipwells /doc/ci/examples/authenticating-with-hashicorp-vault/ @marcel.amirault -/doc/ci/examples/deployment/ @rdickenson -/doc/ci/examples/end_to_end_testing_webdriverio/ @marcel.amirault -/doc/ci/examples/semantic-release.md @dianalogan +/doc/ci/examples/deployment/ @phillipwells +/doc/ci/examples/semantic-release.md @marcel.amirault /doc/ci/interactive_web_terminal/ @fneill -/doc/ci/jobs/job_control.md @marcel.amirault +/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 @@ -675,19 +675,23 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/ci/pipelines/downstream_pipelines.md @marcel.amirault /doc/ci/pipelines/index.md @marcel.amirault /doc/ci/pipelines/job_artifacts.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/ @rdickenson -/doc/ci/review_apps/ @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/ @marcel.amirault /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 @@ -699,27 +703,27 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/development/cascading_settings.md @jglassman1 /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/contributing/ @sselhorn /doc/development/database/ @aqualls /doc/development/database/filtering_by_label.md @msedlakjakubowski -/doc/development/database/multiple_databases.md @jglassman1 +/doc/development/database/multiple_databases.md @lciutacu /doc/development/database_review.md @aqualls /doc/development/developing_with_solargraph.md @aqualls /doc/development/development_processes.md @sselhorn /doc/development/distributed_tracing.md @msedlakjakubowski /doc/development/documentation/ @sselhorn -/doc/development/elasticsearch.md @ashrafkhamis -/doc/development/experiment_guide/ @phillipwells /doc/development/export_csv.md @eread /doc/development/fe_guide/content_editor.md @ashrafkhamis /doc/development/fe_guide/customizable_dashboards.md @lciutacu /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 @ashrafkhamis -/doc/development/fe_guide/view_component.md @rdickenson +/doc/development/fe_guide/source_editor.md @aqualls +/doc/development/fe_guide/view_component.md @sselhorn /doc/development/feature_categorization/ @sselhorn /doc/development/feature_development.md @sselhorn /doc/development/feature_flags/ @sselhorn @@ -736,10 +740,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/development/image_scaling.md @lciutacu /doc/development/import_export.md @eread /doc/development/index.md @sselhorn -/doc/development/integrations/codesandbox.md @sselhorn -/doc/development/integrations/index.md @ashrafkhamis -/doc/development/integrations/jenkins.md @ashrafkhamis -/doc/development/integrations/jira_connect.md @ashrafkhamis +/doc/development/integrations/ @ashrafkhamis /doc/development/integrations/secure.md @rdickenson /doc/development/integrations/secure_partner_integration.md @rdickenson /doc/development/internal_api/ @aqualls @@ -747,25 +748,28 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /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/logging.md @msedlakjakubowski /doc/development/maintenance_mode.md @axil /doc/development/merge_request_concepts/ @aqualls +/doc/development/migration_style_guide.md @aqualls +/doc/development/navigation_sidebar.md @sselhorn /doc/development/omnibus.md @axil -/doc/development/packages/ @dianalogan +/doc/development/organization/ @lciutacu +/doc/development/packages/ @marcel.amirault /doc/development/pages/ @ashrafkhamis /doc/development/permissions.md @jglassman1 /doc/development/policies.md @jglassman1 -/doc/development/product_qualified_lead_guide/ @phillipwells /doc/development/project_templates.md @aqualls /doc/development/prometheus_metrics.md @msedlakjakubowski /doc/development/real_time.md @msedlakjakubowski /doc/development/rubocop_development_guide.md @sselhorn +/doc/development/search/ @ashrafkhamis /doc/development/sec/ @rdickenson -/doc/development/sec/security_report_ingestion_overview.md @dianalogan /doc/development/secure_coding_guidelines.md @sselhorn -/doc/development/service_ping/ @dianalogan -/doc/development/snowplow/ @dianalogan +/doc/development/service_ping/ @lciutacu +/doc/development/snowplow/ @lciutacu /doc/development/spam_protection_and_captcha/ @phillipwells /doc/development/sql.md @aqualls /doc/development/testing_guide/ @sselhorn @@ -775,7 +779,6 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/development/work_items.md @msedlakjakubowski /doc/development/work_items_widgets.md @msedlakjakubowski /doc/development/workhorse/ @aqualls -/doc/development/workspace/ @sselhorn /doc/downgrade_ee_to_ce/ @axil /doc/drawers/ @ashrafkhamis /doc/gitlab-basics/ @aqualls @@ -794,6 +797,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/integration/jenkins.md @ashrafkhamis /doc/integration/jira/ @ashrafkhamis /doc/integration/mattermost/ @axil +/doc/integration/partner_marketplace.md @fneill /doc/integration/recaptcha.md @phillipwells /doc/integration/security_partners/ @rdickenson /doc/integration/slash_commands.md @ashrafkhamis @@ -801,7 +805,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/integration/trello_power_up.md @ashrafkhamis /doc/integration/vault.md @phillipwells /doc/operations/error_tracking.md @drcatherinepope -/doc/operations/feature_flags.md @rdickenson +/doc/operations/feature_flags.md @phillipwells /doc/operations/incident_management/ @msedlakjakubowski /doc/operations/index.md @msedlakjakubowski /doc/operations/metrics/ @msedlakjakubowski @@ -813,20 +817,19 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/raketasks/x509_signatures.md @aqualls /doc/security/ @jglassman1 /doc/subscriptions/ @fneill -/doc/subscriptions/gitlab_dedicated/ @axil +/doc/subscriptions/gitlab_dedicated/ @drcatherinepope /doc/topics/authentication/ @jglassman1 /doc/topics/autodevops/ @phillipwells -/doc/topics/awesome_co.md @rdickenson +/doc/topics/awesome_co.md @sselhorn /doc/topics/git/ @aqualls /doc/topics/gitlab_flow.md @aqualls /doc/topics/offline/ @axil /doc/topics/plan_and_track.md @msedlakjakubowski -/doc/topics/your_work.md @rdickenson +/doc/topics/your_work.md @sselhorn /doc/tutorials/ @kpaizee /doc/update/ @axil /doc/update/background_migrations.md @aqualls /doc/user/admin_area/analytics/ @lciutacu -/doc/user/admin_area/broadcast_messages.md @phillipwells /doc/user/admin_area/credentials_inventory.md @jglassman1 /doc/user/admin_area/custom_project_templates.md @eread /doc/user/admin_area/diff_limits.md @aqualls @@ -853,37 +856,37 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /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 @dianalogan +/doc/user/admin_area/settings/package_registry_rate_limits.md @marcel.amirault /doc/user/admin_area/settings/project_integration_management.md @ashrafkhamis /doc/user/admin_area/settings/push_event_activities_limit.md @aqualls /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_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 /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 @dianalogan +/doc/user/admin_area/settings/usage_statistics.md @lciutacu /doc/user/admin_area/settings/visibility_and_access_controls.md @aqualls /doc/user/analytics/ @lciutacu -/doc/user/analytics/ci_cd_analytics.md @rdickenson +/doc/user/analytics/ci_cd_analytics.md @phillipwells /doc/user/application_security/ @rdickenson -/doc/user/application_security/cve_id_request.md @dianalogan -/doc/user/application_security/generate_test_vulnerabilities/ @dianalogan /doc/user/application_security/policies/ @dianalogan -/doc/user/application_security/security_dashboard/ @dianalogan -/doc/user/application_security/vulnerabilities/ @dianalogan -/doc/user/application_security/vulnerability_report/ @dianalogan /doc/user/asciidoc.md @aqualls /doc/user/award_emojis.md @msedlakjakubowski /doc/user/clusters/ @phillipwells -/doc/user/compliance/ @eread +/doc/user/compliance/compliance_report/ @eread +/doc/user/compliance/index.md @eread +/doc/user/compliance/license_approval_policies.md @dianalogan +/doc/user/compliance/license_check_rules.md @dianalogan /doc/user/compliance/license_compliance/ @rdickenson +/doc/user/compliance/license_list.md @rdickenson +/doc/user/compliance/license_scanning_of_cyclonedx_files/ @rdickenson /doc/user/crm/ @msedlakjakubowski /doc/user/discussions/ @aqualls /doc/user/enterprise_user/ @jglassman1 /doc/user/feature_flags.md @sselhorn -/doc/user/free_user_limit.md @phillipwells /doc/user/group/ @lciutacu /doc/user/group/clusters/ @phillipwells /doc/user/group/compliance_frameworks.md @eread @@ -894,7 +897,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/group/iterations/ @msedlakjakubowski /doc/user/group/planning_hierarchy/ @msedlakjakubowski /doc/user/group/reporting/ @phillipwells -/doc/user/group/repositories_analytics/ @marcel.amirault +/doc/user/group/repositories_analytics/ @drcatherinepope /doc/user/group/roadmap/ @msedlakjakubowski /doc/user/group/saml_sso/ @jglassman1 /doc/user/group/settings/ @jglassman1 @@ -903,22 +906,27 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/markdown.md @msedlakjakubowski /doc/user/namespace/ @lciutacu /doc/user/okrs.md @msedlakjakubowski -/doc/user/operations_dashboard/ @rdickenson -/doc/user/packages/ @dianalogan +/doc/user/operations_dashboard/ @phillipwells +/doc/user/organization/ @lciutacu +/doc/user/packages/ @marcel.amirault /doc/user/permissions.md @jglassman1 /doc/user/product_analytics/ @lciutacu -/doc/user/profile/ @jglassman1 +/doc/user/profile/account/ @jglassman1 /doc/user/profile/contributions_calendar.md @lciutacu +/doc/user/profile/index.md @jglassman1 /doc/user/profile/notifications.md @msedlakjakubowski +/doc/user/profile/personal_access_tokens.md @jglassman1 +/doc/user/profile/saved_replies.md @aqualls +/doc/user/profile/user_passwords.md @jglassman1 /doc/user/project/autocomplete_characters.md @aqualls /doc/user/project/badges.md @lciutacu /doc/user/project/changelogs.md @aqualls /doc/user/project/clusters/ @phillipwells /doc/user/project/code_intelligence.md @aqualls /doc/user/project/code_owners.md @aqualls -/doc/user/project/deploy_boards.md @rdickenson -/doc/user/project/deploy_keys/ @rdickenson -/doc/user/project/deploy_tokens/ @rdickenson +/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 @@ -945,7 +953,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/project/protected_tags.md @aqualls /doc/user/project/push_options.md @aqualls /doc/user/project/quick_actions.md @msedlakjakubowski -/doc/user/project/releases/ @rdickenson +/doc/user/project/releases/ @phillipwells /doc/user/project/remote_development/ @ashrafkhamis /doc/user/project/repository/ @aqualls /doc/user/project/repository/file_finder.md @ashrafkhamis @@ -965,7 +973,6 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/project/wiki/ @ashrafkhamis /doc/user/project/working_with_projects.md @lciutacu /doc/user/public_access.md @lciutacu -/doc/user/read_only_namespaces.md @phillipwells /doc/user/report_abuse.md @phillipwells /doc/user/reserved_names.md @lciutacu /doc/user/search/ @ashrafkhamis @@ -975,7 +982,6 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/tasks.md @msedlakjakubowski /doc/user/todos.md @msedlakjakubowski /doc/user/usage_quotas.md @fneill -/doc/user/workspace/ @lciutacu # End rake-managed-docs-block [Authentication and Authorization] @@ -1396,7 +1402,6 @@ ee/lib/ee/api/entities/project.rb @gitlab-org/manage/manage-workspace/backend-ap /ee/config/events/202108302307_profiles_controller_search_audit_event.yml @gitlab-org/govern/compliance /ee/config/events/202108302307_projects__audit_events_controller_search_audit_event.yml @gitlab-org/govern/compliance /ee/config/events/202111041910_admin__audit_logs_controller_search_audit_event.yml @gitlab-org/govern/compliance -/ee/config/feature_flags/development/audit_log_group_level.yml @gitlab-org/govern/compliance /ee/config/metrics/counts_28d/20210216183930_g_compliance_audit_events_monthly.yml @gitlab-org/govern/compliance /ee/config/metrics/counts_28d/20210216183934_i_compliance_audit_events_monthly.yml @gitlab-org/govern/compliance /ee/config/metrics/counts_28d/20210216183942_a_compliance_audit_events_api_monthly.yml @gitlab-org/govern/compliance @@ -1421,5 +1426,5 @@ ee/lib/ee/api/entities/project.rb @gitlab-org/manage/manage-workspace/backend-ap /ee/app/assets/javascripts/usage_quotas/storage/ @fulfillment-group/utilization-group/fe [Manage::Foundations] -/lib/sidebars/ @gitlab/ @gitlab-org/manage/foundations/engineering -/ee/lib/sidebars/ @gitlab-org/manage/foundations/engineering
\ No newline at end of file +/lib/sidebars/ @gitlab-org/manage/foundations/engineering +/ee/lib/sidebars/ @gitlab-org/manage/foundations/engineering diff --git a/.gitlab/ci/as-if-jh.gitlab-ci.yml b/.gitlab/ci/as-if-jh.gitlab-ci.yml index 6bd46bee770..2c90112bbf2 100644 --- a/.gitlab/ci/as-if-jh.gitlab-ci.yml +++ b/.gitlab/ci/as-if-jh.gitlab-ci.yml @@ -37,11 +37,19 @@ prepare-as-if-jh-branch: stage: prepare needs: - add-jh-files + variables: + # We can't apply --filter=tree:0 for runner to set up the repository, + # so instead we tell runner to not clone anything, and we set up the + # repository by ourselves. + GIT_STRATEGY: "none" script: - # Fetch for the history of the branch so it does not cause the following error: - # ! [remote rejected] ref -> ref (shallow update not allowed) - - git fetch --unshallow --filter=tree:0 origin "${CI_COMMIT_SHA}" - - git checkout -b "${AS_IF_JH_BRANCH}" + - git clone --filter=tree:0 "$CI_REPOSITORY_URL" gitlab + # We should checkout before moving/changing files + - cd gitlab + - git checkout -b "${AS_IF_JH_BRANCH}" "${CI_COMMIT_SHA}" + - cd .. + - mv $JH_FILES_TO_COMMIT gitlab/ + - cd gitlab - git add ${JH_FILES_TO_COMMIT} - git commit -m 'Add JH files' # TODO: Mark which SHA we add - git push -f "${SANDBOX_REPOSITORY}" "${AS_IF_JH_BRANCH}" diff --git a/.gitlab/ci/database.gitlab-ci.yml b/.gitlab/ci/database.gitlab-ci.yml index ace968ec249..941cb9224fb 100644 --- a/.gitlab/ci/database.gitlab-ci.yml +++ b/.gitlab/ci/database.gitlab-ci.yml @@ -1,13 +1,43 @@ include: - local: .gitlab/ci/rails/shared.gitlab-ci.yml +db:rollback single-db-ci-connection: + extends: + - db:rollback + - .single-db-ci-connection + - .rails:rules:single-db-ci-connection + +db:migrate:reset single-db-ci-connection: + extends: + - db:migrate:reset + - .single-db-ci-connection + - .rails:rules:single-db-ci-connection + +db:check-schema-single-db-ci-connection: + extends: + - db:check-schema + - .single-db-ci-connection + - .rails:rules:single-db-ci-connection + +db:post_deployment_migrations_validator-single-db-ci-connection: + extends: + - db:post_deployment_migrations_validator + - .single-db-ci-connection + - .rails:rules:db:check-migrations-single-db-ci-connection + +db:backup_and_restore single-db-ci-connection: + extends: + - db:backup_and_restore + - .single-db-ci-connection + - .rails:rules:db-backup + db:rollback: extends: - .db-job-base - .rails:rules:db-rollback script: - - scripts/db_tasks db:migrate VERSION=20220502173045 # 14.10 (last 14.x version) - - scripts/db_tasks db:migrate + - bundle exec rake db:migrate VERSION=20220502173045 # 14.10 (last 14.x version) + - bundle exec rake db:migrate db:rollback single-db: extends: @@ -31,8 +61,7 @@ db:check-schema: - .db-job-base - .rails:rules:ee-mr-and-default-branch-only script: - - run_timed_command "bundle exec rake db:drop db:create" - - run_timed_command "scripts/db_tasks db:migrate" + - run_timed_command "bundle exec rake db:drop db:create db:migrate" db:check-schema-single-db: extends: @@ -97,7 +126,7 @@ db:backup_and_restore: GITLAB_ASSUME_YES: "1" script: - . scripts/prepare_build.sh - - bundle exec rake db:drop db:create db:structure:load db:seed_fu + - 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} - bundle exec rake gitlab:backup:create - date diff --git a/.gitlab/ci/docs.gitlab-ci.yml b/.gitlab/ci/docs.gitlab-ci.yml index b404444f815..a52372a7bb4 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.16-ruby-3.0.5-869cfc5d + image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-docs/lint-html:alpine-3.17-ruby-3.2.1-f53af000 stage: lint needs: [] script: @@ -58,7 +58,7 @@ docs-lint links: .docs-markdown-lint-image: # When updating the image version here, update it in /scripts/lint-doc.sh too. - image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-docs/lint-markdown:alpine-3.16-vale-2.22.0-markdownlint-0.32.2-markdownlint2-0.6.0 + image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-docs/lint-markdown:alpine-3.17-vale-2.24.0-markdownlint-0.33.0-markdownlint2-0.6.0 docs-lint markdown: extends: diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index 2e0d83187cf..c5d992cab63 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-3.2-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-16.14:rubygems-${RUBYGEMS_VERSION}-git-2.33-lfs-2.9-yarn-1.22-graphicsmagick-1.3.36 variables: SETUP_DB: "false" WEBPACK_VENDOR_DLL: "true" @@ -49,6 +49,18 @@ compile-production-assets: after_script: - rm -f /etc/apt/sources.list.d/google*.list # We don't need to update Chrome here +compile-production-assets-esbuild: + allow_failure: true + extends: + - .compile-assets-base + - .frontend:rules:compile-production-assets + variables: + NODE_ENV: "production" + RAILS_ENV: "production" + WEBPACK_USE_ESBUILD_LOADER: "true" + after_script: + - rm -f /etc/apt/sources.list.d/google*.list # We don't need to update Chrome here + compile-test-assets: extends: - .compile-assets-base @@ -61,6 +73,14 @@ compile-test-assets: - "${WEBPACK_COMPILE_LOG_PATH}" when: always +compile-test-assets-esbuild: + allow_failure: true + extends: + - .compile-assets-base + - .frontend:rules:compile-test-assets + variables: + WEBPACK_USE_ESBUILD_LOADER: "true" + compile-test-assets as-if-foss: extends: - compile-test-assets @@ -141,6 +161,21 @@ rspec-all frontend_fixture as-if-foss: - !reference [.frontend-fixtures-base, needs] - "compile-test-assets as-if-foss" +# Uploads EE fixtures in the EE project. +# Uploads FOSS fixtures in the FOSS project. +upload-frontend-fixtures: + extends: + - .frontend-fixtures-base + - .frontend:rules:upload-frontend-fixtures + stage: fixtures + needs: ["rspec-all frontend_fixture"] + script: + - source scripts/gitlab_component_helpers.sh + - 'fixtures_archive_doesnt_exist || { echoinfo "INFO: Exiting early as package exists."; exit 0; }' + - run_timed_command "create_fixtures_package" + - run_timed_command "upload_fixtures_package" + artifacts: {} + graphql-schema-dump: variables: SETUP_DB: "false" diff --git a/.gitlab/ci/global.gitlab-ci.yml b/.gitlab/ci/global.gitlab-ci.yml index ba623ef4cbe..14fa0fc3671 100644 --- a/.gitlab/ci/global.gitlab-ci.yml +++ b/.gitlab/ci/global.gitlab-ci.yml @@ -229,14 +229,6 @@ - *node-modules-cache # We don't push this cache as it's already rebuilt by `update-assets-compile-*-cache` - *storybook-node-modules-cache-push -.use-pg11: - services: - - name: postgres:11.6 - command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] - - name: redis:5.0-alpine - variables: - POSTGRES_HOST_AUTH_METHOD: trust - PG_VERSION: "11" .use-pg12: services: @@ -256,21 +248,6 @@ POSTGRES_HOST_AUTH_METHOD: trust PG_VERSION: "13" -.use-pg11-es7-ee: - services: - - name: postgres:11.6 - command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] - - name: redis:5.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 - alias: zoekt-ci-image - variables: - POSTGRES_HOST_AUTH_METHOD: trust - PG_VERSION: "11" - ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060 - ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070 - .use-pg12-es7-ee: services: - name: postgres:12 @@ -306,7 +283,7 @@ - name: postgres:12 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] - name: redis:6.0-alpine - - name: elasticsearch:8.5.3 + - name: elasticsearch:8.6.2 - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0 alias: zoekt-ci-image variables: @@ -376,7 +353,7 @@ .use-buildx: extends: .use-docker-in-docker - image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-bullseye-slim:docker-${DOCKER_VERSION}-buildx-0.8 + image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-bullseye-slim:docker-${DOCKER_VERSION} variables: QEMU_IMAGE: tonistiigi/binfmt:qemu-v7.0.0 before_script: diff --git a/.gitlab/ci/notify.gitlab-ci.yml b/.gitlab/ci/notify.gitlab-ci.yml index 20f19978022..795a0cd6439 100644 --- a/.gitlab/ci/notify.gitlab-ci.yml +++ b/.gitlab/ci/notify.gitlab-ci.yml @@ -70,3 +70,28 @@ notify-pipeline-failure: - ${FAILED_PIPELINE_SLACK_MESSAGE_FILE} when: always expire_in: 2 days + +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 diff --git a/.gitlab/ci/package-and-test/main.gitlab-ci.yml b/.gitlab/ci/package-and-test/main.gitlab-ci.yml index 0d30cb78be7..4c89cbb721b 100644 --- a/.gitlab/ci/package-and-test/main.gitlab-ci.yml +++ b/.gitlab/ci/package-and-test/main.gitlab-ci.yml @@ -8,7 +8,7 @@ include: - local: .gitlab/ci/package-and-test/rules.gitlab-ci.yml - local: .gitlab/ci/package-and-test/variables.gitlab-ci.yml - project: gitlab-org/quality/pipeline-common - ref: 2.0.0 + ref: 2.2.0 file: - /ci/base.gitlab-ci.yml - /ci/allure-report.yml @@ -41,7 +41,8 @@ stages: .update-script: script: - - export QA_COMMAND="bundle exec gitlab-qa Test::Omnibus::UpdateFromPrevious $RELEASE $GITLAB_VERSION $UPDATE_TYPE -- $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS" + - !reference [.bundle-prefix] + - export QA_COMMAND="$BUNDLE_PREFIX gitlab-qa Test::Omnibus::UpdateFromPrevious $RELEASE $GITLAB_SEMVER_VERSION $UPDATE_TYPE -- $QA_RSPEC_TAGS $RSPEC_REPORT_OPTS" - echo "Running - '$QA_COMMAND'" - eval "$QA_COMMAND" @@ -59,15 +60,16 @@ stages: - job: download-knapsack-report artifacts: true optional: true + - job: check-release-set variables: QA_GENERATE_ALLURE_REPORT: "true" QA_CAN_TEST_PRAEFECT: "false" QA_INTERCEPT_REQUESTS: "true" - QA_RUN_TYPE: e2e-package-and-test + GITLAB_LICENSE_MODE: test + GITLAB_QA_ADMIN_ACCESS_TOKEN: $QA_ADMIN_ACCESS_TOKEN + # 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 - GITLAB_QA_ADMIN_ACCESS_TOKEN: $QA_ADMIN_ACCESS_TOKEN - GITLAB_LICENSE_MODE: test # ========================================== # Prepare stage @@ -122,8 +124,10 @@ trigger-omnibus-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 "GITLAB_ASSETS_TAG=$(assets_image_tag)" >> $BUILD_ENV + echo "EE=$([[ $FOSS_ONLY == 'true' ]] && echo 'false' || echo 'true')" >> $BUILD_ENV echo "Built environment file for omnibus build:" cat $BUILD_ENV artifacts: @@ -152,10 +156,10 @@ trigger-omnibus: 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 - SKIP_QA_DOCKER: "true" SKIP_QA_TEST: "true" - ee: "true" + ee: $EE trigger: project: gitlab-org/build/omnibus-gitlab-mirror strategy: depend @@ -202,7 +206,7 @@ cache-gems: # Run manual quarantine job # this job requires passing QA_SCENARIO variable # and optionally QA_TESTS to run specific quarantined tests -_ee:quarantine: +_quarantine: extends: - .qa - .rules:test:manual @@ -213,12 +217,33 @@ _ee:quarantine: variables: QA_RSPEC_TAGS: --tag quarantine +# Temporary test job to support the effort of migrating to Super Sidebar +# https://gitlab.com/groups/gitlab-org/-/epics/9044 +_super-sidebar-nav: + extends: + - .qa + - .parallel + variables: + QA_SCENARIO: Test::Instance::Image + QA_KNAPSACK_REPORT_NAME: ee-instance + QA_TESTS: "" + QA_SUPER_SIDEBAR_ENABLED: "true" + QA_ALLURE_RESULTS_DIRECTORY: tmp/allure-results-super-sidebar + QA_EXPORT_TEST_METRICS: "false" + GITLAB_QA_OPTS: --set-feature-flags super_sidebar_nav=enabled + RSPEC_REPORT_OPTS: "--format documentation" + SKIP_REPORT_IN_ISSUES: "true" + allow_failure: true + rules: + - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH + - !reference [.rules:test:manual, rules] + # ------------------------------------------ # FF changes # ------------------------------------------ # Run specs with feature flags set to the opposite of the default state -ee:instance-ff-inverse: +instance-ff-inverse: extends: - .qa - .parallel @@ -232,23 +257,23 @@ ee:instance-ff-inverse: # ------------------------------------------ # Jobs with parallel variant # ------------------------------------------ -ee:instance-selective: +instance-selective: extends: .qa variables: QA_SCENARIO: Test::Instance::Image rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -ee:instance: +instance: extends: - .parallel - - ee:instance-selective + - instance-selective rules: - - !reference [.rules:test:feature-flags-set, rules] # always run ee:instance to validate ff change + - !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/ -ee:praefect-selective: +praefect-selective: extends: .qa variables: QA_SCENARIO: Test::Integration::Praefect @@ -256,30 +281,30 @@ ee:praefect-selective: rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -ee:praefect: +praefect: extends: - .parallel - - ee:praefect-selective + - praefect-selective rules: - !reference [.rules:test:qa-parallel, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -ee:relative-url-selective: +relative-url-selective: extends: .qa variables: QA_SCENARIO: Test::Instance::RelativeUrl rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -ee:relative-url: +relative-url: extends: - .parallel - - ee:relative-url-selective + - relative-url-selective rules: - !reference [.rules:test:qa-parallel, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -ee:decomposition-single-db-selective: +decomposition-single-db-selective: extends: .qa variables: QA_SCENARIO: Test::Instance::Image @@ -287,15 +312,15 @@ ee:decomposition-single-db-selective: rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -ee:decomposition-single-db: +decomposition-single-db: extends: - .parallel - - ee:decomposition-single-db-selective + - decomposition-single-db-selective rules: - !reference [.rules:test:qa-parallel, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -ee:decomposition-multiple-db-selective: +decomposition-multiple-db-selective: extends: .qa variables: QA_SCENARIO: Test::Instance::Image @@ -304,15 +329,15 @@ ee:decomposition-multiple-db-selective: rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -ee:decomposition-multiple-db: +decomposition-multiple-db: extends: - .parallel - - ee:decomposition-multiple-db-selective + - decomposition-multiple-db-selective rules: - !reference [.rules:test:qa-parallel, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -ee:object-storage-selective: +object-storage-selective: extends: .qa variables: QA_SCENARIO: Test::Instance::Image @@ -321,42 +346,42 @@ ee:object-storage-selective: rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::ObjectStorage/ -ee:object-storage: - extends: ee:object-storage-selective +object-storage: + extends: object-storage-selective parallel: 2 rules: - !reference [.rules:test:qa-parallel, rules] - if: $QA_SUITES =~ /Test::Instance::ObjectStorage/ -ee:object-storage-aws-selective: - extends: ee:object-storage-selective +object-storage-aws-selective: + extends: object-storage-selective 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 -ee:object-storage-aws: - extends: ee:object-storage-aws-selective +object-storage-aws: + extends: object-storage-aws-selective parallel: 2 rules: - - !reference [ee:object-storage, rules] + - !reference [object-storage, rules] -ee:object-storage-gcs-selective: - extends: ee:object-storage-selective +object-storage-gcs-selective: + extends: object-storage-selective 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 -ee:object-storage-gcs: - extends: ee:object-storage-gcs-selective +object-storage-gcs: + extends: object-storage-gcs-selective parallel: 2 rules: - - !reference [ee:object-storage, rules] + - !reference [object-storage, rules] -ee:packages-selective: +packages-selective: extends: .qa variables: QA_SCENARIO: Test::Instance::Image @@ -365,8 +390,8 @@ ee:packages-selective: rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::Packages/ -ee:packages: - extends: ee:packages-selective +packages: + extends: packages-selective parallel: 2 rules: - !reference [.rules:test:qa-parallel, rules] @@ -375,7 +400,7 @@ ee:packages: # ------------------------------------------ # Non parallel jobs # ------------------------------------------ -ee:update-minor: +update-minor: extends: - .qa - .update-script @@ -387,7 +412,7 @@ ee:update-minor: - if: $QA_SUITES =~ /Test::Instance::Smoke/ - !reference [.rules:test:manual, rules] -ee:update-major: +update-major: extends: - .qa - .update-script @@ -399,7 +424,7 @@ ee:update-major: - if: $QA_SUITES =~ /Test::Instance::Smoke/ - !reference [.rules:test:manual, rules] -ee:gitlab-pages: +gitlab-pages: extends: .qa variables: QA_SCENARIO: Test::Integration::GitlabPages @@ -408,7 +433,7 @@ ee:gitlab-pages: - if: $QA_SUITES =~ /Test::Instance::GitlabPages/ - !reference [.rules:test:manual, rules] -ee:gitaly-cluster: +gitaly-cluster: extends: .qa variables: QA_SCENARIO: Test::Integration::GitalyCluster @@ -417,16 +442,17 @@ ee:gitaly-cluster: - if: $QA_SUITES =~ /Test::Integration::GitalyCluster/ - !reference [.rules:test:manual, rules] -ee:group-saml: +group-saml: extends: .qa variables: QA_SCENARIO: Test::Integration::GroupSAML rules: + - !reference [.rules:test:ee-only, rules] - !reference [.rules:test:qa, rules] - if: $QA_SUITES =~ /Test::Integration::GroupSAML/ - !reference [.rules:test:manual, rules] -ee:instance-saml: +instance-saml: extends: .qa variables: QA_SCENARIO: Test::Integration::InstanceSAML @@ -435,7 +461,7 @@ ee:instance-saml: - if: $QA_SUITES =~ /Test::Integration::InstanceSAML/ - !reference [.rules:test:manual, rules] -ee:jira: +jira: extends: .qa variables: QA_SCENARIO: Test::Integration::Jira @@ -446,7 +472,7 @@ ee:jira: - if: $QA_SUITES =~ /Test::Integration::Jira/ - !reference [.rules:test:manual, rules] -ee:integrations: +integrations: extends: .qa variables: QA_SCENARIO: Test::Integration::Integrations @@ -455,7 +481,7 @@ ee:integrations: - if: $QA_SUITES =~ /Test::Integration::Integrations/ - !reference [.rules:test:manual, rules] -ee:ldap-no-server: +ldap-no-server: extends: .qa variables: QA_SCENARIO: Test::Integration::LDAPNoServer @@ -464,7 +490,7 @@ ee:ldap-no-server: - if: $QA_SUITES =~ /Test::Integration::LDAPNoServer/ - !reference [.rules:test:manual, rules] -ee:ldap-tls: +ldap-tls: extends: .qa variables: QA_SCENARIO: Test::Integration::LDAPTLS @@ -473,7 +499,7 @@ ee:ldap-tls: - if: $QA_SUITES =~ /Test::Integration::LDAPTLS/ - !reference [.rules:test:manual, rules] -ee:ldap-no-tls: +ldap-no-tls: extends: .qa variables: QA_SCENARIO: Test::Integration::LDAPNoTLS @@ -482,7 +508,7 @@ ee:ldap-no-tls: - if: $QA_SUITES =~ /Test::Integration::LDAPNoTLS/ - !reference [.rules:test:manual, rules] -ee:mtls: +mtls: extends: .qa variables: QA_SCENARIO: Test::Integration::MTLS @@ -491,7 +517,7 @@ ee:mtls: - if: $QA_SUITES =~ /Test::Integration::Mtls/ - !reference [.rules:test:manual, rules] -ee:mattermost: +mattermost: extends: .qa variables: QA_SCENARIO: Test::Integration::Mattermost @@ -500,7 +526,7 @@ ee:mattermost: - if: $QA_SUITES =~ /Test::Integration::Mattermost/ - !reference [.rules:test:manual, rules] -ee:registry: +registry: extends: .qa variables: QA_SCENARIO: Test::Integration::Registry @@ -509,7 +535,7 @@ ee:registry: - if: $QA_SUITES =~ /Test::Integration::Registry/ - !reference [.rules:test:manual, rules] -ee:registry-with-cdn: +registry-with-cdn: extends: .qa variables: QA_SCENARIO: Test::Integration::RegistryWithCDN @@ -526,7 +552,7 @@ ee:registry-with-cdn: - if: $QA_SUITES =~ /Test::Integration::RegistryWithCDN/ - !reference [.rules:test:manual, rules] -ee:repository-storage: +repository-storage: extends: .qa variables: QA_SCENARIO: Test::Instance::RepositoryStorage @@ -535,7 +561,7 @@ ee:repository-storage: - if: $QA_SUITES =~ /Test::Instance::RepositoryStorage/ - !reference [.rules:test:manual, rules] -ee:service-ping-disabled: +service-ping-disabled: extends: .qa variables: QA_SCENARIO: Test::Integration::ServicePingDisabled @@ -544,7 +570,7 @@ ee:service-ping-disabled: - if: $QA_SUITES =~ /Test::Integration::ServicePingDisabled/ - !reference [.rules:test:manual, rules] -ee:smtp: +smtp: extends: .qa variables: QA_SCENARIO: Test::Integration::SMTP @@ -553,7 +579,7 @@ ee:smtp: - if: $QA_SUITES =~ /Test::Integration::SMTP/ - !reference [.rules:test:manual, rules] -ee:cloud-activation: +cloud-activation: extends: .qa variables: QA_SCENARIO: Test::Instance::Image @@ -563,7 +589,7 @@ ee:cloud-activation: - if: $QA_SUITES =~ /Test::Instance::CloudActivation/ - !reference [.rules:test:manual, rules] -ee:large-setup: +large-setup: extends: .qa variables: QA_SCENARIO: Test::Instance::Image @@ -573,7 +599,7 @@ ee:large-setup: - if: $QA_SUITES =~ /Test::Instance::LargeSetup/ - !reference [.rules:test:manual, rules] -ee:metrics: +metrics: extends: .qa variables: QA_SCENARIO: Test::Integration::Metrics @@ -582,31 +608,31 @@ ee:metrics: - if: $QA_SUITES =~ /Test::Instance::Metrics/ - !reference [.rules:test:manual, rules] -ee:elasticsearch: +elasticsearch: extends: .qa variables: QA_SCENARIO: "Test::Integration::Elasticsearch" before_script: - !reference [.qa, before_script] rules: + - !reference [.rules:test:ee-only, rules] - !reference [.rules:test:qa, rules] - if: $QA_SUITES =~ /Test::Integration::Elasticsearch/ - !reference [.rules:test:manual, rules] -ee:registry-object-storage-tls: - extends: ee:object-storage-aws-selective +registry-object-storage-tls: + extends: object-storage-aws-selective variables: QA_SCENARIO: Test::Integration::RegistryTLS QA_RSPEC_TAGS: "" GITLAB_TLS_CERTIFICATE: $QA_GITLAB_TLS_CERTIFICATE GITLAB_QA_OPTS: --omnibus-config registry_object_storage -ee:importers: +importers: extends: .qa variables: QA_SCENARIO: Test::Integration::Import QA_MOCK_GITHUB: "true" - GITLAB_QA_OPTS: --set-feature-flags bulk_import_projects=enabled rules: - !reference [.rules:test:qa, rules] - if: $QA_SUITES =~ /Test::Integration::Import/ @@ -621,11 +647,26 @@ e2e-test-report: - .rules:report:allure-report stage: report variables: + ALLURE_JOB_NAME: e2e-package-and-test GITLAB_AUTH_TOKEN: $PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE ALLURE_PROJECT_PATH: $CI_PROJECT_PATH ALLURE_MERGE_REQUEST_IID: $CI_MERGE_REQUEST_IID - ALLURE_JOB_NAME: e2e-package-and-test - GIT_STRATEGY: none + +# Temporary separate test report for super-sidebar test job +# TODO: remove once super-sidebar is on by default and enabled in tests +# https://gitlab.com/groups/gitlab-org/-/epics/9044 +e2e-test-report-super-sidebar: + extends: + - .generate-allure-report-base + stage: report + needs: + - _super-sidebar-nav + variables: + ALLURE_JOB_NAME: e2e-super-sidebar + ALLURE_RESULTS_GLOB: gitlab-qa-run-*/**/allure-results-super-sidebar + rules: + - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH + - !reference [.rules:test:manual, rules] upload-knapsack-report: extends: diff --git a/.gitlab/ci/package-and-test/rules.gitlab-ci.yml b/.gitlab/ci/package-and-test/rules.gitlab-ci.yml index 50b07589040..4e597b042dd 100644 --- a/.gitlab/ci/package-and-test/rules.gitlab-ci.yml +++ b/.gitlab/ci/package-and-test/rules.gitlab-ci.yml @@ -115,12 +115,18 @@ - *qa-run-all-tests - *feature-flags-set-manual +.rules:test:ee-only: + rules: + - if: $FOSS_ONLY == "true" + when: never + .rules:test:update: rules: - # skip upgrade jobs if gitlab version is not provided + # skip upgrade jobs if gitlab version is not in semver compatible format # these jobs need gitlab version because we can't reliably detect it from just the image - - if: $GITLAB_VERSION == null + - if: $GITLAB_SEMVER_VERSION !~ /^\d+\.\d+\.\d+/ when: never + - !reference [.rules:test:ee-only, rules] - !reference [.rules:test:qa, rules] # ------------------------------------------ diff --git a/.gitlab/ci/package-and-test/variables.gitlab-ci.yml b/.gitlab/ci/package-and-test/variables.gitlab-ci.yml index c45807e5a23..b7c4e5519ca 100644 --- a/.gitlab/ci/package-and-test/variables.gitlab-ci.yml +++ b/.gitlab/ci/package-and-test/variables.gitlab-ci.yml @@ -6,7 +6,9 @@ variables: SKIP_REPORT_IN_ISSUES: "true" OMNIBUS_GITLAB_CACHE_UPDATE: "false" OMNIBUS_GITLAB_RUBY3_BUILD: "false" + OMNIBUS_GITLAB_RUBY2_BUILD: "false" OMNIBUS_GITLAB_CACHE_EDITION: "GITLAB" + ALLURE_JOB_NAME: $CI_PROJECT_NAME QA_LOG_LEVEL: "info" QA_TESTS: "" QA_FEATURE_FLAGS: "" diff --git a/.gitlab/ci/preflight.gitlab-ci.yml b/.gitlab/ci/preflight.gitlab-ci.yml index 05b05fde53b..8c1cb44807a 100644 --- a/.gitlab/ci/preflight.gitlab-ci.yml +++ b/.gitlab/ci/preflight.gitlab-ci.yml @@ -1,14 +1,63 @@ -rails-production-environment: +.preflight-job-base: + stage: preflight + extends: + - .default-retry + needs: [] + +.qa-preflight-job: + image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-bullseye-ruby-${RUBY_VERSION}:bundler-2.3-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION} extends: + - .preflight-job-base + - .qa-cache + variables: + USE_BUNDLE_INSTALL: "false" + SETUP_DB: "false" + before_script: + - !reference [.default-before_script, before_script] + - cd qa && bundle install + +rails-production-server-boot: + extends: + - .preflight-job-base - .default-before_script - .production - .ruby-cache - - .setup:rules:rails-production-environment + - .setup:rules:rails-production-server-boot - .use-pg12 - stage: preflight variables: BUNDLE_WITHOUT: "development:test" BUNDLE_WITH: "production" needs: [] script: - - bundle exec rails runner --environment=production 'puts Rails.env' + - source scripts/utils.sh + - bundle exec rails server -e production & + - sleep 40 # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114124#note_1309506358 + - retry_times_sleep 10 5 "curl http://0.0.0.0:3000" + - kill $(jobs -p) + +no-ee-check: + extends: + - .preflight-job-base + - .setup:rules:no-ee-check + script: + - scripts/no-dir-check ee + +no-jh-check: + extends: + - .preflight-job-base + - .setup:rules:no-jh-check + script: + - scripts/no-dir-check jh + +qa:selectors: + extends: + - .qa-preflight-job + - .qa:rules:ee-and-foss + script: + - bundle exec bin/qa Test::Sanity::Selectors + +qa:selectors-as-if-foss: + extends: + - qa:selectors + - .qa:rules:as-if-foss + - .as-if-foss diff --git a/.gitlab/ci/qa.gitlab-ci.yml b/.gitlab/ci/qa.gitlab-ci.yml index a72e6fc0137..d935fecba01 100644 --- a/.gitlab/ci/qa.gitlab-ci.yml +++ b/.gitlab/ci/qa.gitlab-ci.yml @@ -25,13 +25,6 @@ qa:internal-as-if-foss: - .qa:rules:internal-as-if-foss - .as-if-foss -qa:selectors: - extends: - - .qa-job-base - - .qa:rules:ee-and-foss - script: - - bundle exec bin/qa Test::Sanity::Selectors - qa:master-auto-quarantine-dequarantine: extends: - .qa-job-base @@ -50,12 +43,6 @@ qa:nightly-auto-quarantine-dequarantine: - bundle exec confiner -r .confiner/nightly.yml allow_failure: true -qa:selectors-as-if-foss: - extends: - - qa:selectors - - .qa:rules:as-if-foss - - .as-if-foss - qa:update-qa-cache: extends: - .qa-job-base @@ -65,7 +52,7 @@ qa:update-qa-cache: script: - echo "Cache has been updated and ready to be uploaded." -e2e:package-and-test: +e2e:package-and-test-ee: extends: - .production # this makes sure GITLAB_ALLOW_SEPARATE_CI_DATABASE is passed to the child pipeline - .qa:rules:package-and-test @@ -82,6 +69,7 @@ e2e:package-and-test: GITLAB_QA_IMAGE: "${CI_REGISTRY_IMAGE}/gitlab-ee-qa:${CI_COMMIT_SHA}" RUN_WITH_BUNDLE: "true" # instructs pipeline to install and run gitlab-qa gem via bundler QA_PATH: qa # sets the optional path for bundler to run from + QA_RUN_TYPE: e2e-package-and-test inherit: variables: - CHROME_VERSION @@ -89,6 +77,9 @@ e2e:package-and-test: - DOCKER_VERSION - REGISTRY_GROUP - REGISTRY_HOST + - OMNIBUS_GITLAB_CACHE_EDITION + - OMNIBUS_GITLAB_RUBY3_BUILD + - OMNIBUS_GITLAB_RUBY2_BUILD trigger: strategy: depend forward: diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index 23f38fddb80..95780116800 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -105,6 +105,18 @@ rspec background_migration pg12 single-db: - .single-db-rspec - .rails:rules:single-db +rspec migration pg12 single-db-ci-connection: + extends: + - rspec migration pg12 + - .single-db-ci-connection-rspec + - .rails:rules:single-db-ci-connection + +rspec background_migration pg12 single-db-ci-connection: + extends: + - rspec background_migration pg12 + - .single-db-ci-connection-rspec + - .rails:rules:single-db-ci-connection + rspec migration pg12 praefect: extends: - rspec migration pg12 @@ -191,16 +203,6 @@ rspec system pg12 praefect: - .praefect-with-db - .rails:rules:praefect-with-db -# Dedicated job to test DB library code against PG11. -# Note that these are already tested against PG12 in the `rspec unit pg12` / `rspec-ee unit pg12` jobs. -rspec db-library-code pg11: - extends: - - .rspec-base-pg11 - - .rails:rules:ee-and-foss-db-library-code - script: - - !reference [.base-script, script] - - rspec_db_library_code - rspec fast_spec_helper: extends: - .rspec-base-pg12 @@ -438,6 +440,18 @@ rspec background_migration pg12-as-if-foss single-db: - .single-db-rspec - .rails:rules:single-db +rspec migration pg12-as-if-foss single-db-ci-connection: + extends: + - rspec migration pg12-as-if-foss + - .single-db-ci-connection-rspec + - .rails:rules:single-db-ci-connection + +rspec background_migration pg12-as-if-foss single-db-ci-connection: + extends: + - rspec background_migration pg12-as-if-foss + - .single-db-ci-connection-rspec + - .rails:rules:single-db-ci-connection + rspec unit pg12-as-if-foss: extends: - .rspec-base-pg12-as-if-foss @@ -530,6 +544,18 @@ rspec-ee background_migration pg12 single-db: - .single-db-rspec - .rails:rules:single-db +rspec-ee migration pg12 single-db-ci-connection: + extends: + - rspec-ee migration pg12 + - .single-db-ci-connection-rspec + - .rails:rules:single-db-ci-connection + +rspec-ee background_migration pg12 single-db-ci-connection: + extends: + - rspec-ee background_migration pg12 + - .single-db-ci-connection-rspec + - .rails:rules:single-db-ci-connection + rspec-ee migration pg12 praefect: extends: - rspec migration pg12 @@ -616,39 +642,6 @@ rspec-ee system pg12 single-db: ########################################## # EE/FOSS: default branch nightly scheduled jobs # -# PG11 -rspec migration pg11: - extends: - - .rspec-base-pg11 - - .rspec-base-migration - - .rails:rules:rspec-on-pg11 - - .rspec-migration-parallel - -rspec background_migration pg11: - extends: - - .rspec-base-pg11 - - .rspec-base-migration - - .rails:rules:rspec-on-pg11 - - .rspec-background-migration-parallel - -rspec unit pg11: - extends: - - .rspec-base-pg11 - - .rails:rules:rspec-on-pg11 - - .rspec-unit-parallel - -rspec integration pg11: - extends: - - .rspec-base-pg11 - - .rails:rules:rspec-on-pg11 - - .rspec-integration-parallel - -rspec system pg11: - extends: - - .rspec-base-pg11 - - .rails:rules:rspec-on-pg11 - - .rspec-system-parallel - # PG13 rspec migration pg13: extends: @@ -687,75 +680,36 @@ rspec system pg13: ##################################### # EE: default branch nightly scheduled jobs # -# PG11 -rspec-ee migration pg11: - extends: - - .rspec-ee-base-pg11 - - .rspec-base-migration - - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - - .rspec-ee-migration-parallel - -rspec-ee background_migration pg11: - extends: - - .rspec-ee-base-pg11 - - .rspec-base-migration - - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - - .rspec-ee-background-migration-parallel - -rspec-ee unit pg11: - extends: - - .rspec-ee-base-pg11 - - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - - .rspec-ee-unit-parallel - -rspec-ee integration pg11: - extends: - - .rspec-ee-base-pg11 - - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - - .rspec-ee-integration-parallel - -rspec-ee system pg11: - extends: - - .rspec-ee-base-pg11 - - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - - .rspec-ee-system-parallel - # PG12 rspec-ee unit pg12 opensearch1: extends: - .rspec-ee-base-pg12-opensearch1 - .rspec-ee-unit-parallel - - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only rspec-ee unit pg12 opensearch2: extends: - .rspec-ee-base-pg12-opensearch2 - .rspec-ee-unit-parallel - - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only rspec-ee integration pg12 opensearch1: extends: - .rspec-ee-base-pg12-opensearch1 - .rspec-ee-integration-parallel - - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only rspec-ee integration pg12 opensearch2: extends: - .rspec-ee-base-pg12-opensearch2 - .rspec-ee-integration-parallel - - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only rspec-ee system pg12 opensearch1: extends: - .rspec-ee-base-pg12-opensearch1 - .rspec-ee-system-parallel - - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only rspec-ee system pg12 opensearch2: extends: - .rspec-ee-base-pg12-opensearch2 - .rspec-ee-system-parallel - - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only # PG13 rspec-ee migration pg13: @@ -821,13 +775,14 @@ rspec-foss-impact:pipeline-generate: extends: - .rails:rules:rspec-foss-impact stage: prepare - needs: ["detect-tests"] + needs: ["detect-tests", "retrieve-tests-metadata"] script: - - scripts/generate-rspec-foss-impact-pipeline "${RSPEC_MATCHING_TESTS_FOSS_PATH}" "${RSPEC_FOSS_IMPACT_PIPELINE_YML}" + - scripts/generate_rspec_pipeline.rb -f "${RSPEC_MATCHING_TESTS_FOSS_PATH}" -t "${RSPEC_FOSS_IMPACT_PIPELINE_TEMPLATE_YML}" -k "${KNAPSACK_RSPEC_SUITE_REPORT_PATH}" + - cat "${RSPEC_FOSS_IMPACT_PIPELINE_TEMPLATE_YML}.yml" artifacts: expire_in: 1 day paths: - - $RSPEC_FOSS_IMPACT_PIPELINE_YML + - "${RSPEC_FOSS_IMPACT_PIPELINE_TEMPLATE_YML}.yml" rspec-foss-impact:trigger: extends: @@ -850,7 +805,7 @@ rspec-foss-impact:trigger: yaml_variables: true pipeline_variables: true include: - - artifact: $RSPEC_FOSS_IMPACT_PIPELINE_YML + - artifact: "${RSPEC_FOSS_IMPACT_PIPELINE_TEMPLATE_YML}.yml" job: rspec-foss-impact:pipeline-generate fail-pipeline-early: 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 eb54fa25875..02b7d61a4fa 100644 --- a/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb +++ b/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb @@ -21,7 +21,7 @@ dont-interrupt-me: script: - echo "This jobs makes sure this pipeline won't be interrupted! See https://docs.gitlab.com/ee/ci/yaml/#interruptible." -rspec foss-impact: +.base-rspec-foss-impact: extends: .rspec-base-pg12-as-if-foss needs: - pipeline: $PARENT_PIPELINE_ID @@ -37,9 +37,6 @@ rspec foss-impact: variables: RSPEC_TESTS_FILTER_FILE: "${RSPEC_MATCHING_TESTS_FOSS_PATH}" RSPEC_TESTS_MAPPING_ENABLED: "true" -<% if Integer(parallel_value) > 1 %> - parallel: <%= parallel_value %> -<% end %> script: - !reference [.base-script, script] - rspec_paralellized_job "--tag ~quarantine --tag ~level:migration --tag ~zoekt" @@ -48,3 +45,46 @@ rspec foss-impact: paths: - "${RSPEC_MATCHING_TESTS_FOSS_PATH}" - tmp/capybara/ + +<% if rspec_files_per_test_level[:migration][:files].size > 0 %> +rspec migration foss-impact: + extends: .base-rspec-foss-impact +<% if rspec_files_per_test_level[:migration][:parallelization] > 1 %> + parallel: <%= rspec_files_per_test_level[:migration][:parallelization] %> +<% end %> + script: + - !reference [.base-script, script] + - rspec_paralellized_job "--tag ~quarantine --tag ~zoekt" +<% end %> + +<% if rspec_files_per_test_level[:background_migration][:files].size > 0 %> +rspec background_migration foss-impact: + extends: .base-rspec-foss-impact +<% if rspec_files_per_test_level[:background_migration][:parallelization] > 1 %> + parallel: <%= rspec_files_per_test_level[:background_migration][:parallelization] %> +<% end %> +<% end %> + +<% if rspec_files_per_test_level[:unit][:files].size > 0 %> +rspec unit foss-impact: + extends: .base-rspec-foss-impact +<% if rspec_files_per_test_level[:unit][:parallelization] > 1 %> + parallel: <%= rspec_files_per_test_level[:unit][:parallelization] %> +<% end %> +<% end %> + +<% if rspec_files_per_test_level[:integration][:files].size > 0 %> +rspec integration foss-impact: + extends: .base-rspec-foss-impact +<% if rspec_files_per_test_level[:integration][:parallelization] > 1 %> + parallel: <%= rspec_files_per_test_level[:integration][:parallelization] %> +<% end %> +<% end %> + +<% if rspec_files_per_test_level[:system][:files].size > 0 %> +rspec system foss-impact: + extends: .base-rspec-foss-impact +<% if rspec_files_per_test_level[:system][:parallelization] > 1 %> + parallel: <%= rspec_files_per_test_level[:system][:parallelization] %> +<% end %> +<% end %> diff --git a/.gitlab/ci/rails/shared.gitlab-ci.yml b/.gitlab/ci/rails/shared.gitlab-ci.yml index 4943f7c2e28..0fa65b0be90 100644 --- a/.gitlab/ci/rails/shared.gitlab-ci.yml +++ b/.gitlab/ci/rails/shared.gitlab-ci.yml @@ -36,9 +36,17 @@ include: variables: DECOMPOSED_DB: "false" +.single-db-ci-connection: + extends: .single-db + variables: + CI_CONNECTION_DB: "true" + .single-db-rspec: extends: .single-db +.single-db-ci-connection-rspec: + extends: .single-db-ci-connection + .praefect-with-db: variables: GITALY_PRAEFECT_WITH_DB: '1' @@ -92,11 +100,6 @@ include: - !reference [.base-script, script] - rspec_paralellized_job "--tag ~quarantine --tag ~zoekt" -.rspec-base-pg11: - extends: - - .rspec-base - - .use-pg11 - .rspec-base-pg12: extends: - .rspec-base @@ -119,11 +122,6 @@ include: - .rspec-base - .use-pg13 -.rspec-ee-base-pg11: - extends: - - .rspec-base - - .use-pg11-es7-ee - .rspec-ee-base-pg12: extends: - .rspec-base diff --git a/.gitlab/ci/release-environments.gitlab-ci.yml b/.gitlab/ci/release-environments.gitlab-ci.yml index a9d9c938ee0..24eca1caf4c 100644 --- a/.gitlab/ci/release-environments.gitlab-ci.yml +++ b/.gitlab/ci/release-environments.gitlab-ci.yml @@ -9,7 +9,8 @@ start-release-environments-pipeline: # # https://gitlab.com/gitlab-org/gitlab/-/issues/387183 inherit: - variables: false + variables: + - RUBY_VERSION # These variables are set in the pipeline schedules. # They need to be explicitly passed on to the child pipeline. diff --git a/.gitlab/ci/reports.gitlab-ci.yml b/.gitlab/ci/reports.gitlab-ci.yml index 3242ca29d75..c77ee0276c6 100644 --- a/.gitlab/ci/reports.gitlab-ci.yml +++ b/.gitlab/ci/reports.gitlab-ci.yml @@ -3,7 +3,6 @@ include: - template: Jobs/SAST.gitlab-ci.yml - template: Jobs/Secret-Detection.gitlab-ci.yml - template: Jobs/Dependency-Scanning.gitlab-ci.yml - - template: Jobs/License-Scanning.gitlab-ci.yml code_quality: extends: @@ -126,11 +125,3 @@ package_hunter-bundler: - .reports:rules:package_hunter-bundler variables: PACKAGE_MANAGER: bundler - -license_scanning: - extends: .default-retry - stage: lint - needs: [] - artifacts: - expire_in: 1 week # GitLab-specific - rules: !reference [".reports:rules:license_scanning", rules] diff --git a/.gitlab/ci/review-apps/main.gitlab-ci.yml b/.gitlab/ci/review-apps/main.gitlab-ci.yml index 369330f8189..6bd7542bcde 100644 --- a/.gitlab/ci/review-apps/main.gitlab-ci.yml +++ b/.gitlab/ci/review-apps/main.gitlab-ci.yml @@ -89,13 +89,13 @@ review-build-cng: strategy: depend .review-workflow-base: - extends: - - .default-retry image: ${REVIEW_APPS_IMAGE} + retry: + max: 2 # This is confusing but this means "3 runs at max" variables: HOST_SUFFIX: "${CI_ENVIRONMENT_SLUG}" DOMAIN: "-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}" - GITLAB_HELM_CHART_REF: "afcef7854ac72c5ff958035ef210ba6c68ec800b" # 6.8.0: https://gitlab.com/gitlab-org/charts/gitlab/-/commit/afcef7854ac72c5ff958035ef210ba6c68ec800b + GITLAB_HELM_CHART_REF: "febc4ad69acb7bba0eeb4a62daa577d0b7c3ee71" # 6.9.1: https://gitlab.com/gitlab-org/charts/gitlab/-/commit/febc4ad69acb7bba0eeb4a62daa577d0b7c3ee71 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 edca2cae1c6..12a7ddebc45 100644 --- a/.gitlab/ci/review-apps/qa.gitlab-ci.yml +++ b/.gitlab/ci/review-apps/qa.gitlab-ci.yml @@ -1,6 +1,6 @@ include: - project: gitlab-org/quality/pipeline-common - ref: 2.0.0 + ref: 2.2.0 file: - /ci/base.gitlab-ci.yml - /ci/allure-report.yml diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index 2762b4e5137..b4301c72347 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -85,9 +85,6 @@ .if-merge-request-labels-run-review-app: &if-merge-request-labels-run-review-app if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-review-app/' -.if-merge-request-labels-run-on-pg11: &if-merge-request-labels-run-on-pg11 - if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-on-pg11/' - .if-merge-request-labels-skip-undercoverage: &if-merge-request-labels-skip-undercoverage if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:skip-undercoverage/' @@ -127,6 +124,9 @@ .if-foss-schedule: &if-foss-schedule if: '$CI_PROJECT_PATH == "gitlab-org/gitlab-foss" && $CI_PIPELINE_SOURCE == "schedule"' +.if-foss-default-branch: &if-foss-default-branch + if: '$CI_PROJECT_PATH == "gitlab-org/gitlab-foss" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH' + .if-dot-com-gitlab-org-schedule: &if-dot-com-gitlab-org-schedule if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org" && $CI_PIPELINE_SOURCE == "schedule"' @@ -310,6 +310,9 @@ .models-patterns: &models-patterns - "{,ee/,jh/}{app/models}/**/*" +.decomposed-db-models-patterns: &decomposed-db-models-patterns + - "{,ee/,jh/}app/models/{ci,geo}/**/*" + .lib-gitlab-patterns: &lib-gitlab-patterns - "{,ee/,jh/}lib/{,ee/,jh/}gitlab/**/*" @@ -349,11 +352,13 @@ - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/background_migration/**/*" - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/database{,_spec}.rb" - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/database/**/*" + - "{,ee/,jh/}spec/support/db_cleaner.rb" - "{,ee/,jh/}spec/support/helpers/database/**/*" - "{,ee/,jh/}spec/support/helpers/migrations_helpers/**/*" - "lib/api/admin/batched_background_migrations.rb" - "lib/gitlab/markdown_cache/active_record/**/*" - "spec/requests/api/admin/batched_background_migrations_spec.rb" + - "spec/support/database_cleaner.rb" - "config/prometheus/common_metrics.yml" # Used by Gitlab::DatabaseImporters::CommonMetrics::Importer - "{,ee/,jh/}app/models/project_statistics.rb" # Used to calculate sizes in migration specs # Gitaly has interactions with background migrations: https://gitlab.com/gitlab-org/gitlab/-/issues/336538 @@ -618,6 +623,7 @@ .rails:rules:run-search-tests: rules: + - !reference [".rails:rules:default-branch-schedule-nightly--code-backstage-ee-only", rules] - <<: *if-merge-request-labels-group-global-search changes: *search-backend-patterns - <<: *if-merge-request-labels-group-global-search @@ -968,6 +974,7 @@ .frontend:rules:default-frontend-jobs: rules: - <<: *if-merge-request-labels-run-all-rspec + - <<: *if-merge-request-labels-frontend-and-feature-flag - <<: *if-default-refs changes: *code-backstage-patterns @@ -992,6 +999,22 @@ - <<: *if-merge-request changes: *frontend-patterns-for-as-if-foss +.frontend:rules:upload-frontend-fixtures: + rules: + # The new strategy to upload fixtures as generic packages is experimental and can be disabled by removing the `REUSE_FRONTEND_FIXTURES_ENABLED` variable + - if: '$REUSE_FRONTEND_FIXTURES_ENABLED != "true"' + when: never + - <<: *if-dot-com-gitlab-org-default-branch + changes: *code-backstage-patterns + - <<: *if-foss-default-branch + changes: *code-backstage-patterns + - <<: *if-dot-com-gitlab-org-merge-request + changes: + - ".gitlab/ci/frontend.gitlab-ci.yml" + - "scripts/gitlab_component_helpers.sh" + when: manual + allow_failure: true + .frontend:rules:jest: rules: - <<: *if-fork-merge-request @@ -1108,6 +1131,15 @@ when: on_failure allow_failure: true +.notify:rules:create-issues-for-failing-tests: + rules: + # 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 + ############### # Pages rules # ############### @@ -1233,6 +1265,8 @@ - <<: *if-merge-request-labels-run-single-db - <<: *if-merge-request changes: *db-patterns + - <<: *if-merge-request + changes: *decomposed-db-models-patterns - <<: *if-default-branch-schedule-nightly .rails:rules:db:check-migrations-single-db: @@ -1240,6 +1274,25 @@ - <<: *if-merge-request-labels-run-single-db - <<: *if-merge-request changes: *db-patterns + - <<: *if-merge-request + changes: *decomposed-db-models-patterns + +.rails:rules:single-db-ci-connection: + rules: + - <<: *if-merge-request-labels-run-single-db + - <<: *if-merge-request + changes: *db-patterns + - <<: *if-merge-request + changes: *decomposed-db-models-patterns + - <<: *if-default-branch-schedule-nightly + +.rails:rules:db:check-migrations-single-db-ci-connection: + rules: + - <<: *if-merge-request-labels-run-single-db + - <<: *if-merge-request + changes: *db-patterns + - <<: *if-merge-request + changes: *decomposed-db-models-patterns .rails:rules:db-backup: rules: @@ -1326,6 +1379,8 @@ - !reference [".rails:rules:ee-and-foss-default-rules", rules] - <<: *if-default-refs changes: *backend-patterns + - <<: *if-default-refs + changes: *backstage-patterns .rails:rules:ee-and-foss-unit:predictive: rules: @@ -1335,6 +1390,8 @@ - !reference [".rails:rules:unit-integration:predictive-default-rules", rules] - <<: *if-merge-request changes: *backend-patterns + - <<: *if-merge-request + changes: *backstage-patterns .rails:rules:ee-and-foss-integration: rules: @@ -1605,7 +1662,6 @@ - <<: *if-default-refs changes: *db-library-patterns - <<: *if-merge-request-labels-run-all-rspec - - <<: *if-merge-request-labels-run-on-pg11 .rails:rules:ee-mr-and-default-branch-only: rules: @@ -1695,11 +1751,6 @@ - <<: *if-merge-request changes: *backend-patterns -.rails:rules:rspec-on-pg11: - rules: - - <<: *if-merge-request-labels-run-on-pg11 - - !reference [".rails:rules:default-branch-schedule-nightly--code-backstage-default-rules", rules] - .rails:rules:default-branch-schedule-nightly--code-backstage-default-rules: rules: - <<: *if-default-branch-schedule-nightly @@ -1892,6 +1943,12 @@ changes: ["vendor/gems/bundler-checksum/**/*"] - <<: *if-merge-request-labels-run-all-rspec +.vendor:rules:cloud_profiler_agent: + rules: + - <<: *if-merge-request + changes: ["vendor/gems/cloud_profiler_agent/**/*"] + - <<: *if-merge-request-labels-run-all-rspec + ################## # Releases rules # ################## @@ -2014,13 +2071,6 @@ - <<: *if-merge-request changes: ["Gemfile.lock"] -.reports:rules:license_scanning: - rules: - - if: '$LICENSE_MANAGEMENT_DISABLED || $GITLAB_FEATURES !~ /\blicense_scanning\b/' - when: never - - <<: *if-default-refs - changes: *dependency-patterns - ################ # Review rules # ################ @@ -2185,7 +2235,7 @@ - <<: *if-default-refs changes: *code-backstage-patterns -.setup:rules:rails-production-environment: +.setup:rules:rails-production-server-boot: rules: - <<: *if-default-refs changes: *code-patterns @@ -2242,6 +2292,7 @@ - <<: *if-default-refs changes: *workhorse-patterns - <<: *if-merge-request-labels-run-all-rspec + - <<: *if-merge-request-labels-frontend-and-feature-flag .test-metadata:rules:update-tests-metadata: rules: diff --git a/.gitlab/ci/setup.gitlab-ci.yml b/.gitlab/ci/setup.gitlab-ci.yml index 298d5c4ae08..76c7af2753e 100644 --- a/.gitlab/ci/setup.gitlab-ci.yml +++ b/.gitlab/ci/setup.gitlab-ci.yml @@ -51,22 +51,6 @@ gitlab_git_test: script: - spec/support/prepare-gitlab-git-test-for-commit --check-for-changes -no-ee-check: - extends: - - .predictive-job - - .setup:rules:no-ee-check - stage: test - script: - - scripts/no-dir-check ee - -no-jh-check: - extends: - - .predictive-job - - .setup:rules:no-jh-check - stage: test - script: - - scripts/no-dir-check jh - verify-ruby-3.0: extends: - .absolutely-predictive-job diff --git a/.gitlab/ci/vendored-gems.gitlab-ci.yml b/.gitlab/ci/vendored-gems.gitlab-ci.yml index 1086d9074d2..e1b4960b262 100644 --- a/.gitlab/ci/vendored-gems.gitlab-ci.yml +++ b/.gitlab/ci/vendored-gems.gitlab-ci.yml @@ -93,3 +93,11 @@ vendor gitlab_active_record: trigger: include: vendor/gems/gitlab_active_record/.gitlab-ci.yml strategy: depend + +vendor cloud_profiler_agent: + extends: + - .vendor:rules:cloud_profiler_agent + needs: [] + trigger: + include: vendor/gems/cloud_profiler_agent/.gitlab-ci.yml + strategy: depend 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 eee989ed21e..c33e5f8eb68 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 @@ -54,7 +54,7 @@ Geo secondary sites have a [Geo tracking database](https://gitlab.com/gitlab-org ```ruby # frozen_string_literal: true - class CreateCoolWidgetRegistry < Gitlab::Database::Migration[2.0] + class CreateCoolWidgetRegistry < Gitlab::Database::Migration[2.1] def change create_table :cool_widget_registry, id: :bigserial, force: :cascade do |t| t.bigint :cool_widget_id, null: false @@ -80,11 +80,19 @@ Geo secondary sites have a [Geo tracking database](https://gitlab.com/gitlab-org t.index :retry_at t.index :state # To optimize performance of CoolWidgetRegistry.verification_failed_batch - t.index :verification_retry_at, name: :cool_widget_registry_failed_verification, order: "NULLS FIRST", where: "((state = 2) AND (verification_state = 3))" + t.index :verification_retry_at, + name: :cool_widget_registry_failed_verification, + order: "NULLS FIRST", + where: "((state = 2) AND (verification_state = 3))" # To optimize performance of CoolWidgetRegistry.needs_verification_count - t.index :verification_state, name: :cool_widget_registry_needs_verification, where: "((state = 2) AND (verification_state = ANY (ARRAY[0, 3])))" + t.index :verification_state, + name: :cool_widget_registry_needs_verification, + where: "((state = 2) AND (verification_state = ANY (ARRAY[0, 3])))" # To optimize performance of CoolWidgetRegistry.verification_pending_batch - t.index :verified_at, name: :cool_widget_registry_pending_verification, order: "NULLS FIRST", where: "((state = 2) AND (verification_state = 0))" + t.index :verified_at, + name: :cool_widget_registry_pending_verification, + order: "NULLS FIRST", + where: "((state = 2) AND (verification_state = 0))" end end end @@ -92,7 +100,7 @@ Geo secondary sites have a [Geo tracking database](https://gitlab.com/gitlab-org - [ ] If deviating from the above example, then be sure to order columns according to [our guidelines](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/ordering_table_columns.md). -- [ ] Add the new table to the [database dictionary](database_dictionary.md) defined in [`ee/db/docs/`](https://gitlab.com/gitlab-org/gitlab/-/tree/master/ee/db/docs): +- [ ] Add the new table to the [database dictionary](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/database/database_dictionary.md) defined in [`ee/db/docs/`](https://gitlab.com/gitlab-org/gitlab/-/tree/master/ee/db/docs): ```yaml table_name: cool_widget_registry @@ -129,7 +137,7 @@ The Geo primary site needs to checksum every replicable so secondaries can verif ```ruby # frozen_string_literal: true - class CreateCoolWidgetStates < Gitlab::Database::Migration[2.0] + class CreateCoolWidgetStates < Gitlab::Database::Migration[2.1] VERIFICATION_STATE_INDEX_NAME = "index_cool_widget_states_on_verification_state" PENDING_VERIFICATION_INDEX_NAME = "index_cool_widget_states_pending_verification" FAILED_VERIFICATION_INDEX_NAME = "index_cool_widget_states_failed_verification" @@ -149,9 +157,17 @@ The Geo primary site needs to checksum every replicable so secondaries can verif t.text :verification_failure, limit: 255 t.index :verification_state, name: VERIFICATION_STATE_INDEX_NAME - t.index :verified_at, where: "(verification_state = 0)", order: { verified_at: 'ASC NULLS FIRST' }, name: PENDING_VERIFICATION_INDEX_NAME - t.index :verification_retry_at, where: "(verification_state = 3)", order: { verification_retry_at: 'ASC NULLS FIRST' }, name: FAILED_VERIFICATION_INDEX_NAME - t.index :verification_state, where: "(verification_state = 0 OR verification_state = 3)", name: NEEDS_VERIFICATION_INDEX_NAME + t.index :verified_at, + where: "(verification_state = 0)", + order: { verified_at: 'ASC NULLS FIRST' }, + name: PENDING_VERIFICATION_INDEX_NAME + t.index :verification_retry_at, + where: "(verification_state = 3)", + order: { verification_retry_at: 'ASC NULLS FIRST' }, + name: FAILED_VERIFICATION_INDEX_NAME + t.index :verification_state, + where: "(verification_state = 0 OR verification_state = 3)", + name: NEEDS_VERIFICATION_INDEX_NAME end end @@ -163,17 +179,20 @@ The Geo primary site needs to checksum every replicable so secondaries can verif - [ ] If deviating from the above example, then be sure to order columns according to [our guidelines](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/ordering_table_columns.md). -- [ ] Add the new table to the [database dictionary](database_dictionary.md) defined in [`db/docs/`](https://gitlab.com/gitlab-org/gitlab/-/tree/master/db/docs): +- [ ] If `cool_widgets` is a high-traffic table, follow [the database documentation to use `with_lock_retries`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/migration_style_guide.md#when-to-use-the-helper-method) + +- [ ] Add the new table to the [database dictionary](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/database/database_dictionary.md) defined in [`db/docs/`](https://gitlab.com/gitlab-org/gitlab/-/tree/master/db/docs): ```yaml + --- table_name: cool_widget_states - description: Description example - introduced_by_url: Merge request link - milestone: Milestone example + description: Separate table for cool widget verification states + introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/XXXXX + milestone: 'XX.Y' feature_categories: - - Feature category example + - geo_replication classes: - - Class example + - Geo::CoolWidgetState gitlab_schema: gitlab_main ``` @@ -185,20 +204,6 @@ The Geo primary site needs to checksum every replicable so secondaries can verif - [ ] Be sure to commit the relevant changes in `db/structure.sql` and the file under `db/schema_migrations` -- [ ] Add an entry for the state table in `db/docs/cool_widget_states.yml` - - ```yaml - --- - table_name: cool_widget_states - classes: - - Geo::CoolWidgetState - feature_categories: - - geo_replication - description: Separate table for cool widget verification states - introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/XXXXX - milestone: 'XX.Y' - ``` - That's all of the required database changes. ### Implement Geo support of Cool Widgets behind a feature flag @@ -230,23 +235,30 @@ That's all of the required database changes. with_replicator Geo::CoolWidgetReplicator - mount_uploader :file, CoolWidgetUploader - has_one :cool_widget_state, autosave: false, inverse_of: :cool_widget, class_name: 'Geo::CoolWidgetState' after_save :save_verification_details - scope :with_verification_state, ->(state) { joins(:cool_widget_state).where(cool_widget_states: { verification_state: verification_state_value(state) }) } - scope :checksummed, -> { joins(:cool_widget_state).where.not(cool_widget_states: { verification_checksum: nil } ) } - scope :not_checksummed, -> { joins(:cool_widget_state).where(cool_widget_states: { verification_checksum: nil } ) } - - scope :available_verifiables, -> { joins(:cool_widget_state) } - # Override the `all` default if not all records can be replicated. For an # example of an existing Model that needs to do this, see # `EE::MergeRequestDiff`. # scope :available_replicables, -> { all } + scope :available_verifiables, -> { joins(:cool_widget_state) } + + scope :checksummed, -> { + joins(:cool_widget_state).where.not(cool_widget_states: { verification_checksum: nil }) + } + + scope :not_checksummed, -> { + joins(:cool_widget_state).where(cool_widget_states: { verification_checksum: nil }) + } + + scope :with_verification_state, ->(state) { + joins(:cool_widget_state) + .where(cool_widget_states: { verification_state: verification_state_value(state) }) + } + def verification_state_object cool_widget_state end @@ -257,7 +269,8 @@ That's all of the required database changes. ... # @param primary_key_in [Range, CoolWidget] arg to pass to primary_key_in scope - # @return [ActiveRecord::Relation<CoolWidget>] everything that should be synced to this node, restricted by primary key + # @return [ActiveRecord::Relation<CoolWidget>] everything that should be synced + # to this node, restricted by primary key def replicables_for_current_secondary(primary_key_in) # This issue template does not help you write this method. # @@ -265,7 +278,8 @@ That's all of the required database changes. # we want to know which records to replicate. This is not easy to automate # because for example: # - # * The "selective sync" feature allows admins to choose which namespaces # to replicate, per secondary site. Most Models are scoped to a + # * The "selective sync" feature allows admins to choose which namespaces + # to replicate, per secondary site. Most Models are scoped to a # namespace, but the nature of the relationship to a namespace varies # between Models. # * The "selective sync" feature allows admins to choose which shards to @@ -304,8 +318,8 @@ That's all of the required database changes. ```ruby include_examples 'a replicable model with a separate table for verification state' do - let(:verifiable_model_record) { build(:cool_widget) } # add extra params if needed to make sure the record is included in `available_verifiables` - let(:unverifiable_model_record) { build(:cool_widget) } # add extra params if needed to make sure the record is NOT included in `available_verifiables` + let(:verifiable_model_record) { build(:cool_widget) } # add extra params if needed to make sure the record is in `Geo::ReplicableModel.verifiables` scope + let(:unverifiable_model_record) { build(:cool_widget) } # add extra params if needed to make sure the record is NOT included in `Geo::ReplicableModel.verifiables` scope end ``` @@ -323,10 +337,6 @@ That's all of the required database changes. ::CoolWidget end - def repository - model_record.repository - end - def self.git_access_class ::Gitlab::GitAccessCoolWidget end @@ -353,6 +363,10 @@ That's all of the required database changes. # (see `RepositoryReplicatorStrategy#before_housekeeping`) false end + + def repository + model_record.repository + end end end ``` @@ -402,7 +416,7 @@ That's all of the required database changes. require 'spec_helper' - RSpec.describe Geo::CoolWidgetReplicator do + RSpec.describe Geo::CoolWidgetReplicator, feature_category: :geo_replication do let(:model_record) { build(:cool_widget) } include_examples 'a repository replicator' @@ -476,7 +490,7 @@ That's all of the required database changes. require 'spec_helper' - RSpec.describe Geo::CoolWidgetRegistry, :geo, type: :model do + RSpec.describe Geo::CoolWidgetRegistry, :geo, type: :model, feature_category: :geo_replication do let_it_be(:registry) { create(:geo_cool_widget_registry) } specify 'factory is valid' do @@ -491,17 +505,21 @@ That's all of the required database changes. - [ ] Add the following to `ee/spec/factories/cool_widgets.rb`: ```ruby + # frozen_string_literal: true + FactoryBot.modify do - trait :verification_succeeded do - with_file - verification_checksum { 'abc' } - verification_state { CoolWidget.verification_state_value(:verification_succeeded) } - end + factory :cool_widget do + trait :verification_succeeded do + with_file + verification_checksum { 'abc' } + verification_state { CoolWidget.verification_state_value(:verification_succeeded) } + end - trait :verification_failed do - with_file - verification_failure { 'Could not calculate the checksum' } - verification_state { CoolWidget.verification_state_value(:verification_failed) } + trait :verification_failed do + with_file + verification_failure { 'Could not calculate the checksum' } + verification_state { CoolWidget.verification_state_value(:verification_failed) } + end end end ``` @@ -549,7 +567,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 `[:geo_cool_widget_state, any]` to `skipped` in `spec/models/factories_spec.rb` #### Step 2. Implement metrics gathering @@ -573,18 +591,18 @@ Metrics are gathered by `Geo::MetricsUpdateWorker`, persisted in `GeoNodeStatus` - [ ] 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` | - | `geo_cool_widgets_checksum_total` | Gauge | XX.Y | Number of Cool Widgets checksummed successfully on primary | `url` | - | `geo_cool_widgets_checksummed` | Gauge | XX.Y | Number of Cool Widgets failed to calculate the checksum on primary | `url` | - | `geo_cool_widgets_checksum_failed` | Gauge | XX.Y | Number of Cool Widgets tried to checksum on primary | `url` | + | `geo_cool_widgets_checksum_total` | Gauge | XX.Y | Number of Cool Widgets to checksum on primary | `url` | + | `geo_cool_widgets_checksummed` | Gauge | XX.Y | Number of Cool Widgets that successfully calculated the checksum on primary | `url` | + | `geo_cool_widgets_checksum_failed` | Gauge | XX.Y | Number of Cool Widgets that failed to calculate the checksum on primary | `url` | | `geo_cool_widgets_synced` | Gauge | XX.Y | Number of syncable Cool Widgets synced on secondary | `url` | | `geo_cool_widgets_failed` | Gauge | XX.Y | Number of syncable Cool Widgets failed to sync on secondary | `url` | | `geo_cool_widgets_registry` | Gauge | XX.Y | Number of Cool Widgets in the registry | `url` | - | `geo_cool_widgets_verification_total` | Gauge | XX.Y | Number of Cool Widgets verified on secondary | `url` | - | `geo_cool_widgets_verified` | Gauge | XX.Y | Number of Cool Widgets' verifications failed on secondary | `url` | - | `geo_cool_widgets_verification_failed` | Gauge | XX.Y | Number of Cool Widgets' verifications tried on secondary | `url` | + | `geo_cool_widgets_verification_total` | Gauge | XX.Y | Number of Cool Widgets to attempt to verify on secondary | `url` | + | `geo_cool_widgets_verified` | Gauge | XX.Y | Number of Cool Widgets successfully verified on secondary | `url` | + | `geo_cool_widgets_verification_failed` | Gauge | XX.Y | Number of Cool Widgets that failed verification on secondary | `url` | ``` -Cool Widget replication and verification metrics should now be available in the API, the `Admin > Geo > Nodes` view, and Prometheus. +Cool Widget replication and verification metrics should now be available in the API, the `Admin > Geo > Sites` view, and Prometheus. #### Step 3. Implement the GraphQL API @@ -625,7 +643,7 @@ The GraphQL API is used by `Admin > Geo > Replication Details` views, and is dir require 'spec_helper' - RSpec.describe Resolvers::Geo::CoolWidgetRegistriesResolver do + RSpec.describe Resolvers::Geo::CoolWidgetRegistriesResolver, feature_category: :geo_replication do it_behaves_like 'a Geo registries resolver', :geo_cool_widget_registry end ``` @@ -649,7 +667,7 @@ The GraphQL API is used by `Admin > Geo > Replication Details` views, and is dir require 'spec_helper' - RSpec.describe Geo::CoolWidgetRegistryFinder do + RSpec.describe Geo::CoolWidgetRegistryFinder, feature_category: :geo_replication do it_behaves_like 'a framework registry finder', :geo_cool_widget_registry end ``` @@ -683,7 +701,7 @@ The GraphQL API is used by `Admin > Geo > Replication Details` views, and is dir require 'spec_helper' - RSpec.describe GitlabSchema.types['CoolWidgetRegistry'] do + RSpec.describe GitlabSchema.types['CoolWidgetRegistry'], feature_category: :geo_replication do it_behaves_like 'a Geo registry type' it 'has the expected fields (other than those included in RegistryType)' do 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 88a7fad4975..0c5dbaebacf 100644 --- a/.gitlab/issue_templates/Geo Replicate a new blob type.md +++ b/.gitlab/issue_templates/Geo Replicate a new blob type.md @@ -56,7 +56,7 @@ Geo secondary sites have a [Geo tracking database](https://gitlab.com/gitlab-org ```ruby # frozen_string_literal: true - class CreateCoolWidgetRegistry < Gitlab::Database::Migration[2.0] + class CreateCoolWidgetRegistry < Gitlab::Database::Migration[2.1] def change create_table :cool_widget_registry, id: :bigserial, force: :cascade do |t| t.bigint :cool_widget_id, null: false @@ -80,11 +80,19 @@ Geo secondary sites have a [Geo tracking database](https://gitlab.com/gitlab-org t.index :retry_at t.index :state # To optimize performance of CoolWidgetRegistry.verification_failed_batch - t.index :verification_retry_at, name: :cool_widget_registry_failed_verification, order: "NULLS FIRST", where: "((state = 2) AND (verification_state = 3))" + t.index :verification_retry_at, + name: :cool_widget_registry_failed_verification, + order: "NULLS FIRST", + where: "((state = 2) AND (verification_state = 3))" # To optimize performance of CoolWidgetRegistry.needs_verification_count - t.index :verification_state, name: :cool_widget_registry_needs_verification, where: "((state = 2) AND (verification_state = ANY (ARRAY[0, 3])))" + t.index :verification_state, + name: :cool_widget_registry_needs_verification, + where: "((state = 2) AND (verification_state = ANY (ARRAY[0, 3])))" # To optimize performance of CoolWidgetRegistry.verification_pending_batch - t.index :verified_at, name: :cool_widget_registry_pending_verification, order: "NULLS FIRST", where: "((state = 2) AND (verification_state = 0))" + t.index :verified_at, + name: :cool_widget_registry_pending_verification, + order: "NULLS FIRST", + where: "((state = 2) AND (verification_state = 0))" end end end @@ -92,7 +100,7 @@ Geo secondary sites have a [Geo tracking database](https://gitlab.com/gitlab-org - [ ] If deviating from the above example, then be sure to order columns according to [our guidelines](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/ordering_table_columns.md). -- [ ] Add the new table to the [database dictionary](database_dictionary.md) defined in [`ee/db/docs/`](https://gitlab.com/gitlab-org/gitlab/-/tree/master/ee/db/docs): +- [ ] Add the new table to the [database dictionary](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/database/database_dictionary.md) defined in [`ee/db/docs/`](https://gitlab.com/gitlab-org/gitlab/-/tree/master/ee/db/docs): ```yaml table_name: cool_widget_registry @@ -131,7 +139,7 @@ The Geo primary site needs to checksum every replicable so secondaries can verif ```ruby # frozen_string_literal: true - class CreateCoolWidgetStates < Gitlab::Database::Migration[2.0] + class CreateCoolWidgetStates < Gitlab::Database::Migration[2.1] VERIFICATION_STATE_INDEX_NAME = "index_cool_widget_states_on_verification_state" PENDING_VERIFICATION_INDEX_NAME = "index_cool_widget_states_pending_verification" FAILED_VERIFICATION_INDEX_NAME = "index_cool_widget_states_failed_verification" @@ -144,16 +152,28 @@ The Geo primary site needs to checksum every replicable so secondaries can verif t.datetime_with_timezone :verification_started_at t.datetime_with_timezone :verification_retry_at t.datetime_with_timezone :verified_at - t.references :cool_widget, primary_key: true, default: nil, index: false, foreign_key: { on_delete: :cascade } + t.references :cool_widget, + primary_key: true, + default: nil, + index: false, + foreign_key: { on_delete: :cascade } t.integer :verification_state, default: 0, limit: 2, null: false t.integer :verification_retry_count, default: 0, limit: 2, null: false t.binary :verification_checksum, using: 'verification_checksum::bytea' t.text :verification_failure, limit: 255 t.index :verification_state, name: VERIFICATION_STATE_INDEX_NAME - t.index :verified_at, where: "(verification_state = 0)", order: { verified_at: 'ASC NULLS FIRST' }, name: PENDING_VERIFICATION_INDEX_NAME - t.index :verification_retry_at, where: "(verification_state = 3)", order: { verification_retry_at: 'ASC NULLS FIRST' }, name: FAILED_VERIFICATION_INDEX_NAME - t.index :verification_state, where: "(verification_state = 0 OR verification_state = 3)", name: NEEDS_VERIFICATION_INDEX_NAME + t.index :verified_at, + where: "(verification_state = 0)", + order: { verified_at: 'ASC NULLS FIRST' }, + name: PENDING_VERIFICATION_INDEX_NAME + t.index :verification_retry_at, + where: "(verification_state = 3)", + order: { verification_retry_at: 'ASC NULLS FIRST' }, + name: FAILED_VERIFICATION_INDEX_NAME + t.index :verification_state, + where: "(verification_state = 0 OR verification_state = 3)", + name: NEEDS_VERIFICATION_INDEX_NAME end end @@ -165,17 +185,20 @@ The Geo primary site needs to checksum every replicable so secondaries can verif - [ ] If deviating from the above example, then be sure to order columns according to [our guidelines](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/ordering_table_columns.md). -- [ ] Add the new table to the database dictionary defined in [`db/docs/`](https://gitlab.com/gitlab-org/gitlab/-/tree/master/db/docs): +- [ ] If `cool_widgets` is a high-traffic table, follow [the database documentation to use `with_lock_retries`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/migration_style_guide.md#when-to-use-the-helper-method) + +- [ ] Add the new table to the [database dictionary](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/database/database_dictionary.md) defined in [`db/docs/`](https://gitlab.com/gitlab-org/gitlab/-/tree/master/db/docs): ```yaml + --- table_name: cool_widget_states - description: Description example - introduced_by_url: Merge request link - milestone: Milestone example + description: Separate table for cool widget verification states + introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/XXXXX + milestone: 'XX.Y' feature_categories: - - Feature category example + - geo_replication classes: - - Class example + - Geo::CoolWidgetState gitlab_schema: gitlab_main ``` @@ -185,24 +208,8 @@ The Geo primary site needs to checksum every replicable so secondaries can verif bin/rake db:migrate ``` -- [ ] If `cool_widgets` is a high-traffic table, follow [the database documentation to use `with_lock_retries`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/migration_style_guide.md#when-to-use-the-helper-method) - - [ ] Be sure to commit the relevant changes in `db/structure.sql` and the file under `db/schema_migrations` -- [ ] Add an entry for the state table in `db/docs/cool_widget_states.yml` - - ```yaml - --- - table_name: cool_widget_states - classes: - - Geo::CoolWidgetState - feature_categories: - - geo_replication - description: Separate table for cool widget verification states - introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/XXXXX - milestone: 'XX.Y' - ``` - That's all of the required database changes. ### Implement Geo support of Cool Widgets behind a feature flag @@ -238,17 +245,26 @@ That's all of the required database changes. after_save :save_verification_details - scope :with_verification_state, ->(state) { joins(:cool_widget_state).where(cool_widget_states: { verification_state: verification_state_value(state) }) } - scope :checksummed, -> { joins(:cool_widget_state).where.not(cool_widget_states: { verification_checksum: nil } ) } - scope :not_checksummed, -> { joins(:cool_widget_state).where(cool_widget_states: { verification_checksum: nil } ) } - - scope :available_verifiables, -> { joins(:cool_widget_state) } - # Override the `all` default if not all records can be replicated. For an # example of an existing Model that needs to do this, see # `EE::MergeRequestDiff`. # scope :available_replicables, -> { all } + scope :available_verifiables, -> { joins(:cool_widget_state) } + + scope :checksummed, -> { + joins(:cool_widget_state).where.not(cool_widget_states: { verification_checksum: nil }) + } + + scope :not_checksummed, -> { + joins(:cool_widget_state).where(cool_widget_states: { verification_checksum: nil }) + } + + scope :with_verification_state, ->(state) { + joins(:cool_widget_state) + .where(cool_widget_states: { verification_state: verification_state_value(state) }) + } + def verification_state_object cool_widget_state end @@ -259,7 +275,8 @@ That's all of the required database changes. ... # @param primary_key_in [Range, CoolWidget] arg to pass to primary_key_in scope - # @return [ActiveRecord::Relation<CoolWidget>] everything that should be synced to this node, restricted by primary key + # @return [ActiveRecord::Relation<CoolWidget>] everything that should be synced + # to this node, restricted by primary key def replicables_for_current_secondary(primary_key_in) # This issue template does not help you write this method. # @@ -301,8 +318,8 @@ That's all of the required database changes. ```ruby include_examples 'a replicable model with a separate table for verification state' do - let(:verifiable_model_record) { build(:cool_widget) } # add extra params if needed to make sure the record is included in `available_verifiables` - let(:unverifiable_model_record) { build(:cool_widget) } # add extra params if needed to make sure the record is NOT included in `available_verifiables` + let(:verifiable_model_record) { build(:cool_widget) } # add extra params if needed to make sure the record is in `Geo::ReplicableModel.verifiables` scope + let(:unverifiable_model_record) { build(:cool_widget) } # add extra params if needed to make sure the record is NOT included in `Geo::ReplicableModel.verifiables` scope end ``` @@ -332,7 +349,6 @@ That's all of the required database changes. # (see `VerifiableReplicator.verification_enabled?`) true end - end end ``` @@ -360,7 +376,7 @@ That's all of the required database changes. require 'spec_helper' - RSpec.describe Geo::CoolWidgetReplicator do + RSpec.describe Geo::CoolWidgetReplicator, feature_category: :geo_replication do let(:model_record) { build(:cool_widget) } include_examples 'a blob replicator' @@ -434,7 +450,7 @@ That's all of the required database changes. require 'spec_helper' - RSpec.describe Geo::CoolWidgetRegistry, :geo, type: :model do + RSpec.describe Geo::CoolWidgetRegistry, :geo, type: :model, feature_category: :geo_replication do let_it_be(:registry) { create(:geo_cool_widget_registry) } specify 'factory is valid' do @@ -449,17 +465,21 @@ That's all of the required database changes. - [ ] Add the following to `spec/factories/cool_widgets.rb`: ```ruby + # frozen_string_literal: true + FactoryBot.modify do - trait :verification_succeeded do - with_file - verification_checksum { 'abc' } - verification_state { CoolWidget.verification_state_value(:verification_succeeded) } - end + factory :cool_widget do + trait :verification_succeeded do + with_file + verification_checksum { 'abc' } + verification_state { CoolWidget.verification_state_value(:verification_succeeded) } + end - trait :verification_failed do - with_file - verification_failure { 'Could not calculate the checksum' } - verification_state { CoolWidget.verification_state_value(:verification_failed) } + trait :verification_failed do + with_file + verification_failure { 'Could not calculate the checksum' } + verification_state { CoolWidget.verification_state_value(:verification_failed) } + end end end ``` @@ -539,18 +559,18 @@ Metrics are gathered by `Geo::MetricsUpdateWorker`, persisted in `GeoNodeStatus` ```markdown | `geo_cool_widgets` | Gauge | XX.Y | Number of Cool Widgets on primary | `url` | - | `geo_cool_widgets_checksum_total` | Gauge | XX.Y | Number of Cool Widgets checksummed successfully on primary | `url` | - | `geo_cool_widgets_checksummed` | Gauge | XX.Y | Number of Cool Widgets failed to calculate the checksum on primary | `url` | - | `geo_cool_widgets_checksum_failed` | Gauge | XX.Y | Number of Cool Widgets tried to checksum on primary | `url` | + | `geo_cool_widgets_checksum_total` | Gauge | XX.Y | Number of Cool Widgets to checksum on primary | `url` | + | `geo_cool_widgets_checksummed` | Gauge | XX.Y | Number of Cool Widgets that successfully calculated the checksum on primary | `url` | + | `geo_cool_widgets_checksum_failed` | Gauge | XX.Y | Number of Cool Widgets that failed to calculate the checksum on primary | `url` | | `geo_cool_widgets_synced` | Gauge | XX.Y | Number of syncable Cool Widgets synced on secondary | `url` | | `geo_cool_widgets_failed` | Gauge | XX.Y | Number of syncable Cool Widgets failed to sync on secondary | `url` | | `geo_cool_widgets_registry` | Gauge | XX.Y | Number of Cool Widgets in the registry | `url` | - | `geo_cool_widgets_verification_total` | Gauge | XX.Y | Number of Cool Widgets verified on secondary | `url` | - | `geo_cool_widgets_verified` | Gauge | XX.Y | Number of Cool Widgets' verifications failed on secondary | `url` | - | `geo_cool_widgets_verification_failed` | Gauge | XX.Y | Number of Cool Widgets' verifications tried on secondary | `url` | + | `geo_cool_widgets_verification_total` | Gauge | XX.Y | Number of Cool Widgets to attempt to verify on secondary | `url` | + | `geo_cool_widgets_verified` | Gauge | XX.Y | Number of Cool Widgets successfully verified on secondary | `url` | + | `geo_cool_widgets_verification_failed` | Gauge | XX.Y | Number of Cool Widgets that failed verification on secondary | `url` | ``` - Cool Widget replication and verification metrics should now be available in the API, the `Admin > Geo > Nodes` view, and Prometheus. + Cool Widget replication and verification metrics should now be available in the API, the `Admin > Geo > Sites` view, and Prometheus. #### Step 3. Implement the GraphQL API @@ -591,7 +611,7 @@ The GraphQL API is used by `Admin > Geo > Replication Details` views, and is dir require 'spec_helper' - RSpec.describe Resolvers::Geo::CoolWidgetRegistriesResolver do + RSpec.describe Resolvers::Geo::CoolWidgetRegistriesResolver, feature_category: :geo_replication do it_behaves_like 'a Geo registries resolver', :geo_cool_widget_registry end ``` @@ -615,7 +635,7 @@ The GraphQL API is used by `Admin > Geo > Replication Details` views, and is dir require 'spec_helper' - RSpec.describe Geo::CoolWidgetRegistryFinder do + RSpec.describe Geo::CoolWidgetRegistryFinder, feature_category: :geo_replication do it_behaves_like 'a framework registry finder', :geo_cool_widget_registry end ``` @@ -649,7 +669,7 @@ The GraphQL API is used by `Admin > Geo > Replication Details` views, and is dir require 'spec_helper' - RSpec.describe GitlabSchema.types['CoolWidgetRegistry'] do + RSpec.describe GitlabSchema.types['CoolWidgetRegistry'], feature_category: :geo_replication do it_behaves_like 'a Geo registry type' it 'has the expected fields (other than those included in RegistryType)' do diff --git a/.gitlab/issue_templates/UX Theme.md b/.gitlab/issue_templates/UX Theme.md index b015c3d44e6..32e771735b1 100644 --- a/.gitlab/issue_templates/UX Theme.md +++ b/.gitlab/issue_templates/UX Theme.md @@ -1,39 +1,25 @@ -<!-- A majority of the work designers do will be on themes in the (Now) Next 1-3 milestone column of their UX Roadmap. These themes are comprised of high-confidence outcomes and validated needs. The UX theme issue is where collaboration should occur, including plans and discussion on subthemes, research, and design feedback. Related issues for design exploration and solution validation should stem from the theme issue. +<!-- Most of the work designers do will be on themes in the (Now) Next 1-3 milestone column of their UX Roadmap. These themes are comprised of high-confidence outcomes and validated needs. The UX theme issue is where collaboration should occur, including plans and discussion on subthemes, research, and design feedback. Related design exploration and solution validation issues should stem from the theme issue. -One of the advantages of working with UX themes is that it allows us to think and design holistically by designing the theme as a whole as opposed to a single issue at a time trying to piece them together as you go. For more details please refer to this section of the handbook when creating UX Themes: https://about.gitlab.com/handbook/product/ux/product-design/ux-roadmaps/#theme-structure --> +One of the advantages of working with UX themes is that it allows us to think and design holistically by designing the theme as a whole instead of a single issue at a time, trying to piece them together as we go. For more details, please refer to this section of the handbook when creating UX Themes: https://about.gitlab.com/handbook/product/ux/product-design/ux-roadmaps/#ux-theme-structure --> -<!-- Theme Issue Title {UX Theme: <theme statement here>} --> -<!-- Theme Statement: A theme is written as a statement that combines the beneficiary, their need, and the expected outcome when the work is delivered. Well-defined statements are concise without sacrificing the substance of the theme so that anyone can understand it at a glance. (For instance; Reduce the effort for security teams to identify and escalate business-critical risks) - -!!Note: The theme statement is the defacto title that will be used to reference the theme and serve as the theme issue title.!! It should be something that is easily understood, that quickly communicates the intent of the theme allowing team members to easily understand and recognize the expected work that will be done. +<!-- +!!Note: The theme statement is the defacto title that will reference the theme and serve as the theme issue title.!! It should be something that is easily understood that quickly communicates the intent of the theme allowing team members to easily understand and recognize the expected work that will be done. --> ---- -### Problem to solve -<!-- In a brief statement, summerize the problem we are intending to address with this theme. For instance, users are unable to complete [task], or, users struggle with the amount of steps required to complete [task] --> - +### Theme statement +<!-- A theme statement combines the beneficiary, their job, and their expected outcome when the work is delivered and serves as the design goal for the team who owns the theme. Well-defined statements are concise without sacrificing the substance of the theme so that anyone can understand it at a glance. Well-defined statements are concise without sacrificing the substance of the theme so that anyone can understand it at a glance. (For instance, Reduce the effort for security teams when prioritizing business-critical risks in their assets.) --> -### Beneficiary -<!-- Who is the recipient(s) of the value this theme provides; a customer, end-user, or buyer. Who benefits from this theme being executed? This can be a role, a team, or a persona. For instance: "Development teams, [or] Developers, [or], Sasha the Software Engineer". --> +<!-- Also Theme issue tile --> +{`Need/outcome` } + {`Beneficiary`} + {`Job/Small Job`} -- **[Direct beneficiary]** - -#### Need & Primary JTBD -<!-- What is the JTBD and what are the needs related to the beneficiary and theme? -- JTBD: The JTBD statement, for instance, (When I am triaging vulns, I want to address business-critical risks, So I can ensure there is no unattended risk in my orgs assets.) -- Need: Abstracted from the JTBD, for instance, (Identify and escalate business-critical risks detected in my orgs assets.) ---> - -- **JTBD:** -- **Need:** - -#### Expected outcome -<!-- What will the user be able to achieve when this theme is executed? For instance, (Users will be able to effectively triage vulnerabilities at scale across all their orgs assets.) --> +#### Main Job story +<!-- What is the [Main Job story](https://about.gitlab.com/handbook/product/ux/jobs-to-be-done/#how-to-write-a-jtbd) that this theme was derived from? (For instance, When I am on triage rotation, I want to address all the business-critical risks in my assets, So I can minimize the likelihood of my organization being compromised by a security breach.) --> #### Business objective -<!-- What business objective will result from delivering this theme? This answers why we are working on this theme from a business perspective. Examples of objectives are but are not limited to: Sales rate / conversion rate, Success rate / completion rate, Traffic / visitor count, Engagement, or other business-oriented goals. --> +<!-- Objectives (from a business point of view) that will be achieved upon completion. (For instance, Increase engagement by making the experience efficient while reducing the chances of users overlooking high-priority items. --> #### Confidence @@ -42,43 +28,24 @@ One of the advantages of working with UX themes is that it allows us to think an | Confidence | Research | | --- | --- | -| [High/Medium/Low] | [research/insight issue](Link) | - -### User-stories -<!-- Product designers should work with their PMs to gather up all of the relevant user stories. Look for alignment with the JTBD added above. Overall, the solution you and your team come up with should help to support the user stories. --> +| [High/Medium/Low] | [research/insight issue](Link) | -- [user-story here] -- [user-story here] -- [user-story here] -- [etc.] ### Requirements -<!-- Requirements can be taken from existing features or design issues that were used to build this theme. Any related issues should be linked with this issue in the Feature/solution issues section below. They are more granular validated needs, goals, and additional details that the theme encompasses. These are typically reserved for themes in the next (1-3 milestones) column. Requirements should answer “what” the beneficiary of this theme needs from the solution. - -Note: This is not a backlog. If the issue can not be delivered in the theme timeframe then the theme is too big and needs to be broken down into multiple themes. --> - -The beneficieray needs to be able to: -- [need here] -- [need here] -- [need here] -- [etc.] +<!-- Requirements can be taken from existing features or design issues used to build this theme. Any related issues should be linked with this issue in the Feature/solution issues section below. They are more granular validated needs, goals, and additional details that the theme encompasses. These are typically reserved for themes in the next (1-3 milestones) column. Requirements should answer “what” the beneficiary of this theme needs from the solution. -#### Feature/solution issues -<!-- Use this table to track feature issues related to this theme (if applicable). Not all themes require sub-issues as they are typically discovered while working on the theme itself. Think of these issues as if they were the result of breaking down the design into discrete work items. +Note: This is not a backlog. If the issue can not be delivered in the theme timeframe, then the theme is too big and needs to be broken down into multiple themes. --> -Note: if feature issues already exist then you can add them to this table. Keep in mind that these issues will require validation if they are being added to a Theme that's in the Next (1-3 milestones) container and are assumptive. +>⚠️ Related feature and research issues should be linked in the related issues section (Delete this line when this is done) -Refer to https://about.gitlab.com/handbook/product/ux/product-designer/#ux-issue-weights for calculating UX weights. ---> - -| Issue | UX Weight | -| ---------- | --------- | -| [Issue](link) | `0 - 10` | -| [Issue](link) | `0 - 10` | -| [Issue](link) | `0 - 10` | +#### The beneficiary needs to be able to: +- [Small job statement] + - [Micro job statement] + - [Micro job statement] +- [etc.] #### Research -<!-- Use this table to track UX research related to this theme. This may include, problem validation and/or solution validation activities. +<!-- Researchers and Designers; Use this table to track UX research related to this theme. This may include problem validation and solution validation activities. --> | Issue | Research type | Research status | @@ -87,16 +54,35 @@ Refer to https://about.gitlab.com/handbook/product/ux/product-designer/#ux-issue | [Issue]() | <!--Solution validation, Problem validation, etc., --> | <!-- Planned, In Progress, Complete, etc.,--> | #### Ready for design checklist -The items are self-check suggestions; they could be contributed by designers, product managers or researchers -* [ ] The stated `Problem to solve` has high confidence (derived from research or other data-gathering techniques) -* [ ] Relevant issues, research, and other background information are linked to the Related issues section -* [ ] The stated `Beneficiary` has been defined -* [ ] There is high confidence in the stated `Need & Primary JTBD` (derived from research or other data gathering techniques) -* [ ] The `Expected outcome` has been defined +The items are self-check suggestions; they could be contributed by designers, product managers, or researchers +* [ ] The `theme` has high confidence (derived from research or other data-gathering techniques) +* [ ] The `Related issues`, features, research, and other background information are linked to the related issues section * [ ] The `Business objective` has been defined -* [ ] The theme `Confidence` has been defined as High -* [ ] `User-stories` have been defined -* [ ] The `Requirements` have been defined and the scope has been agreed upon -* [ ] This UX Theme contains everyhting necessary to complete a design solution and is ready for design +* [ ] The `Requirements` have been defined, and the scope has been agreed upon +* [ ] This UX Theme contains everything necessary to complete a design solution and is ready for design + +#### [Thematic design workflow checklist](https://about.gitlab.com/handbook/product/ux/product-design/ux-roadmaps/#suggested-workflow) +<!-- please refer to the [suggested workflow](https://about.gitlab.com/handbook/product/ux/product-design/ux-roadmaps/#suggested-workflow) when working on UX themes--> +* [ ] **Theme assessed** Ready for design checklist complete +* [ ] **Ideate and Iterate** + * [ ] User flow diagram generated + * [ ] Low-fidelity wireframes of the entire theme created + * [ ] [Feedback requested](https://about.gitlab.com/handbook/product/ux/product-designer/#design-reviews) and incorporated into flow diagram and wireframes +* [ ] **Validate** + * [ ] [Solution validation](https://about.gitlab.com/handbook/product/ux/ux-research/solution-validation-and-methods/) conducted on Low/mid-fidelity flow +* [ ] **Refine** + * [ ] Resaerch findings incorporated into design + * [ ] All micro-interactions are defined + * [ ] All edge-cases are accounted for and defined + * [ ] All copy has been reviewed by tech writing + * [ ] Accessibnility guidelines have been considered + * [ ] High-fidelity designs posted + * [ ] Feedback requested from counterparts + * [ ] (If necessary) Validate high-fidelity flow in a 2nd round of user testing + * [ ] Refine final design from feedback and user research +* [ ] **Hand-off** + * [ ] Designs broken down based on the their ability to stand alone and that they provide value to the user. + * [ ] MVC plan agreement reached + * [ ] Planning breakdown complete /label ~"UX" ~"UX Theme" diff --git a/.gitlab/merge_request_templates/New Static Analysis Check.md b/.gitlab/merge_request_templates/New Static Analysis Check.md index 6ad56cd5cd0..9cf21fa49e8 100644 --- a/.gitlab/merge_request_templates/New Static Analysis Check.md +++ b/.gitlab/merge_request_templates/New Static Analysis Check.md @@ -1,6 +1,6 @@ <!-- When creating a new cop that could be applied to multiple applications, -we encourage you to add it to https://gitlab.com/gitlab-org/gitlab-styles gem. +we encourage you to add it to https://gitlab.com/gitlab-org/ruby/gems/gitlab-styles gem. --> ## Description of the proposal diff --git a/.gitlab/merge_request_templates/Revert To Resolve Incident.md b/.gitlab/merge_request_templates/Revert To Resolve Incident.md index 4e77846575a..c1980d70768 100644 --- a/.gitlab/merge_request_templates/Revert To Resolve Incident.md +++ b/.gitlab/merge_request_templates/Revert To Resolve Incident.md @@ -12,6 +12,7 @@ - [ ] Create an issue to reinstate the merge request and assign it to the author of the reverted merge request. - [ ] If the revert is to resolve a [broken 'master' incident](https://about.gitlab.com/handbook/engineering/workflow/#broken-master), please read through the [Responsibilities of the Broken `master` resolution DRI](https://about.gitlab.com/handbook/engineering/workflow/#responsibilities-of-the-resolution-dri). +- [ ] If the revert involves a database migration, please read through [Deleting existing migrations](https://docs.gitlab.com/ee/development/database/deleting_migrations.html). - [ ] Add the appropriate labels **before** the MR is created. We can skip CI/CD jobs only if the labels are added **before** the CI/CD pipeline is created. ### Milestone info |