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

EVR and Limit dictionary validation failing unexpectedly #507

Closed
MJJoyce opened this issue Jan 5, 2024 · 0 comments · Fixed by #509
Closed

EVR and Limit dictionary validation failing unexpectedly #507

MJJoyce opened this issue Jan 5, 2024 · 0 comments · Fixed by #509

Comments

@MJJoyce
Copy link
Member

MJJoyce commented Jan 5, 2024

Noted unexpected failures when verifying the default EVR and Limit files in
latest AIT Core. Zero useful error messages reported to help narrow issue down.

Snippet from logs:

2024-01-05T13:44:42.271 | PROGRAM  | ait-core/bin/ait-yaml-validate --evr
2024-01-05T13:44:42.278 | INFO     | Validating: AIT-Core/config/evr.yaml
2024-01-05T13:44:42.281 | ERROR    | Validation: FAILED: yml=AIT-Core/config/evr.yaml, schema=AIT-Core/ait/core/data/evr_schema.json
2024-01-05T13:44:42.282 | PROGRAM  | done.
MJJoyce added a commit that referenced this issue Jan 5, 2024
Update base Validator.content_val to return a proper default value.
Validation that doesn't include a custom `content_val` implementation
relies on this default implementation during validation checks. By
default, that includes EVR and Limit dictionary checks. The current
implementation incorrect returns a garbage value (None) for the default
implementation.

Documentation of the default `content_val` method has been updated to
elaborate on why it's making the current check and what a more thorough
implementation looks like.

Tangentially related, error handling around schema validation was a bit
lacking. This also includes minor updates around the `schema_val` checks
in `Validator` to better handle and log exceptions related to that.
Additionally, validation is short circuited if failures occur there to
avoid confusing error messages in unrelated `content_val` checks.
MJJoyce added a commit that referenced this issue Jan 10, 2024
Issue #507 - Fix invalid content validation check in base val.py classes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant