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

Upgrade Connexion to v3 #3093

Draft
wants to merge 8 commits into
base: main
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
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN apt-get install -q --yes gcc && \
# it, and we can bind mount to override it for local development.
COPY src/ /app/src/
COPY uwsgi/ /app/uwsgi/
COPY uvicorn/ /app/uvicorn/
COPY scripts/manage-db.py scripts/run-batch-deletes.sh scripts/run.sh scripts/reset-stage-db.sh scripts/get-prod-db-dump.py /app/scripts/
COPY MANIFEST.in pyproject.toml setup.py version.json version.txt /app/

Expand Down
1 change: 1 addition & 0 deletions Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ COPY src/ /app/src/
COPY tests/ /app/tests/
COPY scripts/ /app/scripts/
COPY uwsgi/ /app/uwsgi/
COPY uvicorn/ /app/uvicorn/
COPY MANIFEST.in setup.py pyproject.toml tox.ini version.json version.txt /app/
# we need .git to gather information for coverage reports
COPY .git/ /app/.git/
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ include version.txt
recursive-include src *
recursive-include requirements *.txt
recursive-include uwsgi *
recursive-include uvicorn *

exclude .dirschema.yml
exclude .editorconfig
Expand Down
184 changes: 100 additions & 84 deletions agent/requirements/base.txt

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions agent/requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# pip-compile-multi
#
-r test.txt
cachetools==5.3.2 \
--hash=sha256:086ee420196f7b2ab9ca2db2520aca326318b68fe5ba8bc4d49cca91add450f2 \
--hash=sha256:861f35a13a451f94e301ce2bec7cac63e881232ccce7ed67fab9b5df4d3beaa1
cachetools==5.3.3 \
--hash=sha256:0abad1021d3f8325b2fc1d2e9c8b9c9d57b04c3932657a72465447332c24d945 \
--hash=sha256:ba29e2dfa0b8b556606f097407ed1aa62080ee108ab0dc5ec9d6a723a007d105
# via tox
chardet==5.2.0 \
--hash=sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7 \
Expand All @@ -32,13 +32,13 @@ pyproject-api==1.6.1 \
--hash=sha256:1817dc018adc0d1ff9ca1ed8c60e1623d5aaca40814b953af14a9cf9a5cae538 \
--hash=sha256:4c0116d60476b0786c88692cf4e325a9814965e2469c5998b830bba16b183675
# via tox
tox==4.12.1 \
--hash=sha256:61aafbeff1bd8a5af84e54ef6e8402f53c6a6066d0782336171ddfbf5362122e \
--hash=sha256:c07ea797880a44f3c4f200ad88ad92b446b83079d4ccef89585df64cc574375c
tox==4.13.0 \
--hash=sha256:1143c7e2489c68026a55d3d4ae84c02c449f073b28e62f80e3e440a3b72a4afa \
--hash=sha256:dd789a554c16c4b532924ba393c92fc8991323c4b3d466712bfecc8c9b9f24f7
# via -r requirements/local.in
virtualenv==20.25.0 \
--hash=sha256:4238949c5ffe6876362d9c0180fc6c3a824a7b12b80604eeb8085f2ed7460de3 \
--hash=sha256:bf51c0d9c7dd63ea8e44086fa1e4fb1093a31e963b86959257378aef020e1f1b
virtualenv==20.25.1 \
--hash=sha256:961c026ac520bac5f69acb8ea063e8a4f071bcc9457b9c1f28f6b085c511583a \
--hash=sha256:e08e13ecdca7a0bd53798f356d5831434afa5b07b93f0abdf0797b7a06ffe197
# via tox

