Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup-python failing due to missing cache directory #328

Closed
3 tasks
wmmc88 opened this issue Feb 1, 2022 · 19 comments
Closed
3 tasks

setup-python failing due to missing cache directory #328

wmmc88 opened this issue Feb 1, 2022 · 19 comments
Labels
bug Something isn't working

Comments

@wmmc88
Copy link

wmmc88 commented Feb 1, 2022

Description:
This job on my repo has been failing since #303 was merged in. Only the python 11 alpha variant is failing due to a cache related issue for pip. It fails in the Post Setup Python stage.

Action version: master

Platform:

  • Ubuntu
  • macOS
  • [ x] Windows

Runner type:

  • [x ] Hosted
  • Self-hosted

Tools version:

python 3.11.0-alpha

Repro steps:
Run any pipeline with python 3.11.0-alpha on windows.

Expected behavior:
The job should succeed.

The job fails on Post Setup Python

@wmmc88 wmmc88 added bug Something isn't working needs triage labels Feb 1, 2022
@hugovk
Copy link
Contributor

hugovk commented Feb 1, 2022

I'm seeing it too, also Windows and 3.11 alpha:

I don't think #303 has been released yet, v2 is still pointing to v2.3.1 from November:

Possibly linked to the release of pip 22 on Sunday?

@wmmc88
Copy link
Author

wmmc88 commented Feb 1, 2022

hm. yeah I assumed it was due to #303 because I use the master tag for setup-python and the failure coincided with the merging of the #303, but looks like you're right in that its not released to v2 and u have the same issue on v2.

@MaksimZhukov
Copy link
Contributor

Hello @wmmc88! Thank you for the report!
We are investigating the issue. We will come back with investigation results as soon as we have them.

@dmitry-shibanov
Copy link
Contributor

Hello @wmmc88. Thank you for your report. It's partly related to these changes, but the root cause is different. Previously cache key for pip didn't contain version of the python, that is why cache got hit on the primary key and the action didn't resave it. Now primary and restore keys have been changed and it forces action to resave cache.
I've added some more debug logs and found that the pip cache dir for python 3.11.0-alpha.4 (latest pip in general) returns output to stderr not to the stdout. I'm not sure the issue itself related to setup-python or pip. For now we continue investigation.

@janosh
Copy link

janosh commented Feb 3, 2022

Could this error have a similar cause?

Run actions/setup-python@v2
  with:
    python-version: 3.8
    cache: pip
    cache-dependency-path: setup.cfg
    token: ***
Successfully setup CPython (3.8.10)
C:\hostedtoolcache\windows\Python\3.8.10\x64
Error: The process 'C:\hostedtoolcache\windows\Python\3.8.10\x64\Scripts\pip.exe' failed with exit code 322122

adamchainz added a commit to evansd/whitenoise that referenced this issue Feb 3, 2022
@dmitry-shibanov
Copy link
Contributor

Hello @janosh. Yes, It's related to this issue: actions/toolkit#992
I'm not sure, but it's also can be related to this issue: pypa/pip#10875

@jku
Copy link

jku commented Feb 3, 2022

From what I can tell failures started as windows image updated from 20220123.1 to 20220131.1: actions/runner-images#5009

EDIT: this may be different after all: your error message is not the same and started on previous version -- sorry for spam

@dmitry-shibanov
Copy link
Contributor

Hello everyone. We released new version with fix (2.3.2). Could you please try to use it and confirm if it works for you?

@felixxm
Copy link

felixxm commented Feb 4, 2022

Hello everyone. We released new version with fix (2.3.2). Could you please try to use it and confirm if it works for you?

Thanks 👍 Unfortunately, it still crashes for us 😢 .

@janosh
Copy link

janosh commented Feb 4, 2022

@dmitry-shibanov Same here, also still crashing.

@jku
Copy link

jku commented Feb 4, 2022

Thanks +1 Unfortunately, it still crashes for us cry .

Note that they've not updated the v2 tag (forgot?) so you are probably not testing the new version.

My issue was fixed with the Windows workaround, if I modify my workflow to use setup-python@v2.3.2 (instead of v2):
https://github.com/theupdateframework/python-tuf/runs/5065875026

@janosh
Copy link

janosh commented Feb 4, 2022

@jku I thought setup-python@v2 would us the latest version in that major version tag?

@dmitry-shibanov
Copy link
Contributor

Hello @janosh. For now we have not updated the tag v2.
Thank you for your confirmation @jku.

@jku
Copy link

jku commented Feb 4, 2022

@jku I thought setup-python@v2 would us the latest version in that major version tag?

That maybe the intended policy but the tag "v2" pointed to release "v2.3.1" until dmitry just updated it

Oops, misread, I mean v2 still points to 2.3.1

@hugovk
Copy link
Contributor

hugovk commented Feb 4, 2022

✅ Confirmed fixed with actions/setup-python@v2.3.2:

Thank you!

@dmitry-shibanov
Copy link
Contributor

Hello everyone. We updated v2 tag. Could you please confirm that everything works as expected ?

@wmmc88
Copy link
Author

wmmc88 commented Feb 4, 2022

Hello everyone. We updated v2 tag. Could you please confirm that everything works as expected ?

My issues fixed!

@wmmc88 wmmc88 closed this as completed Feb 4, 2022
@hugovk
Copy link
Contributor

hugovk commented Feb 4, 2022

v2 fixed, thanks again!

@felixxm
Copy link

felixxm commented Feb 4, 2022

It works for us 🚀 Many thanks 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants