Skip to content

Upgrade to Python 3.12 base layer - #9

Merged
m-messer merged 1 commit into
masterfrom
python-3.12
Nov 10, 2026
Merged

m-messer merged 1 commit 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"])
  • numpy==1.21.2 changed to numpy>=1.26, because 1.21 has no Python 3.12 wheels
  • Workflows now match survey's: Python 3.12, deploy.yml@main instead of @deploy-request / @deploy-request-on-dev (main already contains everything from both), 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). 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: true; eval output identical to prod
  • Database tests on staging: 499/500, against a 100% threshold. The failure is a historical record where the response equals the answer ([0,0,0,0,1,0], atol=0, rtol=0) but the stored grade is False. Not a regression: the function code is unchanged, and numpy 1.26 vs 1.21 can't change the result of comparing identical integer arrays. Excluding that ID only surfaced another record of the same kind on rerun, so it's left as-is
  • TEST_API_ENDPOINT repo secret set to the arrayEqual-staging URL so pre_production_tests.yml works

🤖 Generated with Claude Code

- Base image baseevalutionfunctionlayer:main-3.8 -> main-3.12 (AL2023: dnf findutils,
  PYTHONPATH, pytest for healthcheck, module-style CMD)
- numpy==1.21.2 -> numpy>=1.26 (no Python 3.12 wheels for 1.21)
- Workflows copied from survey: Python 3.12, deploy.yml@main, PR-triggered test-lint,
  database tests on production deploy; staging/production target master (default branch)
- Add pytest.ini

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@m-messer
m-messer merged commit a1ff2f1 into master Nov 10, 2026
10 of 12 checks passed
@m-messer
m-messer deleted the python-3.12 branch November 10, 2026 10:06
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