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

datadog_checks_base: Fix obfuscate_sql_with_metadata query being None #11094

Merged
merged 2 commits into from
Jan 11, 2022

Conversation

alexbarksdale
Copy link
Member

@alexbarksdale alexbarksdale commented Jan 11, 2022

What does this PR do?

Fixes a bug where the SQL obfuscator attempts to obfuscate a None value.

Motivation

Came across a scenario where this could happen.
Log: Failed to obfuscate query 'None': argument 1 must be str, not None

Additional Notes

This will require a new base version and three follow up PRs to update the following integrations:

  • MySQL
  • SQL Server
  • Postgres

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@alexbarksdale alexbarksdale changed the title database_checks_base: Fix obfuscate_sql_with_metadata query being None datadog_checks_base: Fix obfuscate_sql_with_metadata query being None Jan 11, 2022
@alexbarksdale alexbarksdale added the category/bugfix For use during Agent Release period label Jan 11, 2022
@alexbarksdale alexbarksdale merged commit 10b0cde into master Jan 11, 2022
@alexbarksdale alexbarksdale deleted the alex.barksdale/fix-query-can-be-none branch January 11, 2022 20:08
yzhan289 pushed a commit that referenced this pull request Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category/bugfix For use during Agent Release period integration/datadog_checks_base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants