Skip to content

Commit

Permalink
[Nexus] Add logs when failed to parse links
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigozhou committed Aug 26, 2024
1 parent 7103b82 commit a303710
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion components/nexusoperations/executors.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,11 @@ func (e taskExecutor) saveResult(ctx context.Context, env hsm.Environment, ref h
case string((&commonpb.Link_WorkflowEvent{}).ProtoReflect().Descriptor().FullName()):
link, err := ConvertNexusLinkToLinkWorkflowEvent(nexusLink)
if err != nil {
// silently ignore for now
// TODO(rodrigozhou): ignore error for now
e.Logger.Error(
fmt.Sprintf("failed to parse link to %q: %s", nexusLink.Type, nexusLink.URL),
tag.Error(err),
)
continue
}
links = append(links, &commonpb.Link{
Expand Down
3 changes: 2 additions & 1 deletion service/frontend/nexus_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,8 @@ func (h *nexusHandler) StartOperation(
for _, link := range t.AsyncSuccess.GetLinks() {
linkURL, err := url.Parse(link.Url)
if err != nil {
// silently ignore for now
// TODO(rodrigozhou): ignore error for now
oc.logger.Error(fmt.Sprintf("failed to parse link url: %s", link.Url), tag.Error(err))
continue
}
nexusLinks = append(nexusLinks, nexus.Link{
Expand Down

0 comments on commit a303710

Please sign in to comment.