-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add ability to handle non-existent & malformed Checks supplied to catalog #103
Conversation
8eda57f
to
8469cd1
Compare
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.
@jamie-suse The implementation and tests look great.
I have added a side note on making map_check
more resilient against malformed check files.
I think it is pretty simple. Do you think we could include it in this PR?
Otherwise, I'm fine on merging this and creating a next PR with the update.
2619ef6
to
532a786
Compare
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 tried the timeout scenario and I got an error while the server was handling this.
** (MatchError) no match of right hand side value: nil
(wanda 0.1.0) lib/wanda/executions/evaluation.ex:42
Thing is that non_existent_check
remains in the targets
piece of state of the execution and if that target timeouts, non_existent_check
would still be taken into account for evaluation execution causing an error because it won't be found among the available checks, when queried for it. See server.ex#L31, server.ex#L140 and evaluation.ex#L42
At execution startup we could simply clean up targets state from non existing checks, if we do not use them.
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.
Ok @jamie-suse ,
Green light from my side.
Let's give some time to others to review if they want. We can merge next week otherwise
Really good catch @nelsonkopliku , |
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.
Agreed with @arbulu89 to make this pass and work on improved error handing in another PR
532a786
to
36bce10
Compare
58ec2f2
to
fa03ebc
Compare
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.
Looks good, thanks for taking care also of the timeout scenario!.
Left just a couple of non blocking comments.
One extra thing coming to my mind is if it would be valuable enhancing the tests for the timeout scenario to cover this case.
Up to you.
fa03ebc
to
81fbb58
Compare
81fbb58
to
9712f0c
Compare
Currently, when the user provides a Check that does not exist, or a malformed Check file, when starting execution via the CLI, the server crashes with an exception.
Current example scenario:
And similarly for a malformed Check file:
This PR changes the behaviour so that when the catalogue is given a non-existent or malformed Check, it logs an error and continues processing the other checks in the list.