-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[KS-490] Support per-step timeout overrides in the Engine #15367
Conversation
I see you updated files related to
|
AER Report: CI Core ran successfully ✅AER Report: Operator UI CI ran successfully ✅ |
2136235
to
900c3c4
Compare
@@ -27,7 +27,11 @@ import ( | |||
"github.com/smartcontractkit/chainlink/v2/core/services/workflows/store" | |||
) | |||
|
|||
const fifteenMinutesMs = 15 * 60 * 1000 | |||
const ( | |||
fifteenMinutesMs = 15 * 60 * 1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use time.Duration to avoid an ambiguity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah let's please use time.Duration wherever we can :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tradeoff is you cant use const
as the time.Duration methods are runtime only
@@ -934,8 +949,11 @@ func (e *Engine) executeStep(ctx context.Context, lggr logger.Logger, msg stepRe | |||
}, | |||
} | |||
|
|||
e.metrics.incrementCapabilityInvocationCounter(ctx) | |||
output, err := step.capability.Execute(ctx, tr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Execute is syncronous, so this should not be a problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you mean?
const ( | ||
fifteenMinutesMs = 15 * 60 * 1000 | ||
reservedFieldNameStepTimeout = "cre_step_timeout" | ||
maxStepTimeoutOverrideSec = 10 * 60 // 10 minutes | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const ( | |
fifteenMinutesMs = 15 * 60 * 1000 | |
reservedFieldNameStepTimeout = "cre_step_timeout" | |
maxStepTimeoutOverrideSec = 10 * 60 // 10 minutes | |
) | |
var ( | |
fifteenMinutesMs = 15 * time.Minute.Milliseconds() | |
reservedFieldNameStepTimeout = "cre_step_timeout" | |
maxStepTimeoutOverrideSec = 10 * time.Minute.Seconds() | |
) |
@@ -919,6 +920,20 @@ func (e *Engine) executeStep(ctx context.Context, lggr logger.Logger, msg stepRe | |||
if err != nil { | |||
return nil, nil, err | |||
} | |||
stepTimeoutDuration := e.stepTimeoutDuration | |||
if timeoutOverride, ok := config.Underlying[reservedFieldNameStepTimeout]; ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this config set per capability? Checking to make sure its not set at the workflow level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, see example in the test file
No description provided.