Skip to content
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

git clone should not try to clone submodules and surface errors properly #3581

Closed
Panaetius opened this issue Aug 10, 2023 · 0 comments · Fixed by #3630
Closed

git clone should not try to clone submodules and surface errors properly #3581

Panaetius opened this issue Aug 10, 2023 · 0 comments · Fixed by #3630
Assignees
Labels

Comments

@Panaetius
Copy link
Member

The code in https://github.com/SwissDataScienceCenter/renku-python/blob/master/renku/core/util/git.py#L825-L833 will try to clone a repo with a branch, and if it fails, try again without the branch in case the ref was not a branch but a commit/tag instead, with a checkout after the clone.

As things currently are, if a user has submodules in their repo which are either private or use a git ssh url (because the core-svc does not have the ssh executable installed), cloning will fail, but the second call to clone will swallow the error from the first try, but will fail because the target directory is now non-empty from the failed first call.

We should:

  • clone without cloning submodules
  • clean the folder if the first clone failed and it's now non-empty
  • make sure the correct error is returned to the user
@github-project-automation github-project-automation bot moved this to Backlog in renku-python Aug 10, 2023
@olevski olevski moved this from Backlog to In Progress in renku-python Aug 23, 2023
@olevski olevski self-assigned this Aug 23, 2023
@olevski olevski moved this from In Progress to Backlog in renku-python Aug 24, 2023
@olevski olevski removed their assignment Aug 24, 2023
@Panaetius Panaetius moved this from Backlog to Ready in renku-python Aug 31, 2023
@m-alisafaee m-alisafaee self-assigned this Sep 27, 2023
@Panaetius Panaetius moved this from Ready to In Progress in renku-python Sep 27, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in renku-python Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants