neonctl bootstrap (aka create-app) by default assumes that neondb_owner user already exists and at the same time doesn't accept owner_name as a parameter
Steps to reproduce
Create some project and database, don't use neondb name.
Make sure that neondb_owner user doesn't exists.
Run neonctl bootstrap
Expected result
neondb_owner user is created if not exists
Actual result
<REDACTED>
✔ What Neon project would you like to use? › some_existing_project
Branch
┌─────────────────────────┬────────────────┬─────────┬─────────┬──────────────────────┬──────────────────────┐
│ Id │ Name │ Primary │ Default │ Created At │ Updated At │
├─────────────────────────┼────────────────┼─────────┼─────────┼──────────────────────┼──────────────────────┤
│ br-misty-bonus-a29xcad8 │ dev/y8pjG4iG3d │ false │ false │ 2024-08-23T20:41:21Z │ 2024-08-23T20:41:21Z │
└─────────────────────────┴────────────────┴─────────┴─────────┴──────────────────────┴──────────────────────┘
INFO: Resource is locked. Waiting 3000ms before retrying...
ERROR: database owner not found
neonctl bootstrap
(akacreate-app
) by default assumes thatneondb_owner
user already exists and at the same time doesn't acceptowner_name
as a parameterSteps to reproduce
neondb
name.neondb_owner
user doesn't exists.neonctl bootstrap
Expected result
neondb_owner
user is created if not existsActual result
which under the hood comes from
Nice to have
additional
--owner-name
flag where you can define it.I think it could also be created if not exist but that's debatableotherwise this could be reused https://github.com/neondatabase/neonctl/blob/76f9b9fabb2c56c30e8f930a142f2d11532e5419/src/commands/databases.ts#L80-L93