-
fix(docker): chmod migrations dir in ldr-test stage too (#3650)
发布于
2026-04-25 17:23:17 +00:00 PR #3635 added a chmod for /install/.venv/.../database/migrations to the
productionldrstage to satisfy alembic_runner.validate_migrations-
permissions, which refuses world-writable migration dirs (pip/pdm umask
quirk — pip#8164, conda#12829). The fix only landed inldr; the
ldr-teststage runs its ownpdm installand never inherited it, so
the test image still ships migrations/versions/ as world-writable.Same PR also dropped the inner try/except around initialize_database(),
making migration failures surface as 503 instead of being silently
swallowed. TheCreate Releaserun on main right after #3635 merged
hit this on the auth-login Puppeteer shard (run 24932815020): every
login attempt 503'd with "Database initialisation failed" because
test_admin's DB had tables but no stamped revision, so alembic re-ran
on every login → permission check → ValueError. All 3 retry attempts
failed identically.Mirror the chmod into ldr-test, right after
pdm install. Same
targeted scope as the production fix — only the migrations subtree,
not a blanket venv chmod.下载附件