Skip to content

[CAPPL-400] Fix/truncate workflow names #15864

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/wild-planes-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Truncates workflow name before starting engine
4 changes: 3 additions & 1 deletion core/services/workflows/syncer/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,12 +531,14 @@ func (h *eventHandler) engineFactoryFn(ctx context.Context, id string, owner str
return nil, fmt.Errorf("failed to get workflow sdk spec: %w", err)
}

truncName := pkgworkflows.HashTruncateName(name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MStreet3 Can you add a comment explaining why this is necessary (workflow engine expects max 10 bytes, registry has no such restriction)


cfg := workflows.Config{
Lggr: h.lggr,
Workflow: *sdkSpec,
WorkflowID: id,
WorkflowOwner: owner, // this gets hex encoded in the engine.
WorkflowName: name,
WorkflowName: string(truncName[:]),
Registry: h.capRegistry,
Store: h.workflowStore,
Config: config,
Expand Down
Loading