Skip to content

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

Merged
jsundai merged 6 commits into
mainfrom
docs/upgrade-on-can-sdk-examples
Jun 9, 2026
Merged

Add per-SDK examples for upgrade-on-Continue-as-New#4653
jsundai merged 6 commits into
mainfrom
docs/upgrade-on-can-sdk-examples

Conversation

@donald-pinckney

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

Copy link
Copy Markdown
Contributor

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

vercel Bot commented Jun 3, 2026

Copy link
Copy Markdown

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

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

Request Review

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

📖 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>

@jsundai jsundai Jun 4, 2026

Copy link
Copy Markdown
Contributor

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
@jsundai jsundai merged commit f31b1af into main Jun 9, 2026
11 checks passed
@jsundai jsundai deleted the docs/upgrade-on-can-sdk-examples branch June 9, 2026 15:42
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