-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Repo-server doesn't fully clean workspace #3683
Labels
bug/priority:medium
Should be fixed in the next minor releases
bug/severity:major
Malfunction in one of the core component, impacting a majority of users
bug
Something isn't working
Comments
alexmt
added
bug/priority:medium
Should be fixed in the next minor releases
bug/severity:major
Malfunction in one of the core component, impacting a majority of users
labels
Jun 12, 2020
I think I have run into this now when updating my submodule to use https over ssh - the repo server didn't seem to pick up the update. It looks like this major bug is not yet resolved.. |
I confirm that this issue is still present in version 2.6. |
12 tasks
12 tasks
yann-soubeyrand
added a commit
to yann-soubeyrand/argo-cd
that referenced
this issue
May 24, 2023
In some cases, for example when a Git submodule wasn’t present anymore in a Git revision, the repo-server didn’t completely clean up its Git working directory. Fixes argoproj#3683 Signed-off-by: Yann Soubeyrand <yann.soubeyrand@camptocamp.com>
crenshaw-dev
pushed a commit
that referenced
this issue
May 27, 2023
…13001) * refactor(util/git/client): make runCredentialedCmd() signature coherent with runCmd() one Signed-off-by: Yann Soubeyrand <yann.soubeyrand@camptocamp.com> * fix(repo-server): completely clean up Git working directory In some cases, for example when a Git submodule wasn’t present anymore in a Git revision, the repo-server didn’t completely clean up its Git working directory. Fixes #3683 Signed-off-by: Yann Soubeyrand <yann.soubeyrand@camptocamp.com> --------- Signed-off-by: Yann Soubeyrand <yann.soubeyrand@camptocamp.com>
3 tasks
yyzxw
pushed a commit
to yyzxw/argo-cd
that referenced
this issue
Aug 9, 2023
…#3683) (argoproj#13001) * refactor(util/git/client): make runCredentialedCmd() signature coherent with runCmd() one Signed-off-by: Yann Soubeyrand <yann.soubeyrand@camptocamp.com> * fix(repo-server): completely clean up Git working directory In some cases, for example when a Git submodule wasn’t present anymore in a Git revision, the repo-server didn’t completely clean up its Git working directory. Fixes argoproj#3683 Signed-off-by: Yann Soubeyrand <yann.soubeyrand@camptocamp.com> --------- Signed-off-by: Yann Soubeyrand <yann.soubeyrand@camptocamp.com>
tesla59
pushed a commit
to tesla59/argo-cd
that referenced
this issue
Dec 16, 2023
…#3683) (argoproj#13001) * refactor(util/git/client): make runCredentialedCmd() signature coherent with runCmd() one Signed-off-by: Yann Soubeyrand <yann.soubeyrand@camptocamp.com> * fix(repo-server): completely clean up Git working directory In some cases, for example when a Git submodule wasn’t present anymore in a Git revision, the repo-server didn’t completely clean up its Git working directory. Fixes argoproj#3683 Signed-off-by: Yann Soubeyrand <yann.soubeyrand@camptocamp.com> --------- Signed-off-by: Yann Soubeyrand <yann.soubeyrand@camptocamp.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug/priority:medium
Should be fixed in the next minor releases
bug/severity:major
Malfunction in one of the core component, impacting a majority of users
bug
Something isn't working
Describe the bug
When I have two Applications with same git repo (but different branch) there is a situation, when repo-server doesn't fully clean working directory of cloned repo. Directories containing git working directory (including .git subdir) are not cleaned when changing branch by repo-server.
The specific situation is when the one branch has git submodule, but the other one doesn't. After switching the branch, the directory with submodule are kept, even when the new branch doesn't contain it.
It is applicable not only to submodule, but to any subdir with regular .git folder. And it is not applicable only when switching branch, but in the case of hard refresh too.
This is a big problem when the git submodule is subchart because after switching to another branch (branch without that subchart) the subchart is also applied and the deployment doesn't correspond to git.
I've checked that repo-server uses "git clean -fdx", when (according to doc) single "-f" preserves untracked nested git repositories. Using double force "git clean -ffdx" solves the issue.
But better solution may be using "--recurse-submodules" git-checkout argument (as stated here: https://git-scm.com/book/en/v2/Git-Tools-Submodules#Issues-with-Submodules).
To Reproduce
Expected behavior
Full working dir cleanup in all situations when the cleanup is in place.
Version
And I have one question: Is it possible to have .gitconfig with "submodule.recurse true" as a workaround?
The text was updated successfully, but these errors were encountered: