Skip to content

Rust examples: move to SDK 1.44.0 and use the Join helper - #1583

Merged
longquanzheng merged 3 commits into
mainfrom
examples/join-rust
Nov 11, 2026
Merged

longquanzheng merged 3 commits into
mainfrom
examples/join-rust

Conversation

@longquanzheng

Copy link
Copy Markdown
Contributor

Summary

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

  • examples/rust/Cargo.toml: dex-sdk =1.31.0 → =1.44.0, Cargo.lock updated. No breaking change from 1.32 to 1.43 affects the examples. One test changes: pull_worker_stops_when_startup_fails now matches the typed SdkError::Service with operation get_server_info instead of the old error text.
  • Every Join is a module-level static LazyLock<Join<T>> with the old Channel name, registered with PersistenceSchema::join.
  • Workflow Patterns (design 9.2): the all-of joins use fork, end_branch, for_all_branches, and branch_results (MultiChoice still completes early when no branch is selected); the cancelling joins use for_branches with cancel_sibling_step; StructuredPartialJoin, BlockingPartialJoin, and StaticPartialJoinForMultipleInstances drop their reset Steps and round_instance(), and the next round's split records the previous round's ignored results in ignoredQuotes / ignoredInspections, which the tests read after completion.
  • patterns/parallel Await: Join<usize>("parallel-complete"), branch input WorkItem { index, round }, Await input JoinRound; Step types unchanged.
  • Flow, Step, RPC, and test names are unchanged. Flows that design 9.2 leaves alone are unchanged.

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 fmt-check, make clippy (-D warnings), make test.
  • ./run-integration-tests.sh against dexcli dev and server-zd: integ 17, Workflow Patterns 41, control structure patterns 11, flow smoke 11, all passed.

…ttern

Bump examples/rust to dex-sdk 1.44.0. Migrate the parallel-split,
multi-choice, thread, multiple-instance, cancelling, and reset partial
join Flows and AwaitParallelStepsFlow from hand-written Channel counts
to Join. The reset partial joins drop their reset Steps: the next
round's split resets the previous round and records its late results
in an Attribute that the tests read.
dex-sdk 1.44 reports a failed GetServerInfo as a typed service error
for the get_server_info operation instead of a message containing
"GetServerInfo failed". Assert the operation instead.
Fail the Flow when a split's round is below 1, when previous_round is
missing after round 1 or present in round 1, or when
required_inspections is outside 1..=inspection_count. Note that the
last round's late results stay pending until the Flow closes.
@longquanzheng
longquanzheng enabled auto-merge (squash) November 11, 2026 03:59
@longquanzheng
longquanzheng merged commit 913a9cc into main Nov 11, 2026
5 checks passed
@longquanzheng
longquanzheng deleted the examples/join-rust branch November 11, 2026 04:07
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