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

No such file or directory: '.github/workflows/constraints.txt' when used in GitHub Action #1331

Open
tarilabs opened this issue Apr 8, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@tarilabs
Copy link

tarilabs commented Apr 8, 2024

Describe the bug

It seems to me more GitHub runner are onboarding pipx==1.5.0 causing our action to now fail with the error:

pipx >(subprocess_post_check_handle_pip_error:331): '/opt/pipx/venvs/poetry/bin/python -m pip --no-input install --constraint=.github/workflows/constraints.txt poetry' failed
pipx >(subprocess_post_check_handle_pip_error:346): Fatal error from pip prevented installation. Full pip output in file:
    /opt/pipx/logs/cmd_2024-04-08_15.22.19_pip_errors.log

Some possibly relevant errors from pip install:
    ERROR: Could not open requirements file: [Errno 2] No such file or directory: '.github/workflows/constraints.txt'

while this is not a problem with earlier pipx 1.4.3

How to reproduce

Screenshot: in this run (8602647917), the left GitHub Action runner came with pipx 1.4.3, right GitHub Action runner came with 1.5.0

Screenshot 2024-04-08 at 17 23 19 (2)

Analogously, see this PR job: https://github.com/kubeflow/model-registry/actions/runs/8602865736/job/23573396714
failed, while other runner in the same matrix just passed the step successfully.

When forcing pipx==1.4.3 with: kubeflow/model-registry@8971944

Then the error is resolved: https://github.com/kubeflow/model-registry/actions/runs/8602962417/job/23573717964?pr=55

Expected behavior

Expected no change in behaviour.

Kindly advise?
Thanks in advance!

@Gitznik
Copy link
Contributor

Gitznik commented Apr 8, 2024

I reckon this is due to #1237, now no longer being able to resolve the relative path to the constraints file correctly.

Did a quick test and just forcing run_dir to None here

pip_process = run_subprocess(cmd, log_stdout=False, log_stderr=False, run_dir=str(self.root))
resolved the problem.

@tarilabs aside from forcing pipx version < 1.5, passing an absolute path also fixes this, until we come up with a better solution.

@Gitznik Gitznik added the bug Something isn't working label Apr 8, 2024
@tarilabs
Copy link
Author

tarilabs commented Apr 8, 2024

thanks for the quick feedback and headsup @Gitznik , much appreaciated !

tarilabs added a commit to kubeflow/model-registry that referenced this issue Apr 8, 2024
see also: pypa/pipx#1331

