implement dual-write workflows with go-workflows #28
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.
Implement as alternative to MSFT's durable-task
Also undoes #27, because that was a bad idea ™️ 🙈 The amount of complexity it added did not justify it, and both implementations are different enough to become a mess to reconcile both
Main benefits:
Backend
interfaceDrawbacks:
Forked go-workflows
I forked
go-workflows
because I couldn't makeko
build a CGO-enabled image, so I replaced the CGO library with the Go native library in my fork. This will come in handy as I bring in the Postgres driver tooIt's also modified to set the maximum number of connections to 1. SQLite is designed to have multiple readers and a single writer, so whenever 2 processes attempt to write to the same database, a
database is locked (5) (SQLITE_BUSY)
will show up. Followed the advice in mattn/go-sqlite3#274Changes to tests
Some E2E tasks were changed due to some subtle changes to how
go-workflows
handles errors:go-workflows
: on panic, tasks are rescheduled and retried, client future blocks until task succeedsdurabletask-go
: panic is returned as error to the client right awayFor that reason, when operations are idempotent,
go-workflows
eventually succeeds, whiledurabletask-go
has the compensatory code invoked and the client needs to retry.This is the behaviour I also expected in
durabletask-go
, as per my review in #16. Perhaps retries need to be explicitly configured? 🤷🏻Follow ups
CheckKubeResource
activity fails