Skip to content

Go examples: move to SDK 1.44.0 and use the Join helper - #1582

Merged
longquanzheng merged 4 commits into
mainfrom
examples/join-go
Nov 11, 2026
Merged

longquanzheng merged 4 commits into
mainfrom
examples/join-go

Conversation

@longquanzheng

Copy link
Copy Markdown
Contributor

Summary

Moves the Go examples to sdk-go v1.44.0 and rewrites the hand-built joins with the Join helper, matching the Java (#1577), TypeScript (#1579), and Python (#1580) migrations.

  • examples/go/go.mod: sdk-go v1.29.0 → v1.44.0, go.sum regenerated. No breaking change from the skipped versions affects the examples.
  • Workflow Patterns (design 9.2): the all-of joins use Fork, EndBranch, ForAllBranches, and BranchResults (MultiChoice still completes early when no branch is selected); the cancelling joins use ForBranches with CancelSiblingSteps; StructuredPartialJoin, BlockingPartialJoin, and StaticPartialJoinForMultipleInstances drop their reset Steps and round-<k> keys, and the next round's split records the previous round's ignored results in ignoredQuotes / ignoredInspections, which the tests read after completion. Unused round helpers are removed.
  • patterns/parallel/await_parallel.go: WorkCompletedJoin = dex.DefineJoin[int]("parallel-complete"), branch input WorkItem{Index, Round}, Await input dex.JoinRound; Step types unchanged.
  • Join names reuse the old Channel names; Flow, Step, RPC, and test names are unchanged. Flows that design 9.2 leaves alone are unchanged. npm run generate:flow-definitions produces no change (the Go examples feed only the customer-refund and connector-factory definitions).

Why

The Join helper shipped in 1.44.0. The examples show the standard way to join parallel branches, and the Workflow Patterns rating update depends on them.

doc-map: no change needed: examples only; the docs and skills update follows after all five languages migrate

Testing

  • make bins, make unitTests, go vet ./..., gofmt, make copyright-check.
  • make e2eTests against server-zd (integ and dealdsl); after the MultiChoice change, TestWorkflowPatterns|TestFlowSmoke.
  • cli go test -tags=integration ./internal/command -run TestVisualize, including the scan of every example source.

Bump examples/go to sdk-go v1.44.0. Replace hand-written Channel and
ChannelMap joins with Join in the WCP join Flows and the parallel Await
example. The partial-join Flows drop their reset Steps; the next round's
split Step resets the previous round with ForRemainingBranches and
records its late results in an Attribute that the tests assert.
Read the ignored-results Attributes after the Flow completes, use
ForBranches for every cancelling partial join, and name the Await
branch input WorkItem.
@longquanzheng
longquanzheng enabled auto-merge (squash) November 11, 2026 03:57
@longquanzheng
longquanzheng merged commit c8fe42d into main Nov 11, 2026
6 checks passed
@longquanzheng
longquanzheng deleted the examples/join-go branch November 11, 2026 04:06
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.

1 participant