Loading
Commits on Source 4
-
Alessio Caiazza authored
When PostgreSQLFormat is set to CUSTOM but no projection is supplied, projection() returned (nil, nil). The subsequent field accesses in dsn() (proj.Host, proj.Port, ...) then panic with a nil pointer dereference instead of surfacing the misconfiguration. Return ErrSecretProjectionMissing in that case, and switch the CUSTOM branch to use the nil-safe getter chain for consistency with the UNSPECIFIED handling above it. AI-assisted: Claude Code (claude-opus-4-7)
-
Alessio Caiazza authored
Errors returned by dsn() (and the projection() helper it calls) had no package prefix, so they reached the caller as bare strings like "unknown secret format: -1" or a multi-line errors.Join output. The sibling error paths in newFromProto wrap with "postgres:", so the dsn() path was the only one without it. Wrap the dsn() result once at the call site to keep newFromProto's error surface uniform. errors.Is on the underlying sentinels keeps working since fmt.Errorf with %w preserves the chain. AI-assisted: Claude Code (claude-opus-4-7)
-
Alessio Caiazza authored
Three small typos in client_test.go: - "requies" -> "requires" - "withou" -> "without" - "clientOptions.dns()" -> "clientOptions.dsn()" in the t.Fatalf format string AI-assisted: Claude Code (claude-opus-4-7)
-
Elliot Forbes authored
fix(v2/postgres): reject CUSTOM format without projection See merge request !503 Merged-by:
Elliot Forbes <eforbes@gitlab.com>
Approved-by:
Elliot Forbes <eforbes@gitlab.com>
Co-authored-by: Alessio Caiazza <code.git@caiazza.info>