Commit Graph

45 Commits (8ed55e72b85b0807c97d3d1d7d12e9f07c9737e9)

Author SHA1 Message Date
Jeffrey Smith II a0f1184bb3
fix: manually scheduled task runs now run when expected (#23664)
* fix: run manually scheduled tasks at their scheduled time

* fix: actually use it

* fix: get tests building

* fix: fix tests

* fix: lint
2022-10-13 14:57:57 -04:00
Sam Arnold 7b2e122869
refactor: refactor for tasks backport (#21117)
* chore: remove dead code

* refactor: move FluxLanguageService interface to fluxlang

* chore: run fmt

* refactor: move task.go from top level to task/taskmodel

* chore: run formatter

* chore: fix up import ordering with gci
2021-04-07 14:42:55 -04:00
Daniel Moran 00afd95cb7
refactor: automated move of errors and id from root to kit (#21101)
Co-authored-by: Sam Arnold <sarnold@influxdata.com>
2021-03-30 14:10:02 -04:00
Jonathan A. Sternberg 0ae8bebd75
refactor: rewrite imports to include the /v2 suffix for version 2 2020-04-03 12:39:20 -05:00
Jonathan A. Sternberg 834a8740e0
refactor(task/backend): move the task/backend constants to the global package (#17133)
This moves a few types and constants to the global package so it can be
used without importing the `task/backend` package. These constants are
referenced in non tasks-specific code.

This is needed to break a dependency chain where the task backend will
call into the flux runtime to perform parsing or evaluation of a script
and to prevent the http package from inheriting that dependency.
2020-03-06 16:19:32 -06:00
Alirie Gray 6c6bd39ffc
refactor(tasks): remove dead scheduler code (#16252) 2020-01-02 11:41:21 -08:00
Alirie Gray b5ccad3c07
feat(metrics): add run latency to executor metrics (#16190) 2019-12-11 14:50:32 -08:00
Jacob Marble 5f19c6cace
chore: Remove several instances of WithLogger (#15996)
* chore: Remove several instances of WithLogger

* chore: unexport Logger fields

* chore: unexport some more Logger fields

* chore: go fmt

chore: fix test

chore: s/logger/log

chore: fix test

chore: revert http.Handler.Handler constructor initialization

* refactor: integrate review feedback, fix all test nop loggers

* refactor: capitalize all log messages

* refactor: rename two logger to log
2019-12-04 15:10:23 -08:00
Alirie Gray f0ecc0e89d
refactor(tasks): use go Time for Task CreatedAt, UpdatedAt, LatestCompleted, Offset (#15672) 2019-11-12 17:13:56 -08:00
Alirie Gray 552168d3ae
refactor(tasks): use Go time objects for timestamps on task Runs (#15406) 2019-10-17 17:23:45 -07:00
Alirie Gray c7f09d6a56
chore(tasks): use pointers for task errors (#14343) 2019-07-15 13:57:51 -07:00
Lyon Hill c8becfd4a2
feat(task): Create a new task executor for the new modular scheduler (#14252)
* feat(task): create new executor for modular scheduler
2019-07-08 08:13:29 -06:00
Alirie Gray 66157c9d44 chore(tasks): consolidate task errors into task_errors.go 2019-06-17 16:03:18 -07:00
Alirie Gray 04a427e99e feat(tasks): add runID to Log struct 2019-06-06 11:24:38 -07:00
Lyon Hill a049faca19
fix a race condition in the mock task scheduler (#13885) 2019-05-10 16:57:20 -06:00
Lyon Hill 8fa86488c3
Newly activated tasks should not attempt to 'catch up' (#13700)
* Newly activated tasks should not attempt to 'catch up'
2019-04-29 15:28:34 -06:00
Lyon Hill 5b8c4ea0e8
fix task limit in kv and add tests Also fix a minor race condition in task scheduler (#13538)
* fix task limit in kv and add tests Also fix a minor race condition in task scheduler

* update comment
2019-04-22 13:09:19 -06:00
Todd Persen cd64ec8718 Fix typos in miscellaneous packages 2019-04-17 13:30:22 -07:00
Lyon Hill c78344c441
update task schedler to use the new task control service (#12949) 2019-03-28 16:52:25 -06:00
Mark Rushakoff 9541fbb859 fix(task): report query statistics correctly
The synchronous executor was missing a call to ResultIterator.Release.
The asynchronous executor wasn't even calling Query.Statistics.

Also add a test that the scheduler records the statistics to the run
log, and that the statistics are visible from the launcher test. The
launcher test is the most likely place to catch if something goes wrong
in the full stack.
2019-03-20 08:11:14 -07:00
Lyon Hill 049e8f8c90
Add stats to the run log (#12157) 2019-02-26 08:53:36 -07:00
Mark Rushakoff 12292a4983 fix(task): recover when call to execute fails
This was a missed case from #11817.

This case currently occurs when creating a task through the UI, using a
session rather than a full-fledged authorization. It doesn't fix that
case yet, but at least it will log an informative message.
2019-02-15 08:32:04 -08:00
Mark Rushakoff d73d73c0d4 chore: rename imports from platform to influxdb
I did this with a dumb editor macro, so some comments changed too.

Also rename root package from platform to influxdb.

In interest of minimizing risk, anyone importing the root package has
now aliased it to "platform" so that no changes beyond imports were
necessary in those files.

Lastly, replace the old platform module to local path /dev/null so that
nobody can accidentally reintroduce a platform dependency while
migrating platform code to influxdb.
2019-01-09 20:51:47 -08:00
Edd Robinson 9403c1ec8e Ensure error strings not capitalised ST1005 2018-11-30 10:54:24 +00:00
Mark Rushakoff ed15dd2305 refactor(task): add Executor.Wait method
This is to ensure that Scheduler.Stop blocks until outstanding task runs
finish. There were enterprise tests failing because outstanding runs of
a task were calling (*testing.T).Log after the test finished.
2018-11-21 14:27:56 -08:00
Mark Rushakoff 39e115cebe fix(task): fix closure mistake when reclaiming tasks
Also improve some the coordinator tests a little bit and improve the
executor logging while we're here.
2018-10-31 19:00:02 -07:00
docmerlin (j. Emrys Landivar) 64883a5dad Use snowflake for bolt task ids 2018-10-30 18:20:59 -05:00
docmerlin (j. Emrys Landivar) 6e2620418c Now you can cancel runs 2018-10-29 16:08:50 -05:00
Mark Rushakoff 8c0aec7975 fix(task): propagate status updates when modifying tasks
This also changes the backend.Store API to remove the EnableTask and
DisableTask methods, merging their functionality into ModifyTask, which
has been named to UpdateTask to keep closer to the CRUD acronym.
2018-10-19 16:49:18 -07:00
Lyon Hill e643c434f6
Allow the scheduler to Update tasks. (#1058)
* Allow the scheduler to Update tasks.

* update the coordinator to use the new update action

* remove unclean code
2018-10-12 08:24:22 -06:00
Leonardo Di Donato ca7ba33d27 fix(task/mock): porting to uint64 IDs 2018-10-11 09:54:18 -05:00
Leonardo Di Donato 8d7f06cf4b feat(platform/id): using uint64 for platform.IDs
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-Authored-by: Lorenzo Fontana <lo@linux.com>
2018-10-11 09:54:18 -05:00
Lyon Hill 7ff3361e78
fix(task): Allow task scheduler to be stopped and started. (#882) 2018-09-26 00:01:21 -06:00
Lyon Hill c6821e3f71
Revert "fix(task): Allow task scheduler to be stopped and started. (#857)" (#880)
This reverts commit 98fe509465.
2018-09-25 23:31:26 -06:00
Lyon Hill 98fe509465
fix(task): Allow task scheduler to be stopped and started. (#857)
* fix(task): Allow task scheduler to be stopped and started.

* make create task scheduling a bit more strict
2018-09-25 23:16:26 -06:00
Mark Rushakoff f72ed76a47 feat(task): handle manual runs in scheduler 2018-08-26 20:34:05 -07:00
Mark Rushakoff 813ba2f221 chore(task): rename StoreTaskMeta.LastCompleted to LatestCompleted
LastCompleted implies they could be out of order, so LatestCompleted is
more accurate.
2018-08-22 10:36:03 -07:00
Mark Rushakoff de577125a8 refactor(task): remove CreateRun method from Store
This method has been superseded by CreateNextRun.
2018-08-17 11:49:09 -07:00
Mark Rushakoff 11fe3acf05 refactor(task): use CreateNextRun in scheduler 2018-08-17 11:08:23 -07:00
Mark Rushakoff a5371de0d0 fix(task): undo accidental type rename 2018-08-14 14:34:20 -07:00
Jade McGough 70ccb78c5d chore(task): update run schema 2018-08-14 13:33:05 -07:00
Lyon Hill 0661d05b1f update mock scheduler 2018-08-01 13:36:47 -06:00
Michael Desa 8c87c9d132 revert #442 2018-08-01 14:54:32 -04:00
Leonardo Di Donato 3651350cc5 Refactoring mock usage of IDs (task package) 2018-08-01 18:20:59 +02: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