Skip to content

Unified link converters - #318

Open
Evanthx wants to merge 2 commits into
mainfrom
link_converter
Open

Evanthx wants to merge 2 commits into
mainfrom
link_converter

Conversation

@Evanthx

@Evanthx Evanthx commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Unified the Link Converter code - modelling what was done for Java and bringing into the other SDKs:
temporalio/sdk-java#3068

There are multiple encoding and decoding methods for links, all pretty close but not quite. That had me worried as it is easy for them to get out of sync. This PR merges those methods.

ConvertWorkflowLinkToNexusLink was experimental and unused, and has been removed. It emitted a workflow-event path (/history) that could not be decoded as a Link_Workflow. Use ConvertLinkWorkflowToNexusLink instead.


Note

Medium Risk
Link URL shape affects interoperability; the deprecated ConvertWorkflowLinkToNexusLink now emits a different (correct) path, which could surprise any caller that depended on the old /history URLs.

Overview
Refactors temporalnexus link conversion so workflow event, workflow, Nexus operation, and activity variants share one linkType table with shared encode / decode (path templates, regex, proto type names) instead of four parallel URL builders and parsers.

ConvertWorkflowLinkToNexusLink is deprecated and now delegates to ConvertLinkWorkflowToNexusLink, fixing output that incorrectly used a workflow-event path (…/history) and could not round-trip as Link_Workflow. Per-type public APIs and CommonLinkToNexusLink / NexusLinkToCommonLink dispatch are unchanged in intent; workflow-event query handling is only reorganized.

Tests add coverage for the deprecated helper fix and a shared path-ID escaping round-trip across all link kinds.

Reviewed by Cursor Bugbot for commit cd967cf. Bugbot is set up for automated code reviews on this repo. Configure here.

@Evanthx
Evanthx requested review from a team as code owners September 29, 2026 17:43
@yuandrew

yuandrew commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

bugbot run

1 similar comment
@yuandrew

yuandrew commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit cd967cf. Configure here.

Comment thread temporalnexus/link_converter.go Outdated
Comment thread temporalnexus/link_converter.go Outdated
Comment thread temporalnexus/link_converter_test.go Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants