Skip to content
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

Better: Prepend .gitconfig with random hash to allow concurrency #9219

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ylecuyer
Copy link
Contributor

@ylecuyer ylecuyer commented Mar 5, 2024

Hello,

I followed the advice here https://github.com/dependabot/dependabot-script/blob/main/update-script.rb#L32 and went with looping all dependencies. I also went a bit further and added https://github.com/grosser/parallel with an each in process to speed up the handling of dependencies.

But I faced the issue that all processes try to update the same .gitconfig file at the same time which is locked.

The fix I propose here is to prepend the .gitconfig file name with a random hash to avoid conflicts

@ylecuyer ylecuyer requested a review from a team as a code owner March 5, 2024 22:49
@yeikel
Copy link
Contributor

yeikel commented Mar 14, 2024

This is an interesting change. I implemented a similar change in my internal fork and I faced the same challenge. Interestedly enough, it only seems to apply to some ecosystems. Maven for example, does not have this problem

@yeikel
Copy link
Contributor

yeikel commented Mar 19, 2024

@JamieMagee Can you take a look at this one

@yeikel
Copy link
Contributor

yeikel commented Apr 3, 2024

I can confirm that we have seen this with npm and go. Example error:

error: could not lock config file /home/dependabot/.gitconfig: File exists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants