astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
21.52k stars 632 forks source link

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

Open anilbey opened 6 months ago

anilbey commented 6 months ago

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 commented 6 months ago

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

charliermarsh commented 6 months ago

Thanks!

charliermarsh commented 6 months ago

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?)

anilbey commented 6 months ago

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

anilbey commented 6 months ago

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

charliermarsh commented 6 months ago

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

anilbey commented 6 months ago

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

AlessandroPomponio commented 5 months ago

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 :(

anilbey commented 5 months ago

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 :)