-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Use an advisory lock to co-ordinate access to git checkout repos #3592
Conversation
The way I was testing it was to fork both |
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.
utACK
I went ahead and used my personal repo setups to check out your branch and tested it and it works: https://github.com/bingcicle/fuels-rs/actions/runs/3702649777/jobs/6273211503#step:8:236 |
I want to confirm that this works perfectly! Thanks a lot!!! ❤️ |
This introduces an advisory lock around the re-usable git checkout repo directories.
Closes #2603, #3484.
Unfortunately, it's a little tricky to reliably test this from this project repository as doing so requires creating a test project with one or more
git
dependencies. We can't reliably add git dependencies (that point to external repos) to projects within this repo as the dependency would necessarily be at least one commit of forc behind, and as a result it's likely that these dependencies would break at some point in the future, e.g. next time forc makes some breaking change.@segfault-magnet, @hal3e would you mind testing this branch in your use-case mentioned in #2603 to make sure we've covered the issue?
Edit: I've managed to test this locally by adding some long
sleep
s immediately after acquiring the lock guard, and then spinning up multiple processes offorc
locally to build a toy project with multiple git dependencies. All appears to work fine, with each process blocking and waiting its turn for access to the checkout repo.