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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

@ssalinas
Copy link
Member

👍

@@ -14,6 +14,7 @@ class taskHealthcheckNotificationSubview extends View

render: =>
return if not @model.synced
return if @model.attributes.lastKnownState is "TASK_FAILED"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single quotes for this?

@tpetr tpetr modified the milestone: 0.4.12 Feb 23, 2016
Calvin Pomerantz and others added 2 commits March 4, 2016 10:59
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
@ssalinas ssalinas deleted the failed_task_healthcheck_message branch March 10, 2016 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants