Repository navigation
Conversation
DescribeWorkflowExecution lists the channels a run subscribed to and the linked channels that hold state, read from the Workflow component beside the callbacks and the pending Nexus operations. Nothing is written.
…1-describe-channels
The history side of DescribeWorkflowExecution carries the channel subscriptions to the frontend, which passes them through to the public response.
…1-describe-channels
…1-describe-channels
…1-describe-channels
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR reports a workflow's notification channels on
DescribeWorkflowExecution.What changed?
DescribeWorkflowExecutionResponse.channel_subscriptionslists the channels the run stands on: the independent channels it subscribed to and the linked channels that hold any state, sorted by channel name with the independent kind first when a name is in both.service/history/api/describeworkflownext to the callbacks and the pending Nexus operations, from the Workflow component and itsLinkedChannelsmap, through a read-only view. Nothing is written. The frontend passes it through, so the HTTP describe route carrieschannelSubscriptions.tests/describe_channels_test.gocovers the independent lifecycle, the linked kind with its counts, the sort across kinds, continue-as-new and reset, and the HTTP route. Unit tests cover the builder and that the response is a copy.Part of AI-198 (epic AI-37).
Why?
Question 5 of the proposal asked where a workflow's channel standing is visible. Until now only
DescribeChannel, keyed by channel, answered, and nothing showed what a given run listens to or what it holds for its next task. With this field the CLI, the UI and the SDK descriptions show the channels next to the callbacks and the pending Nexus operations.How did you test it?
go build ./..., golangci-lint and theerrortypevet are clean on the touched packages. Unit tests ran for./chasm/lib/workflow/...and./chasm/lib/channel/.... The functional tests ran with-tags disable_grpc_modules,test_dep: describe after a subscribe shows the entry with a zero last counter and the subscribe event id, a notify with no task open shows the scheduled counter at once, a notify while a task is open shows the pending notification and then the scheduled counter once the completion schedules the task, and after that task runs only the last counter remains. A linked channel appears once notified with the linked kind and its counts, a repeat joins no ring, and a callback listener is counted. A name in both kinds shows two entries in order. A continue-as-new successor shows none until it subscribes, a reset run lists the subscription under the same event id, and the HTTP describe carrieschannelSubscriptionswith the counters as strings. The notification channel, linked channel, inline handoff and stream channel suites pass.