-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fleet] adding object_type for fields under a group #162041
Conversation
Pinging @elastic/fleet (Team:Fleet) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM 🚀
💚 Build Succeeded
Metrics [docs]
To update your PR or re-run it, just comment with: |
## Summary Relates elastic#155004 Fixes a limitation that wildcard fields under a group field were not changed to `type:object` with `object_type`. This was discovered during testing with prometheus package where a field was changed to `type:double` and it was not converted to object type: https://github.com/elastic/integrations/blob/c17d59c8875196a31184d98f773c2fbb939fd866/packages/prometheus/data_stream/collector/fields/fields.yml#L9 To verify, upload the package [prometheus-1.5.2.zip](https://github.com/elastic/kibana/files/12069089/prometheus-1.5.2.zip) and verify that the resulting `collector` and `remote_write` `@package` component template has `prometheus.metrics.*` in `dynamic_templates` ``` curl -XPOST -H 'content-type: application/zip' -H 'kbn-xsrf: true' http://localhost:5601/julia/api/fleet/epm/packages -u elastic:changeme --data-binary @prometheus-1.5.2.zip ``` <img width="499" alt="image" src="https://github.com/elastic/kibana/assets/90178898/337295d8-9e3c-40c8-8b13-bda6229e7272"> ### 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 (cherry picked from commit 13b8864)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…162056) # Backport This will backport the following commits from `main` to `8.9`: - [[Fleet] adding object_type for fields under a group (#162041)](#162041) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Julia Bardi","email":"90178898+juliaElastic@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-07-17T14:18:32Z","message":"[Fleet] adding object_type for fields under a group (#162041)\n\n## Summary\r\n\r\nRelates https://github.com/elastic/kibana/issues/155004\r\n\r\nFixes a limitation that wildcard fields under a group field were not\r\nchanged to `type:object` with `object_type`.\r\n\r\nThis was discovered during testing with prometheus package where a field\r\nwas changed to `type:double` and it was not converted to object type:\r\nhttps://github.com/elastic/integrations/blob/c17d59c8875196a31184d98f773c2fbb939fd866/packages/prometheus/data_stream/collector/fields/fields.yml#L9\r\n\r\nTo verify, upload the package\r\n[prometheus-1.5.2.zip](https://github.com/elastic/kibana/files/12069089/prometheus-1.5.2.zip)\r\nand verify that the resulting `collector` and `remote_write` `@package`\r\ncomponent template has `prometheus.metrics.*` in `dynamic_templates`\r\n```\r\ncurl -XPOST -H 'content-type: application/zip' -H 'kbn-xsrf: true' http://localhost:5601/julia/api/fleet/epm/packages -u elastic:changeme --data-binary @prometheus-1.5.2.zip\r\n```\r\n<img width=\"499\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/337295d8-9e3c-40c8-8b13-bda6229e7272\">\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"13b8864c481888060fd1aa01f567d0b10702ce14","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:prev-minor","v8.10.0"],"number":162041,"url":"https://github.com/elastic/kibana/pull/162041","mergeCommit":{"message":"[Fleet] adding object_type for fields under a group (#162041)\n\n## Summary\r\n\r\nRelates https://github.com/elastic/kibana/issues/155004\r\n\r\nFixes a limitation that wildcard fields under a group field were not\r\nchanged to `type:object` with `object_type`.\r\n\r\nThis was discovered during testing with prometheus package where a field\r\nwas changed to `type:double` and it was not converted to object type:\r\nhttps://github.com/elastic/integrations/blob/c17d59c8875196a31184d98f773c2fbb939fd866/packages/prometheus/data_stream/collector/fields/fields.yml#L9\r\n\r\nTo verify, upload the package\r\n[prometheus-1.5.2.zip](https://github.com/elastic/kibana/files/12069089/prometheus-1.5.2.zip)\r\nand verify that the resulting `collector` and `remote_write` `@package`\r\ncomponent template has `prometheus.metrics.*` in `dynamic_templates`\r\n```\r\ncurl -XPOST -H 'content-type: application/zip' -H 'kbn-xsrf: true' http://localhost:5601/julia/api/fleet/epm/packages -u elastic:changeme --data-binary @prometheus-1.5.2.zip\r\n```\r\n<img width=\"499\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/337295d8-9e3c-40c8-8b13-bda6229e7272\">\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"13b8864c481888060fd1aa01f567d0b10702ce14"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/162041","number":162041,"mergeCommit":{"message":"[Fleet] adding object_type for fields under a group (#162041)\n\n## Summary\r\n\r\nRelates https://github.com/elastic/kibana/issues/155004\r\n\r\nFixes a limitation that wildcard fields under a group field were not\r\nchanged to `type:object` with `object_type`.\r\n\r\nThis was discovered during testing with prometheus package where a field\r\nwas changed to `type:double` and it was not converted to object type:\r\nhttps://github.com/elastic/integrations/blob/c17d59c8875196a31184d98f773c2fbb939fd866/packages/prometheus/data_stream/collector/fields/fields.yml#L9\r\n\r\nTo verify, upload the package\r\n[prometheus-1.5.2.zip](https://github.com/elastic/kibana/files/12069089/prometheus-1.5.2.zip)\r\nand verify that the resulting `collector` and `remote_write` `@package`\r\ncomponent template has `prometheus.metrics.*` in `dynamic_templates`\r\n```\r\ncurl -XPOST -H 'content-type: application/zip' -H 'kbn-xsrf: true' http://localhost:5601/julia/api/fleet/epm/packages -u elastic:changeme --data-binary @prometheus-1.5.2.zip\r\n```\r\n<img width=\"499\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/337295d8-9e3c-40c8-8b13-bda6229e7272\">\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"13b8864c481888060fd1aa01f567d0b10702ce14"}}]}] BACKPORT--> Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
Summary
Relates #155004
Fixes a limitation that wildcard fields under a group field were not changed to
type:object
withobject_type
.This was discovered during testing with prometheus package where a field was changed to
type:double
and it was not converted to object type: https://github.com/elastic/integrations/blob/c17d59c8875196a31184d98f773c2fbb939fd866/packages/prometheus/data_stream/collector/fields/fields.yml#L9To verify, upload the package prometheus-1.5.2.zip and verify that the resulting
collector
andremote_write
@package
component template hasprometheus.metrics.*
indynamic_templates
Checklist