-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 support for adding alerts using amtool #1461
Add support for adding alerts using amtool #1461
Conversation
Signed-off-by: Bob Shannon <bshannon@palantir.com>
77f66c7
to
b7b93b6
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.
Thanks for submitting! I'll give this a better look when I have a chance, I only did a quick look-through of the code.
cli/alert_add.go
Outdated
} | ||
} | ||
|
||
err = alertAPI.Push(context.Background(), client.Alert{ |
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.
You could just return alertAPI.Push()
instead of setting it to err
and then returning that.
Signed-off-by: Bob Shannon <bshannon@palantir.com>
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.
Did a couple manual tests, created and resolved alerts -- looks good. I'll wait a few days to see if @simonpasquier has any comments.
todo: add timeout support to alerts once #1461 is merged. Signed-off-by: Stuart Nelson <stuartnelson3@gmail.com>
👍 thanks for doing this! |
* Add support for adding alerts using amtool Signed-off-by: Bob Shannon <bshannon@palantir.com> * comment: Simplify return in addAlert Signed-off-by: Bob Shannon <bshannon@palantir.com>
* Add support for adding alerts using amtool Signed-off-by: Bob Shannon <bshannon@palantir.com> * comment: Simplify return in addAlert Signed-off-by: Bob Shannon <bshannon@palantir.com>
Closes #1417
cc @stuartnelson3