feat(postgres): Add Fairway-based New constructor.

Replace the previous New(dsn) shorthand with a new New(ctx, opts...) that loads the PostgreSQL dependency configuration from a Fairway dependency bindings file (default /etc/fairway/dependencies.yaml) and reads the username and password from a secret mount directory (default /secrets/dependencies/postgresql), then assembles a DSN and delegates to NewWithConfig.

Add ErrUndefinedDependency for the case where the loaded config does not contain a postgresql entry, and a WithTracer option to wire a trace.Tracer through to the underlying client. The withDepsPath and withSecretsPath options are package-private and exist purely for tests.

Add gitlab.com/gitlab-com/gl-infra/platform/runway/fairway v1.13.0 as a direct dependency for the generated deppb types, and bump transitive dependencies pulled in alongside it.

Convert client_test.go to an internal package postgres test so the new TestNew can exercise the package-private options, and migrate existing tests off the removed New(dsn) shorthand to NewWithConfig(&Config{DSN: ...}).

Issue: gitlab-com/gl-infra/platform/runway/team#884 (closed)

Edited by Florian Forster

Merge request reports

Loading
Loading