-
Notifications
You must be signed in to change notification settings - Fork 431
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
lowercasing component names for es template #1323
lowercasing component names for es template #1323
Conversation
typo in capitalization, fixed
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.
Looks good
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.
Thanks for looking into this one, @kgeller!
A couple of items I wanted to note.
Testing
We don't have much testing coverage of the component and composable template portions of the Elasticsearch generator, but I think we should add test coverage for this case as we're modifying it a bit; at least some testing coverage for the uppercasing-to-lowercasing handling.
The existing tests are in scripts/tests/test_es_template.py
for the ES template generator. The other test cases should be helpful examples, and I think since the casing change is pretty targeted, the nesting data structure can be pretty small. Something like:
ecs_nested = {
"Acme": {
"name": "Acme",
}
}
Example shell script
As I was reviewing this change, I realized this example shell script for the composable/component index templates would also use the uppercase filename (e.g. Acme.json
).
Maybe we can also add lowercasing of the file names in that example shellcode snippet with a command such as tr
or awk
?
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.
Thanks! Added test looks good 👍
Correcting fieldset name capitalization when generating the generated es template