Skip to content

Upgrade to Python 3.12 base layer - #5

Merged
m-messer merged 2 commits into
masterfrom
python-3.12
Nov 10, 2026
Merged

m-messer merged 2 commits into
masterfrom
python-3.12

Conversation

@m-messer

@m-messer m-messer commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Moves off baseevalutionfunctionlayer:main-3.8 (Python 3.8 runtime, deprecated; the base layer has stopped building the 3.8 image).

  • app/Dockerfile: main-3.12, the same recipe as survey (dnf findutils, PYTHONPATH=/app, pytest, CMD ["app.handler"])
  • Renamed evaluation_test.py to evaluation_tests.py. The base layer healthcheck imports evaluation_tests, which is why prod healthcheck currently reports tests_passed: false
  • Workflows now match survey's: Python 3.12, deploy.yml@main instead of @deploy-request (main already contains everything from deploy-request), test-lint runs on PRs, and run-database-tests: true on production deploy
  • Staging deploy now triggers on master (the repo's default branch). It used to trigger on main, so merges never reached staging. The production branch input now defaults to master
  • Added pytest.ini and updated the README Python version

Testing (branch deployed to staging; not tested locally):

  • PR CI on 3.12: passed
  • Staging endpoint vs prod: healthcheck tests_passed went from false to true; eval output identical to prod
  • Database tests on staging: 498/500, against a 100% threshold. Both failures are historical records where the response equals the answer ("30"/"30", "1"/"1" with type: str, sent by the harness as integers) but the stored grade is False. The function code is unchanged from prod (only the Dockerfile and test file name changed), so these aren't regressions. Excluding those IDs only surfaced more records of the same kind (2 more on rerun), so they're left as-is
  • TEST_API_ENDPOINT repo secret set to the isExactEqual-staging URL so pre_production_tests.yml works

🤖 Generated with Claude Code

m-messer and others added 2 commits November 9, 2026 15:09
- Base image baseevalutionfunctionlayer:main-3.8 -> main-3.12 (AL2023: dnf findutils,
  PYTHONPATH, pytest for healthcheck, module-style CMD)
- Rename evaluation_test.py -> evaluation_tests.py so the base layer healthcheck can import it
- Workflows copied from survey: Python 3.12, deploy.yml@main, PR-triggered test-lint,
  database tests on production deploy
- Add pytest.ini

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@m-messer
m-messer merged commit 18755d7 into master Nov 10, 2026
10 of 13 checks passed
@m-messer
m-messer deleted the python-3.12 branch November 10, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant