Skip to content

Commit 03c96db

Browse files
authored
[CRE] Fix execution timestamps in Engine (#21621)
1 parent 7dec4e2 commit 03c96db

16 files changed

Lines changed: 27 additions & 27 deletions

File tree

core/scripts/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ require (
4646
github.com/shopspring/decimal v1.4.0
4747
github.com/smartcontractkit/chainlink-automation v0.8.1
4848
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260317185256-d5f7db87ae70
49-
github.com/smartcontractkit/chainlink-common v0.10.1-0.20260319155722-325b0156b188
49+
github.com/smartcontractkit/chainlink-common v0.11.0
5050
github.com/smartcontractkit/chainlink-common/keystore v1.0.2
5151
github.com/smartcontractkit/chainlink-data-streams v0.1.13
5252
github.com/smartcontractkit/chainlink-deployments-framework v0.86.3

core/scripts/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/services/workflows/v2/capability_executor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var _ host.ExecutionHelper = (*ExecutionHelper)(nil)
3030
type ExecutionHelper struct {
3131
*Engine
3232
WorkflowExecutionID string
33-
ExecutionTimestamp int64
33+
ExecutionTimestamp time.Time
3434
UserLogChan chan<- *protoevents.LogLine
3535
TimeProvider
3636
SecretsFetcher

core/services/workflows/v2/engine.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -631,16 +631,16 @@ func (e *Engine) startExecution(ctx context.Context, wrappedTriggerEvent enqueue
631631
e.loggerLabels.Store(&loggerLabels)
632632
lggr := e.logger().With(platform.KeyOrganizationID, organizationID)
633633

634-
var executionTimestamp int64
634+
var executionTimestamp time.Time
635635
if tsErr := e.cfg.LocalLimiters.ExecutionTimestampsEnabled.AllowErr(ctx); tsErr == nil {
636636
executionTimeProvider := NewDonTimeProvider(e.cfg.DonTimeStore, fullExecutionID, lggr)
637637
donTime, dtErr := executionTimeProvider.GetDONTime()
638638
if dtErr != nil {
639-
executionTimestamp = e.cfg.Clock.Now().UnixMilli()
640-
lggr.Warnw("Failed to get DON time for execution timestamp, falling back to local time", "err", dtErr)
639+
executionTimestamp = e.cfg.Clock.Now()
640+
lggr.Warnw("Failed to get DON time for execution timestamp, falling back to local time", "err", dtErr, "executionTimestamp", executionTimestamp)
641641
e.metrics.IncrementExecutionTimestampFallbackCounter(ctx)
642642
} else {
643-
executionTimestamp = donTime.UnixMilli()
643+
executionTimestamp = donTime
644644
lggr.Debugw("Execution timestamp assigned", "executionTimestamp", executionTimestamp)
645645
e.metrics.IncrementExecutionTimestampAssignedCounter(ctx)
646646
}
@@ -649,7 +649,7 @@ func (e *Engine) startExecution(ctx context.Context, wrappedTriggerEvent enqueue
649649
triggerEvent := wrappedTriggerEvent.event.Event
650650

651651
var executionID string
652-
if e.cfg.FeatureFlags.FeatureMultiTriggerExecutionIDs.Check(ctx, config.Timestamp(executionTimestamp)) == nil {
652+
if e.cfg.FeatureFlags.FeatureMultiTriggerExecutionIDs.Check(ctx, config.NewTimestamp(executionTimestamp)) == nil {
653653
executionID = fullExecutionID
654654
e.metrics.IncrementExecutionIDFullCounter(ctx)
655655
} else {

deployment/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ require (
4444
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260224214816-cb23ec38649f
4545
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260310183131-8d0f0e383288
4646
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260317175207-e9ff89561326
47-
github.com/smartcontractkit/chainlink-common v0.10.1-0.20260319155722-325b0156b188
47+
github.com/smartcontractkit/chainlink-common v0.11.0
4848
github.com/smartcontractkit/chainlink-common/keystore v1.0.2
4949
github.com/smartcontractkit/chainlink-deployments-framework v0.86.3
5050
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260318010722-59d4165024f1

deployment/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ require (
8585
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260224214816-cb23ec38649f
8686
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250912190424-fd2e35d7deb5
8787
github.com/smartcontractkit/chainlink-ccv v0.0.0-20260317124520-6b2931b8cd0a
88-
github.com/smartcontractkit/chainlink-common v0.10.1-0.20260319155722-325b0156b188
88+
github.com/smartcontractkit/chainlink-common v0.10.1-0.20260319222221-2bac99c7a470
8989
github.com/smartcontractkit/chainlink-common/keystore v1.0.2
9090
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10
9191
github.com/smartcontractkit/chainlink-data-streams v0.1.13

go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration-tests/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ require (
4848
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260317185256-d5f7db87ae70
4949
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260310183131-8d0f0e383288
5050
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260310183131-8d0f0e383288
51-
github.com/smartcontractkit/chainlink-common v0.10.1-0.20260319155722-325b0156b188
51+
github.com/smartcontractkit/chainlink-common v0.11.0
5252
github.com/smartcontractkit/chainlink-common/keystore v1.0.2
5353
github.com/smartcontractkit/chainlink-deployments-framework v0.86.3
5454
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260318010722-59d4165024f1

integration-tests/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)