Feature: Seed Gmail OAuth token into oauth_tokens DB table for resilience #242
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/basketball-api#242
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Type
Feature
Lineage
Discovered scope — identified during westside-landing #169 password reset investigation. The
oauth_tokensDB table is empty, forcing fallback to file-based tokens that expire without self-renewal.Repo
forgejo_admin/basketball-apiUser Story
As a superadmin, I want Gmail OAuth tokens stored in the database so that the email service survives pod restarts without manual token rotation.
Context
The basketball-api email service uses Gmail OAuth. Currently:
oauth_tokensDB table has 0 rowsgmail-westsidebasketball.json) mounted from k8s secretFile Targets
src/basketball_api/services/email.py— Gmail OAuth token loading logicsrc/basketball_api/models/—oauth_tokenstable modelTest Expectations
Constraints
Acceptance Criteria
oauth_tokenstable seeded with current Gmail token on startup or via migrationChecklist
Related
forgejo_admin/westside-landing#169— password reset outage caused by this gapproject-westside-basketballScope Review: APPROVED
Review note:
review-657-2026-03-29Scope is valid and issue is well-structured. All template sections present, traceability triangle complete (story:WS-S21, arch:basketball-api, Forgejo issue open).
Key finding: The code-level feature is already fully implemented by spike #130 (board item #229, done). The
token_store.pymodule,OAuthTokenmodel, migration 021, seed script, and 12 tests all exist. The remaining work is purely operational — seed the prodoauth_tokenstable.Recommendations (all
[BODY]):src/basketball_api/models/→src/basketball_api/models.py(single file, not directory)services/token_store.py,scripts/seed_oauth_token.py,tests/test_token_store.py