-
Notifications
You must be signed in to change notification settings - Fork 15
Full workflow versioning #61
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
Conversation
Signed-off-by: Albert Callarisa <albert@diagrid.io>
JoshVanL
left a comment
There was a problem hiding this 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"
task/orchestrator.go
Outdated
| sequenceNumber := ctx.getNextSequenceNumber() | ||
| stalledAction := &protos.OrchestratorAction{ | ||
| Id: sequenceNumber, | ||
| OrchestratorActionType: &protos.OrchestratorAction_OrchestratorVersionNotRegistered{ | ||
| OrchestratorVersionNotRegistered: &protos.OrchestratorVersionNotRegisteredAction{}, | ||
| }, | ||
| } | ||
| ctx.pendingActions[sequenceNumber] = stalledAction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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{}, | |
| }, | |
| } |
There was a problem hiding this comment.
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>
b8bf757 to
35abf3c
Compare
| return orchestrator, nil | ||
| } else { | ||
| return nil, fmt.Errorf("versioned orchestrator '%s' does not have a latest version registered", es.Name) | ||
| return nil, api.NewUnsupportedVersionError() |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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>
Adds support for full workflow versioning.
The public interface in the
TaskRegistrywas already added previously but not fully implemented. This PR adds the remaining changes forAddVersionedOrchestratorNandAddVersionedOrchestratorto work as expected.