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
Task alerts #721
Merged
Merged
Task alerts #721
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
408c18c
Add alert component
kwm4385 905ffb6
Implement long task alert
kwm4385 48c8a06
Remove unused field
kwm4385 a493c63
Don't reuse alerts
kwm4385 b37369b
Math is power
kwm4385 3b220e6
Alert if a task is killed due to slave decom
kwm4385 2f79c79
Sp
kwm4385 b672d39
Formatting
kwm4385 d8f3922
Use deployStatistics for average runtime
kwm4385 9f7a223
Get threshold from singularity configuration
kwm4385 121bfd7
Extra comma
kwm4385 11f8928
Merge branch 'master' into task_alerts
6473b26
Remove UI Config and fix comment
kwm4385 7af7a62
Fix env var name and alert text
kwm4385 71de69b
Plz
kwm4385 0b09370
Move depoy info fetch into conditional and simplify adding alerts
kwm4385 9fccd7c
Add alerts all at once and wait for promise if needed
kwm4385 1e7d5a4
Success -> done
kwm4385 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Collection = require './collection' | ||
|
||
class Alerts extends Collection | ||
|
||
initialize: (models) => | ||
|
||
|
||
module.exports = Alerts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{{#each data}} | ||
<div class="alert alert-{{level}}" role="alert"> | ||
<strong>{{title}}</strong> {{{message}}} | ||
</div> | ||
{{/each}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
instead of calculating this yourself, you should use
averageRuntimeMillis
in the SingularityDeployStatistics object, which can be grabbed from the deploy history endpoint (.../api/history/request/REQUEST_ID/deploy/DEPLOY_ID
). it would also be wise to surfacewarnIfScheduledJobIsRunningPastNextRunPct
from https://github.com/HubSpot/Singularity/blob/master/SingularityService/src/main/java/com/hubspot/singularity/config/SingularityConfiguration.java#L172 into the window.config object so that we don't have to hardcode the threshold value