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

feat(tasks): expose lastRunStatus and lastRunError in task API #15650

Merged
merged 1 commit into from
Oct 30, 2019

Conversation

gavincabbage
Copy link
Contributor

@gavincabbage gavincabbage commented Oct 30, 2019

Closes #15153

This PR exposes lastRunStatus and lastRunError in the task API object and records corresponding fields on the backend task model. If lastRunStatus is "failed", lastRunError is recorded as the last message in the task run log. Otherwise, lastRunError is cleared. Both new fields are excluded from the response if empty.

The task update logic is augmented to allow the status and error to be updated, and the task run finish logic takes advantage of this new capability. Tests are included.

@gavincabbage gavincabbage force-pushed the feat/last-run-status branch 3 times, most recently from bf79bb1 to aeb61fb Compare October 30, 2019 01:34
@gavincabbage gavincabbage marked this pull request as ready for review October 30, 2019 01:50
@gavincabbage gavincabbage requested review from a team as code owners October 30, 2019 01:50
@gavincabbage gavincabbage requested a review from a team October 30, 2019 01:51
@ghost ghost requested review from gianarb and removed request for a team October 30, 2019 01:51
@gavincabbage gavincabbage requested review from stuartcarnie and removed request for gianarb October 30, 2019 02:03
@@ -7155,6 +7155,16 @@ components:
type: string
format: date-time
readOnly: true
lastRunStatus:
Copy link
Contributor

Choose a reason for hiding this comment

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

this is fantastic !

Copy link
Contributor

@imogenkinsman imogenkinsman left a comment

Choose a reason for hiding this comment

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

looks great!

Copy link
Contributor

@stuartcarnie stuartcarnie left a comment

Choose a reason for hiding this comment

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

Great work and 💯 for including new test coverage

@gavincabbage gavincabbage merged commit fc9e7cb into master Oct 30, 2019
@gavincabbage gavincabbage deleted the feat/last-run-status branch October 30, 2019 20:09
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.

Modify tasks API to include a field to track the last run status and error
4 participants