Skip to content
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

@Calvinp
Copy link
Contributor

@Calvinp 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.

@@ -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

This comment has been minimized.

@Calvinp

Calvinp Feb 19, 2016
Author Contributor

Changed.

@ssalinas
Copy link
Member

@ssalinas ssalinas commented Feb 19, 2016

👍

@@ -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?

@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 2 commits Mar 4, 2016
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
Healthcheck notification won't display if task state is TASK_FAILED
@ssalinas ssalinas merged commit ba2709b into master Mar 10, 2016
2 checks passed
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
@ssalinas ssalinas removed hs_qa labels Mar 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.