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

pip installing PyYAML crashes the Action running #114

Closed
2 of 7 tasks
jameshiebert opened this issue Jul 15, 2020 · 8 comments
Closed
2 of 7 tasks

pip installing PyYAML crashes the Action running #114

jameshiebert opened this issue Jul 15, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@jameshiebert
Copy link

Describe the bug
pip installing a version of PyYAML which is not the version being used to run the workflow causes the workflow runner to crash on subsequent steps.

2020-07-15T21:47:13.5356959Z FileNotFoundError: [Errno 2] No such file or directory: '/opt/hostedtoolcache/Python/3.7.8/x64/lib/python3.7/site-packages/PyYAML-5.3.1-py3.7-linux-x86_64.egg'
2020-07-15T21:47:13.5916339Z ##[error]Process completed with exit code 1.

Which version of the action are you using?

  • v1
  • v2
  • Some other tag (such as v2.0.1 or master)

Environment

  • self-hosted
  • Linux
  • Windows
  • Mac

If applicable, please specify if you're using a container

Python Versions
3.7.8

To Reproduce
Steps to reproduce the behavior:

  1. Run a workflow e.g. this one that pip installs some version of PyYAML
  2. On my workflow, scroll down to "Install Conflicting PyYAML"
  3. Notice the FileNotFoundError which is not from execution of my workflow.
  4. Notice that the "Do Something Else" step is not run.

Run/Repo Url
https://github.com/jameshiebert/action/runs/875331441?check_suite_focus=true

Additional context
I guess the right (?) way to work around this is to install everything in a virtual environment (as shown in the following commit), but:

  1. There's nothing in the README (that I can find, at least) that says this is necessary, and
  2. I'd argue that it's a bug (or at the very least, not proper encapsulation) if the user is able to cause the workflow runner to crash.

If I'm doing something wrong, I'd be happy to hear about it :) Thanks.

@jameshiebert jameshiebert added the bug Something isn't working label Jul 15, 2020
@nathan-weinberg
Copy link

@Ivaylo-Bachvarov
Copy link

Seems like a bug for me. In the official documentation the action is used without virtualenv: https://docs.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions

@nathan-weinberg
Copy link

I was able to workaround this by changing the pyyaml version from 5.1 to 5.3.1 in my requirements.txt

@maxim-lobanov
Copy link
Contributor

Hello everyone, this issue is related to image, not the setup-python task. We are working on investigation and fix. Progress can be tracked in actions/runner-images#1202 (comment)

@Borda
Copy link

Borda commented Jul 27, 2020

@nathan-weinberg I have tried to force pyyaml==5.3.1 before installing requirements.txt but it did not help...

@nathan-weinberg
Copy link

@Borda Here is the PR in which I made the change - https://github.com/nathan-weinberg/jeeves/pull/135/files

You may need to change the action version to v2

@nikita-bykov
Copy link
Contributor

Hello @jameshiebert!
The related issue from virtual-environments was resolved. I just tested it and everything works as expected for me. Could you please confirm that it works for you too?

@nikita-bykov
Copy link
Contributor

@jameshiebert I'm going to close the issue, but feel free to contact us if you have any questions.

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

6 participants