-
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
[Utility][Persistence][Savepoints/Rollbacks] Refactor UtilityContext into UtilityUnitOfWork (Issue #563) #577
[Utility][Persistence][Savepoints/Rollbacks] Refactor UtilityContext into UtilityUnitOfWork (Issue #563) #577
Conversation
…#596) ## Description This PR improves DevX by outputting the result of a changelog validation into the PR and requesting changes: ![image](https://user-images.githubusercontent.com/29378614/226392565-f20c77c2-19c7-42f7-8305-c11592f95f09.png) Once the check is successful, the automatically added review comments are dismissed The commits of this PR are also included in #577 ## Issue None because developed in < 4h ## Type of change Please mark the relevant option(s): - [x] New feature, functionality or library - [ ] Bug fix - [ ] Code health or cleanup - [ ] Major breaking change - [ ] Documentation - [ ] Other <!-- add details here if it a different type of change --> ## List of changes - Updated changelog-verify.yaml to automatically review / dismiss changelog specific reviews ## Testing - [ ] `make develop_test` - [ ] [LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md) w/ all of the steps outlined in the `README` ## Required Checklist - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added, or updated, [`godoc` format comments](https://go.dev/blog/godoc) on touched members (see: [tip.golang.org/doc/comment](https://tip.golang.org/doc/comment)) - [ ] I have tested my changes using the available tooling - [ ] I have updated the corresponding CHANGELOG ### If Applicable Checklist - [ ] I have updated the corresponding README(s); local and/or global - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added, or updated, [mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding README(s) - [ ] I have added, or updated, documentation and [mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*` if I updated `shared/*`README(s) --------- Signed-off-by: Alessandro De Blasis <alex@deblasis.net>
…or-utilitycontext-to-utilityunitofwork
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.
"Missing changelog in module: consensus/
Missing changelog in module: persistence/
Missing changelog in module: runtime/
Missing changelog in module: shared/
Missing changelog in module: utility/
Changelog verification failed. See error messages for more detail.
"
Please update the relevant CHANGELOG.md files and ensure they follow the correct format.
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.
Missing changelog in module: consensus/
Missing changelog in module: persistence/
Missing changelog in module: runtime/
Missing changelog in module: shared/
Missing changelog in module: utility/
Changelog verification failed. See error messages for more detail.
Please update the relevant CHANGELOG.md files and ensure they follow the correct format.
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.
Missing changelog in module: shared/
Changelog verification failed. See error messages for more detail.
Please update the relevant CHANGELOG.md files and ensure they follow the correct format.
The check succeeded, dismissing the review comment.
Live test for #596 changelog_automation_ok.mp4Validation transitions from ❌to✅ and the request changes is dismissed successfully |
|
…#596) ## Description This PR improves DevX by outputting the result of a changelog validation into the PR and requesting changes: ![image](https://user-images.githubusercontent.com/29378614/226392565-f20c77c2-19c7-42f7-8305-c11592f95f09.png) Once the check is successful, the automatically added review comments are dismissed The commits of this PR are also included in #577 ## Issue None because developed in < 4h ## Type of change Please mark the relevant option(s): - [x] New feature, functionality or library - [ ] Bug fix - [ ] Code health or cleanup - [ ] Major breaking change - [ ] Documentation - [ ] Other <!-- add details here if it a different type of change --> ## List of changes - Updated changelog-verify.yaml to automatically review / dismiss changelog specific reviews ## Testing - [ ] `make develop_test` - [ ] [LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md) w/ all of the steps outlined in the `README` ## Required Checklist - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added, or updated, [`godoc` format comments](https://go.dev/blog/godoc) on touched members (see: [tip.golang.org/doc/comment](https://tip.golang.org/doc/comment)) - [ ] I have tested my changes using the available tooling - [ ] I have updated the corresponding CHANGELOG ### If Applicable Checklist - [ ] I have updated the corresponding README(s); local and/or global - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added, or updated, [mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding README(s) - [ ] I have added, or updated, documentation and [mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*` if I updated `shared/*`README(s) --------- Signed-off-by: Alessandro De Blasis <alex@deblasis.net>
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.
Really big fan of this change. W/e approach we end up going with, this will make it easier (e.g. storing the key-value pairs we need to roll back to/from in my design approach).
In either case, let's and see how next week goes. I'll try to think of 40 reasons not to go with the JSON approach ;)
|
||
height int64 | ||
|
||
persistenceReadContext modules.PersistenceReadContext |
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.
Can you please add a comment explaining why we have both with a potential example use case.
…pokt-network#596) ## Description This PR improves DevX by outputting the result of a changelog validation into the PR and requesting changes: ![image](https://user-images.githubusercontent.com/29378614/226392565-f20c77c2-19c7-42f7-8305-c11592f95f09.png) Once the check is successful, the automatically added review comments are dismissed The commits of this PR are also included in pokt-network#577 ## Issue None because developed in < 4h ## Type of change Please mark the relevant option(s): - [x] New feature, functionality or library - [ ] Bug fix - [ ] Code health or cleanup - [ ] Major breaking change - [ ] Documentation - [ ] Other <!-- add details here if it a different type of change --> ## List of changes - Updated changelog-verify.yaml to automatically review / dismiss changelog specific reviews ## Testing - [ ] `make develop_test` - [ ] [LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md) w/ all of the steps outlined in the `README` ## Required Checklist - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added, or updated, [`godoc` format comments](https://go.dev/blog/godoc) on touched members (see: [tip.golang.org/doc/comment](https://tip.golang.org/doc/comment)) - [ ] I have tested my changes using the available tooling - [ ] I have updated the corresponding CHANGELOG ### If Applicable Checklist - [ ] I have updated the corresponding README(s); local and/or global - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added, or updated, [mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding README(s) - [ ] I have added, or updated, documentation and [mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*` if I updated `shared/*`README(s) --------- Signed-off-by: Alessandro De Blasis <alex@deblasis.net>
…or-utilitycontext-to-utilityunitofwork Signed-off-by: Alessandro De Blasis <alex@deblasis.net>
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.
Latest date in persistence/docs/CHANGELOG.md is incorrect.
Latest: 2023-03-21, Current: 2023-03-26
Latest date in runtime/docs/CHANGELOG.md is incorrect.
Latest: 2023-03-21, Current: 2023-03-26
Latest date in utility/doc/CHANGELOG.md is incorrect.
Latest: 2023-03-21, Current: 2023-03-26
Changelog verification failed. See error messages for more detail.
Please update the relevant CHANGELOG.md files and ensure they follow the correct format.
The check succeeded, dismissing the review comment.
…p-modules * pokt/main: [Utility][Persistence][Savepoints/Rollbacks] Refactor UtilityContext into UtilityUnitOfWork (Issue #563) (#577) [Consensus] Add Quorum Certificate to the block (#593) docs(wiki): ValueError: Duplicate wiki path: devlog/template (#620) Remove unused import [Infra][P2P] Bug: "address not found in peerstore" error in localnet_debug_client when scaling up Localnet - Issue #604 (#611) [CLI][Localnet][Bug] - [localnet_client_debug] Error 137 - Issue #607 (#608) [Documentation] Fix links to RPC module docs in README (#603)
Description
This PR creates the logical abstraction that would represent the "Unit Of Work" (inspired by Martin Fowler's work in his "Patterns of Enterprise Application Architecture")
Essentially what previously was known as
UtilityContext
becomesLeaderUtilityUnitOfWork
orReplicaUtilityUnitOfWork
depending on the fact that the current node is the Leader or not (in Consensus).It touches many files because it moves everything that is interacting with
Persistence
into theutility/unit_of_work
folder.This is to facilitate subsequent refactorings (see related PRs under #562) into more modular components.
This PR also sets the ground up for the completion of #508
Issue
Fixes #563
Type of change
Please mark the relevant option(s):
List of changes
UtilityContext
to be a polymorphicUtilityOfWork
LeaderUtilityUnitOfWork
andReplicaUtilityUnitOfWork
that expose the methods that are going be to used depending on the "role" of the node in the consensus process.utilityContext
related code underutility/unit_of_work
and renamed all references accordinglyTesting
make develop_test
README
Required Checklist
If Applicable Checklist
shared/docs/*
if I updatedshared/*
README(s)