Commit Graph

16 Commits (e2169abb1f83513b4a9a190cfca3889eb07c51de)

Author SHA1 Message Date
docmerlin (j. Emrys Landivar) 57fe285e56 add run return to rerun 2018-11-27 11:48:32 -06:00
Mark Rushakoff b0b0d965ff feat(task): integrate task logs with system buckets
- Brought over enterprise's QueryLogReader, with small adjustments
  - Time filters are for the run's ScheduledFor field, per spec
- Adjusted run log timestamps for consistent formatting:
  - ScheduledFor is RFC3339 because it's a whole-second timestamp
  - StartedAt, FinishedAt use RFC3339Nano for high precision
- Several test adjustments to use relative time, for easier integration
  with storage retention
2018-11-15 08:59:15 -08:00
Mark Rushakoff fe84ff7357 chore(task): fix megacheck errors 2018-11-01 12:46:33 -07:00
Mark Rushakoff cd80e41220 feat(task): add ability to retry runs
This also adjusts the TaskService interface's RetryRun method to accept
a task ID rather than an org ID. Internally, we still look up runs by
organization, and maybe that will change later, but this is a more
natural way for clients to look it up.
2018-10-30 09:20:40 -07:00
Leonardo Di Donato 9104771408 fix(task/backend): porting to uint64 IDs
Co-Authored-By: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-10-11 09:54:18 -05:00
Lyon Hill f081ce95f0
allow run shows to work with an actual org id. (#981)
* allow run shows to work with an actual org id.
also necessary for using actual run lists
2018-10-08 14:07:08 -06:00
docmerlin (j. Emrys Landivar) 4502b4a47f add requestedAt to task log 2018-09-27 12:46:57 -05:00
Mark Rushakoff fe4b676d06 fix(task/backend): avoid data race in in-memory run log
Return reference to new Run instances from ListRuns, to avoid a data
race on the original element.

Fixes #842.
2018-09-17 09:51:14 -07:00
Mark Rushakoff 7bbd087980 chore(task): clean up log writer API
Introduce a RunLogBase type that encapsulates the base information
shared across multiple logs for the same run. This has the information
previously part of the API (Task and RunID), and includes the addition
of a RunScheduledFor timestamp.

Also remove the RunScheduled value for RunStatus, as it was never used
in the scheduler.
2018-09-07 09:35:55 -07:00
Mark Rushakoff 479f3dbb3d test(task): add platform adapter tests
Also fix a handful of segfaults caused by improperly retained byte slices
from bolt, and combine two view transactions into one to avoid  data
race when a delete happened between them.
2018-09-05 10:06:55 -07:00
Mark Rushakoff a8018532b2 test(task): fix two flaky tests
In TestScheduler_RunLog, the run log gets updated asynchronously so we
need to poll to ensure we don't read a stale value.

In TestScheduler_CreateNextRunOnTick, we were previously reading the
one entry out of two from a map, so it was often the entry we weren't
interested in.
2018-08-29 10:02:45 -07:00
Lyon Hill 816a11c9a0
refactor(task): add org id to log reader calls (#684)
* refactor(task): add org id to log reader calls
2018-08-23 12:30:59 -06:00
Jade McGough 70ccb78c5d chore(task): update run schema 2018-08-14 13:33:05 -07:00
Lyon Hill 63b9adf86c feat(task): allow tasks to be enabled and disabled. 2018-08-06 15:24:34 -06:00
Lyon Hill 69761a98f7 feat(task): update the scheduler and logwriter interface
Preperatory change that should enable us to build more complex log writers.
2018-08-01 13:32:54 -06:00
Mark Rushakoff 090d337bf0 feat(task): migrate task code from enterprise
Co-authored-by: j. Emrys Landivar <landivar@gmail.com>
Co-authored-by: Lyon Hill <lyondhill@gmail.com>
2018-07-26 15:16:56 -07:00