-
Notifications
You must be signed in to change notification settings - Fork 4
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
General vaults review and fixes #720
Conversation
What's the order of merging in relation to #709? |
#709 merges first and then this one. |
291bad1
to
46ff0bb
Compare
46ff0bb
to
22775a7
Compare
Switched base over staging now that git refactoring has been merged. |
In the |
One of the vaults test for pulling was failing randomly. With some testing I found that it's random network traffic with the mainnet. I'll need to make sure any tests using a node connection don't actually try to join the mainnet when testing. In this case we have a So yeah, there are two problems here.
|
I may need to add #461 to this to address the intermittent failure mentioned above. Though at the same time, I feel like this PR is getting too large in scope? I'll think about it. |
I made a new issue #722 And it will be addressed later, outside this PR. |
I don't like this. It makes it the only secret command that functions against the node's filesystem and not the |
So The problem here is
|
I'm working on #714 right now. It's a pretty simple fix. However I found that we don't test the case where you pull a vault that deviated from the original history. I modified a test to check this and
So I'm not actually sure it's possible to handle this case. We'd have to clone the vault from scratch to handle it really. Do we just throw an error urging the user to clone the vault fresh due to the deviating history? |
When you a pull a vault into a deviated history. This is what supposed to happen:
At a higher level, the user upon editing a vault that is "pulled", should be doing a COW operation, the vault must be duplicated and separated from the old vault. The old vault maintains its ability to be pulled. This means you cannot have a deviated history at all. It's not allowed by the constraints of the system. |
I'm aware that we restrict editing of a vault that has been cloned. But the remote vault we clone from can do a branching commit and completely change it's history. Do we apply the same restraint in this case? Where we disallow pulling a vault who's history no longer matches our cloned vault's history? Different sides of the same coin really. Just want to be clear since the example you gave was the opposite side to the example I described. |
It must be disallowed on both sides. Linear history must be maintained. If the other side corrupted the vault, you just decline the ability to pull. You indicate why. |
I still need to do one last once-over, but it's ready for review. Doesn't need a deep review. Just so you are aware of changes and the more eyes on it the better. @CMCDragonkai @amydevs I'll run through the checklist after review. No point doing most of the checklist if there are changes that need to be made still. |
And do you have a corresponding exception for these cases now? |
Yes, there was an existing error for this called |
Does Are you preventing the node from mutating its own (pulled/cloned) vault, and breaking history for a vault that has been pulled or cloned...? Or maybe the error only shows up on the pulling/cloning side? |
You should update the spec of this PR describing any protocol changes - and how was the solution implemented in a human readable manner. Including in reference to the above comments. |
Yes, weather the local history diverged or the remove diverged, it looks like a disconnect in the history that requires a merge. So the same error in both cases. We can't modify local history anyway since any attempt to do so will result in a |
7df974f
to
d83760a
Compare
Ready to merge. I'll write up the changes in a moment. |
Ok message should be updated.
20 May 2024 14:36:00 Brian Botha ***@***.***>:
…
***@***.**** commented on this pull request.
----------------------------------------
In src/git/http.ts[#720 (comment)]:
> + } catch (e) {
+ // Return without sending any data
+ return;
+ }
if (packFile.packfile == null) utils.never('failed to create packFile data');
let packFileBuffer = Buffer.from(packFile.packfile.buffer);
I mis-remembered, the *never* here is just to enforce the fact that *packfile* is defined. By our usage it should always be defined. So the *never* is proper here, just the message is off point.
/**
* - The packfile contents. Not present if `write` parameter was true, in which case the packfile was written straight to disk.
*/
packfile?: Uint8Array;
};
—
Reply to this email directly, view it on GitHub[#720 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AAE4OHNLXJNGWXC7FT5QB33ZDF4S3AVCNFSM6AAAAABHVTVYWGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDANRVGMZDMNJXGE].
You are receiving this because you were mentioned.
[Tracking image][https://github.com/notifications/beacon/AAE4OHKJBG66OMQSOCEB5GLZDF4S3A5CNFSM6AAAAABHVTVYWGWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTT3DJQ6W.gif]
|
[ci skip]
Description
This PR handles a general review of the vaults domain. General optimisations if they can be applied. Minor fixes for vault related issues and some touch ups to the vaults tests.
NOTE: this branches off from the git refactoring PR and is targeting that for now. But once the git refactoring is merged then this needs to rebase and target staging.
Issues Fixed
status
call #260Tasks
status
call #260Final checklist