fix(task/executor): Don't send Now for Flux compiler. See TODO for details.

pull/18614/head
Brett Buddin 2020-06-18 15:25:58 -04:00
parent a834d18cf2
commit 0f4b0fbe68
No known key found for this signature in database
GPG Key ID: C51265E441C4C5AC
1 changed files with 14 additions and 2 deletions

View File

@ -581,9 +581,21 @@ func NewASTCompiler(_ context.Context, query string, now time.Time) (flux.Compil
}
// NewFluxCompiler wraps a Flux query string in a raw-query representation.
func NewFluxCompiler(_ context.Context, query string, now time.Time) (flux.Compiler, error) {
func NewFluxCompiler(_ context.Context, query string, _ time.Time) (flux.Compiler, error) {
return lang.FluxCompiler{
Query: query,
Now: now,
// TODO(brett): This mitigates an immediate problem where
// Checks/Notifications breaks when sending Now, and system Tasks do not
// break when sending Now. We are currently sending C+N through using
// Flux Compiler and Tasks as AST Compiler until we come to the root
// cause.
//
// Removing Now here will keep the system humming along normally until
// we are able to locate the root cause and use Flux Compiler for all
// Task types.
//
// This should be removed once we diagnose the problem.
//
// Now: now,
}, nil
}