Skip to content

Add per-SDK examples for upgrade-on-Continue-as-New#4653

Open
donald-pinckney wants to merge 5 commits into
mainfrom
docs/upgrade-on-can-sdk-examples
Open

Add per-SDK examples for upgrade-on-Continue-as-New#4653
donald-pinckney wants to merge 5 commits into
mainfrom
docs/upgrade-on-can-sdk-examples

Conversation

@donald-pinckney
Copy link
Copy Markdown
Contributor

@donald-pinckney donald-pinckney commented Jun 3, 2026

What

The Upgrading on Continue-as-New section of worker-versioning.mdx only had a Go code sample under "Checking for new versions." This wraps that sample in an <SdkTabs> block (matching the rest of the file) and adds equivalent examples for Java, Python, TypeScript, .NET and Ruby.

Each example shows the same pattern as the existing Go code:

  1. Detect a new Target Worker Deployment Version via the per-SDK flag on the Workflow info object.
  2. Continue-as-New with the new run's initial versioning behavior set to AUTO_UPGRADE so it starts on the Target Version.
SDK Detect Initial versioning behavior
Java Workflow.getInfo().isTargetWorkerDeploymentVersionChanged() ContinueAsNewOptions ... InitialVersioningBehavior.AUTO_UPGRADE
Python workflow.info().is_target_worker_deployment_version_changed() initial_versioning_behavior=ContinueAsNewVersioningBehavior.AUTO_UPGRADE
TypeScript workflowInfo().targetWorkerDeploymentVersionChanged makeContinueAsNewFunc({ initialVersioningBehavior: InitialVersioningBehavior.AUTO_UPGRADE })
.NET Workflow.TargetWorkerDeploymentVersionChanged ContinueAsNewOptions { InitialVersioningBehavior = InitialVersioningBehavior.AutoUpgrade }
Ruby Temporalio::Workflow.target_worker_deployment_version_changed? raise Temporalio::Workflow::ContinueAsNewError.new(..., initial_versioning_behavior: Temporalio::ContinueAsNewVersioningBehavior::AUTO_UPGRADE)

🤖 Generated with Claude Code

┆Attachments: EDU-6469 Add per-SDK examples for upgrade-on-Continue-as-New

The "Upgrading on Continue-as-New" section only showed a Go code sample.
Wrap it in an <SdkTabs> block matching the rest of the file and add
verified Java, Python, TypeScript, and .NET examples using each SDK's
target-version-changed flag and AUTO_UPGRADE initial versioning behavior.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@donald-pinckney donald-pinckney requested a review from a team as a code owner June 3, 2026 21:00
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
temporal-documentation Ready Ready Preview, Comment Jun 4, 2026 9:48pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

📖 Docs PR preview links

Verified against temporalio/sdk-ruby#404 (worker_workflow_versioning_test.rb):
target_worker_deployment_version_changed? plus ContinueAsNewError with
initial_versioning_behavior: ContinueAsNewVersioningBehavior::AUTO_UPGRADE.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The lazy-moving limitation referenced the Go-specific method name and had
a grammar slip; reword to the SDK-neutral "target-version-changed flag"
since the section now covers all SDKs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
```

</SdkTabs.DotNet>
<SdkTabs.Ruby>
Copy link
Copy Markdown
Contributor

@jsundai jsundai Jun 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It says Java, Python, TypeScript, and .NET in the description, is Ruby apart of it too? @donald-pinckney @THardy98

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, Ruby is a part of it too. I added it in a 2nd commit and forgot to update the PR description!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated the description

@jsundai jsundai self-assigned this Jun 4, 2026
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.

3 participants