Submodules not disabled for git mirrors
Hi, I think I've hit an edge case with git mirrors and submodules disabled with agent-stack-k8s.
It seems that git submodule foreach --recursive "git clean -ffxdq" gets run during git mirror updates, even when we have disabled submodules (using the agent-stack-k8s noSubmodules option which just sets the corresponding env var under the hood).
This doesn't seem to cause an issue normally, I guess because the submodules weren't initialized, but we recently had a change committed by accident which added an unused submodule without a corresponding .gitmodules entry. This caused the above command to complain fatal: No url found for submodule path 'xyz' in .gitmodules which completely broke all our builds once the commit got to main :(
It seems like when submodules are disabled, the git mirror functionality should ignore submodules as well? Or have a separate option to disable submodules for mirrors that we could set.
Hi @bpoland 👋🏼
We've been discussing this internally and what I had previously opened a PR for is not going to be a viable path forward. Primarily, this functionality was originally add to resolve issues that are related to what you've found here.
There are a few ideas floating around about what could be done here instead, and I've passed this through to the rest of the team to spend some time on and come back to you with a better idea.
Hi @bpoland 👋🏼
We've been discussing this internally and what I had previously opened a PR for is not going to be a viable path forward. Primarily, this functionality was originally add to resolve issues that are related to what you've found here.
There are a few ideas floating around about what could be done here instead, and I've passed this through to the rest of the team to spend some time on and come back to you with a better idea.
Okay, thanks for the update. Let me know if I can provide any more info to help!