Parallel git calls with simple-git leads to random errors in git-submodules manager #11659
Labels
good first issue
Suitable for new contributors
help wanted
Help is needed or welcomed on this issue
manager:git-submodules
Git Submodules manager
priority-2-high
Bugs impacting wide number of users or very important features
type:bug
Bug fix of existing functionality
How are you running Renovate?
Self-hosted
Please select which platform you are using if self-hosting.
Bitbucket Server
If you're self-hosting Renovate, tell us what version of Renovate you run.
25.76.2
Describe the bug
We are using Renovate to update up to 80 Git submodules on a single BitBucket repository.
On each execution, Renovate logs show Invalid url errors on a random subset of submodules, causing Renovate to ignore these submodules. I want to emphasize that the list of failing submodules varies on each execution. Occasionally, there is no error at all.
After a lot of troubleshooting, we found that this is most likely related to a bug in simple-git (see steveukx/git-js#320), which doesn't play well with parallel executions of Git.
When updating submodules, Renovate executes a bunch of Git commands for each submodule, all in parallel :
renovate/lib/manager/git-submodules/extract.ts
Lines 101 to 134 in 6eafd2f
In our case, it causes
const subModuleUrl = await getUrl(git, gitModulesPath, name);
to occasionally return an empty string, causing an Invalid url error ingetHttpUrl()
.We tried several workarounds. One of them seems to work pretty well : replacing
Promise.all(...)
by a sequential loop :Relevant debug logs
Logs
Have you created a minimal reproduction repository?
No reproduction repository
The text was updated successfully, but these errors were encountered: