-
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
* Bump version and update CHANGELOG for core v2.19.0 Signed-off-by: bwest981 <[email protected]> * [Keystone] Disable remote calls to RegisterToWorkflow (#15352) * [Keystone] Disable remote calls to RegisterToWorkflow * Remove failing test --------- Co-authored-by: Cedric Cordenier <[email protected]> * [KS-490] Support per-step timeout overrides in the Engine (#15367) * testdata/scripts/nodes/evm/list: add test; common/client: fix names in multinode state map [v2.19] (#15372) (cherry picked from commit 0cabe54) Co-authored-by: Brandon West <[email protected]> * Consume latest changeset and update changelog (#15431) * Consume latest changeset and update changelog * Update CHANGELOG.md * bumping wsrpc (#15549) (#15550) * bumping wsrpc (#15549) * Update go.mod * make gomodtidy --------- Co-authored-by: Patrick <[email protected]> * Finalizer fix (#15457) (#15577) * Finalizer fix * Add changeset * Update changeset to include clearing txs bugfix (#15578) * Finalize date on changelog for 2.19.0 (#15670) Signed-off-by: bwest981 <[email protected]> --------- Signed-off-by: bwest981 <[email protected]> Co-authored-by: Bolek <[email protected]> Co-authored-by: Cedric Cordenier <[email protected]> Co-authored-by: Jordan Krage <[email protected]> Co-authored-by: Patrick <[email protected]> Co-authored-by: Dimitris Grigoriou <[email protected]> Co-authored-by: chainchad <[email protected]>
* Bump version and update CHANGELOG for core v2.19.0 Signed-off-by: bwest981 <[email protected]> * [Keystone] Disable remote calls to RegisterToWorkflow (#15352) * [Keystone] Disable remote calls to RegisterToWorkflow * Remove failing test --------- Co-authored-by: Cedric Cordenier <[email protected]> * [KS-490] Support per-step timeout overrides in the Engine (#15367) * testdata/scripts/nodes/evm/list: add test; common/client: fix names in multinode state map [v2.19] (#15372) (cherry picked from commit 0cabe54) Co-authored-by: Brandon West <[email protected]> * Consume latest changeset and update changelog (#15431) * Consume latest changeset and update changelog * Update CHANGELOG.md * bumping wsrpc (#15549) (#15550) * bumping wsrpc (#15549) * Update go.mod * make gomodtidy --------- Co-authored-by: Patrick <[email protected]> * Finalizer fix (#15457) (#15577) * Finalizer fix * Add changeset * Update changeset to include clearing txs bugfix (#15578) * Finalize date on changelog for 2.19.0 (#15670) Signed-off-by: bwest981 <[email protected]> --------- Signed-off-by: bwest981 <[email protected]> Co-authored-by: Bolek <[email protected]> Co-authored-by: Cedric Cordenier <[email protected]> Co-authored-by: Jordan Krage <[email protected]> Co-authored-by: Patrick <[email protected]> Co-authored-by: Dimitris Grigoriou <[email protected]> Co-authored-by: chainchad <[email protected]>
No description provided.