Skip to content

When "Import from Git" fails, the repo remains cloned on your computer #2940

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

Closed
datho7561 opened this issue Jun 5, 2023 · 3 comments
Closed
Assignees
Labels
Milestone

Comments

@datho7561
Copy link
Contributor

When using the "Import from Git" workflow, if the clone step "fails", such as #2939, the repo remains on the user's disk.

This is unintuitive, since you haven't completed the wizard, and it says that the git url couldn't be parsed.

I think this could be prevented by cleaning up the folder that is being cloned into if the operation truly fails, and providing a way to select a devfile in cases such as #2939

@msivasubramaniaan msivasubramaniaan self-assigned this Jun 6, 2023
@msivasubramaniaan msivasubramaniaan added this to the 1.6.0 milestone Jun 6, 2023
@msivasubramaniaan
Copy link
Collaborator

msivasubramaniaan commented Jun 6, 2023

We were kill the git process and deleted the directory on below aspects.

await deleteDirectory(selctedFolder.fsPath);

  1. When user cancel the git import flow
  2. When we unable to delete the v1 devfile if already in the repo
    closeWithMessage('Failed to delete devfile.yaml, Unable to proceed the component creation', clonedFolder);
  3. When unable to parse the v1 devfile
    closeWithMessage('Failed to parse devfile v1, Unable to proceed the component creation', clonedFolder);

I hope we have handled all the possible cases. Post merging the #2943 we can address the #2939 as well and that scenario as well handled now.

Let me know is there any more scenario we missed.

@msivasubramaniaan
Copy link
Collaborator

@datho7561 Please revalidate this one

@datho7561
Copy link
Contributor Author

Closed by #2943 and #2991

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants