plugin-barman-cloud/internal/cnpgi/common
Leonardo Cecchi aaf6120eaa
fix: classify WAL restore errors with precise gRPC statuses (#927)
Map each restorer sentinel to the gRPC status that best reflects whether
the operator should retry:

  - ErrWALNotFound      -> NotFound        (terminal)
  - ErrInvalidWalName   -> InvalidArgument (terminal)
  - ErrConnectivity     -> Unavailable     (retry)
  - ErrGeneric          -> Unavailable     (retry)
  - anything else       -> Internal        (terminal)

Previously every non-NotFound failure was returned verbatim, leaving the
operator unable to tell transient blips apart from terminal conditions
like a malformed WAL name.

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Tao Li <tao.li@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Tao Li <tao.li@enterprisedb.com>
2026-06-03 11:25:07 +02:00
..
check.go feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
common.go feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
doc.go feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
errors_test.go fix: classify WAL restore errors with precise gRPC statuses (#927) 2026-06-03 11:25:07 +02:00
errors.go fix: classify WAL restore errors with precise gRPC statuses (#927) 2026-06-03 11:25:07 +02:00
health.go feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
scheme.go fix(deps): update module sigs.k8s.io/controller-runtime to v0.24.0 (#880) 2026-05-06 10:15:29 +02:00
suite_test.go fix: classify WAL restore errors with precise gRPC statuses (#927) 2026-06-03 11:25:07 +02:00
wal_import.go feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
wal.go fix: classify WAL restore errors with precise gRPC statuses (#927) 2026-06-03 11:25:07 +02:00