-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Allow to define changedif
behavior for the shell resource
#1071
Conversation
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
…to shellSuccessCriteria
Signed-off-by: Olblak <me@olblak.com>
I think instead of outcome, 'success' would better capture the meaning |
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Damien suggestion would be to replace |
changedif
behavior for the shell resource
Signed-off-by: Olblak <me@olblak.com>
|
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
After some experimentation with the jsonschema |
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
For a reason that I ignore the following line
Do no extract the |
But the json tag works correctly as the generated jsonschema has the property |
Signed-off-by: Olblak <me@olblak.com>
Even thought I prefer the lowercase syntax, I can't figure out why the yaml tag is not correctly used. So I am just going to move forward without the underscore |
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Once the tests are passing here, I'll merge this pullrequest so I can finalize the npm autodiscovery one |
Same remark than here until we release 0.44.0 after FOSDEM. I am open to change the name. Once release it will have to be deprecated |
Opening for visibility
This pullrequest allows to have different success criteria for the shell resource.
It's an initial implementation based on this discussion
I am introduce three new success criteria which are:
console/output
- (current shell behavior)exitcode
where we can specify which exit code to map to.file/checksum
: that monitor file checksum to determine successWhile the "console/output" introduce no change as it requires no configuration, we can use the following snippet to customize the exit code
Test
To test this pull request, you can run the following commands:
Additional Information
Tradeoff
I must admit that I am not a big fan of the word "outcome" another one that I could think of is "successcriteria" but I find it a bit long...
EDIT
I decided to go with
success
as I think it's pretty self explanatoryEDIT
Finally I leaning toward
changedif
Potential improvement
As suggested in the discussion, I could imagine introducing more possible outcome rules such as
file/exist
when we need to monitor a lot of files