Fix PostgreSQL locking during SSO provisioning [skip ci] #30
Reference in New Issue
Block a user
Delete Branch "hotfix/sso-optional-email-dev-20260928"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PostgreSQL rejects FOR UPDATE over the nullable profile join, causing a 500 after JWT validation. Lock only the SsoIdentity row and keep eager profile loading. 37 SSO tests pass locally. The exact one-line fix was tested in an isolated process against dev PostgreSQL: email-less users, active session, replay denial, saved email, explicit binding, permissions and inactive users; all probe writes rolled back. No additional migration.
Release: manually build exact merged commits, pin image digests, validate migration plan and readiness. Main deployment preserves its existing database and media. New sources stay dev-only. Automatic build/deploy skipped to avoid concurrent releases.
Focused diff reviewed for account collisions, missing email, nullable schema, local-account compatibility and unchanged authorization checks.