Make database startup configuration and retries explicit and cancellable
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Context
Split from #131. Startup currently combines a 60-second connection context with a five-retry backoff policy that normally expires much sooner, and an empty APIARY_DB falls through to libpq defaults.
Acceptance criteria
- Fail clearly when
APIARY_DBis absent instead of retrying an implicit localhost connection. - Make the retry/backoff lifetime match the documented startup budget.
- Ensure cancellation interrupts retry waiting promptly.
- Return startup errors to the executable boundary rather than terminating from reusable construction code where practical.
- Add focused tests for missing configuration, exhausted budget, and cancellation.
- Reconcile README configuration wording with the implemented behavior, including
APIARY_LOGGING.
Parent: #131
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the startup construction and retry/backoff path, then inspect the executable boundary and README configuration wording, including APIARY_LOGGING. Add focused coverage for missing configuration, exhausted budget, and cancellation, and verify startup errors reach the executable boundary without premature termination.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- backend, databases, documentation, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100