Closed csomh closed 2 years ago
Hi @csomh. Thanks for your PR.
I'm waiting for a operator-framework or openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test
on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test
label.
I understand the commands that are listed here.
This should resolve #17 and #39.
@csomh Just wanted to say good work on this! It seems like it satisfies a lot of the basic cases, and allows us to just codify the more complex comparisons. I would like to take some time and ensure that all of the use cases that were covered previously are still working here -- but in general I do like this approach.
One thing I want to point out is that this does change the formatting of most/all of the log messages, which to me is a breaking change -- so we would have to either update this PR to retain the old format of the logs or we would need to bump the major version. I would prefer the former.
FYI @kevinrizza as one of the consumers of courier...CVP does not rely on the format of the log messages.
@kevinrizza thanks!
As for the format of log messages: would it be possible to sync releasing this change with the future fix for #74, which will probably also change the format of the log messages?
I'm asking this, because keeping the old format of the messages requires parsing the error.message
from jsonschema
and reconstructing the current error messages. But then, the current error messages resulting from validation issues will probably not match in style the new error messages that will pop up due to fine tuning the schemas.
I would rather stick to the current _concatenate error.absolute_path
with error.message
_ approach, as it's short, simple and provides a consistent style on the long run.
@csomh Agreed, if we are going to make format changes to all of the log messages, my preference would be to make a more sweeping change that would give more detail as to what csv or crd is causing the error. I'm not opposed to the changes to the logger in principle, just to the timing of them. If that is directly tied to this PR because of technical reasons, then lets hold this pr until we make that change as well.
@csomh: PR needs rebase.
I think this isn't relevant anymore :slightly_smiling_face: Closing.
Refactor CRD and CSV validation, and use JSON Schema instead of nested if-s.
This should make future validation easier.
TODO: