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

[build] pip install fails when building the image #768

Closed
barroco opened this issue Sep 4, 2024 · 3 comments
Closed

[build] pip install fails when building the image #768

barroco opened this issue Sep 4, 2024 · 3 comments
Assignees
Labels
bug Something isn't working P1 High priority

Comments

@barroco
Copy link
Contributor

barroco commented Sep 4, 2024

Describe the bug
As reported by Jason on Slack and reproduced by the CI on the latest master commit (d492674), the docker image build fails at step [ 6/12] RUN pip install -r /app/monitoring/requirements.txt && rm -rf __pycache__ with the following error:

#11 17.61   Downloading zope.interface-6.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (255 kB)
#11 17.97 Collecting setuptools>=3.0 (from gunicorn==20.1.0->-r /app/monitoring/requirements.txt (line 690))
#11 18.11 ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
#11 18.11     setuptools>=3.0 from https://files.pythonhosted.org/packages/48/f3/e30ee63caefa90716afdffd7d9ae959cd8d0dbd2d0a0eb9fe1d73ddf806b/setuptools-74.1.1-py3-none-any.whl (from gunicorn==20.1.0->-r /app/monitoring/requirements.txt (line 690))
#11 ERROR: process "/bin/sh -c pip install -r /app/monitoring/requirements.txt && rm -rf __pycache__" did not complete successfully: exit code: 1

See logs for complete stack trace.

@barroco barroco added the bug Something isn't working label Sep 4, 2024
@barroco
Copy link
Contributor Author

barroco commented Sep 4, 2024

To eliminate the assumption the update of external non-pip dependencies may have created the issue, the following command have been run with packages installed previously:

docker run -ti --rm interuss/monitoring:v0.8.0 bash
pip install -r requirements.txt --force-reinstall

The same issue can be observed:

Collecting setuptools>=3.0 (from gunicorn==20.1.0->-r requirements.txt (line 690))
ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
    setuptools>=3.0 from https://files.pythonhosted.org/packages/48/f3/e30ee63caefa90716afdffd7d9ae959cd8d0dbd2d0a0eb9fe1d73ddf806b/setuptools-74.1.1-py3-none-any.whl (from gunicorn==20.1.0->-r requirements.txt (line 690))

Python Version in v0.8.0:

docker run -ti --rm interuss/monitoring:v0.8.0 python --version 
Python 3.12.5

@Shastick Shastick self-assigned this Sep 5, 2024
Shastick added a commit to Orbitalize/monitoring that referenced this issue Sep 5, 2024
This PR applies the recommendation from the generated requirements file to use the `--allow-unsafe`:

```
```

The PR also removes the pinned minor version of the base image.

Closes interuss#768
@BenjaminPelletier BenjaminPelletier added the P1 High priority label Sep 5, 2024
Shastick added a commit to Orbitalize/monitoring that referenced this issue Sep 6, 2024
This PR applies the recommendation from the generated requirements file to use the `--allow-unsafe`:

```
```

The PR also removes the pinned minor version of the base image.

Closes interuss#768
Shastick added a commit to Orbitalize/monitoring that referenced this issue Sep 10, 2024
This PR applies the recommendation from the generated requirements file to use the `--allow-unsafe`:

```
```

The PR also removes the pinned minor version of the base image.

Closes interuss#768
Shastick added a commit to Orbitalize/monitoring that referenced this issue Sep 10, 2024
This PR applies the recommendation from the generated requirements file to use the `--allow-unsafe`:

```
```

The PR also removes the pinned minor version of the base image.

Closes interuss#768
Shastick added a commit to Orbitalize/monitoring that referenced this issue Sep 10, 2024
This PR applies the recommendation from the generated requirements file to use the `--allow-unsafe`:

```
```

The PR also removes the pinned minor version of the base image.

Closes interuss#768
@barroco
Copy link
Contributor Author

barroco commented Sep 10, 2024

Investigation showed that setuptools was removed from python docker image 3.12+: docker-library/python#954 (merged on August 30, monitoring:v0.8.0 was released on August 23)
This is the reason why the issue appeared. pip was not using on the pre-installed package in the base image anymore and while trying to install it, failed to validate the hashes.

Shastick added a commit to Orbitalize/monitoring that referenced this issue Sep 11, 2024
This PR applies the recommendation from the generated requirements file to use the `--allow-unsafe`:

```
```

The PR also removes the pinned minor version of the base image.

Closes interuss#768
@Shastick
Copy link
Contributor

This particular issue has been addressed for now.

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

Successfully merging a pull request may close this issue.

3 participants