-
Notifications
You must be signed in to change notification settings - Fork 463
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
Update config validator dependency and fix incompatible changes. #577
Update config validator dependency and fix incompatible changes. #577
Conversation
In terms of the high level user interfaces (Constraint Templates, Constraints, CAI input, Violation output) it's stable and can be rolled out. Some of the programmatic interfaces may change. |
Thanks! |
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.
Thanks, just one naming suggestion.
cli/scorecard/violations.go
Outdated
@@ -30,98 +30,99 @@ import ( | |||
"github.com/forseti-security/config-validator/pkg/api/validator" | |||
) | |||
|
|||
func addDataFromReader(config *ScoringConfig, reader io.Reader) error { | |||
func addDataFromReader(config *ScoringConfig, reader io.Reader) ([]*validator.Asset, error) { |
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.
Since we're changing these functions to get and return the data instead of adding it directly, could we change the names?
func addDataFromReader(config *ScoringConfig, reader io.Reader) ([]*validator.Asset, error) { | |
func getDataFromReader(config *ScoringConfig, reader io.Reader) ([]*validator.Asset, error) { |
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.
To be clear, please rename all the updated methods to follow this.
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.
Oh, I thought that the suggestion was going to update all callsites. will fix.
This commit is only intended to only roll forward the config validator version and preserve status quo behavior. This commit is not intended to improve performance, refactor code, or achieve any other goals and those will be considered out of scope.
With this PR, the original violation metadata field becomes metadata.details, and impacts the way scorecard outputs metadata.
After:
I have checked recent changes in config-validator repo but was not able to identify yet from the code what caused this change. Would it be due to the change in opa version? @briantkennedy any idea? I'd like to confirm whether this change is intentional and permanent. And if so, I'll probably need do something like this in scorecard output, to obtain value of certain metadata fields:
to
|
Is there a list of all behaviour changes in the new config-validator? Here are some that I've observed so far.
@morgante |
@katze120 Sure, I can hold off on releasing now.
These definitely sound like bugs. |
Opened #584 to keep working notes reg. scorecard behaviour changes |
This commit is only intended to only roll forward the config validator
version and preserve status quo behavior. This commit is not intended
to improve performance, refactor code, or achieve any other goals and
those will be considered out of scope.