Repository navigation
Rust examples: move to SDK 1.44.0 and use the Join helper - #1583
Merged
Merged
Conversation
…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.
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 Rust examples to
dex-sdk1.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.lockupdated. No breaking change from 1.32 to 1.43 affects the examples. One test changes:pull_worker_stops_when_startup_failsnow matches the typedSdkError::Servicewith operationget_server_infoinstead of the old error text.static LazyLock<Join<T>>with the old Channel name, registered withPersistenceSchema::join.fork,end_branch,for_all_branches, andbranch_results(MultiChoice still completes early when no branch is selected); the cancelling joins usefor_brancheswithcancel_sibling_step; StructuredPartialJoin, BlockingPartialJoin, and StaticPartialJoinForMultipleInstances drop their reset Steps andround_instance(), and the next round's split records the previous round's ignored results inignoredQuotes/ignoredInspections, which the tests read after completion.patterns/parallelAwait:Join<usize>("parallel-complete"), branch inputWorkItem { index, round }, Await inputJoinRound; Step types 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.shagainst dexcli dev and server-zd: integ 17, Workflow Patterns 41, control structure patterns 11, flow smoke 11, all passed.