# The following packages are considered to be unsafe in a requirements file:
198 changes: 100 additions & 98 deletions agent/requirements/test.txt

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ services:
- CORS_ORIGINS=*
- STAGING
- LOCAL_ADMIN
- HOST=0.0.0.0
# Mount the admin app at /api, for historical reasons.
# At some point we could consider mounting at
# based on admin.wsgi but now for gunicorn
- SCRIPT_NAME=/api
healthcheck:
test: nc -z -v balrogadmin 7070
interval: 5s
Expand Down Expand Up @@ -78,6 +83,7 @@ services:
- PORT=9010
- LOG_FORMAT=plain
- LOG_LEVEL=WARNING
- HOST=0.0.0.0
links:
- autograph
- balrogdb
Expand Down
4 changes: 2 additions & 2 deletions requirements/base.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
aiohttp
arrow
auth0-python
connexion<3
connexion[flask,swagger-ui,uvicorn]
deepmerge
ecdsa
flask
Expand All @@ -11,6 +11,7 @@ gcloud-aio-storage
google-api-core
google-auth
google-cloud-storage
gunicorn
jsonschema>=4.5.0
mysqlclient
python-jose
Expand All @@ -24,5 +25,4 @@ setuptools
sqlalchemy<2
sqlalchemy-migrate
statsd
uwsgi
pyjwt==2.4.0
1,153 changes: 728 additions & 425 deletions requirements/base.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion requirements/docs.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
aiohttp
arrow
auth0-python
connexion<3 # Just to be consistent with base.in
connexion[flask,swagger-ui,uvicorn]
deepmerge
flask
flask_compress
Expand Down
1,012 changes: 656 additions & 356 deletions requirements/docs.txt

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ tox==3.28.0 \
--hash=sha256:57b5ab7e8bb3074edc3c0c0b4b192a4f3799d3723b2c5b76f1fa9f2d40316eea \
--hash=sha256:d0d28f3fe6d6d7195c27f8b054c3e99d5451952b54abdae673b71609a581f640
# via -r requirements/local.in
virtualenv==20.25.0 \
--hash=sha256:4238949c5ffe6876362d9c0180fc6c3a824a7b12b80604eeb8085f2ed7460de3 \
--hash=sha256:bf51c0d9c7dd63ea8e44086fa1e4fb1093a31e963b86959257378aef020e1f1b
virtualenv==20.25.1 \
--hash=sha256:961c026ac520bac5f69acb8ea063e8a4f071bcc9457b9c1f28f6b085c511583a \
--hash=sha256:e08e13ecdca7a0bd53798f356d5831434afa5b07b93f0abdf0797b7a06ffe197
# via tox

