Skip to content
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

[hashicorp_vault] Fix fields.yml definition for dynamic mapping #7978

Conversation

andrewkroh
Copy link
Member

@andrewkroh andrewkroh commented Sep 26, 2023

What does this PR do?

Earlier versions of Fleet did not handle dynamic mappings correctly so hashicorp_vault explicitly specified the mappings through the manifest. This is no longer needed for 8.x. Fixes #7811

Also refer to the ECS definition for all fields that exist in ECS.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Related issues

Mappings

This is how the mappings changed.

2d1
<   "dynamic": true,
5c4
<       "all_values": {
---
>       "hashicorp_vault.metrics.*.value": {
8a8
>         "match_mapping_type": "*",
13c13
<       "all_counters": {
---
>       "hashicorp_vault.metrics.*.counter": {
16a17
>         "match_mapping_type": "*",
21c22
<       "all_rates": {
---
>       "hashicorp_vault.metrics.*.rate": {
24a26
>         "match_mapping_type": "*",
29c31
<       "all_histograms": {
---
>       "hashicorp_vault.metrics.*.histogram": {
32a35
>         "match_mapping_type": "*",
79,94d81
<         }
<       }
<     },
<     "hashicorp_vault": {
<       "properties": {
<         "metrics": {
<           "properties": {
<             "*": {
<               "properties": {
<                 "*": {
<                   "dynamic": true,
<                   "type": "object"
<                 }
<               }
<             }
<           }

Earlier versions of Fleet did not handle dynamic mappings correctly
so hashicorp_vault explicitly specified the mappings through the manifest.
This is no longer needed for 8.x.

Fixes elastic#7811
@andrewkroh andrewkroh force-pushed the bugfix/hashicorp_vault/fix-dynamic-mappings-metrics branch from 774d40e to 03a266a Compare September 26, 2023 03:30
@andrewkroh andrewkroh marked this pull request as ready for review September 26, 2023 03:31
@andrewkroh andrewkroh requested a review from a team as a code owner September 26, 2023 03:31
@elasticmachine
Copy link

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@elasticmachine
Copy link

elasticmachine commented Sep 26, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-09-27T14:37:45.617+0000

  • Duration: 20 min 56 sec

Test stats 🧪

Test Results
Failed 0
Passed 18
Skipped 0
Total 18

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Sep 26, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (2/2) 💚
Files 100.0% (3/3) 💚 13.636
Classes 100.0% (3/3) 💚 13.636
Methods 92.593% (25/27) 👍 9.259
Lines 87.678% (185/211) 👍 2.657
Conditionals 100.0% (0/0) 💚

@andrewkroh andrewkroh changed the title hashicorp_vault - Fix fields.yml definition for dynamic mapping [hashicorp_vault] Fix fields.yml definition for dynamic mapping Sep 26, 2023
@andrewkroh andrewkroh merged commit ac65b43 into elastic:main Sep 28, 2023
1 check passed
@elasticmachine
Copy link

Package hashicorp_vault - 1.16.1 containing this change is available at https://epr.elastic.co/search?package=hashicorp_vault

1 similar comment
@elasticmachine
Copy link

Package hashicorp_vault - 1.16.1 containing this change is available at https://epr.elastic.co/search?package=hashicorp_vault

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[hashicorp_vault] Convert dynamic mappings to fields.yml
3 participants