-
Notifications
You must be signed in to change notification settings - Fork 908
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
Actually validate or tell user we cannot #4616
Actually validate or tell user we cannot #4616
Conversation
cloudinit/config/schema.py
Outdated
cloudconfig, schema, strict=True, log_deprecations=False | ||
) | ||
): | ||
print("Cannot validate config, jsonschema dependency missing") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make this message include Skipping schema validation
somehow and we should return False just like our network-config skip above as this function returns False when schema validation is not performed.
print("Cannot validate config, jsonschema dependency missing") | |
print("Cannot validate config, jsonschema dependency missing") | |
return False |
Previously users that didn't have the python jsonschema dependency installed would "succeed" to validate a user configuration. Fix it.
11a7371
to
167c8a4
Compare
@blackboxsw Thanks, updated |
Co-authored-by: Chad Smith <chad.smith@canonical.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thx from adding that whitespace. squash as you see fit. I'm not concerned with unittests/integration tests here as most packaging should be expressing this python3-jsonschema dependency. And we also have debug logs in /var/log/cloud-init.log that' will announce that json schema validation is skipped
Proposed Commit Message
Use commit message