uv icon indicating copy to clipboard operation
uv copied to clipboard

CI/Github Action Failed to extract archive: /home/runner/.cache/uv/.tmppavima/extracted

Open anilbey opened this issue 1 year ago • 7 comments

Hello,

There is this small error that occurs only in the first CI run. When the CI is run the first time it says failed to extract archive (pointing to the .cache directory).

  Caused by: Failed to build: bluecellulab @ file:///home/runner/work/BlueCelluLab/BlueCelluLab/.tox/.tmp/package/1/bluecellulab-0.0.1.dev1.tar.gz
  Caused by: Failed to extract archive: /home/runner/.cache/uv/.tmppavima/extracted
  Caused by: failed to unpack `/home/runner/.cache/uv/.tmppavima/extracted/bluecellulab-0.0.1.dev1/tests/examples/circuit_sonata_quick_scx_multi_circuit/components/CircuitB/mo`
  Caused by: failed to unpack `bluecellulab-0.0.1.dev1/tests/examples/circuit_sonata_quick_scx_multi_circuit/components/CircuitB/mo` into `/home/runner/.cache/uv/.tmppavima/extracted/bluecellulab-0.0.1.dev1/tests/examples/circuit_sonata_quick_scx_multi_circuit/components/CircuitB/mo`
  Caused by: Is a directory (os error 21)

When I restart the CI in the 2nd attempt, it works perfectly fine. This pattern repeats in every CI run. First one fails, the second one succeeds.

here are the CI logs. The uv version, Python version and the other dependencies are all listed in the logs below. https://github.com/BlueBrain/BlueCelluLab/actions/runs/8169106907/job/22332500653

anilbey avatar Mar 06 '24 09:03 anilbey

Logs from the successful run (2nd attempt): https://github.com/BlueBrain/BlueCelluLab/actions/runs/8169106907/job/22334002556

anilbey avatar Mar 06 '24 09:03 anilbey

Thanks!

charliermarsh avatar Mar 06 '24 13:03 charliermarsh

My read of the trace is that for some reason bluecellulab-0.0.1.dev1/tests/examples/circuit_sonata_quick_scx_multi_circuit/components/CircuitB/mo is not marked as a directory in the archive, i.e., the headers don't indicate that it's a directory. Any idea how the source distribution is being built? (Is that path a symlink, or something like that?)

charliermarsh avatar Mar 06 '24 17:03 charliermarsh

Oh I see. Those directories contain static files required to run some tests and those are excluded from the package.

anilbey avatar Mar 07 '24 16:03 anilbey

With the newer versions of uv and tox-uv, restarting the workflow does not change the outcome. If the cache fails, the whole workflow fails.

I rolled back to uv==0.1.14 and tox-uv==1.4.0

anilbey avatar Mar 12 '24 09:03 anilbey

Is there any way you could extract and share the bluecellulab-0.0.1.dev1.tar.gz file from the failing run?

charliermarsh avatar Mar 22 '24 04:03 charliermarsh

Unfortunately I cannot access the data from the github actions. It is not listed in the Artifacts section.

anilbey avatar Mar 25 '24 10:03 anilbey

I've seen the same thing happen with the latest versions of uv as well. Sometimes it takes multiple restarts for it to work. Unfortunately I can't provide the tar archive either :(

AlessandroPomponio avatar Apr 19 '24 13:04 AlessandroPomponio

A couple of times it happened in my local as well but at that time I was in the middle of some other task and later I couldn't reproduce it. It is a Heisenbug :)

anilbey avatar Apr 19 '24 14:04 anilbey