Title: ContinueAsNew does not support specifying a new orchestration version · Issue #276 · microsoft/durabletask-java · GitHub
Open Graph Title: ContinueAsNew does not support specifying a new orchestration version · Issue #276 · microsoft/durabletask-java
X Title: ContinueAsNew does not support specifying a new orchestration version · Issue #276 · microsoft/durabletask-java
Description: Summary The continueAsNew() API does not expose a way to specify a new orchestration version for the restarted instance. The underlying protobuf field (CompleteOrchestrationAction.newVersion, field 4) has existed since the initial proto ...
Open Graph Description: Summary The continueAsNew() API does not expose a way to specify a new orchestration version for the restarted instance. The underlying protobuf field (CompleteOrchestrationAction.newVersion, field...
X Description: Summary The continueAsNew() API does not expose a way to specify a new orchestration version for the restarted instance. The underlying protobuf field (CompleteOrchestrationAction.newVersion, field...
Opengraph URL: https://github.com/microsoft/durabletask-java/issues/276
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ContinueAsNew does not support specifying a new orchestration version","articleBody":"## Summary\n\nThe `continueAsNew()` API does not expose a way to specify a new orchestration version for the restarted instance. The underlying protobuf field (`CompleteOrchestrationAction.newVersion`, field 4) has existed since the initial proto commit, but the Java SDK never populates it.\n\n## Problem\n\n`TaskOrchestrationContext.continueAsNew()` only accepts `(Object input, boolean preserveUnprocessedEvents)`. There is no parameter to pass a new version. In `TaskOrchestrationExecutor`, when building the `CompleteOrchestrationAction`, `setNewVersion()` is never called — the field is always left empty.\n\nThis prevents version migration scenarios for long-running/eternal orchestrations (e.g., monitoring loops that need to evolve their logic over time via `continueAsNew` with a new version).\n\n## What exists today\n\n- **Proto layer**: `CompleteOrchestrationAction.newVersion` (field 4) is defined and supported by all backends (DurableTask.Core since 2014, DTS/Beskar, gRPC sidecar)\n- **Java API**: `continueAsNew(Object input)` and `continueAsNew(Object input, boolean preserveUnprocessedEvents)` — no version parameter\n- **Java executor**: `CompleteOrchestrationAction.Builder` never calls `setNewVersion()`\n\n## Proposed fix\n\nFollow the pattern from the .NET SDK ([microsoft/durabletask-dotnet#682](https://github.com/microsoft/durabletask-dotnet/pull/682)):\n\n1. Add a `ContinueAsNewOptions` class with `newInput`, `preserveUnprocessedEvents`, and `newVersion` properties\n2. Add a `continueAsNew(ContinueAsNewOptions options)` overload to `TaskOrchestrationContext`\n3. In `TaskOrchestrationExecutor`, when `newVersion` is non-null, call `builder.setNewVersion(StringValue.of(newVersion))` on the `CompleteOrchestrationAction`\n\n## Related\n\n- .NET SDK implementation: microsoft/durabletask-dotnet#682\n- Azure Functions extension: Azure/azure-functions-durable-extension#3404\n- Proto field: `CompleteOrchestrationAction.newVersion` (field 4) in `orchestrator_service.proto`","author":{"url":"https://github.com/YunchuWang","@type":"Person","name":"YunchuWang"},"datePublished":"2026-03-27T16:36:46Z","url":"https://github.com/microsoft/durabletask-java/issues/276"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9adb59e8-6322-d64d-390b-e51c7b2e0179 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B582:3A16AC:66C0B:8824B:6AFE31C3 |
| html-safe-nonce | 13fe1bab8f2598ec9cd13bde0df3b1f2d8e674b1f599400687a1c92b21821d00 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTgyOjNBMTZBQzo2NkMwQjo4ODI0Qjo2QUZFMzFDMyIsInZpc2l0b3JfaWQiOiI2NTIzNDI5NzE1MTg3NzQxMTIzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 82fd60cadef6187af5df836d171b2ac65c35bd50dd01a9770e214c7a038fca38 |
| hovercard-subject-tag | issue:4154260720 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/durabletask-java/276/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9135b9236d7a3ba7dd663ec12bab646b724ec877152f48c69cff3938742b224d/microsoft/durabletask-java/issues/276 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9135b9236d7a3ba7dd663ec12bab646b724ec877152f48c69cff3938742b224d/microsoft/durabletask-java/issues/276 |
| og:image:alt | Summary The continueAsNew() API does not expose a way to specify a new orchestration version for the restarted instance. The underlying protobuf field (CompleteOrchestrationAction.newVersion, field... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | YunchuWang |
| hostname | github.com |
| expected-hostname | github.com |
| None | d70e31220a67f6376c108d2416fa8e7df854c1065b1672ab7a88ab6dc3a809e2 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/durabletask-java git https://github.com/microsoft/durabletask-java.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 452823832 |
| octolytics-dimension-repository_nwo | microsoft/durabletask-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 452823832 |
| octolytics-dimension-repository_network_root_nwo | microsoft/durabletask-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ccb88d9c92abe69245b429398c8a57ae87070c7c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width