Skip to content

Commit

Permalink
keystone/workflow engine logging (#13563)
Browse files Browse the repository at this point in the history
* Remove unused logger arg

* Make capability id logging consistent

* Clean up init logs

* Normalize executionID and capabilityID

* Adding store level logging

* Add changeset

* Add custom errors to workflow engine

* Remove wrapped variants of logging

* Simplify error handling for workflow engine errors

* Change indentation

* Run linter

* Remove trailing newline
  • Loading branch information
HenryNguyen5 authored Jun 26, 2024
1 parent f1d4cd3 commit 99fa0e6
Show file tree
Hide file tree
Showing 8 changed files with 270 additions and 69 deletions.
5 changes: 5 additions & 0 deletions .changeset/popular-candles-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal Clean up workflow engine logging
8 changes: 5 additions & 3 deletions core/capabilities/transmission/local_target_capability.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ import (
type LocalTargetCapability struct {
lggr logger.Logger
capabilities.TargetCapability
localNode capabilities.Node
localNode capabilities.Node
capabilityID string
}

func NewLocalTargetCapability(lggr logger.Logger, localDON capabilities.Node, underlying capabilities.TargetCapability) *LocalTargetCapability {
func NewLocalTargetCapability(lggr logger.Logger, capabilityID string, localDON capabilities.Node, underlying capabilities.TargetCapability) *LocalTargetCapability {
return &LocalTargetCapability{
TargetCapability: underlying,
capabilityID: capabilityID,
lggr: lggr,
localNode: localDON,
}
Expand All @@ -38,7 +40,7 @@ func (l *LocalTargetCapability) Execute(ctx context.Context, req capabilities.Ca

peerIDToTransmissionDelay, err := GetPeerIDToTransmissionDelay(l.localNode.WorkflowDON.Members, req)
if err != nil {
return nil, fmt.Errorf("failed to get peer ID to transmission delay map: %w", err)
return nil, fmt.Errorf("capability id: %s failed to get peer ID to transmission delay map: %w", l.capabilityID, err)
}

delay, existsForPeerID := peerIDToTransmissionDelay[*l.localNode.PeerID]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func TestScheduledExecutionStrategy_LocalDON(t *testing.T) {
},
PeerID: &ids[tc.position],
}
localTargetCapability := NewLocalTargetCapability(log, localDON, mt)
localTargetCapability := NewLocalTargetCapability(log, "capabilityID", localDON, mt)

_, err = localTargetCapability.Execute(tests.Context(t), req)

Expand Down
2 changes: 1 addition & 1 deletion core/services/chainlink/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) {
jobORM = job.NewORM(opts.DS, pipelineORM, bridgeORM, keyStore, globalLogger)
txmORM = txmgr.NewTxStore(opts.DS, globalLogger)
streamRegistry = streams.NewRegistry(globalLogger, pipelineRunner)
workflowORM = workflowstore.NewDBStore(opts.DS, clockwork.NewRealClock())
workflowORM = workflowstore.NewDBStore(opts.DS, globalLogger, clockwork.NewRealClock())
)

for _, chain := range legacyEVMChains.Slice() {
Expand Down
Loading

0 comments on commit 99fa0e6

Please sign in to comment.