-
Notifications
You must be signed in to change notification settings - Fork 5
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 making a change in a file using await vault.commit(...) and changing only a single number on that file will sometimes cause isomorphic-git to not recognise that the file has been modified and therefore if no other changes were made a commit will not be made even though a file was changed.
To Reproduce
- Add a file using
await vault.commit
const secretVer1 = {
name: secretName,
content: 'Secret-1-content-ver1',
};
- Modify the file using
await vault.commit
const secretVer2 = {
name: secretName,
content: 'Secret-1-content-ver2',
};
- Check the log using
await vault.logto see if the most recent modification shows up.
NOTE: This won't happen ALL the time. It seems to be most common when running large groups of tests together?
Expected behavior
We expect any file change, even a single digit change to be detected by isomorphic-git and therefore create a new commit when vault.commit is used.
Additional context
- Most likely related to this issue on
isomorphic-git - This issue has given a possible workaround by using
resetIndexon each file in the vault - Discussion about the problem is here
- This issue created for EFS has the potential to resolve this issue
Resolved
This was addressed by doing the following.
- All contents of the vault are added using
git.addbefore processing thestatusMatrix. Making sure everything is staged beforehand essentially solves the issue. - Simplified the logic for handling the
statusMatrixto a much simplerswitchstatement.
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