# The following packages are considered to be unsafe in a requirements file:
92 changes: 47 additions & 45 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,35 @@
# pip-compile-multi
#
-r base.txt
black==24.1.1 \
--hash=sha256:0269dfdea12442022e88043d2910429bed717b2d04523867a85dacce535916b8 \
--hash=sha256:07204d078e25327aad9ed2c64790d681238686bce254c910de640c7cc4fc3aa6 \
--hash=sha256:08b34e85170d368c37ca7bf81cf67ac863c9d1963b2c1780c39102187ec8dd62 \
--hash=sha256:1a95915c98d6e32ca43809d46d932e2abc5f1f7d582ffbe65a5b4d1588af7445 \
--hash=sha256:2588021038bd5ada078de606f2a804cadd0a3cc6a79cb3e9bb3a8bf581325a4c \
--hash=sha256:2fa6a0e965779c8f2afb286f9ef798df770ba2b6cee063c650b96adec22c056a \
--hash=sha256:34afe9da5056aa123b8bfda1664bfe6fb4e9c6f311d8e4a6eb089da9a9173bf9 \
--hash=sha256:3897ae5a21ca132efa219c029cce5e6bfc9c3d34ed7e892113d199c0b1b444a2 \
--hash=sha256:40657e1b78212d582a0edecafef133cf1dd02e6677f539b669db4746150d38f6 \
--hash=sha256:48b5760dcbfe5cf97fd4fba23946681f3a81514c6ab8a45b50da67ac8fbc6c7b \
--hash=sha256:5242ecd9e990aeb995b6d03dc3b2d112d4a78f2083e5a8e86d566340ae80fec4 \
--hash=sha256:5cdc2e2195212208fbcae579b931407c1fa9997584f0a415421748aeafff1168 \
--hash=sha256:5d7b06ea8816cbd4becfe5f70accae953c53c0e53aa98730ceccb0395520ee5d \
--hash=sha256:7258c27115c1e3b5de9ac6c4f9957e3ee2c02c0b39222a24dc7aa03ba0e986f5 \
--hash=sha256:854c06fb86fd854140f37fb24dbf10621f5dab9e3b0c29a690ba595e3d543024 \
--hash=sha256:a21725862d0e855ae05da1dd25e3825ed712eaaccef6b03017fe0853a01aa45e \
--hash=sha256:a83fe522d9698d8f9a101b860b1ee154c1d25f8a82ceb807d319f085b2627c5b \
--hash=sha256:b3d64db762eae4a5ce04b6e3dd745dcca0fb9560eb931a5be97472e38652a161 \
--hash=sha256:e298d588744efda02379521a19639ebcd314fba7a49be22136204d7ed1782717 \
--hash=sha256:e2c8dfa14677f90d976f68e0c923947ae68fa3961d61ee30976c388adc0b02c8 \
--hash=sha256:ecba2a15dfb2d97105be74bbfe5128bc5e9fa8477d8c46766505c1dda5883aac \
--hash=sha256:fc1ec9aa6f4d98d022101e015261c056ddebe3da6a8ccfc2c792cbe0349d48b7
black==24.2.0 \
--hash=sha256:057c3dc602eaa6fdc451069bd027a1b2635028b575a6c3acfd63193ced20d9c8 \
--hash=sha256:08654d0797e65f2423f850fc8e16a0ce50925f9337fb4a4a176a7aa4026e63f8 \
--hash=sha256:163baf4ef40e6897a2a9b83890e59141cc8c2a98f2dda5080dc15c00ee1e62cd \
--hash=sha256:1e08fb9a15c914b81dd734ddd7fb10513016e5ce7e6704bdd5e1251ceee51ac9 \
--hash=sha256:4dd76e9468d5536abd40ffbc7a247f83b2324f0c050556d9c371c2b9a9a95e31 \
--hash=sha256:4f9de21bafcba9683853f6c96c2d515e364aee631b178eaa5145fc1c61a3cc92 \
--hash=sha256:61a0391772490ddfb8a693c067df1ef5227257e72b0e4108482b8d41b5aee13f \
--hash=sha256:6981eae48b3b33399c8757036c7f5d48a535b962a7c2310d19361edeef64ce29 \
--hash=sha256:7e53a8c630f71db01b28cd9602a1ada68c937cbf2c333e6ed041390d6968faf4 \
--hash=sha256:810d445ae6069ce64030c78ff6127cd9cd178a9ac3361435708b907d8a04c693 \
--hash=sha256:93601c2deb321b4bad8f95df408e3fb3943d85012dddb6121336b8e24a0d1218 \
--hash=sha256:992e451b04667116680cb88f63449267c13e1ad134f30087dec8527242e9862a \
--hash=sha256:9db528bccb9e8e20c08e716b3b09c6bdd64da0dd129b11e160bf082d4642ac23 \
--hash=sha256:a0057f800de6acc4407fe75bb147b0c2b5cbb7c3ed110d3e5999cd01184d53b0 \
--hash=sha256:ba15742a13de85e9b8f3239c8f807723991fbfae24bad92d34a2b12e81904982 \
--hash=sha256:bce4f25c27c3435e4dace4815bcb2008b87e167e3bf4ee47ccdc5ce906eb4894 \
--hash=sha256:ca610d29415ee1a30a3f30fab7a8f4144e9d34c89a235d81292a1edb2b55f540 \
--hash=sha256:d533d5e3259720fdbc1b37444491b024003e012c5173f7d06825a77508085430 \
--hash=sha256:d84f29eb3ee44859052073b7636533ec995bd0f64e2fb43aeceefc70090e752b \
--hash=sha256:e37c99f89929af50ffaf912454b3e3b47fd64109659026b678c091a4cd450fb2 \
--hash=sha256:e8a6ae970537e67830776488bca52000eaa37fa63b9988e8c487458d9cd5ace6 \
--hash=sha256:faf2ee02e6612577ba0181f4347bcbcf591eb122f7841ae5ba233d12c39dcb4d
# via
# -r requirements/test.in
# flake8-black
build==1.0.3 \
--hash=sha256:538aab1b64f9828977f84bc63ae570b060a8ed1be419e7870b8b4fc5e6ea553b \
--hash=sha256:589bf99a67df7c9cf07ec0ac0e5e2ea5d4b37ac63301c4986d1acb126aa83f8f
build==1.1.1 \
--hash=sha256:8ed0851ee76e6e38adce47e4bee3b51c771d86c64cf578d0c2245567ee200e73 \
--hash=sha256:8eea65bb45b1aac2e734ba2cc8dad3a6d97d97901a395bd0ed3e7b46953d2a31
# via
# check-manifest
# pip-tools
Expand Down Expand Up @@ -118,9 +118,9 @@ flake8-black==0.3.6 \
--hash=sha256:0dfbca3274777792a5bcb2af887a4cad72c72d0e86c94e08e3a3de151bb41c34 \
--hash=sha256:fe8ea2eca98d8a504f22040d9117347f6b367458366952862ac3586e7d4eeaca
# via -r requirements/test.in
hypothesis==6.97.3 \
--hash=sha256:00216ddadaee17ba73451e262f973970a97d34fd75ec34ef57510147264c34d1 \
--hash=sha256:6256d768ec866426bfce6ed78418c6e3e43119a0dbece2e0229a1ae5929ae53d
hypothesis==6.98.15 \
--hash=sha256:1e31210951511b24ce8b3b6e04d791c466385a30ac3af571bf2223954b025d77 \
--hash=sha256:5b40fd81fce9e0b35f0a47e10eb41f375a6b9e8551d0e1084c83b8b0d0d1bb6b
# via -r requirements/test.in
iniconfig==2.0.0 \
--hash=sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3 \
Expand Down Expand Up @@ -150,13 +150,13 @@ pip-compile-multi==2.6.3 \
--hash=sha256:50f7db9f5c57a2d11035805b6d86620c4d640c560f22e3c8b509e133456d8a53 \
--hash=sha256:f0b950a2175d0b86fd5a186d2f786bc8f7c013acd2e856a2bc948d194e0e4c92
# via -r requirements/test.in
pip-tools==7.3.0 \
--hash=sha256:8717693288720a8c6ebd07149c93ab0be1fced0b5191df9e9decd3263e20d85e \
--hash=sha256:8e9c99127fe024c025b46a0b2d15c7bd47f18f33226cf7330d35493663fc1d1d
pip-tools==7.4.0 \
--hash=sha256:a92a6ddfa86ff389fe6ace381d463bc436e2c705bd71d52117c25af5ce867bb7 \
--hash=sha256:b67432fd0759ed834c5367f9e0ce8c95441acecfec9c8e24b41aca166757adf0
# via pip-compile-multi
platformdirs==4.1.0 \
--hash=sha256:11c8f37bcca40db96d8144522d925583bdb7a31f7b0e37e3ed4318400a8e2380 \
--hash=sha256:906d548203468492d432bcb294d4bc2fff751bf84971fbb2c10918cc206ee420
platformdirs==4.2.0 \
--hash=sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068 \
--hash=sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768
# via black
pluggy==1.4.0 \
--hash=sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981 \
Expand All @@ -173,18 +173,20 @@ pyflakes==3.2.0 \
pyproject-hooks==1.0.0 \
--hash=sha256:283c11acd6b928d2f6a7c73fa0d01cb2bdc5f07c57a2eeb6e83d5e56b97976f8 \
--hash=sha256:f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5
# via build
pytest==7.4.4 \
--hash=sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280 \
--hash=sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8
# via
# build
# pip-tools
pytest==8.0.2 \
--hash=sha256:d4051d623a2e0b7e51960ba963193b09ce6daeb9759a451844a21e4ddedfc1bd \
--hash=sha256:edfaaef32ce5172d5466b5127b42e0d6d35ebbe4453f0e3505d96afd93f6b096
# via
# -r requirements/test.in
# pytest-asyncio
# pytest-cov
# pytest-xdist
pytest-asyncio==0.23.4 \
--hash=sha256:2143d9d9375bf372a73260e4114541485e84fca350b0b6b92674ca56ff5f7ea2 \
--hash=sha256:b0079dfac14b60cd1ce4691fbfb1748fe939db7d0234b5aba97197d10fbe0fef
pytest-asyncio==0.23.5 \
--hash=sha256:3a048872a9c4ba14c3e90cc1aa20cbc2def7d01c7c8db3777ec281ba9c057675 \
--hash=sha256:4e7093259ba018d58ede7d5315131d21923a60f8a6e9ee266ce1589685c89eac
# via -r requirements/test.in
pytest-cov==4.1.0 \
--hash=sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6 \
Expand All @@ -208,9 +210,9 @@ wheel==0.42.0 \
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
pip==23.3.2 \
--hash=sha256:5052d7889c1f9d05224cd41741acb7c5d6fa735ab34e339624a614eaaa7e7d76 \
--hash=sha256:7fd9972f96db22c8077a1ee2691b172c8089b17a5652a44494a9ecb0d78f9149
pip==24.0 \
--hash=sha256:ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc \
--hash=sha256:ea9bd1a847e8c5774a5777bb398c19e80bcd4e2aa16a4b301b718fe6f593aba2
# via
# -r requirements/test.in
# pip-tools
4 changes: 2 additions & 2 deletions scripts/run.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

if [ $1 == "public" ]; then
exec uwsgi --ini /app/uwsgi/public.ini --python-autoreload 1
exec gunicorn -k uvicorn.workers.UvicornWorker -b "${HOST}:${PORT}" --chdir /app/uvicorn --reload public:connexion_app
elif [ $1 == "admin" ]; then
exec uwsgi --ini /app/uwsgi/admin.ini --python-autoreload 1
exec gunicorn -k uvicorn.workers.UvicornWorker -b "${HOST}:${PORT}" --chdir /app/uvicorn --reload admin:connexion_app
elif [ $1 == "create-db" ]; then
if [ -z "${DBURI}" ]; then
echo "\${DBURI} must be set!"
Expand Down
17 changes: 14 additions & 3 deletions src/auslib/web/admin/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
from os import path

import connexion
from connexion.options import SwaggerUIOptions
from connexion.datastructures import MediaTypeDict
from connexion.validators import JSONRequestBodyValidator
from flask import request
from flask_compress import Compress
from sentry_sdk import capture_exception
Expand All @@ -13,7 +16,6 @@
from auslib.errors import BlobValidationError, PermissionDeniedError, ReadOnlyError, SignoffRequiredError
from auslib.util.auth import verified_userinfo
from auslib.web.admin.views.problem import problem
from auslib.web.admin.views.validators import BalrogRequestBodyValidator

