Open jhenderson-pro opened 1 year ago
Resources:
Verified that an edge condition where requesting an adhoc execution of a check with proxy_requests
configured results in incorrect behavior scheduling. This should be a relatively simple patch to fix.
diff --git a/backend/schedulerd/executor.go b/backend/schedulerd/executor.go
index a6b30570e..0675b4b9c 100644
--- a/backend/schedulerd/executor.go
+++ b/backend/schedulerd/executor.go
@@ -198,7 +198,8 @@ func (a *AdhocRequestExecutor) listenQueue(ctx context.Context) {
continue
}
- if err = a.processCheck(ctx, &check); err != nil {
+ checkCtx := corev2.SetContextFromResource(ctx, &check)
+ if err = a.processCheck(checkCtx, &check); err != nil {
select {
case a.listenQueueErr <- err:
case <-ctx.Done():
As pointed out in the sensu-engineering slack thread, this use case isn't very obviously useful, and isn't something users are very likely to run into.
Steps of execution of issue:
Expected Behavior
As a Sensu operator, I'd expect to be able to manually execute a check via the web UI or sensuctl if that check executes normally when scheduled.
Current Behavior
Currently, I have a check with an agent entity and proxy entity that does execute when scheduled but cannot manually execute via sensuctl or the web UI. This is the error:
Possible Solution
Steps to Reproduce (for bugs)
Context
Your Environment