Skip to content

Propagate backlinks on Signal and Signal-with-Start responses#9897

Open
long-nt-tran wants to merge 1 commit intotemporalio:mainfrom
long-nt-tran:signals-updates-backlink
Open

Propagate backlinks on Signal and Signal-with-Start responses#9897
long-nt-tran wants to merge 1 commit intotemporalio:mainfrom
long-nt-tran:signals-updates-backlink

Conversation

@long-nt-tran
Copy link
Copy Markdown
Contributor

@long-nt-tran long-nt-tran commented Apr 9, 2026

What changed?

With these PRs to add the link field on these responses protobufs:

This PR adds logic from the server that does the following:

  • Change internal history protos to attach link on signal and signal-with-start responses and make proto
  • Update history API handlers for signalworkflow and signalwithstartworkflow to propagate the link from request back to the history response
  • Update the frontend API handlers for signal and signal-with-start to propagate the link from the history response
  • Opportunistic refactoring of link generation to link_util.go

Note

From discussion w/ @Quinn-With-Two-Ns since signals are buffered, the link is generated with a reference to the RequestId rather than EventId.

Why?

This will enable the caller of the signal to have a backlink to the cross-namespace signal invoked, which will become more relevant for Nexus SDK ergonomics.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Unit tests

$ go test ./service/history/api/signalworkflow/ -run TestSignalWorkflowSuite -count=1
ok      go.temporal.io/server/service/history/api/signalworkflow        0.893s
$ go test ./service/history/api/signalwithstartworkflow/ -run TestInvokeSignalWithStartSuite -count=1
ok      go.temporal.io/server/service/history/api/signalwithstartworkflow       0.860s

Functional tests

$ go test ./tests/ -run TestLinksTestSuite
ok      go.temporal.io/server/tests     1.486s

Potential risks

Need to test end-to-end to see that the link shows up correctly in the Web UI.

@long-nt-tran long-nt-tran force-pushed the signals-updates-backlink branch 2 times, most recently from 550bf51 to 589224e Compare April 10, 2026 16:03
@long-nt-tran long-nt-tran force-pushed the signals-updates-backlink branch from 589224e to 4c69cc2 Compare April 10, 2026 16:22
Comment on lines +219 to +220

replace go.temporal.io/api => github.com/long-nt-tran/api-go v0.0.0-20260410154440-a741268f8bab
Copy link
Copy Markdown
Contributor Author

@long-nt-tran long-nt-tran Apr 10, 2026

Choose a reason for hiding this comment

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

only pointing to my fork for CI tests, will wait for temporalio/api#761 and subsequent api-go codegen to be merged and then remove these before I merge this PR

@long-nt-tran long-nt-tran marked this pull request as ready for review April 10, 2026 16:48
@long-nt-tran long-nt-tran requested review from a team as code owners April 10, 2026 16:48
Copy link
Copy Markdown
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

Here's what's missing:

  • Adding to the map that tracks request ID to event ID
  • A functional test that verifies that request IDs for all of these requests are added to the map
  • Ensure that the workflow start link is only populated if an execution was started

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A test that's all mocked out doesn't provide a ton of value IMHO. Just test this with functional tests in the tests/ directory.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same as above.

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