Repository navigation
Move to Python 3.12 base image - #20
Merged
Merged
Conversation
Python 3.8 is out of support on AWS Lambda, and the rolling main-3.8 base image broke prod when 3.9+ syntax landed in the base layer. Switch to main-3.12 (as compareExpressions uses) and run the staging test job on 3.12 to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 6, 2026
The Python 3.12 Lambda base image is Amazon Linux 2023, which doesn't include find, so the chmod step failed with 'find: command not found'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Python 3.12's Lambda runtime imports the handler as a module name, so
CMD /app/app.handler became import_module('.app.app') and crashed on
startup (every request returned 500). Use CMD app.handler with
PYTHONPATH=/app, as compareExpressions does, and install pytest for
the healthcheck.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The base layer's healthcheck imports app.evaluation_tests, so since the rename in 88052af the deployed healthcheck has reported tests_passed: false. Add a pytest.ini so CI still discovers the file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
main-3.8base image broke production when the base layer added alist[str]annotation, which only works on Python 3.9+. That was fixed in Fix Python 3.8 import crash in tools/commands.py BaseEvalutionFunctionLayer#22, but staying on 3.8 leaves us open to the same kind of break.main-3.12.Changes
app/Dockerfile: base imagemain-3.8→main-3.12..github/workflows/staging-deploy.yml: staging test job runs on 3.12 instead of 3.8.test-lint.ymlwas already on 3.12.readme.md: prerequisite changed to Python 3.12.Notes
evaluation.py, andshape.pyfrom Size mismatch feedback #19, for numpy APIs removed in 2.0 and found none.numpyandevaluation-function-utilsinstall and import on 3.12, and the local tests pass. pytest only collectstest_blankfrom the currentevaluation_test.py; that was already the case before this change.🤖 Generated with Claude Code