-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Renovate does not update git submodules when changing branch #26057
Comments
I think we simply need to update submodules when switching base branch. |
yes, it's just that the |
sounds like an easy feature 😊 |
🎉 This issue has been resolved in version 37.80.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Thanks a lot, it fixed my issue and now it works for stable branches. However, I had a failure today in my post-upgrade command:
Not exactly sure why for now but this is new and I guess related to the fix. This |
Please open a new discussion and ideally with reproduction of the new problem. It seems that the problem is during the Makefile executation so perhaps |
I found the culprit and created this discussion #26153. |
Discussed in #25689
Originally posted by mtardy November 10, 2023
How are you running Renovate?
Self-hosted Renovate
If you're self-hosting Renovate, tell us what version of Renovate you run.
37.54.3
If you're self-hosting Renovate, select which platform you are using.
github.com
Was this something which used to work for you, and then stopped?
I am trying to get this working for the first time
Describe the problem
I created a minimal reproduction repository here https://github.com/mtardy/renovate-submodules-repro.
I'm maintaining a project with Renovate that has a git submodule (and use this submodule in go.mod replace directive). Thanks to the option cloneSubmodules it works when I'm working on the main branch.
But when renovate needs to work on a stable branch, let's say v1.0, it
git checkout v1.0
but does not update the submodule along (withgit submodule update --init <module>
for example). So I end up on thev1.0
stable branch with the content of the submodule folder corresponding to the one on the main branch. It then creates a PR with the changes and thus bump the submodule version to the one of the main branch because it never updated it to the correct commit.I hope this a clear explanation! Is there a way to fix that behavior? Apparently, there are ways to immediately update submodules on checkout:
git config submodule.recurse true
.Is there a way to add git configs to the renovate run to pass
git config submodule.recurse true
?I can do a minimal reproduction repository but I guess this explanation is clear enough maybe? Thanks!!
Relevant debug logs
Logs
Have you created a minimal reproduction repository?
I created a minimal reproduction repository here https://github.com/mtardy/renovate-submodules-repro.
The text was updated successfully, but these errors were encountered: