-
Notifications
You must be signed in to change notification settings - Fork 115
Add options to GetVersion for executeWithVersion and executeWithMinVersion #1008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
pandeyanshuman
wants to merge
17
commits into
cadence-workflow:master
from
pandeyanshuman:add-options-to-get-version
Closed
Add options to GetVersion for executeWithVersion and executeWithMinVersion #1008
pandeyanshuman
wants to merge
17
commits into
cadence-workflow:master
from
pandeyanshuman:add-options-to-get-version
Conversation
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
Add support for ExecuteWithVersion and ExecuteWithMinVersion options to getVersion method, porting functionality from cadence-go-client PRs #1427 and #1428. Changes: - Add GetVersionOptions class with builder pattern for version control configuration - Add executeWithVersion() and executeWithMinVersion() methods to GetVersionOptions - Add overloaded getVersion() method that accepts GetVersionOptions parameter - Add convenience methods getVersionWithCustomVersion() and getVersionWithMinVersion() - Update all workflow interceptor interfaces and implementations to support new options - Update DecisionContext, ClockDecisionContext, and related classes for version selection logic - Add testing framework support for enhanced version control features - Add comprehensive test coverage for new functionality This enables safer deployment strategies and more granular control over workflow version execution, allowing developers to: - Force specific versions instead of max supported version - Use minimum supported version for backward compatibility - Test workflows with enhanced version control in test environments Fixes compilation errors and ensures all existing functionality remains compatible.
…al log for TEnumType converter (cadence-workflow#1011) What changed? added deprecation log for TEnumType converter log only payload class rather than body Why? In V4, default support for thrift message will be dropped
What changed? point API to the new central publisher portal change github release action to directly release Why? deprecation of old nexus portal How did you test it? locally uploaded (see https://central.sonatype.com/artifact/com.uber.cadence/cadence-client/3.12.8-rc.1)
* Added github action tests * Fix naming in yaml file --------- Co-authored-by: Mandy Chen <[email protected]>
* Always upload artifacts * Test upload after fail * Try with running test * Remove forced fail --------- Co-authored-by: Mandy Chen <[email protected]>
Co-authored-by: Mandy Chen <[email protected]>
Co-authored-by: Evan Sandoval <[email protected]>
What changed? Remove internal TaskListKind entity use thrift entity directly (like everywhere else in the repo) Why? This complicates things and particularly for thrift deprecation How did you test it? Unit Test Signed-off-by: Shijie Sheng <[email protected]>
Signed-off-by: Shijie Sheng <[email protected]> What changed? Remove raw history support in client. (It's already reviewed and merged in a side branch cadence-workflow#1004 ) Now we are checking into main branch Why? History is stored as Thrift encoded binary. Sending raw history in Thrift will no longer be supported in V4 How did you test it? Unit Test
Signed-off-by: Shijie Sheng <[email protected]> What changed? Add new internal entities that will replace thrift ones. These entities will be used in the next few diffs that removed thrift support. To generate entities, ./scripts/v4_entity_generator/run.sh Why? Thrift entities are not easily replaceable by GRPC ones. One quick approach for deprecation is to generate similar interface internal entities to replace thrift ones. How did you test it? These are generated by script
cadence-workflow#1022) What changed? Migration Guide To construct GRPC Workflow Service use new WorkflowServiceGrpc() instead of new Thrift2ProtoAdapter(IGrpcServiceStubs.newInstance()); Removed TException and now all workflow service method returns CadenceError instead; Replaced thrift generated entities with internal entities (Currently still generated from thrift files but no longer has runtime dependency on thrift); Removed support for thrift entities in default data converter; Why? Java thrift deprecation How did you test it? Unit Test
…ow#1027) What changed? Default data converter would throw I/O exception and thus fail workflow processing if the exception no longer exists. This PR changes the behavior by return null instead. Why? In V4, thrift exceptions will be removed and thus this is needed to avoid breaking existing workflows. How did you test it? Unit Test
…ow#1028) Signed-off-by: Chris Warren <[email protected]>
Signed-off-by: Chris Warren <[email protected]>
…-workflow#1030) What changed? nullable check before setting the field in GRPC entities Why? GRPC entities have nullable checks
auto-merge was automatically disabled
October 13, 2025 11:08
Pull request was closed
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.
What changed?
GetVersionOptions
class with builder pattern for configuring version control behaviorexecuteWithVersion(int version)
option to force a specific version instead of max supported versionexecuteWithMinVersion()
option to use min supported version instead of max supported versiongetVersion()
method to accept optionalGetVersionOptions
parametergetVersionWithCustomVersion()
andgetVersionWithMinVersion()
ClockDecisionContext
andDecisionContext
for version selectionWhy?
This change ports the enhanced version control functionality from the Go client (PRs #1427 and #1428) to the Java client, enabling safer deployment strategies and more granular control over workflow version execution. The new options allow developers to:
This improves the workflow versioning system by providing more granular control over version execution, enabling safer rollouts of workflow changes.
How did you test it?
GetVersionOptionsTest.java
covering all builder methods and edge casesEnhancedGetVersionTest.java
demonstrating real workflow execution with new optionsTestWorkflowEnvironmentGetVersionTest.java
to verify testing framework supportWorkflowTest.java
to ensure backward compatibilitygetVersion()
calls continue to work without modificationdocker-compose -f docker-compose.yaml run unit-test-test-service
passedPotential risks
getVersion()
without options will continue to work exactly as beforeRelease notes
This is a notable feature addition that should be mentioned in the release notes:
GetVersionOptions
executeWithVersion()
andexecuteWithMinVersion()
options togetVersion()
methodgetVersionWithCustomVersion()
andgetVersionWithMinVersion()
Documentation Changes
Yes, documentation updates should be made to reflect the new version control features:
GetVersionOptions
executeWithVersion()
andexecuteWithMinVersion()
The documentation should be updated in the Cadence documentation repository to help users understand and adopt these new features effectively.