Closed alexanderleegs closed 1 year ago
code wise ok, whats our test plan for this PR?
We'll need to test this on staging first, since it only gets triggered if the git file system is in place!
UPDATE: it doesn't work :(
@alexanderleegs this PR is not ready for review yet, right? Could you turn it to draft if more work is needed.
@alexanderleegs this PR is not ready for review yet, right? Could you turn it to draft if more work is needed.
Mostly needs testing - not possible to replicate on local so we need to test on staging
Problem
This PR resolves issues we currently have with concurrent edits on the same file. As not all git operations are awaited before returning (git push is done async), it becomes possible for a git repo to still be locked when a new user attempts to make a change. However, our existing route handlers only look at the status of our mutex lock, which does not take this into consideration. This PR adds an additional method
hasGitFileLock
toGitFileSystemService
, and extends our existing write and rollback handlers to check for the existence of the git file lock before proceeding.This PR has been tested on staging.
To test on local dev:
.git/index.lock
fileYour page could not be updated. Someone else is currently modifying repo a-test-v4. Please try again later.
Resolves IS-434.