Skip to content

Commit

Permalink
task/upgrade deps (#884)
Browse files Browse the repository at this point in the history
- Update web dependencies
- Use newer python docker image in ci
- Update web dependencies
- Update web deps
- Update web deps
- Update web deps
- Revert react-is to v17
- Update api deps
  • Loading branch information
sburba committed Dec 8, 2022
1 parent a2fe43f commit e0c2395
Show file tree
Hide file tree
Showing 25 changed files with 4,009 additions and 1,579 deletions.
8 changes: 7 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ commands:
jobs:
api:
docker:
- image: cimg/python:3.9.2
- image: cimg/python:3.10.8
working_directory: ~/repo/api
steps:
- setup_remote_docker:
version: 20.10.18
- checkout:
path: ~/repo
- restore_cache:
Expand All @@ -90,6 +92,10 @@ jobs:
- api-deps-v3-{{ checksum "poetry.lock" }}
# or, failing that, just the most recent cache entry
- api-deps-v3
- run:
# Necessary for poetry, but not included in base image :(
name: Install libsasl2
command: sudo apt-get update && sudo apt-get install libsasl2-dev
- run:
name: Configure Poetry
command: poetry config virtualenvs.in-project true && poetry config virtualenvs.path .venv
Expand Down
2 changes: 1 addition & 1 deletion api/.python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.2
3.10.8
12 changes: 6 additions & 6 deletions api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG BUILD_ENV="prod"

FROM python:3.9 as base
FROM python:3.10.8 as base
RUN useradd --create-home appuser
WORKDIR /home/appuser/app
RUN chown appuser:appuser /home/appuser/app
Expand All @@ -11,10 +11,10 @@ FROM base as builder
USER root
RUN apt-get update \
&& apt-get install -y \
g++ \
gcc \
libffi-dev \
libsasl2-dev \
g++ \
gcc \
libffi-dev \
libsasl2-dev \
&& rm -rf /var/lib/apt/lists/*
USER appuser

Expand All @@ -25,7 +25,7 @@ ENV PATH="/home/appuser/.local/bin:${PATH}" \
# the install once
PIP_NO_CACHE_DIR=1

RUN pip install --user poetry
RUN pip install --user poetry==1.2.2
# Create a venv so it's easy to copy everything over to the final image
# Creating our own venv instead of letting poetry create one automatically
# lets us dictate the venv location
Expand Down
5 changes: 2 additions & 3 deletions api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@
from typing import TypedDict, Optional, Any, Dict, cast, Callable, Awaitable
from uuid import uuid4

import aiobotocore
import scout_apm.core
import timber
import uvicorn
from aiobotocore.session import ClientCreatorContext
from aiobotocore.session import ClientCreatorContext, get_session
from aiohttp import ClientConnectorError
from botocore.exceptions import ClientError
from scout_apm.api import Config as ScoutConfig
Expand Down Expand Up @@ -63,7 +62,7 @@ class ExceptionContext(TypedDict):


def create_s3_context() -> ClientCreatorContext:
s3_client_context = aiobotocore.get_session().create_client(
s3_client_context = get_session().create_client(
's3',
region_name=config.aws_region,
endpoint_url=config.aws_endpoint,
Expand Down

0 comments on commit e0c2395

Please sign in to comment.