-
Notifications
You must be signed in to change notification settings - Fork 33
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
Support reusing orchestration id #46
Conversation
Draft the PR, need more tests |
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.
Happy to see the progress on this. See my comments below. I think we may want to simplify/tighten our implementation of this feature.
@cgillum , re-implemented the logic so it doesn't query existing instances at the beginning and most logic goes to backend implementation to utilize the isolation benefit provided by db transaction. The core logic is a little different from the pseudo-code we discussed at #42 (comment), but the effect is the same and more readable. I assume it still needs a lot of improvement and updates, but would like to get your opinion on the high-level implementation direction. Thanks. |
tagging @ItalyPaleAle for helping review as well. Thank you Ale! |
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.
Some initial feedback based on reviewing the test code. I'll focus a bit more on the main code once I feel that we have the right tests in place.
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.
Some feedback on the core design.
2290604
to
a74c223
Compare
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.
A few more comments.
api/orchestration.go
Outdated
ErrNotCompleted = errors.New("orchestration has not yet completed") | ||
ErrNoFailures = errors.New("orchestration did not report failure details") | ||
ErrDuplicateInstance = errors.New("orchestration instance already exists") | ||
ErrSkipInstance = errors.New("skip creating orchestration instance") |
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.
Are you using VS Code with the Go extension for editing? Normally it would auto-format the code when you save to line up all the =
signs.
api/orchestration.go
Outdated
ErrNotCompleted = errors.New("orchestration has not yet completed") | ||
ErrNoFailures = errors.New("orchestration did not report failure details") | ||
ErrDuplicateInstance = errors.New("orchestration instance already exists") | ||
ErrIgnoreInstance = errors.New("ignore creating orchestration instance") |
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.
Looks like there are still some issues with the whitespace here :(
CHANGELOG.md
Outdated
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. | |||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | |||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | |||
|
|||
## [v0.3.2] - 2023-12-11 |
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.
## [v0.3.2] - 2023-12-11 | |
## [Unreleased] |
This PR tries to update the logic to support reuse orchestration ID, more details can be found #42, dapr/dapr#7101
Corresponding protobuf updates can be found microsoft/durabletask-protobuf#19