Closed fkorotkov closed 7 months ago
@fkorotkov I see what you mean but note that the remote archive was not empty in this case. What could prompt an empty extraction?
This is still unclear. I just reproduced your situation by manually passing and empty Data down the code. It could've been empty if the request failed but then it should've throw an exception. Maybe your previous segmentation error left state of the cache corrupted.
In any case this change adds more safety checks into the logic.
With 2.4.2, with a new URL to ensure cache is not used, I still get an empty extraction inside the VM:
% tart run --dir=gh:https://github.com/actions/runner/archive/refs/tags/v2.311.0.zip sonoma-base
Using cached archive for https://github.com/actions/runner/archive/refs/tags/v2.311.0.zip...
Unarchived into a temporary directory!
Any idea on how to further debug this?
Is it getting reproduced on one host? I wonder of local cache got corrupted. Could you please try to invalidate it:
rm -rf ~/Library/Caches/tart
I can confirm this now -- the cache was corrupted on this host. Everything is working as expected now. Many thanks for your help @fkorotkov.
Fixes #684. But I'm not sure how it got into this state in the first place.
URLSession.shared.data
should've throw.