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

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

Merged
merged 5 commits into from
Jul 26, 2021

Conversation

ian28223
Copy link
Contributor

@ian28223 ian28223 commented Jul 21, 2021

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 ian28223 mentioned this pull request Jul 25, 2021
4 tasks
@ofek ofek changed the title Use display_default instead of default when validating models Use display_default as a fallback for default when validating config models Jul 25, 2021
Co-authored-by: Ofek Lev <ofekmeister@gmail.com>
@ofek ofek merged commit 5b90b65 into master Jul 26, 2021
@ofek ofek deleted the ian.bucad/ddev_models_default branch July 26, 2021 14:34
@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