Skip to content

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

Merged
andrewkroh merged 9 commits intoelastic:mainfrom
andrewkroh:bugfix/hashicorp_vault/fix-dynamic-mappings-metrics
Sep 28, 2023
Merged

[hashicorp_vault] Fix fields.yml definition for dynamic mapping#7978
andrewkroh merged 9 commits intoelastic:mainfrom
andrewkroh:bugfix/hashicorp_vault/fix-dynamic-mappings-metrics

Conversation

@andrewkroh
Copy link
Copy Markdown
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 #7811
@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
Copy Markdown

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

@elasticmachine
Copy link
Copy Markdown

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
Copy Markdown

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
@elasticmachine
Copy link
Copy Markdown

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
Copy Markdown

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