actions / download-artifact

MIT License
1.44k stars 495 forks source link

[bug] Action fails when using Python 3.13 #357

Closed damies13 closed 1 month ago

damies13 commented 1 month ago

What happened?

When using this action with python 3.13 I get the error below

Run actions/download-artifact@v4
  with:
    name: dist
    path: dist
    merge-multiple: false
    repository: damies13/rfswarm
    run-id: 11097173809
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.13.0/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.13.0/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.0/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.0/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.0/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.13.0/x64/lib
    tag: ubuntu-latest
Downloading single artifact
Error: Unable to download artifact(s): Artifact not found for name: dist
        Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.
        For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md

What did you expect to happen?

I expected the same behaviour as I get with python versions below 3.13, (example below is for python 3.12.6)

Run actions/download-artifact@v4
  with:
    name: dist
    path: dist
    merge-multiple: false
    repository: damies13/rfswarm
    run-id: 11097173809
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.12.6/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.6/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.6/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.6/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.6/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.6/x64/lib
    tag: ubuntu-latest
Downloading single artifact
Preparing to download the following artifacts:
- dist (ID: 1993249061, Size: 1530800)
Redirecting to blob download url: https://productionresultssa2.blob.core.windows.net/actions-results/cd342fce-aa1f-415a-833f-0d87c743de82/workflow-job-run-c3fc321a-7d45-5c41-22e0-4003a77c1d25/artifacts/bcae0416621b3db43d8cba1e4454a792c7af9e4b7287e51056efc5a215d95839.zip
Starting download of artifact to: /home/runner/work/rfswarm/rfswarm/dist
(node:1842) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Artifact download completed successfully.
Total of 1 artifact(s) downloaded
Download artifact has finished successfully

How can we reproduce it?

I guess use python 3.13 on a github runner and then try to use this action, here is the relevant parts from my workflow:

      - uses: actions/setup-python@v5
        with:
          python-version: 3.13

      - name: Download packages to dist
        uses: actions/download-artifact@v4
        with:
          name: dist
          path: dist

Anything else we need to know?

Thank you for making this action available and I hope this report is helpful,

I'm well aware that python 3.13 has only been out a few days and you may not have had a chance to make any needed updates, I was wanting to check if my app needs updates for python 3.13 before my upcoming release.

What version of the action are you using?

v4

What are your runner environments?

linux, window, macos

Are you on GitHub Enterprise Server? If so, what version?

No response

arsenitem commented 1 month ago

Not only python. Action fails for some reason

damies13 commented 1 month ago

Sorry for the bug report, I now think this is my issue, as the file it was supposed to download dist.zip had expired and I encountered this error when rerunning a previously failed job.