Signed-off-by: Matteo Mortari <matteo.mortari@gmail.com>
google-oss-prow bot pushed a commit to kubeflow/model-registry that referenced this issue Apr 9, 2024
… 1.2.1 (#55)

* build(deps): bump github.com/golang/glog from 1.2.0 to 1.2.1

Bumps [github.com/golang/glog](https://github.com/golang/glog) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/golang/glog/releases)
- [Commits](golang/glog@v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: github.com/golang/glog
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* force using pipx==1.4.3

to avoid error:
Some possibly relevant errors from pip install:
    ERROR: Could not open requirements file: [Errno 2] No such file or directory: '.github/workflows/constraints.txt'

from GHA runner onboarding with 1.5.0

Signed-off-by: Matteo Mortari <matteo.mortari@gmail.com>

* use absolute path for GitHub runners coming with pipx>=1.5.0

see also: pypa/pipx#1331

Signed-off-by: Matteo Mortari <matteo.mortari@gmail.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Matteo Mortari <matteo.mortari@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matteo Mortari <matteo.mortari@gmail.com>
probberechts added a commit to probberechts/soccerdata that referenced this issue Apr 12, 2024
Use absolute path for GitHub runners coming with pipx>=1.5.0

see also: pypa/pipx#1331
probberechts added a commit to probberechts/soccerdata that referenced this issue Apr 12, 2024
Use absolute path for GitHub runners coming with pipx>=1.5.0

see also: pypa/pipx#1331
probberechts added a commit to probberechts/soccerdata that referenced this issue Apr 12, 2024
Use absolute path for GitHub runners coming with pipx>=1.5.0

see also: pypa/pipx#1331
danyeaw added a commit to gaphor/gaphor_plugin_helloworld that referenced this issue Apr 14, 2024
Workaround for pypa/pipx#1331 which
was causing installation of Poetry to fail with a file not
found error.
danyeaw added a commit to gaphor/gaphor_plugin_helloworld that referenced this issue Apr 14, 2024
Workaround for pypa/pipx#1331 which
was causing installation of Poetry to fail with a file not
found error.
danyeaw added a commit to gaphor/gaphor_plugin_helloworld that referenced this issue Apr 14, 2024
Workaround for pypa/pipx#1331 which
was causing installation of Poetry to fail with a file not
found error.
anschweitzer added a commit to thegridelectric/gridworks-protocol that referenced this issue Apr 15, 2024
pipx 1.5.0 has a bug, pypa/pipx#1331 (comment), such that the current working directory is ignored during 'pipx install'; This latest broken pipx is included in the latest images used by GitHub runners (e.g. https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md), so we work around the problem by using an absolute path for '.github/workflows/constraints.txt'.
anschweitzer added a commit to thegridelectric/gridworks-proactor that referenced this issue Apr 15, 2024
pipx 1.5.0 has a bug, pypa/pipx#1331 (comment), such that the current working directory is ignored during 'pipx install'; This latest broken pipx is included in the latest images used by GitHub runners (e.g. https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md), so we work around the problem by using an absolute path for '.github/workflows/constraints.txt'.
espenwest added a commit to aidee-health/embody-serial that referenced this issue Apr 21, 2024
espenwest added a commit to aidee-health/embody-serial that referenced this issue Apr 21, 2024
espenwest added a commit to aidee-health/embody-codec that referenced this issue Apr 21, 2024
espenwest added a commit to aidee-health/embody-file that referenced this issue Apr 21, 2024
espenwest added a commit to aidee-health/embody-ble that referenced this issue Apr 21, 2024
espenwest added a commit to aidee-health/aidee-living-docs that referenced this issue Apr 21, 2024
roar-skinderviken added a commit to statisticsnorway/ssb-sirius-dash that referenced this issue Apr 27, 2024
roar-skinderviken added a commit to statisticsnorway/ssb-sirius-dash that referenced this issue Apr 27, 2024
…dates (#25)

* Fixed pypa/pipx#1331
* Bump the workflows-dependencies group

Bumps the workflows-dependencies group in /.github/workflows with 2 updates: [nox](https://github.com/wntrblm/nox) and [virtualenv](https://github.com/pypa/virtualenv).


Updates `nox` from 2024.3.2 to 2024.4.15
- [Release notes](https://github.com/wntrblm/nox/releases)
- [Changelog](https://github.com/wntrblm/nox/blob/main/CHANGELOG.md)
- [Commits](wntrblm/nox@2024.03.02...2024.04.15)

Updates `virtualenv` from 20.25.1 to 20.26.0
- [Release notes](https://github.com/pypa/virtualenv/releases)
- [Changelog](https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst)
- [Commits](pypa/virtualenv@20.25.1...20.26.0)

---
updated-dependencies:
- dependency-name: nox
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workflows-dependencies
- dependency-name: virtualenv
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workflows-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updated poetry.lock

* Removed pytest-env. Commented out { python: "3.11", os: "macos-latest", session: "tests" }

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Roar Skinderviken <roar.skinderviken@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
roar-skinderviken added a commit to statisticsnorway/ssb-sirius-dash that referenced this issue Apr 27, 2024
* Fixed pypa/pipx#1331
* Bump blinker from 1.7.0 to 1.8.0 in the poetry-dependencies group

Bumps the poetry-dependencies group with 1 update: [blinker](https://github.com/pallets-eco/blinker).


Updates `blinker` from 1.7.0 to 1.8.0
- [Release notes](https://github.com/pallets-eco/blinker/releases)
- [Changelog](https://github.com/pallets-eco/blinker/blob/main/CHANGES.rst)
- [Commits](pallets-eco/blinker@1.7.0...1.8.0)

---
updated-dependencies:
- dependency-name: blinker
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: poetry-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Roar Skinderviken <roar.skinderviken@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
rbedia added a commit to rbedia/circman that referenced this issue May 16, 2024
rbedia added a commit to rbedia/circman that referenced this issue May 16, 2024
rbedia added a commit to rbedia/circman that referenced this issue May 16, 2024
tomwillis608 added a commit to flexion/devops-deployment-metrics that referenced this issue May 16, 2024
rbedia added a commit to rbedia/cookiecutter-hypermodern-python that referenced this issue May 20, 2024
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

2 participants