-
Notifications
You must be signed in to change notification settings - Fork 16
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
[CAPPL-320] implement HexDecodeWorkflowName #983
Conversation
pkg/workflows/utils.go
Outdated
// HexDecodeWorkflowName makes the best effort to decode the hex workflow name. | ||
// In case of failure it will log the error and return the input name. | ||
func HexDecodeWorkflowName(encoded string, logger logger.Logger) string { | ||
decoded, err := hex.DecodeString(encoded) | ||
if err != nil { | ||
logger.Errorf("failed to decode WorkflowName %q: %v", encoded, err) | ||
return encoded |
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.
Passing a logger as a function argument is usually a code smell. Where is this used?
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.
I've removed this, we are going to expose a new decodedWorkflowName
as part of the metadata. The decoding will happen in chainlink
instead. Will change the implementation there to not pass the logger 🙇🏼
40f0d97
Description
This pr adds the
DecodedWorkflowName
field that will be used here in order to log the workflowname correctly to beholderCAPPL-320
Requires
Supports