Skip to content

Conversation

@acroca
Copy link
Member

@acroca acroca commented Jan 14, 2026

Adds support for full workflow versioning.

The public interface in the TaskRegistry was already added previously but not fully implemented. This PR adds the remaining changes for AddVersionedOrchestratorN and AddVersionedOrchestrator to work as expected.

Signed-off-by: Albert Callarisa <albert@diagrid.io>
@acroca acroca requested a review from a team as a code owner January 14, 2026 15:37
Copy link

@JoshVanL JoshVanL left a comment

Choose a reason for hiding this comment

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

We should update the protos as "NAME_MISSMATCH" is not correct- it should read "VERSION_NOT_AVAILABLE"

Comment on lines 875 to 882
sequenceNumber := ctx.getNextSequenceNumber()
stalledAction := &protos.OrchestratorAction{
Id: sequenceNumber,
OrchestratorActionType: &protos.OrchestratorAction_OrchestratorVersionNotRegistered{
OrchestratorVersionNotRegistered: &protos.OrchestratorVersionNotRegisteredAction{},
},
}
ctx.pendingActions[sequenceNumber] = stalledAction

Choose a reason for hiding this comment

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

Suggested change
sequenceNumber := ctx.getNextSequenceNumber()
stalledAction := &protos.OrchestratorAction{
Id: sequenceNumber,
OrchestratorActionType: &protos.OrchestratorAction_OrchestratorVersionNotRegistered{
OrchestratorVersionNotRegistered: &protos.OrchestratorVersionNotRegisteredAction{},
},
}
ctx.pendingActions[sequenceNumber] = stalledAction
ctx.pendingActions[ctx.getNextSequenceNumber()] = &protos.OrchestratorAction{
Id: sequenceNumber,
OrchestratorActionType: &protos.OrchestratorAction_OrchestratorVersionNotRegistered{
OrchestratorVersionNotRegistered: &protos.OrchestratorVersionNotRegisteredAction{},
},
}

Copy link
Member Author

Choose a reason for hiding this comment

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

kept sequenceNumber as it's needed twice.

Signed-off-by: Albert Callarisa <albert@diagrid.io>
@acroca acroca force-pushed the workflow-versioning branch from b8bf757 to 35abf3c Compare January 14, 2026 16:24
@acroca acroca requested a review from JoshVanL January 14, 2026 16:25
return orchestrator, nil
} else {
return nil, fmt.Errorf("versioned orchestrator '%s' does not have a latest version registered", es.Name)
return nil, api.NewUnsupportedVersionError()

Choose a reason for hiding this comment

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

Do we want to pass the version name to NewUnsupportedVersionError?

Copy link
Member Author

Choose a reason for hiding this comment

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

It would be very useful, this error is only used to trigger the ctx.setVersionNotRegistered(), and the action message doesn't have any properties, so it would not be used...

Signed-off-by: Albert Callarisa <albert@diagrid.io>
@JoshVanL JoshVanL merged commit 9ddc9d1 into dapr:main Jan 14, 2026
2 checks passed
@acroca acroca deleted the workflow-versioning branch January 14, 2026 16: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.

2 participants