Comments (29)
Also seeing this issue ๐
from install-poetry.
No worries. I will make a PR if I manage to find out what broke. Let's not close this issue as I assume many people will come here to report the issue.
from install-poetry.
@sondrelg no clue, our workflow is pretty standard, my bet is that it's all related to the dropping of Python 3.6 from Poetry 1.2.0. We will pin the Poetry version and wait until we move to the next python version to see if it reproduces, which I bet it won't.
In between, thank you very much for your time
from install-poetry.
#90 Attempting a fix here,
unsure how to test this in a Github Actionedit:// this seems to fix it - there was a trailing
/
in the path, by accident. I have a separate issue now of Poetry 1.2.0 dropping support for Python 3.6, but that's unrelated smiley
Projects are dropping python3.6 because it is no longer considered secure as end of life
was 8 months ago and it no longer receives security fixes. Tools and libraries dropping support forces OS distributions to release newer, supported versions of python on their platform. This is a good thing, because it is intended to result in a more secure internet and better safety for users' machines.
from install-poetry.
Same issue here, but only with macos-latest
โ
On the other hand no problem with windows-latest
and ubuntu-latest
โ
Here is the link to the yml file: https://github.com/Musaefendic/icao-emissions/blob/96d41895570a1aefe21cab13f32f906f44d6f6ab/.github/workflows/tests.yml
2022-09-29T16:05:45.3245480Z ##[group]Run poetry install --no-interaction
2022-09-29T16:05:45.3245930Z ๏ฟฝ[36;1mpoetry install --no-interaction๏ฟฝ[0m
2022-09-29T16:05:45.3754580Z shell: /bin/bash --noprofile --norc -e -o pipefail {0}
2022-09-29T16:05:45.3754920Z env:
2022-09-29T16:05:45.3755490Z pythonLocation: /Users/runner/hostedtoolcache/Python/3.9.10/x64
2022-09-29T16:05:45.3755920Z PKG_CONFIG_PATH: /Users/runner/hostedtoolcache/Python/3.9.10/x64/lib/pkgconfig
2022-09-29T16:05:45.3756330Z Python_ROOT_DIR: /Users/runner/hostedtoolcache/Python/3.9.10/x64
2022-09-29T16:05:45.3757220Z Python2_ROOT_DIR: /Users/runner/hostedtoolcache/Python/3.9.10/x64
2022-09-29T16:05:45.3757620Z Python3_ROOT_DIR: /Users/runner/hostedtoolcache/Python/3.9.10/x64
2022-09-29T16:05:45.3757940Z VENV: .venv/bin/activate
2022-09-29T16:05:45.3758180Z ##[endgroup]
2022-09-29T16:05:45.4574200Z /Users/runner/work/_temp/7e911813-9a38-4bc5-8835-86f3f94d1643.sh: line 1: poetry: command not found
2022-09-29T16:05:45.4602330Z ##[error]Process completed with exit code 127.
did I set up my .yml wrong?
from install-poetry.
I'm having the exact same issue (exit code 127, only on macOS-latest) with the following workflow. Is there something I should change?
push: branches: [main] pull_request: jobs: build: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: python-version: ["3.10"] os: [ubuntu-latest, macOS-latest, windows-latest] env: POETRY_VIRTUALENVS_IN_PROJECT: true steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: cache poetry install uses: actions/cache@v2 with: path: ~/.local key: poetry-1.2.1-0 - uses: snok/install-poetry@v1 with: version: 1.2.1 virtualenvs-create: true virtualenvs-in-project: true # Cache your dependencies (i.e. all the stuff in your `pyproject.toml`) - name: cache venv uses: actions/cache@v2 with: path: .venv key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - run: poetry install --no-interaction --no-root if: steps.cache-deps.outputs.cache-hit != 'true' - run: poetry install --no-interaction - run: poetry run flake8 src/ tests/ - run: poetry run pytest```
fixed it by adding
env:
POETRY_VERSION: 1.2.1
And replacing
key: poetry-1.2.1-0
with
key: poetry-cache-${{ runner.os }}-${{ matrix.python-version }}-${{ env.POETRY_VERSION }}
from install-poetry.
Would you mind sharing your workflow configuration (just the install-poetry step)?
I don't think it breaks the action. AFAICT lockfiles generated by < 1.2 are incompatible with 1.2 and vice versa, so if your lockfile was generated with 1.1.X
you need to specify a 1.1.X
version in your action run.
- uses: snok/install-poetry@v1
with:
version: 1.1.14
Should work, while
- uses: snok/install-poetry@v1
Will not.
Does that make sense, or do you think it's broken for 1.2 with 1.2 lockfiles?
from install-poetry.
Hello :)
I pasted the output of the action (and then you have the action's configuration as well). It's the poetry command itself that is not found. See the original message.
from install-poetry.
Ah yes. And I see you've specified latest as the version. Does it work if you change it to 1.1.14?
from install-poetry.
Yes
from install-poetry.
Ok great. If you want to use 1.2.0 in your github actions run you first need to upgrade Poetry to 1.2.0 locally, then run poetry update
or poetry lock --no-update
to make the file compatible with 1.2.0. After doing that, upgrading to 1.2.0 or latest in the action should work again.
from install-poetry.
Hello. You got it. Sorry I should not have cut the Github Actions output: the error we get is poetry: command not found
. You can see this error (somewhat hidden) in GHA output. I think Poetry 1.2.0 changed the location where poetry is installed.
from install-poetry.
I see. That's unfortunate if that's the case. I'm not able to look at this right now, but PRs are welcome ๐
from install-poetry.
#90
Attempting a fix here, unsure how to test this in a Github Action
edit:// this seems to fix it - there was a trailing /
in the path, by accident. I have a separate issue now of Poetry 1.2.0 dropping support for Python 3.6, but that's unrelated ๐
from install-poetry.
I added two comments in the PR, but would be good to get your take too @deronnax. I tried updating two projects to Poetry version 1.2.0, and neither one had any problems running the action. Just to understand what is broken, what is different between these two workflows and yours?
- https://github.com/snok/flake8-type-checking/runs/8122396279?check_suite_focus=true
- https://github.com/snok/asgi-correlation-id/actions/runs/2966986335
from install-poetry.
Discussion continued in #90
from install-poetry.
To avoid the brownout, add the following to the poetry install step until you upgrade to 1.2.0
env:
GET_POETRY_IGNORE_DEPRECATION: 1
from install-poetry.
I guess you gotta make sure to have
[build-system]
requires = ["poetry-core>=1.1.0"]
More on --> https://github.com/python-poetry/poetry/blob/master/pyproject.toml#L47
from install-poetry.
@Musaefendic is it your intention not using poetry v1.2.1
? I can see this https://github.com/Musaefendic/icao-emissions/blob/96d41895570a1aefe21cab13f32f906f44d6f6ab/.github/workflows/tests.yml#L48
You can drop the version and the action
will automatically setup the latest version
from install-poetry.
good catch! It is an error after several unsuccessful attempts.
I just removed the line version: 1.1.14
but the result is the same.
โ
windows-latest and ubuntu-latest
โ macos-latest
i got the same error:
Run poetry install --no-interaction
[...]
/Users/runner/work/_temp/6c346071-2b8c-41b1-b4f2-75377cb405b1.sh: line 1: poetry: command not found
Error: Process completed with exit code 127.
from install-poetry.
I wonder if your action is caching a really old version 1, and it's not using the newest version.
Maybe try uses: snok/[email protected]
You can also try activating it manually
from install-poetry.
@Musaefendic also, restore venv cache BEFORE installing poetry.
from install-poetry.
And if it still doesn't work I'd start with this after installing poetry
- name: Check environment
run: |
echo $PATH
echo $VENV
ls ./local/bin
from install-poetry.
And I'm most sure snok/install-poetry@lint could work, because he added the path to the final commands.
from install-poetry.
And if it still doesn't work I'd start with this after installing poetry
- name: Check environment run: | echo $PATH echo $VENV ls ./local/bin
/Users/runner/.local//bin:/Users/runner/hostedtoolcache/Python/3.9.10/x64/bin:/Users/runner/hostedtoolcache/Python/3.9.10/x64:/usr/local/lib/ruby/gems/2.7.0/bin:/usr/local/opt/[email protected]/bin:/usr/local/opt/pipx_bin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Users/runner/.yarn/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/runner/.dotnet/tools:/Users/runner/.ghcup/bin:/Users/runner/hostedtoolcache/stack/2.9.1/x64
.venv/bin/activate
ls: ./local/bin: No such file or directory
Error: Process completed with exit code 1.
I wonder if your action is caching a really old version 1, and it's not using the newest version.
good intuition! if I delete Load cached poetry installation
, all workflows pass โ
any idea how to purge the cache?
from install-poetry.
To clear the GH Actions cache, it's a new feature since June 22. See this SO post https://stackoverflow.com/a/64819132
Clearing the cache
curl \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token *********************" \
https://api.github.com/repos/Musaefendic/icao-emissions/actions/caches
{
"total_count": 0,
"actions_caches": [
]
}
1st CI Run after clearing the cache.
Link to my tests.yml
- โ ubuntu-latest
- โ macos-latest
- โ windows-latest
cache after this CI run
curl \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ****************" \
https://api.github.com/repos/Musaefendic/icao-emissions/actions/caches
{
"total_count": 5,
"actions_caches": [
{
"id": 21,
"ref": "refs/heads/master",
"key": "venv-macOS-3.9.10-7f3e4de67ec2fafad1743c550f0d8aaf4038b5f0f03ecfe5275d285833296cbf",
"version": "25e65b70d167147605b4332eb57b6d34df8e0303b88c4de252efb18cf3ed148a",
"last_accessed_at": "2022-09-29T21:31:08.286666700Z",
"created_at": "2022-09-29T21:31:08.286666700Z",
"size_in_bytes": 71408887
},
{
"id": 20,
"ref": "refs/heads/master",
"key": "poetry-0",
"version": "d6b93696bc837862e84764c8431f7c282393336a702ec638c820588088bfd7a1",
"last_accessed_at": "2022-09-29T21:30:09.980000000Z",
"created_at": "2022-09-29T21:30:09.980000000Z",
"size_in_bytes": 30
},
{
"id": 19,
"ref": "refs/heads/master",
"key": "venv-Windows-3.9.10-14a2a15fefb761fe78d797839a035d718998d5ff92247101add1124f1e5af187",
"version": "519c93c80eb6dc7871185acd9844f0af47c509ad7b0399902b51e465753dba51",
"last_accessed_at": "2022-09-29T21:29:51.203333300Z",
"created_at": "2022-09-29T21:29:51.203333300Z",
"size_in_bytes": 75356150
},
{
"id": 18,
"ref": "refs/heads/master",
"key": "poetry-0",
"version": "f4b5713a4657ae30a7c2804b2ad5dbc790b3736f71a74a904bcab1f478b0ed29",
"last_accessed_at": "2022-09-29T21:27:04.993333300Z",
"created_at": "2022-09-29T21:27:04.993333300Z",
"size_in_bytes": 25628232
},
{
"id": 17,
"ref": "refs/heads/master",
"key": "venv-Linux-3.9.10-7f3e4de67ec2fafad1743c550f0d8aaf4038b5f0f03ecfe5275d285833296cbf",
"version": "25e65b70d167147605b4332eb57b6d34df8e0303b88c4de252efb18cf3ed148a",
"last_accessed_at": "2022-09-29T21:27:00.680000000Z",
"created_at": "2022-09-29T21:27:00.680000000Z",
"size_in_bytes": 82591676
}
]
}
2nd CI RUN
same tests.yml
- โ ubuntu-latest
- โ macos-latest ->
Error: Process completed with exit code 127.
- โ windows-latest
from install-poetry.
I'm on holidays almost without internet for a few days, but should have time to review a PR if anyone has time to investigate ๐ Otherwise, I'll be happy to look at this on Tuesday ๐
from install-poetry.
And if it still doesn't work I'd start with this after installing poetry
- name: Check environment run: | echo $PATH echo $VENV ls ./local/bin/Users/runner/.local//bin:/Users/runner/hostedtoolcache/Python/3.9.10/x64/bin:/Users/runner/hostedtoolcache/Python/3.9.10/x64:/usr/local/lib/ruby/gems/2.7.0/bin:/usr/local/opt/[email protected]/bin:/usr/local/opt/pipx_bin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Users/runner/.yarn/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/runner/.dotnet/tools:/Users/runner/.ghcup/bin:/Users/runner/hostedtoolcache/stack/2.9.1/x64 .venv/bin/activate ls: ./local/bin: No such file or directory Error: Process completed with exit code 1.
I wonder if your action is caching a really old version 1, and it's not using the newest version.
good intuition! if I delete
Load cached poetry installation
, all workflows pass โ
any idea how to purge the cache?
You could always use a different cache key or add a restore key that's different than what it's using now. Poetry version changed but your pyproject.toml didn't, so the next change to your pyprotect.toml would have done it also.
from install-poetry.
I'm having the exact same issue (exit code 127, only on macOS-latest) with the following workflow. Is there something I should change?
push:
branches: [main]
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
os: [ubuntu-latest, macOS-latest, windows-latest]
env:
POETRY_VIRTUALENVS_IN_PROJECT: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: cache poetry install
uses: actions/cache@v2
with:
path: ~/.local
key: poetry-1.2.1-0
- uses: snok/install-poetry@v1
with:
version: 1.2.1
virtualenvs-create: true
virtualenvs-in-project: true
# Cache your dependencies (i.e. all the stuff in your `pyproject.toml`)
- name: cache venv
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- run: poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'
- run: poetry install --no-interaction
- run: poetry run flake8 src/ tests/
- run: poetry run pytest```
from install-poetry.
Related Issues (20)
- Skip poetry install step with cache hit HOT 10
- Poetry fails on matrix strategies combinations HOT 4
- Add env: section to parse envs that are used in each poetry call HOT 1
- .venv caching is not working using composable actions? HOT 3
- urllib.error.URLError: <urlopen error unknown url type: https> HOT 4
- Error: `GLIBC_2.34' not found HOT 2
- poetry: command not found - When running multiple self-hosted runners on the same machine. HOT 4
- The `with` `virtualenvs-in-project` setting does not seem to work for me HOT 5
- Cache not found HOT 3
- Does not respect POETRY_HOME HOT 2
- Actions started failing recently. HOT 15
- Shared Library Error (libpython3.8.so.1.0) on builds using runner with python 3.9 or above HOT 1
- Poetry Requires Python 3.8+ HOT 3
- $VENV not set on Poetry installation cache restore HOT 3
- How to change working-directory ? HOT 5
- Install poetry in self-hosted github runner to allow different python versions HOT 9
- Virtual environment created in wrong location
- Calling poetry via CMake script on Windows HOT 4
- Update docs for Windows Server 2019 HOT 1
- poetry installation failed when installing with default settings HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from install-poetry.