Repository navigation
Inconsistent vault log when pulling secrets from a modified vault (received vault log is different) - should use fast forward merge #714
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingr&d:polykey:core activity 1Secret Vault Sharing and Secret History ManagementSecret Vault Sharing and Secret History Management
Description
Describe the bug
When I pull the changes from a modified vault on my local system, the log on both machines were different, while they should be identical.
cmcdragonkai ➜ matrix-framework-13-ryzen-7040 ➜ ~/Projects/Polykey-CLI
$ ./dist/polykey.js vaults log myvault
commitId 6641db528e0e79412898425a3ea84e349aa5c82b
committer vcj3ufun2506jn44q7rr9bc1hv4c6eebicusfj1bl9sr27ookknlg
timestamp Fri May 03 2024 19:53:49 GMT+1000 (Australian Eastern Standard Time)
message "abc modified\n"
commitId 4e648a16325ebedd0847473ec04f02a0891b1be1
committer vcj3ufun2506jn44q7rr9bc1hv4c6eebicusfj1bl9sr27ookknlg
timestamp Fri May 03 2024 19:45:41 GMT+1000 (Australian Eastern Standard Time)
message "abc modified\n"
commitId c987ff12719344b962e9586aa25b7a28bb328bc8
committer vcj3ufun2506jn44q7rr9bc1hv4c6eebicusfj1bl9sr27ookknlg
timestamp Fri May 03 2024 19:45:13 GMT+1000 (Australian Eastern Standard Time)
message "abc added\n"
commitId 88e97c3937ac2ee86595918d5ef136b9b92d0da0
committer vcj3ufun2506jn44q7rr9bc1hv4c6eebicusfj1bl9sr27ookknlg
timestamp Fri May 03 2024 19:44:02 GMT+1000 (Australian Eastern Standard Time)
message "Initial Commit\n"
aryanj@supercomputer ❯ ./pk vaults log myvault
commitId aa08262fd12acc954561093cd1d4784cf772d588
committer vcj3ufun2506jn44q7rr9bc1hv4c6eebicusfj1bl9sr27ookknlg
timestamp Fri May 03 2024 19:54:14 GMT+1000 (Australian Eastern Standard Time)
message "Merge branch \'HEAD\' of http://\n"
commitId 6641db528e0e79412898425a3ea84e349aa5c82b
committer vcj3ufun2506jn44q7rr9bc1hv4c6eebicusfj1bl9sr27ookknlg
timestamp Fri May 03 2024 19:53:49 GMT+1000 (Australian Eastern Standard Time)
message "abc modified\n"
commitId dd0d131b9997c74cabfe7202e68d3044fe59a5de
committer vet1dhoduhkmn4749r8usiopivklr8i4qoh9kjnhtgeg5rie4nvh0
timestamp Fri May 03 2024 19:48:42 GMT+1000 (Australian Eastern Standard Time)
message "Initial Commit\n"
commitId 4e648a16325ebedd0847473ec04f02a0891b1be1
committer vcj3ufun2506jn44q7rr9bc1hv4c6eebicusfj1bl9sr27ookknlg
timestamp Fri May 03 2024 19:45:41 GMT+1000 (Australian Eastern Standard Time)
message "abc modified\n"
commitId c987ff12719344b962e9586aa25b7a28bb328bc8
committer vcj3ufun2506jn44q7rr9bc1hv4c6eebicusfj1bl9sr27ookknlg
timestamp Fri May 03 2024 19:45:13 GMT+1000 (Australian Eastern Standard Time)
message "abc added\n"
commitId 88e97c3937ac2ee86595918d5ef136b9b92d0da0
committer vcj3ufun2506jn44q7rr9bc1hv4c6eebicusfj1bl9sr27ookknlg
timestamp Fri May 03 2024 19:44:02 GMT+1000 (Australian Eastern Standard Time)
message "Initial Commit\n"
To Reproduce
- Add a secret to a vault
- Share the vault
- Modify the secret in the vault
- Pull changes for the log
- Observe different logs
Expected behavior
The logs should be identical for any and all instances of the vault, irrelevant of the vault pulling new changes or not.
Screenshots
Platform (please complete the following information)
- Device: Acer Spin 3 (SP314-54N)
- OS: Arch Linux (Kernel 6.8.5-arch1-1 64-bit)
- Version: 1.2.3-alpha.4
Additional context
This is a bug with the vault log - pull system. Needs to be fast forward merge.
_Originally posted by @CMCDragonkai in #709 (comment)
Notify maintainers
Resolved
This was adressed by doing the following.
- When calling
git.cloneandgit.pullI made sure to target thecanonicalBranchref name. This really was all that was needed to make sure that the history was correct. - I also enabled the
fastForwardandfastForwardOnlyflags forgit.pullto ensure only linear history was pulled from the remote.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingr&d:polykey:core activity 1Secret Vault Sharing and Secret History ManagementSecret Vault Sharing and Secret History Management
Activity
linear commentedon May 6, 2024
ENG-306 Inconsistent local log when pulling secrets from a modified vault
[-]Inconsistent local log when pulling secrets from a modified vault[/-][+]Inconsistent vault log when pulling secrets from a modified vault (received vault log is different) - should use fast forward merge[/+]CMCDragonkai commentedon May 7, 2024
Maybe this can snuck into #709 if it is due to the git domain issue.
fix: fixed inconsistent vaults history when pulling
fix: fixed inconsistent vaults history when pulling
CMCDragonkai commentedon May 21, 2024
Would this only be completed if you've also pushed this up to Polykey-CLI? I don't think a new version is updated yet? @brian.botha
tegefaulkes commentedon May 22, 2024
That is true, I'm going to do a new release now.
tegefaulkes commentedon May 26, 2024
This needs to be retested manually to be sure that the fix is been addressed
CMCDragonkai commentedon May 27, 2024
Should new issues be created in PK-CLI for such integration/acceptance testing? It's not enough to be done on the PK library - you may do it with @CryptoTotalWar.
tegefaulkes commentedon May 28, 2024
I'd say for things like this, this issue shouldn't be closed until confirmed manually in the CLI after a release.