actions / actions/setup-python

Difference between env.pythonLocation on macOS in Python 3.11+

Offen
#813 19 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

feature request
Vorherrschende Sprache
TypeScript
Sterne
2.2k
Forks
739
Ø Merge
6 T. 18 Std.
Gemergte PRs (30 T.)
1

Beschreibung

Description:

I'm encountering a strange issue related to caching the Python installation. I'm using actions/setup-python@v5.0.0 to install Python, then actions/cache@v4.0.0 to cache the env.pythonLocation directory, similar to this blog.

This works fantastically, except on macOS in Python 3.11 and 3.12, and I have no idea why. For some reason, the cache is empty, but only for those specific versions. Did anything change in the installation layout or env.pythonLocation variable that could explain this?

Action version:

5.0.0

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

Python 3.11, 3.12

Repro steps:

The full workflow can be seen here.

Expected behavior:

I would expect this to work for all platforms/Python versions and cache the installed Python packages.

Actual behavior:

The cache is empty. See https://github.com/actions/cache/issues/1176 for the cross-referenced bug report.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit dem referenzierten Workflow .github/workflows/tests.yaml und vergleiche env.pythonLocation und den Cache-Inhalt für macOS mit Python 3.11 und 3.12. Lies den in diesem Bericht querreferenzierten actions/cache issue 1176 zusammen mit diesem Bericht; abgeschlossen bedeutet, dass das plattform-/versionsspezifische Verhalten erklärt ist und das betroffene Caching-Verhalten eine verifizierte Lösung hat.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
github-actions, python, typescript
Bereich
ci-cd, devops
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.