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

Issue #507 - Fix invalid content validation check in base val.py classes #509

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

MJJoyce
Copy link
Member

@MJJoyce MJJoyce commented 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 incorrectly 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.

Resolve #507

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 MJJoyce requested review from a team as code owners January 5, 2024 22:12
@MJJoyce MJJoyce merged commit 1119b6e into master Jan 10, 2024
4 checks passed
@MJJoyce MJJoyce deleted the issue-507 branch January 10, 2024 22:46
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 this pull request may close these issues.

EVR and Limit dictionary validation failing unexpectedly
2 participants