act-now-coalition / covid-data-model

Data backend providing computed data for the graphs displayed at https://covidactnow.org
https://covidactnow.org/
MIT License
149 stars 57 forks source link

Update to Python 3.10 and bump necessary dependencies #1392

Closed smcclure17 closed 8 months ago

smcclure17 commented 10 months ago

From SOW 3

This PR

Snapshot built off these changes:

smcclure17 commented 8 months ago

Found a snag with the AWS Infrastructure deploy (see pipeline run):

It seems to be importing the wrong pytest version. Pytest 6.2.5 is required for Python 3.10 (which we upgraded to in this PR), but the action still imports 6.2.1. It then throws an error that appears to be the same as https://github.com/pytest-dev/pytest/discussions/9195

I'll investigate tonight 👀. I think (hope) it might just be a caching issue.

These are the versions the action runs with (notice that pytest is the wrong version):

platform linux -- Python 3.10.13, pytest-6.2.1, py-1.11.0, pluggy-0.13.1
smcclure17 commented 8 months ago

@BrettBoval I've run into a slight hiccup with the AWS API infra. deploy--

With the requirements updates, the function package exceeded the maximum bundle size allowed for CloudFront/Lambda functions. I've done some work to trim the dependencies used by the API (e.g., by removing Sentry logging), but I am now getting 503 errors on the dev tier. I need to do some work to identify the exact issue (the tests run fine locally).

For debugging, I'd like to jump into the Cloudwatch logs, but I've lost our AWS (12-digit) organization ID. Is there any chance you have and could share this code?

TL:DR: The requirement updates pushed us over the maximum lambda size for the API functions (e.g. registering an API key) and I need to do a bit more work to get us successfully down below the size limit 🤕

smcclure17 commented 8 months ago

@BrettBoval I've split the AWS/API migration into a new PR at #1393 for clarity. I think we should be good to go on this PR.

Would you be able to put eyes on #1393 at some point? No rush, as these are separate/standalone services that can be deployed or upgraded separately.

BrettBoval commented 8 months ago

This has a failed/outdated deployment. Once you confirm that that deployment is successful, then I think you can ship both PRs.