-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat: adding CLEAN_KEYS support #869
Conversation
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.
Can you please document the impact of this change on the exiting TAs?
@@ -57,6 +57,14 @@ def props(self) -> Optional[Dict]: | |||
self._props = self._conf_parser.item_dict() | |||
return self._props if self._props else None | |||
|
|||
def update_field_names(self, field_list) -> List: |
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.
Can you please type field_list
here and specify the return type as well?
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.
Done
""" | ||
update field names to remove all the non-alphanumeric chars and replace them with _ | ||
""" | ||
for index in range(len(field_list)): |
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.
Can we do for field in field_list
?
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.
Done
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.
Minor changes needed in TC descritption
@@ -22,6 +22,23 @@ SOURCE_KEY = event_id | |||
DELIMS = "=" | |||
FIELDS = server_contact_mode, dest | |||
|
|||
# Component tested: REPORT, DELIM-FIELDS-SOURCE_KEY | |||
# Scenario:# Similar to the above scenario | |||
## ## server-contact-mode should be searched as server_contact_mode as CLEAN_KEYS = true by default |
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.
CLEAN_KEYS is set to false here, so how should this field be looked for? Just description requires small adjustment.
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.
done
🎉 This issue has been resolved in version 5.3.0-beta.10 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 5.4.0-beta.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Added support for CLEAN_KEYS in Transforms.conf.
Added respective e2e test case for the same
Impact on Addons:
Now if Addons have have field names in transforms report which have non-alphanumeric chars then those chars would be first converted to _ and then tests would be generated as by default in splunk CLEAN_KEYS is set to true, so splunk also does the same thing.
Moreover if any report stanza has explicitly set CLEAN_KEYS=false then for those reports field conversion would not happen and tests would be generated as it is.