Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fleet] update component templates with deprecated setting (elastic#2…
…10200) ## Summary Closes elastic#209087 Added logic to Fleet setup that queries component templates with the deprecated `_source.mode` setting. Querying only `metrics-*` prefixed component templates, I think only those use `_source.mode` setting. Steps to verify: - Upload [apm-8.8.0.zip](https://github.com/user-attachments/files/18708082/apm-8.8.0.zip) package to http://localhost:5601/app/integrations/create/upload - Deprecation warnings should appear in Upgrade assistant http://localhost:5601/app/management/stack/upgrade_assistant/es_deprecations - Visit Fleet UI or run setup API to let setup logic run - Verify that deprecations disappeared - Verify that the component templates are updated <img width="1190" alt="image" src="https://github.com/user-attachments/assets/20c4265f-461e-46d1-b075-6ba1111ef9d2" /> <img width="2533" alt="image" src="https://github.com/user-attachments/assets/6961c885-7a91-4d07-90b9-c01a8c133cc9" /> <img width="901" alt="image" src="https://github.com/user-attachments/assets/6b712f94-fd9c-4038-8dc4-cfcf7650cca7" /> ``` [2025-02-07T15:39:42.396+01:00][DEBUG][plugins.fleet] Update deprecated _source.mode in component templates [2025-02-07T15:39:42.401+01:00][DEBUG][plugins.fleet] Updating component templates with deprecated _source.mode config: metrics-apm.app@package,metrics-apm.internal@package,metrics-apm.service_transaction.1m@package,metrics-apm.service_destination.60m@package,metrics-apm.transaction.1m@package,metrics-apm.service_summary.10m@package,metrics-apm.transaction.10m@package,metrics-apm.service_transaction.10m@package,metrics-apm.transaction.60m@package,metrics-apm.service_destination.10m@package,metrics-apm.service_summary.1m@package,metrics-apm.service_destination.1m@package,metrics-apm.service_transaction.60m@package,metrics-apm.service_summary.60m@package GET _component_template/metrics-* { "component_templates": [ { "name": "metrics-apm.app@package", "component_template": { "template": { "settings": { "index": { "lifecycle": { "name": "metrics-apm.app_metrics-default_policy" }, "default_pipeline": "metrics-apm.app-8.8.0", "mapping": { "total_fields": { "limit": "1000" }, "source": { "mode": "synthetic" } } } }, "mappings": { "dynamic": true, "_source": {}, "dynamic_templates": [ { "histogram": { "mapping": { "type": "histogram" } } }, ``` ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
- Loading branch information