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

Add a validator for the manifest version #12788

Merged
merged 2 commits into from
Aug 25, 2022

Conversation

FlorentClarret
Copy link
Member

@FlorentClarret FlorentClarret commented Aug 22, 2022

What does this PR do?

Stop running the v2 validators for manifest v1 files and add a validator for the version.

Motivation

We are only running v2 validators:

return get_v2_validators(ctx, is_extras, is_marketplace)

Because of that, I got the following trying to validate a v1 file (that was created a few weeks ago on a branch):

  File "/Users/florent.clarret/go/src/github.com/DataDog/integrations-core/datadog_checks_dev/datadog_checks/dev/tooling/manifest_validator/common/validator.py", line 102, in validate
    if not maintainer.isascii():
AttributeError: 'NoneType' object has no attribute 'isascii'

With this fix, we have:

╰─❯ ddev validate manifest impala                                                                                                                                                                                                                                                                                       ─╯
Validating manifest.json files for 1 checks ...
impala/manifest.json... FAILED
Manifest version must be >= 2.0.0
1 invalid files

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

@FlorentClarret FlorentClarret requested a review from a team as a code owner August 22, 2022 09:01
@FlorentClarret FlorentClarret changed the title Do not run the validators for manifest v1 files Do not run the v2 validators for manifest v1 files Aug 22, 2022
@codecov
Copy link

codecov bot commented Aug 22, 2022

Codecov Report

Merging #12788 (42dfbf2) into master (2846ea4) will not change coverage.
The diff coverage is 60.00%.

Flag Coverage Δ
avi_vantage 91.92% <ø> (ø)
boundary 100.00% <ø> (ø)
calico 83.33% <ø> (ø)
ddev 97.99% <ø> (ø)

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

@FlorentClarret FlorentClarret changed the title Do not run the v2 validators for manifest v1 files Add a validator for the manifest version Aug 24, 2022
@FlorentClarret FlorentClarret force-pushed the florentclarret/validate-manifest-v2 branch from dd56e86 to 333b44f Compare August 24, 2022 10:04
@FlorentClarret FlorentClarret force-pushed the florentclarret/validate-manifest-v2 branch from 333b44f to b08b582 Compare August 24, 2022 10:54
hithwen
hithwen previously approved these changes Aug 24, 2022
@FlorentClarret FlorentClarret merged commit aeed4eb into master Aug 25, 2022
@FlorentClarret FlorentClarret deleted the florentclarret/validate-manifest-v2 branch August 25, 2022 06:38
steveny91 pushed a commit that referenced this pull request Oct 27, 2022
* Add a validator for the manifest version

* Remove unused imports
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.

3 participants