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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰] Sync function does not delete shallow clones #435

Open
crashboogie opened this issue Apr 11, 2023 · 6 comments
Open

[馃悰] Sync function does not delete shallow clones #435

crashboogie opened this issue Apr 11, 2023 · 6 comments

Comments

@crashboogie
Copy link

Expected behaviour

Sync function should delete the shallow clonses from the /tmp directory when finished analyzing.

Actual behaviour

snyk:clone-and-analyze Failed to delete /tmp/snyk-clone- Error was Error: ENOTEMPTY: directory not empty, rmdir '/tmp/snyk-clone-'

Steps to reproduce

/usr/local/bin/snyk-api-import sync --orgPublicId= --source=github

Debug log

See above in Actual behaviour

@crashboogie crashboogie changed the title [馃悰] Sync fucntion does not delete shallow clones [馃悰] Sync function does not delete shallow clones Apr 11, 2023
@lili2311
Copy link
Contributor

hi @crashboogie could you please share how you are running this? Standalone binary or npm etc. If relevant please also share the Node.js version you are running this on. Thanks

@crashboogie
Copy link
Author

@lili2311 Thanks for the reply! I'm using the 2.16.3 Alpine standalone binary

@lili2311
Copy link
Contributor

Could you try grabbing the latest released version https://github.com/snyk-tech-services/snyk-api-import/releases? It has some retries for deletion, I don't have high hopes it will help Node.js should have been able to delete this directory no problem on Node.js 12. Locally the Node.js 12 tests are passing.

Does this happen every time or only sometimes?

@crashboogie
Copy link
Author

I did actually try to use the latest release locally on my Linux system prior to using the Alpine binary, and it gave the same error when running there with v18.13.0 of Node. and it does happen every time on my end for either the Alpine or other release.

@lili2311
Copy link
Contributor

The packaged binaries come with a Node 12 version pre-bundled already, if you are able to try the npm package directly please do npx snyk-api-import <...your command..> that would help rule out / in Node.js version as the culprit

@jkbszpg
Copy link

jkbszpg commented Jun 21, 2023

we have same issue on ubuntu:22.04

release used
https://github.com/snyk-tech-services/snyk-api-import/releases/download/v2.19.1/snyk-api-import-linux

run as:
DEBUG=*snyk* ./snyk-api-import sync --orgPublicId=$SOURCE_ORG_PUBLIC_ID --source=github-enterprise

logs:

snyk:clone-and-analyze Failed to delete /tmp/snyk-clone-xxxxxxx. Error was Error: ENOTEMPTY: directory not empty, rmdir '/tmp/snyk-clone-xxxxxxx'. +0ms

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

No branches or pull requests

3 participants