Skip to content

Add attributes types in SavedObjects migration #64748

@pgayvallet

Description

@pgayvallet

In #63943 we added generic types for SavedObjectMigrationFn input and output doc attributes. As these attributes were previously typed as any, some explicit <any, any> were added in existing plugins migrations as a temporary measure.

Now that SavedObjectMigrationFn allows type checking, the existing migrations should leverage it to ensure that migrated docs are correctly typed.

The initial PR introduced<any, any> changes in the following files:

@elastic/kibana-app

  • src/plugins/vis_type_timeseries/server/saved_objects/tsvb_telemetry.ts
  • x-pack/plugins/graph/server/saved_objects/migrations.ts
  • x-pack/plugins/lens/server/migrations.ts

@elastic/kibana-presentation

  • src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts
  • src/plugins/dashboard/server/saved_objects/migrate_match_all_query.ts

@elastic/kibana-app-arch

  • src/plugins/visualizations/server/saved_objects/visualization_migrations.ts
  • src/plugins/data/server/saved_objects/index_pattern_migrations.ts
  • src/plugins/data/server/saved_objects/search_migrations.ts

@elastic/kibana-security

  • x-pack/plugins/spaces/server/saved_objects/migrations/migrate_6x.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature:Saved ObjectsTeam:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//choreimpact:lowAddressing this issue will have a low level of impact on the quality/strength of our product.loe:smallSmall Level of Efforttechnical debtImprovement of the software architecture and operational architecture

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions