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

bring buildhub up to Python 3.12 and updated dependencies #1048

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN bin/build-ui.sh


# Next, all the things for building the Python web service
FROM python:3.7-slim@sha256:3e4be41076ebb6fe8c3112b220ce133ef0dc49c814024e4874ca76eae3c8dec0
FROM python:3.12-slim@sha256:18458e84347a51aaefd57a3776a5416063d8828424e37168ff5eeef738419098

WORKDIR /app/

Expand Down
38 changes: 19 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ help: default
default:
@echo "Welcome to the buildhub\n"
@echo "The list of commands for local development:\n"
@echo " build Builds the docker images for the docker-compose setup"
@echo " build Builds the docker images for the docker compose setup"
@echo " setup Initializes and sets up Postgres and Elasticsearch services"
@echo " run Runs the whole stack, served on http://localhost:8000/"
@echo " gunicorn Runs the whole stack using gunicorn on http://localhost:8000/"
Expand All @@ -36,76 +36,76 @@ default:

.PHONY: build
build: .env
docker-compose build
docker compose build
touch .docker-build

.PHONY: setup
setup: .env
docker-compose run web /app/bin/setup-services.sh
docker compose run web /app/bin/setup-services.sh

.PHONY: clean
clean: .env stop
docker-compose rm -f
docker compose rm -f
rm -rf coverage/ .coverage
rm -fr .docker-build

.PHONY: migrate
migrate: .env
docker-compose run web python manage.py migrate
docker compose run web python manage.py migrate

.PHONY: shell
shell: .env .docker-build
# Use `-u 0` to automatically become root in the shell
docker-compose run --user 0 --service-ports web bash
docker compose run --user 0 --service-ports web bash

.PHONY: currentshell
currentshell: .env .docker-build
# Use `-u 0` to automatically become root in the shell
docker-compose exec --user 0 web bash
docker compose exec --user 0 web bash

.PHONY: psql
psql: .env .docker-build
docker-compose run db psql --host db --username postgres
docker compose run db psql --host db --username postgres

.PHONY: stop
stop: .env
docker-compose stop
docker compose stop

.PHONY: test
test: .env .docker-build
docker-compose run web test
docker compose run web test

.PHONY: run
run: .env .docker-build
docker-compose up web ui
docker compose up web ui

.PHONY: gunicorn
gunicorn: .env .docker-build
docker-compose run --service-ports web web
docker compose run --service-ports web web

.PHONY: django-shell
django-shell: .env .docker-build
docker-compose run web python manage.py shell
docker compose run web python manage.py shell

.PHONY: lintcheck
lintcheck: .env .docker-build
docker-compose run web lintcheck
docker-compose run ui lintcheck
docker compose run web lintcheck
docker compose run ui lintcheck

.PHONY: lintfix
lintfix: .env .docker-build
docker-compose run web blackfix
docker-compose run ui lintfix
docker compose run web blackfix
docker compose run ui lintfix

.PHONY: docs
docs: .env .docker-build
# FIXME(willkg): Shouldn't be doing this as root
docker-compose run --no-deps --user 0 --rm --entrypoint /bin/bash web docs/build-docs.sh
docker compose run --no-deps --user 0 --rm --entrypoint /bin/bash web docs/build-docs.sh

.PHONY: tag
tag:
@bin/make-tag.py

.PHONY: daemon
daemon: .env
docker-compose run web python manage.py daemon
docker compose run web python manage.py daemon
10 changes: 4 additions & 6 deletions requirements/base.in
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
backoff
botocore
boto3
# Because of https://github.com/mozilla/django-csp/issues/129
django==2.2.9
django
django-configurations
django-cors-headers
django_csp
dj-database-url
dockerflow
# Pinned because upgrading breaks something
# TODO: debug me!
elasticsearch==6.3.1
elasticsearch-dsl==6.3.1
elasticsearch
elasticsearch-dsl
google-api-core
google-cloud-bigquery
gunicorn
jsonschema
Expand Down
1,096 changes: 727 additions & 369 deletions requirements/base.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions requirements/local.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
-r test.in

black
tox
85 changes: 68 additions & 17 deletions requirements/local.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,81 @@
# SHA1:f88f7cbe68a488d5a461e166640111dd30a94bcb
# SHA1:2286e3c675a4f88863ea04e00a2039ebf651c923
#
# This file is autogenerated by pip-compile-multi
# To update, run:
#
# pip-compile-multi
#
-r test.txt
distlib==0.3.1 \
--hash=sha256:8c09de2c67b3e7deef7184574fc060ab8a793e7adbb183d942c389c8b13c52fb \
--hash=sha256:edf6116872c863e1aa9d5bb7cb5e05a022c519a4594dc703843343a9ddd9bff1
black==24.4.2 \
--hash=sha256:257d724c2c9b1660f353b36c802ccece186a30accc7742c176d29c146df6e474 \
--hash=sha256:37aae07b029fa0174d39daf02748b379399b909652a806e5708199bd93899da1 \
--hash=sha256:415e686e87dbbe6f4cd5ef0fbf764af7b89f9057b97c908742b6008cc554b9c0 \
--hash=sha256:48a85f2cb5e6799a9ef05347b476cce6c182d6c71ee36925a6c194d074336ef8 \
--hash=sha256:7768a0dbf16a39aa5e9a3ded568bb545c8c2727396d063bbaf847df05b08cd96 \
--hash=sha256:7e122b1c4fb252fd85df3ca93578732b4749d9be076593076ef4d07a0233c3e1 \
--hash=sha256:88c57dc656038f1ab9f92b3eb5335ee9b021412feaa46330d5eba4e51fe49b04 \
--hash=sha256:8e537d281831ad0e71007dcdcbe50a71470b978c453fa41ce77186bbe0ed6021 \
--hash=sha256:98e123f1d5cfd42f886624d84464f7756f60ff6eab89ae845210631714f6db94 \
--hash=sha256:accf49e151c8ed2c0cdc528691838afd217c50412534e876a19270fea1e28e2d \
--hash=sha256:b1530ae42e9d6d5b670a34db49a94115a64596bc77710b1d05e9801e62ca0a7c \
--hash=sha256:b9176b9832e84308818a99a561e90aa479e73c523b3f77afd07913380ae2eab7 \
--hash=sha256:bdde6f877a18f24844e381d45e9947a49e97933573ac9d4345399be37621e26c \
--hash=sha256:be8bef99eb46d5021bf053114442914baeb3649a89dc5f3a555c88737e5e98fc \
--hash=sha256:bf10f7310db693bb62692609b397e8d67257c55f949abde4c67f9cc574492cc7 \
--hash=sha256:c872b53057f000085da66a19c55d68f6f8ddcac2642392ad3a355878406fbd4d \
--hash=sha256:d36ed1124bb81b32f8614555b34cc4259c3fbc7eec17870e8ff8ded335b58d8c \
--hash=sha256:da33a1a5e49c4122ccdfd56cd021ff1ebc4a1ec4e2d01594fef9b6f267a9e741 \
--hash=sha256:dd1b5a14e417189db4c7b64a6540f31730713d173f0b63e55fabd52d61d8fdce \
--hash=sha256:e151054aa00bad1f4e1f04919542885f89f5f7d086b8a59e5000e6c616896ffb \
--hash=sha256:eaea3008c281f1038edb473c1aa8ed8143a5535ff18f978a318f10302b254063 \
--hash=sha256:ef703f83fc32e131e9bcc0a5094cfe85599e7109f896fe8bc96cc402f3eb4b6e
# via -r requirements/local.in
chardet==5.2.0 \
--hash=sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7 \
--hash=sha256:e1cf59446890a00105fe7b7912492ea04b6e6f06d4b742b2c788469e34c82970
# via tox
click==8.1.7 \
--hash=sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28 \
--hash=sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de
# via black
colorama==0.4.6 \
--hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
# via tox
distlib==0.3.8 \
--hash=sha256:034db59a0b96f8ca18035f36290806a9a6e6bd9d1ff91e45a7f172eb17e51784 \
--hash=sha256:1530ea13e350031b6312d8580ddb6b27a104275a31106523b8f123787f494f64
# via virtualenv
filelock==3.0.12 \
--hash=sha256:18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59 \
--hash=sha256:929b7d63ec5b7d6b71b0fa5ac14e030b3f70b75747cef1b10da9b879fef15836
filelock==3.15.4 \
--hash=sha256:2207938cbc1844345cb01a5a95524dae30f0ce089eba5b00378295a17e3e90cb \
--hash=sha256:6ca1fffae96225dab4c6eaf1c4f4f28cd2568d3ec2a44e15a08520504de468e7
# via
# tox
# virtualenv
tox==3.20.0 \
--hash=sha256:e6318f404aff16522ff5211c88cab82b39af121735a443674e4e2e65f4e4637b \
--hash=sha256:eb629ddc60e8542fd4a1956b2462e3b8771d49f1ff630cecceacaa0fbfb7605a
mypy-extensions==1.0.0 \
--hash=sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d \
--hash=sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782
# via black
pathspec==0.12.1 \
--hash=sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08 \
--hash=sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712
# via black
platformdirs==4.2.2 \
--hash=sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee \
--hash=sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3
# via
# black
# tox
# virtualenv
pyproject-api==1.7.1 \
--hash=sha256:2dc1654062c2b27733d8fd4cdda672b22fe8741ef1dde8e3a998a9547b071eeb \
--hash=sha256:7ebc6cd10710f89f4cf2a2731710a98abce37ebff19427116ff2174c9236a827
# via tox
tox==4.15.1 \
--hash=sha256:53a092527d65e873e39213ebd4bd027a64623320b6b0326136384213f95b7076 \
--hash=sha256:f00a5dc4222b358e69694e47e3da0227ac41253509bca9f45aa8f012053e8d9d
# via -r requirements/local.in
virtualenv==20.0.31 \
--hash=sha256:43add625c53c596d38f971a465553f6318decc39d98512bc100fa1b1e839c8dc \
--hash=sha256:e0305af10299a7fb0d69393d8f04cb2965dda9351140d11ac8db4e5e3970451b
virtualenv==20.26.3 \
--hash=sha256:4c43a2a236279d9ea36a0d76f98d84bd6ca94ac4e0f4a3b9d46d05e10fea542a \
--hash=sha256:8cc4a31139e796e9a7de2cd5cf2489de1217193116a8fd42328f1bd65f434589
# via tox

# WARNING: The following packages were not pinned, but pip requires them to be
# pinned when the requirements file includes hashes. Consider using the --allow-unsafe flag.
# setuptools
1 change: 0 additions & 1 deletion requirements/test.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
-r base.in

black
flake8
pytest
pytest-django
Expand Down
Loading