Skip to content

Use display_default as a fallback for default when validating config models#9739

Merged
ofek merged 5 commits into
masterfrom
ian.bucad/ddev_models_default
Jul 26, 2021
Merged

Use display_default as a fallback for default when validating config models#9739
ofek merged 5 commits into
masterfrom
ian.bucad/ddev_models_default

Conversation

@ian28223

@ian28223 ian28223 commented Jul 21, 2021

Copy link
Copy Markdown
Contributor

What does this PR do?

Use display_default instead of default when validating models.

Example

In kafka_consumer check, default for the optional kafka_client_api_version is None but an example value is shown as 2.3.0. However, the generated defaults.py currently takes the value from default > then example > then falls back to NO_DEFAULT aka <KAFKA_CLIENT_API_VERSION>

Example 2: https://github.com/DataDog/integrations-core/pull/9699/files#r672222987

Motivation

#8593

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

@ian28223

Copy link
Copy Markdown
Contributor Author

@ian28223 ian28223 mentioned this pull request Jul 25, 2021
4 tasks
Comment thread datadog_checks_dev/tests/tooling/configuration/consumers/model/test_defaults.py Outdated
Comment thread datadog_checks_dev/tests/tooling/configuration/consumers/model/test_defaults.py Outdated
@ofek ofek mentioned this pull request Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment