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

Properly validate only_custom_queries #11992

Merged
merged 2 commits into from
May 11, 2022
Merged

Conversation

sarah-witt
Copy link
Contributor

What does this PR do?

Properly validate metric groups and only_custom_queries

Motivation

previously when only_custom_queries was enabled, it errored:

__root__
  'dict' object is not callable
      Traceback (most recent call last):
        File "/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py", line 1095, in run
          initialization()
        File "/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py", line 489, in load_configuration_models
          instance_config = self.load_configuration_model(package_path, 'InstanceConfig', raw_instance_config)
        File "/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py", line 533, in load_configuration_model
          raise_from(ConfigurationError('\n'.join(message_lines)), None)
        File "<string>", line 3, in raise_from
      datadog_checks.base.errors.ConfigurationError: Detected 1 error while loading configuration model `InstanceConfig`:
      __root__
        'dict' object is not callable

Additional Notes

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

@codecov
Copy link

codecov bot commented May 11, 2022

Codecov Report

Merging #11992 (4ae1973) into master (9dfa1e7) will not change coverage.
The diff coverage is n/a.

Flag Coverage Δ
snowflake 94.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@sarah-witt sarah-witt marked this pull request as ready for review May 11, 2022 19:35
@sarah-witt sarah-witt requested a review from a team as a code owner May 11, 2022 19:35
@sarah-witt sarah-witt merged commit b92bf26 into master May 11, 2022
@sarah-witt sarah-witt deleted the sarah/snowflake-fix-config-bug branch May 11, 2022 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants