fix: external DB credentials and dbinit for shared MySQL #4

Merged
sagar.patil merged 1 commits from fix/external-db-credentials-and-dbinit into main 2026-04-28 08:31:47 +00:00
Collaborator

Summary

  • Change database.username from hades_user to mysql_user to match the shared MySQL user created by Backstage
  • Remove mysql.enabled=true condition from dbinit job so SQL migrations run against external/shared MySQL too

Problem

When Backstage deploys hades with mysql.enabled=false (shared MySQL):

  1. hades_user doesn't exist in shared mysql-5-7 (only mysql_user exists) → access denied
  2. dbinit job is skipped → no tables created in hades_db → app crash

Impact

  • Bundled MySQL mode (mysql.enabled=true): zero impact — helpers use mysql.mysqlUser, ignoring database.*
  • External MySQL mode (mysql.enabled=false): fixes both access denied and missing tables

Test plan

  • Deploy hades with shared MySQL (mysql.enabled=false) — verify dbinit runs and hades starts
  • Deploy hades with bundled MySQL (mysql.enabled=true) — verify no regression
## Summary - Change `database.username` from `hades_user` to `mysql_user` to match the shared MySQL user created by Backstage - Remove `mysql.enabled=true` condition from dbinit job so SQL migrations run against external/shared MySQL too ## Problem When Backstage deploys hades with `mysql.enabled=false` (shared MySQL): 1. `hades_user` doesn't exist in shared `mysql-5-7` (only `mysql_user` exists) → **access denied** 2. dbinit job is skipped → no tables created in `hades_db` → app crash ## Impact - **Bundled MySQL mode** (`mysql.enabled=true`): zero impact — helpers use `mysql.mysqlUser`, ignoring `database.*` - **External MySQL mode** (`mysql.enabled=false`): fixes both access denied and missing tables ## Test plan - [ ] Deploy hades with shared MySQL (`mysql.enabled=false`) — verify dbinit runs and hades starts - [ ] Deploy hades with bundled MySQL (`mysql.enabled=true`) — verify no regression
sagar.patil added 1 commit 2026-04-28 08:30:30 +00:00
- Change database.username from "hades_user" to "mysql_user" to match
  the shared MySQL user created by Backstage environment provisioning
- Remove mysql.enabled=true condition from dbinit job so SQL migrations
  run against external/shared MySQL databases too

Without these fixes, deploying hades with mysql.enabled=false (Backstage
shared MySQL) causes access denied because hades_user doesn't exist in
the shared MySQL, and dbinit is skipped so no tables are created.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
sagar.patil merged commit 3dd28f0b78 into main 2026-04-28 08:31:47 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gitea_admin/hades-chart#4
No description provided.