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

Avoid using /tmp #2447

Merged
merged 2 commits into from
May 3, 2023
Merged

Avoid using /tmp #2447

merged 2 commits into from
May 3, 2023

Conversation

johnhany97
Copy link
Contributor

Attempts to fix #2418

I realised that we already attempt to rename, and if that failed, we attempt to copy then delete the file. However, this seems to still cause Invalid cross-device link error.

My proposal is to just avoid storing the temporary file in /tmp, and instead use the same cache dir we already use for writing the .json files.

@johnhany97
Copy link
Contributor Author

Given the nondeterministic nature of the issue at hand, i'm likely to try and get a patched version of mamba with this change and run it for a bit on our internal development infra to see if the issue still pops up or not. I won't be able to do so for at least a week though.

@jonashaag
Copy link
Contributor

Not sure if this fixes anything, see discussion here: #2239 (comment)

@johnhany97
Copy link
Contributor Author

I guess the alternative then would be to read the file and write it again ourselves to the new location? Happy to repurpose the code to do so.

@wolfv
Copy link
Member

wolfv commented Apr 11, 2023

I think that's a good idea, to create the file next to the final destination. Conda is doing it like this as well, and it will definitely get rid of this issue!

@wolfv wolfv merged commit e5b30cc into mamba-org:main May 3, 2023
@johnhany97 johnhany97 deleted the jayad/avoid-tmp branch May 14, 2023 23:37
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

Successfully merging this pull request may close these issues.

Invalid cross-device link error with repodata_use_zst
4 participants