-
Notifications
You must be signed in to change notification settings - Fork 23
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
Expose operations, including "historical" operations #474
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…Factory#449) This column is not stored separately, but allows indexing operations by uuid without further modification or redundant storage.
Add get_task_operations Thread this method through from Replica, via TaskDB, to Storage.
Address some missing test coverage identified by `cargo mutants` in GothenburgBitFactory#457.
ryneeverett
approved these changes
Oct 26, 2024
This means tracking which operations have been synced, and a few details such as not allowing removal of synced operations.
This ordering is exposed to the public API and will be useful for presentation of changes to a task, such as those from `get_task_operations`. It's also useful for tests!
This produces a usable "task history" in the form of operations performed on a task. This isn't perfect, and different replicas may see different sets of operations when those operations conflict, but for purposes of displaying a history of a task, this is adequate.
This is required because the non-sealed public trait `StorageTxn` added new methods without a default implementation, which breaks downstream implementations of the trait. No downstream implementations are known, but a major version bump is necessitated all the same.
I added commits for some of the comments, and updated existing commits for the minor bits (dbg!, mostly) |
ryneeverett
approved these changes
Oct 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This stores all operations for all existing tasks, including operations that were entered on other replicas, and makes those available via
get_task_operations
. This functionality will supporttask info
in TaskWarrior, and can support similar "task history" displays in other consumers.As the last commit and the docstrings describe, this isn't perfect -- if there are conflicting operations, then the results may differ between replicas. But those are rare, and in practice this is sufficient to provide information to users. In particular, users who never
task sync
will see correct information.This is a large diff, but broken up into commits, many of which were reviewed and landed previously, but backed out for the 0.8.0 release. Feel free to review commit-by-commit.
Fixes #373.