-
Notifications
You must be signed in to change notification settings - Fork 23
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
fix: error checking prior to file writes #687
Conversation
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.
I'm looking at some slight restructuring of the OSCAL pkg
as is - Nonetheless I believe your adjustment to validate
nails the intent of the (current) discussion in the issue -> checking output validity before executing any processing logic.
Do we want to map this behavior to all locations that would merge processed data with an existing file?
Sure, I think the only one that would be missing is |
…prior-to-file-writes' into 678-error-checking-prior-to-file-writes
…ior-to-file-writes
Thinking about the paths now - otherwise I think the only distinction I would make is repeating the pattern of checking for validity of the output file before processing - so scenarios like |
It looks like evaluate sort of already has this built in - the first thing it does is grab all the files passed in and convert them to assessment-results, which should basically act as a validation of the output (since the output file is the input file)? |
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.
Talked through how evaluate
actively performs this functionality to-date. Covers known paths where a merge operation is expected and handles the check before performing any processing cycles
Description
Adds functionality to validate if the desired output files for
validate
andcompose
are valid OSCAL models. Also a few additional error detail.Related Issue
Fixes #678
Type of change
Checklist before merging