summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-05-06 15:09:03 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-06 15:09:03 +0000
commit67fa8362ae35ab6134454aa74ad536eb405dff29 (patch)
tree8adb151eabf5467dd3c3ee7dfbd0a7df70c5fd51
parent669ad9e431c7647f01bda681aab2c0ad2cb58826 (diff)
downloadgitlab-ce-67fa8362ae35ab6134454aa74ad536eb405dff29.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.rubocop_todo.yml10
-rw-r--r--.rubocop_todo/style/explicit_block_argument.yml114
-rw-r--r--.rubocop_todo/style/if_inside_else.yml49
-rw-r--r--app/assets/javascripts/vue_shared/components/usage_quotas/usage_banner.vue68
-rw-r--r--app/controllers/admin/runners_controller.rb2
-rw-r--r--app/controllers/admin/users_controller.rb2
-rw-r--r--app/controllers/concerns/authenticates_with_two_factor.rb4
-rw-r--r--app/controllers/concerns/authenticates_with_two_factor_for_admin_mode.rb2
-rw-r--r--app/controllers/concerns/issuable_actions.rb2
-rw-r--r--app/controllers/concerns/product_analytics_tracking.rb2
-rw-r--r--app/controllers/concerns/send_file_upload.rb2
-rw-r--r--app/controllers/concerns/uploads_actions.rb2
-rw-r--r--app/controllers/concerns/wiki_actions.rb2
-rw-r--r--app/controllers/graphql_controller.rb5
-rw-r--r--app/controllers/groups/boards_controller.rb4
-rw-r--r--app/controllers/groups/dependency_proxy/application_controller.rb2
-rw-r--r--app/controllers/groups_controller.rb4
-rw-r--r--app/controllers/ide_controller.rb2
-rw-r--r--app/controllers/import/bulk_imports_controller.rb2
-rw-r--r--app/controllers/jira_connect/subscriptions_controller.rb4
-rw-r--r--app/controllers/oauth/authorizations_controller.rb3
-rw-r--r--app/controllers/profiles/two_factor_auths_controller.rb6
-rw-r--r--app/controllers/profiles_controller.rb2
-rw-r--r--app/controllers/projects/blob_controller.rb4
-rw-r--r--app/controllers/projects/boards_controller.rb4
-rw-r--r--app/controllers/projects/ci/pipeline_editor_controller.rb4
-rw-r--r--app/controllers/projects/clusters_controller.rb2
-rw-r--r--app/controllers/projects/incidents_controller.rb4
-rw-r--r--app/controllers/projects/issues_controller.rb16
-rw-r--r--app/controllers/projects/jobs_controller.rb8
-rw-r--r--app/controllers/projects/merge_requests_controller.rb24
-rw-r--r--app/controllers/projects/pipelines/tests_controller.rb2
-rw-r--r--app/controllers/projects/pipelines_controller.rb14
-rw-r--r--app/controllers/projects/product_analytics_controller.rb2
-rw-r--r--app/controllers/projects/security/configuration_controller.rb2
-rw-r--r--app/controllers/projects/tree_controller.rb6
-rw-r--r--app/controllers/projects_controller.rb8
-rw-r--r--app/controllers/search_controller.rb12
-rw-r--r--app/controllers/sessions_controller.rb6
-rw-r--r--app/finders/group_descendants_finder.rb2
-rw-r--r--app/finders/groups_finder.rb4
-rw-r--r--app/finders/issuable_finder.rb4
-rw-r--r--app/finders/user_recent_events_finder.rb2
-rw-r--r--app/graphql/mutations/issues/set_crm_contacts.rb2
-rw-r--r--app/graphql/mutations/saved_replies/base.rb2
-rw-r--r--app/graphql/mutations/user_preferences/update.rb2
-rw-r--r--app/graphql/resolvers/base_issues_resolver.rb2
-rw-r--r--app/graphql/resolvers/package_pipelines_resolver.rb2
-rw-r--r--app/graphql/types/base_field.rb2
-rw-r--r--app/graphql/types/issue_type.rb2
-rw-r--r--app/helpers/application_helper.rb4
-rw-r--r--app/helpers/broadcast_messages_helper.rb2
-rw-r--r--app/helpers/groups/group_members_helper.rb2
-rw-r--r--app/helpers/issues_helper.rb2
-rw-r--r--app/helpers/merge_requests_helper.rb1
-rw-r--r--app/helpers/projects_helper.rb2
-rw-r--r--app/helpers/search_helper.rb2
-rw-r--r--app/helpers/users_helper.rb2
-rw-r--r--app/models/broadcast_message.rb2
-rw-r--r--app/models/ci/bridge.rb4
-rw-r--r--app/models/ci/build.rb8
-rw-r--r--app/models/ci/pending_build.rb2
-rw-r--r--app/models/ci/pipeline.rb4
-rw-r--r--app/models/ci/runner.rb2
-rw-r--r--app/models/clusters/instance.rb2
-rw-r--r--app/models/concerns/cross_database_modification.rb2
-rw-r--r--app/models/concerns/issuable.rb2
-rw-r--r--app/models/concerns/limitable.rb4
-rw-r--r--app/models/concerns/routable.rb4
-rw-r--r--app/models/environment.rb2
-rw-r--r--app/models/group.rb4
-rw-r--r--app/models/integration.rb2
-rw-r--r--app/models/issue.rb2
-rw-r--r--app/models/loose_foreign_keys/deleted_record.rb4
-rw-r--r--app/models/member.rb2
-rw-r--r--app/models/members_preloader.rb2
-rw-r--r--app/models/merge_request.rb4
-rw-r--r--app/models/namespace.rb10
-rw-r--r--app/models/namespaces/traversal/linear.rb12
-rw-r--r--app/models/namespaces/traversal/linear_scopes.rb14
-rw-r--r--app/models/preloaders/group_root_ancestor_preloader.rb2
-rw-r--r--app/models/preloaders/user_max_access_level_in_groups_preloader.rb2
-rw-r--r--app/models/project.rb10
-rw-r--r--app/models/project_ci_cd_setting.rb2
-rw-r--r--app/models/project_setting.rb2
-rw-r--r--app/models/project_statistics.rb2
-rw-r--r--app/models/user.rb16
-rw-r--r--app/models/wiki.rb4
-rw-r--r--app/policies/group_policy.rb4
-rw-r--r--app/policies/project_policy.rb2
-rw-r--r--app/presenters/user_presenter.rb2
-rw-r--r--app/services/bulk_imports/file_decompression_service.rb2
-rw-r--r--app/services/ci/job_artifacts/destroy_batch_service.rb2
-rw-r--r--app/services/ci/pipeline_creation/start_pipeline_service.rb2
-rw-r--r--app/services/ci/queue/build_queue_service.rb2
-rw-r--r--app/services/ci/queue/builds_table_strategy.rb2
-rw-r--r--app/services/ci/queue/pending_builds_strategy.rb4
-rw-r--r--app/services/ci/runners/register_runner_service.rb2
-rw-r--r--app/services/ci/stuck_builds/drop_running_service.rb2
-rw-r--r--app/services/ci/update_build_state_service.rb4
-rw-r--r--app/services/deployments/update_environment_service.rb2
-rw-r--r--app/services/environments/stop_service.rb3
-rw-r--r--app/services/event_create_service.rb2
-rw-r--r--app/services/groups/import_export/export_service.rb2
-rw-r--r--app/services/groups/import_export/import_service.rb2
-rw-r--r--app/services/import/gitlab_projects/file_acquisition_strategies/remote_file.rb2
-rw-r--r--app/services/merge_requests/mergeability/run_checks_service.rb2
-rw-r--r--app/services/projects/branches_by_mode_service.rb2
-rw-r--r--app/services/projects/lfs_pointers/lfs_download_service.rb2
-rw-r--r--app/services/projects/overwrite_project_service.rb2
-rw-r--r--app/services/projects/update_remote_mirror_service.rb2
-rw-r--r--app/services/service_ping/submit_service.rb2
-rw-r--r--app/services/users/destroy_service.rb2
-rw-r--r--app/views/admin/application_settings/ci_cd.html.haml2
-rw-r--r--app/views/admin/application_settings/metrics_and_profiling.html.haml2
-rw-r--r--app/views/admin/broadcast_messages/_form.html.haml2
-rw-r--r--app/views/admin/broadcast_messages/index.html.haml2
-rw-r--r--app/views/clusters/clusters/show.html.haml8
-rw-r--r--app/views/dashboard/todos/index.html.haml2
-rw-r--r--app/views/groups/dependency_proxies/show.html.haml2
-rw-r--r--app/views/groups/issues.html.haml2
-rw-r--r--app/views/groups/new.html.haml2
-rw-r--r--app/views/groups/settings/packages_and_registries/show.html.haml2
-rw-r--r--app/views/layouts/header/_default.html.haml2
-rw-r--r--app/views/profiles/_email_settings.html.haml43
-rw-r--r--app/views/profiles/_name.html.haml10
-rw-r--r--app/views/profiles/show.html.haml120
-rw-r--r--app/views/profiles/two_factor_auths/show.html.haml2
-rw-r--r--app/views/projects/_home_panel.html.haml2
-rw-r--r--app/views/projects/blob/_blob.html.haml2
-rw-r--r--app/views/projects/branches/index.html.haml2
-rw-r--r--app/views/projects/commits/_commits.html.haml4
-rw-r--r--app/views/projects/diffs/_text_file.html.haml2
-rw-r--r--app/views/projects/issues/_discussion.html.haml2
-rw-r--r--app/views/projects/issues/index.html.haml2
-rw-r--r--app/views/projects/jobs/index.html.haml2
-rw-r--r--app/views/projects/pipelines/show.html.haml2
-rw-r--r--app/workers/ci/build_finished_worker.rb2
-rw-r--r--app/workers/concerns/git_garbage_collect_methods.rb2
-rw-r--r--app/workers/concerns/worker_attributes.rb4
-rw-r--r--app/workers/database/batched_background_migration/ci_database_worker.rb2
-rw-r--r--app/workers/database/batched_background_migration_worker.rb2
-rw-r--r--app/workers/gitlab/github_import/stage/import_issues_and_diff_notes_worker.rb2
-rw-r--r--app/workers/gitlab/github_import/stage/import_notes_worker.rb2
-rw-r--r--app/workers/merge_request_cleanup_refs_worker.rb2
-rw-r--r--app/workers/schedule_merge_request_cleanup_refs_worker.rb2
-rw-r--r--config/feature_flags/ops/jira_raise_timeouts.yml8
-rw-r--r--config/gitlab.yml.example3
-rw-r--r--config/initializers/1_settings.rb11
-rw-r--r--config/initializers/7_prometheus_metrics.rb18
-rw-r--r--config/initializers/active_record_transaction_observer.rb2
-rw-r--r--config/initializers/carrierwave_patch.rb2
-rw-r--r--config/initializers/omniauth.rb2
-rw-r--r--config/initializers/sidekiq.rb15
-rw-r--r--data/removals/15_0/15-0-managed-cluster-applications.yml12
-rw-r--r--db/docs/allowed_email_domains.yml4
-rw-r--r--db/docs/badges.yml4
-rw-r--r--db/docs/emails.yml2
-rw-r--r--db/docs/group_custom_attributes.yml4
-rw-r--r--db/docs/members.yml2
-rw-r--r--db/docs/namespace_settings.yml2
-rw-r--r--db/docs/namespaces.yml4
-rw-r--r--db/docs/project_authorizations.yml5
-rw-r--r--db/docs/project_custom_attributes.yml4
-rw-r--r--db/docs/project_settings.yml4
-rw-r--r--db/docs/project_topics.yml2
-rw-r--r--db/docs/projects.yml2
-rw-r--r--db/docs/redirect_routes.yml4
-rw-r--r--db/docs/routes.yml5
-rw-r--r--db/docs/security_findings.yml2
-rw-r--r--db/docs/security_scans.yml2
-rw-r--r--db/docs/security_training_providers.yml2
-rw-r--r--db/docs/security_trainings.yml2
-rw-r--r--db/docs/topics.yml2
-rw-r--r--db/docs/user_callouts.yml2
-rw-r--r--db/docs/user_custom_attributes.yml4
-rw-r--r--db/docs/user_details.yml2
-rw-r--r--db/docs/user_follow_users.yml2
-rw-r--r--db/docs/user_group_callouts.yml2
-rw-r--r--db/docs/user_preferences.yml4
-rw-r--r--db/docs/user_statuses.yml4
-rw-r--r--db/docs/users_security_dashboard_projects.yml2
-rw-r--r--db/docs/users_star_projects.yml4
-rw-r--r--db/docs/vulnerabilities.yml2
-rw-r--r--db/docs/vulnerability_exports.yml2
-rw-r--r--db/docs/vulnerability_external_issue_links.yml2
-rw-r--r--db/docs/vulnerability_feedback.yml2
-rw-r--r--db/docs/vulnerability_finding_evidences.yml2
-rw-r--r--db/docs/vulnerability_finding_links.yml4
-rw-r--r--db/docs/vulnerability_finding_signatures.yml2
-rw-r--r--db/docs/vulnerability_findings_remediations.yml2
-rw-r--r--db/docs/vulnerability_flags.yml2
-rw-r--r--db/docs/vulnerability_historical_statistics.yml2
-rw-r--r--db/docs/vulnerability_identifiers.yml2
-rw-r--r--db/docs/vulnerability_issue_links.yml2
-rw-r--r--db/docs/vulnerability_occurrence_identifiers.yml2
-rw-r--r--db/docs/vulnerability_occurrence_pipelines.yml4
-rw-r--r--db/docs/vulnerability_occurrences.yml2
-rw-r--r--db/docs/vulnerability_reads.yml2
-rw-r--r--db/docs/vulnerability_remediations.yml2
-rw-r--r--db/docs/vulnerability_scanners.yml2
-rw-r--r--db/docs/vulnerability_statistics.yml2
-rw-r--r--db/docs/vulnerability_user_mentions.yml2
-rw-r--r--db/migrate/20220213100000_remove_integration_type_triggers.rb32
-rw-r--r--db/post_migrate/20220213103859_remove_integrations_type.rb132
-rw-r--r--db/post_migrate/20220503114353_prepare_confidential_note_index.rb13
-rw-r--r--db/schema_migrations/202202131000001
-rw-r--r--db/schema_migrations/202202131038591
-rw-r--r--db/schema_migrations/202205031143531
-rw-r--r--db/structure.sql23
-rw-r--r--doc/administration/gitaly/praefect.md1
-rw-r--r--doc/api/status_checks.md2
-rw-r--r--doc/development/feature_flags/index.md55
-rw-r--r--doc/development/features_inside_dot_gitlab.md1
-rw-r--r--doc/development/service_ping/implement.md2
-rw-r--r--doc/operations/error_tracking.md2
-rw-r--r--doc/update/removals.md10
-rw-r--r--doc/user/clusters/applications.md782
-rw-r--r--doc/user/clusters/crossplane.md289
-rw-r--r--doc/user/clusters/migrating_from_gma_to_project_template.md9
-rw-r--r--doc/user/infrastructure/clusters/index.md2
-rw-r--r--doc/user/infrastructure/clusters/manage/management_project_applications/certmanager.md2
-rw-r--r--doc/user/infrastructure/clusters/manage/management_project_applications/elasticstack.md2
-rw-r--r--doc/user/infrastructure/clusters/manage/management_project_applications/ingress.md2
-rw-r--r--doc/user/infrastructure/clusters/manage/management_project_applications/prometheus.md2
-rw-r--r--doc/user/infrastructure/clusters/manage/management_project_applications/runner.md2
-rw-r--r--doc/user/infrastructure/clusters/manage/management_project_applications/sentry.md2
-rw-r--r--doc/user/infrastructure/clusters/manage/management_project_applications/vault.md2
-rw-r--r--doc/user/infrastructure/clusters/migrate_to_gitlab_agent.md5
-rw-r--r--doc/user/shortcuts.md73
-rw-r--r--lib/api/branches.rb2
-rw-r--r--lib/api/ci/secure_files.rb4
-rw-r--r--lib/api/helpers.rb4
-rw-r--r--lib/api/helpers/internal_helpers.rb2
-rw-r--r--lib/api/internal/base.rb2
-rw-r--r--lib/api/internal/kubernetes.rb2
-rw-r--r--lib/api/project_export.rb2
-rw-r--r--lib/api/project_import.rb2
-rw-r--r--lib/api/projects.rb2
-rw-r--r--lib/api/usage_data.rb2
-rw-r--r--lib/api/usage_data_non_sql_metrics.rb2
-rw-r--r--lib/api/usage_data_queries.rb2
-rw-r--r--lib/backup/gitaly_backup.rb2
-rw-r--r--lib/backup/manager.rb2
-rw-r--r--lib/bulk_imports/groups/stage.rb4
-rw-r--r--lib/gitlab/analytics/cycle_analytics/request_params.rb2
-rw-r--r--lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid.rb2
-rw-r--r--lib/gitlab/chat.rb2
-rw-r--r--lib/gitlab/checks/lfs_check.rb2
-rw-r--r--lib/gitlab/ci/config.rb2
-rw-r--r--lib/gitlab/ci/jwt.rb2
-rw-r--r--lib/gitlab/ci/parsers/security/validators/schema_validator.rb4
-rw-r--r--lib/gitlab/ci/pipeline/chain/command.rb2
-rw-r--r--lib/gitlab/ci/pipeline/chain/limit/rate_limit.rb6
-rw-r--r--lib/gitlab/ci/pipeline/logger.rb2
-rw-r--r--lib/gitlab/ci/queue/metrics.rb10
-rw-r--r--lib/gitlab/ci/status/bridge/common.rb2
-rw-r--r--lib/gitlab/ci/templates/Managed-Cluster-Applications.gitlab-ci.yml32
-rw-r--r--lib/gitlab/ci/trace.rb2
-rw-r--r--lib/gitlab/config/loader/yaml.rb2
-rw-r--r--lib/gitlab/database/background_migration/batch_optimizer.rb2
-rw-r--r--lib/gitlab/database/load_balancing/configuration.rb2
-rw-r--r--lib/gitlab/database/migration_helpers.rb2
-rw-r--r--lib/gitlab/database/query_analyzers/prevent_cross_database_modification.rb2
-rw-r--r--lib/gitlab/database/reindexing.rb2
-rw-r--r--lib/gitlab/default_branch.rb2
-rw-r--r--lib/gitlab/diff/file.rb4
-rw-r--r--lib/gitlab/diff/highlight.rb6
-rw-r--r--lib/gitlab/diff/highlight_cache.rb4
-rw-r--r--lib/gitlab/email/receiver.rb2
-rw-r--r--lib/gitlab/error_tracking.rb4
-rw-r--r--lib/gitlab/experiment/rollout/feature.rb4
-rw-r--r--lib/gitlab/experimentation/experiment.rb2
-rw-r--r--lib/gitlab/git/diff.rb2
-rw-r--r--lib/gitlab/github_import.rb2
-rw-r--r--lib/gitlab/github_import/issuable_finder.rb2
-rw-r--r--lib/gitlab/gon_helper.rb18
-rw-r--r--lib/gitlab/graphql/pagination/keyset/generic_keyset_pagination.rb2
-rw-r--r--lib/gitlab/health_checks/middleware.rb33
-rw-r--r--lib/gitlab/health_checks/server.rb62
-rw-r--r--lib/gitlab/hotlinking_detector.rb2
-rw-r--r--lib/gitlab/import_export/file_importer.rb2
-rw-r--r--lib/gitlab/import_export/group/relation_tree_restorer.rb2
-rw-r--r--lib/gitlab/import_export/project/tree_restorer.rb2
-rw-r--r--lib/gitlab/import_export/project/tree_saver.rb2
-rw-r--r--lib/gitlab/integrations/sti_type.rb66
-rw-r--r--lib/gitlab/jira/http_client.rb6
-rw-r--r--lib/gitlab/json.rb2
-rw-r--r--lib/gitlab/metrics/exporter/base_exporter.rb11
-rw-r--r--lib/gitlab/metrics/exporter/health_checks_middleware.rb35
-rw-r--r--lib/gitlab/pagination/gitaly_keyset_pager.rb12
-rw-r--r--lib/gitlab/phabricator_import.rb2
-rw-r--r--lib/gitlab/repository_archive_rate_limiter.rb2
-rw-r--r--lib/gitlab/sidekiq_middleware/server_metrics.rb2
-rw-r--r--lib/gitlab/sourcegraph.rb2
-rw-r--r--lib/gitlab/template/gitlab_ci_yml_template.rb2
-rw-r--r--lib/gitlab/untrusted_regexp.rb4
-rw-r--r--lib/gitlab/usage/metrics/aggregates/aggregate.rb2
-rw-r--r--lib/gitlab/usage/metrics/instrumentations/cert_based_clusters_ff_metric.rb2
-rw-r--r--lib/gitlab/usage_data.rb2
-rw-r--r--lib/gitlab/usage_data_counters/ci_template_unique_counter.rb2
-rw-r--r--lib/gitlab/usage_data_counters/hll_redis_counter.rb2
-rw-r--r--lib/product_analytics/collector_app.rb2
-rw-r--r--lib/tasks/gitlab/db.rake2
-rw-r--r--locale/gitlab.pot9
-rw-r--r--metrics_server/dependencies.rb1
-rw-r--r--sidekiq_cluster/cli.rb16
-rw-r--r--spec/commands/sidekiq_cluster/cli_spec.rb68
-rw-r--r--spec/controllers/graphql_controller_spec.rb24
-rw-r--r--spec/features/dashboard/todos/todos_sorting_spec.rb22
-rw-r--r--spec/frontend/clusters/forms/components/integration_form_spec.js2
-rw-r--r--spec/frontend/vue_shared/components/usage_quotas/usage_banner_spec.js62
-rw-r--r--spec/graphql/resolvers/package_pipelines_resolver_spec.rb2
-rw-r--r--spec/lib/feature_spec.rb16
-rw-r--r--spec/lib/gitlab/background_migration/backfill_integrations_type_new_spec.rb13
-rw-r--r--spec/lib/gitlab/ci/templates/managed_cluster_applications_gitlab_ci_yaml_spec.rb40
-rw-r--r--spec/lib/gitlab/database/migration_helpers/restrict_gitlab_schema_spec.rb2
-rw-r--r--spec/lib/gitlab/database/migration_helpers_spec.rb2
-rw-r--r--spec/lib/gitlab/experiment/rollout/feature_spec.rb3
-rw-r--r--spec/lib/gitlab/health_checks/middleware_spec.rb (renamed from spec/lib/gitlab/metrics/exporter/health_checks_middleware_spec.rb)8
-rw-r--r--spec/lib/gitlab/health_checks/server_spec.rb64
-rw-r--r--spec/lib/gitlab/json_spec.rb2
-rw-r--r--spec/lib/gitlab/metrics/exporter/base_exporter_spec.rb2
-rw-r--r--spec/migrations/20220213103859_remove_integrations_type_spec.rb31
-rw-r--r--spec/models/integration_spec.rb18
-rw-r--r--spec/models/integrations/jira_spec.rb29
-rw-r--r--spec/support/import_export/common_util.rb2
327 files changed, 1449 insertions, 1969 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index e092119a2e1..e819377d060 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -200,11 +200,6 @@ Style/CaseLikeIf:
Style/EmptyMethod:
Enabled: false
-# Offense count: 118
-# Cop supports --auto-correct.
-Style/ExplicitBlockArgument:
- Enabled: false
-
# Offense count: 581
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
@@ -224,11 +219,6 @@ Style/HashAsLastArrayItem:
Style/HashEachMethods:
Enabled: false
-# Offense count: 34
-# Configuration parameters: AllowIfModifier.
-Style/IfInsideElse:
- Enabled: false
-
# Offense count: 64
# Cop supports --auto-correct.
Style/KeywordParametersOrder:
diff --git a/.rubocop_todo/style/explicit_block_argument.yml b/.rubocop_todo/style/explicit_block_argument.yml
new file mode 100644
index 00000000000..f6bff468c76
--- /dev/null
+++ b/.rubocop_todo/style/explicit_block_argument.yml
@@ -0,0 +1,114 @@
+---
+# Cop supports --auto-correct.
+Style/ExplicitBlockArgument:
+ # Offense count: 143
+ # Temporarily disabled due to too many offenses
+ Enabled: false
+ Exclude:
+ - 'app/controllers/admin/background_migrations_controller.rb'
+ - 'app/controllers/application_controller.rb'
+ - 'app/models/application_record.rb'
+ - 'app/models/broadcast_message.rb'
+ - 'app/models/ci/build.rb'
+ - 'app/models/ci/build_trace_chunks/redis.rb'
+ - 'app/models/ci/build_trace_chunks/redis_trace_chunks.rb'
+ - 'app/models/concerns/counter_attribute.rb'
+ - 'app/models/merge_request.rb'
+ - 'app/models/snippet_repository.rb'
+ - 'app/services/import_export_clean_up_service.rb'
+ - 'app/services/issuable/clone/attributes_rewriter.rb'
+ - 'app/services/packages/debian/generate_distribution_key_service.rb'
+ - 'app/workers/concerns/each_shard_worker.rb'
+ - 'db/migrate/20210629031900_associate_existing_dast_builds_with_variables.rb'
+ - 'ee/app/services/gitlab_subscriptions/fetch_subscription_plans_service.rb'
+ - 'ee/app/services/group_saml/identity/destroy_service.rb'
+ - 'ee/lib/ee/backup/repositories.rb'
+ - 'ee/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules.rb'
+ - 'ee/lib/gitlab/audit/events/preloader.rb'
+ - 'ee/lib/gitlab/ci/config/security_orchestration_policies/processor.rb'
+ - 'ee/lib/gitlab/ci/parsers/license_compliance/v1.rb'
+ - 'ee/lib/gitlab/geo.rb'
+ - 'ee/lib/gitlab/geo/event_gap_tracking.rb'
+ - 'ee/lib/gitlab/items_collection.rb'
+ - 'ee/spec/features/epic_boards/multiple_epic_boards_spec.rb'
+ - 'ee/spec/features/projects/security/user_views_security_configuration_spec.rb'
+ - 'ee/spec/support/helpers/ee/migrations_helpers.rb'
+ - 'lib/api/helpers/caching.rb'
+ - 'lib/api/internal/base.rb'
+ - 'lib/banzai/filter/references/reference_filter.rb'
+ - 'lib/banzai/request_store_reference_cache.rb'
+ - 'lib/gitlab/application_context.rb'
+ - 'lib/gitlab/authorized_keys.rb'
+ - 'lib/gitlab/cache.rb'
+ - 'lib/gitlab/ci/build/artifacts/metadata/entry.rb'
+ - 'lib/gitlab/ci/reports/test_suite.rb'
+ - 'lib/gitlab/ci/variables/collection.rb'
+ - 'lib/gitlab/cleanup/remote_uploads.rb'
+ - 'lib/gitlab/database/dynamic_model_helpers.rb'
+ - 'lib/gitlab/database/reindexing/reindex_concurrently.rb'
+ - 'lib/gitlab/git/changes.rb'
+ - 'lib/gitlab/gitaly_client/list_blobs_adapter.rb'
+ - 'lib/gitlab/gitaly_client/namespace_service.rb'
+ - 'lib/gitlab/gitaly_client/ref_service.rb'
+ - 'lib/gitlab/gitaly_client/storage_settings.rb'
+ - 'lib/gitlab/github_import/client.rb'
+ - 'lib/gitlab/graphql/tracers/application_context_tracer.rb'
+ - 'lib/gitlab/import_export/import_failure_service.rb'
+ - 'lib/gitlab/import_export/json/ndjson_writer.rb'
+ - 'lib/gitlab/import_export/json/streaming_serializer.rb'
+ - 'lib/gitlab/import_export/project/base_task.rb'
+ - 'lib/gitlab/import_export/project/export_task.rb'
+ - 'lib/gitlab/import_export/project/import_task.rb'
+ - 'lib/gitlab/metrics/dashboard/cache.rb'
+ - 'lib/gitlab/metrics/dashboard/stages/base_stage.rb'
+ - 'lib/gitlab/profiler.rb'
+ - 'lib/gitlab/redis/wrapper.rb'
+ - 'lib/gitlab/reference_counter.rb'
+ - 'lib/gitlab/seeder.rb'
+ - 'lib/gitlab/sidekiq_middleware/monitor.rb'
+ - 'lib/gitlab/sidekiq_middleware/query_analyzer.rb'
+ - 'lib/gitlab/sidekiq_middleware/request_store_middleware.rb'
+ - 'lib/gitlab/sidekiq_middleware/server_metrics.rb'
+ - 'lib/gitlab/utils/measuring.rb'
+ - 'lib/tasks/config_lint.rake'
+ - 'qa/qa/ee/page/insights/show.rb'
+ - 'qa/qa/ee/page/operations_dashboard.rb'
+ - 'qa/qa/ee/page/project/issue/show.rb'
+ - 'qa/qa/ee/page/project/show.rb'
+ - 'qa/qa/ee/page/project/wiki/show.rb'
+ - 'qa/qa/flow/login.rb'
+ - 'qa/qa/page/admin/menu.rb'
+ - 'qa/qa/page/base.rb'
+ - 'qa/qa/page/component/blob_content.rb'
+ - 'qa/qa/page/group/settings/group_deploy_tokens.rb'
+ - 'qa/qa/page/profile/menu.rb'
+ - 'qa/qa/page/project/settings/deploy_keys.rb'
+ - 'qa/qa/page/project/settings/deploy_tokens.rb'
+ - 'qa/qa/page/sub_menus/common.rb'
+ - 'qa/qa/resource/events/base.rb'
+ - 'qa/qa/runtime/api/repository_storage_moves.rb'
+ - 'qa/qa/runtime/search.rb'
+ - 'qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb'
+ - 'rubocop/code_reuse_helpers.rb'
+ - 'spec/features/merge_request/user_sees_wip_help_message_spec.rb'
+ - 'spec/features/projects/features_visibility_spec.rb'
+ - 'spec/lib/banzai/filter/repository_link_filter_spec.rb'
+ - 'spec/lib/gitlab/ci/config/external/file/project_spec.rb'
+ - 'spec/lib/gitlab/database/query_analyzers/restrict_allowed_schemas_spec.rb'
+ - 'spec/lib/gitlab/pagination/offset_pagination_spec.rb'
+ - 'spec/lib/gitlab/usage_data_spec.rb'
+ - 'spec/models/repository_spec.rb'
+ - 'spec/services/pages/zip_directory_service_spec.rb'
+ - 'spec/services/todo_service_spec.rb'
+ - 'spec/support/helpers/feature_flag_helpers.rb'
+ - 'spec/support/helpers/features/runner_helpers.rb'
+ - 'spec/support/helpers/features/top_nav_spec_helpers.rb'
+ - 'spec/support/helpers/graphql_helpers.rb'
+ - 'spec/support/helpers/modal_helpers.rb'
+ - 'spec/support/helpers/next_found_instance_of.rb'
+ - 'spec/support/helpers/usage_data_helpers.rb'
+ - 'spec/support/shared_contexts/finders/merge_requests_finder_shared_contexts.rb'
+ - 'spec/support/shared_contexts/lib/gitlab/sidekiq_logging/structured_logger_shared_context.rb'
+ - 'spec/support/shared_examples/boards/multiple_issue_boards_shared_examples.rb'
+ - 'spec/uploaders/object_storage_spec.rb'
+ - 'tooling/lib/tooling/helm3_client.rb'
diff --git a/.rubocop_todo/style/if_inside_else.yml b/.rubocop_todo/style/if_inside_else.yml
new file mode 100644
index 00000000000..fcddbae74fc
--- /dev/null
+++ b/.rubocop_todo/style/if_inside_else.yml
@@ -0,0 +1,49 @@
+---
+Style/IfInsideElse:
+ # Offense count: 43
+ # Temporarily disabled due to too many offenses
+ Enabled: false
+ Exclude:
+ - 'app/controllers/application_controller.rb'
+ - 'app/controllers/passwords_controller.rb'
+ - 'app/finders/projects_finder.rb'
+ - 'app/finders/user_recent_events_finder.rb'
+ - 'app/helpers/diff_helper.rb'
+ - 'app/helpers/members_helper.rb'
+ - 'app/helpers/search_helper.rb'
+ - 'app/models/ci/build.rb'
+ - 'app/models/namespace.rb'
+ - 'app/presenters/project_presenter.rb'
+ - 'app/services/service_ping/build_payload_service.rb'
+ - 'app/services/system_notes/commit_service.rb'
+ - 'app/services/task_list_toggle_service.rb'
+ - 'app/services/user_project_access_changed_service.rb'
+ - 'app/uploaders/gitlab_uploader.rb'
+ - 'config/settings.rb'
+ - 'ee/app/controllers/ee/registrations/welcome_controller.rb'
+ - 'ee/app/controllers/groups/omniauth_callbacks_controller.rb'
+ - 'ee/app/models/ee/namespace.rb'
+ - 'ee/app/models/protected_environments/authorizable.rb'
+ - 'ee/app/policies/ee/group_policy.rb'
+ - 'ee/app/services/app_sec/dast/site_profiles/audit/update_service.rb'
+ - 'ee/app/services/deployments/approval_service.rb'
+ - 'ee/app/services/geo/framework_repository_sync_service.rb'
+ - 'ee/app/services/geo/repository_base_sync_service.rb'
+ - 'ee/app/services/gitlab_subscriptions/fetch_subscription_plans_service.rb'
+ - 'ee/app/services/vulnerability_external_issue_links/create_service.rb'
+ - 'ee/lib/gitlab/geo/base_batcher.rb'
+ - 'lib/api/projects.rb'
+ - 'lib/gitlab/auth.rb'
+ - 'lib/gitlab/conflict/file.rb'
+ - 'lib/gitlab/sql/pattern.rb'
+ - 'lib/gitlab/usage/service_ping/payload_keys_processor.rb'
+ - 'lib/tasks/gitlab/cleanup.rake'
+ - 'lib/tasks/gitlab/shell.rake'
+ - 'qa/qa/resource/protected_branch.rb'
+ - 'qa/qa/specs/helpers/feature_flag.rb'
+ - 'rubocop/cop/migration/add_limit_to_text_columns.rb'
+ - 'scripts/review_apps/automated_cleanup.rb'
+ - 'spec/controllers/projects/merge_requests/conflicts_controller_spec.rb'
+ - 'spec/support/import_export/export_file_helper.rb'
+ - 'spec/support/shared_examples/finders/snippet_visibility_shared_examples.rb'
+ - 'spec/support/shared_examples/metrics/active_record_subscriber_shared_examples.rb'
diff --git a/app/assets/javascripts/vue_shared/components/usage_quotas/usage_banner.vue b/app/assets/javascripts/vue_shared/components/usage_quotas/usage_banner.vue
new file mode 100644
index 00000000000..bc5e0cf10dd
--- /dev/null
+++ b/app/assets/javascripts/vue_shared/components/usage_quotas/usage_banner.vue
@@ -0,0 +1,68 @@
+<script>
+import { GlSkeletonLoader } from '@gitlab/ui';
+import { helpPagePath } from '~/helpers/help_page_helper';
+import { s__ } from '~/locale';
+
+export default {
+ name: 'UsageBanner',
+ components: {
+ GlSkeletonLoader,
+ },
+ props: {
+ loading: {
+ type: Boolean,
+ required: false,
+ default: false,
+ },
+ },
+ i18n: {
+ dependencyProxy: s__('UsageQuota|Dependency proxy'),
+ storageUsed: s__('UsageQuota|Storage used'),
+ dependencyProxyMessage: s__(
+ 'UsageQuota|Local proxy used for frequently-accessed upstream Docker images. %{linkStart}More information%{linkEnd}',
+ ),
+ },
+ storageUsageQuotaHelpPage: helpPagePath('user/usage_quotas'),
+};
+</script>
+<template>
+ <div class="gl-display-flex gl-flex-direction-column">
+ <div class="gl-display-flex gl-align-items-center gl-py-3">
+ <div
+ class="gl-display-flex gl-xs-flex-direction-column gl-justify-content-space-between gl-align-items-stretch gl-flex-grow-1"
+ >
+ <div class="gl-display-flex gl-flex-direction-column gl-xs-mb-3 gl-min-w-0 gl-flex-grow-1">
+ <div
+ v-if="$slots['left-primary-text']"
+ class="gl-display-flex gl-align-items-center gl-text-body gl-font-weight-bold gl-min-h-6 gl-min-w-0 gl-mb-4"
+ >
+ <slot name="left-primary-text"></slot>
+ </div>
+ <div
+ v-if="$slots['left-secondary-text']"
+ class="gl-display-flex gl-align-items-center gl-text-gray-500 gl-min-h-6 gl-min-w-0 gl-flex-grow-1 gl-w-70p gl-md-max-w-70p"
+ >
+ <slot name="left-secondary-text"></slot>
+ </div>
+ </div>
+ <div
+ class="gl-display-flex gl-flex-direction-column gl-sm-align-items-flex-end gl-justify-content-space-between gl-text-gray-500 gl-flex-shrink-0"
+ >
+ <div
+ v-if="$slots['right-primary-text']"
+ class="gl-display-flex gl-align-items-center gl-sm-text-body gl-sm-font-weight-bold gl-min-h-6"
+ >
+ <slot name="right-primary-text"></slot>
+ </div>
+ <div
+ v-if="$slots['right-secondary-text']"
+ class="gl-display-flex gl-align-items-center gl-min-h-6"
+ >
+ <slot v-if="!loading" name="right-secondary-text"></slot>
+ <gl-skeleton-loader v-else :width="60" :lines="1" />
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</template>
diff --git a/app/controllers/admin/runners_controller.rb b/app/controllers/admin/runners_controller.rb
index 4a3139066f1..02e33baaf07 100644
--- a/app/controllers/admin/runners_controller.rb
+++ b/app/controllers/admin/runners_controller.rb
@@ -5,7 +5,7 @@ class Admin::RunnersController < Admin::ApplicationController
before_action :runner, except: [:index, :tag_list, :runner_setup_scripts]
before_action only: [:index] do
- push_frontend_feature_flag(:admin_runners_bulk_delete, default_enabled: :yaml)
+ push_frontend_feature_flag(:admin_runners_bulk_delete)
end
feature_category :runner
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index f19333d5d57..6b11b8eda5c 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -372,7 +372,7 @@ class Admin::UsersController < Admin::ApplicationController
end
def check_ban_user_feature_flag
- access_denied! unless Feature.enabled?(:ban_user_feature_flag, default_enabled: :yaml)
+ access_denied! unless Feature.enabled?(:ban_user_feature_flag)
end
def log_impersonation_event
diff --git a/app/controllers/concerns/authenticates_with_two_factor.rb b/app/controllers/concerns/authenticates_with_two_factor.rb
index 14dcec33545..4228a93d310 100644
--- a/app/controllers/concerns/authenticates_with_two_factor.rb
+++ b/app/controllers/concerns/authenticates_with_two_factor.rb
@@ -23,9 +23,9 @@ module AuthenticatesWithTwoFactor
session[:otp_user_id] = user.id
session[:user_password_hash] = Digest::SHA256.hexdigest(user.encrypted_password)
- push_frontend_feature_flag(:webauthn, default_enabled: :yaml)
+ push_frontend_feature_flag(:webauthn)
- if Feature.enabled?(:webauthn, default_enabled: :yaml)
+ if Feature.enabled?(:webauthn)
setup_webauthn_authentication(user)
else
setup_u2f_authentication(user)
diff --git a/app/controllers/concerns/authenticates_with_two_factor_for_admin_mode.rb b/app/controllers/concerns/authenticates_with_two_factor_for_admin_mode.rb
index 05be04059fd..574fc6c0f37 100644
--- a/app/controllers/concerns/authenticates_with_two_factor_for_admin_mode.rb
+++ b/app/controllers/concerns/authenticates_with_two_factor_for_admin_mode.rb
@@ -11,7 +11,7 @@ module AuthenticatesWithTwoFactorForAdminMode
return handle_locked_user(user) unless user.can?(:log_in)
session[:otp_user_id] = user.id
- push_frontend_feature_flag(:webauthn, default_enabled: :yaml)
+ push_frontend_feature_flag(:webauthn)
if user.two_factor_webauthn_enabled?
setup_webauthn_authentication(user)
diff --git a/app/controllers/concerns/issuable_actions.rb b/app/controllers/concerns/issuable_actions.rb
index ae90bd59d01..4d3eb9cd183 100644
--- a/app/controllers/concerns/issuable_actions.rb
+++ b/app/controllers/concerns/issuable_actions.rb
@@ -184,7 +184,7 @@ module IssuableActions
def paginated_discussions
return if params[:per_page].blank?
- return unless issuable.instance_of?(Issue) && Feature.enabled?(:paginated_issue_discussions, project, default_enabled: :yaml)
+ return unless issuable.instance_of?(Issue) && Feature.enabled?(:paginated_issue_discussions, project)
strong_memoize(:paginated_discussions) do
issuable
diff --git a/app/controllers/concerns/product_analytics_tracking.rb b/app/controllers/concerns/product_analytics_tracking.rb
index 03296d6b233..4021ff83578 100644
--- a/app/controllers/concerns/product_analytics_tracking.rb
+++ b/app/controllers/concerns/product_analytics_tracking.rb
@@ -20,7 +20,7 @@ module ProductAnalyticsTracking
def route_events_to(destinations, name, &block)
track_unique_redis_hll_event(name, &block) if destinations.include?(:redis_hll)
- if destinations.include?(:snowplow) && Feature.enabled?(:route_hll_to_snowplow, tracking_namespace_source, default_enabled: :yaml)
+ if destinations.include?(:snowplow) && Feature.enabled?(:route_hll_to_snowplow, tracking_namespace_source)
Gitlab::Tracking.event(self.class.to_s, name, namespace: tracking_namespace_source, user: current_user)
end
end
diff --git a/app/controllers/concerns/send_file_upload.rb b/app/controllers/concerns/send_file_upload.rb
index 8b053ef7c59..c8369c465b8 100644
--- a/app/controllers/concerns/send_file_upload.rb
+++ b/app/controllers/concerns/send_file_upload.rb
@@ -71,6 +71,6 @@ module SendFileUpload
end
def scaling_allowed_by_feature_flags?(file_upload)
- Feature.enabled?(:dynamic_image_resizing, default_enabled: true, type: :ops)
+ Feature.enabled?(:dynamic_image_resizing, type: :ops)
end
end
diff --git a/app/controllers/concerns/uploads_actions.rb b/app/controllers/concerns/uploads_actions.rb
index eaa945b0312..f914e804e18 100644
--- a/app/controllers/concerns/uploads_actions.rb
+++ b/app/controllers/concerns/uploads_actions.rb
@@ -143,7 +143,7 @@ module UploadsActions
end
def bypass_auth_checks_on_uploads?
- if ::Feature.enabled?(:enforce_auth_checks_on_uploads, target_project, default_enabled: :yaml)
+ if ::Feature.enabled?(:enforce_auth_checks_on_uploads, target_project)
if target_project && !target_project.public? && target_project.enforce_auth_checks_on_uploads?
return false
end
diff --git a/app/controllers/concerns/wiki_actions.rb b/app/controllers/concerns/wiki_actions.rb
index 5fd1b47da1b..9fc8886aaee 100644
--- a/app/controllers/concerns/wiki_actions.rb
+++ b/app/controllers/concerns/wiki_actions.rb
@@ -22,7 +22,7 @@ module WikiActions
before_action :set_content_class
before_action do
- push_frontend_feature_flag(:preserve_unchanged_markdown, @group, default_enabled: :yaml)
+ push_frontend_feature_flag(:preserve_unchanged_markdown, @group)
end
before_action only: [:show, :edit, :update] do
diff --git a/app/controllers/graphql_controller.rb b/app/controllers/graphql_controller.rb
index b00d85b6b0f..a58cae0ec11 100644
--- a/app/controllers/graphql_controller.rb
+++ b/app/controllers/graphql_controller.rb
@@ -64,7 +64,7 @@ class GraphqlController < ApplicationController
log_exception(exception)
if Rails.env.test? || Rails.env.development?
- render_error("Internal server error: #{exception.message}")
+ render_error("Internal server error: #{exception.message}", raised_at: exception.backtrace.first)
else
render_error("Internal server error")
end
@@ -207,8 +207,9 @@ class GraphqlController < ApplicationController
render_error("Not found!", status: :not_found)
end
- def render_error(message, status: 500)
+ def render_error(message, status: 500, raised_at: nil)
error = { errors: [message: message] }
+ error[:errors].first['raisedAt'] = raised_at if raised_at
render json: error, status: status
end
diff --git a/app/controllers/groups/boards_controller.rb b/app/controllers/groups/boards_controller.rb
index c65232c0fea..39edf672252 100644
--- a/app/controllers/groups/boards_controller.rb
+++ b/app/controllers/groups/boards_controller.rb
@@ -7,8 +7,8 @@ class Groups::BoardsController < Groups::ApplicationController
before_action :assign_endpoint_vars
before_action do
- push_frontend_feature_flag(:board_multi_select, group, default_enabled: :yaml)
- push_frontend_feature_flag(:realtime_labels, group, default_enabled: :yaml)
+ push_frontend_feature_flag(:board_multi_select, group)
+ push_frontend_feature_flag(:realtime_labels, group)
experiment(:prominent_create_board_btn, subject: current_user) do |e|
e.control { }
e.candidate { }
diff --git a/app/controllers/groups/dependency_proxy/application_controller.rb b/app/controllers/groups/dependency_proxy/application_controller.rb
index 18a6ff93e15..841e637e4c4 100644
--- a/app/controllers/groups/dependency_proxy/application_controller.rb
+++ b/app/controllers/groups/dependency_proxy/application_controller.rb
@@ -37,7 +37,7 @@ module Groups
private
def dependency_proxy_for_private_groups?
- Feature.enabled?(:dependency_proxy_for_private_groups, default_enabled: true)
+ Feature.enabled?(:dependency_proxy_for_private_groups)
end
def request_bearer_token!
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index c5a7b88437c..bc2dcec625b 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -31,7 +31,7 @@ class GroupsController < Groups::ApplicationController
before_action :user_actions, only: [:show]
before_action do
- push_frontend_feature_flag(:vue_issues_list, @group, default_enabled: :yaml)
+ push_frontend_feature_flag(:vue_issues_list, @group)
end
before_action :check_export_rate_limit!, only: [:export, :download_export]
@@ -211,7 +211,7 @@ class GroupsController < Groups::ApplicationController
end
def issues
- return super if !html_request? || Feature.disabled?(:vue_issues_list, group, default_enabled: :yaml)
+ return super if !html_request? || Feature.disabled?(:vue_issues_list, group)
@has_issues = IssuesFinder.new(current_user, group_id: group.id, include_subgroups: true).execute
.non_archived
diff --git a/app/controllers/ide_controller.rb b/app/controllers/ide_controller.rb
index 9494a686467..2bcbf88039b 100644
--- a/app/controllers/ide_controller.rb
+++ b/app/controllers/ide_controller.rb
@@ -12,7 +12,7 @@ class IdeController < ApplicationController
before_action do
push_frontend_feature_flag(:build_service_proxy)
push_frontend_feature_flag(:schema_linting)
- push_frontend_feature_flag(:reject_unsigned_commits_by_gitlab, default_enabled: :yaml)
+ push_frontend_feature_flag(:reject_unsigned_commits_by_gitlab)
define_index_vars
end
diff --git a/app/controllers/import/bulk_imports_controller.rb b/app/controllers/import/bulk_imports_controller.rb
index 1df549fecf2..34f12aebb91 100644
--- a/app/controllers/import/bulk_imports_controller.rb
+++ b/app/controllers/import/bulk_imports_controller.rb
@@ -99,7 +99,7 @@ class Import::BulkImportsController < ApplicationController
end
def ensure_group_import_enabled
- render_404 unless Feature.enabled?(:bulk_import, default_enabled: :yaml)
+ render_404 unless Feature.enabled?(:bulk_import)
end
def access_token_key
diff --git a/app/controllers/jira_connect/subscriptions_controller.rb b/app/controllers/jira_connect/subscriptions_controller.rb
index 4e83e0c44ec..2ba9f8264e1 100644
--- a/app/controllers/jira_connect/subscriptions_controller.rb
+++ b/app/controllers/jira_connect/subscriptions_controller.rb
@@ -19,8 +19,8 @@ class JiraConnect::SubscriptionsController < JiraConnect::ApplicationController
end
before_action do
- push_frontend_feature_flag(:jira_connect_oauth, @user, default_enabled: :yaml)
- push_frontend_feature_flag(:jira_connect_oauth_self_managed, @user, default_enabled: :yaml)
+ push_frontend_feature_flag(:jira_connect_oauth, @user)
+ push_frontend_feature_flag(:jira_connect_oauth_self_managed, @user)
end
before_action :allow_rendering_in_iframe, only: :index
diff --git a/app/controllers/oauth/authorizations_controller.rb b/app/controllers/oauth/authorizations_controller.rb
index d1c409d071e..e714cbb5b70 100644
--- a/app/controllers/oauth/authorizations_controller.rb
+++ b/app/controllers/oauth/authorizations_controller.rb
@@ -37,8 +37,7 @@ class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController
# limit scopes when signing in with GitLab
def downgrade_scopes!
- return unless Feature.enabled?(:omniauth_login_minimal_scopes, current_user,
- default_enabled: :yaml)
+ return unless Feature.enabled?(:omniauth_login_minimal_scopes, current_user)
auth_type = params.delete('gl_auth_type')
return unless auth_type == 'login'
diff --git a/app/controllers/profiles/two_factor_auths_controller.rb b/app/controllers/profiles/two_factor_auths_controller.rb
index 48b0d313d3c..b1fa0502193 100644
--- a/app/controllers/profiles/two_factor_auths_controller.rb
+++ b/app/controllers/profiles/two_factor_auths_controller.rb
@@ -9,7 +9,7 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
helper_method :current_password_required?
before_action do
- push_frontend_feature_flag(:webauthn, default_enabled: :yaml)
+ push_frontend_feature_flag(:webauthn)
end
feature_category :authentication_and_authorization
@@ -35,7 +35,7 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
@qr_code = build_qr_code
@account_string = account_string
- if Feature.enabled?(:webauthn, default_enabled: :yaml)
+ if Feature.enabled?(:webauthn)
setup_webauthn_registration
else
setup_u2f_registration
@@ -61,7 +61,7 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
@qr_code = build_qr_code
@account_string = account_string
- if Feature.enabled?(:webauthn, default_enabled: :yaml)
+ if Feature.enabled?(:webauthn)
setup_webauthn_registration
else
setup_u2f_registration
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb
index 9c01aba6631..d5e7195a157 100644
--- a/app/controllers/profiles_controller.rb
+++ b/app/controllers/profiles_controller.rb
@@ -11,7 +11,7 @@ class ProfilesController < Profiles::ApplicationController
end
skip_before_action :require_email, only: [:show, :update]
before_action do
- push_frontend_feature_flag(:webauthn, default_enabled: :yaml)
+ push_frontend_feature_flag(:webauthn)
end
feature_category :users
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb
index 26a7b5662be..a9561fb9312 100644
--- a/app/controllers/projects/blob_controller.rb
+++ b/app/controllers/projects/blob_controller.rb
@@ -42,8 +42,8 @@ class Projects::BlobController < Projects::ApplicationController
urgency :low, [:create, :show, :edit, :update, :diff]
before_action do
- push_frontend_feature_flag(:refactor_blob_viewer, @project, default_enabled: :yaml)
- push_frontend_feature_flag(:highlight_js, @project, default_enabled: :yaml)
+ push_frontend_feature_flag(:refactor_blob_viewer, @project)
+ push_frontend_feature_flag(:highlight_js, @project)
push_licensed_feature(:file_locks) if @project.licensed_feature_available?(:file_locks)
end
diff --git a/app/controllers/projects/boards_controller.rb b/app/controllers/projects/boards_controller.rb
index 7a30e68d9a2..1ed18401bc5 100644
--- a/app/controllers/projects/boards_controller.rb
+++ b/app/controllers/projects/boards_controller.rb
@@ -7,8 +7,8 @@ class Projects::BoardsController < Projects::ApplicationController
before_action :check_issues_available!
before_action :assign_endpoint_vars
before_action do
- push_frontend_feature_flag(:board_multi_select, project, default_enabled: :yaml)
- push_frontend_feature_flag(:realtime_labels, project&.group, default_enabled: :yaml)
+ push_frontend_feature_flag(:board_multi_select, project)
+ push_frontend_feature_flag(:realtime_labels, project&.group)
experiment(:prominent_create_board_btn, subject: current_user) do |e|
e.control { }
e.candidate { }
diff --git a/app/controllers/projects/ci/pipeline_editor_controller.rb b/app/controllers/projects/ci/pipeline_editor_controller.rb
index fdcae23a440..dbf3b2051fb 100644
--- a/app/controllers/projects/ci/pipeline_editor_controller.rb
+++ b/app/controllers/projects/ci/pipeline_editor_controller.rb
@@ -3,8 +3,8 @@
class Projects::Ci::PipelineEditorController < Projects::ApplicationController
before_action :check_can_collaborate!
before_action do
- push_frontend_feature_flag(:schema_linting, @project, default_enabled: :yaml)
- push_frontend_feature_flag(:pipeline_editor_file_tree, @project, default_enabled: :yaml)
+ push_frontend_feature_flag(:schema_linting, @project)
+ push_frontend_feature_flag(:pipeline_editor_file_tree, @project)
end
feature_category :pipeline_authoring
diff --git a/app/controllers/projects/clusters_controller.rb b/app/controllers/projects/clusters_controller.rb
index 440375bf3c9..30d001d0ac5 100644
--- a/app/controllers/projects/clusters_controller.rb
+++ b/app/controllers/projects/clusters_controller.rb
@@ -6,7 +6,7 @@ class Projects::ClustersController < Clusters::ClustersController
before_action do
push_frontend_feature_flag(:prometheus_computed_alerts)
- push_frontend_feature_flag(:show_gitlab_agent_feedback, type: :ops, default_enabled: :yaml)
+ push_frontend_feature_flag(:show_gitlab_agent_feedback, type: :ops)
end
layout 'project'
diff --git a/app/controllers/projects/incidents_controller.rb b/app/controllers/projects/incidents_controller.rb
index cce1317d220..fd7ba7b5460 100644
--- a/app/controllers/projects/incidents_controller.rb
+++ b/app/controllers/projects/incidents_controller.rb
@@ -7,8 +7,8 @@ class Projects::IncidentsController < Projects::ApplicationController
before_action :authorize_read_issue!
before_action :load_incident, only: [:show]
before_action do
- push_frontend_feature_flag(:incident_escalations, @project, default_enabled: :yaml)
- push_frontend_feature_flag(:incident_timeline, @project, default_enabled: :yaml)
+ push_frontend_feature_flag(:incident_escalations, @project)
+ push_frontend_feature_flag(:incident_timeline, @project)
end
feature_category :incident_management
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb
index 7084c91c6cb..4e1a45db697 100644
--- a/app/controllers/projects/issues_controller.rb
+++ b/app/controllers/projects/issues_controller.rb
@@ -39,16 +39,16 @@ class Projects::IssuesController < Projects::ApplicationController
before_action :authorize_download_code!, only: [:related_branches]
before_action do
- push_frontend_feature_flag(:vue_issues_list, project&.group, default_enabled: :yaml)
- push_frontend_feature_flag(:contacts_autocomplete, project&.group, default_enabled: :yaml)
- push_frontend_feature_flag(:incident_timeline, project, default_enabled: :yaml)
+ push_frontend_feature_flag(:vue_issues_list, project&.group)
+ push_frontend_feature_flag(:contacts_autocomplete, project&.group)
+ push_frontend_feature_flag(:incident_timeline, project)
end
before_action only: :show do
- push_frontend_feature_flag(:confidential_notes, project&.group, default_enabled: :yaml)
- push_frontend_feature_flag(:issue_assignees_widget, project, default_enabled: :yaml)
- push_frontend_feature_flag(:paginated_issue_discussions, project, default_enabled: :yaml)
- push_frontend_feature_flag(:realtime_labels, project, default_enabled: :yaml)
+ push_frontend_feature_flag(:confidential_notes, project&.group)
+ push_frontend_feature_flag(:issue_assignees_widget, project)
+ push_frontend_feature_flag(:paginated_issue_discussions, project)
+ push_frontend_feature_flag(:realtime_labels, project)
push_force_frontend_feature_flag(:work_items, project&.work_items_feature_flag_enabled?)
end
@@ -253,7 +253,7 @@ class Projects::IssuesController < Projects::ApplicationController
def vue_issues_list?
action_name.to_sym == :index &&
html_request? &&
- Feature.enabled?(:vue_issues_list, project&.group, default_enabled: :yaml)
+ Feature.enabled?(:vue_issues_list, project&.group)
end
def sorting_field
diff --git a/app/controllers/projects/jobs_controller.rb b/app/controllers/projects/jobs_controller.rb
index c61a7be860c..8ea3d2d697d 100644
--- a/app/controllers/projects/jobs_controller.rb
+++ b/app/controllers/projects/jobs_controller.rb
@@ -21,8 +21,8 @@ class Projects::JobsController < Projects::ApplicationController
before_action :push_jobs_table_vue_search, only: [:index]
before_action do
- push_frontend_feature_flag(:infinitely_collapsible_sections, @project, default_enabled: :yaml)
- push_frontend_feature_flag(:trigger_job_retry_action, @project, default_enabled: :yaml)
+ push_frontend_feature_flag(:infinitely_collapsible_sections, @project)
+ push_frontend_feature_flag(:trigger_job_retry_action, @project)
end
layout 'project'
@@ -262,10 +262,10 @@ class Projects::JobsController < Projects::ApplicationController
end
def push_jobs_table_vue
- push_frontend_feature_flag(:jobs_table_vue, @project, default_enabled: :yaml)
+ push_frontend_feature_flag(:jobs_table_vue, @project)
end
def push_jobs_table_vue_search
- push_frontend_feature_flag(:jobs_table_vue_search, @project, default_enabled: :yaml)
+ push_frontend_feature_flag(:jobs_table_vue_search, @project)
end
end
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index 6e46135dd8f..9323f820ba5 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -33,22 +33,22 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
before_action only: [:show] do
push_frontend_feature_flag(:file_identifier_hash)
- push_frontend_feature_flag(:merge_request_widget_graphql, project, default_enabled: :yaml)
+ push_frontend_feature_flag(:merge_request_widget_graphql, project)
push_frontend_feature_flag(:core_security_mr_widget_counts, project)
- push_frontend_feature_flag(:paginated_notes, project, default_enabled: :yaml)
- push_frontend_feature_flag(:confidential_notes, project, default_enabled: :yaml)
- push_frontend_feature_flag(:restructured_mr_widget, project, default_enabled: :yaml)
- push_frontend_feature_flag(:refactor_mr_widgets_extensions, project, default_enabled: :yaml)
- push_frontend_feature_flag(:refactor_mr_widget_test_summary, project, default_enabled: :yaml)
- push_frontend_feature_flag(:rebase_without_ci_ui, project, default_enabled: :yaml)
- push_frontend_feature_flag(:issue_assignees_widget, @project, default_enabled: :yaml)
- push_frontend_feature_flag(:realtime_labels, project, default_enabled: :yaml)
- push_frontend_feature_flag(:updated_diff_expansion_buttons, project, default_enabled: :yaml)
- push_frontend_feature_flag(:mr_attention_requests, current_user, default_enabled: :yaml)
+ push_frontend_feature_flag(:paginated_notes, project)
+ push_frontend_feature_flag(:confidential_notes, project)
+ push_frontend_feature_flag(:restructured_mr_widget, project)
+ push_frontend_feature_flag(:refactor_mr_widgets_extensions, project)
+ push_frontend_feature_flag(:refactor_mr_widget_test_summary, project)
+ push_frontend_feature_flag(:rebase_without_ci_ui, project)
+ push_frontend_feature_flag(:issue_assignees_widget, @project)
+ push_frontend_feature_flag(:realtime_labels, project)
+ push_frontend_feature_flag(:updated_diff_expansion_buttons, project)
+ push_frontend_feature_flag(:mr_attention_requests, current_user)
end
before_action do
- push_frontend_feature_flag(:permit_all_shared_groups_for_approval, @project, default_enabled: :yaml)
+ push_frontend_feature_flag(:permit_all_shared_groups_for_approval, @project)
end
around_action :allow_gitaly_ref_name_caching, only: [:index, :show, :discussions]
diff --git a/app/controllers/projects/pipelines/tests_controller.rb b/app/controllers/projects/pipelines/tests_controller.rb
index 4daf700a8bd..8f0e20290fe 100644
--- a/app/controllers/projects/pipelines/tests_controller.rb
+++ b/app/controllers/projects/pipelines/tests_controller.rb
@@ -23,7 +23,7 @@ module Projects
def show
respond_to do |format|
format.json do
- if Feature.enabled?(:ci_test_report_artifacts_expired, project, default_enabled: :yaml) && pipeline.has_expired_test_reports?
+ if Feature.enabled?(:ci_test_report_artifacts_expired, project) && pipeline.has_expired_test_reports?
render json: { errors: 'Test report artifacts have expired' }, status: :not_found
else
render json: TestSuiteSerializer
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb
index a958f10e778..94865024688 100644
--- a/app/controllers/projects/pipelines_controller.rb
+++ b/app/controllers/projects/pipelines_controller.rb
@@ -21,9 +21,9 @@ class Projects::PipelinesController < Projects::ApplicationController
before_action :ensure_pipeline, only: [:show, :downloadable_artifacts]
before_action do
- push_frontend_feature_flag(:pipeline_tabs_vue, @project, default_enabled: :yaml)
- push_frontend_feature_flag(:downstream_retry_action, @project, default_enabled: :yaml)
- push_frontend_feature_flag(:failed_jobs_tab_vue, @project, default_enabled: :yaml)
+ push_frontend_feature_flag(:pipeline_tabs_vue, @project)
+ push_frontend_feature_flag(:downstream_retry_action, @project)
+ push_frontend_feature_flag(:failed_jobs_tab_vue, @project)
end
# Will be removed with https://gitlab.com/gitlab-org/gitlab/-/issues/225596
@@ -149,7 +149,7 @@ class Projects::PipelinesController < Projects::ApplicationController
end
def builds
- if Feature.enabled?(:pipeline_tabs_vue, project, default_enabled: :yaml)
+ if Feature.enabled?(:pipeline_tabs_vue, project)
redirect_to pipeline_path(@pipeline, tab: 'builds')
else
render_show
@@ -159,7 +159,7 @@ class Projects::PipelinesController < Projects::ApplicationController
def dag
respond_to do |format|
format.html do
- if Feature.enabled?(:pipeline_tabs_vue, project, default_enabled: :yaml)
+ if Feature.enabled?(:pipeline_tabs_vue, project)
redirect_to pipeline_path(@pipeline, tab: 'dag')
else
render_show
@@ -174,7 +174,7 @@ class Projects::PipelinesController < Projects::ApplicationController
end
def failures
- if Feature.enabled?(:pipeline_tabs_vue, project, default_enabled: :yaml)
+ if Feature.enabled?(:pipeline_tabs_vue, project)
redirect_to pipeline_path(@pipeline, tab: 'failures')
elsif @pipeline.failed_builds.present?
render_show
@@ -231,7 +231,7 @@ class Projects::PipelinesController < Projects::ApplicationController
def test_report
respond_to do |format|
format.html do
- if Feature.enabled?(:pipeline_tabs_vue, project, default_enabled: :yaml)
+ if Feature.enabled?(:pipeline_tabs_vue, project)
redirect_to pipeline_path(@pipeline, tab: 'test_report')
else
render_show
diff --git a/app/controllers/projects/product_analytics_controller.rb b/app/controllers/projects/product_analytics_controller.rb
index 5db7585d8e0..c89cd52530a 100644
--- a/app/controllers/projects/product_analytics_controller.rb
+++ b/app/controllers/projects/product_analytics_controller.rb
@@ -54,6 +54,6 @@ class Projects::ProductAnalyticsController < Projects::ApplicationController
end
def feature_enabled!
- render_404 unless Feature.enabled?(:product_analytics, @project, default_enabled: false)
+ render_404 unless Feature.enabled?(:product_analytics, @project)
end
end
diff --git a/app/controllers/projects/security/configuration_controller.rb b/app/controllers/projects/security/configuration_controller.rb
index cdb02047215..00a2a5d1193 100644
--- a/app/controllers/projects/security/configuration_controller.rb
+++ b/app/controllers/projects/security/configuration_controller.rb
@@ -42,7 +42,7 @@ module Projects
end
def unify_configuration_enabled?
- Feature.enabled?(:unify_security_configuration, project, default_enabled: :yaml)
+ Feature.enabled?(:unify_security_configuration, project)
end
end
end
diff --git a/app/controllers/projects/tree_controller.rb b/app/controllers/projects/tree_controller.rb
index a70795f2065..ed14f66847c 100644
--- a/app/controllers/projects/tree_controller.rb
+++ b/app/controllers/projects/tree_controller.rb
@@ -17,9 +17,9 @@ class Projects::TreeController < Projects::ApplicationController
before_action :authorize_edit_tree!, only: [:create_dir]
before_action do
- push_frontend_feature_flag(:lazy_load_commits, @project, default_enabled: :yaml)
- push_frontend_feature_flag(:refactor_blob_viewer, @project, default_enabled: :yaml)
- push_frontend_feature_flag(:highlight_js, @project, default_enabled: :yaml)
+ push_frontend_feature_flag(:lazy_load_commits, @project)
+ push_frontend_feature_flag(:refactor_blob_viewer, @project)
+ push_frontend_feature_flag(:highlight_js, @project)
push_licensed_feature(:file_locks) if @project.licensed_feature_available?(:file_locks)
end
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index cce02d493f0..dfb9ef54f7c 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -35,10 +35,10 @@ class ProjectsController < Projects::ApplicationController
before_action :check_export_rate_limit!, only: [:export, :download_export, :generate_new_export]
before_action do
- push_frontend_feature_flag(:lazy_load_commits, @project, default_enabled: :yaml)
- push_frontend_feature_flag(:refactor_blob_viewer, @project, default_enabled: :yaml)
- push_frontend_feature_flag(:highlight_js, @project, default_enabled: :yaml)
- push_frontend_feature_flag(:increase_page_size_exponentially, @project, default_enabled: :yaml)
+ push_frontend_feature_flag(:lazy_load_commits, @project)
+ push_frontend_feature_flag(:refactor_blob_viewer, @project)
+ push_frontend_feature_flag(:highlight_js, @project)
+ push_frontend_feature_flag(:increase_page_size_exponentially, @project)
push_licensed_feature(:file_locks) if @project.present? && @project.licensed_feature_available?(:file_locks)
push_licensed_feature(:security_orchestration_policies) if @project.present? && @project.licensed_feature_available?(:security_orchestration_policies)
push_force_frontend_feature_flag(:work_items, @project&.work_items_feature_flag_enabled?)
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index e938902852d..aab901c1008 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -168,17 +168,17 @@ class SearchController < ApplicationController
search_allowed = case params[:scope]
when 'blobs'
- Feature.enabled?(:global_search_code_tab, current_user, type: :ops, default_enabled: :yaml)
+ Feature.enabled?(:global_search_code_tab, current_user, type: :ops)
when 'commits'
- Feature.enabled?(:global_search_commits_tab, current_user, type: :ops, default_enabled: :yaml)
+ Feature.enabled?(:global_search_commits_tab, current_user, type: :ops)
when 'issues'
- Feature.enabled?(:global_search_issues_tab, current_user, type: :ops, default_enabled: :yaml)
+ Feature.enabled?(:global_search_issues_tab, current_user, type: :ops)
when 'merge_requests'
- Feature.enabled?(:global_search_merge_requests_tab, current_user, type: :ops, default_enabled: :yaml)
+ Feature.enabled?(:global_search_merge_requests_tab, current_user, type: :ops)
when 'wiki_blobs'
- Feature.enabled?(:global_search_wiki_tab, current_user, type: :ops, default_enabled: :yaml)
+ Feature.enabled?(:global_search_wiki_tab, current_user, type: :ops)
when 'users'
- Feature.enabled?(:global_search_users_tab, current_user, type: :ops, default_enabled: :yaml)
+ Feature.enabled?(:global_search_users_tab, current_user, type: :ops)
else
true
end
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
index 51c23e5a000..57444bf9890 100644
--- a/app/controllers/sessions_controller.rb
+++ b/app/controllers/sessions_controller.rb
@@ -33,7 +33,7 @@ class SessionsController < Devise::SessionsController
before_action :load_recaptcha
before_action :set_invite_params, only: [:new]
before_action do
- push_frontend_feature_flag(:webauthn, default_enabled: :yaml)
+ push_frontend_feature_flag(:webauthn)
end
after_action :log_failed_login, if: :action_new_and_failed_login?
@@ -307,9 +307,9 @@ class SessionsController < Devise::SessionsController
def authentication_method
if user_params[:otp_attempt]
AuthenticationEvent::TWO_FACTOR
- elsif user_params[:device_response] && Feature.enabled?(:webauthn, default_enabled: :yaml)
+ elsif user_params[:device_response] && Feature.enabled?(:webauthn)
AuthenticationEvent::TWO_FACTOR_WEBAUTHN
- elsif user_params[:device_response] && !Feature.enabled?(:webauthn, default_enabled: :yaml)
+ elsif user_params[:device_response] && !Feature.enabled?(:webauthn)
AuthenticationEvent::TWO_FACTOR_U2F
else
AuthenticationEvent::STANDARD
diff --git a/app/finders/group_descendants_finder.rb b/app/finders/group_descendants_finder.rb
index 40d6be03a17..42cd06c8066 100644
--- a/app/finders/group_descendants_finder.rb
+++ b/app/finders/group_descendants_finder.rb
@@ -112,7 +112,7 @@ class GroupDescendantsFinder
group_ids = base_for_ancestors.except(:select, :sort).select(:id)
groups = Group.where(id: group_ids)
- if Feature.enabled?(:linear_group_descendants_finder_upto, current_user, default_enabled: :yaml)
+ if Feature.enabled?(:linear_group_descendants_finder_upto, current_user)
groups.self_and_ancestors(upto: parent_group.id)
else
Gitlab::ObjectHierarchy.new(groups).base_and_ancestors(upto: parent_group.id)
diff --git a/app/finders/groups_finder.rb b/app/finders/groups_finder.rb
index 7cb3e7a5d7f..9a8bc74f435 100644
--- a/app/finders/groups_finder.rb
+++ b/app/finders/groups_finder.rb
@@ -54,7 +54,7 @@ class GroupsFinder < UnionFinder
groups = []
if current_user
- if Feature.enabled?(:use_traversal_ids_groups_finder, current_user, default_enabled: :yaml)
+ if Feature.enabled?(:use_traversal_ids_groups_finder, current_user)
groups << current_user.authorized_groups.self_and_ancestors
groups << current_user.groups.self_and_descendants
else
@@ -81,7 +81,7 @@ class GroupsFinder < UnionFinder
.groups
.where('members.access_level >= ?', params[:min_access_level])
- if Feature.enabled?(:use_traversal_ids_groups_finder, current_user, default_enabled: :yaml)
+ if Feature.enabled?(:use_traversal_ids_groups_finder, current_user)
groups.self_and_descendants
else
Gitlab::ObjectHierarchy
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index bf7b2265ded..fe07a52cbf0 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -348,7 +348,7 @@ class IssuableFinder
params[:in].blank? &&
klass.try(:pg_full_text_searchable_columns).present? &&
params[:search] =~ FULL_TEXT_SEARCH_TERM_REGEX &&
- Feature.enabled?(:issues_full_text_search, params.project || params.group, default_enabled: :yaml)
+ Feature.enabled?(:issues_full_text_search, params.project || params.group)
end
# rubocop: disable CodeReuse/ActiveRecord
@@ -489,7 +489,7 @@ class IssuableFinder
def or_filters_enabled?
strong_memoize(:or_filters_enabled) do
- Feature.enabled?(:or_issuable_queries, feature_flag_scope, default_enabled: :yaml)
+ Feature.enabled?(:or_issuable_queries, feature_flag_scope)
end
end
diff --git a/app/finders/user_recent_events_finder.rb b/app/finders/user_recent_events_finder.rb
index 2cdf7819d23..64903c67573 100644
--- a/app/finders/user_recent_events_finder.rb
+++ b/app/finders/user_recent_events_finder.rb
@@ -73,7 +73,7 @@ class UserRecentEventsFinder
return Event.none if users.empty?
- if Feature.enabled?(:optimized_followed_users_queries, current_user, default_enabled: :yaml)
+ if Feature.enabled?(:optimized_followed_users_queries, current_user)
query_builder_params = event_filter.in_operator_query_builder_params(users)
Gitlab::Pagination::Keyset::InOperatorOptimization::QueryBuilder
diff --git a/app/graphql/mutations/issues/set_crm_contacts.rb b/app/graphql/mutations/issues/set_crm_contacts.rb
index 62990fc67f1..4df65e4769c 100644
--- a/app/graphql/mutations/issues/set_crm_contacts.rb
+++ b/app/graphql/mutations/issues/set_crm_contacts.rb
@@ -48,7 +48,7 @@ module Mutations
private
def feature_enabled?(project)
- Feature.enabled?(:customer_relations, project.group, default_enabled: :yaml) && project.group&.crm_enabled?
+ Feature.enabled?(:customer_relations, project.group) && project.group&.crm_enabled?
end
end
end
diff --git a/app/graphql/mutations/saved_replies/base.rb b/app/graphql/mutations/saved_replies/base.rb
index 59871df687f..d7256119d2b 100644
--- a/app/graphql/mutations/saved_replies/base.rb
+++ b/app/graphql/mutations/saved_replies/base.rb
@@ -24,7 +24,7 @@ module Mutations
end
def feature_enabled?
- Feature.enabled?(:saved_replies, current_user, default_enabled: :yaml)
+ Feature.enabled?(:saved_replies, current_user)
end
def find_object(id)
diff --git a/app/graphql/mutations/user_preferences/update.rb b/app/graphql/mutations/user_preferences/update.rb
index eface536a87..b71c952b0f2 100644
--- a/app/graphql/mutations/user_preferences/update.rb
+++ b/app/graphql/mutations/user_preferences/update.rb
@@ -38,7 +38,7 @@ module Mutations
def disabled_sort_value?(args)
return false unless [:escalation_status_asc, :escalation_status_desc].include?(args[:issues_sort])
- Feature.disabled?(:incident_escalations, default_enabled: :yaml)
+ Feature.disabled?(:incident_escalations)
end
end
end
diff --git a/app/graphql/resolvers/base_issues_resolver.rb b/app/graphql/resolvers/base_issues_resolver.rb
index 4cae7866a49..a1fda976876 100644
--- a/app/graphql/resolvers/base_issues_resolver.rb
+++ b/app/graphql/resolvers/base_issues_resolver.rb
@@ -35,7 +35,7 @@ module Resolvers
def prepare_params(args, parent)
return unless [:escalation_status_asc, :escalation_status_desc].include?(args[:sort])
- return if Feature.enabled?(:incident_escalations, parent, default_enabled: :yaml)
+ return if Feature.enabled?(:incident_escalations, parent)
args[:sort] = :created_desc # default for sort argument
end
diff --git a/app/graphql/resolvers/package_pipelines_resolver.rb b/app/graphql/resolvers/package_pipelines_resolver.rb
index e087ce735a1..55e8d1b3d36 100644
--- a/app/graphql/resolvers/package_pipelines_resolver.rb
+++ b/app/graphql/resolvers/package_pipelines_resolver.rb
@@ -40,7 +40,7 @@ module Resolvers
# TODO remove when cleaning up packages_graphql_pipelines_resolver
# https://gitlab.com/gitlab-org/gitlab/-/issues/358432
def detect_mode
- return :new_finder if Feature.enabled?(:packages_graphql_pipelines_resolver, default_enabled: :yaml)
+ return :new_finder if Feature.enabled?(:packages_graphql_pipelines_resolver)
return :object_field if context[:packages_access_level] == :group || context[:packages_access_level] == :project
:old_finder
diff --git a/app/graphql/types/base_field.rb b/app/graphql/types/base_field.rb
index 75909592c6c..b4cd54b1332 100644
--- a/app/graphql/types/base_field.rb
+++ b/app/graphql/types/base_field.rb
@@ -68,7 +68,7 @@ module Types
end
def visible?(context)
- return false if feature_flag.present? && !Feature.enabled?(feature_flag, default_enabled: :yaml)
+ return false if feature_flag.present? && !Feature.enabled?(feature_flag)
super
end
diff --git a/app/graphql/types/issue_type.rb b/app/graphql/types/issue_type.rb
index 07450c38616..c83200bd614 100644
--- a/app/graphql/types/issue_type.rb
+++ b/app/graphql/types/issue_type.rb
@@ -170,7 +170,7 @@ module Types
end
def hidden?
- object.hidden? if Feature.enabled?(:ban_user_feature_flag, default_enabled: :yaml)
+ object.hidden? if Feature.enabled?(:ban_user_feature_flag)
end
def escalation_status
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index feeedb0a501..8cdfc267693 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -21,7 +21,7 @@ module ApplicationHelper
def dispensable_render(...)
render(...)
rescue StandardError => error
- if Feature.enabled?(:dispensable_render, default_enabled: :yaml)
+ if Feature.enabled?(:dispensable_render)
Gitlab::ErrorTracking.track_and_raise_for_dev_exception(error)
nil
else
@@ -32,7 +32,7 @@ module ApplicationHelper
def dispensable_render_if_exists(...)
render_if_exists(...)
rescue StandardError => error
- if Feature.enabled?(:dispensable_render, default_enabled: :yaml)
+ if Feature.enabled?(:dispensable_render)
Gitlab::ErrorTracking.track_and_raise_for_dev_exception(error)
nil
else
diff --git a/app/helpers/broadcast_messages_helper.rb b/app/helpers/broadcast_messages_helper.rb
index b138e9aeb0c..10cfa97030d 100644
--- a/app/helpers/broadcast_messages_helper.rb
+++ b/app/helpers/broadcast_messages_helper.rb
@@ -73,7 +73,7 @@ module BroadcastMessagesHelper
private
def current_user_access_level_for_project_or_group
- return if Feature.disabled?(:role_targeted_broadcast_messages, default_enabled: :yaml)
+ return if Feature.disabled?(:role_targeted_broadcast_messages)
return unless current_user.present?
strong_memoize(:current_user_access_level_for_project_or_group) do
diff --git a/app/helpers/groups/group_members_helper.rb b/app/helpers/groups/group_members_helper.rb
index 80ab303357b..ca61c4da41c 100644
--- a/app/helpers/groups/group_members_helper.rb
+++ b/app/helpers/groups/group_members_helper.rb
@@ -53,7 +53,7 @@ module Groups::GroupMembersHelper
end
def group_group_links_list_data(group, include_relations, search)
- if ::Feature.enabled?(:group_member_inherited_group, group, default_enabled: :yaml)
+ if ::Feature.enabled?(:group_member_inherited_group, group)
group_links = group_group_links(group, include_relations)
group_links = group_links.search(search) if search
else
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index c8c9ea32184..6d17c8b5b42 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -63,7 +63,7 @@ module IssuesHelper
end
def issue_hidden?(issue)
- Feature.enabled?(:ban_user_feature_flag, default_enabled: :yaml) && issue.hidden?
+ Feature.enabled?(:ban_user_feature_flag) && issue.hidden?
end
def hidden_issue_icon(issue)
diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb
index 576b85fdeb1..f70afcc5791 100644
--- a/app/helpers/merge_requests_helper.rb
+++ b/app/helpers/merge_requests_helper.rb
@@ -211,6 +211,7 @@ module MergeRequestsHelper
is_fork: merge_request.for_fork?.to_s,
can_merge: merge_request.can_be_merged_by?(current_user).to_s,
source_branch: merge_request.source_branch,
+ source_project_path: merge_request.source_project&.path,
source_project_full_path: merge_request.source_project&.full_path,
source_project_default_url: merge_request.source_project && default_url_to_repo(merge_request.source_project),
target_branch: merge_request.target_branch,
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index 64254956e49..c3f22dc7693 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -379,7 +379,7 @@ module ProjectsHelper
end
def show_terraform_banner?(project)
- Feature.enabled?(:show_terraform_banner, type: :ops, default_enabled: true) && project.repository_languages.with_programming_language('HCL').exists? && project.terraform_states.empty?
+ Feature.enabled?(:show_terraform_banner, type: :ops) && project.repository_languages.with_programming_language('HCL').exists? && project.terraform_states.empty?
end
def project_permissions_panel_data(project)
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index bed74b938bd..0bbaca85ca8 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -443,7 +443,7 @@ module SearchHelper
return false unless can?(current_user, :read_users_list)
return true if @group
- Feature.enabled?(:global_search_users_tab, current_user, type: :ops, default_enabled: :yaml)
+ Feature.enabled?(:global_search_users_tab, current_user, type: :ops)
end
def issuable_state_to_badge_class(issuable)
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb
index 1247f9ae260..fd460d71867 100644
--- a/app/helpers/users_helper.rb
+++ b/app/helpers/users_helper.rb
@@ -125,7 +125,7 @@ module UsersHelper
end
def ban_feature_available?
- Feature.enabled?(:ban_user_feature_flag, default_enabled: :yaml)
+ Feature.enabled?(:ban_user_feature_flag)
end
def confirm_user_data(user)
diff --git a/app/models/broadcast_message.rb b/app/models/broadcast_message.rb
index b255c774347..1f921c71984 100644
--- a/app/models/broadcast_message.rb
+++ b/app/models/broadcast_message.rb
@@ -131,7 +131,7 @@ class BroadcastMessage < ApplicationRecord
end
def matches_current_user_access_level?(user_access_level)
- return false if target_access_levels.present? && Feature.disabled?(:role_targeted_broadcast_messages, default_enabled: :yaml)
+ return false if target_access_levels.present? && Feature.disabled?(:role_targeted_broadcast_messages)
return true unless target_access_levels.present?
target_access_levels.include? user_access_level
diff --git a/app/models/ci/bridge.rb b/app/models/ci/bridge.rb
index 42f3311d86d..a06b920342c 100644
--- a/app/models/ci/bridge.rb
+++ b/app/models/ci/bridge.rb
@@ -58,7 +58,7 @@ module Ci
end
def retryable?
- return false unless Feature.enabled?(:ci_recreate_downstream_pipeline, project, default_enabled: :yaml)
+ return false unless Feature.enabled?(:ci_recreate_downstream_pipeline, project)
return false if failed? && (pipeline_loop_detected? || reached_max_descendant_pipelines_depth?)
@@ -215,7 +215,7 @@ module Ci
end
def downstream_variables
- if ::Feature.enabled?(:ci_trigger_forward_variables, project, default_enabled: :yaml)
+ if ::Feature.enabled?(:ci_trigger_forward_variables, project)
calculate_downstream_variables
.reverse # variables priority
.uniq { |var| var[:key] } # only one variable key to pass
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 5cf367354ed..5622f228d83 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -326,7 +326,7 @@ module Ci
after_transition pending: :running do |build|
build.run_after_commit do
- if ::Feature.enabled?(:ci_reduce_persistent_ref_writes, build.project, default_enabled: :yaml)
+ if ::Feature.enabled?(:ci_reduce_persistent_ref_writes, build.project)
build.ensure_persistent_ref
else
build.pipeline.persistent_ref.create
@@ -340,7 +340,7 @@ module Ci
build.run_after_commit do
build.run_status_commit_hooks!
- if Feature.enabled?(:ci_build_finished_worker_namespace_changed, build.project, default_enabled: :yaml)
+ if Feature.enabled?(:ci_build_finished_worker_namespace_changed, build.project)
Ci::BuildFinishedWorker.perform_async(id)
else
::BuildFinishedWorker.perform_async(id)
@@ -509,7 +509,7 @@ module Ci
if metadata&.expanded_environment_name.present?
metadata.expanded_environment_name
else
- if ::Feature.enabled?(:ci_expand_environment_name_and_url, project, default_enabled: :yaml)
+ if ::Feature.enabled?(:ci_expand_environment_name_and_url, project)
ExpandVariables.expand(environment, -> { simple_variables.sort_and_expand_all })
else
ExpandVariables.expand(environment, -> { simple_variables })
@@ -1225,7 +1225,7 @@ module Ci
def job_jwt_variables
Gitlab::Ci::Variables::Collection.new.tap do |variables|
- break variables unless Feature.enabled?(:ci_job_jwt, project, default_enabled: true)
+ break variables unless Feature.enabled?(:ci_job_jwt, project)
jwt = Gitlab::Ci::Jwt.for_build(self)
jwt_v2 = Gitlab::Ci::JwtV2.for_build(self)
diff --git a/app/models/ci/pending_build.rb b/app/models/ci/pending_build.rb
index 41dc74ef050..d900a056242 100644
--- a/app/models/ci/pending_build.rb
+++ b/app/models/ci/pending_build.rb
@@ -31,7 +31,7 @@ module Ci
end
def maintain_denormalized_data?
- ::Feature.enabled?(:ci_pending_builds_maintain_denormalized_data, default_enabled: :yaml)
+ ::Feature.enabled?(:ci_pending_builds_maintain_denormalized_data)
end
private
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index 154f95d3692..dbf094229fe 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -253,7 +253,7 @@ module Ci
after_transition any => ::Ci::Pipeline.completed_statuses do |pipeline|
pipeline.run_after_commit do
- if ::Feature.disabled?(:ci_reduce_persistent_ref_writes, pipeline.project, default_enabled: :yaml)
+ if ::Feature.disabled?(:ci_reduce_persistent_ref_writes, pipeline.project)
pipeline.persistent_ref.delete
end
@@ -292,7 +292,7 @@ module Ci
after_transition any => ::Ci::Pipeline.stopped_statuses do |pipeline|
pipeline.run_after_commit do
- if ::Feature.enabled?(:ci_reduce_persistent_ref_writes, pipeline.project, default_enabled: :yaml)
+ if ::Feature.enabled?(:ci_reduce_persistent_ref_writes, pipeline.project)
pipeline.persistent_ref.delete
end
end
diff --git a/app/models/ci/runner.rb b/app/models/ci/runner.rb
index 328b0ee2e14..5f59dbba6b2 100644
--- a/app/models/ci/runner.rb
+++ b/app/models/ci/runner.rb
@@ -465,7 +465,7 @@ module Ci
end
def self.token_expiration_enforced?
- Feature.enabled?(:enforce_runner_token_expires_at, default_enabled: :yaml)
+ Feature.enabled?(:enforce_runner_token_expires_at)
end
private
diff --git a/app/models/clusters/instance.rb b/app/models/clusters/instance.rb
index ef120384adf..b5acc6a68f9 100644
--- a/app/models/clusters/instance.rb
+++ b/app/models/clusters/instance.rb
@@ -12,7 +12,7 @@ module Clusters
def certificate_based_clusters_enabled?
::Gitlab::SafeRequestStore.fetch("certificate_based_clusters:") do
- Feature.enabled?(:certificate_based_clusters, default_enabled: :yaml, type: :ops)
+ Feature.enabled?(:certificate_based_clusters, type: :ops)
end
end
end
diff --git a/app/models/concerns/cross_database_modification.rb b/app/models/concerns/cross_database_modification.rb
index 85645e482f6..dea62f03f91 100644
--- a/app/models/concerns/cross_database_modification.rb
+++ b/app/models/concerns/cross_database_modification.rb
@@ -103,7 +103,7 @@ module CrossDatabaseModification
def track_gitlab_schema_in_current_transaction?
return false unless Feature::FlipperFeature.table_exists?
- Feature.enabled?(:track_gitlab_schema_in_current_transaction, default_enabled: :yaml)
+ Feature.enabled?(:track_gitlab_schema_in_current_transaction)
rescue ActiveRecord::NoDatabaseError, PG::ConnectionBad
false
end
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb
index 8e029b8e5fb..713a4386fee 100644
--- a/app/models/concerns/issuable.rb
+++ b/app/models/concerns/issuable.rb
@@ -195,7 +195,7 @@ module Issuable
end
def supports_escalation?
- return false unless ::Feature.enabled?(:incident_escalations, project, default_enabled: :yaml)
+ return false unless ::Feature.enabled?(:incident_escalations, project)
incident?
end
diff --git a/app/models/concerns/limitable.rb b/app/models/concerns/limitable.rb
index fab1aa21634..6ff540b7866 100644
--- a/app/models/concerns/limitable.rb
+++ b/app/models/concerns/limitable.rb
@@ -28,8 +28,8 @@ module Limitable
def validate_scoped_plan_limit_not_exceeded
scope_relation = self.public_send(limit_scope) # rubocop:disable GitlabSecurity/PublicSend
return unless scope_relation
- return if limit_feature_flag && ::Feature.disabled?(limit_feature_flag, scope_relation, default_enabled: :yaml)
- return if limit_feature_flag_for_override && ::Feature.enabled?(limit_feature_flag_for_override, scope_relation, default_enabled: :yaml)
+ return if limit_feature_flag && ::Feature.disabled?(limit_feature_flag, scope_relation)
+ return if limit_feature_flag_for_override && ::Feature.enabled?(limit_feature_flag_for_override, scope_relation)
relation = limit_relation ? self.public_send(limit_relation) : self.class.where(limit_scope => scope_relation) # rubocop:disable GitlabSecurity/PublicSend
limits = scope_relation.actual_limits
diff --git a/app/models/concerns/routable.rb b/app/models/concerns/routable.rb
index 2cf95ac0dae..5b759dedb26 100644
--- a/app/models/concerns/routable.rb
+++ b/app/models/concerns/routable.rb
@@ -97,7 +97,7 @@ module Routable
def full_name
# We have to test for persistence as the cache key uses #updated_at
- return (route&.name || build_full_name) unless persisted? && Feature.enabled?(:cached_route_lookups, self, type: :ops, default_enabled: :yaml)
+ return (route&.name || build_full_name) unless persisted? && Feature.enabled?(:cached_route_lookups, self, type: :ops)
# Return the name as-is if the parent is missing
return name if route.nil? && parent.nil? && name.present?
@@ -115,7 +115,7 @@ module Routable
def full_path
# We have to test for persistence as the cache key uses #updated_at
- return (route&.path || build_full_path) unless persisted? && Feature.enabled?(:cached_route_lookups, self, type: :ops, default_enabled: :yaml)
+ return (route&.path || build_full_path) unless persisted? && Feature.enabled?(:cached_route_lookups, self, type: :ops)
# Return the path as-is if the parent is missing
return path if route.nil? && parent.nil? && path.present?
diff --git a/app/models/environment.rb b/app/models/environment.rb
index fea661ff119..9913438df1d 100644
--- a/app/models/environment.rb
+++ b/app/models/environment.rb
@@ -314,7 +314,7 @@ class Environment < ApplicationRecord
def stop_actions
strong_memoize(:stop_actions) do
- if ::Feature.enabled?(:environment_multiple_stop_actions, project, default_enabled: :yaml)
+ if ::Feature.enabled?(:environment_multiple_stop_actions, project)
# Fix N+1 queries it brings to the serializer.
# Tracked in https://gitlab.com/gitlab-org/gitlab/-/issues/358780
last_deployment_group.map(&:stop_action).compact
diff --git a/app/models/group.rb b/app/models/group.rb
index 990c06fdc41..86f4b14cb6c 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -146,7 +146,7 @@ class Group < Namespace
validates :group_feature, presence: true
add_authentication_token_field :runners_token,
- encrypted: -> { Feature.enabled?(:groups_tokens_optional_encryption, default_enabled: true) ? :optional : :required },
+ encrypted: -> { Feature.enabled?(:groups_tokens_optional_encryption) ? :optional : :required },
prefix: RunnersTokenPrefixable::RUNNERS_TOKEN_PREFIX
after_create :post_create_hook
@@ -870,7 +870,7 @@ class Group < Namespace
actors << self if root_ancestor != self
actors.any? do |actor|
- ::Feature.enabled?(feature_flag, actor, default_enabled: :yaml)
+ ::Feature.enabled?(feature_flag, actor)
end
end
diff --git a/app/models/integration.rb b/app/models/integration.rb
index c905788ac8b..b5064cfae2d 100644
--- a/app/models/integration.rb
+++ b/app/models/integration.rb
@@ -279,7 +279,7 @@ class Integration < ApplicationRecord
end
def self.dev_integration_names
- return [] unless Rails.env.development?
+ return [] unless Gitlab.dev_or_test_env?
DEV_INTEGRATION_NAMES
end
diff --git a/app/models/issue.rb b/app/models/issue.rb
index afdf5c38939..a1b4e733db3 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -147,7 +147,7 @@ class Issue < ApplicationRecord
scope :confidential_only, -> { where(confidential: true) }
scope :without_hidden, -> {
- if Feature.enabled?(:ban_user_feature_flag, default_enabled: :yaml)
+ if Feature.enabled?(:ban_user_feature_flag)
where('NOT EXISTS (?)', Users::BannedUser.select(1).where('issues.author_id = banned_users.user_id'))
else
all
diff --git a/app/models/loose_foreign_keys/deleted_record.rb b/app/models/loose_foreign_keys/deleted_record.rb
index ebda5872f1c..6dfd6ea2aae 100644
--- a/app/models/loose_foreign_keys/deleted_record.rb
+++ b/app/models/loose_foreign_keys/deleted_record.rb
@@ -10,7 +10,7 @@ class LooseForeignKeys::DeletedRecord < Gitlab::Database::SharedModel
partitioned_by :partition, strategy: :sliding_list,
next_partition_if: -> (active_partition) do
- return false if Feature.disabled?(:lfk_automatic_partition_creation, default_enabled: :yaml)
+ return false if Feature.disabled?(:lfk_automatic_partition_creation)
oldest_record_in_partition = LooseForeignKeys::DeletedRecord
.select(:id, :created_at)
@@ -22,7 +22,7 @@ class LooseForeignKeys::DeletedRecord < Gitlab::Database::SharedModel
oldest_record_in_partition.present? && oldest_record_in_partition.created_at < PARTITION_DURATION.ago
end,
detach_partition_if: -> (partition) do
- return false if Feature.disabled?(:lfk_automatic_partition_dropping, default_enabled: :yaml)
+ return false if Feature.disabled?(:lfk_automatic_partition_dropping)
!LooseForeignKeys::DeletedRecord
.for_partition(partition)
diff --git a/app/models/member.rb b/app/models/member.rb
index 14ba5b39d6f..a5084c8a60c 100644
--- a/app/models/member.rb
+++ b/app/models/member.rb
@@ -521,7 +521,7 @@ class Member < ApplicationRecord
end
def blocking_refresh
- return true unless Feature.enabled?(:allow_non_blocking_member_refresh, default_enabled: :yaml)
+ return true unless Feature.enabled?(:allow_non_blocking_member_refresh)
return true if @blocking_refresh.nil?
@blocking_refresh
diff --git a/app/models/members_preloader.rb b/app/models/members_preloader.rb
index 8b8eca54550..ba7e4b39989 100644
--- a/app/models/members_preloader.rb
+++ b/app/models/members_preloader.rb
@@ -13,7 +13,7 @@ class MembersPreloader
ActiveRecord::Associations::Preloader.new.preload(members, :created_by)
ActiveRecord::Associations::Preloader.new.preload(members, user: :status)
ActiveRecord::Associations::Preloader.new.preload(members, user: :u2f_registrations)
- ActiveRecord::Associations::Preloader.new.preload(members, user: :webauthn_registrations) if Feature.enabled?(:webauthn, default_enabled: :yaml)
+ ActiveRecord::Associations::Preloader.new.preload(members, user: :webauthn_registrations) if Feature.enabled?(:webauthn)
end
end
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 74095fad5e4..5adc5a656c8 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -1152,7 +1152,7 @@ class MergeRequest < ApplicationRecord
# rubocop: disable CodeReuse/ServiceClass
def mergeable_state?(skip_ci_check: false, skip_discussions_check: false)
- if Feature.enabled?(:improved_mergeability_checks, self.project, default_enabled: :yaml)
+ if Feature.enabled?(:improved_mergeability_checks, self.project)
additional_checks = MergeRequests::Mergeability::RunChecksService.new(
merge_request: self,
params: {
@@ -1457,7 +1457,7 @@ class MergeRequest < ApplicationRecord
end
def environments_in_head_pipeline(deployment_status: nil)
- if ::Feature.enabled?(:fix_related_environments_for_merge_requests, target_project, default_enabled: :yaml)
+ if ::Feature.enabled?(:fix_related_environments_for_merge_requests, target_project)
actual_head_pipeline&.environments_in_self_and_descendants(deployment_status: deployment_status) || Environment.none
else
legacy_environments
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 32f44c6cfcc..e8b6cf00d17 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -126,7 +126,7 @@ class Namespace < ApplicationRecord
before_destroy(prepend: true) { prepare_for_destroy }
after_destroy :rm_dir
after_commit :expire_child_caches, on: :update, if: -> {
- Feature.enabled?(:cached_route_lookups, self, type: :ops, default_enabled: :yaml) &&
+ Feature.enabled?(:cached_route_lookups, self, type: :ops) &&
saved_change_to_name? || saved_change_to_path? || saved_change_to_parent_id?
}
@@ -351,7 +351,7 @@ class Namespace < ApplicationRecord
# Includes projects from this namespace and projects from all subgroups
# that belongs to this namespace
def all_projects
- if Feature.enabled?(:recursive_approach_for_all_projects, default_enabled: :yaml)
+ if Feature.enabled?(:recursive_approach_for_all_projects)
namespace = user_namespace? ? self : self_and_descendant_ids
Project.where(namespace: namespace)
else
@@ -516,7 +516,7 @@ class Namespace < ApplicationRecord
end
def issue_repositioning_disabled?
- Feature.enabled?(:block_issue_repositioning, self, type: :ops, default_enabled: :yaml)
+ Feature.enabled?(:block_issue_repositioning, self, type: :ops)
end
def storage_enforcement_date
@@ -527,7 +527,7 @@ class Namespace < ApplicationRecord
def certificate_based_clusters_enabled?
::Gitlab::SafeRequestStore.fetch("certificate_based_clusters:ns:#{self.id}") do
- Feature.enabled?(:certificate_based_clusters, self, default_enabled: :yaml, type: :ops)
+ Feature.enabled?(:certificate_based_clusters, self, type: :ops)
end
end
@@ -644,7 +644,7 @@ class Namespace < ApplicationRecord
end
def cache_first_auto_devops_config?
- ::Feature.enabled?(:namespaces_cache_first_auto_devops_config, default_enabled: :yaml)
+ ::Feature.enabled?(:namespaces_cache_first_auto_devops_config)
end
def write_projects_repository_config
diff --git a/app/models/namespaces/traversal/linear.rb b/app/models/namespaces/traversal/linear.rb
index 6320e0bc39d..b0350b0288f 100644
--- a/app/models/namespaces/traversal/linear.rb
+++ b/app/models/namespaces/traversal/linear.rb
@@ -77,38 +77,38 @@ module Namespaces
end
def sync_traversal_ids?
- Feature.enabled?(:sync_traversal_ids, root_ancestor, default_enabled: :yaml)
+ Feature.enabled?(:sync_traversal_ids, root_ancestor)
end
def use_traversal_ids?
- return false unless Feature.enabled?(:use_traversal_ids, default_enabled: :yaml)
+ return false unless Feature.enabled?(:use_traversal_ids)
traversal_ids.present?
end
def use_traversal_ids_for_self_and_hierarchy?
return false unless use_traversal_ids?
- return false unless Feature.enabled?(:use_traversal_ids_for_self_and_hierarchy, root_ancestor, default_enabled: :yaml)
+ return false unless Feature.enabled?(:use_traversal_ids_for_self_and_hierarchy, root_ancestor)
traversal_ids.present?
end
def use_traversal_ids_for_ancestors?
return false unless use_traversal_ids?
- return false unless Feature.enabled?(:use_traversal_ids_for_ancestors, root_ancestor, default_enabled: :yaml)
+ return false unless Feature.enabled?(:use_traversal_ids_for_ancestors, root_ancestor)
traversal_ids.present?
end
def use_traversal_ids_for_ancestors_upto?
return false unless use_traversal_ids?
- return false unless Feature.enabled?(:use_traversal_ids_for_ancestors_upto, root_ancestor, default_enabled: :yaml)
+ return false unless Feature.enabled?(:use_traversal_ids_for_ancestors_upto, root_ancestor)
traversal_ids.present?
end
def use_traversal_ids_for_root_ancestor?
- return false unless Feature.enabled?(:use_traversal_ids_for_root_ancestor, default_enabled: :yaml)
+ return false unless Feature.enabled?(:use_traversal_ids_for_root_ancestor)
traversal_ids.present?
end
diff --git a/app/models/namespaces/traversal/linear_scopes.rb b/app/models/namespaces/traversal/linear_scopes.rb
index 0cac4c9143a..f0e9a8feeb2 100644
--- a/app/models/namespaces/traversal/linear_scopes.rb
+++ b/app/models/namespaces/traversal/linear_scopes.rb
@@ -55,7 +55,7 @@ module Namespaces
def self_and_descendants(include_self: true)
return super unless use_traversal_ids_for_descendants_scopes?
- if Feature.enabled?(:traversal_ids_btree, default_enabled: :yaml)
+ if Feature.enabled?(:traversal_ids_btree)
self_and_descendants_with_comparison_operators(include_self: include_self)
else
records = self_and_descendants_with_duplicates_with_array_operator(include_self: include_self)
@@ -67,7 +67,7 @@ module Namespaces
def self_and_descendant_ids(include_self: true)
return super unless use_traversal_ids_for_descendants_scopes?
- if Feature.enabled?(:traversal_ids_btree, default_enabled: :yaml)
+ if Feature.enabled?(:traversal_ids_btree)
self_and_descendants_with_comparison_operators(include_self: include_self).as_ids
else
self_and_descendants_with_duplicates_with_array_operator(include_self: include_self)
@@ -102,26 +102,26 @@ module Namespaces
private
def use_traversal_ids?
- Feature.enabled?(:use_traversal_ids, default_enabled: :yaml)
+ Feature.enabled?(:use_traversal_ids)
end
def use_traversal_ids_roots?
- Feature.enabled?(:use_traversal_ids_roots, default_enabled: :yaml) &&
+ Feature.enabled?(:use_traversal_ids_roots) &&
use_traversal_ids?
end
def use_traversal_ids_for_ancestor_scopes?
- Feature.enabled?(:use_traversal_ids_for_ancestor_scopes, default_enabled: :yaml) &&
+ Feature.enabled?(:use_traversal_ids_for_ancestor_scopes) &&
use_traversal_ids?
end
def use_traversal_ids_for_descendants_scopes?
- Feature.enabled?(:use_traversal_ids_for_descendants_scopes, default_enabled: :yaml) &&
+ Feature.enabled?(:use_traversal_ids_for_descendants_scopes) &&
use_traversal_ids?
end
def use_traversal_ids_for_self_and_hierarchy_scopes?
- Feature.enabled?(:use_traversal_ids_for_self_and_hierarchy_scopes, default_enabled: :yaml) &&
+ Feature.enabled?(:use_traversal_ids_for_self_and_hierarchy_scopes) &&
use_traversal_ids?
end
diff --git a/app/models/preloaders/group_root_ancestor_preloader.rb b/app/models/preloaders/group_root_ancestor_preloader.rb
index 3ca713d9635..29c60e90964 100644
--- a/app/models/preloaders/group_root_ancestor_preloader.rb
+++ b/app/models/preloaders/group_root_ancestor_preloader.rb
@@ -8,7 +8,7 @@ module Preloaders
end
def execute
- return unless ::Feature.enabled?(:use_traversal_ids, default_enabled: :yaml)
+ return unless ::Feature.enabled?(:use_traversal_ids)
# type == 'Group' condition located on subquery to prevent a filter in the query
root_query = Namespace.joins("INNER JOIN (#{join_sql}) as root_query ON root_query.root_id = namespaces.id")
diff --git a/app/models/preloaders/user_max_access_level_in_groups_preloader.rb b/app/models/preloaders/user_max_access_level_in_groups_preloader.rb
index 2cd54b975f3..8df986b47a2 100644
--- a/app/models/preloaders/user_max_access_level_in_groups_preloader.rb
+++ b/app/models/preloaders/user_max_access_level_in_groups_preloader.rb
@@ -10,7 +10,7 @@ module Preloaders
end
def execute
- if ::Feature.enabled?(:use_traversal_ids, default_enabled: :yaml)
+ if ::Feature.enabled?(:use_traversal_ids)
preload_with_traversal_ids
else
preload_direct_memberships
diff --git a/app/models/project.rb b/app/models/project.rb
index f1e2967fb0e..528f87972b3 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -113,7 +113,7 @@ class Project < ApplicationRecord
default_value_for(:ci_config_path) { Gitlab::CurrentSettings.default_ci_config_path }
add_authentication_token_field :runners_token,
- encrypted: -> { Feature.enabled?(:projects_tokens_optional_encryption, default_enabled: true) ? :optional : :required },
+ encrypted: -> { Feature.enabled?(:projects_tokens_optional_encryption) ? :optional : :required },
prefix: RunnersTokenPrefixable::RUNNERS_TOKEN_PREFIX
before_validation :mark_remote_mirrors_for_removal, if: -> { RemoteMirror.table_exists? }
@@ -965,7 +965,7 @@ class Project < ApplicationRecord
end
def ancestors(hierarchy_order: nil)
- if Feature.enabled?(:linear_project_ancestors, self, default_enabled: :yaml)
+ if Feature.enabled?(:linear_project_ancestors, self)
group&.self_and_ancestors(hierarchy_order: hierarchy_order) || Group.none
else
ancestors_upto(hierarchy_order: hierarchy_order)
@@ -1027,7 +1027,7 @@ class Project < ApplicationRecord
end
def unlink_forks_upon_visibility_decrease_enabled?
- Feature.enabled?(:unlink_fork_network_upon_visibility_decrease, self, default_enabled: true)
+ Feature.enabled?(:unlink_fork_network_upon_visibility_decrease, self)
end
# LFS and hashed repository storage are required for using Design Management.
@@ -2873,12 +2873,12 @@ class Project < ApplicationRecord
end
def work_items_feature_flag_enabled?
- group&.work_items_feature_flag_enabled? || Feature.enabled?(:work_items, self, default_enabled: :yaml)
+ group&.work_items_feature_flag_enabled? || Feature.enabled?(:work_items, self)
end
def enqueue_record_project_target_platforms
return unless Gitlab.com?
- return unless Feature.enabled?(:record_projects_target_platforms, self, default_enabled: :yaml)
+ return unless Feature.enabled?(:record_projects_target_platforms, self)
Projects::RecordTargetPlatformsWorker.perform_async(id)
end
diff --git a/app/models/project_ci_cd_setting.rb b/app/models/project_ci_cd_setting.rb
index 28a493cae33..fcb9700fdf8 100644
--- a/app/models/project_ci_cd_setting.rb
+++ b/app/models/project_ci_cd_setting.rb
@@ -22,7 +22,7 @@ class ProjectCiCdSetting < ApplicationRecord
chronic_duration_attr :runner_token_expiration_interval_human_readable, :runner_token_expiration_interval
def forward_deployment_enabled?
- super && ::Feature.enabled?(:forward_deployment_enabled, project, default_enabled: true)
+ super && ::Feature.enabled?(:forward_deployment_enabled, project)
end
def keep_latest_artifacts_available?
diff --git a/app/models/project_setting.rb b/app/models/project_setting.rb
index c6f9147cad7..e9fd7e4446c 100644
--- a/app/models/project_setting.rb
+++ b/app/models/project_setting.rb
@@ -21,7 +21,7 @@ class ProjectSetting < ApplicationRecord
validate :validates_mr_default_target_self
default_value_for(:legacy_open_source_license_available) do
- Feature.enabled?(:legacy_open_source_license_available, default_enabled: :yaml, type: :ops)
+ Feature.enabled?(:legacy_open_source_license_available, type: :ops)
end
def squash_enabled_by_default?
diff --git a/app/models/project_statistics.rb b/app/models/project_statistics.rb
index 7d7f9c2d5d6..95fc135f38f 100644
--- a/app/models/project_statistics.rb
+++ b/app/models/project_statistics.rb
@@ -77,7 +77,7 @@ class ProjectStatistics < ApplicationRecord
end
def update_container_registry_size
- return unless Feature.enabled?(:container_registry_project_statistics, project, default_enabled: :yaml)
+ return unless Feature.enabled?(:container_registry_project_statistics, project)
self.container_registry_size = project.container_repositories_size || 0
end
diff --git a/app/models/user.rb b/app/models/user.rb
index 0408cc2cb5d..d499a6074e0 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -941,7 +941,7 @@ class User < ApplicationRecord
end
def two_factor_u2f_enabled?
- return false if Feature.enabled?(:webauthn, default_enabled: :yaml)
+ return false if Feature.enabled?(:webauthn)
if u2f_registrations.loaded?
u2f_registrations.any?
@@ -955,7 +955,7 @@ class User < ApplicationRecord
end
def two_factor_webauthn_enabled?
- return false unless Feature.enabled?(:webauthn, default_enabled: :yaml)
+ return false unless Feature.enabled?(:webauthn)
(webauthn_registrations.loaded? && webauthn_registrations.any?) || (!webauthn_registrations.loaded? && webauthn_registrations.exists?)
end
@@ -1583,7 +1583,7 @@ class User < ApplicationRecord
end
def manageable_groups(include_groups_with_developer_maintainer_access: false)
- owned_and_maintainer_group_hierarchy = if Feature.enabled?(:linear_user_manageable_groups, self, default_enabled: :yaml)
+ owned_and_maintainer_group_hierarchy = if Feature.enabled?(:linear_user_manageable_groups, self)
owned_or_maintainers_groups.self_and_descendants
else
Gitlab::ObjectHierarchy.new(owned_or_maintainers_groups).base_and_descendants
@@ -1673,7 +1673,7 @@ class User < ApplicationRecord
def ci_owned_runners_cross_joins_fix_enabled?
strong_memoize(:ci_owned_runners_cross_joins_fix_enabled) do
- Feature.enabled?(:ci_owned_runners_cross_joins_fix, self, default_enabled: :yaml)
+ Feature.enabled?(:ci_owned_runners_cross_joins_fix, self)
end
end
@@ -1735,7 +1735,7 @@ class User < ApplicationRecord
end
def attention_requested_open_merge_requests_count(force: false)
- if Feature.enabled?(:uncached_mr_attention_requests_count, self, default_enabled: :yaml)
+ if Feature.enabled?(:uncached_mr_attention_requests_count, self)
MergeRequestsFinder.new(self, attention: self.username, state: 'opened', non_archived: true).execute.count
else
Rails.cache.fetch(attention_request_cache_key, force: force, expires_in: COUNT_CACHE_VALIDITY_PERIOD) do
@@ -2071,7 +2071,7 @@ class User < ApplicationRecord
end
def mr_attention_requests_enabled?
- Feature.enabled?(:mr_attention_requests, self, default_enabled: :yaml)
+ Feature.enabled?(:mr_attention_requests, self)
end
protected
@@ -2317,7 +2317,7 @@ class User < ApplicationRecord
# to avoid querying descendants since they are already covered
# by ancestor namespaces. If the FF is not available fallback to
# inefficient search: https://gitlab.com/gitlab-org/gitlab/-/issues/336436
- unless Feature.enabled?(:use_traversal_ids, default_enabled: :yaml)
+ unless Feature.enabled?(:use_traversal_ids)
return Ci::NamespaceMirror.contains_any_of_namespaces(search_members.pluck(:source_id))
end
@@ -2326,7 +2326,7 @@ class User < ApplicationRecord
.shortest_traversal_ids_prefixes
# Use efficient btree index to perform search
- if Feature.enabled?(:ci_owned_runners_unnest_index, self, default_enabled: :yaml)
+ if Feature.enabled?(:ci_owned_runners_unnest_index, self)
Ci::NamespaceMirror.contains_traversal_ids(traversal_ids)
else
Ci::NamespaceMirror.contains_any_of_namespaces(traversal_ids.map(&:last))
diff --git a/app/models/wiki.rb b/app/models/wiki.rb
index 78292c8e1fc..ca1266e50f4 100644
--- a/app/models/wiki.rb
+++ b/app/models/wiki.rb
@@ -227,7 +227,7 @@ class Wiki
end
def create_page(title, content, format = :markdown, message = nil)
- if Feature.enabled?(:gitaly_replace_wiki_create_page, container, type: :undefined, default_enabled: :yaml)
+ if Feature.enabled?(:gitaly_replace_wiki_create_page, container, type: :undefined)
with_valid_format(format) do |default_extension|
if file_exists_by_regex?(title)
raise_duplicate_page_error!
@@ -261,7 +261,7 @@ class Wiki
end
def update_page(page, content:, title: nil, format: :markdown, message: nil)
- if Feature.enabled?(:gitaly_replace_wiki_update_page, container, type: :undefined, default_enabled: :yaml)
+ if Feature.enabled?(:gitaly_replace_wiki_update_page, container, type: :undefined)
with_valid_format(format) do |default_extension|
title = title.presence || Pathname(page.path).sub_ext('').to_s
diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb
index eaefd7fcf8f..0094bc388a8 100644
--- a/app/policies/group_policy.rb
+++ b/app/policies/group_policy.rb
@@ -54,7 +54,7 @@ class GroupPolicy < Namespaces::GroupProjectNamespaceSharedPolicy
end
condition(:dependency_proxy_access_allowed) do
- if Feature.enabled?(:dependency_proxy_for_private_groups, default_enabled: true)
+ if Feature.enabled?(:dependency_proxy_for_private_groups)
access_level(for_any_session: true) >= GroupMember::GUEST || valid_dependency_proxy_deploy_token
else
can?(:read_group)
@@ -81,7 +81,7 @@ class GroupPolicy < Namespaces::GroupProjectNamespaceSharedPolicy
condition(:crm_enabled, score: 0, scope: :subject) { Feature.enabled?(:customer_relations, @subject) && @subject.crm_enabled? }
condition(:group_runner_registration_allowed) do
- Feature.disabled?(:runner_registration_control, default_enabled: :yaml) || Gitlab::CurrentSettings.valid_runner_registrars.include?('group')
+ Feature.disabled?(:runner_registration_control) || Gitlab::CurrentSettings.valid_runner_registrars.include?('group')
end
rule { can?(:read_group) & design_management_enabled }.policy do
diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb
index 54bceb58c94..60519dc346b 100644
--- a/app/policies/project_policy.rb
+++ b/app/policies/project_policy.rb
@@ -195,7 +195,7 @@ class ProjectPolicy < BasePolicy
end
condition(:project_runner_registration_allowed) do
- Feature.disabled?(:runner_registration_control, default_enabled: :yaml) || Gitlab::CurrentSettings.valid_runner_registrars.include?('project')
+ Feature.disabled?(:runner_registration_control) || Gitlab::CurrentSettings.valid_runner_registrars.include?('project')
end
# `:read_project` may be prevented in EE, but `:read_project_for_iids` should
diff --git a/app/presenters/user_presenter.rb b/app/presenters/user_presenter.rb
index dc775fb4160..26b8169d2b0 100644
--- a/app/presenters/user_presenter.rb
+++ b/app/presenters/user_presenter.rb
@@ -21,7 +21,7 @@ class UserPresenter < Gitlab::View::Presenter::Delegated
delegator_override :saved_replies
def saved_replies
- return ::Users::SavedReply.none unless Feature.enabled?(:saved_replies, current_user, default_enabled: :yaml)
+ return ::Users::SavedReply.none unless Feature.enabled?(:saved_replies, current_user)
return ::Users::SavedReply.none unless current_user.can?(:read_saved_replies, user)
user.saved_replies
diff --git a/app/services/bulk_imports/file_decompression_service.rb b/app/services/bulk_imports/file_decompression_service.rb
index b76746b199f..41616fc1c75 100644
--- a/app/services/bulk_imports/file_decompression_service.rb
+++ b/app/services/bulk_imports/file_decompression_service.rb
@@ -21,7 +21,7 @@ module BulkImports
def execute
validate_tmpdir
validate_filepath
- validate_decompressed_file_size if Feature.enabled?(:validate_import_decompressed_archive_size, default_enabled: :yaml)
+ validate_decompressed_file_size if Feature.enabled?(:validate_import_decompressed_archive_size)
validate_symlink(filepath)
decompress_file
diff --git a/app/services/ci/job_artifacts/destroy_batch_service.rb b/app/services/ci/job_artifacts/destroy_batch_service.rb
index 8a44d2b77e4..5121a8b0a8b 100644
--- a/app/services/ci/job_artifacts/destroy_batch_service.rb
+++ b/app/services/ci/job_artifacts/destroy_batch_service.rb
@@ -130,7 +130,7 @@ module Ci
end
def fix_expire_at?
- Feature.enabled?(:ci_detect_wrongly_expired_artifacts, default_enabled: :yaml)
+ Feature.enabled?(:ci_detect_wrongly_expired_artifacts)
end
def wrongly_expired?(artifact)
diff --git a/app/services/ci/pipeline_creation/start_pipeline_service.rb b/app/services/ci/pipeline_creation/start_pipeline_service.rb
index 89eb926bda9..bdbb021e4e8 100644
--- a/app/services/ci/pipeline_creation/start_pipeline_service.rb
+++ b/app/services/ci/pipeline_creation/start_pipeline_service.rb
@@ -13,7 +13,7 @@ module Ci
##
# Create a persistent ref for the pipeline.
# The pipeline ref is fetched in the jobs and deleted when the pipeline transitions to a finished state.
- if ::Feature.enabled?(:ci_reduce_persistent_ref_writes, pipeline.project, default_enabled: :yaml)
+ if ::Feature.enabled?(:ci_reduce_persistent_ref_writes, pipeline.project)
pipeline.ensure_persistent_ref
end
diff --git a/app/services/ci/queue/build_queue_service.rb b/app/services/ci/queue/build_queue_service.rb
index 9f476c8a785..fefbdb151ec 100644
--- a/app/services/ci/queue/build_queue_service.rb
+++ b/app/services/ci/queue/build_queue_service.rb
@@ -80,7 +80,7 @@ module Ci
def strategy
strong_memoize(:strategy) do
- if ::Feature.enabled?(:ci_pending_builds_queue_source, runner, default_enabled: :yaml)
+ if ::Feature.enabled?(:ci_pending_builds_queue_source, runner)
Queue::PendingBuildsStrategy.new(runner)
else
Queue::BuildsTableStrategy.new(runner)
diff --git a/app/services/ci/queue/builds_table_strategy.rb b/app/services/ci/queue/builds_table_strategy.rb
index 237dd510d50..c27c10bd18d 100644
--- a/app/services/ci/queue/builds_table_strategy.rb
+++ b/app/services/ci/queue/builds_table_strategy.rb
@@ -18,7 +18,7 @@ module Ci
.joins('LEFT JOIN project_features ON ci_builds.project_id = project_features.project_id')
.where('project_features.builds_access_level IS NULL or project_features.builds_access_level > 0')
- if Feature.enabled?(:ci_queueing_disaster_recovery_disable_fair_scheduling, runner, type: :ops, default_enabled: :yaml)
+ if Feature.enabled?(:ci_queueing_disaster_recovery_disable_fair_scheduling, runner, type: :ops)
# if disaster recovery is enabled, we fallback to FIFO scheduling
relation.order('ci_builds.id ASC')
else
diff --git a/app/services/ci/queue/pending_builds_strategy.rb b/app/services/ci/queue/pending_builds_strategy.rb
index 47158b8ea1d..f2eba0681db 100644
--- a/app/services/ci/queue/pending_builds_strategy.rb
+++ b/app/services/ci/queue/pending_builds_strategy.rb
@@ -51,7 +51,7 @@ module Ci
end
def use_denormalized_data_strategy?
- ::Feature.enabled?(:ci_queuing_use_denormalized_data_strategy, default_enabled: :yaml)
+ ::Feature.enabled?(:ci_queuing_use_denormalized_data_strategy)
end
private
@@ -70,7 +70,7 @@ module Ci
end
def builds_ordered_for_shared_runners(relation)
- if Feature.enabled?(:ci_queueing_disaster_recovery_disable_fair_scheduling, runner, type: :ops, default_enabled: :yaml)
+ if Feature.enabled?(:ci_queueing_disaster_recovery_disable_fair_scheduling, runner, type: :ops)
# if disaster recovery is enabled, we fallback to FIFO scheduling
relation.order('ci_pending_builds.build_id ASC')
else
diff --git a/app/services/ci/runners/register_runner_service.rb b/app/services/ci/runners/register_runner_service.rb
index 7978d094d9b..196d2de1a65 100644
--- a/app/services/ci/runners/register_runner_service.rb
+++ b/app/services/ci/runners/register_runner_service.rb
@@ -47,7 +47,7 @@ module Ci
end
def runner_registrar_valid?(type)
- Feature.disabled?(:runner_registration_control, default_enabled: :yaml) || Gitlab::CurrentSettings.valid_runner_registrars.include?(type)
+ Feature.disabled?(:runner_registration_control) || Gitlab::CurrentSettings.valid_runner_registrars.include?(type)
end
def token_scope
diff --git a/app/services/ci/stuck_builds/drop_running_service.rb b/app/services/ci/stuck_builds/drop_running_service.rb
index a79224cc231..dfcf3ca3836 100644
--- a/app/services/ci/stuck_builds/drop_running_service.rb
+++ b/app/services/ci/stuck_builds/drop_running_service.rb
@@ -16,7 +16,7 @@ module Ci
private
def running_timed_out_builds
- if Feature.enabled?(:ci_new_query_for_running_stuck_jobs, default_enabled: :yaml)
+ if Feature.enabled?(:ci_new_query_for_running_stuck_jobs)
Ci::Build
.running
.created_at_before(BUILD_RUNNING_OUTDATED_TIMEOUT.ago)
diff --git a/app/services/ci/update_build_state_service.rb b/app/services/ci/update_build_state_service.rb
index 9df36b86404..a74ddcfaf06 100644
--- a/app/services/ci/update_build_state_service.rb
+++ b/app/services/ci/update_build_state_service.rb
@@ -217,11 +217,11 @@ module Ci
def chunks_migration_enabled?
::Feature.enabled?(:ci_enable_live_trace, build.project) &&
- ::Feature.enabled?(:ci_accept_trace, build.project, type: :ops, default_enabled: true)
+ ::Feature.enabled?(:ci_accept_trace, build.project, type: :ops)
end
def log_invalid_chunks?
- ::Feature.enabled?(:ci_trace_log_invalid_chunks, build.project, type: :ops, default_enabled: false)
+ ::Feature.enabled?(:ci_trace_log_invalid_chunks, build.project, type: :ops)
end
end
end
diff --git a/app/services/deployments/update_environment_service.rb b/app/services/deployments/update_environment_service.rb
index b0ba8ecaa47..b0eb153a7af 100644
--- a/app/services/deployments/update_environment_service.rb
+++ b/app/services/deployments/update_environment_service.rb
@@ -58,7 +58,7 @@ module Deployments
def expanded_environment_url
return unless environment_url
- if ::Feature.enabled?(:ci_expand_environment_name_and_url, deployment.project, default_enabled: :yaml)
+ if ::Feature.enabled?(:ci_expand_environment_name_and_url, deployment.project)
ExpandVariables.expand(environment_url, -> { variables.sort_and_expand_all })
else
ExpandVariables.expand(environment_url, -> { variables })
diff --git a/app/services/environments/stop_service.rb b/app/services/environments/stop_service.rb
index 39a43b21405..5a0dca4e35b 100644
--- a/app/services/environments/stop_service.rb
+++ b/app/services/environments/stop_service.rb
@@ -19,8 +19,7 @@ module Environments
end
def execute_for_merge_request_pipeline(merge_request)
- if ::Feature.enabled?(:fix_related_environments_for_merge_requests, merge_request.target_project,
- default_enabled: :yaml)
+ if ::Feature.enabled?(:fix_related_environments_for_merge_requests, merge_request.target_project)
return unless merge_request.actual_head_pipeline&.merge_request?
end
diff --git a/app/services/event_create_service.rb b/app/services/event_create_service.rb
index 417680e37cf..5a2c29f8e7a 100644
--- a/app/services/event_create_service.rb
+++ b/app/services/event_create_service.rb
@@ -185,7 +185,7 @@ class EventCreateService
track_event(event_action: :pushed, event_target: Project, author_id: current_user.id)
namespace = project.namespace
- if Feature.enabled?(:route_hll_to_snowplow, namespace, default_enabled: :yaml)
+ if Feature.enabled?(:route_hll_to_snowplow, namespace)
Gitlab::Tracking.event(self.class.to_s, 'action_active_users_project_repo', namespace: namespace, user: current_user, project: project)
end
diff --git a/app/services/groups/import_export/export_service.rb b/app/services/groups/import_export/export_service.rb
index ea26ebec20b..2bfd5a5ebab 100644
--- a/app/services/groups/import_export/export_service.rb
+++ b/app/services/groups/import_export/export_service.rb
@@ -78,7 +78,7 @@ module Groups
end
def ndjson?
- ::Feature.enabled?(:group_export_ndjson, group&.parent, default_enabled: :yaml)
+ ::Feature.enabled?(:group_export_ndjson, group&.parent)
end
def version_saver
diff --git a/app/services/groups/import_export/import_service.rb b/app/services/groups/import_export/import_service.rb
index c8c2124078d..f026f1698a9 100644
--- a/app/services/groups/import_export/import_service.rb
+++ b/app/services/groups/import_export/import_service.rb
@@ -72,7 +72,7 @@ module Groups
end
def ndjson?
- ::Feature.enabled?(:group_import_ndjson, group&.parent, default_enabled: true) &&
+ ::Feature.enabled?(:group_import_ndjson, group&.parent) &&
File.exist?(File.join(shared.export_path, 'tree/groups/_all.ndjson'))
end
diff --git a/app/services/import/gitlab_projects/file_acquisition_strategies/remote_file.rb b/app/services/import/gitlab_projects/file_acquisition_strategies/remote_file.rb
index ae9a450660c..ac58711a0ac 100644
--- a/app/services/import/gitlab_projects/file_acquisition_strategies/remote_file.rb
+++ b/app/services/import/gitlab_projects/file_acquisition_strategies/remote_file.rb
@@ -58,7 +58,7 @@ module Import
end
def validate_aws_s3?
- ::Feature.enabled?(:import_project_from_remote_file_s3, default_enabled: :yaml)
+ ::Feature.enabled?(:import_project_from_remote_file_s3)
end
def headers
diff --git a/app/services/merge_requests/mergeability/run_checks_service.rb b/app/services/merge_requests/mergeability/run_checks_service.rb
index 03c6d985c23..fd6907c976b 100644
--- a/app/services/merge_requests/mergeability/run_checks_service.rb
+++ b/app/services/merge_requests/mergeability/run_checks_service.rb
@@ -37,7 +37,7 @@ module MergeRequests
attr_reader :merge_request, :params
def run_check(check)
- return check.execute unless Feature.enabled?(:mergeability_caching, merge_request.project, default_enabled: :yaml)
+ return check.execute unless Feature.enabled?(:mergeability_caching, merge_request.project)
return check.execute unless check.cacheable?
cached_result = results.read(merge_check: check)
diff --git a/app/services/projects/branches_by_mode_service.rb b/app/services/projects/branches_by_mode_service.rb
index 090671cc79a..0248f997a03 100644
--- a/app/services/projects/branches_by_mode_service.rb
+++ b/app/services/projects/branches_by_mode_service.rb
@@ -37,7 +37,7 @@ class Projects::BranchesByModeService
def use_gitaly_pagination?
return false if params[:page].present? || params[:search].present?
- Feature.enabled?(:branch_list_keyset_pagination, project, default_enabled: :yaml)
+ Feature.enabled?(:branch_list_keyset_pagination, project)
end
def fetch_branches_via_offset_pagination
diff --git a/app/services/projects/lfs_pointers/lfs_download_service.rb b/app/services/projects/lfs_pointers/lfs_download_service.rb
index 76005a1c96e..c032fbf1508 100644
--- a/app/services/projects/lfs_pointers/lfs_download_service.rb
+++ b/app/services/projects/lfs_pointers/lfs_download_service.rb
@@ -23,7 +23,7 @@ module Projects
def execute
return unless project&.lfs_enabled? && lfs_download_object
return error("LFS file with oid #{lfs_oid} has invalid attributes") unless lfs_download_object.valid?
- return link_existing_lfs_object! if Feature.enabled?(:lfs_link_existing_object, project, default_enabled: :yaml) && lfs_size > LARGE_FILE_SIZE && lfs_object
+ return link_existing_lfs_object! if Feature.enabled?(:lfs_link_existing_object, project) && lfs_size > LARGE_FILE_SIZE && lfs_object
wrap_download_errors do
download_lfs_file!
diff --git a/app/services/projects/overwrite_project_service.rb b/app/services/projects/overwrite_project_service.rb
index eea8f867b45..d3fed43363c 100644
--- a/app/services/projects/overwrite_project_service.rb
+++ b/app/services/projects/overwrite_project_service.rb
@@ -41,7 +41,7 @@ module Projects
private
def track_service(start_time, source_project, exception)
- return if ::Feature.disabled?(:project_overwrite_service_tracking, source_project, default_enabled: :yaml)
+ return if ::Feature.disabled?(:project_overwrite_service_tracking, source_project)
duration = ::Gitlab::Metrics::System.monotonic_time - start_time
diff --git a/app/services/projects/update_remote_mirror_service.rb b/app/services/projects/update_remote_mirror_service.rb
index f3ea0967a99..705d23ec704 100644
--- a/app/services/projects/update_remote_mirror_service.rb
+++ b/app/services/projects/update_remote_mirror_service.rb
@@ -65,7 +65,7 @@ module Projects
message += "Error synchronizing LFS files:"
message += "\n\n#{lfs_status[:message]}\n\n"
- failed = Feature.enabled?(:remote_mirror_fail_on_lfs, project, default_enabled: :yaml)
+ failed = Feature.enabled?(:remote_mirror_fail_on_lfs, project)
end
if response.divergent_refs.any?
diff --git a/app/services/service_ping/submit_service.rb b/app/services/service_ping/submit_service.rb
index d1afabe6d92..909c4e860e9 100644
--- a/app/services/service_ping/submit_service.rb
+++ b/app/services/service_ping/submit_service.rb
@@ -50,7 +50,7 @@ module ServicePing
DevopsReportService.new(response).execute
end
- return unless Feature.enabled?(:measure_service_ping_metric_collection, default_enabled: :yaml)
+ return unless Feature.enabled?(:measure_service_ping_metric_collection)
submit_payload({ metadata: { metrics: metrics_collection_time(usage_data) } }, path: METADATA_PATH)
end
diff --git a/app/services/users/destroy_service.rb b/app/services/users/destroy_service.rb
index 1ea65049dc2..5dcdfdc604d 100644
--- a/app/services/users/destroy_service.rb
+++ b/app/services/users/destroy_service.rb
@@ -64,7 +64,7 @@ module Users
# This ensures we delete records in batches.
user.destroy_dependent_associations_in_batches(exclude: [:snippets])
- if Feature.enabled?(:nullify_in_batches_on_user_deletion, default_enabled: :yaml)
+ if Feature.enabled?(:nullify_in_batches_on_user_deletion)
user.nullify_dependent_associations_in_batches
end
diff --git a/app/views/admin/application_settings/ci_cd.html.haml b/app/views/admin/application_settings/ci_cd.html.haml
index aab4f44d4d7..c7fc5f59d73 100644
--- a/app/views/admin/application_settings/ci_cd.html.haml
+++ b/app/views/admin/application_settings/ci_cd.html.haml
@@ -38,7 +38,7 @@
.settings-content
= render 'registry'
-- if Feature.enabled?(:runner_registration_control, default_enabled: :yaml)
+- if Feature.enabled?(:runner_registration_control)
%section.settings.as-runner.no-animate#js-runner-settings{ class: ('expanded' if expanded_by_default?) }
.settings-header
%h4
diff --git a/app/views/admin/application_settings/metrics_and_profiling.html.haml b/app/views/admin/application_settings/metrics_and_profiling.html.haml
index 346be6ef44c..8e4b0b53f28 100644
--- a/app/views/admin/application_settings/metrics_and_profiling.html.haml
+++ b/app/views/admin/application_settings/metrics_and_profiling.html.haml
@@ -53,7 +53,7 @@
.settings-content
= render 'usage'
-- if Feature.enabled?(:configure_sentry_in_application_settings, default_enabled: :yaml)
+- if Feature.enabled?(:configure_sentry_in_application_settings)
%section.settings.as-sentry.no-animate#js-sentry-settings{ class: ('expanded' if expanded_by_default?), data: { qa_selector: 'sentry_settings_content' } }
.settings-header
%h4
diff --git a/app/views/admin/broadcast_messages/_form.html.haml b/app/views/admin/broadcast_messages/_form.html.haml
index 4102918931f..dfd3b87c674 100644
--- a/app/views/admin/broadcast_messages/_form.html.haml
+++ b/app/views/admin/broadcast_messages/_form.html.haml
@@ -29,7 +29,7 @@
= f.label :starts_at, _("Dismissable")
.col-sm-10
= f.gitlab_ui_checkbox_component :dismissable, _('Allow users to dismiss the broadcast message')
- - if Feature.enabled?(:role_targeted_broadcast_messages, default_enabled: :yaml)
+ - if Feature.enabled?(:role_targeted_broadcast_messages)
.form-group.row
.col-sm-2.col-form-label
= f.label :target_access_levels, _('Target roles')
diff --git a/app/views/admin/broadcast_messages/index.html.haml b/app/views/admin/broadcast_messages/index.html.haml
index 54c2a9d5250..8b657eda0c0 100644
--- a/app/views/admin/broadcast_messages/index.html.haml
+++ b/app/views/admin/broadcast_messages/index.html.haml
@@ -1,6 +1,6 @@
- breadcrumb_title _("Messages")
- page_title _("Broadcast Messages")
-- targeted_broadcast_messages_enabled = Feature.enabled?(:role_targeted_broadcast_messages, default_enabled: :yaml)
+- targeted_broadcast_messages_enabled = Feature.enabled?(:role_targeted_broadcast_messages)
%h3.page-title
= _('Broadcast Messages')
diff --git a/app/views/clusters/clusters/show.html.haml b/app/views/clusters/clusters/show.html.haml
index fb46b4e5064..58e0ef96333 100644
--- a/app/views/clusters/clusters/show.html.haml
+++ b/app/views/clusters/clusters/show.html.haml
@@ -28,14 +28,6 @@
= render 'banner'
- .gl-alert.gl-alert-warning{ role: 'alert' }
- = sprite_icon('warning', css_class: "gl-alert-icon gl-alert-icon-no-title gl-icon")
- %button.js-close.gl-alert-dismiss{ type: 'button', 'aria-label' => _('Dismiss'), data: { testid: 'dismiss-one-click-application-removal' } }
- = sprite_icon('close', css_class: 'gl-icon')
- .gl-alert-body
- = s_('ClusterApplicationsRemoved|One-click application management was removed in GitLab 14.0. Your applications are still installed in your cluster, and integrations continue working.')
- = link_to _('More information.'), help_page_path("user/clusters/applications"), target: '_blank', rel: 'noopener noreferrer'
-
- if cluster_created?(@cluster)
.js-toggle-container
= gl_tabs_nav do
diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml
index 1d711f366c4..4f6ddf10984 100644
--- a/app/views/dashboard/todos/index.html.haml
+++ b/app/views/dashboard/todos/index.html.haml
@@ -70,6 +70,8 @@
= sort_title_recently_created
= link_to todos_filter_path(sort: sort_value_oldest_created) do
= sort_title_oldest_created
+ = link_to todos_filter_path(sort: sort_value_recently_updated) do
+ = sort_title_recently_updated
.row.js-todos-all
- if @allowed_todos.any?
diff --git a/app/views/groups/dependency_proxies/show.html.haml b/app/views/groups/dependency_proxies/show.html.haml
index 940a504438d..5b782c9f351 100644
--- a/app/views/groups/dependency_proxies/show.html.haml
+++ b/app/views/groups/dependency_proxies/show.html.haml
@@ -1,6 +1,6 @@
- page_title _("Dependency Proxy")
- @content_class = "limit-container-width" unless fluid_layout
-- dependency_proxy_available = Feature.enabled?(:dependency_proxy_for_private_groups, default_enabled: true) || @group.public?
+- dependency_proxy_available = Feature.enabled?(:dependency_proxy_for_private_groups) || @group.public?
#js-dependency-proxy{ data: { group_path: @group.full_path,
dependency_proxy_available: dependency_proxy_available.to_s,
diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml
index 8afa6316c56..209faa937dc 100644
--- a/app/views/groups/issues.html.haml
+++ b/app/views/groups/issues.html.haml
@@ -5,7 +5,7 @@
= content_for :meta_tags do
= auto_discovery_link_tag(:atom, safe_params.merge(rss_url_options).to_h, title: "#{@group.name} issues")
-- if Feature.enabled?(:vue_issues_list, @group, default_enabled: :yaml)
+- if Feature.enabled?(:vue_issues_list, @group)
.js-issues-list{ data: group_issues_list_data(@group, current_user) }
- if @can_bulk_update
= render_if_exists 'shared/issuable/group_bulk_update_sidebar', group: @group, type: :issues
diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml
index 750030601b7..58a78a8adc1 100644
--- a/app/views/groups/new.html.haml
+++ b/app/views/groups/new.html.haml
@@ -15,7 +15,7 @@
#import-group-pane.tab-pane
- if import_sources_enabled?
- - if Feature.enabled?(:bulk_import, default_enabled: :yaml)
+ - if Feature.enabled?(:bulk_import)
= render 'import_group_from_another_instance_panel'
.gl-mt-7.gl-border-b-solid.gl-border-gray-100.gl-border-1
= render 'import_group_from_file_panel'
diff --git a/app/views/groups/settings/packages_and_registries/show.html.haml b/app/views/groups/settings/packages_and_registries/show.html.haml
index 78ce981eb07..e482b87bade 100644
--- a/app/views/groups/settings/packages_and_registries/show.html.haml
+++ b/app/views/groups/settings/packages_and_registries/show.html.haml
@@ -1,7 +1,7 @@
- breadcrumb_title _('Packages & Registries')
- page_title _('Packages & Registries')
- @content_class = 'limit-container-width' unless fluid_layout
-- dependency_proxy_available = Feature.enabled?(:dependency_proxy_for_private_groups, default_enabled: true) || @group.public?
+- dependency_proxy_available = Feature.enabled?(:dependency_proxy_for_private_groups) || @group.public?
%section#js-packages-and-registries-settings{ data: { default_expanded: expanded_by_default?.to_s,
group_path: @group.full_path,
diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml
index 3d62683da43..c1154faae44 100644
--- a/app/views/layouts/header/_default.html.haml
+++ b/app/views/layouts/header/_default.html.haml
@@ -39,7 +39,7 @@
- search_menu_item = top_nav_search_menu_item_attrs
%li.nav-item.header-search-new.d-none.d-lg-block.m-auto
- unless current_controller?(:search)
- - if Feature.enabled?(:new_header_search, default_enabled: :yaml)
+ - if Feature.enabled?(:new_header_search)
= render 'layouts/header_search'
- else
= render 'layouts/search'
diff --git a/app/views/profiles/_email_settings.html.haml b/app/views/profiles/_email_settings.html.haml
index 1057e96f442..35cad79b6fd 100644
--- a/app/views/profiles/_email_settings.html.haml
+++ b/app/views/profiles/_email_settings.html.haml
@@ -5,15 +5,34 @@
- help_text = email_change_disabled ? s_("Your account uses dedicated credentials for the \"%{group_name}\" group and can only be updated through SSO.") % { group_name: @user.managing_group.name } : read_only_help_text
- password_automatically_set = @user.password_automatically_set?
-= form.text_field :email, required: true, class: 'input-lg gl-form-input', value: (@user.email unless @user.temp_oauth_email?), help: help_text.html_safe, readonly: readonly || email_change_disabled
-- unless password_automatically_set
- = hidden_field_tag 'user[validation_password]', :validation_password, class: 'js-password-prompt-field', help: s_("Profiles|Enter your password to confirm the email change")
-= form.select :public_email, options_for_select(@user.public_verified_emails, selected: @user.public_email),
- { help: s_("Profiles|This email will be displayed on your public profile"), include_blank: s_("Profiles|Do not show on profile") },
- control_class: 'select2 input-lg', disabled: email_change_disabled
-- commit_email_link_url = help_page_path('user/profile/index', anchor: 'change-the-email-displayed-on-your-commits', target: '_blank')
-- commit_email_link_start = '<a href="%{url}">'.html_safe % { url: commit_email_link_url }
-- commit_email_docs_link = s_('Profiles|This email will be used for web based operations, such as edits and merges. %{commit_email_link_start}Learn more%{commit_email_link_end}').html_safe % { commit_email_link_start: commit_email_link_start, commit_email_link_end: '</a>'.html_safe }
-= form.select :commit_email, options_for_select(commit_email_select_options(@user), selected: @user.commit_email),
- { help: commit_email_docs_link },
- control_class: 'select2 input-lg', disabled: email_change_disabled
+.form-group.gl-form-group
+ = form.label :email, _('Email')
+ = form.text_field :email, required: true, class: 'gl-form-input form-control gl-form-input-lg', value: (@user.email unless @user.temp_oauth_email?), readonly: readonly || email_change_disabled
+ %small.form-text.text-gl-muted
+ = help_text.html_safe
+
+ - unless password_automatically_set
+ = hidden_field_tag 'user[validation_password]', :validation_password, class: 'js-password-prompt-field', help: s_("Profiles|Enter your password to confirm the email change")
+
+.form-group.gl-form-group
+ = form.label :public_email, s_('Profiles|Public email')
+ .gl-form-input-lg
+ = form.select :public_email,
+ options_for_select(@user.public_verified_emails, selected: @user.public_email),
+ { include_blank: s_("Profiles|Do not show on profile") },
+ { class: 'gl-form-select custom-select', disabled: email_change_disabled }
+ %small.form-text.text-gl-muted
+ = s_("Profiles|This email will be displayed on your public profile")
+
+.form-group.gl-form-group
+ - commit_email_link_url = help_page_path('user/profile/index', anchor: 'change-the-email-displayed-on-your-commits', target: '_blank')
+ - commit_email_link_start = '<a href="%{url}">'.html_safe % { url: commit_email_link_url }
+ - commit_email_docs_link = s_('Profiles|This email will be used for web based operations, such as edits and merges. %{commit_email_link_start}Learn more%{commit_email_link_end}').html_safe % { commit_email_link_start: commit_email_link_start, commit_email_link_end: '</a>'.html_safe }
+ = form.label :commit_email, s_('Profiles|Commit email')
+ .gl-form-input-lg
+ = form.select :commit_email,
+ options_for_select(commit_email_select_options(@user), selected: @user.commit_email),
+ {},
+ { class: 'gl-form-select custom-select', disabled: email_change_disabled }
+ %small.form-text.text-gl-muted
+ = commit_email_docs_link
diff --git a/app/views/profiles/_name.html.haml b/app/views/profiles/_name.html.haml
index aea38bf4c3b..5af4fe24d62 100644
--- a/app/views/profiles/_name.html.haml
+++ b/app/views/profiles/_name.html.haml
@@ -1,5 +1,9 @@
+= form.label :name, s_('Profiles|Full name')
- if user.read_only_attribute?(:name)
- = form.text_field :name, class: 'gl-form-input', required: true, readonly: true, wrapper: { class: 'col-md-9 qa-full-name rspec-full-name' },
- help: s_("Profiles|Your name was automatically set based on your %{provider_label} account, so people you know can recognize you") % { provider_label: attribute_provider_label(:name) }
+ = form.text_field :name, class: 'gl-form-input form-control', required: true, readonly: true
+ %small.form-text.text-gl-muted
+ = s_("Profiles|Your name was automatically set based on your %{provider_label} account, so people you know can recognize you") % { provider_label: attribute_provider_label(:name) }
- else
- = form.text_field :name, class: 'gl-form-input', label: s_('Profiles|Full name'), required: true, title: s_("Profiles|Using emojis in names seems fun, but please try to set a status message instead"), wrapper: { class: 'col-md-9 qa-full-name rspec-full-name' }, help: s_("Profiles|Enter your name, so people you know can recognize you")
+ = form.text_field :name, class: 'gl-form-input form-control', required: true, title: s_("Profiles|Using emojis in names seems fun, but please try to set a status message instead")
+ %small.form-text.text-gl-muted
+ = s_("Profiles|Enter your name, so people you know can recognize you")
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml
index 531e72b7cc2..107c7cebc61 100644
--- a/app/views/profiles/show.html.haml
+++ b/app/views/profiles/show.html.haml
@@ -5,7 +5,7 @@
- availability = availability_values
- custom_emoji = show_status_emoji?(@user.status)
-= bootstrap_form_for @user, url: profile_path, method: :put, html: { multipart: true, class: 'edit-user gl-mt-3 js-quick-submit gl-show-field-errors js-password-prompt-form', remote: true }, authenticity_token: true do |f|
+= gitlab_ui_form_for @user, url: profile_path, method: :put, html: { multipart: true, class: 'edit-user gl-mt-3 js-quick-submit gl-show-field-errors js-password-prompt-form', remote: true }, authenticity_token: true do |f|
= form_errors(@user)
.row.js-search-settings-section
@@ -34,7 +34,7 @@
.gl-my-3
%button.gl-button.btn.btn-default.js-choose-user-avatar-button{ type: 'button' }= s_("Profiles|Choose file...")
%span.avatar-file-name.gl-ml-3.js-avatar-filename= s_("Profiles|No file chosen.")
- = f.file_field_without_bootstrap :avatar, class: 'js-user-avatar-input hidden', accept: 'image/*'
+ = f.file_field :avatar, class: 'js-user-avatar-input hidden', accept: 'image/*'
.gl-text-gray-500= s_("Profiles|The maximum file size allowed is 200KB.")
- if @user.avatar?
= link_to s_("Profiles|Remove avatar"), profile_avatar_path, data: { confirm: s_("Profiles|Avatar will be removed. Are you sure?") }, method: :delete, class: 'gl-button btn btn-danger-secondary btn-sm gl-mt-5'
@@ -62,16 +62,24 @@
= sprite_icon("close")
= status_form.hidden_field :emoji, id: 'js-status-emoji-field'
- = status_form.text_field :message,
- id: 'js-status-message-field',
- class: 'form-control gl-form-input input-lg',
- label: s_("Profiles|Your status"),
- prepend: emoji_button,
- append: reset_message_button,
- placeholder: s_("Profiles|What's your status?")
- .checkbox-icon-inline-wrapper
- = status_form.check_box :availability, { data: { testid: "user-availability-checkbox" }, label: s_("Profiles|Busy"), wrapper_class: 'gl-mr-0 gl-font-weight-bold' }, availability["busy"], availability["not_set"]
- .gl-text-gray-600.gl-ml-5= s_('Profiles|An indicator appears next to your name and avatar')
+ .form-group.gl-form-group
+ = status_form.label :message, s_("Profiles|Your status")
+ .input-group{ role: 'group' }
+ .input-group-prepend
+ = emoji_button
+ = status_form.text_field :message,
+ id: 'js-status-message-field',
+ class: 'form-control gl-form-input input-lg',
+ placeholder: s_("Profiles|What's your status?")
+ .input-group-append
+ = reset_message_button
+ .form-group.gl-form-group
+ = status_form.gitlab_ui_checkbox_component :availability,
+ s_("Profiles|Busy"),
+ help_text: s_('Profiles|An indicator appears next to your name and avatar'),
+ checkbox_options: { data: { testid: "user-availability-checkbox" } },
+ checked_value: availability["busy"],
+ unchecked_value: availability["not_set"]
.col-lg-12
%hr
.row.user-time-preferences.js-search-settings-section
@@ -94,35 +102,71 @@
= s_("Profiles|Some options are unavailable for LDAP accounts")
.col-lg-8
.row
- = render 'profiles/name', form: f, user: @user
- = f.text_field :id, class: 'gl-form-input', readonly: true, label: s_('Profiles|User ID'), wrapper: { class: 'col-md-3' }
-
- = f.text_field :pronouns, label: s_('Profiles|Pronouns'), class: 'input-md gl-form-input', help: s_("Profiles|Enter your pronouns to let people know how to refer to you")
- = f.text_field :pronunciation, label: s_('Profiles|Pronunciation'), class: 'input-md gl-form-input', help: s_("Profiles|Enter how your name is pronounced to help people address you correctly")
+ .form-group.gl-form-group.col-md-9.rspec-full-name
+ = render 'profiles/name', form: f, user: @user
+ .form-group.gl-form-group.col-md-3
+ = f.label :id, s_('Profiles|User ID')
+ = f.text_field :id, class: 'gl-form-input form-control', readonly: true
+ .form-group.gl-form-group
+ = f.label :pronouns, s_('Profiles|Pronouns')
+ = f.text_field :pronouns, class: 'gl-form-input form-control gl-form-input-lg'
+ %small.form-text.text-gl-muted
+ = s_("Profiles|Enter your pronouns to let people know how to refer to you")
+ .form-group.gl-form-group
+ = f.label :pronunciation, s_('Profiles|Pronunciation')
+ = f.text_field :pronunciation, class: 'gl-form-input form-control gl-form-input-lg'
+ %small.form-text.text-gl-muted
+ = s_("Profiles|Enter how your name is pronounced to help people address you correctly")
= render_if_exists 'profiles/extra_settings', form: f
= render_if_exists 'profiles/email_settings', form: f
- = f.text_field :skype, class: 'input-md gl-form-input', placeholder: s_("Profiles|username")
- = f.text_field :linkedin, class: 'input-md gl-form-input', help: s_("Profiles|Your LinkedIn profile name from linkedin.com/in/profilename")
- = f.text_field :twitter, class: 'input-md gl-form-input', placeholder: s_("Profiles|@username")
- = f.text_field :website_url, label: s_('Profiles|Website url'), class: 'input-lg gl-form-input', placeholder: s_("Profiles|https://website.com")
- - if @user.read_only_attribute?(:location)
- = f.text_field :location, class: 'gl-form-input', readonly: true, help: s_("Profiles|Your location was automatically set based on your %{provider_label} account") % { provider_label: attribute_provider_label(:location) }
- - else
- = f.text_field :location, label: s_('Profiles|Location'), class: 'input-lg gl-form-input', placeholder: s_("Profiles|City, country")
- = f.text_field :job_title, label: s_('Profiles|Job title'), class: 'input-md gl-form-input'
- = f.text_field :organization, label: s_('Profiles|Organization'), class: 'input-md gl-form-input', help: s_("Profiles|Who you represent or work for")
- = f.text_area :bio, class: 'gl-form-input', label: s_('Profiles|Bio'), rows: 4, maxlength: 250, help: s_("Profiles|Tell us about yourself in fewer than 250 characters")
+ .form-group.gl-form-group
+ = f.label :skype
+ = f.text_field :skype, class: 'gl-form-input form-control gl-form-input-lg', placeholder: s_("Profiles|username")
+ .form-group.gl-form-group
+ = f.label :linkedin
+ = f.text_field :linkedin, class: 'gl-form-input form-control gl-form-input-lg'
+ %small.form-text.text-gl-muted
+ = s_("Profiles|Your LinkedIn profile name from linkedin.com/in/profilename")
+ .form-group.gl-form-group
+ = f.label :twitter
+ = f.text_field :twitter, class: 'gl-form-input form-control gl-form-input-lg', placeholder: s_("Profiles|@username")
+ .form-group.gl-form-group
+ = f.label :website_url, s_('Profiles|Website url')
+ = f.text_field :website_url, class: 'gl-form-input form-control gl-form-input-lg', placeholder: s_("Profiles|https://website.com")
+ .form-group.gl-form-group
+ = f.label :location, s_('Profiles|Location')
+ - if @user.read_only_attribute?(:location)
+ = f.text_field :location, class: 'gl-form-input form-control gl-form-input-lg', readonly: true
+ %small.form-text.text-gl-muted
+ = s_("Profiles|Your location was automatically set based on your %{provider_label} account") % { provider_label: attribute_provider_label(:location) }
+ - else
+ = f.text_field :location, class: 'gl-form-input form-control gl-form-input-lg', placeholder: s_("Profiles|City, country")
+ .form-group.gl-form-group
+ = f.label :job_title, s_('Profiles|Job title')
+ = f.text_field :job_title, class: 'gl-form-input form-control gl-form-input-lg'
+ .form-group.gl-form-group
+ = f.label :organization, s_('Profiles|Organization')
+ = f.text_field :organization, class: 'gl-form-input form-control gl-form-input-lg'
+ %small.form-text.text-gl-muted
+ = s_("Profiles|Who you represent or work for")
+ .form-group.gl-form-group
+ = f.label :bio, s_('Profiles|Bio')
+ = f.text_area :bio, class: 'gl-form-input gl-form-textarea form-control', rows: 4, maxlength: 250
+ %small.form-text.text-gl-muted
+ = s_("Profiles|Tell us about yourself in fewer than 250 characters")
%hr
- %h5= _('Private profile')
- .checkbox-icon-inline-wrapper
- - private_profile_label = capture do
- = s_("Profiles|Don't display activity-related personal information on your profile")
- = f.check_box :private_profile, label: private_profile_label, inline: true, wrapper_class: 'mr-0'
- = link_to sprite_icon('question-o'), help_page_path('user/profile/index.md', anchor: 'make-your-user-profile-page-private')
- %h5= s_("Profiles|Private contributions")
- = f.check_box :include_private_contributions, label: s_('Profiles|Include private contributions on my profile'), wrapper_class: 'mb-2', inline: true
- .help-block
- = s_("Profiles|Choose to show contributions of private projects on your public profile without any project, repository or organization information")
+ %fieldset.form-group.gl-form-group
+ %legend.col-form-label.col-form-label
+ = _('Private profile')
+ - private_profile_label = s_("Profiles|Don't display activity-related personal information on your profile")
+ - private_profile_help_link = link_to sprite_icon('question-o'), help_page_path('user/profile/index.md', anchor: 'make-your-user-profile-page-private')
+ = f.gitlab_ui_checkbox_component :private_profile, '%{private_profile_label} %{private_profile_help_link}'.html_safe % { private_profile_label: private_profile_label, private_profile_help_link: private_profile_help_link.html_safe }
+ %fieldset.form-group.gl-form-group
+ %legend.col-form-label.col-form-label
+ = s_("Profiles|Private contributions")
+ = f.gitlab_ui_checkbox_component :include_private_contributions,
+ s_('Profiles|Include private contributions on my profile'),
+ help_text: s_("Profiles|Choose to show contributions of private projects on your public profile without any project, repository or organization information")
%hr
= f.submit s_("Profiles|Update profile settings"), class: 'gl-button btn btn-confirm gl-mr-3 js-password-prompt-btn'
= link_to _("Cancel"), user_path(current_user), class: 'gl-button btn btn-default btn-cancel'
diff --git a/app/views/profiles/two_factor_auths/show.html.haml b/app/views/profiles/two_factor_auths/show.html.haml
index b85b7841d55..ace644a493b 100644
--- a/app/views/profiles/two_factor_auths/show.html.haml
+++ b/app/views/profiles/two_factor_auths/show.html.haml
@@ -2,7 +2,7 @@
- page_title _('Two-Factor Authentication'), _('Account')
- add_to_breadcrumbs _('Account'), profile_account_path
- @content_class = "limit-container-width" unless fluid_layout
-- webauthn_enabled = Feature.enabled?(:webauthn, default_enabled: :yaml)
+- webauthn_enabled = Feature.enabled?(:webauthn)
.js-two-factor-auth{ 'data-two-factor-skippable' => "#{two_factor_skippable?}", 'data-two_factor_skip_url' => skip_profile_two_factor_auth_path }
.row.gl-mt-3
diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml
index e896ad38780..eee9cfe0618 100644
--- a/app/views/projects/_home_panel.html.haml
+++ b/app/views/projects/_home_panel.html.haml
@@ -1,7 +1,7 @@
- empty_repo = @project.empty_repo?
- show_auto_devops_callout = show_auto_devops_callout?(@project)
- emails_disabled = @project.emails_disabled?
-- cache_enabled = Feature.enabled?(:cache_home_panel, @project, type: :development, default_enabled: :yaml)
+- cache_enabled = Feature.enabled?(:cache_home_panel, @project, type: :development)
.project-home-panel.js-show-on-project-root.gl-my-5{ class: [("empty-project" if empty_repo)] }
.gl-display-flex.gl-justify-content-space-between.gl-flex-wrap.gl-sm-flex-direction-column.gl-mb-3
diff --git a/app/views/projects/blob/_blob.html.haml b/app/views/projects/blob/_blob.html.haml
index 85b9a69ab4c..2c3aade1068 100644
--- a/app/views/projects/blob/_blob.html.haml
+++ b/app/views/projects/blob/_blob.html.haml
@@ -14,7 +14,7 @@
#blob-content-holder.blob-content-holder
- if @code_navigation_path
#js-code-navigation{ data: { code_navigation_path: @code_navigation_path, blob_path: blob.path, definition_path_prefix: project_blob_path(@project, @ref) } }
- - if Feature.enabled?(:refactor_blob_viewer, @project, default_enabled: :yaml) && !expanded
+ - if Feature.enabled?(:refactor_blob_viewer, @project) && !expanded
-# Data info will be removed once we migrate this to use GraphQL
-# Follow-up issue: https://gitlab.com/gitlab-org/gitlab/-/issues/330406
#js-view-blob-app{ data: { blob_path: blob.path,
diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml
index 85a0346e691..295b2de9bd2 100644
--- a/app/views/projects/branches/index.html.haml
+++ b/app/views/projects/branches/index.html.haml
@@ -39,7 +39,7 @@
%ul.content-list.all-branches
- @branches.each do |branch|
= render "projects/branches/branch", branch: branch, merged: @merged_branch_names.include?(branch.name), commit_status: @branch_pipeline_statuses[branch.name], show_commit_status: @branch_pipeline_statuses.any?
- - if Feature.enabled?(:branch_list_keyset_pagination, @project, default_enabled: :yaml)
+ - if Feature.enabled?(:branch_list_keyset_pagination, @project)
= render('kaminari/gitlab/without_count', previous_path: @prev_path, next_path: @next_path)
- else
= paginate @branches, theme: 'gitlab'
diff --git a/app/views/projects/commits/_commits.html.haml b/app/views/projects/commits/_commits.html.haml
index f887a4c744e..c6fb3bcd559 100644
--- a/app/views/projects/commits/_commits.html.haml
+++ b/app/views/projects/commits/_commits.html.haml
@@ -14,7 +14,7 @@
%li.commits-row{ data: { day: day } }
%ul.content-list.commit-list.flex-list
- - if Feature.enabled?(:cached_commits, project, default_enabled: :yaml)
+ - if Feature.enabled?(:cached_commits, project)
= render partial: 'projects/commits/commit', collection: daily_commits, locals: { project: project, ref: ref, merge_request: merge_request }, cached: -> (commit) { commit_partial_cache_key(commit, ref: ref, merge_request: merge_request, request: request) }
- else
= render partial: 'projects/commits/commit', collection: daily_commits, locals: { project: project, ref: ref, merge_request: merge_request }
@@ -28,7 +28,7 @@
%li.commits-row
%ul.content-list.commit-list.flex-list
- - if Feature.enabled?(:cached_commits, project, default_enabled: :yaml)
+ - if Feature.enabled?(:cached_commits, project)
= render partial: 'projects/commits/commit', collection: context_commits, locals: { project: project, ref: ref, merge_request: merge_request }, cached: -> (commit) { commit_partial_cache_key(commit, ref: ref, merge_request: merge_request, request: request) }
- else
= render partial: 'projects/commits/commit', collection: context_commits, locals: { project: project, ref: ref, merge_request: merge_request }
diff --git a/app/views/projects/diffs/_text_file.html.haml b/app/views/projects/diffs/_text_file.html.haml
index 2cd215c5518..9b64afa8c60 100644
--- a/app/views/projects/diffs/_text_file.html.haml
+++ b/app/views/projects/diffs/_text_file.html.haml
@@ -4,7 +4,7 @@
%a.show-suppressed-diff.cursor-pointer.js-show-suppressed-diff= _("Changes suppressed. Click to show.")
%table.text-file.diff-wrap-lines.code.code-commit.js-syntax-highlight.commit-diff{ data: diff_view_data, class: too_big ? 'hide' : '' }
- - if Feature.enabled?(:inline_haml_diff_line_rendering, @project, default_enabled: :yaml)
+ - if Feature.enabled?(:inline_haml_diff_line_rendering, @project)
- diff_file.highlighted_diff_lines.each do |line|
- line_code = diff_file.line_code(line)
diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml
index f1c19756474..a904b53515c 100644
--- a/app/views/projects/issues/_discussion.html.haml
+++ b/app/views/projects/issues/_discussion.html.haml
@@ -1,4 +1,4 @@
-- add_page_startup_api_call Feature.enabled?(:paginated_issue_discussions, @project, default_enabled: :yaml) ? discussions_path(@issue, per_page: 20) : discussions_path(@issue)
+- add_page_startup_api_call Feature.enabled?(:paginated_issue_discussions, @project) ? discussions_path(@issue, per_page: 20) : discussions_path(@issue)
- @gfm_form = true
diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml
index d74b6c0639c..fe2be0f73c9 100644
--- a/app/views/projects/issues/index.html.haml
+++ b/app/views/projects/issues/index.html.haml
@@ -13,7 +13,7 @@
issues_path: project_issues_path(@project),
project_path: @project.full_path } }
-- if Feature.enabled?(:vue_issues_list, @project&.group, default_enabled: :yaml)
+- if Feature.enabled?(:vue_issues_list, @project&.group)
.js-issues-list{ data: project_issues_list_data(@project, current_user) }
- if @can_bulk_update
= render 'shared/issuable/bulk_update_sidebar', type: :issues
diff --git a/app/views/projects/jobs/index.html.haml b/app/views/projects/jobs/index.html.haml
index 9a2a1e57165..e725e8e6889 100644
--- a/app/views/projects/jobs/index.html.haml
+++ b/app/views/projects/jobs/index.html.haml
@@ -4,7 +4,7 @@
- add_page_specific_style 'page_bundles/ci_status'
- admin = local_assigns.fetch(:admin, false)
-- if Feature.enabled?(:jobs_table_vue, @project, default_enabled: :yaml)
+- if Feature.enabled?(:jobs_table_vue, @project)
#js-jobs-table{ data: { admin: admin, full_path: @project.full_path, job_statuses: job_statuses.to_json, pipeline_editor_path: project_ci_pipeline_editor_path(@project), empty_state_svg_path: image_path('jobs-empty-state.svg') } }
- else
.top-area
diff --git a/app/views/projects/pipelines/show.html.haml b/app/views/projects/pipelines/show.html.haml
index 2b0a0fc1253..30b224a60da 100644
--- a/app/views/projects/pipelines/show.html.haml
+++ b/app/views/projects/pipelines/show.html.haml
@@ -27,7 +27,7 @@
= s_('You can also test your %{gitlab_ci_yml} in %{lint_link_start}CI Lint%{lint_link_end}').html_safe % { gitlab_ci_yml: '.gitlab-ci.yml', lint_link_start: lint_link_start, lint_link_end: '</a>'.html_safe }
#js-pipeline-notification{ data: { deprecated_keywords_doc_path: help_page_path('ci/yaml/index.md', anchor: 'deprecated-keywords'), full_path: @project.full_path, pipeline_iid: @pipeline.iid } }
- - if Feature.enabled?(:pipeline_tabs_vue, @project, default_enabled: :yaml)
+ - if Feature.enabled?(:pipeline_tabs_vue, @project)
#js-pipeline-tabs{ data: js_pipeline_tabs_data(@project, @pipeline) }
- else
= render "projects/pipelines/with_tabs", pipeline: @pipeline, stages: @stages, pipeline_has_errors: pipeline_has_errors
diff --git a/app/workers/ci/build_finished_worker.rb b/app/workers/ci/build_finished_worker.rb
index 70c234bd4c7..2d7f3a67004 100644
--- a/app/workers/ci/build_finished_worker.rb
+++ b/app/workers/ci/build_finished_worker.rb
@@ -61,7 +61,7 @@ module Ci
end
def archive_trace_worker_class(build)
- if Feature.enabled?(:ci_build_finished_worker_namespace_changed, build.project, default_enabled: :yaml)
+ if Feature.enabled?(:ci_build_finished_worker_namespace_changed, build.project)
Ci::ArchiveTraceWorker
else
::ArchiveTraceWorker
diff --git a/app/workers/concerns/git_garbage_collect_methods.rb b/app/workers/concerns/git_garbage_collect_methods.rb
index 308ffacfc6b..fd5094b3014 100644
--- a/app/workers/concerns/git_garbage_collect_methods.rb
+++ b/app/workers/concerns/git_garbage_collect_methods.rb
@@ -83,7 +83,7 @@ module GitGarbageCollectMethods
def gitaly_call(task, resource)
repository = resource.repository.raw_repository
- if Feature.enabled?(:optimized_housekeeping, container(resource), default_enabled: :yaml)
+ if Feature.enabled?(:optimized_housekeeping, container(resource))
client = repository.gitaly_repository_client
if task == :prune
diff --git a/app/workers/concerns/worker_attributes.rb b/app/workers/concerns/worker_attributes.rb
index 8f7a3da5429..5d7251e9a98 100644
--- a/app/workers/concerns/worker_attributes.rb
+++ b/app/workers/concerns/worker_attributes.rb
@@ -104,7 +104,7 @@ module WorkerAttributes
def get_data_consistency_feature_flag_enabled?
return true unless class_attributes[:data_consistency_feature_flag]
- Feature.enabled?(class_attributes[:data_consistency_feature_flag], default_enabled: :yaml)
+ Feature.enabled?(class_attributes[:data_consistency_feature_flag])
end
# Set this attribute on a job when it will call to services outside of the
@@ -175,7 +175,7 @@ module WorkerAttributes
def deduplication_enabled?
return true unless get_deduplication_options[:feature_flag]
- Feature.enabled?(get_deduplication_options[:feature_flag], default_enabled: :yaml)
+ Feature.enabled?(get_deduplication_options[:feature_flag])
end
def big_payload!
diff --git a/app/workers/database/batched_background_migration/ci_database_worker.rb b/app/workers/database/batched_background_migration/ci_database_worker.rb
index 13314cf95e2..ee9cbba7076 100644
--- a/app/workers/database/batched_background_migration/ci_database_worker.rb
+++ b/app/workers/database/batched_background_migration/ci_database_worker.rb
@@ -5,7 +5,7 @@ module Database
include SingleDatabaseWorker
def self.enabled?
- Feature.enabled?(:execute_batched_migrations_on_schedule_ci_database, type: :ops, default_enabled: :yaml)
+ Feature.enabled?(:execute_batched_migrations_on_schedule_ci_database, type: :ops)
end
def self.tracking_database
diff --git a/app/workers/database/batched_background_migration_worker.rb b/app/workers/database/batched_background_migration_worker.rb
index 6a41fe70915..31208d7a473 100644
--- a/app/workers/database/batched_background_migration_worker.rb
+++ b/app/workers/database/batched_background_migration_worker.rb
@@ -5,7 +5,7 @@ module Database
include BatchedBackgroundMigration::SingleDatabaseWorker
def self.enabled?
- Feature.enabled?(:execute_batched_migrations_on_schedule, type: :ops, default_enabled: :yaml)
+ Feature.enabled?(:execute_batched_migrations_on_schedule, type: :ops)
end
def self.tracking_database
diff --git a/app/workers/gitlab/github_import/stage/import_issues_and_diff_notes_worker.rb b/app/workers/gitlab/github_import/stage/import_issues_and_diff_notes_worker.rb
index 5188bda03e2..34996b710d4 100644
--- a/app/workers/gitlab/github_import/stage/import_issues_and_diff_notes_worker.rb
+++ b/app/workers/gitlab/github_import/stage/import_issues_and_diff_notes_worker.rb
@@ -36,7 +36,7 @@ module Gitlab
private
def diff_notes_importer(project)
- if project.group.present? && Feature.enabled?(:github_importer_single_endpoint_notes_import, project.group, type: :ops, default_enabled: :yaml)
+ if project.group.present? && Feature.enabled?(:github_importer_single_endpoint_notes_import, project.group, type: :ops)
Importer::SingleEndpointDiffNotesImporter
else
Importer::DiffNotesImporter
diff --git a/app/workers/gitlab/github_import/stage/import_notes_worker.rb b/app/workers/gitlab/github_import/stage/import_notes_worker.rb
index 90a1337169f..167b3e147a3 100644
--- a/app/workers/gitlab/github_import/stage/import_notes_worker.rb
+++ b/app/workers/gitlab/github_import/stage/import_notes_worker.rb
@@ -29,7 +29,7 @@ module Gitlab
end
def importers(project)
- if project.group.present? && Feature.enabled?(:github_importer_single_endpoint_notes_import, project.group, type: :ops, default_enabled: :yaml)
+ if project.group.present? && Feature.enabled?(:github_importer_single_endpoint_notes_import, project.group, type: :ops)
[
Importer::SingleEndpointMergeRequestNotesImporter,
Importer::SingleEndpointIssueNotesImporter
diff --git a/app/workers/merge_request_cleanup_refs_worker.rb b/app/workers/merge_request_cleanup_refs_worker.rb
index 27bd5774b8d..db6f4649f47 100644
--- a/app/workers/merge_request_cleanup_refs_worker.rb
+++ b/app/workers/merge_request_cleanup_refs_worker.rb
@@ -18,7 +18,7 @@ class MergeRequestCleanupRefsWorker
FAILURE_THRESHOLD = 3
def perform_work
- return unless Feature.enabled?(:merge_request_refs_cleanup, default_enabled: false)
+ return unless Feature.enabled?(:merge_request_refs_cleanup)
unless merge_request
logger.error('No existing merge request to be cleaned up.')
diff --git a/app/workers/schedule_merge_request_cleanup_refs_worker.rb b/app/workers/schedule_merge_request_cleanup_refs_worker.rb
index 58cd8f7ade3..b3d0067471a 100644
--- a/app/workers/schedule_merge_request_cleanup_refs_worker.rb
+++ b/app/workers/schedule_merge_request_cleanup_refs_worker.rb
@@ -12,7 +12,7 @@ class ScheduleMergeRequestCleanupRefsWorker
def perform
return if Gitlab::Database.read_only?
- return unless Feature.enabled?(:merge_request_refs_cleanup, default_enabled: false)
+ return unless Feature.enabled?(:merge_request_refs_cleanup)
MergeRequestCleanupRefsWorker.perform_with_capacity
end
diff --git a/config/feature_flags/ops/jira_raise_timeouts.yml b/config/feature_flags/ops/jira_raise_timeouts.yml
new file mode 100644
index 00000000000..d1ab0ff0670
--- /dev/null
+++ b/config/feature_flags/ops/jira_raise_timeouts.yml
@@ -0,0 +1,8 @@
+---
+name: jira_raise_timeouts
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86439
+rollout_issue_url:
+milestone: '15.0'
+type: ops
+group: group::integrations
+default_enabled: false
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index a2224a13d19..fee7e599fc7 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -1286,9 +1286,8 @@ production: &base
sidekiq_health_checks:
# enabled: true
- # log_enabled: false
# address: localhost
- # port: 8082
+ # port: 8092
# Web exporter is a dedicated Rack server running alongside Puma to expose Prometheus metrics
# It runs alongside the `/metrics` endpoints to ease the publish of metrics
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 9b72fa77350..ea6a00b395f 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -966,15 +966,10 @@ Settings.monitoring.sidekiq_exporter['log_enabled'] ||= false
Settings.monitoring.sidekiq_exporter['address'] ||= 'localhost'
Settings.monitoring.sidekiq_exporter['port'] ||= 8082
-# TODO: Once we split out health checks from SidekiqExporter, we
-# should not let this default to the same settings anymore; we only
-# do this for back-compat currently.
-# https://gitlab.com/gitlab-org/gitlab/-/issues/345804
Settings.monitoring['sidekiq_health_checks'] ||= Settingslogic.new({})
-Settings.monitoring.sidekiq_health_checks['enabled'] ||= Settings.monitoring.sidekiq_exporter['enabled']
-Settings.monitoring.sidekiq_health_checks['log_enabled'] ||= Settings.monitoring.sidekiq_exporter['log_enabled']
-Settings.monitoring.sidekiq_health_checks['address'] ||= Settings.monitoring.sidekiq_exporter['address']
-Settings.monitoring.sidekiq_health_checks['port'] ||= Settings.monitoring.sidekiq_exporter['port']
+Settings.monitoring.sidekiq_health_checks['enabled'] ||= false
+Settings.monitoring.sidekiq_health_checks['address'] ||= 'localhost'
+Settings.monitoring.sidekiq_health_checks['port'] ||= 8092
Settings.monitoring['web_exporter'] ||= Settingslogic.new({})
Settings.monitoring.web_exporter['enabled'] ||= false
diff --git a/config/initializers/7_prometheus_metrics.rb b/config/initializers/7_prometheus_metrics.rb
index 6953de670a7..a8e8bdf2c9f 100644
--- a/config/initializers/7_prometheus_metrics.rb
+++ b/config/initializers/7_prometheus_metrics.rb
@@ -58,24 +58,6 @@ end
# context (i.e. not in the Rails console or rspec) and when users have enabled metrics.
return if Rails.env.test? || !Gitlab::Runtime.application? || !Gitlab::Metrics.prometheus_metrics_enabled?
-if Gitlab::Runtime.sidekiq? && (!ENV['SIDEKIQ_WORKER_ID'] || ENV['SIDEKIQ_WORKER_ID'] == '0')
- # The single worker outside of a sidekiq-cluster, or the first worker (sidekiq_0)
- # in a cluster of processes, is responsible for serving health checks.
- #
- # Do not clean the metrics directory here - the supervisor script should
- # have already taken care of that.
- Sidekiq.configure_server do |config|
- config.on(:startup) do
- # In https://gitlab.com/gitlab-org/gitlab/-/issues/345804 we are looking to
- # only serve health-checks from a worker process; for backwards compatibility
- # we still go through the metrics exporter server, but start to configure it
- # with the new settings keys.
- exporter_settings = Settings.monitoring.sidekiq_health_checks
- Gitlab::Metrics::Exporter::SidekiqExporter.instance(exporter_settings).start
- end
- end
-end
-
Gitlab::Cluster::LifecycleEvents.on_master_start do
Gitlab::Metrics.gauge(:deployments, 'GitLab Version', {}, :max).set({ version: Gitlab::VERSION, revision: Gitlab.revision }, 1)
diff --git a/config/initializers/active_record_transaction_observer.rb b/config/initializers/active_record_transaction_observer.rb
index b90b3a39ac1..1dc7b55ed5a 100644
--- a/config/initializers/active_record_transaction_observer.rb
+++ b/config/initializers/active_record_transaction_observer.rb
@@ -3,7 +3,7 @@
return unless Gitlab.com? || Gitlab.dev_or_test_env?
Gitlab::Application.configure do
- if Feature.feature_flags_available? && ::Feature.enabled?(:active_record_transactions_tracking, type: :ops, default_enabled: :yaml)
+ if Feature.feature_flags_available? && ::Feature.enabled?(:active_record_transactions_tracking, type: :ops)
Gitlab::Database::Transaction::Observer.register!
end
end
diff --git a/config/initializers/carrierwave_patch.rb b/config/initializers/carrierwave_patch.rb
index a9c74478541..6053154489f 100644
--- a/config/initializers/carrierwave_patch.rb
+++ b/config/initializers/carrierwave_patch.rb
@@ -22,7 +22,7 @@ module CarrierWave
# multithreaded uploads (https://github.com/fog/fog-aws/pull/579).
# Multithreaded uploads are essential for copying large amounts of data
# within the request timeout.
- if ::Feature.enabled?(:s3_multithreaded_uploads, default_enabled: true) && fog_provider == 'AWS'
+ if ::Feature.enabled?(:s3_multithreaded_uploads) && fog_provider == 'AWS'
# AWS SDK uses 10 threads by default and a multipart chunk size of 10 MB
file.concurrency = 10
file.multipart_chunk_size = 10485760
diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb
index 24040d7b076..2c7034f758d 100644
--- a/config/initializers/omniauth.rb
+++ b/config/initializers/omniauth.rb
@@ -12,7 +12,7 @@ if Gitlab::Auth::Ldap::Config.enabled?
end
OmniAuth.config.full_host =
- if Feature.feature_flags_available? && ::Feature.enabled?(:omniauth_initializer_fullhost_proc, default_enabled: :yaml)
+ if Feature.feature_flags_available? && ::Feature.enabled?(:omniauth_initializer_fullhost_proc)
Gitlab::AppLogger.debug("Using OmniAuth proc initializer")
Gitlab::OmniauthInitializer.full_host
else
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb
index 25984c45318..b3c7d9cbad5 100644
--- a/config/initializers/sidekiq.rb
+++ b/config/initializers/sidekiq.rb
@@ -8,13 +8,13 @@ end
def enable_reliable_fetch?
return true unless Feature::FlipperFeature.table_exists?
- Feature.enabled?(:gitlab_sidekiq_reliable_fetcher, type: :ops, default_enabled: true)
+ Feature.enabled?(:gitlab_sidekiq_reliable_fetcher, type: :ops)
end
def enable_semi_reliable_fetch_mode?
return true unless Feature::FlipperFeature.table_exists?
- Feature.enabled?(:gitlab_sidekiq_enable_semi_reliable_fetcher, type: :ops, default_enabled: true)
+ Feature.enabled?(:gitlab_sidekiq_enable_semi_reliable_fetcher, type: :ops)
end
# Custom Queues configuration
@@ -63,6 +63,17 @@ Sidekiq.configure_server do |config|
Gitlab::SidekiqDaemon::Monitor.instance.start
Gitlab::SidekiqDaemon::MemoryKiller.instance.start if enable_sidekiq_memory_killer && use_sidekiq_daemon_memory_killer
+
+ first_sidekiq_worker = !ENV['SIDEKIQ_WORKER_ID'] || ENV['SIDEKIQ_WORKER_ID'] == '0'
+ health_checks = Settings.monitoring.sidekiq_health_checks
+
+ # Start health-check in-process server
+ if first_sidekiq_worker && health_checks.enabled
+ Gitlab::HealthChecks::Server.instance(
+ address: health_checks.address,
+ port: health_checks.port
+ ).start
+ end
end
if enable_reliable_fetch?
diff --git a/data/removals/15_0/15-0-managed-cluster-applications.yml b/data/removals/15_0/15-0-managed-cluster-applications.yml
new file mode 100644
index 00000000000..b0e4bae8852
--- /dev/null
+++ b/data/removals/15_0/15-0-managed-cluster-applications.yml
@@ -0,0 +1,12 @@
+- name: "`Managed-Cluster-Applications.gitlab-ci.yml`"
+ announcement_milestone: "14.0"
+ announcement_date: "2021-06-22"
+ removal_milestone: "15.0"
+ removal_date: "2022-05-22"
+ breaking_change: true
+ reporter: nagyv-gitlab
+ body: | # Do not modify this line, instead modify the lines below.
+ The `Managed-Cluster-Applications.gitlab-ci.yml` CI/CD template is being removed. If you need an alternative, try the [Cluster Management project template](https://gitlab.com/gitlab-org/gitlab/-/issues/333610) instead. If your are not ready to move, you can copy the [last released version](https://gitlab.com/gitlab-org/gitlab-foss/-/blob/v14.10.1/lib/gitlab/ci/templates/Managed-Cluster-Applications.gitlab-ci.yml) of the template into your project.
+# The following items are not published on the docs page, but may be used in the future.
+ stage: "Configure"
+ issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/333610
diff --git a/db/docs/allowed_email_domains.yml b/db/docs/allowed_email_domains.yml
index 69f7aa3a804..65a12dd712c 100644
--- a/db/docs/allowed_email_domains.yml
+++ b/db/docs/allowed_email_domains.yml
@@ -3,7 +3,7 @@ table_name: allowed_email_domains
classes:
- AllowedEmailDomain
feature_categories:
-- users
-description: TODO
+- subgroups
+description: Stores email domains for group, only members with email from those domains can be added to the group
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/14800
milestone: '12.2'
diff --git a/db/docs/badges.yml b/db/docs/badges.yml
index f96a3c37bcc..209d4d1d88a 100644
--- a/db/docs/badges.yml
+++ b/db/docs/badges.yml
@@ -6,6 +6,6 @@ classes:
- ProjectBadge
feature_categories:
- projects
-description: TODO
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/8fe880dc064e0e6cd10f7176ade7c312cfb37b90
+description: Stores badges records
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/17082
milestone: '10.6'
diff --git a/db/docs/emails.yml b/db/docs/emails.yml
index db08ba6e458..229861b1d91 100644
--- a/db/docs/emails.yml
+++ b/db/docs/emails.yml
@@ -4,6 +4,6 @@ classes:
- Email
feature_categories:
- users
-description: TODO
+description: Stores users email records
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/29cfd33d949d21d67f3892473c24d4f0a127dfe6
milestone: '6.6'
diff --git a/db/docs/group_custom_attributes.yml b/db/docs/group_custom_attributes.yml
index 6a06b847414..3bf4f6a0f92 100644
--- a/db/docs/group_custom_attributes.yml
+++ b/db/docs/group_custom_attributes.yml
@@ -4,6 +4,6 @@ classes:
- GroupCustomAttribute
feature_categories:
- subgroups
-description: TODO
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/1f773a8ef5a1f76166d0455c6a5e473278885c17
+description: Stores custom attributes per group
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14593
milestone: '10.2'
diff --git a/db/docs/members.yml b/db/docs/members.yml
index ebf8a4f3bc6..b26d0edd6c9 100644
--- a/db/docs/members.yml
+++ b/db/docs/members.yml
@@ -8,6 +8,6 @@ classes:
feature_categories:
- projects
- subgroups
-description: TODO
+description: Stores members per namespace
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/3503b504eabf95487fc3fb49df953a7d694da4fe
milestone: '7.4'
diff --git a/db/docs/namespace_settings.yml b/db/docs/namespace_settings.yml
index c34003d48f1..ef2f96eb46e 100644
--- a/db/docs/namespace_settings.yml
+++ b/db/docs/namespace_settings.yml
@@ -4,6 +4,6 @@ classes:
- NamespaceSetting
feature_categories:
- subgroups
-description: TODO
+description: Stores settings per namespace
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/36321
milestone: '13.2'
diff --git a/db/docs/namespaces.yml b/db/docs/namespaces.yml
index 49d84d15a75..0518b055e52 100644
--- a/db/docs/namespaces.yml
+++ b/db/docs/namespaces.yml
@@ -7,6 +7,6 @@ classes:
- Namespaces::UserNamespace
feature_categories:
- subgroups
-description: TODO
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/e29ccece332e57c9fb6c532a3680e3b457e3a301
+description: Storing namespaces records for groups, users and projects
+introduced_by_url: https://github.com/gitlabhq/gitlabhq/pull/2051
milestone: "<6.0"
diff --git a/db/docs/project_authorizations.yml b/db/docs/project_authorizations.yml
index b2ca65a53d5..890997d7d33 100644
--- a/db/docs/project_authorizations.yml
+++ b/db/docs/project_authorizations.yml
@@ -4,6 +4,7 @@ classes:
- ProjectAuthorization
feature_categories:
- projects
-description: TODO
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/fd05e26618dd0c123ca476b6f5a3d85f1cfe397a
+- authentication_and_authorization
+description: Stores maximal access to the project per user
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6839
milestone: '8.14'
diff --git a/db/docs/project_custom_attributes.yml b/db/docs/project_custom_attributes.yml
index 56f425f4c21..90f13b4f593 100644
--- a/db/docs/project_custom_attributes.yml
+++ b/db/docs/project_custom_attributes.yml
@@ -4,6 +4,6 @@ classes:
- ProjectCustomAttribute
feature_categories:
- projects
-description: TODO
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/6902848a9c54f9eb1bfd82fe173ad0d5d62fe2d5
+description: Stores custom attributes per project
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14593
milestone: '10.2'
diff --git a/db/docs/project_settings.yml b/db/docs/project_settings.yml
index 5aa3d6daf48..cc084590c89 100644
--- a/db/docs/project_settings.yml
+++ b/db/docs/project_settings.yml
@@ -4,6 +4,6 @@ classes:
- ProjectSetting
feature_categories:
- projects
-description: TODO
+description: Stores settings per project
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/a2a7ad291f64a5db74c1bc21fb556e6e8862d0f3
-milestone: '12.8'
+milestone: '10.8'
diff --git a/db/docs/project_topics.yml b/db/docs/project_topics.yml
index addad163923..cbe0d482586 100644
--- a/db/docs/project_topics.yml
+++ b/db/docs/project_topics.yml
@@ -4,6 +4,6 @@ classes:
- Projects::ProjectTopic
feature_categories:
- projects
-description: TODO
+description: Stores topics per project relationship
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67574
milestone: '14.3'
diff --git a/db/docs/projects.yml b/db/docs/projects.yml
index 41fef75ae0c..9a845a21751 100644
--- a/db/docs/projects.yml
+++ b/db/docs/projects.yml
@@ -4,6 +4,6 @@ classes:
- Project
feature_categories:
- projects
-description: TODO
+description: Stores project records
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/9ba1224867665844b117fa037e1465bb706b3685
milestone: "<6.0"
diff --git a/db/docs/redirect_routes.yml b/db/docs/redirect_routes.yml
index 315a251a921..a9b93a9b8f9 100644
--- a/db/docs/redirect_routes.yml
+++ b/db/docs/redirect_routes.yml
@@ -5,6 +5,6 @@ classes:
feature_categories:
- projects
- subgroups
-description: TODO
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/7d02bcd2e0165a90a9f2c1edb34b064ff76afd69
+description: Stores routes for redirect after changing the path to group or project
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/11136
milestone: '9.2'
diff --git a/db/docs/routes.yml b/db/docs/routes.yml
index 9b325694f03..9184309dabf 100644
--- a/db/docs/routes.yml
+++ b/db/docs/routes.yml
@@ -6,6 +6,7 @@ classes:
feature_categories:
- projects
- subgroups
-description: TODO
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/83232be0e14cc8b35bf74532203a6e4371c15e70
+- users
+description: Stores routes per namespaces and projects
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/7121
milestone: '9.0'
diff --git a/db/docs/security_findings.yml b/db/docs/security_findings.yml
index e7c30e4f791..b4607d56dca 100644
--- a/db/docs/security_findings.yml
+++ b/db/docs/security_findings.yml
@@ -4,6 +4,6 @@ classes:
- Security::Finding
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores a subset of the Finding data which is used to optimize the pipeline security tab
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40368
milestone: '13.4'
diff --git a/db/docs/security_scans.yml b/db/docs/security_scans.yml
index e50afd83472..fc6732bc80f 100644
--- a/db/docs/security_scans.yml
+++ b/db/docs/security_scans.yml
@@ -4,6 +4,6 @@ classes:
- Security::Scan
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores information about the security scans that are a part of Ci::Build
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/23669
milestone: '12.8'
diff --git a/db/docs/security_training_providers.yml b/db/docs/security_training_providers.yml
index ba805a13e47..b8c6bc7e01f 100644
--- a/db/docs/security_training_providers.yml
+++ b/db/docs/security_training_providers.yml
@@ -4,6 +4,6 @@ classes:
- Security::TrainingProvider
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores information about the available security training providers
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/78195
milestone: '14.7'
diff --git a/db/docs/security_trainings.yml b/db/docs/security_trainings.yml
index 310963541f0..2e84f8a5f65 100644
--- a/db/docs/security_trainings.yml
+++ b/db/docs/security_trainings.yml
@@ -4,6 +4,6 @@ classes:
- Security::Training
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores information about the primary security training provider for a given project
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/78195
milestone: '14.7'
diff --git a/db/docs/topics.yml b/db/docs/topics.yml
index d093c263386..25a448e3361 100644
--- a/db/docs/topics.yml
+++ b/db/docs/topics.yml
@@ -4,6 +4,6 @@ classes:
- Projects::Topic
feature_categories:
- projects
-description: TODO
+description: Stores topics that can be assigned to projects
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67574
milestone: '14.3'
diff --git a/db/docs/user_callouts.yml b/db/docs/user_callouts.yml
index 911825f0913..63ee837eb2c 100644
--- a/db/docs/user_callouts.yml
+++ b/db/docs/user_callouts.yml
@@ -3,7 +3,7 @@ table_name: user_callouts
classes:
- Users::Callout
feature_categories:
-- users
+- navigation
description: TODO
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/16735
milestone: '10.5'
diff --git a/db/docs/user_custom_attributes.yml b/db/docs/user_custom_attributes.yml
index 60359fb2c48..956450acb68 100644
--- a/db/docs/user_custom_attributes.yml
+++ b/db/docs/user_custom_attributes.yml
@@ -4,6 +4,6 @@ classes:
- UserCustomAttribute
feature_categories:
- users
-description: TODO
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/e9eae3eb0dd25e4a34c9a4b6bcc7de312dde4489
+description: Storing custom attributes per user
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/13038
milestone: '10.1'
diff --git a/db/docs/user_details.yml b/db/docs/user_details.yml
index 5ced831f9ad..636074214b0 100644
--- a/db/docs/user_details.yml
+++ b/db/docs/user_details.yml
@@ -4,6 +4,6 @@ classes:
- UserDetail
feature_categories:
- users
-description: TODO
+description: Stores user details
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25483
milestone: '12.9'
diff --git a/db/docs/user_follow_users.yml b/db/docs/user_follow_users.yml
index 08756637c10..56243b97546 100644
--- a/db/docs/user_follow_users.yml
+++ b/db/docs/user_follow_users.yml
@@ -4,6 +4,6 @@ classes:
- Users::UserFollowUser
feature_categories:
- users
-description: TODO
+description: Stores which users follow each other
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45451
milestone: '13.9'
diff --git a/db/docs/user_group_callouts.yml b/db/docs/user_group_callouts.yml
index 0ed79640cb1..910752339ed 100644
--- a/db/docs/user_group_callouts.yml
+++ b/db/docs/user_group_callouts.yml
@@ -3,7 +3,7 @@ table_name: user_group_callouts
classes:
- Users::GroupCallout
feature_categories:
-- users
+- navigation
description: TODO
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68785
milestone: '14.3'
diff --git a/db/docs/user_preferences.yml b/db/docs/user_preferences.yml
index 0a0b447c0c2..b9afb679503 100644
--- a/db/docs/user_preferences.yml
+++ b/db/docs/user_preferences.yml
@@ -4,6 +4,6 @@ classes:
- UserPreference
feature_categories:
- users
-description: TODO
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/132abd3d68a8d97e8245dfc8f87a297a2ff1f39d
+description: Stores users' preferences
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/7816
milestone: '11.5'
diff --git a/db/docs/user_statuses.yml b/db/docs/user_statuses.yml
index cf4667c4189..94aaff70d85 100644
--- a/db/docs/user_statuses.yml
+++ b/db/docs/user_statuses.yml
@@ -4,6 +4,6 @@ classes:
- UserStatus
feature_categories:
- users
-description: TODO
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/812bfb158b70b09cfd438379a4b9446aa85b52ec
+description: Stores users' statuses
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/20614
milestone: '11.2'
diff --git a/db/docs/users_security_dashboard_projects.yml b/db/docs/users_security_dashboard_projects.yml
index a98399aa9c8..4c379e5739d 100644
--- a/db/docs/users_security_dashboard_projects.yml
+++ b/db/docs/users_security_dashboard_projects.yml
@@ -4,6 +4,6 @@ classes:
- UsersSecurityDashboardProject
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores projects which users select to appear in their Security Dashboard
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18708
milestone: '12.5'
diff --git a/db/docs/users_star_projects.yml b/db/docs/users_star_projects.yml
index a1da7dca644..0199a0e3433 100644
--- a/db/docs/users_star_projects.yml
+++ b/db/docs/users_star_projects.yml
@@ -4,6 +4,6 @@ classes:
- UsersStarProject
feature_categories:
- projects
-description: TODO
+description: Stores conection between users and project through staring action
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/714f7201d3362793d11f33793e5ef6dc83bdd2f0
-milestone: '7.2'
+milestone: '7.1'
diff --git a/db/docs/vulnerabilities.yml b/db/docs/vulnerabilities.yml
index f2dad96bebc..72f080a075f 100644
--- a/db/docs/vulnerabilities.yml
+++ b/db/docs/vulnerabilities.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerability
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores information about vulnerabilites present in the project's source code
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/16181
milestone: '12.4'
diff --git a/db/docs/vulnerability_exports.yml b/db/docs/vulnerability_exports.yml
index f9d392d3485..4254a4426d6 100644
--- a/db/docs/vulnerability_exports.yml
+++ b/db/docs/vulnerability_exports.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::Export
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores metadata about exported Vulnerabilities CSV files
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27196
milestone: '13.0'
diff --git a/db/docs/vulnerability_external_issue_links.yml b/db/docs/vulnerability_external_issue_links.yml
index ff0b8f98414..2adf90e6838 100644
--- a/db/docs/vulnerability_external_issue_links.yml
+++ b/db/docs/vulnerability_external_issue_links.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::ExternalIssueLink
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores information about connections between external issue trackers and vulnerabilities
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48465
milestone: '13.7'
diff --git a/db/docs/vulnerability_feedback.yml b/db/docs/vulnerability_feedback.yml
index 4d5ae868188..bcd8c3935e6 100644
--- a/db/docs/vulnerability_feedback.yml
+++ b/db/docs/vulnerability_feedback.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::Feedback
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores information about the confirm, dismiss, or create issue to investigate actions taken on vulnerabilities
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/5452
milestone: '10.8'
diff --git a/db/docs/vulnerability_finding_evidences.yml b/db/docs/vulnerability_finding_evidences.yml
index a2b48caece6..0c7fc7c7fdd 100644
--- a/db/docs/vulnerability_finding_evidences.yml
+++ b/db/docs/vulnerability_finding_evidences.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::Finding::Evidence
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores evidence used to identify presence of a vulnerability
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56790
milestone: '13.11'
diff --git a/db/docs/vulnerability_finding_links.yml b/db/docs/vulnerability_finding_links.yml
index 4f47e82e85f..c259778cb09 100644
--- a/db/docs/vulnerability_finding_links.yml
+++ b/db/docs/vulnerability_finding_links.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::FindingLink
feature_categories:
- vulnerability_management
-description: TODO
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45502
+description: Stores URLs relevant to the vulnerability findings
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46555
milestone: '13.6'
diff --git a/db/docs/vulnerability_finding_signatures.yml b/db/docs/vulnerability_finding_signatures.yml
index 963dd96dd2c..a9faf1e8a1b 100644
--- a/db/docs/vulnerability_finding_signatures.yml
+++ b/db/docs/vulnerability_finding_signatures.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::FindingSignature
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores signatures of vulnerability locations which are used to improve tracking
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57840
milestone: '13.11'
diff --git a/db/docs/vulnerability_findings_remediations.yml b/db/docs/vulnerability_findings_remediations.yml
index 4a757073567..f59b2360f42 100644
--- a/db/docs/vulnerability_findings_remediations.yml
+++ b/db/docs/vulnerability_findings_remediations.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::FindingRemediation
feature_categories:
- vulnerability_management
-description: TODO
+description: Join table between Remediations and Findings
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/47166
milestone: '13.7'
diff --git a/db/docs/vulnerability_flags.yml b/db/docs/vulnerability_flags.yml
index fa47f878029..5d26faf66e0 100644
--- a/db/docs/vulnerability_flags.yml
+++ b/db/docs/vulnerability_flags.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::Flag
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores additional information for vulnerabilities, for example if a vulnerability is identified as a false positive
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/65573
milestone: '14.1'
diff --git a/db/docs/vulnerability_historical_statistics.yml b/db/docs/vulnerability_historical_statistics.yml
index 38cd2029438..22622f2494d 100644
--- a/db/docs/vulnerability_historical_statistics.yml
+++ b/db/docs/vulnerability_historical_statistics.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::HistoricalStatistic
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores aggregate vulnerability statistics which are used in the Security Dashboard
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/36955
milestone: '13.3'
diff --git a/db/docs/vulnerability_identifiers.yml b/db/docs/vulnerability_identifiers.yml
index eefdddfe7eb..9be03505671 100644
--- a/db/docs/vulnerability_identifiers.yml
+++ b/db/docs/vulnerability_identifiers.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::Identifier
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores identifiers (like CVE or CWE) for vulnerabilities that have been found
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/6896
milestone: '11.4'
diff --git a/db/docs/vulnerability_issue_links.yml b/db/docs/vulnerability_issue_links.yml
index d19e885dd86..8503af34831 100644
--- a/db/docs/vulnerability_issue_links.yml
+++ b/db/docs/vulnerability_issue_links.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::IssueLink
feature_categories:
- vulnerability_management
-description: TODO
+description: Join table between Vulnerabilities and Issues
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/19852
milestone: '12.5'
diff --git a/db/docs/vulnerability_occurrence_identifiers.yml b/db/docs/vulnerability_occurrence_identifiers.yml
index 5791b42846b..77b985e3e02 100644
--- a/db/docs/vulnerability_occurrence_identifiers.yml
+++ b/db/docs/vulnerability_occurrence_identifiers.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::FindingIdentifier
feature_categories:
- vulnerability_management
-description: TODO
+description: Join table between Findings and Identifiers
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/6896
milestone: '11.4'
diff --git a/db/docs/vulnerability_occurrence_pipelines.yml b/db/docs/vulnerability_occurrence_pipelines.yml
index 5cbc490a2b8..5c798e7a2ac 100644
--- a/db/docs/vulnerability_occurrence_pipelines.yml
+++ b/db/docs/vulnerability_occurrence_pipelines.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::FindingPipeline
feature_categories:
- vulnerability_management
-description: TODO
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/3270e15c4de7f40b97ce25bdc3cc9c4282e2f573
+description: Join table between Findings and Pipelines
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/7578
milestone: '11.5'
diff --git a/db/docs/vulnerability_occurrences.yml b/db/docs/vulnerability_occurrences.yml
index 001764c385e..919a0ae19e7 100644
--- a/db/docs/vulnerability_occurrences.yml
+++ b/db/docs/vulnerability_occurrences.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::Finding
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores information about findings for a given vulnerability
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/6896
milestone: '11.4'
diff --git a/db/docs/vulnerability_reads.yml b/db/docs/vulnerability_reads.yml
index 0d60920c694..29727da2e69 100644
--- a/db/docs/vulnerability_reads.yml
+++ b/db/docs/vulnerability_reads.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::Read
feature_categories:
- vulnerability_management
-description: TODO
+description: Denormalized version of the vulnerabilites table used for faster reads
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74733
milestone: '14.6'
diff --git a/db/docs/vulnerability_remediations.yml b/db/docs/vulnerability_remediations.yml
index 6dfd80ec6b4..3f4e93ba0d8 100644
--- a/db/docs/vulnerability_remediations.yml
+++ b/db/docs/vulnerability_remediations.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::Remediation
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores remediation information, such as diffs, for a given vulnerability
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/47166
milestone: '13.7'
diff --git a/db/docs/vulnerability_scanners.yml b/db/docs/vulnerability_scanners.yml
index 18d534619bf..2ea7a3763d6 100644
--- a/db/docs/vulnerability_scanners.yml
+++ b/db/docs/vulnerability_scanners.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::Scanner
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores information about the vulnerability scanners used by projects
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/6896
milestone: '11.4'
diff --git a/db/docs/vulnerability_statistics.yml b/db/docs/vulnerability_statistics.yml
index 6b82d1cb257..c94145e24f1 100644
--- a/db/docs/vulnerability_statistics.yml
+++ b/db/docs/vulnerability_statistics.yml
@@ -4,6 +4,6 @@ classes:
- Vulnerabilities::Statistic
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores pre-calculated vulnerability statistics for projects
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/34289
milestone: '13.2'
diff --git a/db/docs/vulnerability_user_mentions.yml b/db/docs/vulnerability_user_mentions.yml
index 94484cfbf06..4e4a07e97ac 100644
--- a/db/docs/vulnerability_user_mentions.yml
+++ b/db/docs/vulnerability_user_mentions.yml
@@ -4,6 +4,6 @@ classes:
- VulnerabilityUserMention
feature_categories:
- vulnerability_management
-description: TODO
+description: Stores notes for a given vulnerability
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27515
milestone: '13.0'
diff --git a/db/migrate/20220213100000_remove_integration_type_triggers.rb b/db/migrate/20220213100000_remove_integration_type_triggers.rb
new file mode 100644
index 00000000000..137e5648125
--- /dev/null
+++ b/db/migrate/20220213100000_remove_integration_type_triggers.rb
@@ -0,0 +1,32 @@
+# frozen_string_literal: true
+
+class RemoveIntegrationTypeTriggers < Gitlab::Database::Migration[1.0]
+ include Gitlab::Database::SchemaHelpers
+
+ FUNCTION_NAME = 'integrations_set_type_new'
+ TRIGGER_ON_INSERT_NAME = 'trigger_type_new_on_insert'
+
+ def up
+ drop_trigger(:integrations, TRIGGER_ON_INSERT_NAME)
+ drop_function(FUNCTION_NAME)
+ end
+
+ def down
+ create_trigger_function(FUNCTION_NAME, replace: true) do
+ <<~SQL.squish
+ UPDATE integrations
+ SET type_new = COALESCE(NEW.type_new, regexp_replace(NEW.type, '\\A(.+)Service\\Z', 'Integrations::\\1'))
+ , type = COALESCE(NEW.type, regexp_replace(NEW.type_new, '\\AIntegrations::(.+)\\Z', '\\1Service'))
+ WHERE integrations.id = NEW.id;
+ RETURN NULL;
+ SQL
+ end
+
+ execute(<<~SQL)
+ CREATE TRIGGER #{TRIGGER_ON_INSERT_NAME}
+ AFTER INSERT ON integrations
+ FOR EACH ROW
+ EXECUTE FUNCTION #{FUNCTION_NAME}();
+ SQL
+ end
+end
diff --git a/db/post_migrate/20220213103859_remove_integrations_type.rb b/db/post_migrate/20220213103859_remove_integrations_type.rb
new file mode 100644
index 00000000000..c3633d1e7d3
--- /dev/null
+++ b/db/post_migrate/20220213103859_remove_integrations_type.rb
@@ -0,0 +1,132 @@
+# frozen_string_literal: true
+
+class RemoveIntegrationsType < Gitlab::Database::Migration[1.0]
+ disable_ddl_transaction!
+
+ MIGRATION = 'BackfillIntegrationsTypeNew'
+ BATCH_SIZE = 50
+ TABLE_NAME = :integrations
+ COLUMN = :type
+
+ # see db/post_migrate/20220213104531_create_indexes_on_integration_type_new.rb
+ def indices
+ [
+ {
+ name: "index_integrations_on_project_and_#{COLUMN}_where_inherit_null",
+ columns: [:project_id, COLUMN],
+ where: 'inherit_from_id IS NULL'
+ },
+ {
+ name: "index_integrations_on_project_id_and_#{COLUMN}_unique",
+ columns: [:project_id, COLUMN],
+ unique: true
+ },
+ {
+ name: "index_integrations_on_#{COLUMN}",
+ columns: [COLUMN]
+ },
+ {
+ name: "index_integrations_on_#{COLUMN}_and_instance_partial",
+ columns: [COLUMN, :instance],
+ where: 'instance = true',
+ unique: true
+ },
+ {
+ name: 'index_integrations_on_type_id_when_active_and_project_id_not_nu',
+ columns: [COLUMN, :id],
+ where: '((active = true) AND (project_id IS NOT NULL))'
+ },
+ {
+ name: "index_integrations_on_unique_group_id_and_#{COLUMN}",
+ columns: [:group_id, COLUMN],
+ unique: true
+ }
+ ]
+ end
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: MIGRATION,
+ table_name: TABLE_NAME,
+ column_name: :id,
+ job_arguments: [])
+
+ cleanup_unmigrated_rows!
+
+ remove_column :integrations, :type, :text
+ end
+
+ # WARNING: this migration is not really safe to be reverted, since doing so
+ # will leave the type column empty. If this migration is reverted, we will
+ # need to backfill it from type_new
+ def down
+ add_column :integrations, :type, 'character varying'
+
+ indices.each do |index|
+ add_concurrent_index TABLE_NAME, index[:columns], index.except(:columns)
+ end
+ end
+
+ # Convert any remaining unmigrated rows
+ def cleanup_unmigrated_rows!
+ tmp_index_name = 'tmp_idx_integrations_unmigrated_type_new'
+ add_concurrent_index :integrations, :id, where: 'type_new is null', name: tmp_index_name
+
+ define_batchable_model(:integrations).where(type_new: nil).each_batch do |batch|
+ min_id, max_id = batch.pluck(Arel.sql('MIN(id), MAX(id)')).first
+
+ connection.execute(<<~SQL)
+ WITH mapping(old_type, new_type) AS (VALUES
+ ('AsanaService', 'Integrations::Asana'),
+ ('AssemblaService', 'Integrations::Assembla'),
+ ('BambooService', 'Integrations::Bamboo'),
+ ('BugzillaService', 'Integrations::Bugzilla'),
+ ('BuildkiteService', 'Integrations::Buildkite'),
+ ('CampfireService', 'Integrations::Campfire'),
+ ('ConfluenceService', 'Integrations::Confluence'),
+ ('CustomIssueTrackerService', 'Integrations::CustomIssueTracker'),
+ ('DatadogService', 'Integrations::Datadog'),
+ ('DiscordService', 'Integrations::Discord'),
+ ('DroneCiService', 'Integrations::DroneCi'),
+ ('EmailsOnPushService', 'Integrations::EmailsOnPush'),
+ ('EwmService', 'Integrations::Ewm'),
+ ('ExternalWikiService', 'Integrations::ExternalWiki'),
+ ('FlowdockService', 'Integrations::Flowdock'),
+ ('HangoutsChatService', 'Integrations::HangoutsChat'),
+ ('IrkerService', 'Integrations::Irker'),
+ ('JenkinsService', 'Integrations::Jenkins'),
+ ('JiraService', 'Integrations::Jira'),
+ ('MattermostService', 'Integrations::Mattermost'),
+ ('MattermostSlashCommandsService', 'Integrations::MattermostSlashCommands'),
+ ('MicrosoftTeamsService', 'Integrations::MicrosoftTeams'),
+ ('MockCiService', 'Integrations::MockCi'),
+ ('MockMonitoringService', 'Integrations::MockMonitoring'),
+ ('PackagistService', 'Integrations::Packagist'),
+ ('PipelinesEmailService', 'Integrations::PipelinesEmail'),
+ ('PivotaltrackerService', 'Integrations::Pivotaltracker'),
+ ('PrometheusService', 'Integrations::Prometheus'),
+ ('PushoverService', 'Integrations::Pushover'),
+ ('RedmineService', 'Integrations::Redmine'),
+ ('SlackService', 'Integrations::Slack'),
+ ('SlackSlashCommandsService', 'Integrations::SlackSlashCommands'),
+ ('TeamcityService', 'Integrations::Teamcity'),
+ ('UnifyCircuitService', 'Integrations::UnifyCircuit'),
+ ('WebexTeamsService', 'Integrations::WebexTeams'),
+ ('YoutrackService', 'Integrations::Youtrack'),
+
+ -- EE-only integrations
+ ('GithubService', 'Integrations::Github'),
+ ('GitlabSlackApplicationService', 'Integrations::GitlabSlackApplication')
+ )
+
+ UPDATE integrations SET type_new = mapping.new_type
+ FROM mapping
+ WHERE integrations.type_new IS NULL
+ AND integrations.id BETWEEN #{min_id} AND #{max_id}
+ AND integrations.type = mapping.old_type
+ SQL
+ end
+ ensure
+ remove_concurrent_index_by_name(:integrations, tmp_index_name)
+ end
+end
diff --git a/db/post_migrate/20220503114353_prepare_confidential_note_index.rb b/db/post_migrate/20220503114353_prepare_confidential_note_index.rb
new file mode 100644
index 00000000000..08e60f3d935
--- /dev/null
+++ b/db/post_migrate/20220503114353_prepare_confidential_note_index.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class PrepareConfidentialNoteIndex < Gitlab::Database::Migration[2.0]
+ INDEX_NAME = 'index_notes_on_confidential'
+
+ def up
+ prepare_async_index :notes, :confidential, where: 'confidential = true', name: INDEX_NAME
+ end
+
+ def down
+ unprepare_async_index :notes, :confidential, name: INDEX_NAME
+ end
+end
diff --git a/db/schema_migrations/20220213100000 b/db/schema_migrations/20220213100000
new file mode 100644
index 00000000000..a62215351cd
--- /dev/null
+++ b/db/schema_migrations/20220213100000
@@ -0,0 +1 @@
+a6c1438ebcffca03e1c42ca9a233d087932fabcfd1eacf20dd801b9f574226e5 \ No newline at end of file
diff --git a/db/schema_migrations/20220213103859 b/db/schema_migrations/20220213103859
new file mode 100644
index 00000000000..8950d31675e
--- /dev/null
+++ b/db/schema_migrations/20220213103859
@@ -0,0 +1 @@
+ffc9a2dd97ace1f34e0cfca0c407dcf98dabf30379a441ba948261aec531fe85 \ No newline at end of file
diff --git a/db/schema_migrations/20220503114353 b/db/schema_migrations/20220503114353
new file mode 100644
index 00000000000..26c027548eb
--- /dev/null
+++ b/db/schema_migrations/20220503114353
@@ -0,0 +1 @@
+2750d11c933db0404f9a32ea5c8a7f028e07f720f83b288e9476c33326ec63c5 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 0d494106594..7500129a61e 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -89,14 +89,6 @@ RETURN NULL;
END
$$;
-CREATE FUNCTION integrations_set_type_new() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
-BEGIN
-UPDATE integrations SET type_new = COALESCE(NEW.type_new, regexp_replace(NEW.type, '\A(.+)Service\Z', 'Integrations::\1')) , type = COALESCE(NEW.type, regexp_replace(NEW.type_new, '\AIntegrations::(.+)\Z', '\1Service')) WHERE integrations.id = NEW.id; RETURN NULL;
-END
-$$;
-
CREATE FUNCTION next_traversal_ids_sibling(traversal_ids integer[]) RETURNS integer[]
LANGUAGE plpgsql IMMUTABLE STRICT
AS $$
@@ -16148,7 +16140,6 @@ ALTER SEQUENCE insights_id_seq OWNED BY insights.id;
CREATE TABLE integrations (
id integer NOT NULL,
- type character varying,
project_id integer,
created_at timestamp without time zone,
updated_at timestamp without time zone,
@@ -27986,26 +27977,14 @@ CREATE INDEX index_integrations_on_inherit_from_id ON integrations USING btree (
CREATE INDEX index_integrations_on_project_and_type_new_where_inherit_null ON integrations USING btree (project_id, type_new) WHERE (inherit_from_id IS NULL);
-CREATE INDEX index_integrations_on_project_and_type_where_inherit_null ON integrations USING btree (project_id, type) WHERE (inherit_from_id IS NULL);
-
CREATE UNIQUE INDEX index_integrations_on_project_id_and_type_new_unique ON integrations USING btree (project_id, type_new);
-CREATE UNIQUE INDEX index_integrations_on_project_id_and_type_unique ON integrations USING btree (project_id, type);
-
-CREATE INDEX index_integrations_on_type ON integrations USING btree (type);
-
-CREATE UNIQUE INDEX index_integrations_on_type_and_instance_partial ON integrations USING btree (type, instance) WHERE (instance = true);
-
-CREATE INDEX index_integrations_on_type_id_when_active_and_project_id_not_nu ON integrations USING btree (type, id) WHERE ((active = true) AND (project_id IS NOT NULL));
-
CREATE INDEX index_integrations_on_type_new ON integrations USING btree (type_new);
CREATE INDEX index_integrations_on_type_new_and_instance_partial ON integrations USING btree (type_new, instance) WHERE (instance = true);
CREATE INDEX index_integrations_on_type_new_id_when_active_and_has_project ON integrations USING btree (type_new, id) WHERE ((active = true) AND (project_id IS NOT NULL));
-CREATE UNIQUE INDEX index_integrations_on_unique_group_id_and_type ON integrations USING btree (group_id, type);
-
CREATE INDEX index_integrations_on_unique_group_id_and_type_new ON integrations USING btree (group_id, type_new);
CREATE INDEX index_internal_ids_on_namespace_id ON internal_ids USING btree (namespace_id);
@@ -31126,8 +31105,6 @@ CREATE TRIGGER trigger_projects_parent_id_on_insert AFTER INSERT ON projects FOR
CREATE TRIGGER trigger_projects_parent_id_on_update AFTER UPDATE ON projects FOR EACH ROW WHEN ((old.namespace_id IS DISTINCT FROM new.namespace_id)) EXECUTE FUNCTION insert_projects_sync_event();
-CREATE TRIGGER trigger_type_new_on_insert AFTER INSERT ON integrations FOR EACH ROW EXECUTE FUNCTION integrations_set_type_new();
-
CREATE TRIGGER trigger_update_has_issues_on_vulnerability_issue_links_delete AFTER DELETE ON vulnerability_issue_links FOR EACH ROW EXECUTE FUNCTION unset_has_issues_on_vulnerability_reads();
CREATE TRIGGER trigger_update_has_issues_on_vulnerability_issue_links_update AFTER INSERT ON vulnerability_issue_links FOR EACH ROW EXECUTE FUNCTION set_has_issues_on_vulnerability_reads();
diff --git a/doc/administration/gitaly/praefect.md b/doc/administration/gitaly/praefect.md
index bbb34a41f84..537d969e400 100644
--- a/doc/administration/gitaly/praefect.md
+++ b/doc/administration/gitaly/praefect.md
@@ -440,6 +440,7 @@ On the **Praefect** node:
sidekiq['enable'] = false
gitlab_workhorse['enable'] = false
gitaly['enable'] = false
+ gitlab_kas['enable'] = false
# Enable only the Praefect service
praefect['enable'] = true
diff --git a/doc/api/status_checks.md b/doc/api/status_checks.md
index 3671ddbd138..b44cc3e6f55 100644
--- a/doc/api/status_checks.md
+++ b/doc/api/status_checks.md
@@ -31,7 +31,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/status_checks
"id": 2,
"name": "Rule 1",
"external_url": "https://gitlab.com/test-endpoint",
- "status": "pass"
+ "status": "passed"
},
{
"id": 1,
diff --git a/doc/development/feature_flags/index.md b/doc/development/feature_flags/index.md
index be20b89653c..54158de6893 100644
--- a/doc/development/feature_flags/index.md
+++ b/doc/development/feature_flags/index.md
@@ -154,7 +154,6 @@ This process is meant to ensure consistent feature flag usage in the codebase. A
- Be known. Only use feature flags that are explicitly defined.
- Not be defined twice. They have to be defined either in FOSS or EE, but not both.
- Use a valid and consistent `type:` across all invocations.
-- Use the same `default_enabled:` across all invocations.
- Have an owner.
All feature flags known to GitLab are self-documented in YAML files stored in:
@@ -168,7 +167,7 @@ Each feature flag is defined in a separate YAML file consisting of a number of f
|---------------------|----------|----------------------------------------------------------------|
| `name` | yes | Name of the feature flag. |
| `type` | yes | Type of feature flag. |
-| `default_enabled` | yes | The default state of the feature flag that is strictly validated, with `default_enabled:` passed as an argument. |
+| `default_enabled` | yes | The default state of the feature flag. |
| `introduced_by_url` | no | The URL to the merge request that introduced the feature flag. |
| `rollout_issue_url` | no | The URL to the Issue covering the feature flag rollout. |
| `milestone` | no | Milestone in which the feature was added. |
@@ -256,42 +255,10 @@ if Feature.disabled?(:my_feature_flag, project)
end
```
-In rare cases you may want to make a feature enabled by default. If so, explain the reasoning
-in the merge request. Use `default_enabled: true` when checking the feature flag state:
+Default behavior for not configured feature flags is controlled
+by `default_enabled:` in YAML definition.
-```ruby
-if Feature.enabled?(:feature_flag, project, default_enabled: true)
- # execute code if feature flag is enabled
-else
- # execute code if feature flag is disabled
-end
-
-if Feature.disabled?(:my_feature_flag, project, default_enabled: true)
- # execute code if feature flag is disabled
-end
-```
-
-If not specified, `default_enabled` is `false`.
-
-To force reading the `default_enabled` value from the relative YAML definition file, use
-`default_enabled: :yaml`:
-
-```ruby
-if Feature.enabled?(:feature_flag, project, default_enabled: :yaml)
- # execute code if feature flag is enabled
-end
-```
-
-```ruby
-if Feature.disabled?(:feature_flag, project, default_enabled: :yaml)
- # execute code if feature flag is disabled
-end
-```
-
-This allows to use the same feature flag check across various parts of the codebase and
-maintain the status of `default_enabled` in the YAML definition file which is the SSOT.
-
-If `default_enabled: :yaml` is used, a YAML definition is expected or an error is raised
+If feature flag does not have a YAML definition an error will be raised
in development or test environment, while returning `false` on production.
If not specified, the default feature flag type for `Feature.enabled?` and `Feature.disabled?`
@@ -381,16 +348,6 @@ so checking for `gon.features.vim_bindings` would not work.
See the [Vue guide](../fe_guide/vue.md#accessing-feature-flags) for details about
how to access feature flags in a Vue component.
-In rare cases you may want to make a feature enabled by default. If so, explain the reasoning
-in the merge request. Use `default_enabled: true` when checking the feature flag state:
-
-```ruby
-before_action do
- # Prefer to scope it per project or user e.g.
- push_frontend_feature_flag(:vim_bindings, project, default_enabled: true)
-end
-```
-
If not specified, the default feature flag type for `push_frontend_feature_flag`
is `type: development`. For all other feature flag types, you must specify the `type:`:
@@ -700,9 +657,7 @@ You can control whether the `Flipper::Adapters::Memory` or `ActiveRecord` mode i
#### `stub_feature_flags: true` (default and preferred)
In this mode Flipper is configured to use `Flipper::Adapters::Memory` and mark all feature
-flags to be on-by-default and persisted on a first use. This overwrites the `default_enabled:`
-of `Feature.enabled?` and `Feature.disabled?` returning always `true` unless feature flag
-is persisted.
+flags to be on-by-default and persisted on a first use.
Make sure behavior under feature flag doesn't go untested in some non-specific contexts.
diff --git a/doc/development/features_inside_dot_gitlab.md b/doc/development/features_inside_dot_gitlab.md
index 7b11b541b5a..ca7dbd6adde 100644
--- a/doc/development/features_inside_dot_gitlab.md
+++ b/doc/development/features_inside_dot_gitlab.md
@@ -16,7 +16,6 @@ When implementing new features, please refer to these existing features to avoid
- [CODEOWNERS](../user/project/code_owners.md#set-up-code-owners): `.gitlab/CODEOWNERS`.
- [Route Maps](../ci/review_apps/#route-maps): `.gitlab/route-map.yml`.
- [Customize Auto DevOps Helm Values](../topics/autodevops/customize.md#customize-values-for-helm-chart): `.gitlab/auto-deploy-values.yaml`.
-- [GitLab managed apps CI/CD](../user/clusters/applications.md#prerequisites): `.gitlab/managed-apps/config.yaml`.
- [Insights](../user/project/insights/index.md#configure-your-insights): `.gitlab/insights.yml`.
- [Service Desk Templates](../user/project/service_desk.md#using-customized-email-templates): `.gitlab/service_desk_templates/`.
- [Web IDE](../user/project/web_ide/#web-ide-configuration-file): `.gitlab/.gitlab-webide.yml`.
diff --git a/doc/development/service_ping/implement.md b/doc/development/service_ping/implement.md
index 48d72431ddc..52f5ea429ed 100644
--- a/doc/development/service_ping/implement.md
+++ b/doc/development/service_ping/implement.md
@@ -367,7 +367,7 @@ Implemented using Redis methods [PFADD](https://redis.io/commands/pfadd) and [PF
aggregation.
- `aggregation`: may be set to a `:daily` or `:weekly` key. Defines how counting data is stored in Redis.
Aggregation on a `daily` basis does not pull more fine grained data.
- - `feature_flag`: optional `default_enabled: :yaml`. If no feature flag is set then the tracking is enabled. One feature flag can be used for multiple events. For details, see our [GitLab internal Feature flags](../feature_flags/index.md) documentation. The feature flags are owned by the group adding the event tracking.
+ - `feature_flag`: if no feature flag is set then the tracking is enabled. One feature flag can be used for multiple events. For details, see our [GitLab internal Feature flags](../feature_flags/index.md) documentation. The feature flags are owned by the group adding the event tracking.
1. Use one of the following methods to track the event:
diff --git a/doc/operations/error_tracking.md b/doc/operations/error_tracking.md
index 1e1391c8fe8..2a007eade99 100644
--- a/doc/operations/error_tracking.md
+++ b/doc/operations/error_tracking.md
@@ -32,7 +32,7 @@ For error tracking to work, you need two pieces:
### Deploying Sentry
-You can sign up to the cloud hosted [Sentry](https://sentry.io), deploy your own [on-premise instance](https://github.com/getsentry/onpremise/), or use GitLab to [install Sentry to a Kubernetes cluster](../user/clusters/applications.md#install-sentry-using-gitlab-cicd).
+You can sign up to the cloud hosted [Sentry](https://sentry.io), deploy your own [on-premise instance](https://github.com/getsentry/onpremise/), or use GitLab to [install Sentry to a Kubernetes cluster](../user/infrastructure/clusters/manage/management_project_applications/sentry.md).
### Enabling Sentry
diff --git a/doc/update/removals.md b/doc/update/removals.md
index 1d213159e6f..b0b8d5007d8 100644
--- a/doc/update/removals.md
+++ b/doc/update/removals.md
@@ -188,6 +188,16 @@ The new security approvals feature is similar to vulnerability check. For exampl
- A two-step approval process can be enforced for any desired changes to security approval rules.
- A single set of security policies can be applied to multiple development projects to allow for ease in maintaining a single, centralized ruleset.
+### `Managed-Cluster-Applications.gitlab-ci.yml`
+
+WARNING:
+This feature was changed or removed in 15.0
+as a [breaking change](https://docs.gitlab.com/ee/development/contributing/#breaking-changes).
+Before updating GitLab, review the details carefully to determine if you need to make any
+changes to your code, settings, or workflow.
+
+The `Managed-Cluster-Applications.gitlab-ci.yml` CI/CD template is being removed. If you need an alternative, try the [Cluster Management project template](https://gitlab.com/gitlab-org/gitlab/-/issues/333610) instead. If your are not ready to move, you can copy the [last released version](https://gitlab.com/gitlab-org/gitlab-foss/-/blob/v14.10.1/lib/gitlab/ci/templates/Managed-Cluster-Applications.gitlab-ci.yml) of the template into your project.
+
### `artifacts:report:cobertura` keyword
As of GitLab 15.0, the `artifacts:report:cobertura` keyword has been replaced by
diff --git a/doc/user/clusters/applications.md b/doc/user/clusters/applications.md
index 277ce38aa3c..7b5ea7d12fd 100644
--- a/doc/user/clusters/applications.md
+++ b/doc/user/clusters/applications.md
@@ -2,782 +2,12 @@
stage: Configure
group: Configure
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+remove_date: '2022-08-22'
+redirect_to: '../../update/removals.md#managed-cluster-applicationsgitlab-ciyml'
---
-# GitLab Managed Apps (DEPRECATED) **(FREE)**
+# GitLab Managed Apps (removed) **(FREE)**
-NOTE:
-The new recommended way to manage cluster applications is to use the [cluster management project template](management_project_template.md).
-If you want to migrate your GitLab managed apps management to this template, reference to [migrating from GitLab managed apps to project template](migrating_from_gma_to_project_template.md).
-
-**GitLab Managed Apps** was created to help you configure applications in your
-cluster directly from GitLab. You could use this feature through two different
-methods: "one-click install" and "CI/CD template". Both methods are **deprecated**:
-
-- The **one-click install** method was [removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63348) in GitLab 14.0.
-- The **CI/CD template method** was deprecated in GitLab 13.12 and is scheduled
- to be removed in GitLab 15.0.
-
-Both methods were limiting as you couldn't fully customize your third-party apps installed
-through GitLab Managed Apps. Therefore, we decided to deprecate this feature and provide
-better [GitOps-driven alternatives](https://about.gitlab.com/direction/configure/kubernetes_management/#gitlab-managed-applications) to our users, such as [cluster integrations](integrations.md) and [cluster management project](management_project.md).
-
-## Install using GitLab CI/CD (DEPRECATED)
-
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/20822) in GitLab 12.6.
-> - [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/327908) in GitLab 13.12.
-
-WARNING:
-The GitLab Managed Apps CI/CD installation method was [deprecated in 13.12](https://gitlab.com/gitlab-org/gitlab/-/issues/327908).
-Your applications continue to work. However, we no longer support and maintain the GitLab CI/CD template for
-Managed Apps (`Managed-Cluster-Applications.gitlab-ci.yml`).
-The new recommended way to manage cluster applications is to use the [cluster management project template](management_project_template.md).
-If you want to migrate your GitLab managed apps management to this template, reference to [migrating from GitLab managed apps to project template](migrating_from_gma_to_project_template.md).
-
-The CI/CD template was the primary method for installing applications to clusters via GitLab Managed Apps
-and customize them through Helm.
-
-Supported applications:
-
-- [Ingress](#install-ingress-using-gitlab-cicd)
-- [cert-manager](#install-cert-manager-using-gitlab-cicd)
-- [Sentry](#install-sentry-using-gitlab-cicd)
-- [GitLab Runner](#install-gitlab-runner-using-gitlab-cicd)
-- [Vault](#install-vault-using-gitlab-cicd)
-- [JupyterHub](#install-jupyterhub-using-gitlab-cicd)
-- [Elastic Stack](#install-elastic-stack-using-gitlab-cicd)
-- [Crossplane](#install-crossplane-using-gitlab-cicd)
-- [Knative](#install-knative-using-gitlab-cicd)
-- [PostHog](#install-posthog-using-gitlab-cicd)
-- [Prometheus](#install-prometheus-using-gitlab-cicd)
-
-### Prerequisites
-
-You can find and import all the files referenced below
-in the [example cluster applications
-project](https://gitlab.com/gitlab-org/cluster-integration/example-cluster-applications/).
-
-To install applications using GitLab CI/CD:
-
-1. Connect the cluster to a [cluster management project](management_project.md).
-1. In that project, add a `.gitlab-ci.yml` file with the following content:
-
- ```yaml
- include:
- - template: Managed-Cluster-Applications.gitlab-ci.yml
- ```
-
- The job provided by this template connects to the `*` (default) cluster using tools provided
- in a custom Docker image. It requires that you have a runner registered with the Docker,
- Kubernetes, or Docker Machine executor.
-
- To install to a specific cluster, read
- [Use the template with a custom environment](#use-the-template-with-a-custom-environment).
-
-1. Add a `.gitlab/managed-apps/config.yaml` file to define which
- applications you would like to install. Define the `installed` key as
- `true` to install the application and `false` to uninstall the
- application. For example, to install Ingress:
-
- ```yaml
- ingress:
- installed: true
- ```
-
-1. Optionally, define `.gitlab/managed-apps/<application>/values.yaml` file to
- customize values for the installed application.
-
-A GitLab CI/CD pipeline runs on the default branch to install the
-applications you have configured. In case of pipeline failure, the
-output of the [Helm Tiller](https://v2.helm.sh/docs/install/#running-tiller-locally) binary
-is saved as a [CI job artifact](../../ci/pipelines/job_artifacts.md).
-
-#### Prerequisites in GitLab versions earlier than 13.5
-
-For GitLab versions 13.5 and earlier, the Ingress, Fluentd, Prometheus, and Sentry
-apps were fetched from the central Helm stable repository (`https://kubernetes-charts.storage.googleapis.com/`).
-This repository [was deleted](https://github.com/helm/charts#deprecation-timeline)
-on November 13, 2020. This causes the installation CI/CD pipeline to
-fail. Upgrade to GitLab 13.6, or alternatively, you can
-use the following `.gitlab-ci.yml`, which has been tested in GitLab 13.5:
-
-```yaml
-include:
- - template: Managed-Cluster-Applications.gitlab-ci.yml
-
-apply:
- image: "registry.gitlab.com/gitlab-org/cluster-integration/cluster-applications:v0.37.0"
-```
-
-### Use the template with a custom environment
-
-If you only want apps to be installed on a specific cluster, or if your cluster's
-scope does not match `production`, you can override the environment name in your `.gitlab-ci.yml`
-file:
-
-```yaml
-include:
- - template: Managed-Cluster-Applications.gitlab-ci.yml
-
-apply:
- except:
- variables:
- - '$CI_JOB_NAME == "apply"'
-
-.managed-apps:
- extends: apply
-
-example-install:
- extends: .managed-apps
- environment:
- name: example/production
-```
-
-### Important notes
-
-Note the following:
-
-- We recommend using the cluster management project exclusively for managing deployments to a cluster.
- Do not add your application's source code to such projects.
-- When you set the value for `installed` key back to `false`, the application is
- unprovisioned from the cluster.
-- If you update `.gitlab/managed-apps/<application>/values.yaml` with new values, the
- application is redeployed.
-
-### Install Ingress using GitLab CI/CD
-
-> [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/327908) in GitLab 13.12.
-
-To install Ingress, define the `.gitlab/managed-apps/config.yaml` file
-with:
-
-```yaml
-ingress:
- installed: true
-```
-
-Ingress is installed into the `gitlab-managed-apps` namespace
-of your cluster.
-
-You can customize the installation of Ingress by defining a
-`.gitlab/managed-apps/ingress/values.yaml` file in your cluster
-management project. Refer to the
-[chart](https://github.com/helm/charts/tree/master/stable/nginx-ingress)
-for the available configuration options.
-
-Support for installing the Ingress managed application is provided by the GitLab Configure group.
-If you run into unknown issues, [open a new issue](https://gitlab.com/gitlab-org/gitlab/-/issues/new),
-and ping at least 2 people from the
-[Configure group](https://about.gitlab.com/handbook/product/categories/#configure-group).
-
-### Install cert-manager using GitLab CI/CD
-
-> [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/327908) in GitLab 13.12.
-
-cert-manager is installed using GitLab CI/CD by defining configuration in
-`.gitlab/managed-apps/config.yaml`.
-
-cert-manager:
-
-- Is installed into the `gitlab-managed-apps` namespace of your cluster.
-- Can be installed with or without a default
- [Let's Encrypt `ClusterIssuer`](https://cert-manager.io/docs/configuration/acme/), which requires an
- email address to be specified. The email address is used by Let's Encrypt to
- contact you about expiring certificates and issues related to your account.
-
-The following configuration is required to install cert-manager using GitLab CI/CD:
-
-```yaml
-certManager:
- installed: true
- letsEncryptClusterIssuer:
- installed: true
- email: "user@example.com"
-```
-
-The following installs cert-manager using GitLab CI/CD without the default `ClusterIssuer`:
-
-```yaml
-certManager:
- installed: true
- letsEncryptClusterIssuer:
- installed: false
-```
-
-You can customize the installation of cert-manager by defining a
-`.gitlab/managed-apps/cert-manager/values.yaml` file in your cluster
-management project. Refer to the
-[chart](https://github.com/jetstack/cert-manager) for the
-available configuration options.
-
-Support for installing the Cert Manager managed application is provided by the
-GitLab Configure group. If you run into unknown issues,
-[open a new issue](https://gitlab.com/gitlab-org/gitlab/-/issues/new), and ping at
-least 2 people from the
-[Configure group](https://about.gitlab.com/handbook/product/categories/#configure-group).
-
-### Install Sentry using GitLab CI/CD
-
-> [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/327908) in GitLab 13.12.
-
-The Sentry Helm chart [recommends](https://github.com/helm/charts/blob/f6e5784f265dd459c5a77430185d0302ed372665/stable/sentry/values.yaml#L284-L285)
-at least 3 GB of available RAM for database migrations.
-
-To install Sentry, define the `.gitlab/managed-apps/config.yaml` file
-with:
-
-```yaml
-sentry:
- installed: true
-```
-
-Sentry is installed into the `gitlab-managed-apps` namespace
-of your cluster.
-
-You can customize the installation of Sentry by defining
-`.gitlab/managed-apps/sentry/values.yaml` file in your cluster
-management project. Refer to the
-[chart](https://github.com/helm/charts/tree/master/stable/sentry)
-for the available configuration options.
-
-We recommend you pay close attention to the following configuration options:
-
-- `email`. Needed to invite users to your Sentry instance and to send error emails.
-- `user`. Where you can set the login credentials for the default administrator user.
-- `postgresql`. For a PostgreSQL password that can be used when running future updates.
-
-When upgrading, it's important to provide the existing PostgreSQL password (given
-using the `postgresql.postgresqlPassword` key) to avoid authentication errors.
-Read the [PostgreSQL chart documentation](https://github.com/helm/charts/tree/master/stable/postgresql#upgrade)
-for more information.
-
-Here is an example configuration for Sentry:
-
-```yaml
-# Admin user to create
-user:
- # Indicated to create the admin user or not,
- # Default is true as the initial installation.
- create: true
- email: "<your email>"
- password: "<your password>"
-
-email:
- from_address: "<your from email>"
- host: smtp
- port: 25
- use_tls: false
- user: "<your email username>"
- password: "<your email password>"
- enable_replies: false
-
-ingress:
- enabled: true
- hostname: "<sentry.example.com>"
-
-# Needs to be here between runs.
-# See https://github.com/helm/charts/tree/master/stable/postgresql#upgrade for more info
-postgresql:
- postgresqlPassword: example-postgresql-password
-```
-
-Support for installing the Sentry managed application is provided by the
-GitLab Monitor group. If you run into unknown issues,
-[open a new issue](https://gitlab.com/gitlab-org/gitlab/-/issues/new), and ping at
-least 2 people from the
-[Monitor group](https://about.gitlab.com/handbook/product/categories/#monitor-group).
-
-### Install PostHog using GitLab CI/CD
-
-> [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/327908) in GitLab 13.12.
-
-[PostHog](https://posthog.com) 🦔 is a developer-friendly, open-source product analytics platform.
-
-To install PostHog into the `gitlab-managed-apps` namespace of your cluster,
-define the `.gitlab/managed-apps/config.yaml` file with:
-
-```yaml
-posthog:
- installed: true
-```
-
-You can customize the installation of PostHog by defining `.gitlab/managed-apps/posthog/values.yaml`
-in your cluster management project. Refer to the
-[Configuration section](https://github.com/PostHog/charts/tree/master/charts/posthog)
-of the PostHog chart's README for the available configuration options.
-
-You must provide a PostgreSQL password in `postgresql.postgresqlPassword`
-to avoid authentication errors. Read the
-[PostgreSQL chart documentation](https://github.com/helm/charts/tree/master/stable/postgresql#upgrade)
-for more information.
-
-Redis pods are restarted between upgrades. To prevent downtime, provide a Redis
-password using the `redis.password` key. This prevents a new password from
-being generated on each restart.
-
-Here is an example configuration for PostHog:
-
-```yaml
-ingress:
- enabled: true
- hostname: "<posthog.example.com>"
-
-# This will be autogenerated if you skip it. Include if you have 2 or more web replicas
-posthogSecret: 'long-secret-key-used-to-sign-cookies'
-
-# Needs to be here between runs.
-# See https://github.com/helm/charts/tree/master/stable/postgresql#upgrade for more info
-postgresql:
- postgresqlPassword: example-postgresql-password
-
-# Recommended to set this to a value to redis prevent downtime between upgrades
-redis:
- password: example-redis-password
-```
-
-Support for the PostHog managed application is provided by the PostHog team.
-If you run into issues,
-[open a support ticket](https://github.com/PostHog/posthog/issues/new/choose) directly.
-
-### Install Prometheus using GitLab CI/CD
-
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25138) in GitLab 12.8.
-> - [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/327908) in GitLab 13.12.
-
-[Prometheus](https://prometheus.io/docs/introduction/overview/) is an
-open-source monitoring and alerting system for supervising your
-deployed applications.
-
-To install Prometheus into the `gitlab-managed-apps` namespace of your cluster,
-define the `.gitlab/managed-apps/config.yaml` file with:
-
-```yaml
-prometheus:
- installed: true
-```
-
-You can customize the installation of Prometheus by defining
-`.gitlab/managed-apps/prometheus/values.yaml` in your cluster management
-project. Refer to the
-[Configuration section](https://github.com/helm/charts/tree/master/stable/prometheus#configuration)
-of the Prometheus chart's README for the available configuration options.
-
-Support for installing the Prometheus managed application is provided by the
-GitLab Monitor group. If you run into unknown issues,
-[open a new issue](https://gitlab.com/gitlab-org/gitlab/-/issues/new), and ping at
-least 2 people from the [Monitor group](https://about.gitlab.com/handbook/product/categories/#monitor-group).
-
-### Install GitLab Runner using GitLab CI/CD
-
-> [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/327908) in GitLab 13.12.
-
-GitLab Runner is installed using GitLab CI/CD by defining configuration in
-`.gitlab/managed-apps/config.yaml`.
-
-The following configuration is required to install GitLab Runner using GitLab CI/CD:
-
-```yaml
-gitlabRunner:
- installed: true
-```
-
-GitLab Runner is installed into the `gitlab-managed-apps` namespace of your cluster.
-
-For GitLab Runner to function, you _must_ specify the following:
-
-- `gitlabUrl`: The GitLab server full URL (for example, `https://gitlab.example.com`)
- to register the Runner against.
-- `runnerRegistrationToken`: The registration token for adding new runners to GitLab.
- This must be [retrieved from your GitLab instance](../../ci/runners/index.md).
-
-These values can be specified using [CI/CD variables](../../ci/variables/index.md):
-
-- `GITLAB_RUNNER_GITLAB_URL` is used for `gitlabUrl`.
-- `GITLAB_RUNNER_REGISTRATION_TOKEN` is used for `runnerRegistrationToken`
-
-The methods of specifying these values are mutually exclusive. Either specify variables `GITLAB_RUNNER_REGISTRATION_TOKEN` and `GITLAB_RUNNER_TOKEN` as CI variables (recommended) or provide values for `runnerRegistrationToken:` and `runnerToken:` in `.gitlab/managed-apps/gitlab-runner/values.yaml`. If you choose to use CI variables, comment out or remove `runnerRegistrationToken:` and `runnerToken:` from `.gitlab/managed-apps/gitlab-runner/values`.
-
-The runner registration token allows connection to a project by a runner and therefore should be treated as a secret to prevent malicious use and code exfiltration through a runner. For this reason, we recommend that you specify the runner registration token as a [protected variable](../../ci/variables/index.md#protect-a-cicd-variable) and [masked variable](../../ci/variables/index.md#mask-a-cicd-variable) and do not commit them to the Git repository in the `values.yaml` file.
-
-You can customize the installation of GitLab Runner by defining
-`.gitlab/managed-apps/gitlab-runner/values.yaml` file in your cluster
-management project. Refer to the
-[chart](https://gitlab.com/gitlab-org/charts/gitlab-runner) for the
-available configuration options.
-
-Support for installing the GitLab Runner managed application is provided by the
-GitLab Runner group. If you run into unknown issues,
-[open a new issue](https://gitlab.com/gitlab-org/gitlab/-/issues/new), and ping at
-least 2 people from the
-[Runner group](https://about.gitlab.com/handbook/product/categories/#runner-group).
-
-### Install Vault using GitLab CI/CD
-
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/9982) in GitLab 12.9.
-> - [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/327908) in GitLab 13.12.
-
-[HashiCorp Vault](https://www.vaultproject.io/) is a secrets management solution which
-can be used to safely manage and store passwords, credentials, certificates, and more. A Vault
-installation could be leveraged to provide a single secure data store for credentials
-used in your applications, GitLab CI/CD jobs, and more. It could also serve as a way of
-providing SSL/TLS certificates to systems and deployments in your infrastructure. Leveraging
-Vault as a single source for all these credentials allows greater security by having
-a single source of access, control, and auditability around all your sensitive
-credentials and certificates. This feature requires giving GitLab the highest level of access and
-control. Therefore, if GitLab is compromised, the security of this Vault instance is as well. To
-avoid this security risk, GitLab recommends using your own HashiCorp Vault to leverage
-[external secrets with CI](../../ci/secrets/index.md).
-
-To install Vault, enable it in the `.gitlab/managed-apps/config.yaml` file:
-
-```yaml
-vault:
- installed: true
-```
-
-By default you receive a basic Vault setup with no scalable storage backend. This
-is enough for simple testing and small-scale deployments, though has limits
-to how much it can scale, and as it's a single instance deployment, upgrading the
-Vault application causes downtime.
-
-To optimally use Vault in a production environment, it's ideal to have a good understanding
-of the internals of Vault and how to configure it. This can be done by reading
-the [Vault Configuration guide](../../ci/secrets/#configure-your-vault-server),
-the [Vault documentation](https://www.vaultproject.io/docs/internals) and
-the Vault Helm chart [`values.yaml` file](https://github.com/hashicorp/vault-helm/blob/v0.3.3/values.yaml).
-
-At a minimum, most users set up:
-
-- A [seal](https://www.vaultproject.io/docs/configuration/seal) for extra encryption
- of the main key.
-- A [storage backend](https://www.vaultproject.io/docs/configuration/storage) that's
- suitable for environment and storage security requirements.
-- [HA Mode](https://www.vaultproject.io/docs/concepts/ha).
-- The [Vault UI](https://www.vaultproject.io/docs/configuration/ui).
-
-The following is an example values file (`.gitlab/managed-apps/vault/values.yaml`)
-that configures Google Key Management Service for auto-unseal, using a Google Cloud Storage backend, enabling
-the Vault UI, and enabling HA with 3 pod replicas. The `storage` and `seal` stanzas
-below are examples and should be replaced with settings specific to your environment.
-
-```yaml
-# Enable the Vault WebUI
-ui:
- enabled: true
-server:
- # Disable the built in data storage volume as it's not safe for High Availability mode
- dataStorage:
- enabled: false
- # Enable High Availability Mode
- ha:
- enabled: true
- # Configure Vault to listen on port 8200 for normal traffic and port 8201 for inter-cluster traffic
- config: |
- listener "tcp" {
- tls_disable = 1
- address = "[::]:8200"
- cluster_address = "[::]:8201"
- }
- # Configure Vault to store its data in a GCS Bucket backend
- storage "gcs" {
- path = "gcs://my-vault-storage/vault-bucket"
- ha_enabled = "true"
- }
- # Configure Vault to unseal storage using a GKMS key
- seal "gcpckms" {
- project = "vault-helm-dev-246514"
- region = "global"
- key_ring = "vault-helm-unseal-kr"
- crypto_key = "vault-helm-unseal-key"
- }
-```
-
-After you have successfully installed Vault, you must
-[initialize the Vault](https://learn.hashicorp.com/tutorials/vault/getting-started-deploy#initializing-the-vault)
-and obtain the initial root token. You need access to your Kubernetes cluster that
-Vault has been deployed into in order to do this. To initialize the Vault, get a
-shell to one of the Vault pods running inside Kubernetes (typically this is done
-by using the `kubectl` command line tool). After you have a shell into the pod,
-run the `vault operator init` command:
-
-```shell
-kubectl -n gitlab-managed-apps exec -it vault-0 sh
-/ $ vault operator init
-```
-
-This should give you your unseal keys and initial root token. Make sure to note these down
-and keep these safe, as they're required to unseal the Vault throughout its lifecycle.
-
-Support for installing the Vault managed application is provided by the
-GitLab Release Management group. If you run into unknown issues,
-[open a new issue](https://gitlab.com/gitlab-org/gitlab/-/issues/new), and ping at
-least 2 people from the
-[Release Management group](https://about.gitlab.com/handbook/product/categories/#release-management-group).
-
-### Install JupyterHub using GitLab CI/CD
-
-> - [Introduced](https://gitlab.com/gitlab-org/cluster-integration/cluster-applications/-/merge_requests/40) in GitLab 12.8.
-> - [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/327908) in GitLab 13.12.
-
-JupyterHub is installed using GitLab CI/CD by defining configuration in
-`.gitlab/managed-apps/config.yaml` as follows:
-
-```yaml
-jupyterhub:
- installed: true
- gitlabProjectIdWhitelist: []
- gitlabGroupWhitelist: []
-```
-
-In the configuration:
-
-- `gitlabProjectIdWhitelist` restricts GitLab authentication to only members of the specified projects.
-- `gitlabGroupWhitelist` restricts GitLab authentication to only members of the specified groups.
-- Specifying an empty array for both allows any user on the GitLab instance to sign in.
-
-JupyterHub is installed into the `gitlab-managed-apps` namespace of your cluster.
-
-For JupyterHub to function, you must set up an [OAuth Application](../../integration/oauth_provider.md).
-Set:
-
-- "Redirect URI" to `http://<JupyterHub Host>/hub/oauth_callback`.
-- "Scope" to `api read_repository write_repository`.
-
-In addition, the following variables must be specified using [CI/CD variables](../../ci/variables/index.md):
-
-- `JUPYTERHUB_PROXY_SECRET_TOKEN` - Secure string used for signing communications
- from the hub. Read [`proxy.secretToken`](https://zero-to-jupyterhub.readthedocs.io/en/stable/reference/reference.html#proxy-secrettoken).
-- `JUPYTERHUB_COOKIE_SECRET` - Secure string used for signing secure cookies. Read
- [`hub.cookieSecret`](https://zero-to-jupyterhub.readthedocs.io/en/stable/reference/reference.html#hub-cookiesecret).
-- `JUPYTERHUB_HOST` - Hostname used for the installation. For example, `jupyter.gitlab.example.com`.
-- `JUPYTERHUB_GITLAB_HOST` - Hostname of the GitLab instance used for authentication.
- For example, `gitlab.example.com`.
-- `JUPYTERHUB_AUTH_CRYPTO_KEY` - A 32-byte encryption key used to set
- [`auth.state.cryptoKey`](https://zero-to-jupyterhub.readthedocs.io/en/stable/reference/reference.html#auth-state-cryptokey).
-- `JUPYTERHUB_AUTH_GITLAB_CLIENT_ID` - "Application ID" for the OAuth Application.
-- `JUPYTERHUB_AUTH_GITLAB_CLIENT_SECRET` - "Secret" for the OAuth Application.
-
-By default, JupyterHub is installed using a
-[default values file](https://gitlab.com/gitlab-org/cluster-integration/cluster-applications/-/blob/master/src/default-data/jupyterhub/values.yaml.gotmpl).
-You can customize the installation of JupyterHub by defining a
-`.gitlab/managed-apps/jupyterhub/values.yaml` file in your cluster management project.
-
-Refer to the
-[chart reference](https://zero-to-jupyterhub.readthedocs.io/en/stable/reference/reference.html) for the
-available configuration options.
-
-Support for installing the JupyterHub managed application is provided by the GitLab Configure group.
-If you run into unknown issues,
-[open a new issue](https://gitlab.com/gitlab-org/gitlab/-/issues/new), and ping at
-least 2 people from the
-[Configure group](https://about.gitlab.com/handbook/product/categories/#configure-group).
-
-### Install Elastic Stack using GitLab CI/CD
-
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25138) in GitLab 12.8.
-> - [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/327908) in GitLab 13.12.
-
-Elastic Stack is installed using GitLab CI/CD by defining configuration in
-`.gitlab/managed-apps/config.yaml`.
-
-The following configuration is required to install Elastic Stack using GitLab CI/CD:
-
-```yaml
-elasticStack:
- installed: true
-```
-
-Elastic Stack is installed into the `gitlab-managed-apps` namespace of your cluster.
-
-You can check the default
-[`values.yaml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/vendor/elastic_stack/values.yaml)
-we set for this chart.
-
-You can customize the installation of Elastic Stack by defining
-`.gitlab/managed-apps/elastic-stack/values.yaml` file in your cluster
-management project. Refer to the
-[chart](https://gitlab.com/gitlab-org/charts/elastic-stack) for all
-available configuration options.
-
-Support for installing the Elastic Stack managed application is provided by the
-GitLab Monitor group. If you run into unknown issues,
-[open a new issue](https://gitlab.com/gitlab-org/gitlab/-/issues/new), and ping at
-least 2 people from the [Monitor group](https://about.gitlab.com/handbook/product/categories/#monitor-group).
-
-### Install Crossplane using GitLab CI/CD
-
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/35675) in GitLab 12.9.
-> - [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/327908) in GitLab 13.12.
-
-Crossplane is installed using GitLab CI/CD by defining configuration in
-`.gitlab/managed-apps/config.yaml`.
-
-The following configuration is required to install Crossplane using GitLab CI/CD:
-
-```yaml
-Crossplane:
- installed: true
-```
-
-Crossplane is installed into the `gitlab-managed-apps` namespace of your cluster.
-
-You can check the default
-[`values.yaml`](https://github.com/crossplane/crossplane/blob/master/cluster/charts/crossplane/values.yaml.tmpl)
-we set for this chart.
-
-You can customize the installation of Crossplane by defining
-`.gitlab/managed-apps/crossplane/values.yaml` file in your cluster
-management project. Refer to the
-[chart](https://github.com/crossplane/crossplane/tree/master/cluster/charts/crossplane#configuration)
-for the available configuration options. Note that this link points to the documentation
-for the current development release, which may differ from the version you have installed.
-
-Support for the Crossplane managed application is provided by the Crossplane team.
-If you run into issues,
-[open a support ticket](https://github.com/crossplane/crossplane/issues/new/choose) directly.
-
-### Install Knative using GitLab CI/CD
-
-> [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/327908) in GitLab 13.12.
-
-To install Knative, define the `.gitlab/managed-apps/config.yaml` file
-with:
-
-```yaml
-knative:
- installed: true
-```
-
-You can customize the installation of Knative by defining `.gitlab/managed-apps/knative/values.yaml`
-file in your cluster management project. Refer to the [chart](https://gitlab.com/gitlab-org/charts/knative)
-for all available configuration options.
-
-Here is an example configuration for Knative:
-
-```yaml
-domain: 'my.wildcard.A.record.dns'
-```
-
-Support for installing the Knative managed application is provided by the
-GitLab Configure group. If you run into unknown issues,
-[open a new issue](https://gitlab.com/gitlab-org/gitlab/-/issues/new), and ping at
-least 2 people from the
-[Configure group](https://about.gitlab.com/handbook/product/categories/#configure-group).
-
-#### Uninstall Knative
-
-To uninstall Knative, you must first manually remove any custom metrics you have added
-by running the following command:
-
-```shell
-kubectl delete -f https://gitlab.com/gitlab-org/cluster-integration/cluster-applications/-/raw/02c8231e30ef5b6725e6ba368bc63863ceb3c07d/src/default-data/knative/istio-metrics.yaml
-```
-
-## Install with one click (REMOVED)
-
-> [Removed](https://gitlab.com/groups/gitlab-org/-/epics/4280) in GitLab 14.0.
-
-The one-click installation method was deprecated in GitLab 13.9 and removed in [GitLab 14.0](https://gitlab.com/groups/gitlab-org/-/epics/4280).
-The removal does not break nor uninstall any apps you have installed, it only
-removes the "Applications" tab from the cluster page.
-The new recommended way to manage cluster applications is to use the [cluster management project template](management_project_template.md).
-
-- If you want to migrate your GitLab managed apps management to this template, read
- [migrating from GitLab managed apps to project template](migrating_from_gma_to_project_template.md).
-- If you don't want to use the template, you can also manually manage your applications.
- For that, follow the process to
- [take ownership of your GitLab Managed Apps](#take-ownership-of-your-gitlab-managed-apps).
-
-If you are not yet on GitLab 14.0 or later, you can refer to [an older version of this document](https://docs.gitlab.com/13.12/ee/user/clusters/applications.html#install-with-one-click-deprecated).
-
-## Browse applications logs
-
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/36769) in GitLab 13.2.
-
-Logs produced by pods running **GitLab Managed Apps** can be browsed using
-[**Log Explorer**](../project/clusters/kubernetes_pod_logs.md).
-
-## Take ownership of your GitLab Managed Apps
-
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/327803) in GitLab 13.12.
-
-With the removal of the One-click install method in GitLab 14.0,
-the **Applications** tab (under your project's **Infrastructure > Kubernetes clusters**)
-is no longer displayed:
-
-![GitLab Managed Apps - Applications tab](img/applications_tab_v13_12.png)
-
-This tab was dedicated to installing and maintaining GitLab Managed Apps.
-To continue managing your installed applications, one of the possible ways is to
-install [Helm](https://helm.sh/) locally, as described below.
-
-### View installed applications
-
-To view the applications you have installed in your cluster through GitLab Managed Apps,
-you need to verify the resources you have in the `gitlab-managed-apps` namespace.
-On your computer, [configure `kubectl`](https://kubernetes.io/docs/reference/kubectl/overview/)
-to connect to your cluster, open the terminal and run:
-
-```shell
-kubectl get all -n gitlab-managed-apps
-```
-
-If there is no output or the namespace does not exist, you do not have any applications
-installed through GitLab Managed Apps. If this is the case, you have nothing else to do.
-
-### Identify the Helm version
-
-Next, verify which Helm version GitLab used to install your applications.
-
-#### For apps installed with Helm v3
-
-To list your apps installed with Helm v3, run:
-
-```shell
-kubectl get secrets -n gitlab-managed-apps | grep 'helm.sh/release'
-```
-
-You can manage these applications with Helm v3 and you don't need any further steps.
-
-All applications not listed with the command above were installed with Helm v2.
-
-#### For apps installed with Helm v2
-
-If you have apps installed with Helm v2, you can either:
-
-- A. Install Helm v3 and [upgrade your apps to Helm v3](https://helm.sh/docs/topics/v2_v3_migration/).
-- B. Install Helm v2 and keep using this Helm version, which is not recommended as Helm v2 was deprecated in favor of
-Helm v3.
-
-If you choose to keep using Helm v2 (B), follow the steps below to manage your apps:
-
-1. Install [Helm v2](https://v2.helm.sh/docs/install/) in your computer.
-1. Start a local Tiller server:
-
- ```shell
- export TILLER_NAMESPACE=gitlab-managed-apps
- tiller -listen localhost:44134
- ```
-
-1. In another tab, initialize your Helm client:
-
- ```shell
- export HELM_HOST="localhost:44134"
- helm init --client-only
- ```
-
-1. Now your environment is ready to manage your apps with Helm v2. For example, to list your releases:
-
- ```shell
- helm ls
- ```
-
-### Cluster integrations
-
-Some applications were not only installed in your cluster by GitLab through
-Managed Apps but were also directly integrated with GitLab. If you had one of
-these applications installed before GitLab 14.0, then a corresponding [cluster
-integration](integrations.md) has been automatically enabled:
-
-- [Prometheus cluster integration](integrations.md#prometheus-cluster-integration)
-- [Elastic Stack cluster integration](integrations.md#elastic-stack-cluster-integration)
+This feature was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/327908) in GitLab 13.12.
+and [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/333610) in GitLab 15.0.
+Use the [cluster management project template](management_project_template.md) instead.
diff --git a/doc/user/clusters/crossplane.md b/doc/user/clusters/crossplane.md
index 9e4c672ac45..3f38a473128 100644
--- a/doc/user/clusters/crossplane.md
+++ b/doc/user/clusters/crossplane.md
@@ -2,289 +2,12 @@
stage: Configure
group: Configure
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+remove_date: '2022-08-22'
+redirect_to: '../../update/removals.md#managed-cluster-applicationsgitlab-ciyml'
---
-# Crossplane configuration (DEPRECATED) **(FREE)**
+# Crossplane configuration (removed) **(FREE)**
-> [Deprecated](https://gitlab.com/groups/gitlab-org/configure/-/epics/8) in GitLab 14.5.
-
-WARNING:
-This feature was [deprecated](https://gitlab.com/groups/gitlab-org/configure/-/epics/8) in GitLab 14.5.
-
-After [installing](applications.md#install-crossplane-using-gitlab-cicd) Crossplane, you must configure it for use.
-The process of configuring Crossplane includes:
-
-1. [Configure RBAC permissions](#configure-rbac-permissions).
-1. [Configure Crossplane with a cloud provider](#configure-crossplane-with-a-cloud-provider).
-1. [Configure managed service access](#configure-managed-service-access).
-1. [Set up Resource classes](#setting-up-resource-classes).
-1. Use [Auto DevOps configuration options](#auto-devops-configuration-options).
-1. [Connect to the PostgreSQL instance](#connect-to-the-postgresql-instance).
-
-To allow Crossplane to provision cloud services such as PostgreSQL, the cloud provider
-stack must be configured with a user account. For example:
-
-- A service account for GCP.
-- An IAM user for AWS.
-
-Some important notes:
-
-- This guide uses GCP as an example, but the processes for AWS and Azure are similar.
-- Crossplane requires the Kubernetes cluster to be VPC native with Alias IPs enabled,
- so the IP addresses of the pods can be routed within the GCP network.
-
-First, declare some environment variables with configuration for use in this guide:
-
-```shell
-export PROJECT_ID=crossplane-playground # the GCP project where all resources reside.
-export NETWORK_NAME=default # the GCP network where your GKE is provisioned.
-export REGION=us-central1 # the GCP region where the GKE cluster is provisioned.
-```
-
-## Configure RBAC permissions
-
-For GitLab-managed clusters, role-based access control (RBAC) is configured automatically.
-
-For non-GitLab managed clusters, ensure that the service account for the token
-provided can manage resources in the `database.crossplane.io` API group:
-
-1. Save the following YAML as `crossplane-database-role.yaml`:
-
- ```yaml
- apiVersion: rbac.authorization.k8s.io/v1
- kind: ClusterRole
- metadata:
- name: crossplane-database-role
- labels:
- rbac.authorization.k8s.io/aggregate-to-edit: "true"
- rules:
- - apiGroups:
- - database.crossplane.io
- resources:
- - postgresqlinstances
- verbs:
- - get
- - list
- - create
- - update
- - delete
- - patch
- - watch
- ```
-
-1. Apply the cluster role to the cluster:
-
- ```shell
- kubectl apply -f crossplane-database-role.yaml
- ```
-
-## Configure Crossplane with a cloud provider
-
-See [Configure Your Cloud Provider Account](https://crossplane.github.io/docs/v1.6/)
-to configure the installed cloud provider stack with a user account.
-
-The Secret, and the Provider resource referencing the Secret, must be
-applied to the `gitlab-managed-apps` namespace in the guide. Make sure you change that
-while following the process.
-
-## Configure Managed Service Access
-
-Next, configure connectivity between the PostgreSQL database and the GKE cluster
-by either:
-
-- Using Crossplane as demonstrated below.
-- Directly in the GCP console by
- [configuring private services access](https://cloud.google.com/vpc/docs/configure-private-services-access).
-
-1. Run the following command, which creates a `network.yaml` file, and configures
- `GlobalAddress` and connection resources:
-
- ```plaintext
- cat > network.yaml <<EOF
- ---
- # gitlab-ad-globaladdress defines the IP range that will be allocated
- # for cloud services connecting to the instances in the given Network.
-
- apiVersion: compute.gcp.crossplane.io/v1alpha3
- kind: GlobalAddress
- metadata:
- name: gitlab-ad-globaladdress
- spec:
- providerRef:
- name: gcp-provider
- reclaimPolicy: Delete
- name: gitlab-ad-globaladdress
- purpose: VPC_PEERING
- addressType: INTERNAL
- prefixLength: 16
- network: projects/$PROJECT_ID/global/networks/$NETWORK_NAME
- ---
- # gitlab-ad-connection is what allows cloud services to use the allocated
- # GlobalAddress for communication. Behind the scenes, it creates a VPC peering
- # to the network that those service instances actually live.
-
- apiVersion: servicenetworking.gcp.crossplane.io/v1alpha3
- kind: Connection
- metadata:
- name: gitlab-ad-connection
- spec:
- providerRef:
- name: gcp-provider
- reclaimPolicy: Delete
- parent: services/servicenetworking.googleapis.com
- network: projects/$PROJECT_ID/global/networks/$NETWORK_NAME
- reservedPeeringRangeRefs:
- - name: gitlab-ad-globaladdress
- EOF
- ```
-
-1. Apply the settings specified in the file with the following command:
-
- ```shell
- kubectl apply -f network.yaml
- ```
-
-1. Verify the creation of the network resources, and that both resources are ready and synced.
-
- ```shell
- kubectl describe connection.servicenetworking.gcp.crossplane.io gitlab-ad-connection
- kubectl describe globaladdress.compute.gcp.crossplane.io gitlab-ad-globaladdress
- ```
-
-## Setting up Resource classes
-
-Use resource classes to define a configuration for the required managed service.
-This example defines the PostgreSQL Resource class:
-
-1. Run the following command, which define a `gcp-postgres-standard.yaml` resource
- class containing a default `CloudSQLInstanceClass` with labels:
-
- ```plaintext
- cat > gcp-postgres-standard.yaml <<EOF
- apiVersion: database.gcp.crossplane.io/v1beta1
- kind: CloudSQLInstanceClass
- metadata:
- name: cloudsqlinstancepostgresql-standard
- labels:
- gitlab-ad-demo: "true"
- specTemplate:
- writeConnectionSecretsToNamespace: gitlab-managed-apps
- forProvider:
- databaseVersion: POSTGRES_11_7
- region: $REGION
- settings:
- tier: db-custom-1-3840
- dataDiskType: PD_SSD
- dataDiskSizeGb: 10
- ipConfiguration:
- privateNetwork: projects/$PROJECT_ID/global/networks/$NETWORK_NAME
- # this should match the name of the provider created in the above step
- providerRef:
- name: gcp-provider
- reclaimPolicy: Delete
- ---
- apiVersion: database.gcp.crossplane.io/v1beta1
- kind: CloudSQLInstanceClass
- metadata:
- name: cloudsqlinstancepostgresql-standard-default
- annotations:
- resourceclass.crossplane.io/is-default-class: "true"
- specTemplate:
- writeConnectionSecretsToNamespace: gitlab-managed-apps
- forProvider:
- databaseVersion: POSTGRES_11_7
- region: $REGION
- settings:
- tier: db-custom-1-3840
- dataDiskType: PD_SSD
- dataDiskSizeGb: 10
- ipConfiguration:
- privateNetwork: projects/$PROJECT_ID/global/networks/$NETWORK_NAME
- # this should match the name of the provider created in the above step
- providerRef:
- name: gcp-provider
- reclaimPolicy: Delete
- EOF
- ```
-
-1. Apply the resource class configuration with the following command:
-
- ```shell
- kubectl apply -f gcp-postgres-standard.yaml
- ```
-
-1. Verify creation of the Resource class with the following command:
-
- ```shell
- kubectl get cloudsqlinstanceclasses
- ```
-
-The Resource Classes allow you to define classes of service for a managed service.
-We could create another `CloudSQLInstanceClass` which requests for a larger or a
-faster disk. It could also request for a specific version of the database.
-
-## Auto DevOps Configuration Options
-
-You can run the Auto DevOps pipeline with either of the following options:
-
-- Setting the Environment variables `AUTO_DEVOPS_POSTGRES_MANAGED` and
- `AUTO_DEVOPS_POSTGRES_MANAGED_CLASS_SELECTOR` to provision PostgreSQL using Crossplane.
-- Overriding values for the Helm chart:
- - Set `postgres.managed` to `true`, which selects a default resource class.
- Mark the resource class with the annotation
- `resourceclass.crossplane.io/is-default-class: "true"`. The CloudSQLInstanceClass
- `cloudsqlinstancepostgresql-standard-default` is used to satisfy the claim.
- - Set `postgres.managed` to `true` with `postgres.managedClassSelector`
- providing the resource class to choose, based on labels. In this case, the
- value of `postgres.managedClassSelector.matchLabels.gitlab-ad-demo="true"`
- selects the CloudSQLInstance class `cloudsqlinstancepostgresql-standard`
- to satisfy the claim request.
-
-The Auto DevOps pipeline should provision a PostgresqlInstance when it runs successfully.
-
-To verify the PostgreSQL instance was created, run this command. When the `STATUS`
-field of the PostgresqlInstance changes to `BOUND`, it's successfully provisioned:
-
-```shell
-$ kubectl get postgresqlinstance
-
-NAME STATUS CLASS-KIND CLASS-NAME RESOURCE-KIND RESOURCE-NAME AGE
-staging-test8 Bound CloudSQLInstanceClass cloudsqlinstancepostgresql-standard CloudSQLInstance xp-ad-demo-24-staging-staging-test8-jj55c 9m
-```
-
-The endpoint of the PostgreSQL instance, and the user credentials, are present in
-a secret called `app-postgres` within the same project namespace. You can verify the
-secret with the following command:
-
-```shell
-$ kubectl describe secret app-postgres
-
-Name: app-postgres
-Namespace: xp-ad-demo-24-staging
-Labels: <none>
-Annotations: crossplane.io/propagate-from-name: 108e460e-06c7-11ea-b907-42010a8000bd
- crossplane.io/propagate-from-namespace: gitlab-managed-apps
- crossplane.io/propagate-from-uid: 10c79605-06c7-11ea-b907-42010a8000bd
-
-Type: Opaque
-
-Data
-====
-privateIP: 8 bytes
-publicIP: 13 bytes
-serverCACertificateCert: 1272 bytes
-serverCACertificateCertSerialNumber: 1 bytes
-serverCACertificateCreateTime: 24 bytes
-serverCACertificateExpirationTime: 24 bytes
-username: 8 bytes
-endpoint: 8 bytes
-password: 27 bytes
-serverCACertificateCommonName: 98 bytes
-serverCACertificateInstance: 41 bytes
-serverCACertificateSha1Fingerprint: 40 bytes
-```
-
-## Connect to the PostgreSQL instance
-
-Follow this [GCP guide](https://cloud.google.com/sql/docs/postgres/connect-kubernetes-engine) if you
-would like to connect to the newly provisioned PostgreSQL database instance on CloudSQL.
+This feature was [deprecated](https://gitlab.com/groups/gitlab-org/configure/-/epics/8)
+in GitLab 14.5. and [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/333610)
+in GitLab 15.0. Use [crossplane](http://crossplane.io/) directly instead.
diff --git a/doc/user/clusters/migrating_from_gma_to_project_template.md b/doc/user/clusters/migrating_from_gma_to_project_template.md
index 09453262fbb..9a59d135fa0 100644
--- a/doc/user/clusters/migrating_from_gma_to_project_template.md
+++ b/doc/user/clusters/migrating_from_gma_to_project_template.md
@@ -6,8 +6,8 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Migrate from GitLab Managed Apps to Cluster Management Projects **(FREE)**
-The [GitLab Managed Apps](applications.md) were deprecated in GitLab 14.0
-in favor of [Cluster Management Projects](management_project.md).
+The GitLab Managed Apps were deprecated in GitLab 14.0
+in favor of user-controlled Cluster Management projects.
Managing your cluster applications through a project enables you a
lot more flexibility to manage your cluster than through the late GitLab Managed Apps.
To migrate to the cluster management project you need
@@ -21,8 +21,10 @@ follow the steps below.
See also [video walk-throughs](#video-walk-throughs) with examples.
1. Create a new project based on the [Cluster Management Project template](management_project_template.md#create-a-project-based-on-the-cluster-management-project-template).
-1. [Associate your new Cluster Management Project with your cluster](management_project.md#associate-the-cluster-management-project-with-the-cluster).
+1. [Install an agent](agent/install/index.md) for this project in your cluster.
+1. Set the `KUBE_CONTEXT` CI/CD variable to the newly installed agent's context, as instructed in the `.gitlab-ci.yml` from the Project Template.
1. Detect apps deployed through Helm v2 releases by using the pre-configured [`.gitlab-ci.yml`](management_project_template.md#the-gitlab-ciyml-file) file:
+
- In case you had overwritten the default GitLab Managed Apps namespace, edit `.gitlab-ci.yml`,
and make sure the script is receiving the correct namespace as an argument:
@@ -92,6 +94,7 @@ See also [video walk-throughs](#video-walk-throughs) with examples.
chart version proposed in `applications/vault/values.yaml`.
- Cert-manager:
+
- For users on Kubernetes version 1.20 or above, the deprecated cert-manager v0.10 is no longer valid
and the upgrade includes a breaking change. So we suggest that you [backup and uninstall cert-manager v0.10](#backup-and-uninstall-cert-manager-v010),
and install the latest cert-manager instead. To install this version, uncomment `applications/cert-manager/helmfile.yaml`
diff --git a/doc/user/infrastructure/clusters/index.md b/doc/user/infrastructure/clusters/index.md
index 5af238fa91d..1ea39f9f277 100644
--- a/doc/user/infrastructure/clusters/index.md
+++ b/doc/user/infrastructure/clusters/index.md
@@ -45,7 +45,6 @@ the GitLab agent model on the [agent's blueprint documentation](../../../archite
- [Connect an existing cluster through cluster certificates](../../project/clusters/add_existing_cluster.md)
- [Access controls](../../project/clusters/cluster_access.md)
- [GitLab-managed clusters](../../project/clusters/gitlab_managed_clusters.md)
-- [GitLab Managed Apps](../../clusters/applications.md)
- [Deploy applications through certificate-based connection](../../project/clusters/deploy_to_cluster.md)
- [Cluster Management Project](../../clusters/management_project.md)
- [Cluster integrations](../../clusters/integrations.md)
@@ -55,7 +54,6 @@ the GitLab agent model on the [agent's blueprint documentation](../../../archite
- [Deploy Boards](../../project/deploy_boards.md)
- [Pod logs](../../project/clusters/kubernetes_pod_logs.md)
- [Clusters health](manage/clusters_health.md)
-- [Crossplane integration](../../clusters/crossplane.md)
- [Web terminals](../../../administration/integration/terminal.md)
### Cluster levels
diff --git a/doc/user/infrastructure/clusters/manage/management_project_applications/certmanager.md b/doc/user/infrastructure/clusters/manage/management_project_applications/certmanager.md
index 58de5f5e368..5ad1fb81a39 100644
--- a/doc/user/infrastructure/clusters/manage/management_project_applications/certmanager.md
+++ b/doc/user/infrastructure/clusters/manage/management_project_applications/certmanager.md
@@ -10,7 +10,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> - Support for cert-manager v1.4 was [introduced](https://gitlab.com/gitlab-org/project-templates/cluster-management/-/merge_requests/69405) in GitLab 14.3.
> - [Upgraded](https://gitlab.com/gitlab-org/project-templates/cluster-management/-/merge_requests/23) to cert-manager 1.7 in GitLab 14.8.
-Assuming you already have a [Cluster management project](../../../../../user/clusters/management_project.md) created from a
+Assuming you already have a project created from a
[management project template](../../../../../user/clusters/management_project_template.md), to install cert-manager you should
uncomment this line from your `helmfile.yaml`:
diff --git a/doc/user/infrastructure/clusters/manage/management_project_applications/elasticstack.md b/doc/user/infrastructure/clusters/manage/management_project_applications/elasticstack.md
index f9d0948a2bb..e3feedace99 100644
--- a/doc/user/infrastructure/clusters/manage/management_project_applications/elasticstack.md
+++ b/doc/user/infrastructure/clusters/manage/management_project_applications/elasticstack.md
@@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> [Introduced](https://gitlab.com/gitlab-org/project-templates/cluster-management/-/merge_requests/5) in GitLab 14.0.
-Assuming you already have a [Cluster management project](../../../../../user/clusters/management_project.md) created from a
+Assuming you already have a project created from a
[management project template](../../../../../user/clusters/management_project_template.md), to install Elastic Stack you should
uncomment this line from your `helmfile.yaml`:
diff --git a/doc/user/infrastructure/clusters/manage/management_project_applications/ingress.md b/doc/user/infrastructure/clusters/manage/management_project_applications/ingress.md
index 503f077df14..7983a640577 100644
--- a/doc/user/infrastructure/clusters/manage/management_project_applications/ingress.md
+++ b/doc/user/infrastructure/clusters/manage/management_project_applications/ingress.md
@@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> [Introduced](https://gitlab.com/gitlab-org/project-templates/cluster-management/-/merge_requests/5) in GitLab 14.0.
-Assuming you already have a [Cluster management project](../../../../../user/clusters/management_project.md) created from a
+Assuming you already have a project created from a
[management project template](../../../../../user/clusters/management_project_template.md), to install Ingress you should
uncomment this line from your `helmfile.yaml`:
diff --git a/doc/user/infrastructure/clusters/manage/management_project_applications/prometheus.md b/doc/user/infrastructure/clusters/manage/management_project_applications/prometheus.md
index f76c7363a83..383e857bb20 100644
--- a/doc/user/infrastructure/clusters/manage/management_project_applications/prometheus.md
+++ b/doc/user/infrastructure/clusters/manage/management_project_applications/prometheus.md
@@ -12,7 +12,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
open-source monitoring and alerting system for supervising your
deployed applications.
-Assuming you already have a [Cluster management project](../../../../../user/clusters/management_project.md) created from a
+Assuming you already have a project created from a
[management project template](../../../../../user/clusters/management_project_template.md), to install Prometheus you should
uncomment this line from your `helmfile.yaml`:
diff --git a/doc/user/infrastructure/clusters/manage/management_project_applications/runner.md b/doc/user/infrastructure/clusters/manage/management_project_applications/runner.md
index 4faf5f46418..c24afc3d2b4 100644
--- a/doc/user/infrastructure/clusters/manage/management_project_applications/runner.md
+++ b/doc/user/infrastructure/clusters/manage/management_project_applications/runner.md
@@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> [Introduced](https://gitlab.com/gitlab-org/project-templates/cluster-management/-/merge_requests/5) in GitLab 14.0.
-Assuming you already have a [Cluster management project](../../../../../user/clusters/management_project.md) created from a
+Assuming you already have a project created from a
[management project template](../../../../../user/clusters/management_project_template.md), to install GitLab Runner you should
uncomment this line from your `helmfile.yaml`:
diff --git a/doc/user/infrastructure/clusters/manage/management_project_applications/sentry.md b/doc/user/infrastructure/clusters/manage/management_project_applications/sentry.md
index b968e63d632..d2d314b649e 100644
--- a/doc/user/infrastructure/clusters/manage/management_project_applications/sentry.md
+++ b/doc/user/infrastructure/clusters/manage/management_project_applications/sentry.md
@@ -11,7 +11,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
The Sentry Helm chart [recommends](https://github.com/helm/charts/blob/f6e5784f265dd459c5a77430185d0302ed372665/stable/sentry/values.yaml#L284-L285)
at least 3 GB of available RAM for database migrations.
-Assuming you already have a [Cluster management project](../../../../../user/clusters/management_project.md) created from a
+Assuming you already have a project created from a
[management project template](../../../../../user/clusters/management_project_template.md), to install Sentry you should
uncomment this line from your `helmfile.yaml`:
diff --git a/doc/user/infrastructure/clusters/manage/management_project_applications/vault.md b/doc/user/infrastructure/clusters/manage/management_project_applications/vault.md
index 4618a95f986..06e67b78c91 100644
--- a/doc/user/infrastructure/clusters/manage/management_project_applications/vault.md
+++ b/doc/user/infrastructure/clusters/manage/management_project_applications/vault.md
@@ -20,7 +20,7 @@ control. Therefore, if GitLab is compromised, the security of this Vault instanc
avoid this security risk, GitLab recommends using your own HashiCorp Vault to leverage
[external secrets with CI](../../../../../ci/secrets/index.md).
-Assuming you already have a [Cluster management project](../../../../../user/clusters/management_project.md) created from a
+Assuming you already have a project created from a
[management project template](../../../../../user/clusters/management_project_template.md), to install Vault you should
uncomment this line from your `helmfile.yaml`:
diff --git a/doc/user/infrastructure/clusters/migrate_to_gitlab_agent.md b/doc/user/infrastructure/clusters/migrate_to_gitlab_agent.md
index d1397a8463e..b9f13e0239a 100644
--- a/doc/user/infrastructure/clusters/migrate_to_gitlab_agent.md
+++ b/doc/user/infrastructure/clusters/migrate_to_gitlab_agent.md
@@ -96,8 +96,9 @@ Follow the process for the [CI/CD workflow](../../clusters/agent/ci_cd_workflow.
## Migrate from GitLab Managed applications
-[GitLab Managed Apps (GMA)](../../clusters/applications.md#gitlab-managed-apps-deprecated) were deprecated in GitLab 14.0, and
-the agent for Kubernetes does not support them. To migrate from GMA to the agent, go through the following steps:
+GitLab Managed Apps (GMA) were deprecated in GitLab 14.0, and removed in GitLab 15.0.
+The agent for Kubernetes does not support them. To migrate from GMA to the
+agent, go through the following steps:
1. [Migrate from GitLab Managed Apps to a cluster management project](../../clusters/migrating_from_gma_to_project_template.md).
1. [Migrate the cluster management project to use the agent](../../clusters/management_project_template.md).
diff --git a/doc/user/shortcuts.md b/doc/user/shortcuts.md
index c0a0ab2b7ef..d612844d7ce 100644
--- a/doc/user/shortcuts.md
+++ b/doc/user/shortcuts.md
@@ -38,9 +38,9 @@ These shortcuts are available in most areas of GitLab:
| <kbd>Shift</kbd> + <kbd>i</kbd> | Go to your Issues page. |
| <kbd>Shift</kbd> + <kbd>m</kbd> | Go to your [Merge requests](project/merge_requests/index.md) page. |
| <kbd>Shift</kbd> + <kbd>t</kbd> | Go to your To-Do List page. |
-| <kbd>p</kbd> then <kbd>b</kbd> | Show or hide the Performance Bar. |
+| <kbd>p</kbd>, then <kbd>b</kbd> | Show or hide the Performance Bar. |
| <kbd>Escape</kbd> | Hide tooltips or popovers. |
-| <kbd>g</kbd> then <kbd>x</kbd> | Toggle between [GitLab](https://gitlab.com/) and [GitLab Next](https://next.gitlab.com/) (GitLab SaaS only). |
+| <kbd>g</kbd>, then <kbd>x</kbd> | Toggle between [GitLab](https://gitlab.com/) and [GitLab Next](https://next.gitlab.com/) (GitLab SaaS only). |
| <kbd>.</kbd> | Open the [Web IDE](project/web_ide/index.md). |
Additionally, the following shortcuts are available when editing text in text
@@ -150,7 +150,7 @@ These shortcuts are available when editing a file with the [Web IDE](project/web
| <kbd>Command</kbd> + <kbd>U</kbd> | | Cursor undo |
| <kbd>Command</kbd> + <kbd>Backspace<kbd> | | Delete all left |
| <kbd>Control</kbd> + <kbd>K</kbd> | | Delete all right |
-| <kbd>Shift</kbd> + <kbd>Command</kbd> <kbd>K</kbd> | | Delete line |
+| <kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>K</kbd> | | Delete line |
| <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>→</kbd> | | Expand selection |
| <kbd>Command</kbd> + <kbd>P</kbd> | | File finder |
| <kbd>Command</kbd> + <kbd>F</kbd> | | Find |
@@ -160,25 +160,58 @@ These shortcuts are available when editing a file with the [Web IDE](project/web
| <kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>F3</kbd> | | Find previous selection |
| <kbd>Command</kbd> + <kbd>E</kbd> | | Find with selection |
| <kbd>Option</kbd> + <kbd>Command</kbd> + <kbd>&#91;</kbd> | | Fold |
-| <kbd>Command</kbd> + <kbd>K</kbd> , <kbd>Command</kbd> + <kbd>O</kbd> | | Fold all |
-| <kbd>Command</kbd> + <kbd>K</kbd> , <kbd>Command</kbd> + <kbd>/</kbd> | | Fold all block comments |
-| <kbd>Command</kbd> + <kbd>K</kbd> , <kbd>Command</kbd> + <kbd>8</kbd> | | Fold all regions |
-| <kbd>Command</kbd> + <kbd>K</kbd> , <kbd>Command</kbd> + <kbd>-</kbd> | | Fold all regions except selected |
-| <kbd>Command</kbd> + <kbd>K</kbd> , <kbd>Command</kbd> + <kbd>1</kbd> | | Fold level 1 |
-| <kbd>Command</kbd> + <kbd>K</kbd> , <kbd>Command</kbd> + <kbd>2</kbd> | | Fold level 2 |
-| <kbd>Command</kbd> + <kbd>K</kbd> , <kbd>Command</kbd> + <kbd>3</kbd> | | Fold level 3 |
-| <kbd>Command</kbd> + <kbd>K</kbd> , <kbd>Command</kbd> + <kbd>4</kbd> | | Fold level 4 |
-| <kbd>Command</kbd> + <kbd>K</kbd> , <kbd>Command</kbd> + <kbd>5</kbd> | | Fold level 5 |
-| <kbd>Command</kbd> + <kbd>K</kbd> , <kbd>Command</kbd> + <kbd>6</kbd> | | Fold level 6 |
-| <kbd>Command</kbd> + <kbd>K</kbd> , <kbd>Command</kbd> + <kbd>7</kbd> | | Fold level 7 |
-| <kbd>Command</kbd> + <kbd>K</kbd> + <kbd>Command</kbd> + <kbd>&#91;</kbd> | | Fold recursively |
+| <kbd>Command</kbd> + <kbd>K</kbd>, then <kbd>Command</kbd> + <kbd>O</kbd> | | Fold all |
+| <kbd>Command</kbd> + <kbd>K</kbd>, then <kbd>Command</kbd> + <kbd>/</kbd> | | Fold all block comments |
+| <kbd>Command</kbd> + <kbd>K</kbd> , then <kbd>Command</kbd> + <kbd>8</kbd> | | Fold all regions |
+| <kbd>Command</kbd> + <kbd>K</kbd> , then <kbd>Command</kbd> + <kbd>-</kbd> | | Fold all regions except selected |
+| <kbd>Command</kbd> + <kbd>K</kbd> , then <kbd>Command</kbd> + <kbd>1</kbd> | | Fold level 1 |
+| <kbd>Command</kbd> + <kbd>K</kbd> , then <kbd>Command</kbd> + <kbd>2</kbd> | | Fold level 2 |
+| <kbd>Command</kbd> + <kbd>K</kbd> , then <kbd>Command</kbd> + <kbd>3</kbd> | | Fold level 3 |
+| <kbd>Command</kbd> + <kbd>K</kbd> , then <kbd>Command</kbd> + <kbd>4</kbd> | | Fold level 4 |
+| <kbd>Command</kbd> + <kbd>K</kbd> , then <kbd>Command</kbd> + <kbd>5</kbd> | | Fold level 5 |
+| <kbd>Command</kbd> + <kbd>K</kbd> , then <kbd>Command</kbd> + <kbd>6</kbd> | | Fold level 6 |
+| <kbd>Command</kbd> + <kbd>K</kbd> , then <kbd>Command</kbd> + <kbd>7</kbd> | | Fold level 7 |
+| <kbd>Command</kbd> + <kbd>K</kbd> , then <kbd>Command</kbd> + <kbd>&#91;</kbd> | | Fold recursively |
| <kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>\ </kbd> | | Go to bracket |
| <kbd>Control</kbd> + <kbd>G</kbd> | | Go to line or column |
-| <kbd>Option</kbd> + <kbd>F8</kbd> | | Go to next problem (error, warning, info) |
-| <kbd>F8</kbd> | | Go to next problem in files (error, warning, info) |
-| <kbd>Shift</kbd> + <kbd>Option</kbd> + <kbd>F8</kbd> | | Go to previous problem (error, warning, info) |
-| <kbd>Shift</kbd> + <kbd>F8</kbd> | | Go to previous problem in files (error, warning, info) |
-| <kbd>Command</kbd> + <kbd>p</kbd> | <kbd>Control</kbd> + <kbd>p</kbd> | Search for, and then open another file for editing. |
+| <kbd>Option</kbd> + <kbd>F8</kbd> | | Go to next problem (error, warning, information) |
+| <kbd>F8</kbd> | | Go to next problem in files (error, warning, information) |
+| <kbd>Shift</kbd> + <kbd>Option</kbd> + <kbd>F8</kbd> | | Go to previous problem (error, warning, information) |
+| <kbd>Shift</kbd> + <kbd>F8</kbd> | | Go to previous problem in files (error, warning, information) |
+| <kbd>Command</kbd> + <kbd>]</kbd> | | Indent line |
+| <kbd>Shift</kbd> + <kbd>Command</kbd> | | Enter Insert line above |
+| <kbd>Command</kbd> + <kbd>Enter</kbd> | | Insert line below |
+| <kbd>Control</kbd> + <kbd>J</kbd> | | Join lines |
+| <kbd>Command</kbd> + <kbd>K</kbd>, then <kbd>Command</kbd> + <kbd>D</kbd> | | Move last selection to next find match |
+| <kbd>Option</kbd> + <kbd>↓</kbd> | | Move line down |
+| <kbd>Option</kbd> + <kbd>↑</kbd> | | Move line up |
+| <kbd>Command</kbd> + <kbd>&#91;</kbd> | | Outdent line |
+| <kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>P</kbd> | | Preview Markdown |
+| <kbd>Command</kbd> + <kbd>K</kbd>, then <kbd>Command</kbd> + <kbd>U</kbd> | | Remove line comment |
+| <kbd>Option</kbd> + <kbd>Command</kbd> + <kbd>F</kbd> | | Replace |
+| <kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>.</kbd> | | Replace with next value |
+| <kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>,</kbd> | | Replace with previous value |
+| <kbd>Command</kbd> + <kbd>S</kbd> | | Save files |
+| <kbd>Command</kbd> + <kbd>P</kbd> | <kbd>Control</kbd> + <kbd>P</kbd> | Search for, and then open another file for editing. |
+| <kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>L</kbd> | | Select all occurrence of Find Match |
+| <kbd>Command</kbd> + <kbd>K</kbd>, then <kbd>Command</kbd> + <kbd>B</kbd> | | Set selection anchor |
+| <kbd>Option</kbd> + <kbd>F1</kbd> | | Show accessibility help |
+| <kbd>Shift</kbd> + <kbd>F10</kbd> | | Show editor context menu |
+| <kbd>Command</kbd> + <kbd>K</kbd>, then <kbd>Command</kbd> + <kbd>I</kbd> | | Show hover |
+| <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>←</kbd> | | Shrink selection |
+| <kbd>Shift</kbd> + <kbd>Option</kbd> + <kbd>A</kbd> | | Toggle block comment |
+| <kbd>Command</kbd> + <kbd>K</kbd>, then <kbd>Command</kbd> + <kbd>L</kbd> | | Toggle fold |
+| <kbd>Command</kbd> + <kbd>/</kbd> | | Toggle line comment |
+| <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>M</kbd> | | Toggle Tab key moves focus |
+| <kbd>Control</kbd> + <kbd>T</kbd> | | Transpose letters |
+| <kbd>Control</kbd> + <kbd>Space</kbd> | | Trigger Suggest |
+| <kbd>Command</kbd> + <kbd>K</kbd>, then <kbd>Command</kbd> + <kbd>X</kbd> | | Trim trailing whitespace |
+| <kbd>Option</kbd> + <kbd>Command</kbd> + <kbd>]</kbd> | | Unfold |
+| <kbd>Command</kbd> + <kbd>K</kbd>, then <kbd>Command</kbd> + <kbd>J</kbd> | | Unfold all |
+| <kbd>Command</kbd> + <kbd>K</kbd>, then <kbd>Command</kbd> + <kbd>9</kbd> | | Unfold all regions |
+| <kbd>Command</kbd> + <kbd>K</kbd>, then <kbd>Command</kbd> + <kbd>=</kbd> | | Unfold all regions except selected |
+| <kbd>Command</kbd> + <kbd>K</kbd>, then <kbd>Command</kbd> + <kbd>]</kbd> | | Unfold recursively |
+| <kbd>Command</kbd> + <kbd>K</kbd>, then <kbd>Command</kbd> + <kbd>X</kbd> | | Trim trailing whitespace |
| <kbd>Command</kbd> + <kbd>Enter</kbd> | <kbd>Control</kbd> + <kbd>Enter</kbd> | Commit (when editing the commit message). |
### Repository graph
diff --git a/lib/api/branches.rb b/lib/api/branches.rb
index a2c9020ac84..b8444351029 100644
--- a/lib/api/branches.rb
+++ b/lib/api/branches.rb
@@ -52,7 +52,7 @@ module API
merged_branch_names = repository.merged_branch_names(branches.map(&:name))
- if Feature.enabled?(:api_caching_branches, user_project, type: :development, default_enabled: :yaml)
+ if Feature.enabled?(:api_caching_branches, user_project, type: :development)
present_cached(
branches,
with: Entities::Branch,
diff --git a/lib/api/ci/secure_files.rb b/lib/api/ci/secure_files.rb
index ee39bdfd90c..66e5e8ea5b0 100644
--- a/lib/api/ci/secure_files.rb
+++ b/lib/api/ci/secure_files.rb
@@ -96,11 +96,11 @@ module API
helpers do
def feature_flag_enabled?
- service_unavailable! unless Feature.enabled?(:ci_secure_files, user_project, default_enabled: :yaml)
+ service_unavailable! unless Feature.enabled?(:ci_secure_files, user_project)
end
def read_only_feature_flag_enabled?
- service_unavailable! if Feature.enabled?(:ci_secure_files_read_only, user_project, type: :ops, default_enabled: :yaml)
+ service_unavailable! if Feature.enabled?(:ci_secure_files_read_only, user_project, type: :ops)
end
end
end
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 7baa164ef8b..10384de3d35 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -144,7 +144,7 @@ module API
return true unless job_token_authentication?
return true unless route_authentication_setting[:job_token_scope] == :project
- ::Feature.enabled?(:ci_job_token_scope, project, default_enabled: :yaml) &&
+ ::Feature.enabled?(:ci_job_token_scope, project) &&
current_authenticated_job.project == project
end
@@ -580,7 +580,7 @@ module API
def increment_counter(event_name)
feature_name = "usage_data_#{event_name}"
- return unless Feature.enabled?(feature_name, default_enabled: :yaml)
+ return unless Feature.enabled?(feature_name)
Gitlab::UsageDataCounters.count(event_name)
rescue StandardError => error
diff --git a/lib/api/helpers/internal_helpers.rb b/lib/api/helpers/internal_helpers.rb
index 46685df0989..505c8ff4a51 100644
--- a/lib/api/helpers/internal_helpers.rb
+++ b/lib/api/helpers/internal_helpers.rb
@@ -125,7 +125,7 @@ module API
address: Gitlab::GitalyClient.address(repository.shard),
token: Gitlab::GitalyClient.token(repository.shard),
features: Feature::Gitaly.server_feature_flags(repository.project),
- use_sidechannel: Feature.enabled?(:gitlab_shell_upload_pack_sidechannel, repository.project, default_enabled: :yaml)
+ use_sidechannel: Feature.enabled?(:gitlab_shell_upload_pack_sidechannel, repository.project)
}
end
end
diff --git a/lib/api/internal/base.rb b/lib/api/internal/base.rb
index 2ab5d482295..634be0ac669 100644
--- a/lib/api/internal/base.rb
+++ b/lib/api/internal/base.rb
@@ -43,7 +43,7 @@ module API
# This is a separate method so that EE can alter its behaviour more
# easily.
- if Feature.enabled?(:rate_limit_gitlab_shell, default_enabled: :yaml)
+ if Feature.enabled?(:rate_limit_gitlab_shell)
check_rate_limit!(:gitlab_shell_operation, scope: [params[:action], params[:project], actor.key_or_user])
end
diff --git a/lib/api/internal/kubernetes.rb b/lib/api/internal/kubernetes.rb
index 90e378cb3c8..34acfac4cb1 100644
--- a/lib/api/internal/kubernetes.rb
+++ b/lib/api/internal/kubernetes.rb
@@ -47,7 +47,7 @@ module API
end
def check_feature_enabled
- not_found! unless Feature.enabled?(:kubernetes_agent_internal_api, default_enabled: true, type: :ops)
+ not_found! unless Feature.enabled?(:kubernetes_agent_internal_api, type: :ops)
end
def check_agent_token
diff --git a/lib/api/project_export.rb b/lib/api/project_export.rb
index c229a1dc75c..e7d34c75b05 100644
--- a/lib/api/project_export.rb
+++ b/lib/api/project_export.rb
@@ -76,7 +76,7 @@ module API
resource do
before do
- not_found! unless ::Feature.enabled?(:bulk_import, default_enabled: :yaml)
+ not_found! unless ::Feature.enabled?(:bulk_import)
end
desc 'Start relations export' do
diff --git a/lib/api/project_import.rb b/lib/api/project_import.rb
index 8875d7adc6d..7a66044c5b6 100644
--- a/lib/api/project_import.rb
+++ b/lib/api/project_import.rb
@@ -179,7 +179,7 @@ module API
success Entities::ProjectImportStatus
end
post 'remote-import-s3' do
- not_found! unless ::Feature.enabled?(:import_project_from_remote_file_s3, default_enabled: :yaml)
+ not_found! unless ::Feature.enabled?(:import_project_from_remote_file_s3)
check_rate_limit! :project_import, scope: [current_user, :project_import]
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index afd9c66866f..f0344585014 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -76,7 +76,7 @@ module API
# Temporarily introduced for upload API: https://gitlab.com/gitlab-org/gitlab/-/issues/325788
def project_attachment_size(user_project)
return PROJECT_ATTACHMENT_SIZE_EXEMPT if exempt_from_global_attachment_size?(user_project)
- return user_project.max_attachment_size if Feature.enabled?(:enforce_max_attachment_size_upload_api, user_project, default_enabled: :yaml)
+ return user_project.max_attachment_size if Feature.enabled?(:enforce_max_attachment_size_upload_api, user_project)
PROJECT_ATTACHMENT_SIZE_EXEMPT
end
diff --git a/lib/api/usage_data.rb b/lib/api/usage_data.rb
index 43c75206b88..c5f0a9ca91e 100644
--- a/lib/api/usage_data.rb
+++ b/lib/api/usage_data.rb
@@ -8,7 +8,7 @@ module API
namespace 'usage_data' do
before do
- not_found! unless Feature.enabled?(:usage_data_api, default_enabled: :yaml, type: :ops)
+ not_found! unless Feature.enabled?(:usage_data_api, type: :ops)
forbidden!('Invalid CSRF token is provided') unless verified_request?
end
diff --git a/lib/api/usage_data_non_sql_metrics.rb b/lib/api/usage_data_non_sql_metrics.rb
index 983038e0263..c764a942f5f 100644
--- a/lib/api/usage_data_non_sql_metrics.rb
+++ b/lib/api/usage_data_non_sql_metrics.rb
@@ -8,7 +8,7 @@ module API
namespace 'usage_data' do
before do
- not_found! unless Feature.enabled?(:usage_data_non_sql_metrics, default_enabled: :yaml, type: :ops)
+ not_found! unless Feature.enabled?(:usage_data_non_sql_metrics, type: :ops)
end
desc 'Get Non SQL usage ping metrics' do
diff --git a/lib/api/usage_data_queries.rb b/lib/api/usage_data_queries.rb
index 3432e71eb28..e991f914a92 100644
--- a/lib/api/usage_data_queries.rb
+++ b/lib/api/usage_data_queries.rb
@@ -8,7 +8,7 @@ module API
namespace 'usage_data' do
before do
- not_found! unless Feature.enabled?(:usage_data_queries_api, default_enabled: :yaml, type: :ops)
+ not_found! unless Feature.enabled?(:usage_data_queries_api, type: :ops)
end
desc 'Get raw SQL queries for usage data SQL metrics' do
diff --git a/lib/backup/gitaly_backup.rb b/lib/backup/gitaly_backup.rb
index 93342e789e9..a8b0e7ad157 100644
--- a/lib/backup/gitaly_backup.rb
+++ b/lib/backup/gitaly_backup.rb
@@ -31,7 +31,7 @@ module Backup
args = []
args += ['-parallel', @max_parallelism.to_s] if @max_parallelism
args += ['-parallel-storage', @storage_parallelism.to_s] if @storage_parallelism
- if Feature.enabled?(:incremental_repository_backup, default_enabled: :yaml)
+ if Feature.enabled?(:incremental_repository_backup)
args += ['-layout', 'pointer']
if type == :create
args += ['-incremental'] if @incremental
diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb
index 403b2d9f16c..f38bc625639 100644
--- a/lib/backup/manager.rb
+++ b/lib/backup/manager.rb
@@ -29,7 +29,7 @@ module Backup
@progress = progress
@incremental = Feature.feature_flags_available? &&
- Feature.enabled?(:incremental_repository_backup, default_enabled: :yaml) &&
+ Feature.enabled?(:incremental_repository_backup) &&
Gitlab::Utils.to_boolean(ENV['INCREMENTAL'], default: false)
@definitions = definitions || build_definitions
diff --git a/lib/bulk_imports/groups/stage.rb b/lib/bulk_imports/groups/stage.rb
index ffb23875200..c4db53424fd 100644
--- a/lib/bulk_imports/groups/stage.rb
+++ b/lib/bulk_imports/groups/stage.rb
@@ -77,9 +77,9 @@ module BulkImports
if destination_namespace.present?
root_ancestor = Namespace.find_by_full_path(destination_namespace)&.root_ancestor
- ::Feature.enabled?(:bulk_import_projects, root_ancestor, default_enabled: :yaml)
+ ::Feature.enabled?(:bulk_import_projects, root_ancestor)
else
- ::Feature.enabled?(:bulk_import_projects, default_enabled: :yaml)
+ ::Feature.enabled?(:bulk_import_projects)
end
end
end
diff --git a/lib/gitlab/analytics/cycle_analytics/request_params.rb b/lib/gitlab/analytics/cycle_analytics/request_params.rb
index af695c5cfa4..d0d8d68362e 100644
--- a/lib/gitlab/analytics/cycle_analytics/request_params.rb
+++ b/lib/gitlab/analytics/cycle_analytics/request_params.rb
@@ -107,7 +107,7 @@ module Gitlab
def use_aggregated_backend?
group.present? && # for now it's only available on the group-level
aggregation.enabled &&
- Feature.enabled?(:use_vsa_aggregated_tables, group, default_enabled: :yaml)
+ Feature.enabled?(:use_vsa_aggregated_tables, group)
end
def aggregation_attributes
diff --git a/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid.rb b/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid.rb
index c1b8de1f6aa..db7afd59f4d 100644
--- a/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid.rb
+++ b/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid.rb
@@ -79,7 +79,7 @@ class Gitlab::BackgroundMigration::RecalculateVulnerabilitiesOccurrencesUuid # r
# rubocop: disable Metrics/AbcSize,Metrics/MethodLength,Metrics/BlockLength
def perform(start_id, end_id)
- unless Feature.enabled?(:migrate_vulnerability_finding_uuids, default_enabled: true)
+ unless Feature.enabled?(:migrate_vulnerability_finding_uuids)
return log_info('Migration is disabled by the feature flag', start_id: start_id, end_id: end_id)
end
diff --git a/lib/gitlab/chat.rb b/lib/gitlab/chat.rb
index 23d4fb36b66..30e9989d270 100644
--- a/lib/gitlab/chat.rb
+++ b/lib/gitlab/chat.rb
@@ -4,7 +4,7 @@ module Gitlab
module Chat
# Returns `true` if Chatops is available for the current instance.
def self.available?
- ::Feature.enabled?(:chatops, default_enabled: true)
+ ::Feature.enabled?(:chatops)
end
end
end
diff --git a/lib/gitlab/checks/lfs_check.rb b/lib/gitlab/checks/lfs_check.rb
index 84069a1249b..1d1d24c8fcc 100644
--- a/lib/gitlab/checks/lfs_check.rb
+++ b/lib/gitlab/checks/lfs_check.rb
@@ -9,7 +9,7 @@ module Gitlab
def validate!
# This feature flag is used for disabling integrity check on some envs
# because these costy calculations may cause performance issues
- return unless Feature.enabled?(:lfs_check, project, default_enabled: :yaml)
+ return unless Feature.enabled?(:lfs_check, project)
return unless project.lfs_enabled?
diff --git a/lib/gitlab/ci/config.rb b/lib/gitlab/ci/config.rb
index 4014a054a33..783a7fe28db 100644
--- a/lib/gitlab/ci/config.rb
+++ b/lib/gitlab/ci/config.rb
@@ -198,7 +198,7 @@ module Gitlab
def use_config_variables?
strong_memoize(:use_config_variables) do
- ::Feature.enabled?(:ci_variables_builder_config_variables, @project, default_enabled: :yaml)
+ ::Feature.enabled?(:ci_variables_builder_config_variables, @project)
end
end
diff --git a/lib/gitlab/ci/jwt.rb b/lib/gitlab/ci/jwt.rb
index 3fb86b8b3e8..97774bc5e13 100644
--- a/lib/gitlab/ci/jwt.rb
+++ b/lib/gitlab/ci/jwt.rb
@@ -73,7 +73,7 @@ module Gitlab
def key
@key ||= begin
- key_data = if Feature.enabled?(:ci_jwt_signing_key, build.project, default_enabled: true)
+ key_data = if Feature.enabled?(:ci_jwt_signing_key, build.project)
Gitlab::CurrentSettings.ci_jwt_signing_key
else
Rails.application.secrets.openid_connect_signing_key
diff --git a/lib/gitlab/ci/parsers/security/validators/schema_validator.rb b/lib/gitlab/ci/parsers/security/validators/schema_validator.rb
index 0accf1be970..cef029bd749 100644
--- a/lib/gitlab/ci/parsers/security/validators/schema_validator.rb
+++ b/lib/gitlab/ci/parsers/security/validators/schema_validator.rb
@@ -110,7 +110,7 @@ module Gitlab
log_warnings(problem_type: 'schema_validation_fails') unless schema_validation_errors.empty?
- if Feature.enabled?(:enforce_security_report_validation, @project, default_enabled: :yaml)
+ if Feature.enabled?(:enforce_security_report_validation, @project)
@errors += schema_validation_errors
else
@warnings += schema_validation_errors
@@ -147,7 +147,7 @@ module Gitlab
def add_unsupported_report_version_message
log_warnings(problem_type: 'using_unsupported_schema_version')
- if Feature.enabled?(:enforce_security_report_validation, @project, default_enabled: :yaml)
+ if Feature.enabled?(:enforce_security_report_validation, @project)
handle_unsupported_report_version(treat_as: :error)
else
handle_unsupported_report_version(treat_as: :warning)
diff --git a/lib/gitlab/ci/pipeline/chain/command.rb b/lib/gitlab/ci/pipeline/chain/command.rb
index c466b8b36d0..0a6f6fd740c 100644
--- a/lib/gitlab/ci/pipeline/chain/command.rb
+++ b/lib/gitlab/ci/pipeline/chain/command.rb
@@ -96,7 +96,7 @@ module Gitlab
step = step_class.name.underscore.parameterize(separator: '_')
logger.observe("pipeline_step_#{step}_duration_s", duration)
- if Feature.enabled?(:ci_pipeline_creation_step_duration_tracking, type: :ops, default_enabled: :yaml)
+ if Feature.enabled?(:ci_pipeline_creation_step_duration_tracking, type: :ops)
metrics.pipeline_creation_step_duration_histogram
.observe({ step: step_class.name }, duration.seconds)
end
diff --git a/lib/gitlab/ci/pipeline/chain/limit/rate_limit.rb b/lib/gitlab/ci/pipeline/chain/limit/rate_limit.rb
index cb02f09f819..17ebf56985b 100644
--- a/lib/gitlab/ci/pipeline/chain/limit/rate_limit.rb
+++ b/lib/gitlab/ci/pipeline/chain/limit/rate_limit.rb
@@ -54,15 +54,13 @@ module Gitlab
def throttle_enabled?
::Feature.enabled?(
:ci_throttle_pipelines_creation,
- project,
- default_enabled: :yaml)
+ project)
end
def dry_run?
::Feature.enabled?(
:ci_throttle_pipelines_creation_dry_run,
- project,
- default_enabled: :yaml)
+ project)
end
end
end
diff --git a/lib/gitlab/ci/pipeline/logger.rb b/lib/gitlab/ci/pipeline/logger.rb
index ee6c3898592..44d905faced 100644
--- a/lib/gitlab/ci/pipeline/logger.rb
+++ b/lib/gitlab/ci/pipeline/logger.rb
@@ -110,7 +110,7 @@ module Gitlab
def enabled?
strong_memoize(:enabled) do
- ::Feature.enabled?(:ci_pipeline_creation_logger, project, type: :ops, default_enabled: :yaml)
+ ::Feature.enabled?(:ci_pipeline_creation_logger, project, type: :ops)
end
end
diff --git a/lib/gitlab/ci/queue/metrics.rb b/lib/gitlab/ci/queue/metrics.rb
index 54fb1d19ea8..7d8303214a5 100644
--- a/lib/gitlab/ci/queue/metrics.rb
+++ b/lib/gitlab/ci/queue/metrics.rb
@@ -74,7 +74,7 @@ module Gitlab
end
def observe_queue_depth(queue, size)
- return unless Feature.enabled?(:gitlab_ci_builds_queuing_metrics, default_enabled: false)
+ return unless Feature.enabled?(:gitlab_ci_builds_queuing_metrics)
if !Rails.env.production? && !QUEUE_DEPTH_HISTOGRAMS.include?(queue)
raise ArgumentError, "unknown queue depth label: #{queue}"
@@ -84,7 +84,7 @@ module Gitlab
end
def observe_queue_size(size_proc, runner_type)
- return unless Feature.enabled?(:gitlab_ci_builds_queuing_metrics, default_enabled: false)
+ return unless Feature.enabled?(:gitlab_ci_builds_queuing_metrics)
size = size_proc.call.to_f
self.class.queue_size_total.observe({ runner_type: runner_type }, size)
@@ -96,7 +96,7 @@ module Gitlab
result = yield
- return result unless Feature.enabled?(:gitlab_ci_builds_queuing_metrics, default_enabled: false)
+ return result unless Feature.enabled?(:gitlab_ci_builds_queuing_metrics)
seconds = ::Gitlab::Metrics::System.monotonic_time - start_time
@@ -121,7 +121,7 @@ module Gitlab
end
def self.observe_active_runners(runners_proc)
- return unless Feature.enabled?(:gitlab_ci_builds_queuing_metrics, default_enabled: false)
+ return unless Feature.enabled?(:gitlab_ci_builds_queuing_metrics)
queue_active_runners_total.observe({}, runners_proc.call.to_f)
end
@@ -250,7 +250,7 @@ module Gitlab
end
def running_jobs_relation(job)
- if ::Feature.enabled?(:ci_pending_builds_maintain_denormalized_data, default_enabled: :yaml)
+ if ::Feature.enabled?(:ci_pending_builds_maintain_denormalized_data)
::Ci::RunningBuild.instance_type.where(project_id: job.project_id)
else
job.project.builds.running.where(runner: ::Ci::Runner.instance_type)
diff --git a/lib/gitlab/ci/status/bridge/common.rb b/lib/gitlab/ci/status/bridge/common.rb
index eaa87157716..263fd9d1052 100644
--- a/lib/gitlab/ci/status/bridge/common.rb
+++ b/lib/gitlab/ci/status/bridge/common.rb
@@ -16,7 +16,7 @@ module Gitlab
def details_path
return unless can?(user, :read_pipeline, downstream_pipeline)
- if Feature.enabled?(:ci_retry_downstream_pipeline, subject.project, default_enabled: :yaml)
+ if Feature.enabled?(:ci_retry_downstream_pipeline, subject.project)
project_job_path(subject.project, subject)
else
project_pipeline_path(downstream_project, downstream_pipeline)
diff --git a/lib/gitlab/ci/templates/Managed-Cluster-Applications.gitlab-ci.yml b/lib/gitlab/ci/templates/Managed-Cluster-Applications.gitlab-ci.yml
deleted file mode 100644
index ca63e942130..00000000000
--- a/lib/gitlab/ci/templates/Managed-Cluster-Applications.gitlab-ci.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-################################################################################
-# WARNING
-################################################################################
-#
-# This template is DEPRECATED and scheduled for removal in GitLab 15.0
-# See https://gitlab.com/gitlab-org/gitlab/-/issues/333610 for more context.
-#
-# To get started with a Cluster Management Project, we instead recommend
-# using the updated project template:
-#
-# - Documentation: https://docs.gitlab.com/ee/user/clusters/management_project_template.html
-# - Source code: https://gitlab.com/gitlab-org/project-templates/cluster-management/
-#
-################################################################################
-
-apply:
- stage: deploy
- image: "registry.gitlab.com/gitlab-org/cluster-integration/cluster-applications:v0.43.1"
- environment:
- name: production
- variables:
- TILLER_NAMESPACE: gitlab-managed-apps
- GITLAB_MANAGED_APPS_FILE: $CI_PROJECT_DIR/.gitlab/managed-apps/config.yaml
- script:
- - gitlab-managed-apps /usr/local/share/gitlab-managed-apps/helmfile.yaml
- only:
- variables:
- - $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- artifacts:
- when: on_failure
- paths:
- - tiller.log
diff --git a/lib/gitlab/ci/trace.rb b/lib/gitlab/ci/trace.rb
index 7d08f0230fc..94a593beabd 100644
--- a/lib/gitlab/ci/trace.rb
+++ b/lib/gitlab/ci/trace.rb
@@ -312,7 +312,7 @@ module Gitlab
end
def consistent_archived_trace?(build)
- ::Feature.enabled?(:gitlab_ci_archived_trace_consistent_reads, build.project, default_enabled: false)
+ ::Feature.enabled?(:gitlab_ci_archived_trace_consistent_reads, build.project)
end
def being_watched_cache_key
diff --git a/lib/gitlab/config/loader/yaml.rb b/lib/gitlab/config/loader/yaml.rb
index f3a3818f010..0559c85647d 100644
--- a/lib/gitlab/config/loader/yaml.rb
+++ b/lib/gitlab/config/loader/yaml.rb
@@ -41,7 +41,7 @@ module Gitlab
end
def too_big?
- return false unless Feature.enabled?(:ci_yaml_limit_size, default_enabled: true)
+ return false unless Feature.enabled?(:ci_yaml_limit_size)
!deep_size.valid?
end
diff --git a/lib/gitlab/database/background_migration/batch_optimizer.rb b/lib/gitlab/database/background_migration/batch_optimizer.rb
index 58c4a214077..c8fdf8281cd 100644
--- a/lib/gitlab/database/background_migration/batch_optimizer.rb
+++ b/lib/gitlab/database/background_migration/batch_optimizer.rb
@@ -41,7 +41,7 @@ module Gitlab
end
def optimize!
- return unless Feature.enabled?(:optimize_batched_migrations, type: :ops, default_enabled: :yaml)
+ return unless Feature.enabled?(:optimize_batched_migrations, type: :ops)
if multiplier = batch_size_multiplier
max_batch = migration.max_batch_size || MAX_BATCH_SIZE
diff --git a/lib/gitlab/database/load_balancing/configuration.rb b/lib/gitlab/database/load_balancing/configuration.rb
index 3f03d9e2c12..0ddc745ebae 100644
--- a/lib/gitlab/database/load_balancing/configuration.rb
+++ b/lib/gitlab/database/load_balancing/configuration.rb
@@ -90,7 +90,7 @@ module Gitlab
return false unless ::Gitlab::SafeRequestStore.active?
::Gitlab::SafeRequestStore.fetch(:force_no_sharing_primary_model) do
- ::Feature::FlipperFeature.table_exists? && ::Feature.enabled?(:force_no_sharing_primary_model, default_enabled: :yaml)
+ ::Feature::FlipperFeature.table_exists? && ::Feature.enabled?(:force_no_sharing_primary_model)
end
end
diff --git a/lib/gitlab/database/migration_helpers.rb b/lib/gitlab/database/migration_helpers.rb
index d016dea224b..a8d60d62e66 100644
--- a/lib/gitlab/database/migration_helpers.rb
+++ b/lib/gitlab/database/migration_helpers.rb
@@ -961,7 +961,7 @@ module Gitlab
"but it is '#{migration.status_name}':" \
"\t#{configuration}" \
"\n\n" \
- "Finalize it manualy by running" \
+ "Finalize it manually by running" \
"\n\n" \
"\tsudo gitlab-rake gitlab:background_migrations:finalize[#{job_class_name},#{table_name},#{column_name},'#{job_arguments.to_json.gsub(',', '\,')}']" \
"\n\n" \
diff --git a/lib/gitlab/database/query_analyzers/prevent_cross_database_modification.rb b/lib/gitlab/database/query_analyzers/prevent_cross_database_modification.rb
index a53da514df2..e0cb803b872 100644
--- a/lib/gitlab/database/query_analyzers/prevent_cross_database_modification.rb
+++ b/lib/gitlab/database/query_analyzers/prevent_cross_database_modification.rb
@@ -33,7 +33,7 @@ module Gitlab
def self.enabled?
::Feature::FlipperFeature.table_exists? &&
- Feature.enabled?(:detect_cross_database_modification, default_enabled: :yaml)
+ Feature.enabled?(:detect_cross_database_modification)
end
def self.requires_tracking?(parsed)
diff --git a/lib/gitlab/database/reindexing.rb b/lib/gitlab/database/reindexing.rb
index 91c3fcc7d72..e13dd3b2058 100644
--- a/lib/gitlab/database/reindexing.rb
+++ b/lib/gitlab/database/reindexing.rb
@@ -16,7 +16,7 @@ module Gitlab
REMOVE_INDEX_RETRY_CONFIG = [[1.minute, 9.minutes]] * 30
def self.enabled?
- Feature.enabled?(:database_reindexing, type: :ops, default_enabled: :yaml)
+ Feature.enabled?(:database_reindexing, type: :ops)
end
def self.invoke(database = nil)
diff --git a/lib/gitlab/default_branch.rb b/lib/gitlab/default_branch.rb
index 6bd9a5675c4..bb540b93a58 100644
--- a/lib/gitlab/default_branch.rb
+++ b/lib/gitlab/default_branch.rb
@@ -4,7 +4,7 @@
module Gitlab
module DefaultBranch
def self.value(object: nil)
- Feature.enabled?(:main_branch_over_master, object, default_enabled: :yaml) ? 'main' : 'master'
+ Feature.enabled?(:main_branch_over_master, object) ? 'main' : 'master'
end
end
end
diff --git a/lib/gitlab/diff/file.rb b/lib/gitlab/diff/file.rb
index 61bb0c797b4..d21cbdf0be0 100644
--- a/lib/gitlab/diff/file.rb
+++ b/lib/gitlab/diff/file.rb
@@ -50,11 +50,11 @@ module Gitlab
end
def use_semantic_ipynb_diff?
- strong_memoize(:_use_semantic_ipynb_diff) { Feature.enabled?(:ipynb_semantic_diff, repository.project, default_enabled: :yaml) }
+ strong_memoize(:_use_semantic_ipynb_diff) { Feature.enabled?(:ipynb_semantic_diff, repository.project) }
end
def use_renderable_diff?
- strong_memoize(:_renderable_diff_enabled) { Feature.enabled?(:rendered_diffs_viewer, repository.project, default_enabled: :yaml) }
+ strong_memoize(:_renderable_diff_enabled) { Feature.enabled?(:rendered_diffs_viewer, repository.project) }
end
def has_renderable?
diff --git a/lib/gitlab/diff/highlight.rb b/lib/gitlab/diff/highlight.rb
index 47f3324752d..225b4f7cf86 100644
--- a/lib/gitlab/diff/highlight.rb
+++ b/lib/gitlab/diff/highlight.rb
@@ -24,7 +24,7 @@ module Gitlab
end
def highlight
- populate_marker_ranges if Feature.enabled?(:use_marker_ranges, project, default_enabled: :yaml)
+ populate_marker_ranges if Feature.enabled?(:use_marker_ranges, project)
@diff_lines.map.with_index do |diff_line, index|
diff_line = diff_line.dup
@@ -61,7 +61,7 @@ module Gitlab
end
def apply_marker_ranges_highlight(diff_line, rich_line, index)
- marker_ranges = if Feature.enabled?(:use_marker_ranges, project, default_enabled: :yaml)
+ marker_ranges = if Feature.enabled?(:use_marker_ranges, project)
diff_line.marker_ranges
else
inline_diffs[index]
@@ -83,7 +83,7 @@ module Gitlab
return unless diff_file && diff_file.diff_refs
return diff_line_highlighting(diff_line, plain: true) if blobs_too_large?
- if Feature.enabled?(:diff_line_syntax_highlighting, project, default_enabled: :yaml)
+ if Feature.enabled?(:diff_line_syntax_highlighting, project)
diff_line_highlighting(diff_line)
else
blob_highlighting(diff_line)
diff --git a/lib/gitlab/diff/highlight_cache.rb b/lib/gitlab/diff/highlight_cache.rb
index 12ed11b0140..f950d01fdf0 100644
--- a/lib/gitlab/diff/highlight_cache.rb
+++ b/lib/gitlab/diff/highlight_cache.rb
@@ -74,8 +74,8 @@ module Gitlab
diffable.cache_key,
VERSION,
diff_options,
- Feature.enabled?(:use_marker_ranges, diffable.project, default_enabled: :yaml),
- Feature.enabled?(:diff_line_syntax_highlighting, diffable.project, default_enabled: :yaml)
+ Feature.enabled?(:use_marker_ranges, diffable.project),
+ Feature.enabled?(:diff_line_syntax_highlighting, diffable.project)
].join(":")
end
end
diff --git a/lib/gitlab/email/receiver.rb b/lib/gitlab/email/receiver.rb
index 58e7b2f1b44..4da112bc5a0 100644
--- a/lib/gitlab/email/receiver.rb
+++ b/lib/gitlab/email/receiver.rb
@@ -148,7 +148,7 @@ module Gitlab
end
def find_first_key_from_received_headers
- return unless ::Feature.enabled?(:use_received_header_for_incoming_emails, default_enabled: :yaml)
+ return unless ::Feature.enabled?(:use_received_header_for_incoming_emails)
recipients_from_received_headers.find do |email|
key = email_class.key_from_address(email)
diff --git a/lib/gitlab/error_tracking.rb b/lib/gitlab/error_tracking.rb
index d71f9b5e7cf..f9959d5677b 100644
--- a/lib/gitlab/error_tracking.rb
+++ b/lib/gitlab/error_tracking.rb
@@ -116,13 +116,13 @@ module Gitlab
private
def before_send_raven(event, hint)
- return unless Feature.enabled?(:enable_old_sentry_integration, default_enabled: :yaml)
+ return unless Feature.enabled?(:enable_old_sentry_integration)
before_send(event, hint)
end
def before_send_sentry(event, hint)
- return unless Feature.enabled?(:enable_new_sentry_integration, default_enabled: :yaml)
+ return unless Feature.enabled?(:enable_new_sentry_integration)
before_send(event, hint)
end
diff --git a/lib/gitlab/experiment/rollout/feature.rb b/lib/gitlab/experiment/rollout/feature.rb
index 4bef92f5c23..bf31dfe08a0 100644
--- a/lib/gitlab/experiment/rollout/feature.rb
+++ b/lib/gitlab/experiment/rollout/feature.rb
@@ -14,7 +14,7 @@ module Gitlab
def enabled?
return false unless feature_flag_defined?
return false unless Gitlab.com?
- return false unless ::Feature.enabled?(:gitlab_experiment, type: :ops, default_enabled: :yaml)
+ return false unless ::Feature.enabled?(:gitlab_experiment, type: :ops)
feature_flag_instance.state != :off
end
@@ -29,7 +29,7 @@ module Gitlab
# which will assign the control. Otherwise we call super, which will
# assign a variant evenly, or based on our provided distribution rules.
def execute_assignment
- super if ::Feature.enabled?(feature_flag_name, self, type: :experiment, default_enabled: :yaml)
+ super if ::Feature.enabled?(feature_flag_name, self, type: :experiment)
end
# This is what's provided to the `Feature.enabled?` call that will be
diff --git a/lib/gitlab/experimentation/experiment.rb b/lib/gitlab/experimentation/experiment.rb
index b13f55e7969..0c7091d19e3 100644
--- a/lib/gitlab/experimentation/experiment.rb
+++ b/lib/gitlab/experimentation/experiment.rb
@@ -16,7 +16,7 @@ module Gitlab
def active?
# TODO: just touch a feature flag
# Temporary change, we will change `experiment_percentage` in future to `Feature.enabled?
- Feature.enabled?(feature_flag_name, type: :experiment, default_enabled: :yaml)
+ Feature.enabled?(feature_flag_name, type: :experiment)
::Gitlab.com? && experiment_percentage > 0
end
diff --git a/lib/gitlab/git/diff.rb b/lib/gitlab/git/diff.rb
index bb561232ac6..c473fe6973d 100644
--- a/lib/gitlab/git/diff.rb
+++ b/lib/gitlab/git/diff.rb
@@ -230,7 +230,7 @@ module Gitlab
private
def encode_diff_to_utf8(replace_invalid_utf8_chars)
- return unless Feature.enabled?(:convert_diff_to_utf8_with_replacement_symbol, default_enabled: :yaml)
+ return unless Feature.enabled?(:convert_diff_to_utf8_with_replacement_symbol)
return unless replace_invalid_utf8_chars && diff_should_be_converted?
@diff = Gitlab::EncodingHelper.encode_utf8_with_replacement_character(@diff)
diff --git a/lib/gitlab/github_import.rb b/lib/gitlab/github_import.rb
index 7ac0d875512..9556a9e98ba 100644
--- a/lib/gitlab/github_import.rb
+++ b/lib/gitlab/github_import.rb
@@ -36,7 +36,7 @@ module Gitlab
end
def self.per_page(project)
- if project.group.present? && Feature.enabled?(:github_importer_lower_per_page_limit, project.group, type: :ops, default_enabled: :yaml)
+ if project.group.present? && Feature.enabled?(:github_importer_lower_per_page_limit, project.group, type: :ops)
Gitlab::GithubImport::Client::LOWER_PER_PAGE
else
Gitlab::GithubImport::Client::DEFAULT_PER_PAGE
diff --git a/lib/gitlab/github_import/issuable_finder.rb b/lib/gitlab/github_import/issuable_finder.rb
index 5298a3d81ea..da205ebd345 100644
--- a/lib/gitlab/github_import/issuable_finder.rb
+++ b/lib/gitlab/github_import/issuable_finder.rb
@@ -78,7 +78,7 @@ module Gitlab
end
def timeout
- if project.group.present? && ::Feature.enabled?(:github_importer_single_endpoint_notes_import, project.group, type: :ops, default_enabled: :yaml)
+ if project.group.present? && ::Feature.enabled?(:github_importer_single_endpoint_notes_import, project.group, type: :ops)
Gitlab::Cache::Import::Caching::LONGER_TIMEOUT
else
Gitlab::Cache::Import::Caching::TIMEOUT
diff --git a/lib/gitlab/gon_helper.rb b/lib/gitlab/gon_helper.rb
index 98668c72ff4..872156039c0 100644
--- a/lib/gitlab/gon_helper.rb
+++ b/lib/gitlab/gon_helper.rb
@@ -51,15 +51,15 @@ module Gitlab
# Initialize gon.features with any flags that should be
# made globally available to the frontend
- push_frontend_feature_flag(:usage_data_api, type: :ops, default_enabled: :yaml)
- push_frontend_feature_flag(:security_auto_fix, default_enabled: false)
- push_frontend_feature_flag(:new_header_search, default_enabled: :yaml)
- push_frontend_feature_flag(:bootstrap_confirmation_modals, default_enabled: :yaml)
- push_frontend_feature_flag(:sandboxed_mermaid, default_enabled: :yaml)
- push_frontend_feature_flag(:source_editor_toolbar, default_enabled: :yaml)
- push_frontend_feature_flag(:gl_avatar_for_all_user_avatars, default_enabled: :yaml)
- push_frontend_feature_flag(:mr_attention_requests, current_user, default_enabled: :yaml)
- push_frontend_feature_flag(:follow_in_user_popover, current_user, default_enabled: :yaml)
+ push_frontend_feature_flag(:usage_data_api, type: :ops)
+ push_frontend_feature_flag(:security_auto_fix)
+ push_frontend_feature_flag(:new_header_search)
+ push_frontend_feature_flag(:bootstrap_confirmation_modals)
+ push_frontend_feature_flag(:sandboxed_mermaid)
+ push_frontend_feature_flag(:source_editor_toolbar)
+ push_frontend_feature_flag(:gl_avatar_for_all_user_avatars)
+ push_frontend_feature_flag(:mr_attention_requests, current_user)
+ push_frontend_feature_flag(:follow_in_user_popover, current_user)
end
# Exposes the state of a feature flag to the frontend code.
diff --git a/lib/gitlab/graphql/pagination/keyset/generic_keyset_pagination.rb b/lib/gitlab/graphql/pagination/keyset/generic_keyset_pagination.rb
index bf9b73d918a..9beb40ddd7e 100644
--- a/lib/gitlab/graphql/pagination/keyset/generic_keyset_pagination.rb
+++ b/lib/gitlab/graphql/pagination/keyset/generic_keyset_pagination.rb
@@ -68,7 +68,7 @@ module Gitlab
def items
original_items = super
- return original_items if Feature.disabled?(:new_graphql_keyset_pagination, default_enabled: :yaml) || Gitlab::Pagination::Keyset::Order.keyset_aware?(original_items)
+ return original_items if Feature.disabled?(:new_graphql_keyset_pagination) || Gitlab::Pagination::Keyset::Order.keyset_aware?(original_items)
strong_memoize(:generic_keyset_pagination_items) do
rebuilt_items_with_keyset_order, success = Gitlab::Pagination::Keyset::SimpleOrderBuilder.build(original_items)
diff --git a/lib/gitlab/health_checks/middleware.rb b/lib/gitlab/health_checks/middleware.rb
new file mode 100644
index 00000000000..3fe065147c8
--- /dev/null
+++ b/lib/gitlab/health_checks/middleware.rb
@@ -0,0 +1,33 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module HealthChecks
+ class Middleware
+ def initialize(app, readiness_probe, liveness_probe)
+ @app = app
+ @readiness_probe = readiness_probe
+ @liveness_probe = liveness_probe
+ end
+
+ def call(env)
+ case env['PATH_INFO']
+ when '/readiness' then render_probe(@readiness_probe)
+ when '/liveness' then render_probe(@liveness_probe)
+ else @app.call(env)
+ end
+ end
+
+ private
+
+ def render_probe(probe)
+ result = probe.execute
+
+ [
+ result.http_status,
+ { 'Content-Type' => 'application/json; charset=utf-8' },
+ [result.json.to_json]
+ ]
+ end
+ end
+ end
+end
diff --git a/lib/gitlab/health_checks/server.rb b/lib/gitlab/health_checks/server.rb
new file mode 100644
index 00000000000..d747b64a221
--- /dev/null
+++ b/lib/gitlab/health_checks/server.rb
@@ -0,0 +1,62 @@
+# frozen_string_literal: true
+
+require 'webrick'
+
+module Gitlab
+ module HealthChecks
+ class Server < Daemon
+ def initialize(address:, port:, **options)
+ super(**options)
+
+ @address = address
+ @port = port
+ end
+
+ private
+
+ def start_working
+ @server = ::WEBrick::HTTPServer.new(
+ Port: @port, BindAddress: @address, AccessLog: []
+ )
+ @server.mount '/', Rack::Handler::WEBrick, rack_app
+
+ true
+ end
+
+ def run_thread
+ @server&.start
+ rescue IOError
+ # ignore forcibily closed servers
+ end
+
+ def stop_working
+ if @server
+ # we close sockets if thread is not longer running
+ # this happens, when the process forks
+ if thread.alive?
+ @server.shutdown
+ else
+ @server.listeners.each(&:close)
+ end
+ end
+
+ @server = nil
+ end
+
+ def rack_app
+ readiness = new_probe
+ liveness = new_probe
+
+ Rack::Builder.app do
+ use Rack::Deflater
+ use HealthChecks::Middleware, readiness, liveness
+ run -> (env) { [404, {}, ['']] }
+ end
+ end
+
+ def new_probe
+ ::Gitlab::HealthChecks::Probes::Collection.new
+ end
+ end
+ end
+end
diff --git a/lib/gitlab/hotlinking_detector.rb b/lib/gitlab/hotlinking_detector.rb
index 44901297870..dd58f6aca26 100644
--- a/lib/gitlab/hotlinking_detector.rb
+++ b/lib/gitlab/hotlinking_detector.rb
@@ -12,7 +12,7 @@ module Gitlab
def intercept_hotlinking?(request)
request_accepts = parse_request_accepts(request)
- return false unless Feature.enabled?(:repository_archive_hotlinking_interception, default_enabled: true)
+ return false unless Feature.enabled?(:repository_archive_hotlinking_interception)
# Block attempts to embed as JS
return true if sec_fetch_invalid?(request)
diff --git a/lib/gitlab/import_export/file_importer.rb b/lib/gitlab/import_export/file_importer.rb
index 829b3771518..1878b5b1a30 100644
--- a/lib/gitlab/import_export/file_importer.rb
+++ b/lib/gitlab/import_export/file_importer.rb
@@ -28,7 +28,7 @@ module Gitlab
copy_archive
wait_for_archived_file do
- validate_decompressed_archive_size if Feature.enabled?(:validate_import_decompressed_archive_size, default_enabled: :yaml)
+ validate_decompressed_archive_size if Feature.enabled?(:validate_import_decompressed_archive_size)
decompress_archive
end
rescue StandardError => e
diff --git a/lib/gitlab/import_export/group/relation_tree_restorer.rb b/lib/gitlab/import_export/group/relation_tree_restorer.rb
index b44874f598c..4b28dd831fc 100644
--- a/lib/gitlab/import_export/group/relation_tree_restorer.rb
+++ b/lib/gitlab/import_export/group/relation_tree_restorer.rb
@@ -89,7 +89,7 @@ module Gitlab
end
def save_relation_object(relation_object, relation_key, relation_definition, relation_index)
- if Feature.enabled?(:import_relation_object_persistence, default_enabled: :yaml) && relation_object.new_record?
+ if Feature.enabled?(:import_relation_object_persistence) && relation_object.new_record?
Gitlab::ImportExport::Base::RelationObjectSaver.new(
relation_object: relation_object,
relation_key: relation_key,
diff --git a/lib/gitlab/import_export/project/tree_restorer.rb b/lib/gitlab/import_export/project/tree_restorer.rb
index d8992061524..47f82a901b7 100644
--- a/lib/gitlab/import_export/project/tree_restorer.rb
+++ b/lib/gitlab/import_export/project/tree_restorer.rb
@@ -54,7 +54,7 @@ module Gitlab
end
def ndjson_relation_reader
- return unless Feature.enabled?(:project_import_ndjson, project.namespace, default_enabled: true)
+ return unless Feature.enabled?(:project_import_ndjson, project.namespace)
ImportExport::Json::NdjsonReader.new(
File.join(shared.export_path, 'tree')
diff --git a/lib/gitlab/import_export/project/tree_saver.rb b/lib/gitlab/import_export/project/tree_saver.rb
index 63c5afa9595..05dcfa5282c 100644
--- a/lib/gitlab/import_export/project/tree_saver.rb
+++ b/lib/gitlab/import_export/project/tree_saver.rb
@@ -80,7 +80,7 @@ module Gitlab
def json_writer
@json_writer ||= begin
- if ::Feature.enabled?(:project_export_as_ndjson, @project.namespace, default_enabled: true)
+ if ::Feature.enabled?(:project_export_as_ndjson, @project.namespace)
full_path = File.join(@shared.export_path, 'tree')
Gitlab::ImportExport::Json::NdjsonWriter.new(full_path)
else
diff --git a/lib/gitlab/integrations/sti_type.rb b/lib/gitlab/integrations/sti_type.rb
deleted file mode 100644
index f347db7bc8c..00000000000
--- a/lib/gitlab/integrations/sti_type.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module Integrations
- class StiType < ActiveRecord::Type::String
- NAMESPACED_INTEGRATIONS = %w[
- Asana Assembla Bamboo Bugzilla Buildkite Campfire Confluence CustomIssueTracker Datadog
- Discord DroneCi EmailsOnPush Ewm ExternalWiki Flowdock HangoutsChat Harbor Irker Jenkins Jira Mattermost
- MattermostSlashCommands MicrosoftTeams MockCi MockMonitoring Packagist PipelinesEmail Pivotaltracker
- Prometheus Pushover Redmine Shimo Slack SlackSlashCommands Teamcity UnifyCircuit WebexTeams Youtrack Zentao
- ].to_set.freeze
-
- def self.namespaced_integrations
- NAMESPACED_INTEGRATIONS
- end
-
- def cast(value)
- new_cast(value) || super
- end
-
- def serialize(value)
- new_serialize(value) || super
- end
-
- def deserialize(value)
- value
- end
-
- def changed?(original_value, value, _new_value_before_type_cast)
- original_value != serialize(value)
- end
-
- def changed_in_place?(original_value_for_database, value)
- original_value_for_database != serialize(value)
- end
-
- private
-
- def new_cast(value)
- value = prepare_value(value)
- return unless value
-
- stripped_name = value.delete_suffix('Service')
- return unless self.class.namespaced_integrations.include?(stripped_name)
-
- "Integrations::#{stripped_name}"
- end
-
- def new_serialize(value)
- value = prepare_value(value)
- return unless value&.starts_with?('Integrations::')
-
- "#{value.delete_prefix('Integrations::')}Service"
- end
-
- # Returns value cast to a `String`, or `nil` if value is `nil`.
- def prepare_value(value)
- return value if value.nil? || value.is_a?(String)
-
- value.to_s
- end
- end
- end
-end
-
-Gitlab::Integrations::StiType.prepend_mod
diff --git a/lib/gitlab/jira/http_client.rb b/lib/gitlab/jira/http_client.rb
index 7abfe8e38e8..02b0c902a70 100644
--- a/lib/gitlab/jira/http_client.rb
+++ b/lib/gitlab/jira/http_client.rb
@@ -35,6 +35,12 @@ module Gitlab
request_params[:base_uri] = uri.to_s
request_params.merge!(auth_params)
+ if Feature.enabled?(:jira_raise_timeouts, type: :ops)
+ request_params[:open_timeout] = 2.minutes
+ request_params[:read_timeout] = 2.minutes
+ request_params[:write_timeout] = 2.minutes
+ end
+
result = Gitlab::HTTP.public_send(http_method, path, **request_params) # rubocop:disable GitlabSecurity/PublicSend
@authenticated = result.response.is_a?(Net::HTTPOK)
store_cookies(result) if options[:use_cookies]
diff --git a/lib/gitlab/json.rb b/lib/gitlab/json.rb
index 9824b46554f..512936bb4f4 100644
--- a/lib/gitlab/json.rb
+++ b/lib/gitlab/json.rb
@@ -160,7 +160,7 @@ module Gitlab
# @raise [JSON::ParserError]
def handle_legacy_mode!(data)
return data unless feature_table_exists?
- return data unless Feature.enabled?(:json_wrapper_legacy_mode, default_enabled: true)
+ return data unless Feature.enabled?(:json_wrapper_legacy_mode)
raise parser_error if INVALID_LEGACY_TYPES.any? { |type| data.is_a?(type) }
end
diff --git a/lib/gitlab/metrics/exporter/base_exporter.rb b/lib/gitlab/metrics/exporter/base_exporter.rb
index 2aea8d655fa..ba2eb729d7b 100644
--- a/lib/gitlab/metrics/exporter/base_exporter.rb
+++ b/lib/gitlab/metrics/exporter/base_exporter.rb
@@ -71,28 +71,17 @@ module Gitlab
end
def rack_app
- readiness = readiness_probe
- liveness = liveness_probe
pid = thread_name
gc_requests = @gc_requests
Rack::Builder.app do
use Rack::Deflater
use Gitlab::Metrics::Exporter::MetricsMiddleware, pid
- use Gitlab::Metrics::Exporter::HealthChecksMiddleware, readiness, liveness
use Gitlab::Metrics::Exporter::GcRequestMiddleware if gc_requests
use ::Prometheus::Client::Rack::Exporter if ::Gitlab::Metrics.metrics_folder_present?
run -> (env) { [404, {}, ['']] }
end
end
-
- def readiness_probe
- ::Gitlab::HealthChecks::Probes::Collection.new
- end
-
- def liveness_probe
- ::Gitlab::HealthChecks::Probes::Collection.new
- end
end
end
end
diff --git a/lib/gitlab/metrics/exporter/health_checks_middleware.rb b/lib/gitlab/metrics/exporter/health_checks_middleware.rb
deleted file mode 100644
index c43b8004b72..00000000000
--- a/lib/gitlab/metrics/exporter/health_checks_middleware.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module Metrics
- module Exporter
- class HealthChecksMiddleware
- def initialize(app, readiness_probe, liveness_probe)
- @app = app
- @readiness_probe = readiness_probe
- @liveness_probe = liveness_probe
- end
-
- def call(env)
- case env['PATH_INFO']
- when '/readiness' then render_probe(@readiness_probe)
- when '/liveness' then render_probe(@liveness_probe)
- else @app.call(env)
- end
- end
-
- private
-
- def render_probe(probe)
- result = probe.execute
-
- [
- result.http_status,
- { 'Content-Type' => 'application/json; charset=utf-8' },
- [result.json.to_json]
- ]
- end
- end
- end
- end
-end
diff --git a/lib/gitlab/pagination/gitaly_keyset_pager.rb b/lib/gitlab/pagination/gitaly_keyset_pager.rb
index e76cab688cc..8bbc9a93610 100644
--- a/lib/gitlab/pagination/gitaly_keyset_pager.rb
+++ b/lib/gitlab/pagination/gitaly_keyset_pager.rb
@@ -30,11 +30,11 @@ module Gitlab
return false unless params[:pagination] == "keyset"
if finder.is_a?(BranchesFinder)
- Feature.enabled?(:branch_list_keyset_pagination, project, default_enabled: :yaml)
+ Feature.enabled?(:branch_list_keyset_pagination, project)
elsif finder.is_a?(TagsFinder)
- Feature.enabled?(:tag_list_keyset_pagination, project, default_enabled: :yaml)
+ Feature.enabled?(:tag_list_keyset_pagination, project)
elsif finder.is_a?(::Repositories::TreeFinder)
- Feature.enabled?(:repository_tree_gitaly_pagination, project, default_enabled: :yaml)
+ Feature.enabled?(:repository_tree_gitaly_pagination, project)
else
false
end
@@ -44,11 +44,11 @@ module Gitlab
return false unless params[:page].blank? || params[:page].to_i == 1
if finder.is_a?(BranchesFinder)
- Feature.enabled?(:branch_list_keyset_pagination, project, default_enabled: :yaml)
+ Feature.enabled?(:branch_list_keyset_pagination, project)
elsif finder.is_a?(TagsFinder)
- Feature.enabled?(:tag_list_keyset_pagination, project, default_enabled: :yaml)
+ Feature.enabled?(:tag_list_keyset_pagination, project)
elsif finder.is_a?(::Repositories::TreeFinder)
- Feature.enabled?(:repository_tree_gitaly_pagination, project, default_enabled: :yaml)
+ Feature.enabled?(:repository_tree_gitaly_pagination, project)
else
false
end
diff --git a/lib/gitlab/phabricator_import.rb b/lib/gitlab/phabricator_import.rb
index 4c9d54a93ce..3885a9934d5 100644
--- a/lib/gitlab/phabricator_import.rb
+++ b/lib/gitlab/phabricator_import.rb
@@ -5,7 +5,7 @@ module Gitlab
BaseError = Class.new(StandardError)
def self.available?
- Feature.enabled?(:phabricator_import, default_enabled: :yaml) &&
+ Feature.enabled?(:phabricator_import) &&
Gitlab::CurrentSettings.import_sources.include?('phabricator')
end
end
diff --git a/lib/gitlab/repository_archive_rate_limiter.rb b/lib/gitlab/repository_archive_rate_limiter.rb
index d395b1aba7f..31a3dc34bf6 100644
--- a/lib/gitlab/repository_archive_rate_limiter.rb
+++ b/lib/gitlab/repository_archive_rate_limiter.rb
@@ -3,7 +3,7 @@
module Gitlab
module RepositoryArchiveRateLimiter
def check_archive_rate_limit!(current_user, project, &block)
- return unless Feature.enabled?(:archive_rate_limit, default_enabled: :yaml)
+ return unless Feature.enabled?(:archive_rate_limit)
threshold = current_user ? nil : 100
diff --git a/lib/gitlab/sidekiq_middleware/server_metrics.rb b/lib/gitlab/sidekiq_middleware/server_metrics.rb
index f3e1d0af2aa..dc5481289da 100644
--- a/lib/gitlab/sidekiq_middleware/server_metrics.rb
+++ b/lib/gitlab/sidekiq_middleware/server_metrics.rb
@@ -43,7 +43,7 @@ module Gitlab
metrics[:sidekiq_concurrency].set({}, Sidekiq.options[:concurrency].to_i)
- return unless ::Feature.enabled?(:sidekiq_job_completion_metric_initialize, default_enabled: :yaml)
+ return unless ::Feature.enabled?(:sidekiq_job_completion_metric_initialize)
::Gitlab::SidekiqConfig.current_worker_queue_mappings.each do |worker, queue|
worker_class = worker.safe_constantize
diff --git a/lib/gitlab/sourcegraph.rb b/lib/gitlab/sourcegraph.rb
index 892c4468107..8369e6fbe9b 100644
--- a/lib/gitlab/sourcegraph.rb
+++ b/lib/gitlab/sourcegraph.rb
@@ -15,7 +15,7 @@ module Gitlab
def feature_enabled?(actor = nil)
# Some CI jobs grep for Feature.enabled? in our codebase, so it is important this reference stays around.
- Feature.enabled?(:sourcegraph, actor, default_enabled: :yaml)
+ Feature.enabled?(:sourcegraph, actor)
end
private
diff --git a/lib/gitlab/template/gitlab_ci_yml_template.rb b/lib/gitlab/template/gitlab_ci_yml_template.rb
index bbeeea3a25d..835fc94e5d8 100644
--- a/lib/gitlab/template/gitlab_ci_yml_template.rb
+++ b/lib/gitlab/template/gitlab_ci_yml_template.rb
@@ -77,7 +77,7 @@ module Gitlab
return false unless templates_with_latest_version[key]
flag_name = "redirect_to_latest_template_#{key.underscore.tr('/', '_')}"
- ::Feature.enabled?(flag_name, project, default_enabled: :yaml)
+ ::Feature.enabled?(flag_name, project)
end
def templates_with_latest_version
diff --git a/lib/gitlab/untrusted_regexp.rb b/lib/gitlab/untrusted_regexp.rb
index c0730e7bd59..96e74f00c78 100644
--- a/lib/gitlab/untrusted_regexp.rb
+++ b/lib/gitlab/untrusted_regexp.rb
@@ -61,9 +61,9 @@ module Gitlab
def self.with_fallback(pattern, multiline: false)
UntrustedRegexp.new(pattern, multiline: multiline)
rescue RegexpError
- raise if Feature.enabled?(:disable_unsafe_regexp, default_enabled: :yaml)
+ raise if Feature.enabled?(:disable_unsafe_regexp)
- if Feature.enabled?(:ci_unsafe_regexp_logger, type: :ops, default_enabled: :yaml)
+ if Feature.enabled?(:ci_unsafe_regexp_logger, type: :ops)
Gitlab::AppJsonLogger.info(
class: self.name,
regexp: pattern.to_s,
diff --git a/lib/gitlab/usage/metrics/aggregates/aggregate.rb b/lib/gitlab/usage/metrics/aggregates/aggregate.rb
index 2545a505984..11e2fd22638 100644
--- a/lib/gitlab/usage/metrics/aggregates/aggregate.rb
+++ b/lib/gitlab/usage/metrics/aggregates/aggregate.rb
@@ -30,7 +30,7 @@ module Gitlab
def aggregated_metrics_data(start_date:, end_date:, time_frame:)
aggregated_metrics.each_with_object({}) do |aggregation, data|
- next if aggregation[:feature_flag] && Feature.disabled?(aggregation[:feature_flag], default_enabled: :yaml, type: :development)
+ next if aggregation[:feature_flag] && Feature.disabled?(aggregation[:feature_flag], type: :development)
next unless aggregation[:time_frame].include?(time_frame)
case aggregation[:source]
diff --git a/lib/gitlab/usage/metrics/instrumentations/cert_based_clusters_ff_metric.rb b/lib/gitlab/usage/metrics/instrumentations/cert_based_clusters_ff_metric.rb
index 6df6fef5d3a..d42250c9297 100644
--- a/lib/gitlab/usage/metrics/instrumentations/cert_based_clusters_ff_metric.rb
+++ b/lib/gitlab/usage/metrics/instrumentations/cert_based_clusters_ff_metric.rb
@@ -6,7 +6,7 @@ module Gitlab
module Instrumentations
class CertBasedClustersFfMetric < GenericMetric
value do
- Feature.enabled?(:certificate_based_clusters, default_enabled: :yaml, type: :ops)
+ Feature.enabled?(:certificate_based_clusters, type: :ops)
end
end
end
diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb
index 5d427929849..7d4fc6a03cf 100644
--- a/lib/gitlab/usage_data.rb
+++ b/lib/gitlab/usage_data.rb
@@ -685,7 +685,7 @@ module Gitlab
end
def with_duration
- return yield unless Feature.enabled?(:measure_service_ping_metric_collection, default_enabled: :yaml)
+ return yield unless Feature.enabled?(:measure_service_ping_metric_collection)
result = nil
duration = Benchmark.realtime do
diff --git a/lib/gitlab/usage_data_counters/ci_template_unique_counter.rb b/lib/gitlab/usage_data_counters/ci_template_unique_counter.rb
index cf3caf3f0c7..61c071c8738 100644
--- a/lib/gitlab/usage_data_counters/ci_template_unique_counter.rb
+++ b/lib/gitlab/usage_data_counters/ci_template_unique_counter.rb
@@ -15,7 +15,7 @@ module Gitlab::UsageDataCounters
)
namespace = project.namespace
- if Feature.enabled?(:route_hll_to_snowplow, namespace, default_enabled: :yaml)
+ if Feature.enabled?(:route_hll_to_snowplow, namespace)
Gitlab::Tracking.event(name, 'ci_templates_unique', namespace: namespace, user: user, project: project)
end
end
diff --git a/lib/gitlab/usage_data_counters/hll_redis_counter.rb b/lib/gitlab/usage_data_counters/hll_redis_counter.rb
index 3b34cd77cf5..0ace6e99c59 100644
--- a/lib/gitlab/usage_data_counters/hll_redis_counter.rb
+++ b/lib/gitlab/usage_data_counters/hll_redis_counter.rb
@@ -185,7 +185,7 @@ module Gitlab
def feature_enabled?(event)
return true if event[:feature_flag].blank?
- Feature.enabled?(event[:feature_flag], default_enabled: :yaml) && Feature.enabled?(:redis_hll_tracking, type: :ops, default_enabled: :yaml)
+ Feature.enabled?(event[:feature_flag]) && Feature.enabled?(:redis_hll_tracking, type: :ops)
end
# Allow to add totals for events that are in the same redis slot, category and have the same aggregation level
diff --git a/lib/product_analytics/collector_app.rb b/lib/product_analytics/collector_app.rb
index cf971eef4b6..1008d2f264c 100644
--- a/lib/product_analytics/collector_app.rb
+++ b/lib/product_analytics/collector_app.rb
@@ -14,7 +14,7 @@ module ProductAnalytics
# for project without the feature enabled. During increase of feature adoption, this
# check will be removed for better performance.
project = Project.find(params['aid'].to_i)
- return not_found unless Feature.enabled?(:product_analytics, project, default_enabled: false)
+ return not_found unless Feature.enabled?(:product_analytics, project)
# Snowplow tracker has own format of events.
# We need to convert them to match the schema of our database.
diff --git a/lib/tasks/gitlab/db.rake b/lib/tasks/gitlab/db.rake
index 3a7e53a27e4..ff1587a3719 100644
--- a/lib/tasks/gitlab/db.rake
+++ b/lib/tasks/gitlab/db.rake
@@ -282,7 +282,7 @@ namespace :gitlab do
puts "There are #{Gitlab::Database::Reindexing::QueuedAction.queued.size} queued actions in total."
end
- unless Feature.enabled?(:database_reindexing, type: :ops, default_enabled: :yaml)
+ unless Feature.enabled?(:database_reindexing, type: :ops)
puts <<~NOTE.color(:yellow)
Note: database_reindexing feature is currently disabled.
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 9fb2a9c8c1c..fa2618f5525 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -8370,9 +8370,6 @@ msgstr ""
msgid "ClusterAgent|You have insufficient permissions to delete this cluster agent"
msgstr ""
-msgid "ClusterApplicationsRemoved|One-click application management was removed in GitLab 14.0. Your applications are still installed in your cluster, and integrations continue working."
-msgstr ""
-
msgid "ClusterIntegration|%{linkStart}More information%{linkEnd}"
msgstr ""
@@ -40429,6 +40426,9 @@ msgstr ""
msgid "UsageQuota|Current period usage"
msgstr ""
+msgid "UsageQuota|Dependency proxy"
+msgstr ""
+
msgid "UsageQuota|File attachments and smaller design graphics."
msgstr ""
@@ -40453,6 +40453,9 @@ msgstr ""
msgid "UsageQuota|Learn more about usage quotas"
msgstr ""
+msgid "UsageQuota|Local proxy used for frequently-accessed upstream Docker images. %{linkStart}More information%{linkEnd}"
+msgstr ""
+
msgid "UsageQuota|No CI minutes usage data available."
msgstr ""
diff --git a/metrics_server/dependencies.rb b/metrics_server/dependencies.rb
index bfa6aae8ef8..3f188658ba2 100644
--- a/metrics_server/dependencies.rb
+++ b/metrics_server/dependencies.rb
@@ -26,7 +26,6 @@ require_relative '../lib/gitlab/metrics/exporter/base_exporter'
require_relative '../lib/gitlab/metrics/exporter/web_exporter'
require_relative '../lib/gitlab/metrics/exporter/sidekiq_exporter'
require_relative '../lib/gitlab/metrics/exporter/metrics_middleware'
-require_relative '../lib/gitlab/metrics/exporter/health_checks_middleware'
require_relative '../lib/gitlab/metrics/exporter/gc_request_middleware'
require_relative '../lib/gitlab/health_checks/probes/collection'
require_relative '../lib/gitlab/health_checks/probes/status'
diff --git a/sidekiq_cluster/cli.rb b/sidekiq_cluster/cli.rb
index 4f02812d2e2..408b3864d5e 100644
--- a/sidekiq_cluster/cli.rb
+++ b/sidekiq_cluster/cli.rb
@@ -174,26 +174,12 @@ module Gitlab
::Settings.dig('monitoring', 'sidekiq_exporter', 'enabled')
end
- def exporter_has_a_unique_port?
- # In https://gitlab.com/gitlab-org/gitlab/-/issues/345802 we added settings for sidekiq_health_checks.
- # These settings default to the same values as sidekiq_exporter for backwards compatibility.
- # If a different port for sidekiq_health_checks has been set up, we know that the
- # user wants to serve health checks and metrics from different servers.
- return false if sidekiq_health_check_port.nil? || sidekiq_exporter_port.nil?
-
- sidekiq_exporter_port != sidekiq_health_check_port
- end
-
def sidekiq_exporter_port
::Settings.dig('monitoring', 'sidekiq_exporter', 'port')
end
- def sidekiq_health_check_port
- ::Settings.dig('monitoring', 'sidekiq_health_checks', 'port')
- end
-
def metrics_server_enabled?
- !@dryrun && sidekiq_exporter_enabled? && exporter_has_a_unique_port?
+ !@dryrun && sidekiq_exporter_enabled?
end
def option_parser
diff --git a/spec/commands/sidekiq_cluster/cli_spec.rb b/spec/commands/sidekiq_cluster/cli_spec.rb
index d949be8d102..ecad3f6b0bf 100644
--- a/spec/commands/sidekiq_cluster/cli_spec.rb
+++ b/spec/commands/sidekiq_cluster/cli_spec.rb
@@ -18,7 +18,6 @@ RSpec.describe Gitlab::SidekiqCluster::CLI, stub_settings_source: true do # rubo
let(:sidekiq_exporter_enabled) { false }
let(:sidekiq_exporter_port) { '3807' }
- let(:sidekiq_health_checks_port) { '3807' }
let(:config_file) { Tempfile.new('gitlab.yml') }
let(:config) do
@@ -29,11 +28,6 @@ RSpec.describe Gitlab::SidekiqCluster::CLI, stub_settings_source: true do # rubo
'address' => 'localhost',
'enabled' => sidekiq_exporter_enabled,
'port' => sidekiq_exporter_port
- },
- 'sidekiq_health_checks' => {
- 'address' => 'localhost',
- 'enabled' => sidekiq_exporter_enabled,
- 'port' => sidekiq_health_checks_port
}
}
}
@@ -310,37 +304,12 @@ RSpec.describe Gitlab::SidekiqCluster::CLI, stub_settings_source: true do # rubo
cli.run(%w(foo))
end
- context 'when there are no sidekiq_health_checks settings set' do
- let(:sidekiq_exporter_enabled) { true }
-
- it 'does not start a sidekiq metrics server' do
- expect(MetricsServer).not_to receive(:start_for_sidekiq)
-
- cli.run(%w(foo))
- end
- end
-
- context 'when the sidekiq_exporter.port setting is not set' do
- let(:sidekiq_exporter_enabled) { true }
-
- it 'does not start a sidekiq metrics server' do
- expect(MetricsServer).not_to receive(:start_for_sidekiq)
-
- cli.run(%w(foo))
- end
- end
-
- context 'when sidekiq_exporter.enabled setting is not set' do
+ context 'when sidekiq_exporter is not set up' do
let(:config) do
{
'test' => {
'monitoring' => {
- 'sidekiq_exporter' => {},
- 'sidekiq_health_checks' => {
- 'address' => 'localhost',
- 'enabled' => sidekiq_exporter_enabled,
- 'port' => sidekiq_health_checks_port
- }
+ 'sidekiq_exporter' => {}
}
}
}
@@ -353,13 +322,12 @@ RSpec.describe Gitlab::SidekiqCluster::CLI, stub_settings_source: true do # rubo
end
end
- context 'with a blank sidekiq_exporter setting' do
+ context 'with missing sidekiq_exporter setting' do
let(:config) do
{
'test' => {
'monitoring' => {
- 'sidekiq_exporter' => nil,
- 'sidekiq_health_checks' => nil
+ 'sidekiq_exporter' => nil
}
}
}
@@ -376,26 +344,21 @@ RSpec.describe Gitlab::SidekiqCluster::CLI, stub_settings_source: true do # rubo
end
end
- context 'with valid settings' do
- using RSpec::Parameterized::TableSyntax
+ context 'when sidekiq_exporter is disabled' do
+ it 'does not start a sidekiq metrics server' do
+ expect(MetricsServer).not_to receive(:start_for_sidekiq)
- where(:sidekiq_exporter_enabled, :sidekiq_exporter_port, :sidekiq_health_checks_port, :start_metrics_server) do
- true | '3807' | '3907' | true
- true | '3807' | '3807' | false
- false | '3807' | '3907' | false
- false | '3807' | '3907' | false
+ cli.run(%w(foo))
end
+ end
- with_them do
- specify do
- if start_metrics_server
- expect(MetricsServer).to receive(:start_for_sidekiq).with(metrics_dir: metrics_dir, reset_signals: trapped_signals)
- else
- expect(MetricsServer).not_to receive(:start_for_sidekiq)
- end
+ context 'when sidekiq_exporter is enabled' do
+ let(:sidekiq_exporter_enabled) { true }
+
+ it 'starts the metrics server' do
+ expect(MetricsServer).to receive(:start_for_sidekiq).with(metrics_dir: metrics_dir, reset_signals: trapped_signals)
- cli.run(%w(foo))
- end
+ cli.run(%w(foo))
end
end
@@ -431,7 +394,6 @@ RSpec.describe Gitlab::SidekiqCluster::CLI, stub_settings_source: true do # rubo
context 'supervising the cluster' do
let(:sidekiq_exporter_enabled) { true }
- let(:sidekiq_health_checks_port) { '3907' }
let(:metrics_server_pid) { 99 }
let(:sidekiq_worker_pids) { [2, 42] }
diff --git a/spec/controllers/graphql_controller_spec.rb b/spec/controllers/graphql_controller_spec.rb
index 4de31e2e135..0818dce776d 100644
--- a/spec/controllers/graphql_controller_spec.rb
+++ b/spec/controllers/graphql_controller_spec.rb
@@ -9,15 +9,10 @@ RSpec.describe GraphqlController do
stub_feature_flags(graphql: true)
end
- describe 'ArgumentError' do
- let(:user) { create(:user) }
- let(:message) { 'green ideas sleep furiously' }
+ describe 'rescue_from' do
+ let_it_be(:message) { 'green ideas sleep furiously' }
- before do
- sign_in(user)
- end
-
- it 'handles argument errors' do
+ it 'handles ArgumentError' do
allow(subject).to receive(:execute) do
raise Gitlab::Graphql::Errors::ArgumentError, message
end
@@ -28,6 +23,19 @@ RSpec.describe GraphqlController do
'errors' => include(a_hash_including('message' => message))
)
end
+
+ it 'handles StandardError' do
+ allow(subject).to receive(:execute) do
+ raise StandardError, message
+ end
+
+ post :execute
+
+ expect(json_response).to include(
+ 'errors' => include(a_hash_including('message' => /Internal server error/,
+ 'raisedAt' => /graphql_controller_spec.rb/))
+ )
+ end
end
describe 'POST #execute' do
diff --git a/spec/features/dashboard/todos/todos_sorting_spec.rb b/spec/features/dashboard/todos/todos_sorting_spec.rb
index d0f9a2b35f3..d593031590e 100644
--- a/spec/features/dashboard/todos/todos_sorting_spec.rb
+++ b/spec/features/dashboard/todos/todos_sorting_spec.rb
@@ -23,11 +23,12 @@ RSpec.describe 'Dashboard > User sorts todos' do
let!(:merge_request_1) { create(:merge_request, source_project: project, title: 'merge_request_1') }
before do
- create(:todo, user: user, project: project, target: issue_4, created_at: 5.hours.ago)
- create(:todo, user: user, project: project, target: issue_2, created_at: 4.hours.ago)
- create(:todo, user: user, project: project, target: issue_3, created_at: 3.hours.ago)
- create(:todo, user: user, project: project, target: issue_1, created_at: 2.hours.ago)
- create(:todo, user: user, project: project, target: merge_request_1, created_at: 1.hour.ago)
+ create(:todo, user: user, project: project, target: issue_4, created_at: 5.hours.ago, updated_at: 5.hours.ago)
+ create(:todo, user: user, project: project, target: issue_2, created_at: 4.hours.ago, updated_at: 4.hours.ago)
+ create(:todo, user: user, project: project, target: issue_3, created_at: 3.hours.ago, updated_at: 2.minutes.ago)
+ create(:todo, user: user, project: project, target: issue_1, created_at: 2.hours.ago, updated_at: 2.hours.ago)
+ create(:todo, user: user, project: project, target: merge_request_1, created_at: 1.hour.ago,
+ updated_at: 1.hour.ago)
merge_request_1.labels << label_1
issue_3.labels << label_1
@@ -70,6 +71,17 @@ RSpec.describe 'Dashboard > User sorts todos' do
expect(results_list.all('.todo-title')[3]).to have_content('issue_2')
expect(results_list.all('.todo-title')[4]).to have_content('issue_4')
end
+
+ it 'sorts by newest updated todos first' do
+ click_link 'Updated date'
+
+ results_list = page.find('.todos-list')
+ expect(results_list.all('.todo-title')[0]).to have_content('issue_3')
+ expect(results_list.all('.todo-title')[1]).to have_content('merge_request_1')
+ expect(results_list.all('.todo-title')[2]).to have_content('issue_1')
+ expect(results_list.all('.todo-title')[3]).to have_content('issue_2')
+ expect(results_list.all('.todo-title')[4]).to have_content('issue_4')
+ end
end
context 'issues and merge requests' do
diff --git a/spec/frontend/clusters/forms/components/integration_form_spec.js b/spec/frontend/clusters/forms/components/integration_form_spec.js
index dd278bcd2ce..67d442bfdc5 100644
--- a/spec/frontend/clusters/forms/components/integration_form_spec.js
+++ b/spec/frontend/clusters/forms/components/integration_form_spec.js
@@ -22,7 +22,7 @@ describe('ClusterIntegrationForm', () => {
store: createStore(storeValues),
provide: {
autoDevopsHelpPath: 'topics/autodevops/index',
- externalEndpointHelpPath: 'user/clusters/applications.md',
+ externalEndpointHelpPath: 'user/project/clusters/index.md#base-domain',
},
});
};
diff --git a/spec/frontend/vue_shared/components/usage_quotas/usage_banner_spec.js b/spec/frontend/vue_shared/components/usage_quotas/usage_banner_spec.js
new file mode 100644
index 00000000000..662c09d02bf
--- /dev/null
+++ b/spec/frontend/vue_shared/components/usage_quotas/usage_banner_spec.js
@@ -0,0 +1,62 @@
+import { GlSkeletonLoader } from '@gitlab/ui';
+import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
+import component from '~/vue_shared/components/usage_quotas/usage_banner.vue';
+
+describe('usage banner', () => {
+ let wrapper;
+
+ const findLeftPrimaryTextSlot = () => wrapper.findByTestId('left-primary-text');
+ const findLeftSecondaryTextSlot = () => wrapper.findByTestId('left-secondary-text');
+ const findRightPrimaryTextSlot = () => wrapper.findByTestId('right-primary-text');
+ const findRightSecondaryTextSlot = () => wrapper.findByTestId('right-secondary-text');
+ const findSkeletonLoader = () => wrapper.findComponent(GlSkeletonLoader);
+
+ const mountComponent = (propsData, slots) => {
+ wrapper = shallowMountExtended(component, {
+ propsData,
+ slots: {
+ 'left-primary-text': '<div data-testid="left-primary-text" />',
+ 'left-secondary-text': '<div data-testid="left-secondary-text" />',
+ 'right-primary-text': '<div data-testid="right-primary-text" />',
+ 'right-secondary-text': '<div data-testid="right-secondary-text" />',
+ ...slots,
+ },
+ });
+ };
+
+ afterEach(() => {
+ wrapper.destroy();
+ });
+
+ describe.each`
+ slotName | finderFunction
+ ${'left-primary-text'} | ${findLeftPrimaryTextSlot}
+ ${'left-secondary-text'} | ${findLeftSecondaryTextSlot}
+ ${'right-primary-text'} | ${findRightPrimaryTextSlot}
+ ${'right-secondary-text'} | ${findRightSecondaryTextSlot}
+ `('$slotName slot', ({ finderFunction, slotName }) => {
+ it('exist when the slot is filled', () => {
+ mountComponent();
+
+ expect(finderFunction().exists()).toBe(true);
+ });
+
+ it('does not exist when the slot is empty', () => {
+ mountComponent({}, { [slotName]: '' });
+
+ expect(finderFunction().exists()).toBe(false);
+ });
+ });
+
+ it('should show a skeleton loader component', () => {
+ mountComponent({ loading: true });
+
+ expect(findSkeletonLoader().exists()).toBe(true);
+ });
+
+ it('should not show a skeleton loader component', () => {
+ mountComponent();
+
+ expect(findSkeletonLoader().exists()).toBe(false);
+ });
+});
diff --git a/spec/graphql/resolvers/package_pipelines_resolver_spec.rb b/spec/graphql/resolvers/package_pipelines_resolver_spec.rb
index 463785f3026..2fbe07b4465 100644
--- a/spec/graphql/resolvers/package_pipelines_resolver_spec.rb
+++ b/spec/graphql/resolvers/package_pipelines_resolver_spec.rb
@@ -134,7 +134,7 @@ RSpec.describe Resolvers::PackagePipelinesResolver do
expectation = expect { GitlabSchema.execute(query, context: { current_user: user }) }
- if Feature.enabled?(:packages_graphql_pipelines_resolver, default_enabled: :yaml)
+ if Feature.enabled?(:packages_graphql_pipelines_resolver)
expectation.not_to exceed_query_limit(control)
else
expectation.to exceed_query_limit(control)
diff --git a/spec/lib/feature_spec.rb b/spec/lib/feature_spec.rb
index 92ad899fc5e..0cf2e9db8ae 100644
--- a/spec/lib/feature_spec.rb
+++ b/spec/lib/feature_spec.rb
@@ -388,14 +388,14 @@ RSpec.describe Feature, stub_feature_flags: false do
context 'when `default_enabled: :yaml` is used in code' do
it 'reads the default from the YAML definition' do
- expect(described_class.enabled?(:my_feature_flag, default_enabled: :yaml)).to eq(false)
+ expect(described_class.enabled?(:my_feature_flag)).to eq(false)
end
context 'when default_enabled is true in the YAML definition' do
let(:default_enabled) { true }
it 'reads the default from the YAML definition' do
- expect(described_class.enabled?(:my_feature_flag, default_enabled: :yaml)).to eq(true)
+ expect(described_class.enabled?(:my_feature_flag)).to eq(true)
end
context 'and feature has been disabled' do
@@ -404,20 +404,20 @@ RSpec.describe Feature, stub_feature_flags: false do
end
it 'is not enabled' do
- expect(described_class.enabled?(:my_feature_flag, default_enabled: :yaml)).to eq(false)
+ expect(described_class.enabled?(:my_feature_flag)).to eq(false)
end
end
end
context 'with a cached value and the YAML definition is changed thereafter' do
before do
- described_class.enabled?(:my_feature_flag, default_enabled: :yaml)
+ described_class.enabled?(:my_feature_flag)
end
it 'reads new default value' do
allow(definition).to receive(:default_enabled).and_return(true)
- expect(described_class.enabled?(:my_feature_flag, default_enabled: :yaml)).to eq(true)
+ expect(described_class.enabled?(:my_feature_flag)).to eq(true)
end
end
@@ -426,7 +426,7 @@ RSpec.describe Feature, stub_feature_flags: false do
context 'when in dev or test environment' do
it 'raises an error for dev' do
- expect { described_class.enabled?(:non_existent_flag, type: optional_type, default_enabled: :yaml) }
+ expect { described_class.enabled?(:non_existent_flag, type: optional_type) }
.to raise_error(
Feature::InvalidFeatureFlagError,
"The feature flag YAML definition for 'non_existent_flag' does not exist")
@@ -446,7 +446,7 @@ RSpec.describe Feature, stub_feature_flags: false do
it 'checks the persisted status and returns false' do
expect(described_class).to receive(:with_feature).with(:non_existent_flag).and_call_original
- expect(described_class.enabled?(:non_existent_flag, type: optional_type, default_enabled: :yaml)).to eq(false)
+ expect(described_class.enabled?(:non_existent_flag, type: optional_type)).to eq(false)
end
end
@@ -458,7 +458,7 @@ RSpec.describe Feature, stub_feature_flags: false do
it 'returns false without checking the status in the database' do
expect(described_class).not_to receive(:get)
- expect(described_class.enabled?(:non_existent_flag, type: optional_type, default_enabled: :yaml)).to eq(false)
+ expect(described_class.enabled?(:non_existent_flag, type: optional_type)).to eq(false)
end
end
end
diff --git a/spec/lib/gitlab/background_migration/backfill_integrations_type_new_spec.rb b/spec/lib/gitlab/background_migration/backfill_integrations_type_new_spec.rb
index 8f765a7a536..d8a7ec775dd 100644
--- a/spec/lib/gitlab/background_migration/backfill_integrations_type_new_spec.rb
+++ b/spec/lib/gitlab/background_migration/backfill_integrations_type_new_spec.rb
@@ -2,10 +2,19 @@
require 'spec_helper'
-RSpec.describe Gitlab::BackgroundMigration::BackfillIntegrationsTypeNew do
+RSpec.describe Gitlab::BackgroundMigration::BackfillIntegrationsTypeNew, :migration, schema: 20220212120735 do
let(:migration) { described_class.new }
let(:integrations) { table(:integrations) }
- let(:namespaced_integrations) { Gitlab::Integrations::StiType.namespaced_integrations }
+
+ let(:namespaced_integrations) do
+ Set.new(%w[
+ Asana Assembla Bamboo Bugzilla Buildkite Campfire Confluence CustomIssueTracker Datadog
+ Discord DroneCi EmailsOnPush Ewm ExternalWiki Flowdock HangoutsChat Harbor Irker Jenkins Jira Mattermost
+ MattermostSlashCommands MicrosoftTeams MockCi MockMonitoring Packagist PipelinesEmail Pivotaltracker
+ Prometheus Pushover Redmine Shimo Slack SlackSlashCommands Teamcity UnifyCircuit WebexTeams Youtrack Zentao
+ Github GitlabSlackApplication
+ ]).freeze
+ end
before do
integrations.connection.execute 'ALTER TABLE integrations DISABLE TRIGGER "trigger_type_new_on_insert"'
diff --git a/spec/lib/gitlab/ci/templates/managed_cluster_applications_gitlab_ci_yaml_spec.rb b/spec/lib/gitlab/ci/templates/managed_cluster_applications_gitlab_ci_yaml_spec.rb
deleted file mode 100644
index 14aaf717453..00000000000
--- a/spec/lib/gitlab/ci/templates/managed_cluster_applications_gitlab_ci_yaml_spec.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe 'Managed-Cluster-Applications.gitlab-ci.yml' do
- subject(:template) { Gitlab::Template::GitlabCiYmlTemplate.find('Managed-Cluster-Applications') }
-
- describe 'the created pipeline' do
- let_it_be(:user) { create(:user) }
-
- let(:project) { create(:project, :custom_repo, namespace: user.namespace, files: { 'README.md' => '' }) }
- let(:service) { Ci::CreatePipelineService.new(project, user, ref: pipeline_branch ) }
- let(:pipeline) { service.execute!(:push).payload }
- let(:build_names) { pipeline.builds.pluck(:name) }
- let(:default_branch) { project.default_branch_or_main }
- let(:pipeline_branch) { default_branch }
-
- before do
- stub_ci_pipeline_yaml_file(template.content)
- end
-
- context 'for a default branch' do
- it 'creates a apply job' do
- expect(build_names).to match_array('apply')
- end
- end
-
- context 'outside of default branch' do
- let(:pipeline_branch) { 'a_branch' }
-
- before do
- project.repository.create_branch(pipeline_branch, default_branch)
- end
-
- it 'has no jobs' do
- expect { pipeline }.to raise_error(Ci::CreatePipelineService::CreateError, 'No stages / jobs for this pipeline.')
- end
- end
- end
-end
diff --git a/spec/lib/gitlab/database/migration_helpers/restrict_gitlab_schema_spec.rb b/spec/lib/gitlab/database/migration_helpers/restrict_gitlab_schema_spec.rb
index e7b5bad8626..bc12096a5b7 100644
--- a/spec/lib/gitlab/database/migration_helpers/restrict_gitlab_schema_spec.rb
+++ b/spec/lib/gitlab/database/migration_helpers/restrict_gitlab_schema_spec.rb
@@ -465,7 +465,7 @@ RSpec.describe Gitlab::Database::MigrationHelpers::RestrictGitlabSchema, query_a
"does raise exception when accessing feature flags" => {
migration: ->(klass) do
def up
- Feature.enabled?(:redis_hll_tracking, type: :ops, default_enabled: :yaml)
+ Feature.enabled?(:redis_hll_tracking, type: :ops)
end
def down
diff --git a/spec/lib/gitlab/database/migration_helpers_spec.rb b/spec/lib/gitlab/database/migration_helpers_spec.rb
index fd80cf3b396..ffe2e71b50f 100644
--- a/spec/lib/gitlab/database/migration_helpers_spec.rb
+++ b/spec/lib/gitlab/database/migration_helpers_spec.rb
@@ -2246,7 +2246,7 @@ RSpec.describe Gitlab::Database::MigrationHelpers do
.to raise_error "Expected batched background migration for the given configuration to be marked as 'finished', but it is 'active':" \
"\t#{configuration}" \
"\n\n" \
- "Finalize it manualy by running" \
+ "Finalize it manually by running" \
"\n\n" \
"\tsudo gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,events,id,'[[\"id\"]\\,[\"id_convert_to_bigint\"]\\,null]']" \
"\n\n" \
diff --git a/spec/lib/gitlab/experiment/rollout/feature_spec.rb b/spec/lib/gitlab/experiment/rollout/feature_spec.rb
index 82603e6fe0f..a66f4fea207 100644
--- a/spec/lib/gitlab/experiment/rollout/feature_spec.rb
+++ b/spec/lib/gitlab/experiment/rollout/feature_spec.rb
@@ -53,8 +53,7 @@ RSpec.describe Gitlab::Experiment::Rollout::Feature, :experiment do
expect(Feature).to receive(:enabled?).with(
'namespaced_stub',
subject,
- type: :experiment,
- default_enabled: :yaml
+ type: :experiment
).and_return(false)
expect(subject.execute_assignment).to be_nil
diff --git a/spec/lib/gitlab/metrics/exporter/health_checks_middleware_spec.rb b/spec/lib/gitlab/health_checks/middleware_spec.rb
index 9ee46a45e7a..3b644539acc 100644
--- a/spec/lib/gitlab/metrics/exporter/health_checks_middleware_spec.rb
+++ b/spec/lib/gitlab/health_checks/middleware_spec.rb
@@ -2,12 +2,12 @@
require 'fast_spec_helper'
-RSpec.describe Gitlab::Metrics::Exporter::HealthChecksMiddleware do
- let(:app) { double(:app) }
+RSpec.describe Gitlab::HealthChecks::Middleware do
+ let(:app) { instance_double(Proc) }
let(:env) { { 'PATH_INFO' => path } }
- let(:readiness_probe) { double(:readiness_probe) }
- let(:liveness_probe) { double(:liveness_probe) }
+ let(:readiness_probe) { instance_double(Gitlab::HealthChecks::Probes::Collection) }
+ let(:liveness_probe) { instance_double(Gitlab::HealthChecks::Probes::Collection) }
let(:probe_result) { Gitlab::HealthChecks::Probes::Status.new(200, { status: 'ok' }) }
subject(:middleware) { described_class.new(app, readiness_probe, liveness_probe) }
diff --git a/spec/lib/gitlab/health_checks/server_spec.rb b/spec/lib/gitlab/health_checks/server_spec.rb
new file mode 100644
index 00000000000..65d24acbf22
--- /dev/null
+++ b/spec/lib/gitlab/health_checks/server_spec.rb
@@ -0,0 +1,64 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Gitlab::HealthChecks::Server do
+ context 'with running server thread' do
+ subject(:server) { described_class.new(address: 'localhost', port: 8082) }
+
+ before do
+ # We need to send a request to localhost
+ WebMock.allow_net_connect!
+
+ server.start
+ end
+
+ after do
+ webmock_enable!
+
+ server.stop
+ end
+
+ shared_examples 'serves health check at' do |path|
+ it 'responds with 200 OK' do
+ response = Gitlab::HTTP.try_get("http://localhost:8082/#{path}", allow_local_requests: true)
+
+ expect(response.code).to eq(200)
+ end
+ end
+
+ describe '/readiness' do
+ it_behaves_like 'serves health check at', 'readiness'
+ end
+
+ describe '/liveness' do
+ it_behaves_like 'serves health check at', 'liveness'
+ end
+
+ describe 'other routes' do
+ it 'serves 404' do
+ response = Gitlab::HTTP.try_get("http://localhost:8082/other", allow_local_requests: true)
+
+ expect(response.code).to eq(404)
+ end
+ end
+ end
+
+ context 'when server thread goes away' do
+ before do
+ expect_next_instance_of(::WEBrick::HTTPServer) do |webrick|
+ allow(webrick).to receive(:start)
+ expect(webrick).to receive(:listeners).and_call_original
+ end
+ end
+
+ specify 'stop closes TCP socket' do
+ server = described_class.new(address: 'localhost', port: 8082)
+ server.start
+
+ expect(server.thread).to receive(:alive?).and_return(false).at_least(:once)
+
+ server.stop
+ end
+ end
+end
diff --git a/spec/lib/gitlab/json_spec.rb b/spec/lib/gitlab/json_spec.rb
index 5ffe736da54..7c093049e18 100644
--- a/spec/lib/gitlab/json_spec.rb
+++ b/spec/lib/gitlab/json_spec.rb
@@ -290,7 +290,7 @@ RSpec.describe Gitlab::Json do
end
it "skips legacy mode handling" do
- expect(Feature).not_to receive(:enabled?).with(:json_wrapper_legacy_mode, default_enabled: true)
+ expect(Feature).not_to receive(:enabled?).with(:json_wrapper_legacy_mode)
subject.send(:handle_legacy_mode!, {})
end
diff --git a/spec/lib/gitlab/metrics/exporter/base_exporter_spec.rb b/spec/lib/gitlab/metrics/exporter/base_exporter_spec.rb
index c7afc02f0af..66fba7ab683 100644
--- a/spec/lib/gitlab/metrics/exporter/base_exporter_spec.rb
+++ b/spec/lib/gitlab/metrics/exporter/base_exporter_spec.rb
@@ -152,8 +152,6 @@ RSpec.describe Gitlab::Metrics::Exporter::BaseExporter do
where(:method_class, :path, :http_status) do
Net::HTTP::Get | '/metrics' | 200
- Net::HTTP::Get | '/liveness' | 200
- Net::HTTP::Get | '/readiness' | 200
Net::HTTP::Get | '/' | 404
end
diff --git a/spec/migrations/20220213103859_remove_integrations_type_spec.rb b/spec/migrations/20220213103859_remove_integrations_type_spec.rb
new file mode 100644
index 00000000000..b1a4370700a
--- /dev/null
+++ b/spec/migrations/20220213103859_remove_integrations_type_spec.rb
@@ -0,0 +1,31 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+require_migration!
+
+RSpec.describe RemoveIntegrationsType, :migration do
+ subject(:migration) { described_class.new }
+
+ let(:integrations) { table(:integrations) }
+ let(:bg_migration) { instance_double(bg_migration_class) }
+
+ before do
+ stub_const("#{described_class.name}::BATCH_SIZE", 2)
+ end
+
+ it 'performs remaining background migrations', :aggregate_failures do
+ # Already migrated
+ integrations.create!(type: 'SlackService', type_new: 'Integrations::Slack')
+ # update required
+ record1 = integrations.create!(type: 'SlackService')
+ record2 = integrations.create!(type: 'JiraService')
+ record3 = integrations.create!(type: 'SlackService')
+
+ migrate!
+
+ expect(record1.reload.type_new).to eq 'Integrations::Slack'
+ expect(record2.reload.type_new).to eq 'Integrations::Jira'
+ expect(record3.reload.type_new).to eq 'Integrations::Slack'
+ end
+end
diff --git a/spec/models/integration_spec.rb b/spec/models/integration_spec.rb
index 7d4a50788f3..0567a8bd386 100644
--- a/spec/models/integration_spec.rb
+++ b/spec/models/integration_spec.rb
@@ -249,18 +249,24 @@ RSpec.describe Integration do
it_behaves_like 'integration instances'
context 'with all existing instances' do
+ def integration_hash(type)
+ Integration.new(instance: true, type: type).to_integration_hash
+ end
+
before do
- Integration.insert_all(
- Integration.available_integration_types(include_project_specific: false).map { |type| { instance: true, type: type } }
- )
+ attrs = Integration.available_integration_types(include_project_specific: false).map do
+ integration_hash(_1)
+ end
+
+ Integration.insert_all(attrs)
end
it_behaves_like 'integration instances'
- context 'with a previous existing integration (MockCiService) and a new integration (Asana)' do
+ context 'with a previous existing integration (:mock_ci) and a new integration (:asana)' do
before do
- Integration.insert({ type: 'MockCiService', instance: true })
- Integration.delete_by(type: 'AsanaService', instance: true)
+ Integration.insert(integration_hash(:mock_ci))
+ Integration.delete_by(**integration_hash(:asana))
end
it_behaves_like 'integration instances'
diff --git a/spec/models/integrations/jira_spec.rb b/spec/models/integrations/jira_spec.rb
index 8269c0f52a0..a9cac5a982a 100644
--- a/spec/models/integrations/jira_spec.rb
+++ b/spec/models/integrations/jira_spec.rb
@@ -414,8 +414,7 @@ RSpec.describe Integrations::Jira do
end
describe '#client' do
- it 'uses the default GitLab::HTTP timeouts' do
- timeouts = Gitlab::HTTP::DEFAULT_TIMEOUT_OPTIONS
+ subject do
stub_request(:get, 'http://jira.example.com/foo')
expect(Gitlab::HTTP).to receive(:httparty_perform_request)
@@ -423,6 +422,32 @@ RSpec.describe Integrations::Jira do
jira_integration.client.get('/foo')
end
+
+ context 'when the FF :jira_raise_timeouts is enabled' do
+ let(:timeouts) do
+ {
+ open_timeout: 2.minutes,
+ read_timeout: 2.minutes,
+ write_timeout: 2.minutes
+ }
+ end
+
+ it 'uses custom timeouts' do
+ subject
+ end
+ end
+
+ context 'when the FF :jira_raise_timeouts is disabled' do
+ before do
+ stub_feature_flags(jira_raise_timeouts: false)
+ end
+
+ let(:timeouts) { Gitlab::HTTP::DEFAULT_TIMEOUT_OPTIONS }
+
+ it 'uses the default GitLab::HTTP timeouts' do
+ subject
+ end
+ end
end
describe '#find_issue' do
diff --git a/spec/support/import_export/common_util.rb b/spec/support/import_export/common_util.rb
index 1aa20dab6f8..9da151895a7 100644
--- a/spec/support/import_export/common_util.rb
+++ b/spec/support/import_export/common_util.rb
@@ -19,7 +19,7 @@ module ImportExport
end
def setup_reader(reader)
- if reader == :ndjson_reader && Feature.enabled?(:project_import_ndjson, default_enabled: true)
+ if reader == :ndjson_reader && Feature.enabled?(:project_import_ndjson)
allow_any_instance_of(Gitlab::ImportExport::Json::LegacyReader::File).to receive(:exist?).and_return(false)
allow_any_instance_of(Gitlab::ImportExport::Json::NdjsonReader).to receive(:exist?).and_return(true)
else