From f8758791587f31c974657d3e8e796e3948cd6ae6 Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Fri, 20 Dec 2024 14:56:27 +0100 Subject: [PATCH 1/8] Relocate @kbn/core inside src/core/packages/core --- .../checks/saved_objects_definition_change.sh | 2 +- .eslintrc.js | 2 +- .github/CODEOWNERS | 7 ++-- STYLEGUIDE.mdx | 2 +- package.json | 4 +-- .../core-deprecations-common/src/types.ts | 4 +-- .../core-deprecations-server/src/contracts.ts | 2 +- .../http/core-http-server/src/router/route.ts | 2 +- .../src/bootstrap.ts | 2 +- .../document_migrator/internal_transforms.ts | 2 +- .../src/object_types/registration.ts | 2 +- .../src/contracts.ts | 8 ++--- .../core-status-common/src/service_status.ts | 2 +- .../src/core_usage_data_service.ts | 2 +- .../src/import_resolver.ts | 4 +-- .../integration_tests/import_resolver.test.ts | 4 +-- .../src/worker/webpack.config.ts | 4 +-- packages/kbn-storybook/src/webpack.config.ts | 12 +++++-- packages/kbn-test/src/jest/run.ts | 6 ++-- src/core/CONVENTIONS.md | 10 +++--- src/core/CORE_CONVENTIONS.md | 4 +-- .../application/browser/src/app_mount.ts | 10 +++--- src/core/{ => packages/core}/kibana.jsonc | 0 .../core}/public/_css_variables.scss | 0 .../{ => packages/core}/public/_mixins.scss | 0 .../{ => packages/core}/public/index.scss | 0 src/core/{ => packages/core}/public/index.ts | 0 .../{ => packages/core}/public/jest.config.js | 4 +-- .../core}/public/jest.integration.config.js | 4 +-- src/core/{ => packages/core}/public/mocks.ts | 0 .../core}/public/styles/_base.scss | 0 .../core}/public/styles/_index.scss | 0 .../core}/public/styles/core_app/README.txt | 0 .../core_app/_globals_borealisdark.scss | 0 .../core_app/_globals_borealislight.scss | 0 .../styles/core_app/_globals_v8dark.scss | 0 .../styles/core_app/_globals_v8light.scss | 0 .../core}/public/styles/core_app/_mixins.scss | 0 .../core_app/images/bg_bottom_branded.svg | 0 .../images/bg_bottom_branded_dark.svg | 0 .../styles/core_app/images/bg_top_branded.svg | 0 .../core_app/images/bg_top_branded_dark.svg | 0 .../docs/kib_core_deprecations_service.mdx | 30 +++++++++--------- .../core}/server/docs/kib_core_logging.mdx | 0 .../docs/kib_core_reviewing_so_type_pr.mdx | 20 ++++++------ src/core/{ => packages/core}/server/index.ts | 0 .../capabilities/capabilities_service.test.ts | 0 .../capabilities}/jest.integration.config.js | 2 +- .../ci_checks/jest.integration.config.js | 4 +-- .../check_registered_types.test.ts | 0 .../config/check_dynamic_config.test.ts | 0 .../config/config_deprecation.test.mocks.ts | 0 .../config/config_deprecation.test.ts | 0 .../config}/jest.integration.config.js | 2 +- .../core_app/__fixtures__/outside_output.js | 0 .../__fixtures__/plugin/foo/gzip_chunk.js | 0 .../__fixtures__/plugin/foo/gzip_chunk.js.gz | Bin .../__fixtures__/plugin/foo/image.png | Bin .../__fixtures__/plugin/foo/plugin.js | 0 .../core_app/bundle_routes.test.ts | 0 .../core_app/core_app_routes.test.ts | 0 .../default_route_provider_config.test.ts | 0 .../core_app}/jest.integration.config.js | 2 +- .../core_app/static_assets.test.ts | 0 .../elasticsearch/capabilities.test.ts | 0 .../capabilities_serverless.test.ts | 0 .../elasticsearch/client.test.ts | 0 .../elasticsearch/error_logging.test.ts | 2 +- .../elasticsearch/errors.test.ts | 8 +++-- .../is_scripting_enabled.test.ts | 0 .../elasticsearch}/jest.integration.config.js | 2 +- .../max_response_size_logging.test.ts | 0 .../elasticsearch/user_agent.test.ts | 0 .../version_compatibility.test.ts | 0 .../jest.integration.config.js | 2 +- .../execution_context/tracing.test.ts | 0 .../http/cookie_session_storage.test.ts | 0 .../http/core_service.test.mocks.ts | 0 .../http/core_services.test.ts | 0 .../static/compression_available.json | 0 .../static/compression_available.json.gz | Bin .../http/fixtures/static/some_json.json | 0 .../http/http2_protocol.test.ts | 0 .../integration_tests/http/http_auth.test.ts | 0 .../http/http_server.test.ts | 0 .../http/jest.integration.config.js | 20 ++++++++++++ .../integration_tests/http/lifecycle.test.ts | 0 .../http/lifecycle_handlers.test.ts | 0 .../integration_tests/http/logging.test.ts | 0 .../server/integration_tests/http/oas.test.ts | 0 .../integration_tests/http/preboot.test.ts | 0 .../integration_tests/http/request.test.ts | 0 .../http/request_representation.test.ts | 0 .../http/router.test.mocks.ts | 0 .../integration_tests/http/router.test.ts | 0 .../http/set_tls_config.test.ts | 0 .../http/tls_config_reload.test.ts | 0 .../integration_tests/http/tls_utils.ts | 0 .../http/versioned_router.test.mocks.ts | 0 .../http/versioned_router.test.ts | 0 .../http_resources_service.test.ts | 0 .../http_resources/jest.integration.config.js | 20 ++++++++++++ .../logging/jest.integration.config.js | 20 ++++++++++++ .../integration_tests/logging/logging.test.ts | 0 .../logging/rolling_file_appender.test.ts | 0 .../server/integration_tests/logging/utils.ts | 0 .../metrics/elu_load.test.ts | 0 .../metrics/jest.integration.config.js | 20 ++++++++++++ .../metrics/server_collector.test.ts | 0 .../node/jest.integration.config.js | 20 ++++++++++++ .../integration_tests/node/logging.test.ts | 0 .../integration_tests/node/migrator.test.ts | 0 .../root/disable_preboot.test.ts | 0 .../root/jest.integration.config.js | 20 ++++++++++++ .../saved_objects/jest.integration.config.js | 8 ++--- .../archives/7.13.0_5k_so_node_01.zip | Bin .../archives/7.13.0_5k_so_node_02.zip | Bin .../archives/8.4.0_with_sample_data_logs.zip | Bin .../archives/9.0.0_baseline_1k_docs.zip | Bin .../archives/9.0.0_baseline_500k_docs.zip | Bin .../elasticsearch_client_wrapper.ts | 0 .../migrations/fixtures/zdt_base.fixtures.ts | 0 .../migrations/group1/.gitignore | 0 .../__snapshots__/v2_migration.test.ts.snap | 0 .../group1/create_test_archives.test.ts | 0 .../group1}/jest.integration.config.js | 6 ++-- .../migrations/group1/v2_migration.test.ts | 0 .../migrations/group2/.gitignore | 0 .../group2/jest.integration.config.js | 22 +++++++++++++ .../group2/multiple_kb_nodes.test.ts | 0 .../migrations/group3/.gitignore | 0 .../migrations/group3/actions/actions.test.ts | 0 .../group3/actions/actions_test_suite.ts | 0 .../group3/actions/es_errors.test.ts | 0 .../group3/default_search_fields.test.ts | 0 .../group3/deferred_migrations.test.ts | 0 .../group3/fail_on_rollback.test.ts | 0 ...patible_cluster_routing_allocation.test.ts | 0 .../group3/jest.integration.config.js | 22 +++++++++++++ .../group3/multiple_es_nodes.test.ts | 0 .../migrations/group3/read_batch_size.test.ts | 0 .../migrations/group3/skip_migration.test.ts | 0 .../group3/split_failed_to_clone.test.ts | 0 .../group3/type_registrations.test.ts | 0 .../wait_for_migration_completion.test.ts | 0 .../group4/jest.integration.config.js | 22 +++++++++++++ .../migrations/group4/v2_md5_to_mv.test.ts | 0 .../v2_with_mv_same_stack_version.test.ts | 0 .../v2_with_mv_stack_version_bump.test.ts | 0 .../migrations/group5/active_delete.test.ts | 0 .../active_delete_multiple_instances.test.ts | 0 .../group5/jest.integration.config.js | 22 +++++++++++++ .../group5/pickup_updated_types_only.test.ts | 0 .../migrations/group5/skip_reindex.test.ts | 0 .../group6/jest.integration.config.js | 22 +++++++++++++ .../group6/single_migrator_failures.test.ts | 0 .../saved_objects/migrations/jest_matchers.ts | 0 .../kibana_migrator_archive_utils.ts | 0 .../kibana_migrator_test_kit.expect.ts | 0 .../kibana_migrator_test_kit.fixtures.ts | 0 .../migrations/kibana_migrator_test_kit.ts | 0 .../zdt/basic_document_migration.ts | 0 .../shared_suites/zdt/standard_workflow.ts | 0 .../saved_objects/migrations/test_types.ts | 0 .../saved_objects/migrations/test_utils.ts | 0 .../zdt_1/basic_document_migration.test.ts | 0 .../migrations/zdt_1/basic_downgrade.test.ts | 0 .../zdt_1/conversion_failures.test.ts | 0 .../migrations/zdt_1/create_index.test.ts | 0 .../migrations/zdt_1/document_cleanup.test.ts | 0 .../zdt_1}/jest.integration.config.js | 6 ++-- .../zdt_1/mapping_version_conflict.test.ts | 0 .../zdt_1/rerun_same_version.test.ts | 0 .../zdt_1/standard_workflow.test.ts | 0 .../migrations/zdt_1/update_mappings.test.ts | 0 .../zdt_2}/jest.integration.config.js | 6 ++-- .../zdt_2/outdated_doc_query.test.ts | 0 .../zdt_2/root_field_addition.test.ts | 0 .../zdt_2/sor_higher_version_docs.test.ts | 0 .../migrations/zdt_2/type_addition.test.ts | 0 .../zdt_2/v2_to_zdt_partial_failure.test.ts | 0 .../migrations/zdt_2/v2_to_zdt_switch.test.ts | 0 .../basic_document_migration.test.ts | 0 .../zdt_v2_compat/create_index.test.ts | 0 .../zdt_v2_compat/jest.integration.config.js | 22 +++++++++++++ .../switch_to_model_version.test.ts | 0 .../zdt_v2_compat/update_mappings.test.ts | 0 .../allow_api_access/bulk_create.test.ts | 0 .../allow_api_access/bulk_delete.test.ts | 0 .../routes/allow_api_access/bulk_get.test.ts | 0 .../allow_api_access/bulk_resolve.test.ts | 0 .../allow_api_access/bulk_update.test.ts | 0 .../routes/allow_api_access/create.test.ts | 0 .../routes/allow_api_access/delete.test.ts | 0 .../routes/allow_api_access/find.test.ts | 0 .../routes/allow_api_access/get.test.ts | 0 .../routes/allow_api_access/resolve.test.ts | 0 .../routes/allow_api_access/update.test.ts | 0 .../saved_objects/routes/bulk_create.test.ts | 0 .../saved_objects/routes/bulk_delete.test.ts | 0 .../saved_objects/routes/bulk_get.test.ts | 0 .../saved_objects/routes/bulk_resolve.test.ts | 0 .../saved_objects/routes/bulk_update.test.ts | 0 .../saved_objects/routes/create.test.ts | 0 .../saved_objects/routes/delete.test.ts | 0 .../routes/delete_unknown_types.test.ts | 0 .../saved_objects/routes/export.test.ts | 0 .../saved_objects/routes/find.test.ts | 0 .../saved_objects/routes/get.test.ts | 0 .../saved_objects/routes/import.test.ts | 0 .../legacy_import_export/export.test.ts | 0 .../legacy_import_export/import.test.ts | 0 .../routes/migrate.test.mocks.ts | 0 .../saved_objects/routes/migrate.test.ts | 0 .../saved_objects/routes/resolve.test.ts | 0 .../routes/resolve_import_errors.test.ts | 0 .../saved_objects/routes/routes_test_utils.ts | 0 .../saved_objects/routes/update.test.ts | 0 .../serverless/migrations/actions.test.ts | 0 .../basic_document_migration.test.ts | 0 .../migrations/jest.integration.config.js | 22 +++++++++++++ .../serverless/migrations/smoke.test.ts | 0 .../migrations/standard_workflow.test.ts | 0 .../service/lib/bulk_update.test.ts | 0 .../service/lib/repository.test.ts | 0 .../service/lib/repository_with_proxy.test.ts | 0 .../lib/repository_with_proxy_utils.ts | 0 .../saved_objects/service/lib/update.test.ts | 0 .../validation/validator.test.ts | 0 .../status/jest.integration.config.js | 20 ++++++++++++ .../status/routes/preboot_status.test.ts | 0 .../status/routes/status.test.ts | 0 .../ui_settings/create_or_upgrade.test.ts | 0 .../ui_settings/doc_exists.ts | 0 .../ui_settings/doc_missing.ts | 0 .../ui_settings/index.test.ts | 0 .../ui_settings/jest.integration.config.js | 20 ++++++++++++ .../ui_settings/lib/chance.ts | 0 .../ui_settings/lib/index.ts | 0 .../ui_settings/lib/servers.ts | 0 .../ui_settings/routes.test.ts | 0 .../ui_settings/so_migrations.test.ts | 4 +-- .../{ => packages/core}/server/jest.config.js | 4 +-- src/core/{ => packages/core}/server/mocks.ts | 0 .../core/test-helpers}/so_migrations.ts | 2 +- .../strip_ansi_snapshot_serializer.ts | 0 src/core/{ => packages/core}/tsconfig.json | 4 +-- src/core/{ => packages/core}/types/index.ts | 0 .../elasticsearch/jest.integration.config.js | 20 ------------ .../jest.integration.config.js | 20 ------------ .../http/jest.integration.config.js | 20 ------------ .../http_resources/jest.integration.config.js | 20 ------------ .../logging/jest.integration.config.js | 20 ------------ .../metrics/jest.integration.config.js | 20 ------------ .../node/jest.integration.config.js | 20 ------------ .../root/jest.integration.config.js | 20 ------------ .../group2/jest.integration.config.js | 20 ------------ .../group5/jest.integration.config.js | 20 ------------ .../group6/jest.integration.config.js | 20 ------------ .../zdt_v2_compat/jest.integration.config.js | 20 ------------ .../migrations/jest.integration.config.js | 20 ------------ .../status/jest.integration.config.js | 20 ------------ .../ui_settings/jest.integration.config.js | 20 ------------ .../package_json/find_used_dependencies.ts | 2 +- src/dev/precommit_hook/casing_check_config.js | 24 +++++++------- .../public/dashboard_app/_dashboard_app.scss | 2 +- .../server/collectors/config_usage/README.md | 4 +-- src/plugins/usage_collection/README.mdx | 8 ++--- tsconfig.base.json | 4 +-- .../painless_lab/public/styles/_index.scss | 2 +- .../public/application/_app.scss | 2 +- x-pack/plugins/canvas/PLUGINS.mdx | 4 +-- .../shareable_runtime/webpack.config.js | 10 ++++-- x-pack/plugins/maps/public/_main.scss | 2 +- yarn.lock | 2 +- 275 files changed, 467 insertions(+), 432 deletions(-) rename src/core/{ => packages/core}/kibana.jsonc (100%) rename src/core/{ => packages/core}/public/_css_variables.scss (100%) rename src/core/{ => packages/core}/public/_mixins.scss (100%) rename src/core/{ => packages/core}/public/index.scss (100%) rename src/core/{ => packages/core}/public/index.ts (100%) rename src/core/{ => packages/core}/public/jest.config.js (86%) rename src/core/{ => packages/core}/public/jest.integration.config.js (86%) rename src/core/{ => packages/core}/public/mocks.ts (100%) rename src/core/{ => packages/core}/public/styles/_base.scss (100%) rename src/core/{ => packages/core}/public/styles/_index.scss (100%) rename src/core/{ => packages/core}/public/styles/core_app/README.txt (100%) rename src/core/{ => packages/core}/public/styles/core_app/_globals_borealisdark.scss (100%) rename src/core/{ => packages/core}/public/styles/core_app/_globals_borealislight.scss (100%) rename src/core/{ => packages/core}/public/styles/core_app/_globals_v8dark.scss (100%) rename src/core/{ => packages/core}/public/styles/core_app/_globals_v8light.scss (100%) rename src/core/{ => packages/core}/public/styles/core_app/_mixins.scss (100%) rename src/core/{ => packages/core}/public/styles/core_app/images/bg_bottom_branded.svg (100%) rename src/core/{ => packages/core}/public/styles/core_app/images/bg_bottom_branded_dark.svg (100%) rename src/core/{ => packages/core}/public/styles/core_app/images/bg_top_branded.svg (100%) rename src/core/{ => packages/core}/public/styles/core_app/images/bg_top_branded_dark.svg (100%) rename src/core/{ => packages/core}/server/docs/kib_core_deprecations_service.mdx (95%) rename src/core/{ => packages/core}/server/docs/kib_core_logging.mdx (100%) rename src/core/{ => packages/core}/server/docs/kib_core_reviewing_so_type_pr.mdx (89%) rename src/core/{ => packages/core}/server/index.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/capabilities/capabilities_service.test.ts (100%) rename src/core/{server/integration_tests/saved_objects/migrations/zdt_1 => packages/core/server/integration_tests/capabilities}/jest.integration.config.js (90%) rename src/core/{ => packages/core}/server/integration_tests/ci_checks/jest.integration.config.js (88%) rename src/core/{ => packages/core}/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/config/check_dynamic_config.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/config/config_deprecation.test.mocks.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/config/config_deprecation.test.ts (100%) rename src/core/{server/integration_tests/saved_objects/migrations/zdt_2 => packages/core/server/integration_tests/config}/jest.integration.config.js (90%) rename src/core/{ => packages/core}/server/integration_tests/core_app/__fixtures__/outside_output.js (100%) rename src/core/{ => packages/core}/server/integration_tests/core_app/__fixtures__/plugin/foo/gzip_chunk.js (100%) rename src/core/{ => packages/core}/server/integration_tests/core_app/__fixtures__/plugin/foo/gzip_chunk.js.gz (100%) rename src/core/{ => packages/core}/server/integration_tests/core_app/__fixtures__/plugin/foo/image.png (100%) rename src/core/{ => packages/core}/server/integration_tests/core_app/__fixtures__/plugin/foo/plugin.js (100%) rename src/core/{ => packages/core}/server/integration_tests/core_app/bundle_routes.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/core_app/core_app_routes.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/core_app/default_route_provider_config.test.ts (100%) rename src/core/{server/integration_tests/saved_objects/migrations/group3 => packages/core/server/integration_tests/core_app}/jest.integration.config.js (90%) rename src/core/{ => packages/core}/server/integration_tests/core_app/static_assets.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/elasticsearch/capabilities.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/elasticsearch/capabilities_serverless.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/elasticsearch/client.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/elasticsearch/error_logging.test.ts (96%) rename src/core/{ => packages/core}/server/integration_tests/elasticsearch/errors.test.ts (93%) rename src/core/{ => packages/core}/server/integration_tests/elasticsearch/is_scripting_enabled.test.ts (100%) rename src/core/{server/integration_tests/saved_objects/migrations/group4 => packages/core/server/integration_tests/elasticsearch}/jest.integration.config.js (90%) rename src/core/{ => packages/core}/server/integration_tests/elasticsearch/max_response_size_logging.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/elasticsearch/user_agent.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/elasticsearch/version_compatibility.test.ts (100%) rename src/core/{server/integration_tests/saved_objects/migrations/group1 => packages/core/server/integration_tests/execution_context}/jest.integration.config.js (90%) rename src/core/{ => packages/core}/server/integration_tests/execution_context/tracing.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/cookie_session_storage.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/core_service.test.mocks.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/core_services.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/fixtures/static/compression_available.json (100%) rename src/core/{ => packages/core}/server/integration_tests/http/fixtures/static/compression_available.json.gz (100%) rename src/core/{ => packages/core}/server/integration_tests/http/fixtures/static/some_json.json (100%) rename src/core/{ => packages/core}/server/integration_tests/http/http2_protocol.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/http_auth.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/http_server.test.ts (100%) create mode 100644 src/core/packages/core/server/integration_tests/http/jest.integration.config.js rename src/core/{ => packages/core}/server/integration_tests/http/lifecycle.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/lifecycle_handlers.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/logging.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/oas.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/preboot.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/request.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/request_representation.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/router.test.mocks.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/router.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/set_tls_config.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/tls_config_reload.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/tls_utils.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/versioned_router.test.mocks.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http/versioned_router.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/http_resources/http_resources_service.test.ts (100%) create mode 100644 src/core/packages/core/server/integration_tests/http_resources/jest.integration.config.js create mode 100644 src/core/packages/core/server/integration_tests/logging/jest.integration.config.js rename src/core/{ => packages/core}/server/integration_tests/logging/logging.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/logging/rolling_file_appender.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/logging/utils.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/metrics/elu_load.test.ts (100%) create mode 100644 src/core/packages/core/server/integration_tests/metrics/jest.integration.config.js rename src/core/{ => packages/core}/server/integration_tests/metrics/server_collector.test.ts (100%) create mode 100644 src/core/packages/core/server/integration_tests/node/jest.integration.config.js rename src/core/{ => packages/core}/server/integration_tests/node/logging.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/node/migrator.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/root/disable_preboot.test.ts (100%) create mode 100644 src/core/packages/core/server/integration_tests/root/jest.integration.config.js rename src/core/{ => packages/core}/server/integration_tests/saved_objects/jest.integration.config.js (75%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_01.zip (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_02.zip (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/archives/8.4.0_with_sample_data_logs.zip (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/archives/9.0.0_baseline_1k_docs.zip (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/archives/9.0.0_baseline_500k_docs.zip (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/elasticsearch_client_wrapper.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/fixtures/zdt_base.fixtures.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group1/.gitignore (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group1/__snapshots__/v2_migration.test.ts.snap (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group1/create_test_archives.test.ts (100%) rename src/core/{server/integration_tests/capabilities => packages/core/server/integration_tests/saved_objects/migrations/group1}/jest.integration.config.js (84%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group1/v2_migration.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group2/.gitignore (100%) create mode 100644 src/core/packages/core/server/integration_tests/saved_objects/migrations/group2/jest.integration.config.js rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group2/multiple_kb_nodes.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group3/.gitignore (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group3/actions/actions.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group3/actions/actions_test_suite.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group3/actions/es_errors.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group3/default_search_fields.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group3/deferred_migrations.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group3/fail_on_rollback.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group3/incompatible_cluster_routing_allocation.test.ts (100%) create mode 100644 src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/jest.integration.config.js rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group3/multiple_es_nodes.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group3/read_batch_size.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group3/skip_migration.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group3/split_failed_to_clone.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group3/type_registrations.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group3/wait_for_migration_completion.test.ts (100%) create mode 100644 src/core/packages/core/server/integration_tests/saved_objects/migrations/group4/jest.integration.config.js rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group4/v2_md5_to_mv.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_same_stack_version.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_stack_version_bump.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group5/active_delete.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group5/active_delete_multiple_instances.test.ts (100%) create mode 100644 src/core/packages/core/server/integration_tests/saved_objects/migrations/group5/jest.integration.config.js rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group5/pickup_updated_types_only.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group5/skip_reindex.test.ts (100%) create mode 100644 src/core/packages/core/server/integration_tests/saved_objects/migrations/group6/jest.integration.config.js rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/group6/single_migrator_failures.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/jest_matchers.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/kibana_migrator_archive_utils.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.expect.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.fixtures.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/shared_suites/zdt/basic_document_migration.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/shared_suites/zdt/standard_workflow.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/test_types.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/test_utils.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_1/basic_document_migration.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_1/basic_downgrade.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_1/conversion_failures.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_1/create_index.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_1/document_cleanup.test.ts (100%) rename src/core/{server/integration_tests/config => packages/core/server/integration_tests/saved_objects/migrations/zdt_1}/jest.integration.config.js (84%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_1/mapping_version_conflict.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_1/rerun_same_version.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_1/standard_workflow.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_1/update_mappings.test.ts (100%) rename src/core/{server/integration_tests/core_app => packages/core/server/integration_tests/saved_objects/migrations/zdt_2}/jest.integration.config.js (84%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_2/outdated_doc_query.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_2/root_field_addition.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_2/sor_higher_version_docs.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_2/type_addition.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_partial_failure.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_switch.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_v2_compat/basic_document_migration.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_v2_compat/create_index.test.ts (100%) create mode 100644 src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/jest.integration.config.js rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_v2_compat/switch_to_model_version.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/migrations/zdt_v2_compat/update_mappings.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/allow_api_access/bulk_create.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/allow_api_access/bulk_delete.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/allow_api_access/bulk_get.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/allow_api_access/bulk_resolve.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/allow_api_access/bulk_update.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/allow_api_access/create.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/allow_api_access/delete.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/allow_api_access/find.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/allow_api_access/get.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/allow_api_access/resolve.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/allow_api_access/update.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/bulk_create.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/bulk_delete.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/bulk_get.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/bulk_resolve.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/bulk_update.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/create.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/delete.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/delete_unknown_types.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/export.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/find.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/get.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/import.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/legacy_import_export/export.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/legacy_import_export/import.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/migrate.test.mocks.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/migrate.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/resolve.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/resolve_import_errors.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/routes_test_utils.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/routes/update.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/serverless/migrations/actions.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/serverless/migrations/basic_document_migration.test.ts (100%) create mode 100644 src/core/packages/core/server/integration_tests/saved_objects/serverless/migrations/jest.integration.config.js rename src/core/{ => packages/core}/server/integration_tests/saved_objects/serverless/migrations/smoke.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/serverless/migrations/standard_workflow.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/service/lib/bulk_update.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/service/lib/repository.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/service/lib/repository_with_proxy.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/service/lib/repository_with_proxy_utils.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/service/lib/update.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/saved_objects/validation/validator.test.ts (100%) create mode 100644 src/core/packages/core/server/integration_tests/status/jest.integration.config.js rename src/core/{ => packages/core}/server/integration_tests/status/routes/preboot_status.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/status/routes/status.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/ui_settings/create_or_upgrade.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/ui_settings/doc_exists.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/ui_settings/doc_missing.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/ui_settings/index.test.ts (100%) create mode 100644 src/core/packages/core/server/integration_tests/ui_settings/jest.integration.config.js rename src/core/{ => packages/core}/server/integration_tests/ui_settings/lib/chance.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/ui_settings/lib/index.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/ui_settings/lib/servers.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/ui_settings/routes.test.ts (100%) rename src/core/{ => packages/core}/server/integration_tests/ui_settings/so_migrations.test.ts (95%) rename src/core/{ => packages/core}/server/jest.config.js (86%) rename src/core/{ => packages/core}/server/mocks.ts (100%) rename src/core/{test_helpers => packages/core/test-helpers}/so_migrations.ts (99%) rename src/core/{test_helpers => packages/core/test-helpers}/strip_ansi_snapshot_serializer.ts (100%) rename src/core/{ => packages/core}/tsconfig.json (98%) rename src/core/{ => packages/core}/types/index.ts (100%) delete mode 100644 src/core/server/integration_tests/elasticsearch/jest.integration.config.js delete mode 100644 src/core/server/integration_tests/execution_context/jest.integration.config.js delete mode 100644 src/core/server/integration_tests/http/jest.integration.config.js delete mode 100644 src/core/server/integration_tests/http_resources/jest.integration.config.js delete mode 100644 src/core/server/integration_tests/logging/jest.integration.config.js delete mode 100644 src/core/server/integration_tests/metrics/jest.integration.config.js delete mode 100644 src/core/server/integration_tests/node/jest.integration.config.js delete mode 100644 src/core/server/integration_tests/root/jest.integration.config.js delete mode 100644 src/core/server/integration_tests/saved_objects/migrations/group2/jest.integration.config.js delete mode 100644 src/core/server/integration_tests/saved_objects/migrations/group5/jest.integration.config.js delete mode 100644 src/core/server/integration_tests/saved_objects/migrations/group6/jest.integration.config.js delete mode 100644 src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/jest.integration.config.js delete mode 100644 src/core/server/integration_tests/saved_objects/serverless/migrations/jest.integration.config.js delete mode 100644 src/core/server/integration_tests/status/jest.integration.config.js delete mode 100644 src/core/server/integration_tests/ui_settings/jest.integration.config.js diff --git a/.buildkite/scripts/steps/checks/saved_objects_definition_change.sh b/.buildkite/scripts/steps/checks/saved_objects_definition_change.sh index 175128d536fd5..ad3561b16907c 100755 --- a/.buildkite/scripts/steps/checks/saved_objects_definition_change.sh +++ b/.buildkite/scripts/steps/checks/saved_objects_definition_change.sh @@ -5,7 +5,7 @@ set -euo pipefail source .buildkite/scripts/common/util.sh echo --- Check SO definition changes -cmd="node scripts/jest_integration -u src/core/server/integration_tests/ci_checks" +cmd="node scripts/jest_integration -u src/core/packages/core/server/integration_tests/ci_checks" eval "$cmd" check_for_changed_files "$cmd" true diff --git a/.eslintrc.js b/.eslintrc.js index b0db71e492bbe..3224c3f249f04 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1915,7 +1915,7 @@ module.exports = { { files: [ // core-team owned code - 'src/core/**', + 'src/core/packages/core/**', 'x-pack/plugins/features/**', 'x-pack/plugins/licensing/**', 'x-pack/plugins/global_search/**', diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1a172217bf9e6..2366542ac6e17 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -558,6 +558,7 @@ src/core/packages/apps/browser-internal @elastic/kibana-core src/core/packages/apps/server-internal @elastic/kibana-core src/core/packages/base/browser-internal @elastic/kibana-core src/core/packages/base/common @elastic/kibana-core +src/core/packages/core @elastic/kibana-core src/platform/packages/private/default-nav/devtools @elastic/kibana-management src/platform/packages/private/default-nav/management @elastic/kibana-management src/platform/packages/private/default-nav/ml @elastic/ml-ui @@ -1822,7 +1823,7 @@ packages/kbn-monaco/src/esql @elastic/kibana-esql /x-pack/test_serverless/api_integration/test_suites/**/telemetry/ @elastic/kibana-core /x-pack/test/functional/es_archives/cases/migrations/8.8.0 @elastic/response-ops -#CC# /src/core/server/csp/ @elastic/kibana-core +#CC# /src/core/packages/core/server/csp/ @elastic/kibana-core #CC# /src/plugins/saved_objects/ @elastic/kibana-core #CC# /x-pack/plugins/cloud/ @elastic/kibana-core #CC# /x-pack/plugins/features/ @elastic/kibana-core @@ -1848,7 +1849,7 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib # Kibana Localization /src/dev/i18n_tools/ @elastic/kibana-localization @elastic/kibana-core -/src/core/public/i18n/ @elastic/kibana-localization @elastic/kibana-core +/src/core/packages/core/public/i18n/ @elastic/kibana-localization @elastic/kibana-core #CC# /x-pack/platform/plugins/private/translations/ @elastic/kibana-localization @elastic/kibana-core # Kibana Platform Security @@ -1887,7 +1888,7 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib /.github/workflows/codeql.yml @elastic/kibana-security /.github/workflows/codeql-stats.yml @elastic/kibana-security /src/dev/eslint/security_eslint_rule_tests.ts @elastic/kibana-security -/src/core/server/integration_tests/config/check_dynamic_config.test.ts @elastic/kibana-security +/src/core/packages/core/server/integration_tests/config/check_dynamic_config.test.ts @elastic/kibana-security /src/plugins/telemetry/server/config/telemetry_labels.ts @elastic/kibana-security /packages/kbn-std/src/is_internal_url.test.ts @elastic/kibana-core @elastic/kibana-security /packages/kbn-std/src/is_internal_url.ts @elastic/kibana-core @elastic/kibana-security diff --git a/STYLEGUIDE.mdx b/STYLEGUIDE.mdx index 10815b1f0002c..e45ca068268d1 100644 --- a/STYLEGUIDE.mdx +++ b/STYLEGUIDE.mdx @@ -630,7 +630,7 @@ Doing so ensures the styles are never separated or lost on import and allows for better modularization (smaller individual plugin asset footprint). All SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass) -& Kibana invisibles (SASS variables, mixins, functions) from the [`globals_[theme].scss` file](src/core/public/styles/core_app/_globals_v8light.scss). +& Kibana invisibles (SASS variables, mixins, functions) from the [`globals_[theme].scss` file](src/core/packages/core/public/styles/core_app/_globals_v8light.scss). While the styles for this component will only be loaded if the component exists on the page, the styles **will** be global and so it is recommended to use a three letter prefix on your diff --git a/package.json b/package.json index e648aec17410b..bf9571aa6217b 100644 --- a/package.json +++ b/package.json @@ -244,7 +244,7 @@ "@kbn/content-management-utils": "link:packages/kbn-content-management-utils", "@kbn/controls-example-plugin": "link:examples/controls_example", "@kbn/controls-plugin": "link:src/plugins/controls", - "@kbn/core": "link:src/core", + "@kbn/core": "link:src/core/packages/core", "@kbn/core-analytics-browser": "link:src/core/packages/analytics/browser", "@kbn/core-analytics-browser-internal": "link:src/core/packages/analytics/browser-internal", "@kbn/core-analytics-server": "link:src/core/packages/analytics/server", @@ -1873,4 +1873,4 @@ "zod-to-json-schema": "^3.23.0" }, "packageManager": "yarn@1.22.21" -} \ No newline at end of file +} diff --git a/packages/core/deprecations/core-deprecations-common/src/types.ts b/packages/core/deprecations/core-deprecations-common/src/types.ts index 45f93aa5ba921..454d78b9b21b7 100644 --- a/packages/core/deprecations/core-deprecations-common/src/types.ts +++ b/packages/core/deprecations/core-deprecations-common/src/types.ts @@ -20,12 +20,10 @@ export interface DeprecationDetailsMessage { export interface BaseDeprecationDetails { /** * The title of the deprecation. - * Check the README for writing deprecations in `src/core/server/deprecations/README.mdx` */ title: string; /** * The description message to be displayed for the deprecation. - * Check the README for writing deprecations in `src/core/server/deprecations/README.mdx` */ message: string | DeprecationDetailsMessage | Array; /** @@ -72,7 +70,7 @@ export interface BaseDeprecationDetails { * Specify a list of manual steps users need to follow to * fix the deprecation before upgrade. Required even if an API * corrective action is set in case the API fails. - * Check the README for writing deprecations in `src/core/server/deprecations/README.mdx` + * Check the README for writing deprecations in `src/core/packages/core/server/deprecations/README.mdx` */ manualSteps: string[]; /** diff --git a/packages/core/deprecations/core-deprecations-server/src/contracts.ts b/packages/core/deprecations/core-deprecations-server/src/contracts.ts index 4391ac2c1f68f..62aada287615a 100644 --- a/packages/core/deprecations/core-deprecations-server/src/contracts.ts +++ b/packages/core/deprecations/core-deprecations-server/src/contracts.ts @@ -28,7 +28,7 @@ import type { KibanaRequest } from '@kbn/core-http-server'; * * @example * ```ts - * import { DeprecationsDetails, GetDeprecationsContext, CoreSetup } from 'src/core/server'; + * import { DeprecationsDetails, GetDeprecationsContext, CoreSetup } from '@kbn/core/server'; * import { i18n } from '@kbn/i18n'; * * async function getDeprecations({ esClient, savedObjectsClient }: GetDeprecationsContext): Promise { diff --git a/packages/core/http/core-http-server/src/router/route.ts b/packages/core/http/core-http-server/src/router/route.ts index c8d0683234dc7..38b680e6cca85 100644 --- a/packages/core/http/core-http-server/src/router/route.ts +++ b/packages/core/http/core-http-server/src/router/route.ts @@ -128,7 +128,7 @@ export interface RouteDeprecationInfo { documentationUrl: string; /** * The description message to be displayed for the deprecation. - * Check the README for writing deprecations in `src/core/server/deprecations/README.mdx` + * Check the README for writing deprecations in `src/core/packages/core/server/deprecations/README.mdx` */ message?: string; /** diff --git a/packages/core/root/core-root-server-internal/src/bootstrap.ts b/packages/core/root/core-root-server-internal/src/bootstrap.ts index 0e91f368dc448..fe3097298c99d 100644 --- a/packages/core/root/core-root-server-internal/src/bootstrap.ts +++ b/packages/core/root/core-root-server-internal/src/bootstrap.ts @@ -31,7 +31,7 @@ export async function bootstrap({ configs, cliArgs, applyConfigOverrides }: Boot return; } - // `bootstrap` is exported from the `src/core/server/index` module, + // `bootstrap` is exported from the `src/core/packages/core/server/index` module, // meaning that any test importing, implicitly or explicitly, anything concrete // from `core/server` will load `dev-utils`. As some tests are mocking the `fs` package, // and as `REPO_ROOT` is initialized on the fly when importing `dev-utils` and requires diff --git a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/document_migrator/internal_transforms.ts b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/document_migrator/internal_transforms.ts index 8413c39d2cde1..bd890fb9fe136 100644 --- a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/document_migrator/internal_transforms.ts +++ b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/document_migrator/internal_transforms.ts @@ -127,7 +127,7 @@ function convertNamespaceType(doc: SavedObjectUnsanitizedDoc) { id: `${namespace}:${type}:${originId}`, type: LEGACY_URL_ALIAS_TYPE, attributes: { - // NOTE TO MAINTAINERS: If a saved object migration is added in `src/core/server/saved_objects/object_types/registration.ts`, these + // NOTE TO MAINTAINERS: If a saved object migration is added in `src/core/packages/core/server/saved_objects/object_types/registration.ts`, these // values must be updated accordingly. That's because a user can upgrade Kibana from 7.17 to 8.x, and any defined migrations will not // be applied to aliases that are created during the conversion process. sourceId: originId, diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/object_types/registration.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/object_types/registration.ts index 2ab7d1ae5b86d..f04345403330a 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/object_types/registration.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/object_types/registration.ts @@ -32,7 +32,7 @@ const legacyUrlAliasType: SavedObjectsType = { hidden: false, migrations: { // NOTE TO MAINTAINERS: If you add a migration here, be sure to update the alias creation code in the document migrator accordingly, - // see: `src/core/server/saved_objects/migrations/core/document_migrator.ts` + // see: `src/core/packages/core/server/saved_objects/migrations/core/document_migrator.ts` '8.2.0': (doc) => { // In version 8.2.0 we added the "purpose" field. Any aliases created before this were created because of saved object conversion. const purpose: LegacyUrlAlias['purpose'] = 'savedObjectConversion'; diff --git a/packages/core/saved-objects/core-saved-objects-server/src/contracts.ts b/packages/core/saved-objects/core-saved-objects-server/src/contracts.ts index 9afa4b33754fa..292906016b97a 100644 --- a/packages/core/saved-objects/core-saved-objects-server/src/contracts.ts +++ b/packages/core/saved-objects/core-saved-objects-server/src/contracts.ts @@ -37,7 +37,7 @@ import type { SavedObjectsExtensions } from './extensions/extensions'; * * @example * ```ts - * import { SavedObjectsClient, CoreSetup } from 'src/core/server'; + * import { SavedObjectsClient, CoreSetup } from '@kbn/core/server'; * * export class Plugin() { * setup: (core: CoreSetup) => { @@ -50,7 +50,7 @@ import type { SavedObjectsExtensions } from './extensions/extensions'; * * @example * ```ts - * import { SavedObjectsClient, CoreSetup } from 'src/core/server'; + * import { SavedObjectsClient, CoreSetup } from '@kbn/core/server'; * import { mySoType } from './saved_objects' * * export class Plugin() { @@ -93,7 +93,7 @@ export interface SavedObjectsServiceSetup { * @example * ```ts * // src/plugins/my_plugin/server/saved_objects/my_type.ts - * import { SavedObjectsType } from 'src/core/server'; + * import { SavedObjectsType } from '@kbn/core/server'; * import * as migrations from './migrations'; * import * as schemas from './schemas'; * @@ -122,7 +122,7 @@ export interface SavedObjectsServiceSetup { * }; * * // src/plugins/my_plugin/server/plugin.ts - * import { SavedObjectsClient, CoreSetup } from 'src/core/server'; + * import { SavedObjectsClient, CoreSetup } from '@kbn/core/server'; * import { myType } from './saved_objects'; * * export class Plugin() { diff --git a/packages/core/status/core-status-common/src/service_status.ts b/packages/core/status/core-status-common/src/service_status.ts index 9e2dfb6cbc322..1bdc09993534b 100644 --- a/packages/core/status/core-status-common/src/service_status.ts +++ b/packages/core/status/core-status-common/src/service_status.ts @@ -55,7 +55,7 @@ export type ServiceStatusLevelId = 'available' | 'degraded' | 'unavailable' | 'c * represent higher severities. Note that the default `Array.prototype.sort` implementation does not correctly sort * these values. * - * A snapshot serializer is available in `src/core/server/test_utils` to ease testing of these values with Jest. + * A snapshot serializer is available in `src/core/packages/core/server/test_utils` to ease testing of these values with Jest. * * @public */ diff --git a/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.ts b/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.ts index 7ac7cbb7fbb57..801c03f1eabb8 100644 --- a/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.ts +++ b/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.ts @@ -176,7 +176,7 @@ export class CoreUsageDataService private async getSavedObjectAliasUsageData(elasticsearch: ElasticsearchServiceStart) { // Note: this agg can be changed to use `savedObjectsRepository.find` in the future after `filters` is supported. - // See src/core/server/saved_objects/service/lib/aggregations/aggs_types/bucket_aggs.ts for supported aggregations. + // See src/core/packages/core/server/saved_objects/service/lib/aggregations/aggs_types/bucket_aggs.ts for supported aggregations. const resp = await elasticsearch.client.asInternalUser.search< unknown, { aliases: UsageDataAggs } diff --git a/packages/kbn-import-resolver/src/import_resolver.ts b/packages/kbn-import-resolver/src/import_resolver.ts index 9ca16981b2afc..6f5e51dbf2ec4 100644 --- a/packages/kbn-import-resolver/src/import_resolver.ts +++ b/packages/kbn-import-resolver/src/import_resolver.ts @@ -136,10 +136,10 @@ export class ImportResolver { private adaptReq(req: string, dirname: string): string | undefined { // handle typescript aliases if (req === 'kibana/public') { - return this.adaptReq('src/core/public', dirname); + return this.adaptReq('src/core/packages/core/public', dirname); } if (req === 'kibana/server') { - return this.adaptReq('src/core/server', dirname); + return this.adaptReq('src/core/packages/core/server', dirname); } // turn root-relative paths into relative paths diff --git a/packages/kbn-import-resolver/src/integration_tests/import_resolver.test.ts b/packages/kbn-import-resolver/src/integration_tests/import_resolver.test.ts index 1089f811b6e98..fe046248030da 100644 --- a/packages/kbn-import-resolver/src/integration_tests/import_resolver.test.ts +++ b/packages/kbn-import-resolver/src/integration_tests/import_resolver.test.ts @@ -55,9 +55,9 @@ describe('#resolve()', () => { }); it('resolves requests to src/', () => { - expect(resolver.resolve('src/core/public', FIXTURES_DIR)).toMatchInlineSnapshot(` + expect(resolver.resolve('src/core/packages/core/public', FIXTURES_DIR)).toMatchInlineSnapshot(` Object { - "absolute": /src/core/public/index.ts, + "absolute": /src/core/packages/core/public/index.ts, "type": "file", } `); diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 98549d7ec745a..efc35c636d668 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -204,7 +204,7 @@ export function getWebpackConfig( loaderContext, Path.resolve( worker.repoRoot, - `src/core/public/styles/core_app/_globals_${theme}.scss` + `src/core/packages/core/public/styles/core_app/_globals_${theme}.scss` ) )};\n${content}`; }, @@ -307,7 +307,7 @@ export function getWebpackConfig( alias: { core_app_image_assets: Path.resolve( worker.repoRoot, - 'src/core/public/styles/core_app/images' + 'src/core/packages/core/public/styles/core_app/images' ), vega: Path.resolve(worker.repoRoot, 'node_modules/vega/build-es5/vega.js'), 'react-dom$': diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index fad795a1e4619..f702efa3a1c6a 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -113,7 +113,10 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { additionalData(content: string, loaderContext: any) { return `@import ${stringifyRequest( loaderContext, - resolve(REPO_ROOT, 'src/core/public/styles/core_app/_globals_v8light.scss') + resolve( + REPO_ROOT, + 'src/core/packages/core/public/styles/core_app/_globals_v8light.scss' + ) )};\n${content}`; }, implementation: require('sass-embedded'), @@ -162,8 +165,11 @@ export default ({ config: storybookConfig }: { config: Configuration }) => { extensions: ['.js', '.ts', '.tsx', '.json', '.mdx'], mainFields: ['browser', 'main'], alias: { - core_app_image_assets: resolve(REPO_ROOT, 'src/core/public/styles/core_app/images'), - core_styles: resolve(REPO_ROOT, 'src/core/public/index.scss'), + core_app_image_assets: resolve( + REPO_ROOT, + 'src/core/packages/core/public/styles/core_app/images' + ), + core_styles: resolve(REPO_ROOT, 'src/core/packages/core/public/index.scss'), vega: resolve(REPO_ROOT, 'node_modules/vega/build-es5/vega.js'), }, }, diff --git a/packages/kbn-test/src/jest/run.ts b/packages/kbn-test/src/jest/run.ts index e82a34a2fe82a..a1fda9449acb4 100644 --- a/packages/kbn-test/src/jest/run.ts +++ b/packages/kbn-test/src/jest/run.ts @@ -29,9 +29,9 @@ import { map } from 'lodash'; import getopts from 'getopts'; import jestFlags from './jest_flags.json'; -// yarn test:jest src/core/server/saved_objects -// yarn test:jest src/core/public/core_system.test.ts -// :kibana/src/core/server/saved_objects yarn test:jest +// yarn test:jest src/core/packages/core/server/saved_objects +// yarn test:jest src/core/packages/core/public/core_system.test.ts +// :kibana/src/core/packages/core/server/saved_objects yarn test:jest export function runJest(configName = 'jest.config.js') { const unknownFlag: string[] = []; diff --git a/src/core/CONVENTIONS.md b/src/core/CONVENTIONS.md index 67476af87b6de..733e5e5e20885 100644 --- a/src/core/CONVENTIONS.md +++ b/src/core/CONVENTIONS.md @@ -88,7 +88,7 @@ my_plugin/ ```ts // my_plugin/public/index.ts -import { PluginInitializer } from '../../src/core/public'; +import { PluginInitializer } from '../../src/core/packages/core/public'; import { MyPlugin, MyPluginSetup, MyPluginStart } from './plugin'; export const plugin: PluginInitializer = () => new MyPlugin(); @@ -103,7 +103,7 @@ export { ```ts // my_plugin/public/plugin.ts -import { CoreSetup, CoreStart, Plugin } from '../../src/core/public'; +import { CoreSetup, CoreStart, Plugin } from '../../src/core/packages/core/public'; import { OtherPluginSetup, OtherPluginStart } from '../other_plugin'; import { ThirdPluginSetup, ThirdPluginStart } from '../third_plugin'; @@ -164,7 +164,7 @@ leverage this pattern. import React from 'react'; import ReactDOM from 'react-dom'; -import { CoreStart, AppMountParameters } from 'src/core/public'; +import { CoreStart, AppMountParameters } from '@kbn/core/public'; import { MyAppRoot } from './components/app.ts'; @@ -184,7 +184,7 @@ export const renderApp = ( ```ts // my_plugin/public/plugin.ts -import { Plugin } from '../../src/core/public'; +import { Plugin } from '../../src/core/packages/core/public'; export class MyPlugin implements Plugin { public setup(core) { @@ -328,7 +328,7 @@ The folder should contain a file per type, named after the snake_case name of th ```typescript // src/plugins/my-plugin/server/saved_objects/my_type.ts -import { SavedObjectsType } from 'src/core/server'; +import { SavedObjectsType } from '@kbn/core/server'; export const myType: SavedObjectsType = { name: 'my-type', diff --git a/src/core/CORE_CONVENTIONS.md b/src/core/CORE_CONVENTIONS.md index 9571be679ce57..5a6646eb362a7 100644 --- a/src/core/CORE_CONVENTIONS.md +++ b/src/core/CORE_CONVENTIONS.md @@ -18,10 +18,10 @@ area of Core API's and does not apply to internal types. ```ts // -- good -- - import { IRouter } from 'src/core/server'; + import { IRouter } from '@kbn/core/server'; // -- bad -- - import { IRouter } from 'src/core/server/http/router.ts'; + import { IRouter } from 'src/core/packages/core/server/http/router.ts'; ``` > Why? This is required for generating documentation from our inline diff --git a/src/core/packages/application/browser/src/app_mount.ts b/src/core/packages/application/browser/src/app_mount.ts index 4fb38b10a3704..7de411470c144 100644 --- a/src/core/packages/application/browser/src/app_mount.ts +++ b/src/core/packages/application/browser/src/app_mount.ts @@ -67,7 +67,7 @@ export interface AppMountParameters { * import ReactDOM from 'react-dom'; * import { Router, Route } from 'react-router-dom'; * - * import { CoreStart, AppMountParameters } from 'src/core/public'; + * import { CoreStart, AppMountParameters } from '@kbn/core/public'; * import { MyPluginDepsStart } from './plugin'; * * export renderApp = ({ element, history }: AppMountParameters) => { @@ -117,7 +117,7 @@ export interface AppMountParameters { * import ReactDOM from 'react-dom'; * import { BrowserRouter, Route } from 'react-router-dom'; * - * import { CoreStart, AppMountParameters } from 'src/core/public'; + * import { CoreStart, AppMountParameters } from '@kbn/core/public'; * import { MyPluginDepsStart } from './plugin'; * * export renderApp = ({ appBasePath, element }: AppMountParameters) => { @@ -152,7 +152,7 @@ export interface AppMountParameters { * import ReactDOM from 'react-dom'; * import { BrowserRouter, Route } from 'react-router-dom'; * - * import { CoreStart, AppMountParameters } from 'src/core/public'; + * import { CoreStart, AppMountParameters } from '@kbn/core/public'; * import { MyPluginDepsStart } from './plugin'; * * export renderApp = ({ element, history, onAppLeave }: AppMountParameters) => { @@ -190,7 +190,7 @@ export interface AppMountParameters { * import ReactDOM from 'react-dom'; * import { BrowserRouter, Route } from 'react-router-dom'; * - * import { CoreStart, AppMountParameters } from 'src/core/public'; + * import { CoreStart, AppMountParameters } from '@kbn/core/public'; * import { MyPluginDepsStart } from './plugin'; * * export renderApp = ({ element, history, setHeaderActionMenu }: AppMountParameters) => { @@ -216,7 +216,7 @@ export interface AppMountParameters { * import React from 'react'; * import ReactDOM from 'react-dom'; * - * import { AppMountParameters } from 'src/core/public'; + * import { AppMountParameters } from '@kbn/core/public'; * import { wrapWithTheme } from 'src/plugins/kibana_react'; * import { MyApp } from './app'; * diff --git a/src/core/kibana.jsonc b/src/core/packages/core/kibana.jsonc similarity index 100% rename from src/core/kibana.jsonc rename to src/core/packages/core/kibana.jsonc diff --git a/src/core/public/_css_variables.scss b/src/core/packages/core/public/_css_variables.scss similarity index 100% rename from src/core/public/_css_variables.scss rename to src/core/packages/core/public/_css_variables.scss diff --git a/src/core/public/_mixins.scss b/src/core/packages/core/public/_mixins.scss similarity index 100% rename from src/core/public/_mixins.scss rename to src/core/packages/core/public/_mixins.scss diff --git a/src/core/public/index.scss b/src/core/packages/core/public/index.scss similarity index 100% rename from src/core/public/index.scss rename to src/core/packages/core/public/index.scss diff --git a/src/core/public/index.ts b/src/core/packages/core/public/index.ts similarity index 100% rename from src/core/public/index.ts rename to src/core/packages/core/public/index.ts diff --git a/src/core/public/jest.config.js b/src/core/packages/core/public/jest.config.js similarity index 86% rename from src/core/public/jest.config.js rename to src/core/packages/core/public/jest.config.js index bd4750e9f6466..7454e94120acd 100644 --- a/src/core/public/jest.config.js +++ b/src/core/packages/core/public/jest.config.js @@ -9,6 +9,6 @@ module.exports = { preset: '@kbn/test', - rootDir: '../../..', - roots: ['/src/core/public'], + rootDir: '../../../../..', + roots: ['/src/core/packages/core/public'], }; diff --git a/src/core/public/jest.integration.config.js b/src/core/packages/core/public/jest.integration.config.js similarity index 86% rename from src/core/public/jest.integration.config.js rename to src/core/packages/core/public/jest.integration.config.js index 01fc419de4bab..35ba1ed3e2bde 100644 --- a/src/core/public/jest.integration.config.js +++ b/src/core/packages/core/public/jest.integration.config.js @@ -9,6 +9,6 @@ module.exports = { preset: '@kbn/test/jest_integration', - rootDir: '../../..', - roots: ['/src/core/public'], + rootDir: '../../../../..', + roots: ['/src/core/packages/core/public'], }; diff --git a/src/core/public/mocks.ts b/src/core/packages/core/public/mocks.ts similarity index 100% rename from src/core/public/mocks.ts rename to src/core/packages/core/public/mocks.ts diff --git a/src/core/public/styles/_base.scss b/src/core/packages/core/public/styles/_base.scss similarity index 100% rename from src/core/public/styles/_base.scss rename to src/core/packages/core/public/styles/_base.scss diff --git a/src/core/public/styles/_index.scss b/src/core/packages/core/public/styles/_index.scss similarity index 100% rename from src/core/public/styles/_index.scss rename to src/core/packages/core/public/styles/_index.scss diff --git a/src/core/public/styles/core_app/README.txt b/src/core/packages/core/public/styles/core_app/README.txt similarity index 100% rename from src/core/public/styles/core_app/README.txt rename to src/core/packages/core/public/styles/core_app/README.txt diff --git a/src/core/public/styles/core_app/_globals_borealisdark.scss b/src/core/packages/core/public/styles/core_app/_globals_borealisdark.scss similarity index 100% rename from src/core/public/styles/core_app/_globals_borealisdark.scss rename to src/core/packages/core/public/styles/core_app/_globals_borealisdark.scss diff --git a/src/core/public/styles/core_app/_globals_borealislight.scss b/src/core/packages/core/public/styles/core_app/_globals_borealislight.scss similarity index 100% rename from src/core/public/styles/core_app/_globals_borealislight.scss rename to src/core/packages/core/public/styles/core_app/_globals_borealislight.scss diff --git a/src/core/public/styles/core_app/_globals_v8dark.scss b/src/core/packages/core/public/styles/core_app/_globals_v8dark.scss similarity index 100% rename from src/core/public/styles/core_app/_globals_v8dark.scss rename to src/core/packages/core/public/styles/core_app/_globals_v8dark.scss diff --git a/src/core/public/styles/core_app/_globals_v8light.scss b/src/core/packages/core/public/styles/core_app/_globals_v8light.scss similarity index 100% rename from src/core/public/styles/core_app/_globals_v8light.scss rename to src/core/packages/core/public/styles/core_app/_globals_v8light.scss diff --git a/src/core/public/styles/core_app/_mixins.scss b/src/core/packages/core/public/styles/core_app/_mixins.scss similarity index 100% rename from src/core/public/styles/core_app/_mixins.scss rename to src/core/packages/core/public/styles/core_app/_mixins.scss diff --git a/src/core/public/styles/core_app/images/bg_bottom_branded.svg b/src/core/packages/core/public/styles/core_app/images/bg_bottom_branded.svg similarity index 100% rename from src/core/public/styles/core_app/images/bg_bottom_branded.svg rename to src/core/packages/core/public/styles/core_app/images/bg_bottom_branded.svg diff --git a/src/core/public/styles/core_app/images/bg_bottom_branded_dark.svg b/src/core/packages/core/public/styles/core_app/images/bg_bottom_branded_dark.svg similarity index 100% rename from src/core/public/styles/core_app/images/bg_bottom_branded_dark.svg rename to src/core/packages/core/public/styles/core_app/images/bg_bottom_branded_dark.svg diff --git a/src/core/public/styles/core_app/images/bg_top_branded.svg b/src/core/packages/core/public/styles/core_app/images/bg_top_branded.svg similarity index 100% rename from src/core/public/styles/core_app/images/bg_top_branded.svg rename to src/core/packages/core/public/styles/core_app/images/bg_top_branded.svg diff --git a/src/core/public/styles/core_app/images/bg_top_branded_dark.svg b/src/core/packages/core/public/styles/core_app/images/bg_top_branded_dark.svg similarity index 100% rename from src/core/public/styles/core_app/images/bg_top_branded_dark.svg rename to src/core/packages/core/public/styles/core_app/images/bg_top_branded_dark.svg diff --git a/src/core/server/docs/kib_core_deprecations_service.mdx b/src/core/packages/core/server/docs/kib_core_deprecations_service.mdx similarity index 95% rename from src/core/server/docs/kib_core_deprecations_service.mdx rename to src/core/packages/core/server/docs/kib_core_deprecations_service.mdx index 1cf5fd50869f1..c17aee1465fd0 100644 --- a/src/core/server/docs/kib_core_deprecations_service.mdx +++ b/src/core/packages/core/server/docs/kib_core_deprecations_service.mdx @@ -33,7 +33,7 @@ To display deprecations in the UA set `xpack.upgrade_assistant.readonly: false` The UA is in read-only mode and will be enabled up until the last minor before the next major release. ## How do I use this service for deprecated plugin configurations? -The deprecations service automatically hooks deprecated configs with the deprecations service. +The deprecations service automatically hooks deprecated configs with the deprecations service. All the config deprecation functions (`unused`, `unusedFromRoot`, `rename`, `renameFromRoot`) accept an optional parameter to customize the deprecation details. @@ -139,7 +139,7 @@ Plugins are responsible for registering any deprecations during the `setup` life the deprecations service. Examples of non-config deprecations include things like -- kibana_user security roles +- kibana_user security roles This service is not intended to be used for non-user facing deprecations or cases where the deprecation cannot be 'detected' by this mechanism. @@ -155,14 +155,14 @@ The `getDeprecations` function is invoked when the user requests to see the depr The function provides a context object which contains a scoped Elasticsearch client and a Saved Objects client. ⚠️When using the Saved Objects client, bear in mind that all Spaces must be checked for deprecations: -By default, the Saved Objects client retrieves data from the current Space only. To override this behavior, add the -option `namespaces: ['*']` to search in all Spaces. When getting by ID, it's best to loop through all the spaces and get with `namespaces: [mySpaceOverride]`. +By default, the Saved Objects client retrieves data from the current Space only. To override this behavior, add the +option `namespaces: ['*']` to search in all Spaces. When getting by ID, it's best to loop through all the spaces and get with `namespaces: [mySpaceOverride]`. To check the full TS types of the service please check the [generated core docs](https://docs.elastic.dev/kibana-dev-docs/api/kbn-core-deprecations-server). ### Example ```ts -import { DeprecationsDetails, GetDeprecationsContext } from 'src/core/server'; +import { DeprecationsDetails, GetDeprecationsContext } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; async function getDeprecations({ esClient, savedObjectsClient }: GetDeprecationsContext): Promise { @@ -249,14 +249,14 @@ Provide as much context as possible for what triggered the deprecation warning. If action is not required (for example the default behavior is changing), describe the impact of doing nothing. Examples: -- > Setting `xpack.reporting.roles.enabled` is deprecated. Use feature controls to grant reporting privileges. +- > Setting `xpack.reporting.roles.enabled` is deprecated. Use feature controls to grant reporting privileges. - > The Joda Time century-of era-formatter (C) is deprecated. Use a `java.time` formatter instead. - > The default for the `cluster.routing.allocation.disk.watermark` setting is changing from false to true. > If you do not explicitly configure this setting when you upgrade, indices in this one node cluster will - > become read-only if disk usage reaches 95%. + > become read-only if disk usage reaches 95%. ## Note on i18n -All deprecation titles, messages, and manual steps should be wrapped in `i18n.translate`. This +All deprecation titles, messages, and manual steps should be wrapped in `i18n.translate`. This provides a better user experience using different locales. Follow the writing guidelines below for best practices to writing the i18n messages and ids. @@ -288,7 +288,7 @@ message: i18n.translate('xpack.reporting.deprecations.reportingRoleMessage', { ``` #### Documentation URL -Don’t link to the Migration guide/breaking changes. +Don’t link to the Migration guide/breaking changes. Only specify a doc URL if the user truly needs to “learn more” to understand what actions they need to take. Example: @@ -315,7 +315,7 @@ manualSteps: [ #### General Guidelines ##### What is deprecated -Use the present tense: +Use the present tense: - Types are deprecated in geo_shape queries. - Sorting is deprecated in reindex requests. @@ -325,7 +325,7 @@ Avoid: ##### What action the user needs to take Use the imperative voice: -- Do not specify a type in the indexed_shape section. +- Do not specify a type in the indexed_shape section. - Use query filtering to reindex a subset of documents. Avoid: @@ -343,18 +343,18 @@ Others are more nuanced and don’t necessarily require any changes. In this cas the impact of not taking action: - The default for the `cluster.routing.allocation.disk.watermark` setting is changing from false to true. If you do not explicitly configure this setting when you upgrade, indices in this one node cluster will - become read-only if disk usage reaches 95%. + become read-only if disk usage reaches 95%. ##### Version You do not need to include any form of "and will be removed in a future release". The assumption is that deprecated things are going to be removed, and the standard schedule for removal -is the next major version. +is the next major version. If things are targeted for removal in a specific minor release, the message should include that information: - Abc is deprecated. Use Xyz to do the thing. Support for Abc will be removed in n.n. If an item is deprecated, but won’t be removed in the next major version, the message should indicate that: -- Abc is deprecated. Use Xyz to do the thing. Support for Abc will be removed following the release of n.0. +- Abc is deprecated. Use Xyz to do the thing. Support for Abc will be removed following the release of n.0. Avoid: - Xyz is deprecated and will be removed in 8.0. @@ -362,5 +362,5 @@ Avoid: - Xyz is deprecated and will not be supported in the next major version of Elasticsearch. ##### Formatting -- Sentence style capitalization and punctuation. +- Sentence style capitalization and punctuation. - Avoid quotes for emphasis. diff --git a/src/core/server/docs/kib_core_logging.mdx b/src/core/packages/core/server/docs/kib_core_logging.mdx similarity index 100% rename from src/core/server/docs/kib_core_logging.mdx rename to src/core/packages/core/server/docs/kib_core_logging.mdx diff --git a/src/core/server/docs/kib_core_reviewing_so_type_pr.mdx b/src/core/packages/core/server/docs/kib_core_reviewing_so_type_pr.mdx similarity index 89% rename from src/core/server/docs/kib_core_reviewing_so_type_pr.mdx rename to src/core/packages/core/server/docs/kib_core_reviewing_so_type_pr.mdx index 95dc466109543..24ff50f926ac8 100644 --- a/src/core/server/docs/kib_core_reviewing_so_type_pr.mdx +++ b/src/core/packages/core/server/docs/kib_core_reviewing_so_type_pr.mdx @@ -12,10 +12,10 @@ tags: ['kibana','dev', 'contributor', 'api docs'] ## How does automatic review assignment work when SO types are changed? PRs modifying / adding / deleting any SO type registration will be flagged by the integration -test located at `src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts`. +test located at `src/core/packages/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts`. -This test will fail any time a change is performed on an SO type registration that could risk having an impact on -upgrades/migrations, and will force the PR's author to update the test's snapshot, which will trigger a review +This test will fail any time a change is performed on an SO type registration that could risk having an impact on +upgrades/migrations, and will force the PR's author to update the test's snapshot, which will trigger a review from the Core team. ## What and how to review? @@ -35,23 +35,23 @@ Note: reviews will **not** automatically be triggered in these scenarios: ### A new type was added -We have another integration test detecting this scenario (`src/core/server/integration_tests/saved_objects/migrations/type_registrations.test.ts`) +We have another integration test detecting this scenario (`src/core/packages/core/server/integration_tests/saved_objects/migrations/type_registrations.test.ts`) In that scenario, we should: - check the initial mappings of the type to spot potential issues: - fields being defined explicitly in the mappings but not directly used for search - overall amount of fields is high - use of `dynamic: true` (this can lead to mapping explosions) -- check if the type is registered as `hidden: true` and encourage to do so otherwise. - - this avoids polluting the global SO HTTP APIs with another type, and instead requires plugin developers to build +- check if the type is registered as `hidden: true` and encourage to do so otherwise. + - this avoids polluting the global SO HTTP APIs with another type, and instead requires plugin developers to build their own HTTP APIs to access this type of SO if they truly need to. ### A type was removed -The integration test mentioned in the previous section also detects those scenarios. +The integration test mentioned in the previous section also detects those scenarios. Here, we need to check: -- that `REMOVED_TYPES` (`packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/unused_types.ts`) was properly updated +- that `REMOVED_TYPES` (`packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/unused_types.ts`) was properly updated - (but, again, the integration test will fail otherwise) - that no other existing SO types may be referencing this type - can't really be automated, will likely need to ask the owning team directly @@ -60,7 +60,7 @@ Here, we need to check: - Review the migration function - owners are supposed to do it, but an additional review never hurts - - make sure they are typing their migration function using `SavedObjectMigrationFn` and supplying arguments for the generics + - make sure they are typing their migration function using `SavedObjectMigrationFn` and supplying arguments for the generics e.g. `SavedObjectMigrationFn`. - Make sure that the migration function is properly tested - by unit tests @@ -81,4 +81,4 @@ Here, we need to check: - Make sure the associated mapping changes were performed, and that a migration function was added accordingly. - Ideally schemas are validated with unit tests as well, especially for more complex ones. -- Refer to prior sections to see what to check. \ No newline at end of file +- Refer to prior sections to see what to check. diff --git a/src/core/server/index.ts b/src/core/packages/core/server/index.ts similarity index 100% rename from src/core/server/index.ts rename to src/core/packages/core/server/index.ts diff --git a/src/core/server/integration_tests/capabilities/capabilities_service.test.ts b/src/core/packages/core/server/integration_tests/capabilities/capabilities_service.test.ts similarity index 100% rename from src/core/server/integration_tests/capabilities/capabilities_service.test.ts rename to src/core/packages/core/server/integration_tests/capabilities/capabilities_service.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/jest.integration.config.js b/src/core/packages/core/server/integration_tests/capabilities/jest.integration.config.js similarity index 90% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_1/jest.integration.config.js rename to src/core/packages/core/server/integration_tests/capabilities/jest.integration.config.js index d242be2b90a7f..4868bc804d9d4 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/jest.integration.config.js +++ b/src/core/packages/core/server/integration_tests/capabilities/jest.integration.config.js @@ -14,7 +14,7 @@ module.exports = { // see https://github.com/elastic/kibana/pull/130255/ preset: '@kbn/test/jest_integration', rootDir: '../../../../../../..', - roots: ['/src/core/server/integration_tests/saved_objects/migrations/zdt_1'], + roots: ['/src/core/packages/core/server/integration_tests/capabilities'], // must override to match all test given there is no `integration_tests` subfolder testMatch: ['**/*.test.{js,mjs,ts,tsx}'], }; diff --git a/src/core/server/integration_tests/ci_checks/jest.integration.config.js b/src/core/packages/core/server/integration_tests/ci_checks/jest.integration.config.js similarity index 88% rename from src/core/server/integration_tests/ci_checks/jest.integration.config.js rename to src/core/packages/core/server/integration_tests/ci_checks/jest.integration.config.js index 9cdb0e5c986f7..f1c45e92abf82 100644 --- a/src/core/server/integration_tests/ci_checks/jest.integration.config.js +++ b/src/core/packages/core/server/integration_tests/ci_checks/jest.integration.config.js @@ -14,8 +14,8 @@ module.exports = { // to do so, we must fix all integration tests first // see https://github.com/elastic/kibana/pull/130255/ preset: '@kbn/test/jest_integration', - rootDir: '../../../../..', - roots: ['/src/core/server/integration_tests/ci_checks'], + rootDir: '../../../../../../..', + roots: ['/src/core/packages/core/server/integration_tests/ci_checks'], // must override to match all test given there is no `integration_tests` subfolder testMatch: ['**/*.test.{js,mjs,ts,tsx}'], }; diff --git a/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts b/src/core/packages/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts similarity index 100% rename from src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts rename to src/core/packages/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts diff --git a/src/core/server/integration_tests/config/check_dynamic_config.test.ts b/src/core/packages/core/server/integration_tests/config/check_dynamic_config.test.ts similarity index 100% rename from src/core/server/integration_tests/config/check_dynamic_config.test.ts rename to src/core/packages/core/server/integration_tests/config/check_dynamic_config.test.ts diff --git a/src/core/server/integration_tests/config/config_deprecation.test.mocks.ts b/src/core/packages/core/server/integration_tests/config/config_deprecation.test.mocks.ts similarity index 100% rename from src/core/server/integration_tests/config/config_deprecation.test.mocks.ts rename to src/core/packages/core/server/integration_tests/config/config_deprecation.test.mocks.ts diff --git a/src/core/server/integration_tests/config/config_deprecation.test.ts b/src/core/packages/core/server/integration_tests/config/config_deprecation.test.ts similarity index 100% rename from src/core/server/integration_tests/config/config_deprecation.test.ts rename to src/core/packages/core/server/integration_tests/config/config_deprecation.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/jest.integration.config.js b/src/core/packages/core/server/integration_tests/config/jest.integration.config.js similarity index 90% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_2/jest.integration.config.js rename to src/core/packages/core/server/integration_tests/config/jest.integration.config.js index 7cfea1ebcdcf6..9d2f8f4206e6b 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/jest.integration.config.js +++ b/src/core/packages/core/server/integration_tests/config/jest.integration.config.js @@ -14,7 +14,7 @@ module.exports = { // see https://github.com/elastic/kibana/pull/130255/ preset: '@kbn/test/jest_integration', rootDir: '../../../../../../..', - roots: ['/src/core/server/integration_tests/saved_objects/migrations/zdt_2'], + roots: ['/src/core/packages/core/server/integration_tests/config'], // must override to match all test given there is no `integration_tests` subfolder testMatch: ['**/*.test.{js,mjs,ts,tsx}'], }; diff --git a/src/core/server/integration_tests/core_app/__fixtures__/outside_output.js b/src/core/packages/core/server/integration_tests/core_app/__fixtures__/outside_output.js similarity index 100% rename from src/core/server/integration_tests/core_app/__fixtures__/outside_output.js rename to src/core/packages/core/server/integration_tests/core_app/__fixtures__/outside_output.js diff --git a/src/core/server/integration_tests/core_app/__fixtures__/plugin/foo/gzip_chunk.js b/src/core/packages/core/server/integration_tests/core_app/__fixtures__/plugin/foo/gzip_chunk.js similarity index 100% rename from src/core/server/integration_tests/core_app/__fixtures__/plugin/foo/gzip_chunk.js rename to src/core/packages/core/server/integration_tests/core_app/__fixtures__/plugin/foo/gzip_chunk.js diff --git a/src/core/server/integration_tests/core_app/__fixtures__/plugin/foo/gzip_chunk.js.gz b/src/core/packages/core/server/integration_tests/core_app/__fixtures__/plugin/foo/gzip_chunk.js.gz similarity index 100% rename from src/core/server/integration_tests/core_app/__fixtures__/plugin/foo/gzip_chunk.js.gz rename to src/core/packages/core/server/integration_tests/core_app/__fixtures__/plugin/foo/gzip_chunk.js.gz diff --git a/src/core/server/integration_tests/core_app/__fixtures__/plugin/foo/image.png b/src/core/packages/core/server/integration_tests/core_app/__fixtures__/plugin/foo/image.png similarity index 100% rename from src/core/server/integration_tests/core_app/__fixtures__/plugin/foo/image.png rename to src/core/packages/core/server/integration_tests/core_app/__fixtures__/plugin/foo/image.png diff --git a/src/core/server/integration_tests/core_app/__fixtures__/plugin/foo/plugin.js b/src/core/packages/core/server/integration_tests/core_app/__fixtures__/plugin/foo/plugin.js similarity index 100% rename from src/core/server/integration_tests/core_app/__fixtures__/plugin/foo/plugin.js rename to src/core/packages/core/server/integration_tests/core_app/__fixtures__/plugin/foo/plugin.js diff --git a/src/core/server/integration_tests/core_app/bundle_routes.test.ts b/src/core/packages/core/server/integration_tests/core_app/bundle_routes.test.ts similarity index 100% rename from src/core/server/integration_tests/core_app/bundle_routes.test.ts rename to src/core/packages/core/server/integration_tests/core_app/bundle_routes.test.ts diff --git a/src/core/server/integration_tests/core_app/core_app_routes.test.ts b/src/core/packages/core/server/integration_tests/core_app/core_app_routes.test.ts similarity index 100% rename from src/core/server/integration_tests/core_app/core_app_routes.test.ts rename to src/core/packages/core/server/integration_tests/core_app/core_app_routes.test.ts diff --git a/src/core/server/integration_tests/core_app/default_route_provider_config.test.ts b/src/core/packages/core/server/integration_tests/core_app/default_route_provider_config.test.ts similarity index 100% rename from src/core/server/integration_tests/core_app/default_route_provider_config.test.ts rename to src/core/packages/core/server/integration_tests/core_app/default_route_provider_config.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/jest.integration.config.js b/src/core/packages/core/server/integration_tests/core_app/jest.integration.config.js similarity index 90% rename from src/core/server/integration_tests/saved_objects/migrations/group3/jest.integration.config.js rename to src/core/packages/core/server/integration_tests/core_app/jest.integration.config.js index 10c784104f93c..62f39fd3e3689 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group3/jest.integration.config.js +++ b/src/core/packages/core/server/integration_tests/core_app/jest.integration.config.js @@ -14,7 +14,7 @@ module.exports = { // see https://github.com/elastic/kibana/pull/130255/ preset: '@kbn/test/jest_integration', rootDir: '../../../../../../..', - roots: ['/src/core/server/integration_tests/saved_objects/migrations/group3'], + roots: ['/src/core/packages/core/server/integration_tests/core_app'], // must override to match all test given there is no `integration_tests` subfolder testMatch: ['**/*.test.{js,mjs,ts,tsx}'], }; diff --git a/src/core/server/integration_tests/core_app/static_assets.test.ts b/src/core/packages/core/server/integration_tests/core_app/static_assets.test.ts similarity index 100% rename from src/core/server/integration_tests/core_app/static_assets.test.ts rename to src/core/packages/core/server/integration_tests/core_app/static_assets.test.ts diff --git a/src/core/server/integration_tests/elasticsearch/capabilities.test.ts b/src/core/packages/core/server/integration_tests/elasticsearch/capabilities.test.ts similarity index 100% rename from src/core/server/integration_tests/elasticsearch/capabilities.test.ts rename to src/core/packages/core/server/integration_tests/elasticsearch/capabilities.test.ts diff --git a/src/core/server/integration_tests/elasticsearch/capabilities_serverless.test.ts b/src/core/packages/core/server/integration_tests/elasticsearch/capabilities_serverless.test.ts similarity index 100% rename from src/core/server/integration_tests/elasticsearch/capabilities_serverless.test.ts rename to src/core/packages/core/server/integration_tests/elasticsearch/capabilities_serverless.test.ts diff --git a/src/core/server/integration_tests/elasticsearch/client.test.ts b/src/core/packages/core/server/integration_tests/elasticsearch/client.test.ts similarity index 100% rename from src/core/server/integration_tests/elasticsearch/client.test.ts rename to src/core/packages/core/server/integration_tests/elasticsearch/client.test.ts diff --git a/src/core/server/integration_tests/elasticsearch/error_logging.test.ts b/src/core/packages/core/server/integration_tests/elasticsearch/error_logging.test.ts similarity index 96% rename from src/core/server/integration_tests/elasticsearch/error_logging.test.ts rename to src/core/packages/core/server/integration_tests/elasticsearch/error_logging.test.ts index c51560f9cfdb4..81efea6176b5d 100644 --- a/src/core/server/integration_tests/elasticsearch/error_logging.test.ts +++ b/src/core/packages/core/server/integration_tests/elasticsearch/error_logging.test.ts @@ -95,7 +95,7 @@ describe('Error logging', () => { }); // it contains the offending line for troubleshooting. expect(parsedLine.stack).toContain( - 'src/core/server/integration_tests/elasticsearch/error_logging.test.ts:64:9' + 'src/core/packages/core/server/integration_tests/elasticsearch/error_logging.test.ts:64:9' ); } }); diff --git a/src/core/server/integration_tests/elasticsearch/errors.test.ts b/src/core/packages/core/server/integration_tests/elasticsearch/errors.test.ts similarity index 93% rename from src/core/server/integration_tests/elasticsearch/errors.test.ts rename to src/core/packages/core/server/integration_tests/elasticsearch/errors.test.ts index 55b9e446e1c91..6383d6e8f21bc 100644 --- a/src/core/server/integration_tests/elasticsearch/errors.test.ts +++ b/src/core/packages/core/server/integration_tests/elasticsearch/errors.test.ts @@ -48,7 +48,9 @@ describe('elasticsearch clients errors', () => { `{"name":"ResponseError","message":"parsing_exception\\n\\tCaused by:\\n\\t\\tnamed_object_not_found_exception: [1:30] unknown field [someInvalidQuery]\\n\\tRoot causes:\\n\\t\\tparsing_exception: unknown query [someInvalidQuery]","stack":"ResponseError: parsing_exception` ); // it contains the offending line for troubleshooting. - expect(str).toContain('src/core/server/integration_tests/elasticsearch/errors.test.ts:39:7'); + expect(str).toContain( + 'src/core/packages/core/server/integration_tests/elasticsearch/errors.test.ts:39:7' + ); } }); @@ -99,7 +101,9 @@ describe('elasticsearch clients errors', () => { '\\t\\tparsing_exception: unknown query [someInvalidQuery]\\n' + ' at KibanaTransport._request (`); // it contains the offending line for troubleshooting. - expect(str).toContain('src/core/server/integration_tests/elasticsearch/errors.test.ts:80:7'); + expect(str).toContain( + 'src/core/packages/core/server/integration_tests/elasticsearch/errors.test.ts:80:7' + ); } }); }); diff --git a/src/core/server/integration_tests/elasticsearch/is_scripting_enabled.test.ts b/src/core/packages/core/server/integration_tests/elasticsearch/is_scripting_enabled.test.ts similarity index 100% rename from src/core/server/integration_tests/elasticsearch/is_scripting_enabled.test.ts rename to src/core/packages/core/server/integration_tests/elasticsearch/is_scripting_enabled.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group4/jest.integration.config.js b/src/core/packages/core/server/integration_tests/elasticsearch/jest.integration.config.js similarity index 90% rename from src/core/server/integration_tests/saved_objects/migrations/group4/jest.integration.config.js rename to src/core/packages/core/server/integration_tests/elasticsearch/jest.integration.config.js index f315ac5a26af4..def5ac8d3162f 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group4/jest.integration.config.js +++ b/src/core/packages/core/server/integration_tests/elasticsearch/jest.integration.config.js @@ -14,7 +14,7 @@ module.exports = { // see https://github.com/elastic/kibana/pull/130255/ preset: '@kbn/test/jest_integration', rootDir: '../../../../../../..', - roots: ['/src/core/server/integration_tests/saved_objects/migrations/group4'], + roots: ['/src/core/packages/core/server/integration_tests/elasticsearch'], // must override to match all test given there is no `integration_tests` subfolder testMatch: ['**/*.test.{js,mjs,ts,tsx}'], }; diff --git a/src/core/server/integration_tests/elasticsearch/max_response_size_logging.test.ts b/src/core/packages/core/server/integration_tests/elasticsearch/max_response_size_logging.test.ts similarity index 100% rename from src/core/server/integration_tests/elasticsearch/max_response_size_logging.test.ts rename to src/core/packages/core/server/integration_tests/elasticsearch/max_response_size_logging.test.ts diff --git a/src/core/server/integration_tests/elasticsearch/user_agent.test.ts b/src/core/packages/core/server/integration_tests/elasticsearch/user_agent.test.ts similarity index 100% rename from src/core/server/integration_tests/elasticsearch/user_agent.test.ts rename to src/core/packages/core/server/integration_tests/elasticsearch/user_agent.test.ts diff --git a/src/core/server/integration_tests/elasticsearch/version_compatibility.test.ts b/src/core/packages/core/server/integration_tests/elasticsearch/version_compatibility.test.ts similarity index 100% rename from src/core/server/integration_tests/elasticsearch/version_compatibility.test.ts rename to src/core/packages/core/server/integration_tests/elasticsearch/version_compatibility.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group1/jest.integration.config.js b/src/core/packages/core/server/integration_tests/execution_context/jest.integration.config.js similarity index 90% rename from src/core/server/integration_tests/saved_objects/migrations/group1/jest.integration.config.js rename to src/core/packages/core/server/integration_tests/execution_context/jest.integration.config.js index 9e01ffa7c207d..100134b32e4f7 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group1/jest.integration.config.js +++ b/src/core/packages/core/server/integration_tests/execution_context/jest.integration.config.js @@ -14,7 +14,7 @@ module.exports = { // see https://github.com/elastic/kibana/pull/130255/ preset: '@kbn/test/jest_integration', rootDir: '../../../../../../..', - roots: ['/src/core/server/integration_tests/saved_objects/migrations/group1'], + roots: ['/src/core/packages/core/server/integration_tests/execution_context'], // must override to match all test given there is no `integration_tests` subfolder testMatch: ['**/*.test.{js,mjs,ts,tsx}'], }; diff --git a/src/core/server/integration_tests/execution_context/tracing.test.ts b/src/core/packages/core/server/integration_tests/execution_context/tracing.test.ts similarity index 100% rename from src/core/server/integration_tests/execution_context/tracing.test.ts rename to src/core/packages/core/server/integration_tests/execution_context/tracing.test.ts diff --git a/src/core/server/integration_tests/http/cookie_session_storage.test.ts b/src/core/packages/core/server/integration_tests/http/cookie_session_storage.test.ts similarity index 100% rename from src/core/server/integration_tests/http/cookie_session_storage.test.ts rename to src/core/packages/core/server/integration_tests/http/cookie_session_storage.test.ts diff --git a/src/core/server/integration_tests/http/core_service.test.mocks.ts b/src/core/packages/core/server/integration_tests/http/core_service.test.mocks.ts similarity index 100% rename from src/core/server/integration_tests/http/core_service.test.mocks.ts rename to src/core/packages/core/server/integration_tests/http/core_service.test.mocks.ts diff --git a/src/core/server/integration_tests/http/core_services.test.ts b/src/core/packages/core/server/integration_tests/http/core_services.test.ts similarity index 100% rename from src/core/server/integration_tests/http/core_services.test.ts rename to src/core/packages/core/server/integration_tests/http/core_services.test.ts diff --git a/src/core/server/integration_tests/http/fixtures/static/compression_available.json b/src/core/packages/core/server/integration_tests/http/fixtures/static/compression_available.json similarity index 100% rename from src/core/server/integration_tests/http/fixtures/static/compression_available.json rename to src/core/packages/core/server/integration_tests/http/fixtures/static/compression_available.json diff --git a/src/core/server/integration_tests/http/fixtures/static/compression_available.json.gz b/src/core/packages/core/server/integration_tests/http/fixtures/static/compression_available.json.gz similarity index 100% rename from src/core/server/integration_tests/http/fixtures/static/compression_available.json.gz rename to src/core/packages/core/server/integration_tests/http/fixtures/static/compression_available.json.gz diff --git a/src/core/server/integration_tests/http/fixtures/static/some_json.json b/src/core/packages/core/server/integration_tests/http/fixtures/static/some_json.json similarity index 100% rename from src/core/server/integration_tests/http/fixtures/static/some_json.json rename to src/core/packages/core/server/integration_tests/http/fixtures/static/some_json.json diff --git a/src/core/server/integration_tests/http/http2_protocol.test.ts b/src/core/packages/core/server/integration_tests/http/http2_protocol.test.ts similarity index 100% rename from src/core/server/integration_tests/http/http2_protocol.test.ts rename to src/core/packages/core/server/integration_tests/http/http2_protocol.test.ts diff --git a/src/core/server/integration_tests/http/http_auth.test.ts b/src/core/packages/core/server/integration_tests/http/http_auth.test.ts similarity index 100% rename from src/core/server/integration_tests/http/http_auth.test.ts rename to src/core/packages/core/server/integration_tests/http/http_auth.test.ts diff --git a/src/core/server/integration_tests/http/http_server.test.ts b/src/core/packages/core/server/integration_tests/http/http_server.test.ts similarity index 100% rename from src/core/server/integration_tests/http/http_server.test.ts rename to src/core/packages/core/server/integration_tests/http/http_server.test.ts diff --git a/src/core/packages/core/server/integration_tests/http/jest.integration.config.js b/src/core/packages/core/server/integration_tests/http/jest.integration.config.js new file mode 100644 index 0000000000000..518d0fb3e7003 --- /dev/null +++ b/src/core/packages/core/server/integration_tests/http/jest.integration.config.js @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../../../..', + roots: ['/src/core/packages/core/server/integration_tests/http'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/integration_tests/http/lifecycle.test.ts b/src/core/packages/core/server/integration_tests/http/lifecycle.test.ts similarity index 100% rename from src/core/server/integration_tests/http/lifecycle.test.ts rename to src/core/packages/core/server/integration_tests/http/lifecycle.test.ts diff --git a/src/core/server/integration_tests/http/lifecycle_handlers.test.ts b/src/core/packages/core/server/integration_tests/http/lifecycle_handlers.test.ts similarity index 100% rename from src/core/server/integration_tests/http/lifecycle_handlers.test.ts rename to src/core/packages/core/server/integration_tests/http/lifecycle_handlers.test.ts diff --git a/src/core/server/integration_tests/http/logging.test.ts b/src/core/packages/core/server/integration_tests/http/logging.test.ts similarity index 100% rename from src/core/server/integration_tests/http/logging.test.ts rename to src/core/packages/core/server/integration_tests/http/logging.test.ts diff --git a/src/core/server/integration_tests/http/oas.test.ts b/src/core/packages/core/server/integration_tests/http/oas.test.ts similarity index 100% rename from src/core/server/integration_tests/http/oas.test.ts rename to src/core/packages/core/server/integration_tests/http/oas.test.ts diff --git a/src/core/server/integration_tests/http/preboot.test.ts b/src/core/packages/core/server/integration_tests/http/preboot.test.ts similarity index 100% rename from src/core/server/integration_tests/http/preboot.test.ts rename to src/core/packages/core/server/integration_tests/http/preboot.test.ts diff --git a/src/core/server/integration_tests/http/request.test.ts b/src/core/packages/core/server/integration_tests/http/request.test.ts similarity index 100% rename from src/core/server/integration_tests/http/request.test.ts rename to src/core/packages/core/server/integration_tests/http/request.test.ts diff --git a/src/core/server/integration_tests/http/request_representation.test.ts b/src/core/packages/core/server/integration_tests/http/request_representation.test.ts similarity index 100% rename from src/core/server/integration_tests/http/request_representation.test.ts rename to src/core/packages/core/server/integration_tests/http/request_representation.test.ts diff --git a/src/core/server/integration_tests/http/router.test.mocks.ts b/src/core/packages/core/server/integration_tests/http/router.test.mocks.ts similarity index 100% rename from src/core/server/integration_tests/http/router.test.mocks.ts rename to src/core/packages/core/server/integration_tests/http/router.test.mocks.ts diff --git a/src/core/server/integration_tests/http/router.test.ts b/src/core/packages/core/server/integration_tests/http/router.test.ts similarity index 100% rename from src/core/server/integration_tests/http/router.test.ts rename to src/core/packages/core/server/integration_tests/http/router.test.ts diff --git a/src/core/server/integration_tests/http/set_tls_config.test.ts b/src/core/packages/core/server/integration_tests/http/set_tls_config.test.ts similarity index 100% rename from src/core/server/integration_tests/http/set_tls_config.test.ts rename to src/core/packages/core/server/integration_tests/http/set_tls_config.test.ts diff --git a/src/core/server/integration_tests/http/tls_config_reload.test.ts b/src/core/packages/core/server/integration_tests/http/tls_config_reload.test.ts similarity index 100% rename from src/core/server/integration_tests/http/tls_config_reload.test.ts rename to src/core/packages/core/server/integration_tests/http/tls_config_reload.test.ts diff --git a/src/core/server/integration_tests/http/tls_utils.ts b/src/core/packages/core/server/integration_tests/http/tls_utils.ts similarity index 100% rename from src/core/server/integration_tests/http/tls_utils.ts rename to src/core/packages/core/server/integration_tests/http/tls_utils.ts diff --git a/src/core/server/integration_tests/http/versioned_router.test.mocks.ts b/src/core/packages/core/server/integration_tests/http/versioned_router.test.mocks.ts similarity index 100% rename from src/core/server/integration_tests/http/versioned_router.test.mocks.ts rename to src/core/packages/core/server/integration_tests/http/versioned_router.test.mocks.ts diff --git a/src/core/server/integration_tests/http/versioned_router.test.ts b/src/core/packages/core/server/integration_tests/http/versioned_router.test.ts similarity index 100% rename from src/core/server/integration_tests/http/versioned_router.test.ts rename to src/core/packages/core/server/integration_tests/http/versioned_router.test.ts diff --git a/src/core/server/integration_tests/http_resources/http_resources_service.test.ts b/src/core/packages/core/server/integration_tests/http_resources/http_resources_service.test.ts similarity index 100% rename from src/core/server/integration_tests/http_resources/http_resources_service.test.ts rename to src/core/packages/core/server/integration_tests/http_resources/http_resources_service.test.ts diff --git a/src/core/packages/core/server/integration_tests/http_resources/jest.integration.config.js b/src/core/packages/core/server/integration_tests/http_resources/jest.integration.config.js new file mode 100644 index 0000000000000..1580773a0f57f --- /dev/null +++ b/src/core/packages/core/server/integration_tests/http_resources/jest.integration.config.js @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../../../..', + roots: ['/src/core/packages/core/server/integration_tests/http_resources'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/packages/core/server/integration_tests/logging/jest.integration.config.js b/src/core/packages/core/server/integration_tests/logging/jest.integration.config.js new file mode 100644 index 0000000000000..83cbe5c2e826b --- /dev/null +++ b/src/core/packages/core/server/integration_tests/logging/jest.integration.config.js @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../../../..', + roots: ['/src/core/packages/core/server/integration_tests/logging'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/integration_tests/logging/logging.test.ts b/src/core/packages/core/server/integration_tests/logging/logging.test.ts similarity index 100% rename from src/core/server/integration_tests/logging/logging.test.ts rename to src/core/packages/core/server/integration_tests/logging/logging.test.ts diff --git a/src/core/server/integration_tests/logging/rolling_file_appender.test.ts b/src/core/packages/core/server/integration_tests/logging/rolling_file_appender.test.ts similarity index 100% rename from src/core/server/integration_tests/logging/rolling_file_appender.test.ts rename to src/core/packages/core/server/integration_tests/logging/rolling_file_appender.test.ts diff --git a/src/core/server/integration_tests/logging/utils.ts b/src/core/packages/core/server/integration_tests/logging/utils.ts similarity index 100% rename from src/core/server/integration_tests/logging/utils.ts rename to src/core/packages/core/server/integration_tests/logging/utils.ts diff --git a/src/core/server/integration_tests/metrics/elu_load.test.ts b/src/core/packages/core/server/integration_tests/metrics/elu_load.test.ts similarity index 100% rename from src/core/server/integration_tests/metrics/elu_load.test.ts rename to src/core/packages/core/server/integration_tests/metrics/elu_load.test.ts diff --git a/src/core/packages/core/server/integration_tests/metrics/jest.integration.config.js b/src/core/packages/core/server/integration_tests/metrics/jest.integration.config.js new file mode 100644 index 0000000000000..a26531bdb71f6 --- /dev/null +++ b/src/core/packages/core/server/integration_tests/metrics/jest.integration.config.js @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../../../..', + roots: ['/src/core/packages/core/server/integration_tests/metrics'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/integration_tests/metrics/server_collector.test.ts b/src/core/packages/core/server/integration_tests/metrics/server_collector.test.ts similarity index 100% rename from src/core/server/integration_tests/metrics/server_collector.test.ts rename to src/core/packages/core/server/integration_tests/metrics/server_collector.test.ts diff --git a/src/core/packages/core/server/integration_tests/node/jest.integration.config.js b/src/core/packages/core/server/integration_tests/node/jest.integration.config.js new file mode 100644 index 0000000000000..3c8bc7e8c1a89 --- /dev/null +++ b/src/core/packages/core/server/integration_tests/node/jest.integration.config.js @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../../../..', + roots: ['/src/core/packages/core/server/integration_tests/node'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/integration_tests/node/logging.test.ts b/src/core/packages/core/server/integration_tests/node/logging.test.ts similarity index 100% rename from src/core/server/integration_tests/node/logging.test.ts rename to src/core/packages/core/server/integration_tests/node/logging.test.ts diff --git a/src/core/server/integration_tests/node/migrator.test.ts b/src/core/packages/core/server/integration_tests/node/migrator.test.ts similarity index 100% rename from src/core/server/integration_tests/node/migrator.test.ts rename to src/core/packages/core/server/integration_tests/node/migrator.test.ts diff --git a/src/core/server/integration_tests/root/disable_preboot.test.ts b/src/core/packages/core/server/integration_tests/root/disable_preboot.test.ts similarity index 100% rename from src/core/server/integration_tests/root/disable_preboot.test.ts rename to src/core/packages/core/server/integration_tests/root/disable_preboot.test.ts diff --git a/src/core/packages/core/server/integration_tests/root/jest.integration.config.js b/src/core/packages/core/server/integration_tests/root/jest.integration.config.js new file mode 100644 index 0000000000000..601ec18c935de --- /dev/null +++ b/src/core/packages/core/server/integration_tests/root/jest.integration.config.js @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../../../..', + roots: ['/src/core/packages/core/server/integration_tests/root'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/integration_tests/saved_objects/jest.integration.config.js b/src/core/packages/core/server/integration_tests/saved_objects/jest.integration.config.js similarity index 75% rename from src/core/server/integration_tests/saved_objects/jest.integration.config.js rename to src/core/packages/core/server/integration_tests/saved_objects/jest.integration.config.js index 842eeb6e9d19d..9cff63ff3b591 100644 --- a/src/core/server/integration_tests/saved_objects/jest.integration.config.js +++ b/src/core/packages/core/server/integration_tests/saved_objects/jest.integration.config.js @@ -14,11 +14,11 @@ module.exports = { // to do so, we must fix all integration tests first // see https://github.com/elastic/kibana/pull/130255/ preset: '@kbn/test/jest_integration', - rootDir: '../../../../..', + rootDir: '../../../../../../..', roots: [ - '/src/core/server/integration_tests/saved_objects/routes', - '/src/core/server/integration_tests/saved_objects/service', - '/src/core/server/integration_tests/saved_objects/validation', + '/src/core/packages/core/server/integration_tests/saved_objects/routes', + '/src/core/packages/core/server/integration_tests/saved_objects/service', + '/src/core/packages/core/server/integration_tests/saved_objects/validation', ], // must override to match all test given there is no `integration_tests` subfolder testMatch: ['**/*.test.{js,mjs,ts,tsx}'], diff --git a/src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_01.zip b/src/core/packages/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_01.zip similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_01.zip rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_01.zip diff --git a/src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_02.zip b/src/core/packages/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_02.zip similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_02.zip rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_02.zip diff --git a/src/core/server/integration_tests/saved_objects/migrations/archives/8.4.0_with_sample_data_logs.zip b/src/core/packages/core/server/integration_tests/saved_objects/migrations/archives/8.4.0_with_sample_data_logs.zip similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/archives/8.4.0_with_sample_data_logs.zip rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/archives/8.4.0_with_sample_data_logs.zip diff --git a/src/core/server/integration_tests/saved_objects/migrations/archives/9.0.0_baseline_1k_docs.zip b/src/core/packages/core/server/integration_tests/saved_objects/migrations/archives/9.0.0_baseline_1k_docs.zip similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/archives/9.0.0_baseline_1k_docs.zip rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/archives/9.0.0_baseline_1k_docs.zip diff --git a/src/core/server/integration_tests/saved_objects/migrations/archives/9.0.0_baseline_500k_docs.zip b/src/core/packages/core/server/integration_tests/saved_objects/migrations/archives/9.0.0_baseline_500k_docs.zip similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/archives/9.0.0_baseline_500k_docs.zip rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/archives/9.0.0_baseline_500k_docs.zip diff --git a/src/core/server/integration_tests/saved_objects/migrations/elasticsearch_client_wrapper.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/elasticsearch_client_wrapper.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/elasticsearch_client_wrapper.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/elasticsearch_client_wrapper.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/fixtures/zdt_base.fixtures.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/fixtures/zdt_base.fixtures.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/fixtures/zdt_base.fixtures.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/fixtures/zdt_base.fixtures.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group1/.gitignore b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group1/.gitignore similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group1/.gitignore rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group1/.gitignore diff --git a/src/core/server/integration_tests/saved_objects/migrations/group1/__snapshots__/v2_migration.test.ts.snap b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group1/__snapshots__/v2_migration.test.ts.snap similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group1/__snapshots__/v2_migration.test.ts.snap rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group1/__snapshots__/v2_migration.test.ts.snap diff --git a/src/core/server/integration_tests/saved_objects/migrations/group1/create_test_archives.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group1/create_test_archives.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group1/create_test_archives.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group1/create_test_archives.test.ts diff --git a/src/core/server/integration_tests/capabilities/jest.integration.config.js b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group1/jest.integration.config.js similarity index 84% rename from src/core/server/integration_tests/capabilities/jest.integration.config.js rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group1/jest.integration.config.js index 72f2adefe525c..a6cbc9d65dd89 100644 --- a/src/core/server/integration_tests/capabilities/jest.integration.config.js +++ b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group1/jest.integration.config.js @@ -13,8 +13,10 @@ module.exports = { // to do so, we must fix all integration tests first // see https://github.com/elastic/kibana/pull/130255/ preset: '@kbn/test/jest_integration', - rootDir: '../../../../..', - roots: ['/src/core/server/integration_tests/capabilities'], + rootDir: '../../../../../../../../..', + roots: [ + '/src/core/packages/core/server/integration_tests/saved_objects/migrations/group1', + ], // must override to match all test given there is no `integration_tests` subfolder testMatch: ['**/*.test.{js,mjs,ts,tsx}'], }; diff --git a/src/core/server/integration_tests/saved_objects/migrations/group1/v2_migration.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group1/v2_migration.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group1/v2_migration.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group1/v2_migration.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group2/.gitignore b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group2/.gitignore similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group2/.gitignore rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group2/.gitignore diff --git a/src/core/packages/core/server/integration_tests/saved_objects/migrations/group2/jest.integration.config.js b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group2/jest.integration.config.js new file mode 100644 index 0000000000000..1dc4919999c6c --- /dev/null +++ b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group2/jest.integration.config.js @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../../../../../..', + roots: [ + '/src/core/packages/core/server/integration_tests/saved_objects/migrations/group2', + ], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/integration_tests/saved_objects/migrations/group2/multiple_kb_nodes.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group2/multiple_kb_nodes.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group2/multiple_kb_nodes.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group2/multiple_kb_nodes.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/.gitignore b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/.gitignore similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group3/.gitignore rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/.gitignore diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/actions/actions.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/actions/actions.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group3/actions/actions.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/actions/actions.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/actions/actions_test_suite.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/actions/actions_test_suite.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group3/actions/actions_test_suite.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/actions/actions_test_suite.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/actions/es_errors.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/actions/es_errors.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group3/actions/es_errors.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/actions/es_errors.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/default_search_fields.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/default_search_fields.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group3/default_search_fields.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/default_search_fields.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/deferred_migrations.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/deferred_migrations.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group3/deferred_migrations.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/deferred_migrations.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/fail_on_rollback.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/fail_on_rollback.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group3/fail_on_rollback.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/fail_on_rollback.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/incompatible_cluster_routing_allocation.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/incompatible_cluster_routing_allocation.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group3/incompatible_cluster_routing_allocation.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/incompatible_cluster_routing_allocation.test.ts diff --git a/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/jest.integration.config.js b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/jest.integration.config.js new file mode 100644 index 0000000000000..0c74591494722 --- /dev/null +++ b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/jest.integration.config.js @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../../../../../..', + roots: [ + '/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3', + ], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/multiple_es_nodes.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/multiple_es_nodes.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group3/multiple_es_nodes.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/multiple_es_nodes.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/read_batch_size.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/read_batch_size.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group3/read_batch_size.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/read_batch_size.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/skip_migration.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/skip_migration.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group3/skip_migration.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/skip_migration.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/split_failed_to_clone.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/split_failed_to_clone.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group3/split_failed_to_clone.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/split_failed_to_clone.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/type_registrations.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/type_registrations.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group3/type_registrations.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/type_registrations.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/wait_for_migration_completion.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/wait_for_migration_completion.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group3/wait_for_migration_completion.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group3/wait_for_migration_completion.test.ts diff --git a/src/core/packages/core/server/integration_tests/saved_objects/migrations/group4/jest.integration.config.js b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group4/jest.integration.config.js new file mode 100644 index 0000000000000..38f17b958a9a7 --- /dev/null +++ b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group4/jest.integration.config.js @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../../../../../..', + roots: [ + '/src/core/packages/core/server/integration_tests/saved_objects/migrations/group4', + ], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/integration_tests/saved_objects/migrations/group4/v2_md5_to_mv.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group4/v2_md5_to_mv.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group4/v2_md5_to_mv.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group4/v2_md5_to_mv.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_same_stack_version.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_same_stack_version.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_same_stack_version.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_same_stack_version.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_stack_version_bump.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_stack_version_bump.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_stack_version_bump.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group4/v2_with_mv_stack_version_bump.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group5/active_delete.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group5/active_delete.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group5/active_delete.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group5/active_delete.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group5/active_delete_multiple_instances.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group5/active_delete_multiple_instances.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group5/active_delete_multiple_instances.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group5/active_delete_multiple_instances.test.ts diff --git a/src/core/packages/core/server/integration_tests/saved_objects/migrations/group5/jest.integration.config.js b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group5/jest.integration.config.js new file mode 100644 index 0000000000000..2c45a899ae3f0 --- /dev/null +++ b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group5/jest.integration.config.js @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../../../../../..', + roots: [ + '/src/core/packages/core/server/integration_tests/saved_objects/migrations/group5', + ], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/integration_tests/saved_objects/migrations/group5/pickup_updated_types_only.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group5/pickup_updated_types_only.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group5/pickup_updated_types_only.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group5/pickup_updated_types_only.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/group5/skip_reindex.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group5/skip_reindex.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group5/skip_reindex.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group5/skip_reindex.test.ts diff --git a/src/core/packages/core/server/integration_tests/saved_objects/migrations/group6/jest.integration.config.js b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group6/jest.integration.config.js new file mode 100644 index 0000000000000..8ba2c65a70e87 --- /dev/null +++ b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group6/jest.integration.config.js @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../../../../../..', + roots: [ + '/src/core/packages/core/server/integration_tests/saved_objects/migrations/group6', + ], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/integration_tests/saved_objects/migrations/group6/single_migrator_failures.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/group6/single_migrator_failures.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/group6/single_migrator_failures.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/group6/single_migrator_failures.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/jest_matchers.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/jest_matchers.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/jest_matchers.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/jest_matchers.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/kibana_migrator_archive_utils.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/kibana_migrator_archive_utils.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/kibana_migrator_archive_utils.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/kibana_migrator_archive_utils.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.expect.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.expect.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.expect.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.expect.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.fixtures.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.fixtures.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.fixtures.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.fixtures.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/shared_suites/zdt/basic_document_migration.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/shared_suites/zdt/basic_document_migration.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/shared_suites/zdt/basic_document_migration.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/shared_suites/zdt/basic_document_migration.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/shared_suites/zdt/standard_workflow.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/shared_suites/zdt/standard_workflow.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/shared_suites/zdt/standard_workflow.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/shared_suites/zdt/standard_workflow.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/test_types.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/test_types.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/test_types.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/test_types.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/test_utils.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/test_utils.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/test_utils.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/test_utils.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/basic_document_migration.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/basic_document_migration.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_1/basic_document_migration.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/basic_document_migration.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/basic_downgrade.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/basic_downgrade.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_1/basic_downgrade.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/basic_downgrade.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/conversion_failures.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/conversion_failures.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_1/conversion_failures.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/conversion_failures.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/create_index.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/create_index.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_1/create_index.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/create_index.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/document_cleanup.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/document_cleanup.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_1/document_cleanup.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/document_cleanup.test.ts diff --git a/src/core/server/integration_tests/config/jest.integration.config.js b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/jest.integration.config.js similarity index 84% rename from src/core/server/integration_tests/config/jest.integration.config.js rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/jest.integration.config.js index ff7e9e0a3f6ca..592e85981960b 100644 --- a/src/core/server/integration_tests/config/jest.integration.config.js +++ b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/jest.integration.config.js @@ -13,8 +13,10 @@ module.exports = { // to do so, we must fix all integration tests first // see https://github.com/elastic/kibana/pull/130255/ preset: '@kbn/test/jest_integration', - rootDir: '../../../../..', - roots: ['/src/core/server/integration_tests/config'], + rootDir: '../../../../../../../../..', + roots: [ + '/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1', + ], // must override to match all test given there is no `integration_tests` subfolder testMatch: ['**/*.test.{js,mjs,ts,tsx}'], }; diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/mapping_version_conflict.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/mapping_version_conflict.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_1/mapping_version_conflict.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/mapping_version_conflict.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/rerun_same_version.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/rerun_same_version.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_1/rerun_same_version.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/rerun_same_version.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/standard_workflow.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/standard_workflow.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_1/standard_workflow.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/standard_workflow.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_1/update_mappings.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/update_mappings.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_1/update_mappings.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_1/update_mappings.test.ts diff --git a/src/core/server/integration_tests/core_app/jest.integration.config.js b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_2/jest.integration.config.js similarity index 84% rename from src/core/server/integration_tests/core_app/jest.integration.config.js rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_2/jest.integration.config.js index 94a633419a9ab..db47f192b7718 100644 --- a/src/core/server/integration_tests/core_app/jest.integration.config.js +++ b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_2/jest.integration.config.js @@ -13,8 +13,10 @@ module.exports = { // to do so, we must fix all integration tests first // see https://github.com/elastic/kibana/pull/130255/ preset: '@kbn/test/jest_integration', - rootDir: '../../../../..', - roots: ['/src/core/server/integration_tests/core_app'], + rootDir: '../../../../../../../../..', + roots: [ + '/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_2', + ], // must override to match all test given there is no `integration_tests` subfolder testMatch: ['**/*.test.{js,mjs,ts,tsx}'], }; diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/outdated_doc_query.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_2/outdated_doc_query.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_2/outdated_doc_query.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_2/outdated_doc_query.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/root_field_addition.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_2/root_field_addition.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_2/root_field_addition.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_2/root_field_addition.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/sor_higher_version_docs.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_2/sor_higher_version_docs.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_2/sor_higher_version_docs.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_2/sor_higher_version_docs.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/type_addition.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_2/type_addition.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_2/type_addition.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_2/type_addition.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_partial_failure.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_partial_failure.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_partial_failure.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_partial_failure.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_switch.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_switch.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_switch.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_2/v2_to_zdt_switch.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/basic_document_migration.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/basic_document_migration.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/basic_document_migration.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/basic_document_migration.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/create_index.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/create_index.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/create_index.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/create_index.test.ts diff --git a/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/jest.integration.config.js b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/jest.integration.config.js new file mode 100644 index 0000000000000..60baecfeba50f --- /dev/null +++ b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/jest.integration.config.js @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../../../../../..', + roots: [ + '/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat', + ], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/switch_to_model_version.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/switch_to_model_version.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/switch_to_model_version.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/switch_to_model_version.test.ts diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/update_mappings.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/update_mappings.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/update_mappings.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/update_mappings.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_create.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_create.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_create.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_create.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_delete.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_delete.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_delete.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_delete.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_get.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_get.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_get.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_get.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_resolve.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_resolve.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_resolve.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_resolve.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_update.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_update.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_update.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/bulk_update.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/allow_api_access/create.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/create.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/allow_api_access/create.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/create.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/allow_api_access/delete.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/delete.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/allow_api_access/delete.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/delete.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/allow_api_access/find.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/find.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/allow_api_access/find.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/find.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/allow_api_access/get.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/get.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/allow_api_access/get.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/get.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/allow_api_access/resolve.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/resolve.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/allow_api_access/resolve.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/resolve.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/allow_api_access/update.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/update.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/allow_api_access/update.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/allow_api_access/update.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/bulk_create.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/bulk_create.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/bulk_create.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/bulk_create.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/bulk_delete.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/bulk_delete.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/bulk_delete.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/bulk_delete.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/bulk_get.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/bulk_get.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/bulk_get.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/bulk_get.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/bulk_resolve.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/bulk_resolve.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/bulk_resolve.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/bulk_resolve.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/bulk_update.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/bulk_update.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/bulk_update.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/bulk_update.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/create.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/create.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/create.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/create.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/delete.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/delete.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/delete.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/delete.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/delete_unknown_types.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/delete_unknown_types.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/delete_unknown_types.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/delete_unknown_types.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/export.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/export.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/export.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/export.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/find.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/find.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/find.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/find.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/get.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/get.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/get.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/get.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/import.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/import.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/import.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/import.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/legacy_import_export/export.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/legacy_import_export/export.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/legacy_import_export/export.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/legacy_import_export/export.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/legacy_import_export/import.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/legacy_import_export/import.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/legacy_import_export/import.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/legacy_import_export/import.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/migrate.test.mocks.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/migrate.test.mocks.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/migrate.test.mocks.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/migrate.test.mocks.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/migrate.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/migrate.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/migrate.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/migrate.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/resolve.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/resolve.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/resolve.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/resolve.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/resolve_import_errors.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/resolve_import_errors.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/resolve_import_errors.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/resolve_import_errors.test.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/routes_test_utils.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/routes_test_utils.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/routes_test_utils.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/routes_test_utils.ts diff --git a/src/core/server/integration_tests/saved_objects/routes/update.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/routes/update.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/routes/update.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/routes/update.test.ts diff --git a/src/core/server/integration_tests/saved_objects/serverless/migrations/actions.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/serverless/migrations/actions.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/serverless/migrations/actions.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/serverless/migrations/actions.test.ts diff --git a/src/core/server/integration_tests/saved_objects/serverless/migrations/basic_document_migration.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/serverless/migrations/basic_document_migration.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/serverless/migrations/basic_document_migration.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/serverless/migrations/basic_document_migration.test.ts diff --git a/src/core/packages/core/server/integration_tests/saved_objects/serverless/migrations/jest.integration.config.js b/src/core/packages/core/server/integration_tests/saved_objects/serverless/migrations/jest.integration.config.js new file mode 100644 index 0000000000000..7464376c717a1 --- /dev/null +++ b/src/core/packages/core/server/integration_tests/saved_objects/serverless/migrations/jest.integration.config.js @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../../../../../..', + roots: [ + '/src/core/packages/core/server/integration_tests/saved_objects/serverless/migrations', + ], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/integration_tests/saved_objects/serverless/migrations/smoke.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/serverless/migrations/smoke.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/serverless/migrations/smoke.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/serverless/migrations/smoke.test.ts diff --git a/src/core/server/integration_tests/saved_objects/serverless/migrations/standard_workflow.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/serverless/migrations/standard_workflow.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/serverless/migrations/standard_workflow.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/serverless/migrations/standard_workflow.test.ts diff --git a/src/core/server/integration_tests/saved_objects/service/lib/bulk_update.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/service/lib/bulk_update.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/service/lib/bulk_update.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/service/lib/bulk_update.test.ts diff --git a/src/core/server/integration_tests/saved_objects/service/lib/repository.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/service/lib/repository.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/service/lib/repository.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/service/lib/repository.test.ts diff --git a/src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy.test.ts diff --git a/src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy_utils.ts b/src/core/packages/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy_utils.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy_utils.ts rename to src/core/packages/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy_utils.ts diff --git a/src/core/server/integration_tests/saved_objects/service/lib/update.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/service/lib/update.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/service/lib/update.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/service/lib/update.test.ts diff --git a/src/core/server/integration_tests/saved_objects/validation/validator.test.ts b/src/core/packages/core/server/integration_tests/saved_objects/validation/validator.test.ts similarity index 100% rename from src/core/server/integration_tests/saved_objects/validation/validator.test.ts rename to src/core/packages/core/server/integration_tests/saved_objects/validation/validator.test.ts diff --git a/src/core/packages/core/server/integration_tests/status/jest.integration.config.js b/src/core/packages/core/server/integration_tests/status/jest.integration.config.js new file mode 100644 index 0000000000000..b61f7fa8eec36 --- /dev/null +++ b/src/core/packages/core/server/integration_tests/status/jest.integration.config.js @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../../../..', + roots: ['/src/core/packages/core/server/integration_tests/status'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/integration_tests/status/routes/preboot_status.test.ts b/src/core/packages/core/server/integration_tests/status/routes/preboot_status.test.ts similarity index 100% rename from src/core/server/integration_tests/status/routes/preboot_status.test.ts rename to src/core/packages/core/server/integration_tests/status/routes/preboot_status.test.ts diff --git a/src/core/server/integration_tests/status/routes/status.test.ts b/src/core/packages/core/server/integration_tests/status/routes/status.test.ts similarity index 100% rename from src/core/server/integration_tests/status/routes/status.test.ts rename to src/core/packages/core/server/integration_tests/status/routes/status.test.ts diff --git a/src/core/server/integration_tests/ui_settings/create_or_upgrade.test.ts b/src/core/packages/core/server/integration_tests/ui_settings/create_or_upgrade.test.ts similarity index 100% rename from src/core/server/integration_tests/ui_settings/create_or_upgrade.test.ts rename to src/core/packages/core/server/integration_tests/ui_settings/create_or_upgrade.test.ts diff --git a/src/core/server/integration_tests/ui_settings/doc_exists.ts b/src/core/packages/core/server/integration_tests/ui_settings/doc_exists.ts similarity index 100% rename from src/core/server/integration_tests/ui_settings/doc_exists.ts rename to src/core/packages/core/server/integration_tests/ui_settings/doc_exists.ts diff --git a/src/core/server/integration_tests/ui_settings/doc_missing.ts b/src/core/packages/core/server/integration_tests/ui_settings/doc_missing.ts similarity index 100% rename from src/core/server/integration_tests/ui_settings/doc_missing.ts rename to src/core/packages/core/server/integration_tests/ui_settings/doc_missing.ts diff --git a/src/core/server/integration_tests/ui_settings/index.test.ts b/src/core/packages/core/server/integration_tests/ui_settings/index.test.ts similarity index 100% rename from src/core/server/integration_tests/ui_settings/index.test.ts rename to src/core/packages/core/server/integration_tests/ui_settings/index.test.ts diff --git a/src/core/packages/core/server/integration_tests/ui_settings/jest.integration.config.js b/src/core/packages/core/server/integration_tests/ui_settings/jest.integration.config.js new file mode 100644 index 0000000000000..8f33b522f8d24 --- /dev/null +++ b/src/core/packages/core/server/integration_tests/ui_settings/jest.integration.config.js @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + // TODO replace the line below with + // preset: '@kbn/test/jest_integration_node + // to do so, we must fix all integration tests first + // see https://github.com/elastic/kibana/pull/130255/ + preset: '@kbn/test/jest_integration', + rootDir: '../../../../../../..', + roots: ['/src/core/packages/core/server/integration_tests/ui_settings'], + // must override to match all test given there is no `integration_tests` subfolder + testMatch: ['**/*.test.{js,mjs,ts,tsx}'], +}; diff --git a/src/core/server/integration_tests/ui_settings/lib/chance.ts b/src/core/packages/core/server/integration_tests/ui_settings/lib/chance.ts similarity index 100% rename from src/core/server/integration_tests/ui_settings/lib/chance.ts rename to src/core/packages/core/server/integration_tests/ui_settings/lib/chance.ts diff --git a/src/core/server/integration_tests/ui_settings/lib/index.ts b/src/core/packages/core/server/integration_tests/ui_settings/lib/index.ts similarity index 100% rename from src/core/server/integration_tests/ui_settings/lib/index.ts rename to src/core/packages/core/server/integration_tests/ui_settings/lib/index.ts diff --git a/src/core/server/integration_tests/ui_settings/lib/servers.ts b/src/core/packages/core/server/integration_tests/ui_settings/lib/servers.ts similarity index 100% rename from src/core/server/integration_tests/ui_settings/lib/servers.ts rename to src/core/packages/core/server/integration_tests/ui_settings/lib/servers.ts diff --git a/src/core/server/integration_tests/ui_settings/routes.test.ts b/src/core/packages/core/server/integration_tests/ui_settings/routes.test.ts similarity index 100% rename from src/core/server/integration_tests/ui_settings/routes.test.ts rename to src/core/packages/core/server/integration_tests/ui_settings/routes.test.ts diff --git a/src/core/server/integration_tests/ui_settings/so_migrations.test.ts b/src/core/packages/core/server/integration_tests/ui_settings/so_migrations.test.ts similarity index 95% rename from src/core/server/integration_tests/ui_settings/so_migrations.test.ts rename to src/core/packages/core/server/integration_tests/ui_settings/so_migrations.test.ts index 39f450ad12dab..66aa382ecd4fa 100644 --- a/src/core/server/integration_tests/ui_settings/so_migrations.test.ts +++ b/src/core/packages/core/server/integration_tests/ui_settings/so_migrations.test.ts @@ -7,11 +7,11 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import { createTestHarness, SavedObjectTestHarness } from '../../../test_helpers/so_migrations'; +import { createTestHarness, SavedObjectTestHarness } from '../../../test-helpers/so_migrations'; /** * These tests are a little unnecessary because these migrations are incredibly simple, however - * this file serves as an example of how to use test_helpers/so_migrations. + * this file serves as an example of how to use test-helpers/so_migrations. */ describe('ui settings migrations', () => { let testHarness: SavedObjectTestHarness; diff --git a/src/core/server/jest.config.js b/src/core/packages/core/server/jest.config.js similarity index 86% rename from src/core/server/jest.config.js rename to src/core/packages/core/server/jest.config.js index 65b4cc8eb538e..61c9688bca34b 100644 --- a/src/core/server/jest.config.js +++ b/src/core/packages/core/server/jest.config.js @@ -9,6 +9,6 @@ module.exports = { preset: '@kbn/test/jest_node', - rootDir: '../../..', - roots: ['/src/core/server'], + rootDir: '../../../../..', + roots: ['/src/core/packages/core/server'], }; diff --git a/src/core/server/mocks.ts b/src/core/packages/core/server/mocks.ts similarity index 100% rename from src/core/server/mocks.ts rename to src/core/packages/core/server/mocks.ts diff --git a/src/core/test_helpers/so_migrations.ts b/src/core/packages/core/test-helpers/so_migrations.ts similarity index 99% rename from src/core/test_helpers/so_migrations.ts rename to src/core/packages/core/test-helpers/so_migrations.ts index 3913963d849a2..d55b88097dc5f 100644 --- a/src/core/test_helpers/so_migrations.ts +++ b/src/core/packages/core/test-helpers/so_migrations.ts @@ -14,7 +14,7 @@ import { getSupertest, } from '@kbn/core-test-helpers-kbn-server'; import { SavedObject } from '../types'; -import { SavedObjectsType } from '../server'; +import type { SavedObjectsType } from '../server'; type ExportOptions = { type: string } | { objects: Array<{ id: string; type: string }> }; diff --git a/src/core/test_helpers/strip_ansi_snapshot_serializer.ts b/src/core/packages/core/test-helpers/strip_ansi_snapshot_serializer.ts similarity index 100% rename from src/core/test_helpers/strip_ansi_snapshot_serializer.ts rename to src/core/packages/core/test-helpers/strip_ansi_snapshot_serializer.ts diff --git a/src/core/tsconfig.json b/src/core/packages/core/tsconfig.json similarity index 98% rename from src/core/tsconfig.json rename to src/core/packages/core/tsconfig.json index 92647e56fad82..bf33c7b7aac45 100644 --- a/src/core/tsconfig.json +++ b/src/core/packages/core/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "isolatedModules": true, @@ -8,7 +8,7 @@ "public/**/*", "server/**/*", "types/**/*", - "test_helpers/**/*", + "test-helpers/**/*", "utils/**/*", "index.ts" ], diff --git a/src/core/types/index.ts b/src/core/packages/core/types/index.ts similarity index 100% rename from src/core/types/index.ts rename to src/core/packages/core/types/index.ts diff --git a/src/core/server/integration_tests/elasticsearch/jest.integration.config.js b/src/core/server/integration_tests/elasticsearch/jest.integration.config.js deleted file mode 100644 index 5706ce8b1bd57..0000000000000 --- a/src/core/server/integration_tests/elasticsearch/jest.integration.config.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - // TODO replace the line below with - // preset: '@kbn/test/jest_integration_node - // to do so, we must fix all integration tests first - // see https://github.com/elastic/kibana/pull/130255/ - preset: '@kbn/test/jest_integration', - rootDir: '../../../../..', - roots: ['/src/core/server/integration_tests/elasticsearch'], - // must override to match all test given there is no `integration_tests` subfolder - testMatch: ['**/*.test.{js,mjs,ts,tsx}'], -}; diff --git a/src/core/server/integration_tests/execution_context/jest.integration.config.js b/src/core/server/integration_tests/execution_context/jest.integration.config.js deleted file mode 100644 index fe2aa71b352aa..0000000000000 --- a/src/core/server/integration_tests/execution_context/jest.integration.config.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - // TODO replace the line below with - // preset: '@kbn/test/jest_integration_node - // to do so, we must fix all integration tests first - // see https://github.com/elastic/kibana/pull/130255/ - preset: '@kbn/test/jest_integration', - rootDir: '../../../../..', - roots: ['/src/core/server/integration_tests/execution_context'], - // must override to match all test given there is no `integration_tests` subfolder - testMatch: ['**/*.test.{js,mjs,ts,tsx}'], -}; diff --git a/src/core/server/integration_tests/http/jest.integration.config.js b/src/core/server/integration_tests/http/jest.integration.config.js deleted file mode 100644 index 79eeeb5100148..0000000000000 --- a/src/core/server/integration_tests/http/jest.integration.config.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - // TODO replace the line below with - // preset: '@kbn/test/jest_integration_node - // to do so, we must fix all integration tests first - // see https://github.com/elastic/kibana/pull/130255/ - preset: '@kbn/test/jest_integration', - rootDir: '../../../../..', - roots: ['/src/core/server/integration_tests/http'], - // must override to match all test given there is no `integration_tests` subfolder - testMatch: ['**/*.test.{js,mjs,ts,tsx}'], -}; diff --git a/src/core/server/integration_tests/http_resources/jest.integration.config.js b/src/core/server/integration_tests/http_resources/jest.integration.config.js deleted file mode 100644 index b8311e901a5c2..0000000000000 --- a/src/core/server/integration_tests/http_resources/jest.integration.config.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - // TODO replace the line below with - // preset: '@kbn/test/jest_integration_node - // to do so, we must fix all integration tests first - // see https://github.com/elastic/kibana/pull/130255/ - preset: '@kbn/test/jest_integration', - rootDir: '../../../../..', - roots: ['/src/core/server/integration_tests/http_resources'], - // must override to match all test given there is no `integration_tests` subfolder - testMatch: ['**/*.test.{js,mjs,ts,tsx}'], -}; diff --git a/src/core/server/integration_tests/logging/jest.integration.config.js b/src/core/server/integration_tests/logging/jest.integration.config.js deleted file mode 100644 index 49c88fa449976..0000000000000 --- a/src/core/server/integration_tests/logging/jest.integration.config.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - // TODO replace the line below with - // preset: '@kbn/test/jest_integration_node - // to do so, we must fix all integration tests first - // see https://github.com/elastic/kibana/pull/130255/ - preset: '@kbn/test/jest_integration', - rootDir: '../../../../..', - roots: ['/src/core/server/integration_tests/logging'], - // must override to match all test given there is no `integration_tests` subfolder - testMatch: ['**/*.test.{js,mjs,ts,tsx}'], -}; diff --git a/src/core/server/integration_tests/metrics/jest.integration.config.js b/src/core/server/integration_tests/metrics/jest.integration.config.js deleted file mode 100644 index f410afeaee181..0000000000000 --- a/src/core/server/integration_tests/metrics/jest.integration.config.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - // TODO replace the line below with - // preset: '@kbn/test/jest_integration_node - // to do so, we must fix all integration tests first - // see https://github.com/elastic/kibana/pull/130255/ - preset: '@kbn/test/jest_integration', - rootDir: '../../../../..', - roots: ['/src/core/server/integration_tests/metrics'], - // must override to match all test given there is no `integration_tests` subfolder - testMatch: ['**/*.test.{js,mjs,ts,tsx}'], -}; diff --git a/src/core/server/integration_tests/node/jest.integration.config.js b/src/core/server/integration_tests/node/jest.integration.config.js deleted file mode 100644 index 8382059917a6e..0000000000000 --- a/src/core/server/integration_tests/node/jest.integration.config.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - // TODO replace the line below with - // preset: '@kbn/test/jest_integration_node - // to do so, we must fix all integration tests first - // see https://github.com/elastic/kibana/pull/130255/ - preset: '@kbn/test/jest_integration', - rootDir: '../../../../..', - roots: ['/src/core/server/integration_tests/node'], - // must override to match all test given there is no `integration_tests` subfolder - testMatch: ['**/*.test.{js,mjs,ts,tsx}'], -}; diff --git a/src/core/server/integration_tests/root/jest.integration.config.js b/src/core/server/integration_tests/root/jest.integration.config.js deleted file mode 100644 index 1d2933512b215..0000000000000 --- a/src/core/server/integration_tests/root/jest.integration.config.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - // TODO replace the line below with - // preset: '@kbn/test/jest_integration_node - // to do so, we must fix all integration tests first - // see https://github.com/elastic/kibana/pull/130255/ - preset: '@kbn/test/jest_integration', - rootDir: '../../../../..', - roots: ['/src/core/server/integration_tests/root'], - // must override to match all test given there is no `integration_tests` subfolder - testMatch: ['**/*.test.{js,mjs,ts,tsx}'], -}; diff --git a/src/core/server/integration_tests/saved_objects/migrations/group2/jest.integration.config.js b/src/core/server/integration_tests/saved_objects/migrations/group2/jest.integration.config.js deleted file mode 100644 index da6e9eb66c639..0000000000000 --- a/src/core/server/integration_tests/saved_objects/migrations/group2/jest.integration.config.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - // TODO replace the line below with - // preset: '@kbn/test/jest_integration_node - // to do so, we must fix all integration tests first - // see https://github.com/elastic/kibana/pull/130255/ - preset: '@kbn/test/jest_integration', - rootDir: '../../../../../../..', - roots: ['/src/core/server/integration_tests/saved_objects/migrations/group2'], - // must override to match all test given there is no `integration_tests` subfolder - testMatch: ['**/*.test.{js,mjs,ts,tsx}'], -}; diff --git a/src/core/server/integration_tests/saved_objects/migrations/group5/jest.integration.config.js b/src/core/server/integration_tests/saved_objects/migrations/group5/jest.integration.config.js deleted file mode 100644 index ca1356038a831..0000000000000 --- a/src/core/server/integration_tests/saved_objects/migrations/group5/jest.integration.config.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - // TODO replace the line below with - // preset: '@kbn/test/jest_integration_node - // to do so, we must fix all integration tests first - // see https://github.com/elastic/kibana/pull/130255/ - preset: '@kbn/test/jest_integration', - rootDir: '../../../../../../..', - roots: ['/src/core/server/integration_tests/saved_objects/migrations/group5'], - // must override to match all test given there is no `integration_tests` subfolder - testMatch: ['**/*.test.{js,mjs,ts,tsx}'], -}; diff --git a/src/core/server/integration_tests/saved_objects/migrations/group6/jest.integration.config.js b/src/core/server/integration_tests/saved_objects/migrations/group6/jest.integration.config.js deleted file mode 100644 index 7b38ce81c284b..0000000000000 --- a/src/core/server/integration_tests/saved_objects/migrations/group6/jest.integration.config.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - // TODO replace the line below with - // preset: '@kbn/test/jest_integration_node - // to do so, we must fix all integration tests first - // see https://github.com/elastic/kibana/pull/130255/ - preset: '@kbn/test/jest_integration', - rootDir: '../../../../../../..', - roots: ['/src/core/server/integration_tests/saved_objects/migrations/group6'], - // must override to match all test given there is no `integration_tests` subfolder - testMatch: ['**/*.test.{js,mjs,ts,tsx}'], -}; diff --git a/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/jest.integration.config.js b/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/jest.integration.config.js deleted file mode 100644 index b316adc8b7f5f..0000000000000 --- a/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat/jest.integration.config.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - // TODO replace the line below with - // preset: '@kbn/test/jest_integration_node - // to do so, we must fix all integration tests first - // see https://github.com/elastic/kibana/pull/130255/ - preset: '@kbn/test/jest_integration', - rootDir: '../../../../../../..', - roots: ['/src/core/server/integration_tests/saved_objects/migrations/zdt_v2_compat'], - // must override to match all test given there is no `integration_tests` subfolder - testMatch: ['**/*.test.{js,mjs,ts,tsx}'], -}; diff --git a/src/core/server/integration_tests/saved_objects/serverless/migrations/jest.integration.config.js b/src/core/server/integration_tests/saved_objects/serverless/migrations/jest.integration.config.js deleted file mode 100644 index d79f0b6cfb679..0000000000000 --- a/src/core/server/integration_tests/saved_objects/serverless/migrations/jest.integration.config.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - // TODO replace the line below with - // preset: '@kbn/test/jest_integration_node - // to do so, we must fix all integration tests first - // see https://github.com/elastic/kibana/pull/130255/ - preset: '@kbn/test/jest_integration', - rootDir: '../../../../../../..', - roots: ['/src/core/server/integration_tests/saved_objects/serverless/migrations'], - // must override to match all test given there is no `integration_tests` subfolder - testMatch: ['**/*.test.{js,mjs,ts,tsx}'], -}; diff --git a/src/core/server/integration_tests/status/jest.integration.config.js b/src/core/server/integration_tests/status/jest.integration.config.js deleted file mode 100644 index 53768e581cbcc..0000000000000 --- a/src/core/server/integration_tests/status/jest.integration.config.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - // TODO replace the line below with - // preset: '@kbn/test/jest_integration_node - // to do so, we must fix all integration tests first - // see https://github.com/elastic/kibana/pull/130255/ - preset: '@kbn/test/jest_integration', - rootDir: '../../../../..', - roots: ['/src/core/server/integration_tests/status'], - // must override to match all test given there is no `integration_tests` subfolder - testMatch: ['**/*.test.{js,mjs,ts,tsx}'], -}; diff --git a/src/core/server/integration_tests/ui_settings/jest.integration.config.js b/src/core/server/integration_tests/ui_settings/jest.integration.config.js deleted file mode 100644 index 21458fcc9f144..0000000000000 --- a/src/core/server/integration_tests/ui_settings/jest.integration.config.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - // TODO replace the line below with - // preset: '@kbn/test/jest_integration_node - // to do so, we must fix all integration tests first - // see https://github.com/elastic/kibana/pull/130255/ - preset: '@kbn/test/jest_integration', - rootDir: '../../../../..', - roots: ['/src/core/server/integration_tests/ui_settings'], - // must override to match all test given there is no `integration_tests` subfolder - testMatch: ['**/*.test.{js,mjs,ts,tsx}'], -}; diff --git a/src/dev/build/tasks/package_json/find_used_dependencies.ts b/src/dev/build/tasks/package_json/find_used_dependencies.ts index 87540ecedf9cf..0581bcc0a9950 100644 --- a/src/dev/build/tasks/package_json/find_used_dependencies.ts +++ b/src/dev/build/tasks/package_json/find_used_dependencies.ts @@ -54,7 +54,7 @@ export async function findUsedDependencies( // main code entries 'src/cli*/dist.js', // core entry - 'src/core/server/index.js', + 'src/core/packages/core/server/index.js', // entries that are loaded into the server with dynamic require() calls 'src/plugins/vis_types/timelion/server/**/*.js', ], diff --git a/src/dev/precommit_hook/casing_check_config.js b/src/dev/precommit_hook/casing_check_config.js index 28897457278eb..cb92da802d6b9 100644 --- a/src/dev/precommit_hook/casing_check_config.js +++ b/src/dev/precommit_hook/casing_check_config.js @@ -163,18 +163,18 @@ export const REMOVE_EXTENSION = ['packages/kbn-plugin-generator/template/**/*.ej * @type {Array} */ export const TEMPORARILY_IGNORED_PATHS = [ - 'src/core/server/core_app/assets/favicons/android-chrome-192x192.png', - 'src/core/server/core_app/assets/favicons/android-chrome-256x256.png', - 'src/core/server/core_app/assets/favicons/android-chrome-512x512.png', - 'src/core/server/core_app/assets/favicons/apple-touch-icon.png', - 'src/core/server/core_app/assets/favicons/favicon-16x16.png', - 'src/core/server/core_app/assets/favicons/favicon-32x32.png', - 'src/core/server/core_app/assets/favicons/mstile-70x70.png', - 'src/core/server/core_app/assets/favicons/mstile-144x144.png', - 'src/core/server/core_app/assets/favicons/mstile-150x150.png', - 'src/core/server/core_app/assets/favicons/mstile-310x150.png', - 'src/core/server/core_app/assets/favicons/mstile-310x310.png', - 'src/core/server/core_app/assets/favicons/safari-pinned-tab.svg', + 'src/core/packages/core/server/core_app/assets/favicons/android-chrome-192x192.png', + 'src/core/packages/core/server/core_app/assets/favicons/android-chrome-256x256.png', + 'src/core/packages/core/server/core_app/assets/favicons/android-chrome-512x512.png', + 'src/core/packages/core/server/core_app/assets/favicons/apple-touch-icon.png', + 'src/core/packages/core/server/core_app/assets/favicons/favicon-16x16.png', + 'src/core/packages/core/server/core_app/assets/favicons/favicon-32x32.png', + 'src/core/packages/core/server/core_app/assets/favicons/mstile-70x70.png', + 'src/core/packages/core/server/core_app/assets/favicons/mstile-144x144.png', + 'src/core/packages/core/server/core_app/assets/favicons/mstile-150x150.png', + 'src/core/packages/core/server/core_app/assets/favicons/mstile-310x150.png', + 'src/core/packages/core/server/core_app/assets/favicons/mstile-310x310.png', + 'src/core/packages/core/server/core_app/assets/favicons/safari-pinned-tab.svg', 'test/functional/apps/management/exports/_import_objects-conflicts.json', 'x-pack/legacy/platform/plugins/shared/index_management/public/lib/editSettings.js', 'x-pack/legacy/platform/plugins/shared/license_management/public/store/reducers/licenseManagement.js', diff --git a/src/plugins/dashboard/public/dashboard_app/_dashboard_app.scss b/src/plugins/dashboard/public/dashboard_app/_dashboard_app.scss index c89337d29e720..ce8676d1f2e05 100644 --- a/src/plugins/dashboard/public/dashboard_app/_dashboard_app.scss +++ b/src/plugins/dashboard/public/dashboard_app/_dashboard_app.scss @@ -1,4 +1,4 @@ -@import 'src/core/public/mixins'; +@import 'src/core/packages/core/public/mixins'; .dshUnsavedListingItem { margin-top: $euiSizeM; diff --git a/src/plugins/kibana_usage_collection/server/collectors/config_usage/README.md b/src/plugins/kibana_usage_collection/server/collectors/config_usage/README.md index 954b12dba00f7..68a6b3fa9a7ee 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/config_usage/README.md +++ b/src/plugins/kibana_usage_collection/server/collectors/config_usage/README.md @@ -6,7 +6,7 @@ All non-default configs except booleans and numbers will be reported as `[redact ```ts import { schema, TypeOf } from '@kbn/config-schema'; -import { PluginConfigDescriptor } from 'src/core/server'; +import { PluginConfigDescriptor } from '@kbn/core/server'; export const configSchema = schema.object({ usageCounters: schema.object({ @@ -60,4 +60,4 @@ when setting an exact config or its parent path to `false`. } ``` -Note that arrays of objects will be reported as `[redacted]` and cannot be explicitly marked as safe. \ No newline at end of file +Note that arrays of objects will be reported as `[redacted]` and cannot be explicitly marked as safe. diff --git a/src/plugins/usage_collection/README.mdx b/src/plugins/usage_collection/README.mdx index d755c9615327e..718cca4142b5a 100644 --- a/src/plugins/usage_collection/README.mdx +++ b/src/plugins/usage_collection/README.mdx @@ -231,7 +231,7 @@ In many cases, plugins need to report the custom usage of a feature. In this cas ```ts // server/plugin.ts import { UsageCollectionSetup } from 'src/plugins/usage_collection/server'; - import { Plugin, CoreSetup, CoreStart } from 'src/core/server'; + import { Plugin, CoreSetup, CoreStart } from '@kbn/core/server'; class MyPlugin implements Plugin { public setup(core: CoreSetup, plugins: { usageCollection?: UsageCollectionSetup }) { @@ -408,7 +408,7 @@ for structuring your plugin code. ```ts // src/plugins/dashboard/server/plugin.ts -import { PluginInitializerContext, Plugin, CoreStart, CoreSetup } from '../../src/core/server'; +import { PluginInitializerContext, Plugin, CoreStart, CoreSetup } from '../../src/core/packages/core/server'; export class DashboardPlugin implements Plugin { private readonly logger: Logger; @@ -497,9 +497,9 @@ There are a few ways you can test that your usage collector is working properly. ## FAQ -1. **How should I design my data model?** +1. **How should I design my data model?** Keep it simple, and keep it to a model that Kibana will be able to understand. Bear in mind the number of keys you are reporting as it may result in fields mapping explosion. Flat arrays, such as arrays of strings are fine. -2. **If I accumulate an event counter in server memory, which my fetch method returns, won't it reset when the Kibana server restarts?** +2. **If I accumulate an event counter in server memory, which my fetch method returns, won't it reset when the Kibana server restarts?** Yes, but that is not a major concern. A visualization on such info might be a date histogram that gets events-per-second or something, which would be impacted by server restarts, so we'll have to offset the beginning of the time range when we detect that the latest metric is smaller than the earliest metric. That would be a pretty custom visualization, but perhaps future Kibana enhancements will be able to support that. # Routes registered by this plugin diff --git a/tsconfig.base.json b/tsconfig.base.json index c5bc388c4c96d..d6726232c1c47 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -230,8 +230,8 @@ "@kbn/controls-example-plugin/*": ["examples/controls_example/*"], "@kbn/controls-plugin": ["src/plugins/controls"], "@kbn/controls-plugin/*": ["src/plugins/controls/*"], - "@kbn/core": ["src/core"], - "@kbn/core/*": ["src/core/*"], + "@kbn/core": ["src/core/packages/core"], + "@kbn/core/*": ["src/core/packages/core/*"], "@kbn/core-analytics-browser": ["src/core/packages/analytics/browser"], "@kbn/core-analytics-browser/*": ["src/core/packages/analytics/browser/*"], "@kbn/core-analytics-browser-internal": ["src/core/packages/analytics/browser-internal"], diff --git a/x-pack/platform/plugins/private/painless_lab/public/styles/_index.scss b/x-pack/platform/plugins/private/painless_lab/public/styles/_index.scss index 69c5c9a0c344d..5e1570bcc3eb0 100644 --- a/x-pack/platform/plugins/private/painless_lab/public/styles/_index.scss +++ b/x-pack/platform/plugins/private/painless_lab/public/styles/_index.scss @@ -1,4 +1,4 @@ -@import '../../../../../../../src/core/public/mixins'; +@import '../../../../../../../src/core/packages/core/public/mixins'; /** * This is a very brittle way of preventing the editor and other content from disappearing diff --git a/x-pack/platform/plugins/shared/searchprofiler/public/application/_app.scss b/x-pack/platform/plugins/shared/searchprofiler/public/application/_app.scss index 22bea38e0ccff..0c84711246af2 100644 --- a/x-pack/platform/plugins/shared/searchprofiler/public/application/_app.scss +++ b/x-pack/platform/plugins/shared/searchprofiler/public/application/_app.scss @@ -1,4 +1,4 @@ -@import '../../../../../../../src/core/public/mixins'; +@import '../../../../../../../src/core/packages/core/public/mixins'; .prfDevTool__page { flex: 1 1 auto; diff --git a/x-pack/plugins/canvas/PLUGINS.mdx b/x-pack/plugins/canvas/PLUGINS.mdx index c0e0bc9c92f5a..28a2f16934c87 100644 --- a/x-pack/plugins/canvas/PLUGINS.mdx +++ b/x-pack/plugins/canvas/PLUGINS.mdx @@ -60,7 +60,7 @@ In your plugin folder, create a new folder `public` and an `index.ts` file withi This `index.ts` will need export a Kibana Plugin. You can use this as a starting point for your plugin. ```typescript -import { Plugin, CoreSetup, CoreStart } from '../../../src/core/public'; +import { Plugin, CoreSetup, CoreStart } from '@kbn/core/public'; import { CanvasSetup } from '../../../x-pack/plugins/canvas/public'; interface CanvasExampleSetupPlugins { @@ -171,7 +171,7 @@ Now, much like we made the client plugin, we'll make a server plugin. Start by making the `server` directory and an `index.ts` file with a shell for your server plugin: ```typescript -import { Plugin, CoreSetup, CoreStart } from '../../../src/core/server'; +import { Plugin, CoreSetup, CoreStart } from '../../../src/core/packages/core/server'; import { ExpressionsServerSetup } from '../../../src/plugins/expressions/server'; interface CanvasExamplePluginsSetup { diff --git a/x-pack/plugins/canvas/shareable_runtime/webpack.config.js b/x-pack/plugins/canvas/shareable_runtime/webpack.config.js index a2ed32fe77573..cafa5262e6b43 100644 --- a/x-pack/plugins/canvas/shareable_runtime/webpack.config.js +++ b/x-pack/plugins/canvas/shareable_runtime/webpack.config.js @@ -34,7 +34,10 @@ module.exports = { }, resolve: { alias: { - core_app_image_assets: path.resolve(KIBANA_ROOT, 'src/core/public/styles/core_app/images'), + core_app_image_assets: path.resolve( + KIBANA_ROOT, + 'src/core/packages/core/public/styles/core_app/images' + ), }, extensions: ['.js', '.json', '.ts', '.tsx', '.scss'], mainFields: ['browser', 'main'], @@ -162,7 +165,10 @@ module.exports = { additionalData(content, loaderContext) { return `@import ${stringifyRequest( loaderContext, - path.resolve(KIBANA_ROOT, 'src/core/public/styles/core_app/_globals_v8light.scss') + path.resolve( + KIBANA_ROOT, + 'src/core/packages/core/public/styles/core_app/_globals_v8light.scss' + ) )};\n${content}`; }, implementation: require('sass-embedded'), diff --git a/x-pack/plugins/maps/public/_main.scss b/x-pack/plugins/maps/public/_main.scss index 02298872d4f7d..e653a0af61521 100644 --- a/x-pack/plugins/maps/public/_main.scss +++ b/x-pack/plugins/maps/public/_main.scss @@ -1,4 +1,4 @@ -@import '../../../../src/core/public/mixins'; +@import '../../../../src/core/packages/core/public/mixins'; // sass-lint:disable no-ids #maps-plugin { diff --git a/yarn.lock b/yarn.lock index 1b7f2b20ddc2b..abd0b9fd2a332 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5169,7 +5169,7 @@ version "0.0.0" uid "" -"@kbn/core@link:src/core": +"@kbn/core@link:src/core/packages/core": version "0.0.0" uid "" From 2559aba76af4f7fa98013f82deca64220b61380b Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Fri, 20 Dec 2024 15:29:29 +0100 Subject: [PATCH 2/8] Remove unexisting paths --- src/dev/precommit_hook/casing_check_config.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/dev/precommit_hook/casing_check_config.js b/src/dev/precommit_hook/casing_check_config.js index cb92da802d6b9..a6bc47e29c500 100644 --- a/src/dev/precommit_hook/casing_check_config.js +++ b/src/dev/precommit_hook/casing_check_config.js @@ -163,21 +163,7 @@ export const REMOVE_EXTENSION = ['packages/kbn-plugin-generator/template/**/*.ej * @type {Array} */ export const TEMPORARILY_IGNORED_PATHS = [ - 'src/core/packages/core/server/core_app/assets/favicons/android-chrome-192x192.png', - 'src/core/packages/core/server/core_app/assets/favicons/android-chrome-256x256.png', - 'src/core/packages/core/server/core_app/assets/favicons/android-chrome-512x512.png', - 'src/core/packages/core/server/core_app/assets/favicons/apple-touch-icon.png', - 'src/core/packages/core/server/core_app/assets/favicons/favicon-16x16.png', - 'src/core/packages/core/server/core_app/assets/favicons/favicon-32x32.png', - 'src/core/packages/core/server/core_app/assets/favicons/mstile-70x70.png', - 'src/core/packages/core/server/core_app/assets/favicons/mstile-144x144.png', - 'src/core/packages/core/server/core_app/assets/favicons/mstile-150x150.png', - 'src/core/packages/core/server/core_app/assets/favicons/mstile-310x150.png', - 'src/core/packages/core/server/core_app/assets/favicons/mstile-310x310.png', - 'src/core/packages/core/server/core_app/assets/favicons/safari-pinned-tab.svg', 'test/functional/apps/management/exports/_import_objects-conflicts.json', - 'x-pack/legacy/platform/plugins/shared/index_management/public/lib/editSettings.js', - 'x-pack/legacy/platform/plugins/shared/license_management/public/store/reducers/licenseManagement.js', 'x-pack/plugins/monitoring/public/icons/health-gray.svg', 'x-pack/plugins/monitoring/public/icons/health-green.svg', 'x-pack/plugins/monitoring/public/icons/health-red.svg', From d493c5ee9b736bf135e3abceb91cac6d5c9533b3 Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Fri, 20 Dec 2024 15:29:48 +0100 Subject: [PATCH 3/8] Add `test-helpers` as dev code in ESLint exceptions --- .eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.js b/.eslintrc.js index 3224c3f249f04..0444351c51632 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -160,6 +160,7 @@ const DEV_DIRECTORIES = [ 'test_utils', 'test_utilities', 'test_helpers', + 'test-helpers', 'tests_client_integration', 'tsd_tests', ]; From 8b940fa3b2bba7c742cf37835c7f8f217f84f03b Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Fri, 20 Dec 2024 15:57:43 +0100 Subject: [PATCH 4/8] Update outdated scss files --- .../discover/public/application/context/context_app.scss | 2 +- .../application/main/components/layout/discover_layout.scss | 2 +- src/plugins/links/public/_mixins.scss | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/discover/public/application/context/context_app.scss b/src/plugins/discover/public/application/context/context_app.scss index 150fc7e70e52e..2ed08cd826534 100644 --- a/src/plugins/discover/public/application/context/context_app.scss +++ b/src/plugins/discover/public/application/context/context_app.scss @@ -1,4 +1,4 @@ -@import '../../../../../core/public/mixins'; +@import '../../../../../../src/core/packages/core/public/mixins'; .dscDocsPage { @include kibanaFullBodyHeight(54px); // action bar height diff --git a/src/plugins/discover/public/application/main/components/layout/discover_layout.scss b/src/plugins/discover/public/application/main/components/layout/discover_layout.scss index cf22e34a0c597..9ce6f2b3f7496 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_layout.scss +++ b/src/plugins/discover/public/application/main/components/layout/discover_layout.scss @@ -1,4 +1,4 @@ -@import '../../../../../../../core/public/mixins'; +@import '../../../../../../../../src/core/packages/core/public/mixins'; discover-app { flex-grow: 1; diff --git a/src/plugins/links/public/_mixins.scss b/src/plugins/links/public/_mixins.scss index b41c0d7f1ab62..a98d42862fa77 100644 --- a/src/plugins/links/public/_mixins.scss +++ b/src/plugins/links/public/_mixins.scss @@ -1,4 +1,4 @@ -@import '../../../core/public/mixins'; +@import '../../../../src/core/packages/core/public/mixins'; @keyframes euiFlyoutOpenAnimation { 0% { @@ -35,4 +35,4 @@ border-left: $euiBorderThin; background: $euiColorEmptyShade; min-width: ($euiSizeXL * 13) + $euiSizeS; // 424px -} \ No newline at end of file +} From c0cf284fda61c377419576ed100c0253e265c051 Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Fri, 20 Dec 2024 19:52:26 +0100 Subject: [PATCH 5/8] Fix @kbn/core location in optimizer --- packages/kbn-optimizer/src/optimizer/optimizer_config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kbn-optimizer/src/optimizer/optimizer_config.ts b/packages/kbn-optimizer/src/optimizer/optimizer_config.ts index fbeaf8b5014f6..378db32763d92 100644 --- a/packages/kbn-optimizer/src/optimizer/optimizer_config.ts +++ b/packages/kbn-optimizer/src/optimizer/optimizer_config.ts @@ -209,8 +209,8 @@ export class OptimizerConfig { type: 'entry', id: 'core', sourceRoot: options.repoRoot, - contextDir: Path.resolve(options.repoRoot, 'src/core'), - outputDir: Path.resolve(options.outputRoot, 'src/core/target/public'), + contextDir: Path.resolve(options.repoRoot, 'src/core/packages/core'), + outputDir: Path.resolve(options.outputRoot, 'src/core/packages/core/target/public'), pageLoadAssetSizeLimit: limits.pageLoadAssetSize?.core, remoteInfo: { pkgId: '@kbn/core', From bb393a9c9d61ea36f4b25cd184a1d88a6a34e3fb Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Fri, 20 Dec 2024 21:40:15 +0100 Subject: [PATCH 6/8] Now that's a brittle test! --- .../core/server/integration_tests/elasticsearch/errors.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/packages/core/server/integration_tests/elasticsearch/errors.test.ts b/src/core/packages/core/server/integration_tests/elasticsearch/errors.test.ts index 6383d6e8f21bc..c50f72739213b 100644 --- a/src/core/packages/core/server/integration_tests/elasticsearch/errors.test.ts +++ b/src/core/packages/core/server/integration_tests/elasticsearch/errors.test.ts @@ -102,7 +102,7 @@ describe('elasticsearch clients errors', () => { ' at KibanaTransport._request (`); // it contains the offending line for troubleshooting. expect(str).toContain( - 'src/core/packages/core/server/integration_tests/elasticsearch/errors.test.ts:80:7' + 'src/core/packages/core/server/integration_tests/elasticsearch/errors.test.ts:82:7' ); } }); From 5b312e97ec653617406c3d5fb37c20d7cdf5c930 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Mon, 23 Dec 2024 16:59:07 +0000 Subject: [PATCH 7/8] [CI] Auto-commit changed files from 'node scripts/capture_oas_snapshot --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update' --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bf9571aa6217b..27a45eb42a550 100644 --- a/package.json +++ b/package.json @@ -1873,4 +1873,4 @@ "zod-to-json-schema": "^3.23.0" }, "packageManager": "yarn@1.22.21" -} +} \ No newline at end of file From eacfd01c5e2c7314f4798c9f8cfcdf65e39d87b6 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Mon, 23 Dec 2024 17:07:56 +0000 Subject: [PATCH 8/8] [CI] Auto-commit changed files from 'node scripts/generate codeowners' --- .github/CODEOWNERS | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2366542ac6e17..e7170dc43b1f4 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -546,7 +546,6 @@ packages/shared-ux/router/types @elastic/appex-sharedux packages/shared-ux/storybook/config @elastic/appex-sharedux packages/shared-ux/storybook/mock @elastic/appex-sharedux packages/shared-ux/table_persist @elastic/appex-sharedux -src/core @elastic/kibana-core src/core/packages/analytics/browser @elastic/kibana-core src/core/packages/analytics/browser-internal @elastic/kibana-core src/core/packages/analytics/server @elastic/kibana-core