log = logging.getLogger(__name__)

Expand All @@ -28,9 +30,18 @@
.add_spec(path.join(web_dir, "common/swagger/responses.yml"))
)

validator_map = {"body": BalrogRequestBodyValidator}
validator_map = {
"body": MediaTypeDict(
{
"*/*json": JSONRequestBodyValidator,
}
),
}

connexion_app = connexion.App(__name__, debug=False, options={"swagger_ui": False})
swagger_ui_options = SwaggerUIOptions(swagger_ui=False)

connexion_app = connexion.FlaskApp(__name__, swagger_ui_options=swagger_ui_options)
connexion_app.app.debug = False
connexion_app.add_api(spec, validator_map=validator_map, strict_validation=True)
connexion_app.add_api(path.join(current_dir, "swagger", "api_v2.yml"), base_path="/v2", strict_validation=True, validate_responses=True)
app = connexion_app.app
Expand Down
34 changes: 0 additions & 34 deletions src/auslib/web/admin/views/validators.py
Original file line number Diff line number Diff line change
@@ -1,44 +1,10 @@
import logging
from typing import AnyStr, Union

import jsonschema
from connexion.decorators.validation import RequestBodyValidator
from connexion.exceptions import BadRequestProblem
from connexion.lifecycle import ConnexionResponse
from connexion.utils import is_null

