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

Healthcheck notification won't display if task state is TASK_FAILED #913

Merged
merged 5 commits into from Mar 10, 2016

Conversation

Projects
None yet
4 participants
@Calvinp
Contributor

Calvinp commented Feb 19, 2016

The notification that the task failed due to no passing healthchecks was being displayed even for tasks that failed on their own for other reasons.

This fixes that.

Show outdated Hide outdated SingularityUI/app/views/taskHealthcheckNotificationSubview.coffee
@@ -14,6 +14,7 @@ class taskHealthcheckNotificationSubview extends View
render: =>
return if not @model.synced
return if _.last(@model.attributes.taskUpdates).taskState is "TASK_FAILED" # This is unfortunately the only place last state is stored.

This comment has been minimized.

@ssalinas

ssalinas Feb 19, 2016

Member

We are pulling the task state in the same way in other places as well, no need for the comment here. Alternatively, if you want it cleaner here, you could add a line in parse on the model for the task and set an attribute called currentState using the code above. Then we have it for reference later on on each task model that we look at

@ssalinas

ssalinas Feb 19, 2016

Member

We are pulling the task state in the same way in other places as well, no need for the comment here. Alternatively, if you want it cleaner here, you could add a line in parse on the model for the task and set an attribute called currentState using the code above. Then we have it for reference later on on each task model that we look at

This comment has been minimized.

@Calvinp

Calvinp Feb 19, 2016

Contributor

Changed.

@Calvinp

Calvinp Feb 19, 2016

Contributor

Changed.

@ssalinas

This comment has been minimized.

Show comment
Hide comment
@ssalinas

ssalinas Feb 19, 2016

Member

👍

Member

ssalinas commented Feb 19, 2016

👍

Show outdated Hide outdated SingularityUI/app/views/taskHealthcheckNotificationSubview.coffee
@@ -14,6 +14,7 @@ class taskHealthcheckNotificationSubview extends View
render: =>
return if not @model.synced
return if @model.attributes.lastKnownState is "TASK_FAILED"

This comment has been minimized.

@zdhickman

zdhickman Feb 19, 2016

Single quotes for this?

@zdhickman

zdhickman Feb 19, 2016

Single quotes for this?

@tpetr tpetr modified the milestone: 0.4.12 Feb 23, 2016

@Calvinp Calvinp added the hs_stable label Feb 26, 2016

Calvinp and others added some commits Mar 4, 2016

Merge pull request #934 from HubSpot/task_status_healthcheck_message
Don't display healthcheck message for tasks in state TASK_LOST or TASK_FINISHED

ssalinas added a commit that referenced this pull request Mar 10, 2016

Merge pull request #913 from HubSpot/failed_task_healthcheck_message
Healthcheck notification won't display if task state is TASK_FAILED

@ssalinas ssalinas merged commit ba2709b into master Mar 10, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@ssalinas ssalinas deleted the failed_task_healthcheck_message branch Mar 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment