Skip to content

Conversation

@acroca
Copy link
Member

@acroca acroca commented Nov 10, 2025

Adds changes to introduce workflow versioning as described in dapr/proposals#94

@acroca acroca force-pushed the workflow-versioning branch 2 times, most recently from 0297ee6 to a088915 Compare November 17, 2025 12:40
@acroca acroca force-pushed the workflow-versioning branch 5 times, most recently from 437d90e to 5bac21c Compare November 24, 2025 13:05
@acroca acroca marked this pull request as ready for review November 25, 2025 09:37
@acroca acroca requested a review from a team as a code owner November 25, 2025 09:37
@acroca acroca requested a review from JoshVanL November 25, 2025 09:48
@acroca acroca force-pushed the workflow-versioning branch from 3efe98a to 330ef46 Compare November 25, 2025 10:00
@acroca acroca requested a review from JoshVanL November 25, 2025 13:52
Comment on lines 378 to 379
optional Patches patches = 7;
bool patchMismatch = 8;

Choose a reason for hiding this comment

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

Please wrap related fields into new messages to have better logical grouping and cleaner API extentions.

@acroca acroca requested a review from JoshVanL November 26, 2025 08:34
@acroca
Copy link
Member Author

acroca commented Nov 26, 2025

@JoshVanL I reorganised things a bit, please have a look. I ended up reusing the OrchestrationVersioningInformation in two places, not sure it's a good idea but seems we'll need both patching and workflow version number in those two places.

Signed-off-by: Albert Callarisa <[email protected]>
ORCHESTRATION_STATUS_TERMINATED = 5;
ORCHESTRATION_STATUS_PENDING = 6;
ORCHESTRATION_STATUS_SUSPENDED = 7;
ORCHESTRATION_STATUS_PENDING_PATCH_MISMATCH = 8;
Copy link
Member Author

@acroca acroca Nov 27, 2025

Choose a reason for hiding this comment

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

Q: Based on this comment, do we really want to have different PENDING_ status every time we add a new reason for a workflow to enter a temporary pending status?

Choose a reason for hiding this comment

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

Makes sense, let's have a single PENDING OrchestrationStatus, with typed enum reasons.

optional string targetAppID = 2;
}

message OrchestrationVersioningInformation {

Choose a reason for hiding this comment

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

Information is superfluous. Should use the noun "Version".

Suggested change
message OrchestrationVersioningInformation {
message OrchestrationVersion {

ORCHESTRATION_STATUS_TERMINATED = 5;
ORCHESTRATION_STATUS_PENDING = 6;
ORCHESTRATION_STATUS_SUSPENDED = 7;
ORCHESTRATION_STATUS_PENDING_PATCH_MISMATCH = 8;

Choose a reason for hiding this comment

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

Makes sense, let's have a single PENDING OrchestrationStatus, with typed enum reasons.


message OrchestratorStartedEvent {
// No payload data
optional OrchestrationVersioningInformation versioningInformation = 1;

Choose a reason for hiding this comment

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

Suggested change
optional OrchestrationVersioningInformation versioningInformation = 1;
optional OrchestrationVersion version = 1;

EntityLockRequestedEvent entityLockRequested = 27;
EntityLockGrantedEvent entityLockGranted = 28;
EntityUnlockSentEvent entityUnlockSent = 29;
ExecutionPendingVersionEvent executionPendingVersion = 31;

Choose a reason for hiding this comment

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

Suggested change
ExecutionPendingVersionEvent executionPendingVersion = 31;
ExecutionPending executionPending = 31;

google.protobuf.StringValue input = 1;
}

message ExecutionPendingVersionEvent {

Choose a reason for hiding this comment

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

Suggested change
message ExecutionPendingVersionEvent {
message ExecutionPending {
PendingReason reason = 1;
// Ideally we would have more stringy information here which would tell the user what went wrong, which will be surfaced in `dapr workfow history` etc.
}

Signed-off-by: Albert Callarisa <[email protected]>
@acroca acroca requested a review from JoshVanL November 27, 2025 12:31
@JoshVanL JoshVanL merged commit f6dc9f1 into dapr:main Nov 27, 2025
1 check passed
@acroca acroca deleted the workflow-versioning branch November 27, 2025 12:53
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.

2 participants