CreateNextRun centralizes StoreTaskMeta modification and therefore
simplifies Store functions a bit.
Store.CreateNextRun isn't called anywhere yet. The next step here is to
use CreateNextRun from the scheduler and remove Store.CreateRun.
The logic used to be only in the scheduler, but now Options exposes it.
This is another step towards making StoreTaskMeta schedule-aware to
enable creating manually requested runs.
This logic was repeated in multiple places, so now it can live in a
single place. This also sets a precedent going forward, for adding
methods to the StoreTaskMeta type. We'll likely be adding more methods
to support manual runs of a task.
More specifically, introduce a `scheduleAfter` argument to
Store.CreateTask. The previous behavior was leaving a new task's meta
LatestComplete value set to zero, which meant that the first run of a
schedule would start from 1970. Now, it's set to time.Now unless
otherwise specified.
Updates #595.
We were previously doing `r.logger = r.logger.With(...)`, which ended up
duplicating the provided field in the log output. Now ensure that we
only set the run_id once in a logger.
Moves idpe.QueryService into platform/query.ProxyQueryService
Splits the Request into ProxyRequest and Request.
Changes query.QueryService and query.AsyncQueryService to use a Request
type. This means that the Compiler interface is consumed by the service
to abstract out transpilation vs Flux compilation vs raw spec.
The transpiler handler is removed.
There are separate http handlers and service implementations for each of
the three query services.
Query logging types are moved into platform.
The ResultIterator now expects Cancel to always be called.
The fluxd binary exposes the query endpoint specified in the swagger
file.
We need a coordination layer to facilitate the communication in the api to the task service.
The api was also not connected in main to the http service.
This is to work around slow parsing (#484).
This change saves about 2 seconds on tests for task/backend and
task/backend/bolt. It saves around 45 seconds on enterprise tests.
After we started parsing options inside of the task validation methods,
we accidentally shadowed the "missing script" error when the script was
empty. This restores the behavior of telling the user "missing script"
rather than a cryptic syntax error.