Skip to content

Commit 0dc2cf6

Browse files
committed
[build] pin setuptools to avoid installation failures
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 #768
1 parent 98740cc commit 0dc2cf6

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,13 @@ restart-all: stop-uss-mocks down-locally start-locally start-uss-mocks
120120
restart-uss-mocks: stop-uss-mocks start-uss-mocks
121121

122122
# To be run locally whenever a direct dependency has been updated in requirements.in
123+
# --allow-unsafe allows us to pin setuptools
123124
.PHONY: update-pinned-dependencies
124125
update-pinned-dependencies:
125-
./scripts/pip_tools/pip_compile.sh --generate-hashes --output-file=requirements.txt requirements.in
126+
./scripts/pip_tools/pip_compile.sh \
127+
--generate-hashes \
128+
--allow-unsafe \
129+
--output-file=requirements.txt \
130+
requirements.in
126131

127132

monitoring/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#
1010
# This image is intended to be built from the repository root context/folder.
1111

12-
FROM python:3.12.4-slim
12+
FROM python:3.12-slim
1313
# Not -alpine because: https://stackoverflow.com/a/58028091/651139
1414

1515
# Install system tools

requirements.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ pyyaml==6.0.1
4343
requests==2.31.0
4444
s2sphere==0.2.5
4545
scipy==1.13.0
46+
setuptools==72.1.0
4647
shapely==1.7.1
4748
structlog==21.5.0 # deployment_manager
4849
termcolor==1.1.0

requirements.txt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is autogenerated by pip-compile with Python 3.12
33
# by the following command:
44
#
5-
# pip-compile --generate-hashes --output-file=requirements.txt requirements.in
5+
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements.txt requirements.in
66
#
77
aiohttp==3.9.2 \
88
--hash=sha256:00a9abcea793c81e7f8778ca195a1714a64f6d7436c4c0bb168ad2a212627000 \
@@ -1778,7 +1778,13 @@ zope-interface==6.3 \
17781778
--hash=sha256:f95bebd0afe86b2adc074df29edb6848fc4d474ff24075e2c263d698774e108d
17791779
# via gevent
17801780

1781-
# WARNING: The following packages were not pinned, but pip requires them to be
1782-
# pinned when the requirements file includes hashes and the requirement is not
1783-
# satisfied by a package already installed. Consider using the --allow-unsafe flag.
1784-
# setuptools
1781+
# The following packages are considered to be unsafe in a requirements file:
1782+
setuptools==72.1.0 \
1783+
--hash=sha256:5a03e1860cf56bb6ef48ce186b0e557fdba433237481a9a625176c2831be15d1 \
1784+
--hash=sha256:8d243eff56d095e5817f796ede6ae32941278f542e0f941867cc05ae52b162ec
1785+
# via
1786+
# -r requirements.in
1787+
# gunicorn
1788+
# kubernetes
1789+
# zope-event
1790+
# zope-interface

0 commit comments

Comments
 (0)