chnm / chnm/apiary

Make database startup configuration and retries explicit and cancellable

Open
#136 0 comments 0 reactions 0 assignees View on GitHub

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_DB is 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.