-
Notifications
You must be signed in to change notification settings - Fork 420
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
Add Git submodules remote tracking #265
Comments
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/lifecycle frozen |
I finally got around to looking at this, and I think it is worth discussing the design, since I do not use this feature of git myself. Should it be fundamentally async to the main sync loop? The current PR seems to be, but this is a problem because such updates are not atomic, meaning a consumer could see the repo in an inconsistent state. I think, for sanity, we need to do it all in-phase with the main sync loop, and do it in a new worktree. This is an issue because there's a sort of contract that the basename of the thing the link points to is the hash that is checked out. If the remote tracking needs to update, it could be the same "main" hash. We could maybe do some indiana-jones-swapping-the-idol trickery to retain this property, creating a new worktree and playing with links, like:
We still need to figure out for each remote tracking branch whether it needs to be updated before we do any of this work. So roughly: check main repo for updates Almost certainly needs some internal refactoring to accomodate. Then we need to consider impact on hooks - do we re-run webhook and exechook notifiers? I think we have to, but they only get the hash of the main repo as an argument. We may need to change that, too. There may be more to consider, but this is a start :) |
Add Git submodules remote tracking
Always update the registered submodules using the remote-tracking branch
instead of the superproject's recorded SHA-1.
Only apply to the submodules' name that listed in the
--submodules-remote-tracking
parameter, otherwise default behavior will be applied.Update the latest registered configurations submodule from remote repository
./git-sync ... --submodules-remote-tracking="deployment-configs,app-configs"
The text was updated successfully, but these errors were encountered: