Repository navigation
Go examples: move to SDK 1.44.0 and use the Join helper - #1582
Merged
Merged
Conversation
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.
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.
Summary
Moves the Go examples to
sdk-gov1.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-gov1.29.0 → v1.44.0,go.sumregenerated. No breaking change from the skipped versions affects the examples.Fork,EndBranch,ForAllBranches, andBranchResults(MultiChoice still completes early when no branch is selected); the cancelling joins useForBrancheswithCancelSiblingSteps; StructuredPartialJoin, BlockingPartialJoin, and StaticPartialJoinForMultipleInstances drop their reset Steps andround-<k>keys, and the next round's split records the previous round's ignored results inignoredQuotes/ignoredInspections, which the tests read after completion. Unused round helpers are removed.patterns/parallel/await_parallel.go:WorkCompletedJoin = dex.DefineJoin[int]("parallel-complete"), branch inputWorkItem{Index, Round}, Await inputdex.JoinRound; Step types unchanged.npm run generate:flow-definitionsproduces 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 e2eTestsagainst server-zd (integ and dealdsl); after the MultiChoice change,TestWorkflowPatterns|TestFlowSmoke.go test -tags=integration ./internal/command -run TestVisualize, including the scan of every example source.