# To enable shared jsonschema validators
import auslib.util.jsonschema_validators # noqa
from auslib.util.timestamp import getMillisecondTimestamp

logger = logging.getLogger(__name__)


class BalrogRequestBodyValidator(RequestBodyValidator):
def validate_schema(self, data: dict, url: AnyStr) -> Union[ConnexionResponse, None]:
"""This function is largely based on https://github.com/zalando/connexion/blob/master/connexion/decorators/validation.py
and should largely be kept in line with it."""
if self.is_null_value_valid and is_null(data):
return None
try:
self.validator.validate(data)
except jsonschema.ValidationError as exception:
# Add field name to the error response
exception_field = ""
for i in exception.path:
exception_field = i + ": "
if exception.__cause__ is not None:
exception_message = exception.__cause__.message + " " + exception_field + exception.message
else:
exception_message = exception_field + exception.message
# Some exceptions could contain unicode characters - if we don't replace them
# we could end up with a UnicodeEncodeError.
logger.error("{url} validation error: {error}".format(url=url, error=exception_message.encode("utf-8", "replace")))
raise BadRequestProblem(detail=exception_message)

return None


def is_when_present_and_in_past_validator(what):
"""Validates if scheduled_change_time value i.e. 'when' field value is present in
input dictionary/object and if its value is in past or not"""
Expand Down
5 changes: 4 additions & 1 deletion src/auslib/web/public/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import connexion
from connexion import request
from connexion.options import SwaggerUIOptions
from flask import Response, make_response, send_from_directory
from sentry_sdk import capture_exception
from specsynthase.specbuilder import SpecBuilder
Expand All @@ -15,7 +16,9 @@

log = logging.getLogger(__name__)

connexion_app = connexion.App(__name__, specification_dir=".", options={"swagger_ui": False})
swagger_ui_options = SwaggerUIOptions(swagger_ui=False)

connexion_app = connexion.FlaskApp(__name__, specification_dir=".", swagger_ui_options=swagger_ui_options)
app = connexion_app.app

current_dir = path.dirname(__file__)
Expand Down
2 changes: 2 additions & 0 deletions taskcluster/docker/balrog-backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ RUN apt-get install -q --yes gcc && \
COPY topsrcdir/src/ /app/src/
# %include uwsgi
COPY topsrcdir/uwsgi/ /app/uwsgi/
# %include uvicorn
COPY topsrcdir/uvicorn/ /app/uvicorn/
# %include scripts
COPY topsrcdir/scripts/manage-db.py topsrcdir/scripts/run-batch-deletes.sh topsrcdir/scripts/run.sh topsrcdir/scripts/reset-stage-db.sh topsrcdir/scripts/get-prod-db-dump.py /app/scripts/
# %include MANIFEST.in
Expand Down
2 changes: 1 addition & 1 deletion tests/admin/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from auslib.blobs.base import createBlob
from auslib.global_state import cache, dbo
from auslib.web.admin.base import app
from auslib.web.admin.base import connexion_app as app

from ...fakes import FakeBlob, FakeGCSHistory

Expand Down
2 changes: 1 addition & 1 deletion tests/admin/views/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def my_userinfo(*args, **kwargs):

@pytest.fixture(scope="session")
def api():
from auslib.web.admin.base import app
from auslib.web.admin.base import connexion_app as app

app.config["SECRET_KEY"] = "notasecret"
app.config["CORS_ORIGINS"] = "*"
Expand Down
Loading