actions / actions/setup-python

Bug: `"pip"` cache having nothing installed leads to post-run error

オープン
#815 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

feature request
主要言語
TypeScript
スター
2.2k
フォーク
739
平均マージ
6日 18時間
マージ済み PR(30日)
1

説明

Description:

I have this:

        runs-on: 'ubuntu-latest'
        steps:
            -   uses: actions/setup-python@v5
                with:
                    python-version: '3.10'
                    cache: 'pip'

Bumping python-version from '3.10' to '3.12', I am now getting this error during Post Run actions/setup-python@5:

Post job cleanup.
Error: Cache folder path is retrieved for pip but doesn't exist on disk: /home/runner/.cache/pip

Action version:

v5

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

3.10.13 to 3.12.1

Expected behavior:

I expect setup-python to somehow not error itself.

Seemingly related issues:

Actual behavior:

Here is the output of Run actions/setup-python@v5

  with:
    python-version: 3.12
    cache: pip
    check-latest: false
    token: ***
    update-environment: true
    allow-prereleases: false
  env:
    ...
Installed versions
  Successfully set up CPython (3.12.1)
/opt/hostedtoolcache/Python/3.12.1/x64/bin/pip cache dir
/home/runner/.cache/pip
pip cache is not found

Here is the output of Post Run actions/setup-python@5:

Post job cleanup.
Error: Cache folder path is retrieved for pip but doesn't exist on disk: /home/runner/.cache/pip

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

actions/setup-python@v5 のキャッシュ処理から始め、Issue に示されている Ubuntu hosted-runner のワークフローを Python 3.12 と空の pip キャッシュを使って再現します。ログに /home/runner/.cache/pip が存在しないと報告された後の実行後クリーンアップを追跡します。何もインストールされていない場合に、このワークフローがエラーなく完了すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
github-actions, python, typescript
領域
ci-cd, tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。