-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
datadog_checks_base: Fix obfuscate_sql_with_metadata wrapper not handling json.loads() edge case #11038
datadog_checks_base: Fix obfuscate_sql_with_metadata wrapper not handling json.loads() edge case #11038
Conversation
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
Not sure why agent-core has to review this PR.
Code change LGTM except for a couple remarks, please make sure to get a review from integrations-core team.
What does this PR do?
We found that the json decoder (
json.loads()
) does not throw an error for a string integer (e.g. '1'). This causes unwanted behavior and this PR aims to fix that.How?
Because we know we only want to load json when a particular option is enabled, we use that to determine the action rather than always decoding.
Motivation
Additional Notes
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached