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

[windows] - Cleanup fields.yml files #8099

Merged
merged 9 commits into from
Oct 5, 2023

Conversation

andrewkroh
Copy link
Member

@andrewkroh andrewkroh commented Oct 4, 2023

Proposed commit message

This cleans up the field definitions for the package.

Fix typo in 'external' field attribute.

Remove unnecessary attributes like required or level.

Use external: ecs for any field that exists in ECS.

Remove description from field groups. The description does not get used by anything (not in docs, mappings, fleet).

Remove duplicate field declarations.

Replace dotted YAML key kibana.version in manifest.yml.

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.

[git-generate]
cd packages/windows
elastic-package format
[git-generate]
perl -p -i -e 's/exernal:/external:/g' packages/windows/**/fields/*.yml
[git-generate]
go run github.com/andrewkroh/fydler@e90f903 -fix -a unknownattribute packages/windows/**/fields/*.yml
cd packages/windows
elastic-package format
[git-generate]
go run github.com/andrewkroh/fydler@e90f903 -fix -a useecs packages/windows/**/fields/*.yml
cd packages/windows
elastic-package format
The description does not get used by anything (not in docs, mappings, fleet).

[git-generate]
go run github.com/andrewkroh/fydler@e90f903 -fix -a invalidattribute packages/windows/**/fields/*.yml
cd packages/windows
elastic-package format
packages/windows/data_stream/applocker_exe_and_dll/fields/agent.yml:49:7 host.name is declared 2 times (duplicate)
  packages/windows/data_stream/applocker_exe_and_dll/fields/ecs.yml:55:3 additional definition (duplicate)
packages/windows/data_stream/applocker_msi_and_script/fields/agent.yml:49:7 host.name is declared 2 times (duplicate)
  packages/windows/data_stream/applocker_msi_and_script/fields/ecs.yml:55:3 additional definition (duplicate)
packages/windows/data_stream/applocker_packaged_app_deployment/fields/agent.yml:49:7 host.name is declared 2 times (duplicate)
  packages/windows/data_stream/applocker_packaged_app_deployment/fields/ecs.yml:57:3 additional definition (duplicate)
packages/windows/data_stream/applocker_packaged_app_execution/fields/agent.yml:49:7 host.name is declared 2 times (duplicate)
  packages/windows/data_stream/applocker_packaged_app_execution/fields/ecs.yml:57:3 additional definition (duplicate)
packages/windows/data_stream/forwarded/fields/agent.yml:49:7 host.name is declared 2 times (duplicate)
  packages/windows/data_stream/forwarded/fields/ecs.yml:119:3 additional definition (duplicate)
packages/windows/data_stream/powershell/fields/agent.yml:49:7 host.name is declared 2 times (duplicate)
  packages/windows/data_stream/powershell/fields/ecs.yml:39:3 additional definition (duplicate)
packages/windows/data_stream/powershell_operational/fields/agent.yml:49:7 host.name is declared 2 times (duplicate)
  packages/windows/data_stream/powershell_operational/fields/ecs.yml:39:3 additional definition (duplicate)
packages/windows/data_stream/sysmon_operational/fields/agent.yml:49:7 host.name is declared 2 times (duplicate)
  packages/windows/data_stream/sysmon_operational/fields/ecs.yml:115:3 additional definition (duplicate)
@andrewkroh andrewkroh force-pushed the windows/feature/fields-cleanup branch from 6db8124 to f5a4ffb Compare October 4, 2023 22:58
@elasticmachine
Copy link

elasticmachine commented Oct 4, 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-10-05T00:23:47.529+0000

  • Duration: 20 min 20 sec

Test stats 🧪

Test Results
Failed 0
Passed 150
Skipped 0
Total 150

🤖 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 Oct 4, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (8/8) 💚
Files 91.667% (11/12) 👎 -4.675
Classes 91.667% (11/12) 👎 -4.675
Methods 85.156% (109/128) 👎 -1.543
Lines 91.55% (5840/6379) 👎 -0.505
Conditionals 100.0% (0/0) 💚

@andrewkroh
Copy link
Member Author

andrewkroh commented Oct 5, 2023

Regarding the validation failure, I logged an issue at elastic/elastic-package#1488. I will remove the changes to the invocation_details array.

[git-generate]
cd packages/windows
elastic-package build
[git-generate]
elastic-package changelog add --link elastic#8099 --next minor --type enhancement --description 'Modified the field definitions to reference ECS where possible and remove invalid field attributes.'
@andrewkroh andrewkroh force-pushed the windows/feature/fields-cleanup branch from f5a4ffb to c6429e3 Compare October 5, 2023 00:23
@andrewkroh andrewkroh marked this pull request as ready for review October 5, 2023 02:08
@andrewkroh andrewkroh requested review from a team as code owners October 5, 2023 02:08
@elasticmachine
Copy link

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

@pierrehilbert pierrehilbert added the Team:Elastic-Agent Label for the Agent team label Oct 5, 2023
@elasticmachine
Copy link

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@andrewkroh andrewkroh merged commit cd7862a into elastic:main Oct 5, 2023
1 check passed
@elasticmachine
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integration:windows Windows Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants