From 3608a02eb461c2cadbac0e08c0c6edec471d6648 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 31 Aug 2023 09:10:44 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .gitlab-ci.yml | 2 +- GITALY_SERVER_VERSION | 2 +- app/helpers/environments_helper.rb | 4 +- app/helpers/projects_helper.rb | 8 -- .../cycle_analytics/stage_event_hash.rb | 2 +- app/models/project.rb | 11 -- app/models/project_metrics_setting.rb | 16 --- .../relative_position_rebalancing_service.rb | 2 +- ...y_additional_properties_approval_rules.yml | 8 ++ .../merge_request_concepts/performance.md | 10 +- doc/user/search/index.md | 21 ++-- ...backfill_namespace_id_for_project_route.rb | 2 +- .../cleanup_orphaned_routes.rb | 2 +- .../fix_first_mentioned_in_commit_at.rb | 2 +- .../fix_projects_without_project_feature.rb | 2 +- ...fix_projects_without_prometheus_service.rb | 4 +- .../populate_projects_star_count.rb | 2 +- .../backfill_project_namespaces.rb | 2 +- lib/gitlab/database/as_with_materialized.rb | 18 +-- lib/gitlab/database/bulk_update.rb | 2 +- .../postgres_hll/batch_distinct_counter.rb | 2 +- .../import_export/project/import_export.yml | 5 - .../import_export/project/relation_factory.rb | 1 - package.json | 2 +- qa/qa/resource/api_fabricator.rb | 2 +- spec/factories/project_metrics_settings.rb | 8 -- .../issues/user_creates_issue_spec.rb | 2 +- .../snippets/user_creates_snippet_spec.rb | 8 +- spec/helpers/environments_helper_spec.rb | 11 -- spec/helpers/projects_helper_spec.rb | 16 --- spec/lib/gitlab/import_export/all_models.yml | 3 - .../attributes_permitter_spec.rb | 1 - .../import_test_coverage_spec.rb | 1 - spec/lib/gitlab/sql/cte_spec.rb | 3 +- spec/lib/gitlab/usage/metrics/query_spec.rb | 2 +- spec/lib/gitlab/usage_data_queries_spec.rb | 2 +- spec/models/concerns/as_cte_spec.rb | 2 +- spec/models/project_metrics_setting_spec.rb | 63 ----------- spec/models/project_spec.rb | 10 +- spec/support/multiple_databases.rb | 2 - .../finders/issues_finder_shared_examples.rb | 8 +- .../cte_materialized_shared_examples.rb | 37 ++---- .../multiple_databases_helpers_spec.rb | 2 +- yarn.lock | 106 ++++++++---------- 44 files changed, 111 insertions(+), 310 deletions(-) delete mode 100644 app/models/project_metrics_setting.rb create mode 100644 config/feature_flags/development/copy_additional_properties_approval_rules.yml delete mode 100644 spec/factories/project_metrics_settings.rb delete mode 100644 spec/models/project_metrics_setting_spec.rb diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 050f5f41515..cd1a331b63f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -152,7 +152,7 @@ variables: DEBIAN_VERSION: "bullseye" UBI_VERSION: "8.6" CHROME_VERSION: "113" - DOCKER_VERSION: "23.0.1" + DOCKER_VERSION: "24.0.5" RUBYGEMS_VERSION: "3.4" GO_VERSION: "1.20" RUST_VERSION: "1.65" diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 2d92f1d8ceb..81dbb50a09e 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -18832a255c81ec4a6c98c693e74d9a21ac89ef55 +56ab62b8e3cf853560e2417fe239219c51f0b228 diff --git a/app/helpers/environments_helper.rb b/app/helpers/environments_helper.rb index 37523b9e998..80a56493653 100644 --- a/app/helpers/environments_helper.rb +++ b/app/helpers/environments_helper.rb @@ -57,11 +57,9 @@ module EnvironmentsHelper 'default_branch' => project.default_branch, 'project_path' => project_path(project), 'tags_path' => project_tags_path(project), - 'external_dashboard_url' => project.metrics_setting_external_dashboard_url, 'custom_metrics_path' => project_prometheus_metrics_path(project), 'validate_query_path' => validate_query_project_prometheus_metrics_path(project), - 'custom_metrics_available' => custom_metrics_available?(project).to_s, - 'dashboard_timezone' => project.metrics_setting_dashboard_timezone.to_s.upcase + 'custom_metrics_available' => custom_metrics_available?(project).to_s } end diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 754e1b7c2a2..e45b38f2266 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -373,14 +373,6 @@ module ProjectsHelper false end - def metrics_external_dashboard_url - @project.metrics_setting_external_dashboard_url - end - - def metrics_dashboard_timezone - @project.metrics_setting_dashboard_timezone - end - def grafana_integration_url @project.grafana_integration&.grafana_url end diff --git a/app/models/analytics/cycle_analytics/stage_event_hash.rb b/app/models/analytics/cycle_analytics/stage_event_hash.rb index 6443a970945..7dcabd01ebf 100644 --- a/app/models/analytics/cycle_analytics/stage_event_hash.rb +++ b/app/models/analytics/cycle_analytics/stage_event_hash.rb @@ -13,7 +13,7 @@ module Analytics # Atomic, safe insert without retrying query = <<~SQL - WITH insert_cte AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} ( + WITH insert_cte AS MATERIALIZED ( INSERT INTO #{quoted_table_name} (hash_sha256) VALUES (#{casted_hash_code}) ON CONFLICT DO NOTHING RETURNING ID ) SELECT ids.id FROM ( diff --git a/app/models/project.rb b/app/models/project.rb index 078a908d4ac..23e5c64265c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -275,7 +275,6 @@ class Project < ApplicationRecord has_one :project_repository, inverse_of: :project has_one :incident_management_setting, inverse_of: :project, class_name: 'IncidentManagement::ProjectIncidentManagementSetting' has_one :error_tracking_setting, inverse_of: :project, class_name: 'ErrorTracking::ProjectErrorTrackingSetting' - has_one :metrics_setting, inverse_of: :project, class_name: 'ProjectMetricsSetting' has_one :grafana_integration, inverse_of: :project has_one :project_setting, inverse_of: :project, autosave: true has_one :alerting_setting, inverse_of: :project, class_name: 'Alerting::ProjectAlertingSetting' @@ -478,7 +477,6 @@ class Project < ApplicationRecord accepts_nested_attributes_for :incident_management_setting, update_only: true accepts_nested_attributes_for :error_tracking_setting, update_only: true - accepts_nested_attributes_for :metrics_setting, update_only: true, allow_destroy: true accepts_nested_attributes_for :grafana_integration, update_only: true, allow_destroy: true accepts_nested_attributes_for :prometheus_integration, update_only: true accepts_nested_attributes_for :alerting_setting, update_only: true @@ -494,11 +492,6 @@ class Project < ApplicationRecord delegate :add_guest, :add_reporter, :add_developer, :add_maintainer, :add_owner, :add_role end - with_options to: :metrics_setting, allow_nil: true, prefix: true do - delegate :external_dashboard_url - delegate :dashboard_timezone - end - with_options to: :namespace do delegate :actual_limits, :actual_plan_name, :actual_plan, :root_ancestor, allow_nil: true delegate :maven_package_requests_forwarding, :pypi_package_requests_forwarding, :npm_package_requests_forwarding @@ -2948,10 +2941,6 @@ class Project < ApplicationRecord jira_imports.last end - def metrics_setting - super || build_metrics_setting - end - def service_desk_enabled Gitlab::ServiceDesk.enabled?(project: self) end diff --git a/app/models/project_metrics_setting.rb b/app/models/project_metrics_setting.rb deleted file mode 100644 index c66d0f52f4c..00000000000 --- a/app/models/project_metrics_setting.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class ProjectMetricsSetting < ApplicationRecord - belongs_to :project - - validates :external_dashboard_url, - allow_nil: true, - length: { maximum: 255 }, - addressable_url: { enforce_sanitization: true, ascii_only: true } - - enum dashboard_timezone: { local: 0, utc: 1 } - - def dashboard_timezone=(val) - super(val&.downcase) - end -end diff --git a/app/services/issues/relative_position_rebalancing_service.rb b/app/services/issues/relative_position_rebalancing_service.rb index a8d0ae01176..e165cb36634 100644 --- a/app/services/issues/relative_position_rebalancing_service.rb +++ b/app/services/issues/relative_position_rebalancing_service.rb @@ -141,7 +141,7 @@ module Issues def run_update_query(values, query_name) Issue.connection.exec_query(<<~SQL, query_name) - WITH cte(cte_id, new_pos) AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} ( + WITH cte(cte_id, new_pos) AS MATERIALIZED ( SELECT * FROM (VALUES #{values}) as t (id, pos) ) diff --git a/config/feature_flags/development/copy_additional_properties_approval_rules.yml b/config/feature_flags/development/copy_additional_properties_approval_rules.yml new file mode 100644 index 00000000000..0f8e076620a --- /dev/null +++ b/config/feature_flags/development/copy_additional_properties_approval_rules.yml @@ -0,0 +1,8 @@ +--- +name: copy_additional_properties_approval_rules +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/128259 +rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/423517 +milestone: '16.4' +type: development +group: group::code review +default_enabled: false diff --git a/doc/development/merge_request_concepts/performance.md b/doc/development/merge_request_concepts/performance.md index 665b84b2c40..7e26bf982b2 100644 --- a/doc/development/merge_request_concepts/performance.md +++ b/doc/development/merge_request_concepts/performance.md @@ -195,20 +195,18 @@ costly, time-consuming query to the replicas. Read about [complex queries on the relation object](../database/iterating_tables_in_batches.md#complex-queries-on-the-relation-object) for considerations on how to use CTEs. We have found in some situations that CTEs can become -problematic in use (similar to the n+1 problem above). In particular, hierarchical recursive +problematic in use (similar to the N+1 problem above). In particular, hierarchical recursive CTE queries such as the CTE in [AuthorizedProjectsWorker](https://gitlab.com/gitlab-org/gitlab/-/issues/325688) are very difficult to optimize and don't scale. We should avoid them when implementing new features that require any kind of hierarchical structure. CTEs have been effectively used as an optimization fence in many simpler cases, such as this [example](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/43242#note_61416277). -Beginning in PostgreSQL 12, CTEs are inlined then [optimized by default](https://paquier.xyz/postgresql-2/postgres-12-with-materialize/). -Keeping the old behavior requires marking CTEs with the keyword `MATERIALIZED`. +With the currently supported PostgreSQL versions, the optimization fence behavior must be enabled +with the `MATERIALIZED` keyword. By default CTEs are inlined then [optimized by default](https://paquier.xyz/postgresql-2/postgres-12-with-materialize/). When building CTE statements, use the `Gitlab::SQL::CTE` class [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56976) in GitLab 13.11. -By default, this `Gitlab::SQL::CTE` class forces materialization through adding the `MATERIALIZED` keyword for PostgreSQL 12 and higher. -`Gitlab::SQL::CTE` automatically omits materialization when PostgreSQL 11 is running -(this behavior is implemented using a custom Arel node `Gitlab::Database::AsWithMaterialized` under the surface). +By default, this `Gitlab::SQL::CTE` class forces materialization through adding the `MATERIALIZED` keyword. WARNING: Upgrading to GitLab 14.0 requires PostgreSQL 12 or later. diff --git a/doc/user/search/index.md b/doc/user/search/index.md index 74b89b079d9..408503f47ca 100644 --- a/doc/user/search/index.md +++ b/doc/user/search/index.md @@ -164,19 +164,16 @@ and gives you the option to return to the search results page. > - [Support for partial matches in issue search](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/71913) removed in GitLab 14.9 [with a flag](../../administration/feature_flags.md) named `issues_full_text_search`. Disabled by default. > - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124703) in GitLab 16.2. Feature flag `issues_full_text_search` removed. -You can filter issues and merge requests by specific terms included in titles or descriptions. +You can search issues and merge requests for specific terms. +For example, when you search issues for `display bug`, the query returns +all issues that contain both `display` and `bug` in any order. +To search for the exact string, use `"display bug"` instead. -- Syntax - - Searches look for all the words in a query, in any order. For example: searching - issues for `display bug` returns all issues matching both those words, in any order. - - To find the exact term, use double quotes: `"display bug"`. -- Limitation - - For performance reasons, terms shorter than three characters are ignored. For example: searching - issues for `included in titles` is same as `included titles` - - Search is limited to 4096 characters and 64 terms per query. - - When searching issues, partial matches are not allowed. For example: searching for `play` will - not return issues that have the word `display`. But variations of words match, so searching - for `displays` also returns issues that have the word `display`. +Partial matches are not supported in issue search. +For example, when you search issues for `play`, the query does not return issues that contain `display`. +However, the query matches all possible variations of the string (for example, `plays`). + +For more information about query validation, see [Global search validation](#global-search-validation). ## Run a search from history diff --git a/lib/gitlab/background_migration/backfill_namespace_id_for_project_route.rb b/lib/gitlab/background_migration/backfill_namespace_id_for_project_route.rb index b0b7882d54d..228269adc04 100644 --- a/lib/gitlab/background_migration/backfill_namespace_id_for_project_route.rb +++ b/lib/gitlab/background_migration/backfill_namespace_id_for_project_route.rb @@ -14,7 +14,7 @@ module Gitlab batch_metrics.time_operation(:update_all) do ApplicationRecord.connection.execute <<~SQL - WITH route_and_ns(route_id, project_namespace_id) AS #{::Gitlab::Database::AsWithMaterialized.materialized_if_supported} ( + WITH route_and_ns(route_id, project_namespace_id) AS MATERIALIZED ( #{sub_batch.to_sql} ) UPDATE routes diff --git a/lib/gitlab/background_migration/cleanup_orphaned_routes.rb b/lib/gitlab/background_migration/cleanup_orphaned_routes.rb index c221f8ea411..d6695eddf02 100644 --- a/lib/gitlab/background_migration/cleanup_orphaned_routes.rb +++ b/lib/gitlab/background_migration/cleanup_orphaned_routes.rb @@ -40,7 +40,7 @@ module Gitlab non_orphaned_namespace_routes.each_batch(column: batch_column, of: sub_batch_size) do |sub_batch| batch_metrics.time_operation(:fix_missing_namespace_id) do ApplicationRecord.connection.execute <<~SQL - WITH route_and_ns(route_id, namespace_id) AS #{::Gitlab::Database::AsWithMaterialized.materialized_if_supported} ( + WITH route_and_ns(route_id, namespace_id) AS MATERIALIZED ( #{sub_batch.to_sql} ) UPDATE routes diff --git a/lib/gitlab/background_migration/fix_first_mentioned_in_commit_at.rb b/lib/gitlab/background_migration/fix_first_mentioned_in_commit_at.rb index 6de2187b8e3..5225fb6aced 100644 --- a/lib/gitlab/background_migration/fix_first_mentioned_in_commit_at.rb +++ b/lib/gitlab/background_migration/fix_first_mentioned_in_commit_at.rb @@ -41,7 +41,7 @@ module Gitlab .where('issue_metrics.first_mentioned_in_commit_at > first_authored_date.authored_date') TmpIssueMetrics.connection.execute <<~UPDATE_METRICS - WITH cte AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} ( + WITH cte AS MATERIALIZED ( #{inner_query.to_sql} ) UPDATE issue_metrics diff --git a/lib/gitlab/background_migration/fix_projects_without_project_feature.rb b/lib/gitlab/background_migration/fix_projects_without_project_feature.rb index c21f9c1d50f..45a93f158d8 100644 --- a/lib/gitlab/background_migration/fix_projects_without_project_feature.rb +++ b/lib/gitlab/background_migration/fix_projects_without_project_feature.rb @@ -22,7 +22,7 @@ module Gitlab def sql(from_id, to_id) <<~SQL - WITH created_records AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} ( + WITH created_records AS MATERIALIZED ( INSERT INTO project_features ( project_id, merge_requests_access_level, diff --git a/lib/gitlab/background_migration/fix_projects_without_prometheus_service.rb b/lib/gitlab/background_migration/fix_projects_without_prometheus_service.rb index 452167d4d61..41326060a05 100644 --- a/lib/gitlab/background_migration/fix_projects_without_prometheus_service.rb +++ b/lib/gitlab/background_migration/fix_projects_without_prometheus_service.rb @@ -136,7 +136,7 @@ module Gitlab # there is no uniq constraint on project_id and type pair, which prevents us from using ON CONFLICT def create_sql(from_id, to_id) <<~SQL - WITH created_records AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} ( + WITH created_records AS MATERIALIZED ( INSERT INTO services (project_id, #{DEFAULTS.keys.map { |key| %("#{key}") }.join(',')}, created_at, updated_at) #{select_insert_values_sql(from_id, to_id)} RETURNING * @@ -149,7 +149,7 @@ module Gitlab # there is no uniq constraint on project_id and type pair, which prevents us from using ON CONFLICT def update_sql(from_id, to_id) <<~SQL - WITH updated_records AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} ( + WITH updated_records AS MATERIALIZED ( UPDATE services SET active = TRUE WHERE services.project_id BETWEEN #{Integer(from_id)} AND #{Integer(to_id)} AND services.properties = '{}' AND services.type = '#{Migratable::PrometheusService.type}' AND #{group_cluster_condition(from_id, to_id)} AND services.active = FALSE diff --git a/lib/gitlab/background_migration/populate_projects_star_count.rb b/lib/gitlab/background_migration/populate_projects_star_count.rb index 0790bd98018..97e2d9b81ac 100644 --- a/lib/gitlab/background_migration/populate_projects_star_count.rb +++ b/lib/gitlab/background_migration/populate_projects_star_count.rb @@ -42,7 +42,7 @@ module Gitlab ::Gitlab::Database.allow_cross_joins_across_databases(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/421843') do ApplicationRecord.connection.execute <<~SQL - WITH batched_relation AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} (#{sub_batch.select(:id).to_sql}) + WITH batched_relation AS MATERIALIZED (#{sub_batch.select(:id).to_sql}) UPDATE projects SET star_count = ( SELECT COUNT(*) diff --git a/lib/gitlab/background_migration/project_namespaces/backfill_project_namespaces.rb b/lib/gitlab/background_migration/project_namespaces/backfill_project_namespaces.rb index 845a3c16bbe..e21d7951f59 100644 --- a/lib/gitlab/background_migration/project_namespaces/backfill_project_namespaces.rb +++ b/lib/gitlab/background_migration/project_namespaces/backfill_project_namespaces.rb @@ -90,7 +90,7 @@ module Gitlab .select("namespaces.id, namespaces.tmp_project_id") ApplicationRecord.connection.execute <<~SQL - WITH cte(project_namespace_id, project_id) AS #{::Gitlab::Database::AsWithMaterialized.materialized_if_supported} ( + WITH cte(project_namespace_id, project_id) AS MATERIALIZED ( #{projects.to_sql} ) UPDATE projects diff --git a/lib/gitlab/database/as_with_materialized.rb b/lib/gitlab/database/as_with_materialized.rb index 417e9f211b9..a6a7e7455e9 100644 --- a/lib/gitlab/database/as_with_materialized.rb +++ b/lib/gitlab/database/as_with_materialized.rb @@ -4,31 +4,15 @@ module Gitlab module Database # This class is a special Arel node which allows optionally define the `MATERIALIZED` keyword for CTE and Recursive CTE queries. class AsWithMaterialized < Arel::Nodes::As - extend Gitlab::Utils::StrongMemoize - MATERIALIZED = 'MATERIALIZED ' def initialize(left, right, materialized: true) - if materialized && self.class.materialized_supported? + if materialized right.prepend(MATERIALIZED) end super(left, right) end - - # Note: to be deleted after the minimum PG version is set to 12.0 - def self.materialized_supported? - strong_memoize(:materialized_supported) do - ApplicationRecord.database.version.match?(/^1[2-9]\./) # version 12.x and above - end - end - - # Note: to be deleted after the minimum PG version is set to 12.0 - # Update the documentation together when deleting the method - # https://docs.gitlab.com/ee/development/merge_request_concepts/performance.html#use-ctes-wisely - def self.materialized_if_supported - materialized_supported? ? 'MATERIALIZED' : '' - end end end end diff --git a/lib/gitlab/database/bulk_update.rb b/lib/gitlab/database/bulk_update.rb index 36dbb157b0d..51f39419ddb 100644 --- a/lib/gitlab/database/bulk_update.rb +++ b/lib/gitlab/database/bulk_update.rb @@ -114,7 +114,7 @@ module Gitlab def sql <<~SQL - WITH cte(#{list_of(cte_columns)}) AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} (VALUES #{list_of(values)}) + WITH cte(#{list_of(cte_columns)}) AS MATERIALIZED (VALUES #{list_of(values)}) UPDATE #{table_name} SET #{list_of(updates)} FROM cte WHERE cte_id = id SQL end diff --git a/lib/gitlab/database/postgres_hll/batch_distinct_counter.rb b/lib/gitlab/database/postgres_hll/batch_distinct_counter.rb index 4e973efebca..c8f6b2ada63 100644 --- a/lib/gitlab/database/postgres_hll/batch_distinct_counter.rb +++ b/lib/gitlab/database/postgres_hll/batch_distinct_counter.rb @@ -137,7 +137,7 @@ module Gitlab # AND %{column} IS NOT NULL def bucketed_data_sql <<~SQL - WITH hashed_attributes AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} (%{source_query}) + WITH hashed_attributes AS MATERIALIZED (%{source_query}) SELECT (attr_hash_32_bits & #{BIT_32_NORMALIZED_BUCKET_ID_MASK})::int AS bucket_num, (31 - floor(log(2, min((attr_hash_32_bits & #{BIT_31_MASK})::int))))::int as bucket_hash FROM hashed_attributes diff --git a/lib/gitlab/import_export/project/import_export.yml b/lib/gitlab/import_export/project/import_export.yml index 850c89c1fb1..1b04e55e0c7 100644 --- a/lib/gitlab/import_export/project/import_export.yml +++ b/lib/gitlab/import_export/project/import_export.yml @@ -116,7 +116,6 @@ tree: - :project_badges - :ci_cd_settings - :error_tracking_setting - - :metrics_setting - boards: - lists: - label: @@ -156,10 +155,6 @@ included_attributes: - :group_runners_enabled - :runner_token_expiration_interval - :default_git_depth - metrics_setting: - - :dashboard_timezone - - :external_dashboard_url - - :project_id project_badges: - :created_at - :image_url diff --git a/lib/gitlab/import_export/project/relation_factory.rb b/lib/gitlab/import_export/project/relation_factory.rb index e4fad705275..840621a94a2 100644 --- a/lib/gitlab/import_export/project/relation_factory.rb +++ b/lib/gitlab/import_export/project/relation_factory.rb @@ -38,7 +38,6 @@ module Gitlab ci_cd_settings: 'ProjectCiCdSetting', error_tracking_setting: 'ErrorTracking::ProjectErrorTrackingSetting', links: 'Releases::Link', - metrics_setting: 'ProjectMetricsSetting', commit_author: 'MergeRequest::DiffCommitUser', committer: 'MergeRequest::DiffCommitUser', merge_request_diff_commits: 'MergeRequestDiffCommit', diff --git a/package.json b/package.json index d9e6a723d47..fe7f48d30bc 100644 --- a/package.json +++ b/package.json @@ -165,7 +165,7 @@ "marked-bidi": "^1.0.3", "mathjax": "3", "mdurl": "^1.0.1", - "mermaid": "10.1.0", + "mermaid": "10.3.1", "micromatch": "^4.0.5", "minimatch": "^3.0.4", "monaco-editor": "^0.30.1", diff --git a/qa/qa/resource/api_fabricator.rb b/qa/qa/resource/api_fabricator.rb index 7c6c6cc0288..499a9b278e9 100644 --- a/qa/qa/resource/api_fabricator.rb +++ b/qa/qa/resource/api_fabricator.rb @@ -237,7 +237,7 @@ module QA Support::Retrier.retry_until(sleep_interval: 3, max_attempts: 5, raise_on_failure: false) do response_check = get(resource_web_url) - Runtime::Logger.debug("Resource availability check ... #{response_check.code}") + Runtime::Logger.debug("Resource availability check for #{resource_web_url} ... #{response_check.code}") response_check.code == HTTP_STATUS_OK end end diff --git a/spec/factories/project_metrics_settings.rb b/spec/factories/project_metrics_settings.rb deleted file mode 100644 index b5c0fd88a6c..00000000000 --- a/spec/factories/project_metrics_settings.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -FactoryBot.define do - factory :project_metrics_setting, class: 'ProjectMetricsSetting' do - project - external_dashboard_url { 'https://grafana.com' } - end -end diff --git a/spec/features/issues/user_creates_issue_spec.rb b/spec/features/issues/user_creates_issue_spec.rb index 76b07d903bc..857cb1f39a2 100644 --- a/spec/features/issues/user_creates_issue_spec.rb +++ b/spec/features/issues/user_creates_issue_spec.rb @@ -16,7 +16,7 @@ RSpec.describe "User creates issue", feature_category: :team_planning do sign_out(:user) end - it "redirects to signin then back to new issue after signin", :js, quarantine: 'https://gitlab.com/gitlab-org/quality/engineering-productivity/master-broken-incidents/-/issues/1486' do + it "redirects to signin then back to new issue after signin", :js do create(:issue, project: project) visit project_issues_path(project) diff --git a/spec/features/snippets/user_creates_snippet_spec.rb b/spec/features/snippets/user_creates_snippet_spec.rb index a7038e38412..341cc150a64 100644 --- a/spec/features/snippets/user_creates_snippet_spec.rb +++ b/spec/features/snippets/user_creates_snippet_spec.rb @@ -130,7 +130,7 @@ RSpec.describe 'User creates snippet', :js, feature_category: :source_code_manag expect(page).not_to have_content(files_validation_message) end - it 'previews a snippet with file', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/408203' do + it 'previews a snippet with file' do # Click placeholder first to expand full description field snippet_fill_in_description('My Snippet') dropzone_file Rails.root.join('spec', 'fixtures', 'banana_sample.gif') @@ -145,7 +145,11 @@ RSpec.describe 'User creates snippet', :js, feature_category: :source_code_manag # Adds a cache buster for checking if the image exists as Selenium is now handling the cached requests # not anymore as requests when they come straight from memory cache. # accept_confirm is needed because of https://gitlab.com/gitlab-org/gitlab/-/issues/262102 - reqs = inspect_requests { accept_confirm { visit("#{link}?ran=#{SecureRandom.base64(20)}") } } + reqs = inspect_requests do + visit("#{link}?ran=#{SecureRandom.base64(20)}") do + page.driver.browser.switch_to.alert.accept + end + end expect(reqs.first.status_code).to eq(200) end end diff --git a/spec/helpers/environments_helper_spec.rb b/spec/helpers/environments_helper_spec.rb index 6be86694b10..6624404bc49 100644 --- a/spec/helpers/environments_helper_spec.rb +++ b/spec/helpers/environments_helper_spec.rb @@ -34,7 +34,6 @@ RSpec.describe EnvironmentsHelper, feature_category: :environment_management do 'project_path' => project_path(project), 'tags_path' => project_tags_path(project), 'has_metrics' => environment.has_metrics?.to_s, - 'external_dashboard_url' => nil, 'environment_state' => environment.state, 'custom_metrics_path' => project_prometheus_metrics_path(project), 'validate_query_path' => validate_query_project_prometheus_metrics_path(project), @@ -58,16 +57,6 @@ RSpec.describe EnvironmentsHelper, feature_category: :environment_management do end end - context 'with metrics_setting' do - before do - create(:project_metrics_setting, project: project, external_dashboard_url: 'http://gitlab.com') - end - - it 'adds external_dashboard_url' do - expect(metrics_data['external_dashboard_url']).to eq('http://gitlab.com') - end - end - context 'when the environment is not available' do before do environment.stop diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb index aa064a26ec4..71004ef2a08 100644 --- a/spec/helpers/projects_helper_spec.rb +++ b/spec/helpers/projects_helper_spec.rb @@ -809,22 +809,6 @@ RSpec.describe ProjectsHelper, feature_category: :source_code_management do end end - describe '#metrics_external_dashboard_url' do - context 'metrics_setting exists' do - it 'returns external_dashboard_url' do - metrics_setting = create(:project_metrics_setting, project: project) - - expect(helper.metrics_external_dashboard_url).to eq(metrics_setting.external_dashboard_url) - end - end - - context 'metrics_setting does not exist' do - it 'returns nil' do - expect(helper.metrics_external_dashboard_url).to eq(nil) - end - end - end - describe '#grafana_integration_url' do subject { helper.grafana_integration_url } diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml index 5bbb95b3ea5..b1b438fa592 100644 --- a/spec/lib/gitlab/import_export/all_models.yml +++ b/spec/lib/gitlab/import_export/all_models.yml @@ -690,7 +690,6 @@ project: - pool_repository - kubernetes_namespaces - error_tracking_setting -- metrics_setting - gitlab_slack_application_integration - github_integration - protected_environments @@ -872,8 +871,6 @@ suggestions: - note diff_note_positions: - note -metrics_setting: -- project protected_environments: - project - group diff --git a/spec/lib/gitlab/import_export/attributes_permitter_spec.rb b/spec/lib/gitlab/import_export/attributes_permitter_spec.rb index 8089b40cae8..08abd7908d2 100644 --- a/spec/lib/gitlab/import_export/attributes_permitter_spec.rb +++ b/spec/lib/gitlab/import_export/attributes_permitter_spec.rb @@ -97,7 +97,6 @@ RSpec.describe Gitlab::ImportExport::AttributesPermitter, feature_category: :imp :user | true :author | false :ci_cd_settings | true - :metrics_setting | true :project_badges | true :pipeline_schedules | true :error_tracking_setting | true diff --git a/spec/lib/gitlab/import_export/import_test_coverage_spec.rb b/spec/lib/gitlab/import_export/import_test_coverage_spec.rb index 1d3fc764b50..09a2417ce1e 100644 --- a/spec/lib/gitlab/import_export/import_test_coverage_spec.rb +++ b/spec/lib/gitlab/import_export/import_test_coverage_spec.rb @@ -48,7 +48,6 @@ RSpec.describe 'Test coverage of the Project Import', feature_category: :importe project.ci_pipelines.notes.events.push_event_payload project.protected_branches.unprotect_access_levels project.prometheus_metrics - project.metrics_setting project.boards.lists.label.priorities project.service_desk_setting project.security_setting diff --git a/spec/lib/gitlab/sql/cte_spec.rb b/spec/lib/gitlab/sql/cte_spec.rb index 523380eae34..d2d3fdbb450 100644 --- a/spec/lib/gitlab/sql/cte_spec.rb +++ b/spec/lib/gitlab/sql/cte_spec.rb @@ -15,8 +15,7 @@ RSpec.describe Gitlab::SQL::CTE do expected = [ "#{name} AS ", - Gitlab::Database::AsWithMaterialized.materialized_if_supported, - (' ' unless Gitlab::Database::AsWithMaterialized.materialized_if_supported.blank?), + 'MATERIALIZED ', "(#{sql1})" ].join diff --git a/spec/lib/gitlab/usage/metrics/query_spec.rb b/spec/lib/gitlab/usage/metrics/query_spec.rb index 355d619f768..750d340551a 100644 --- a/spec/lib/gitlab/usage/metrics/query_spec.rb +++ b/spec/lib/gitlab/usage/metrics/query_spec.rb @@ -77,7 +77,7 @@ RSpec.describe Gitlab::Usage::Metrics::Query do it 'returns the histogram sql' do expect(described_class.for(:histogram, AlertManagement::HttpIntegration.active, :project_id, buckets: 1..2, bucket_size: 101)) - .to match(/^WITH "count_cte" AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported}/) + .to match(/^WITH "count_cte" AS MATERIALIZED/) end end diff --git a/spec/lib/gitlab/usage_data_queries_spec.rb b/spec/lib/gitlab/usage_data_queries_spec.rb index 30588324adf..3ec7bf33623 100644 --- a/spec/lib/gitlab/usage_data_queries_spec.rb +++ b/spec/lib/gitlab/usage_data_queries_spec.rb @@ -82,7 +82,7 @@ RSpec.describe Gitlab::UsageDataQueries do it 'returns the histogram sql' do expect(described_class.histogram(AlertManagement::HttpIntegration.active, :project_id, buckets: 1..2, bucket_size: 101)) - .to match(/^WITH "count_cte" AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported}/) + .to match(/^WITH "count_cte" AS MATERIALIZED/) end end diff --git a/spec/models/concerns/as_cte_spec.rb b/spec/models/concerns/as_cte_spec.rb index 06d9650ec46..c92d46ef25f 100644 --- a/spec/models/concerns/as_cte_spec.rb +++ b/spec/models/concerns/as_cte_spec.rb @@ -21,7 +21,7 @@ RSpec.describe AsCte do it { expect(subject.query).to eq(query) } it { expect(subject.table.name).to eq(name.to_s) } - context 'with materialized parameter', if: Gitlab::Database::AsWithMaterialized.materialized_supported? do + context 'with materialized parameter' do subject { query.as_cte(name, materialized: materialized).to_arel.to_sql } context 'as true' do diff --git a/spec/models/project_metrics_setting_spec.rb b/spec/models/project_metrics_setting_spec.rb deleted file mode 100644 index 6639f9cb208..00000000000 --- a/spec/models/project_metrics_setting_spec.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe ProjectMetricsSetting do - describe 'Associations' do - it { is_expected.to belong_to(:project) } - end - - describe 'Validations' do - context 'when external_dashboard_url is over 255 chars' do - before do - subject.external_dashboard_url = 'https://' + 'a' * 250 - end - - it 'fails validation' do - expect(subject).not_to be_valid - expect(subject.errors.messages[:external_dashboard_url]) - .to include('is too long (maximum is 255 characters)') - end - end - - context 'with unsafe url' do - before do - subject.external_dashboard_url = %{https://replaceme.com/'>} - end - - it { is_expected.to be_invalid } - end - - context 'non ascii chars in external_dashboard_url' do - before do - subject.external_dashboard_url = 'http://gitlab.com/api/0/projects/project1/something€' - end - - it { is_expected.to be_invalid } - end - - context 'internal url in external_dashboard_url' do - before do - subject.external_dashboard_url = 'http://192.168.1.1' - end - - it { is_expected.to be_valid } - end - - context 'dashboard_timezone' do - it { is_expected.to define_enum_for(:dashboard_timezone).with_values({ local: 0, utc: 1 }) } - - it 'defaults to local' do - expect(subject.dashboard_timezone).to eq('local') - end - end - end - - describe '#dashboard_timezone=' do - it 'downcases string' do - subject.dashboard_timezone = 'UTC' - - expect(subject.dashboard_timezone).to eq('utc') - end - end -end diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 8b25bc7d118..9577afbf11a 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -5099,7 +5099,7 @@ RSpec.describe Project, factory_default: :keep, feature_category: :groups_and_pr subject { described_class.wrap_with_cte(projects) } it 'wrapped query matches original' do - expect(subject.to_sql).to match(/^WITH "projects_cte" AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported}/) + expect(subject.to_sql).to match(/^WITH "projects_cte" AS MATERIALIZED/) expect(subject).to match_array(projects) end end @@ -8090,14 +8090,6 @@ RSpec.describe Project, factory_default: :keep, feature_category: :groups_and_pr it { is_expected.not_to include(user) } end - describe "#metrics_setting" do - let(:project) { build(:project) } - - it 'creates setting if it does not exist' do - expect(project.metrics_setting).to be_an_instance_of(ProjectMetricsSetting) - end - end - describe '#enabled_group_deploy_keys' do let_it_be(:project) { create(:project) } diff --git a/spec/support/multiple_databases.rb b/spec/support/multiple_databases.rb index 616cf00269c..1c556858018 100644 --- a/spec/support/multiple_databases.rb +++ b/spec/support/multiple_databases.rb @@ -7,8 +7,6 @@ RSpec.configure do |config| # at startup, but that generates its own # `Gitlab::Database::Reflection` so the result is not memoized by # callers of `ApplicationRecord.database.version`, such as - # `Gitlab::Database::AsWithMaterialized.materialized_supported?`. - # TODO This can be removed once https://gitlab.com/gitlab-org/gitlab/-/issues/325639 is completed. [ApplicationRecord, ::Ci::ApplicationRecord].each { |record| record.database.version } config.around(:each, :reestablished_active_record_base) do |example| diff --git a/spec/support/shared_examples/finders/issues_finder_shared_examples.rb b/spec/support/shared_examples/finders/issues_finder_shared_examples.rb index 19001abcbe2..ed8feebf1f6 100644 --- a/spec/support/shared_examples/finders/issues_finder_shared_examples.rb +++ b/spec/support/shared_examples/finders/issues_finder_shared_examples.rb @@ -1406,7 +1406,7 @@ RSpec.shared_examples 'issues or work items finder' do |factory, execute_context it 'returns true' do expect(finder.use_cte_for_search?).to be_truthy expect(finder.execute.to_sql) - .to match(/^WITH "issues" AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported}/) + .to match(/^WITH "issues" AS MATERIALIZED/) end end @@ -1416,7 +1416,7 @@ RSpec.shared_examples 'issues or work items finder' do |factory, execute_context it 'returns true' do expect(finder.use_cte_for_search?).to be_truthy expect(finder.execute.to_sql) - .to match(/^WITH "issues" AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported}/) + .to match(/^WITH "issues" AS MATERIALIZED/) end end @@ -1426,7 +1426,7 @@ RSpec.shared_examples 'issues or work items finder' do |factory, execute_context it 'returns true' do expect(finder.use_cte_for_search?).to be_truthy expect(finder.execute.to_sql) - .to match(/^WITH "issues" AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported}/) + .to match(/^WITH "issues" AS MATERIALIZED/) end end @@ -1436,7 +1436,7 @@ RSpec.shared_examples 'issues or work items finder' do |factory, execute_context it 'returns true' do expect(finder.use_cte_for_search?).to be_truthy expect(finder.execute.to_sql) - .to match(/^WITH "issues" AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported}/) + .to match(/^WITH "issues" AS MATERIALIZED/) end end end diff --git a/spec/support/shared_examples/lib/gitlab/database/cte_materialized_shared_examples.rb b/spec/support/shared_examples/lib/gitlab/database/cte_materialized_shared_examples.rb index df795723874..b80a51a1fc6 100644 --- a/spec/support/shared_examples/lib/gitlab/database/cte_materialized_shared_examples.rb +++ b/spec/support/shared_examples/lib/gitlab/database/cte_materialized_shared_examples.rb @@ -4,41 +4,18 @@ RSpec.shared_examples 'CTE with MATERIALIZED keyword examples' do describe 'adding MATERIALIZE to the CTE' do let(:options) { {} } - before do - # Clear the cached value before the test - Gitlab::Database::AsWithMaterialized.clear_memoization(:materialized_supported) + it 'adds MATERIALIZE keyword' do + allow(ApplicationRecord.database).to receive(:version).and_return('12.1') + + expect(query).to include(expected_query_block_with_materialized) end - context 'when PG version is <12' do + context 'when materialized is disabled' do + let(:options) { { materialized: false } } + it 'does not add MATERIALIZE keyword' do - allow(ApplicationRecord.database).to receive(:version).and_return('11.1') - expect(query).to include(expected_query_block_without_materialized) end end - - context 'when PG version is >=12' do - it 'adds MATERIALIZE keyword' do - allow(ApplicationRecord.database).to receive(:version).and_return('12.1') - - expect(query).to include(expected_query_block_with_materialized) - end - - context 'when version is higher than 12' do - it 'adds MATERIALIZE keyword' do - allow(ApplicationRecord.database).to receive(:version).and_return('15.1') - - expect(query).to include(expected_query_block_with_materialized) - end - end - - context 'when materialized is disabled' do - let(:options) { { materialized: false } } - - it 'does not add MATERIALIZE keyword' do - expect(query).to include(expected_query_block_without_materialized) - end - end - end end end diff --git a/spec/support_specs/database/multiple_databases_helpers_spec.rb b/spec/support_specs/database/multiple_databases_helpers_spec.rb index 2577b64f214..0191a759605 100644 --- a/spec/support_specs/database/multiple_databases_helpers_spec.rb +++ b/spec/support_specs/database/multiple_databases_helpers_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' RSpec.describe 'Database::MultipleDatabasesHelpers' do let(:query) do <<~SQL - WITH cte AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} (SELECT 1) SELECT 1; + WITH cte AS MATERIALIZED (SELECT 1) SELECT 1; SQL end diff --git a/yarn.lock b/yarn.lock index a0a9fdfb8d1..3d6a6c7374f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1000,10 +1000,10 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@braintree/sanitize-url@^6.0.0": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-6.0.0.tgz#fe364f025ba74f6de6c837a84ef44bdb1d61e68f" - integrity sha512-mgmE7XBYY/21erpzhexk4Cj1cyTQ9LzvnTxtzM17BJ7ERMNE6W72mQRo0I1Ud8eFJ+RVVIcBNhLFZ3GX4XFz5w== +"@braintree/sanitize-url@^6.0.1": + version "6.0.4" + resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-6.0.4.tgz#923ca57e173c6b232bbbb07347b1be982f03e783" + integrity sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A== "@csstools/css-parser-algorithms@^2.3.0": version "2.3.1" @@ -1755,13 +1755,6 @@ resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== -"@khanacademy/simple-markdown@^0.8.6": - version "0.8.6" - resolved "https://registry.yarnpkg.com/@khanacademy/simple-markdown/-/simple-markdown-0.8.6.tgz#9c9aef1f5ce2ce60292d13849165965a57c26f25" - integrity sha512-mAUlR9lchzfqunR89pFvNI51jQKsMpJeWYsYWw0DQcUXczn/T/V6510utgvm7X0N3zN87j1SvuKk8cMbl9IAFw== - dependencies: - "@types/react" ">=16.0.0" - "@leichtgewicht/ip-codec@^2.0.1": version "2.0.3" resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.3.tgz#0300943770e04231041a51bd39f0439b5c7ab4f0" @@ -2376,6 +2369,23 @@ dependencies: "@types/node" "*" +"@types/d3-scale-chromatic@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.0.0.tgz#103124777e8cdec85b20b51fd3397c682ee1e954" + integrity sha512-dsoJGEIShosKVRBZB0Vo3C8nqSDqVGujJU6tPznsBJxNJNwMF8utmS83nvCBKQYPpjCzaaHcrf66iTRpZosLPw== + +"@types/d3-scale@^4.0.3": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-4.0.3.tgz#7a5780e934e52b6f63ad9c24b105e33dd58102b5" + integrity sha512-PATBiMCpvHJSMtZAMEhc2WyL+hnzarKzI6wAHYjhsonjWJYGq5BXTzQjv4l8m2jO183/4wZ90rKvSeT7o72xNQ== + dependencies: + "@types/d3-time" "*" + +"@types/d3-time@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-3.0.0.tgz#e1ac0f3e9e195135361fa1a1d62f795d87e6e819" + integrity sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg== + "@types/debug@^4.0.0": version "4.1.7" resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.7.tgz#7cc0ea761509124709b8b2d1090d8f6c17aadb82" @@ -2560,11 +2570,6 @@ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.1.tgz#76e72d8a775eef7ce649c63c8acae1a0824bbaed" integrity sha512-XFjFHmaLVifrAKaZ+EKghFHtHSUonyw8P2Qmy2/+osBnrKbH9UYtlK10zg8/kCt47MFilll/DEDKy3DHfJ0URw== -"@types/prop-types@*": - version "15.7.5" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" - integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== - "@types/qs@*": version "6.9.7" resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" @@ -2575,25 +2580,11 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== -"@types/react@>=16.0.0": - version "18.0.33" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.33.tgz#a1575160cb4376787c2f5fe0312302f824baa61e" - integrity sha512-sHxzVxeanvQyQ1lr8NSHaj0kDzcNiGpILEVt69g9S31/7PfMvNCKLKcsHw4lYKjs3cGNJjXSP4mYzX43QlnjNA== - dependencies: - "@types/prop-types" "*" - "@types/scheduler" "*" - csstype "^3.0.2" - "@types/retry@^0.12.0": version "0.12.1" resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.1.tgz#d8f1c0d0dc23afad6dc16a9e993a0865774b4065" integrity sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g== -"@types/scheduler@*": - version "0.16.3" - resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.3.tgz#cef09e3ec9af1d63d2a6cc5b383a737e24e6dcf5" - integrity sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ== - "@types/serve-index@^1.9.1": version "1.9.1" resolved "https://registry.yarnpkg.com/@types/serve-index/-/serve-index-1.9.1.tgz#1b5e85370a192c01ec6cec4735cf2917337a6278" @@ -4756,7 +4747,7 @@ cssstyle@^2.3.0: dependencies: cssom "~0.3.6" -csstype@^3.0.2, csstype@^3.1.0: +csstype@^3.1.0: version "3.1.2" resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b" integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== @@ -5645,11 +5636,16 @@ dommatrix@^1.0.3: resolved "https://registry.yarnpkg.com/dommatrix/-/dommatrix-1.0.3.tgz#e7c18e8d6f3abdd1fef3dd4aa74c4d2e620a0525" integrity sha512-l32Xp/TLgWb8ReqbVJAFIvXmY7go4nTxxlWiAFyhoQw9RKEOHBZNnyGvJWqDVSPmq3Y9HlM4npqF/T6VMOXhww== -dompurify@2.4.5, dompurify@^2.4.5: +dompurify@^2.4.5: version "2.4.5" resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.4.5.tgz#0e89a27601f0bad978f9a924e7a05d5d2cccdd87" integrity sha512-jggCCd+8Iqp4Tsz0nIvpcb22InKEBrGz5dw3EQJMs8HPJDsKbFIO3STYtAvCfDx26Muevn1MHVI0XxjgFfmiSA== +dompurify@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.0.5.tgz#eb3d9cfa10037b6e73f32c586682c4b2ab01fbed" + integrity sha512-F9e6wPGtY+8KNMRAVfxeCOHU0/NPWMSENNq4pQctuXRqqdEPW7q3CrLbR5Nse044WwacyjHGOMlvNsBe1y6z9A== + domutils@^2.5.2, domutils@^2.6.0, domutils@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" @@ -9187,10 +9183,10 @@ mdast-util-find-and-replace@^2.0.0: unist-util-is "^5.0.0" unist-util-visit-parents "^4.0.0" -mdast-util-from-markdown@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-1.2.0.tgz#84df2924ccc6c995dec1e2368b2b208ad0a76268" - integrity sha512-iZJyyvKD1+K7QX1b5jXdE7Sc5dtoTry1vzV28UZZe8Z1xVnB/czKntJ7ZAkG0tANqRnBF6p3p7GpU1y19DTf2Q== +mdast-util-from-markdown@^1.0.0, mdast-util-from-markdown@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.1.tgz#9421a5a247f10d31d2faed2a30df5ec89ceafcf0" + integrity sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww== dependencies: "@types/mdast" "^3.0.0" "@types/unist" "^2.0.0" @@ -9391,25 +9387,28 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -mermaid@10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-10.1.0.tgz#6e40d5250174f4750ca6548e4ee00f6ae210855a" - integrity sha512-LYekSMNJygI1VnMizAPUddY95hZxOjwZxr7pODczILInO0dhQKuhXeu4sargtnuTwCilSuLS7Uiq/Qn7HTVrmA== +mermaid@10.3.1: + version "10.3.1" + resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-10.3.1.tgz#2f3c7e9f6bd7a8da2bef71cce2a542c8eba2a62e" + integrity sha512-hkenh7WkuRWPcob3oJtrN3W+yzrrIYuWF1OIfk/d0xGE8UWlvDhfexaHmDwwe8DKQgqMLI8DWEPwGprxkumjuw== dependencies: - "@braintree/sanitize-url" "^6.0.0" - "@khanacademy/simple-markdown" "^0.8.6" + "@braintree/sanitize-url" "^6.0.1" + "@types/d3-scale" "^4.0.3" + "@types/d3-scale-chromatic" "^3.0.0" cytoscape "^3.23.0" cytoscape-cose-bilkent "^4.1.0" cytoscape-fcose "^2.1.0" d3 "^7.4.0" + d3-sankey "^0.12.3" dagre-d3-es "7.0.10" dayjs "^1.11.7" - dompurify "2.4.5" + dompurify "^3.0.5" elkjs "^0.8.2" khroma "^2.0.0" lodash-es "^4.17.21" + mdast-util-from-markdown "^1.3.0" non-layered-tidy-tree-layout "^2.0.2" - stylis "^4.1.2" + stylis "^4.1.3" ts-dedent "^2.2.0" uuid "^9.0.0" web-worker "^1.2.0" @@ -10778,7 +10777,7 @@ postcss-value-parser@^4.2.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@8.4.28, postcss@^8.4.25: +postcss@8.4.28, postcss@^8.1.10, postcss@^8.2.1, postcss@^8.4.14, postcss@^8.4.25, postcss@^8.4.27: version "8.4.28" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.28.tgz#c6cc681ed00109072816e1557f889ef51cf950a5" integrity sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw== @@ -10795,15 +10794,6 @@ postcss@^7.0.14, postcss@^7.0.36, postcss@^7.0.5, postcss@^7.0.6: picocolors "^0.2.1" source-map "^0.6.1" -postcss@^8.1.10, postcss@^8.2.1, postcss@^8.4.14, postcss@^8.4.27: - version "8.4.27" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.27.tgz#234d7e4b72e34ba5a92c29636734349e0d9c3057" - integrity sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ== - dependencies: - nanoid "^3.3.6" - picocolors "^1.0.0" - source-map-js "^1.0.2" - prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -12478,10 +12468,10 @@ stylelint@^15.10.2: table "^6.8.1" write-file-atomic "^5.0.1" -stylis@^4.1.2: - version "4.1.3" - resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.3.tgz#fd2fbe79f5fed17c55269e16ed8da14c84d069f7" - integrity sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA== +stylis@^4.1.3: + version "4.3.0" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.3.0.tgz#abe305a669fc3d8777e10eefcfc73ad861c5588c" + integrity sha512-E87pIogpwUsUwXw7dNyU4QDjdgVMy52m+XEOPEKUn161cCzWjjhPSQhByfd1CcNvrOLnXQ6OnnZDwnJrz/Z4YQ== subscriptions-transport-ws@^0.11.0: version "0.11.0"