Skip to content

fix: rename misleading --client-cert parameter to --client-ca-cert#218

Open
rossigee wants to merge 28 commits intocloudnative-pg:mainfrom
rossigee:fix/misleading-ca-client-parameter-name
Open

fix: rename misleading --client-cert parameter to --client-ca-cert#218
rossigee wants to merge 28 commits intocloudnative-pg:mainfrom
rossigee:fix/misleading-ca-client-parameter-name

Conversation

@rossigee
Copy link

@rossigee rossigee commented Aug 25, 2025

The --client-cert parameter was misleading as it actually expects a CA certificate to verify client connections, not a client certificate itself. This caused confusion about what type of certificate to provide.

Changes:

  • Rename flag: --client-cert → --client-ca-cert
  • Update description to clarify CA certificate purpose
  • Update struct field: ClientCertPath → ClientCACertPath
  • Fix all references in code and tests

This is not a breaking change for plugins using this machinery.

@rossigee rossigee force-pushed the fix/misleading-ca-client-parameter-name branch from a69c282 to f3d96bd Compare September 18, 2025 11:36
@rossigee
Copy link
Author

@fcanovai @gbartolini @leonardoce @mnencia @phisco @sxd @armru - any interest in this PR?

It is intended to avoid situations where humans (and AI bots) would assume/infer an incorrect meaning from the flag name and get the wrong functional expectation of the command line argument.

Fixing this I believe will save a lot of people time (and tokens!).

rossigee and others added 21 commits February 22, 2026 18:42
…A certificate to verify client connections, not a client certificate itself. This caused confusion in the community about what type of certificate to provide.

Changes:
- Rename flag: --client-cert → --client-ca-cert
- Update description to clarify CA certificate purpose
- Update struct field: ClientCertPath → ClientCACertPath
- Fix all references in code and tests

Signed-off-by: Ross Golder <ross@golder.org>
…-pg#225)

| datasource  | package       | from     | to       |
| ----------- | ------------- | -------- | -------- |
| github-tags | dagger/dagger | v0.18.18 | v0.18.19 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
…23866 (cloudnative-pg#226)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
| datasource  | package            | from | to |
| ----------- | ------------------ | ---- | -- |
| github-tags | actions/setup-node | v4   | v5 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
…v2 (cloudnative-pg#220)

| datasource | package                            | from | to |
| ---------- | ---------------------------------- | ---- | -- |
| docker     | mcr.microsoft.com/devcontainers/go | 1    | 2  |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
| datasource  | package          | from | to |
| ----------- | ---------------- | ---- | -- |
| github-tags | actions/checkout | v4   | v5 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
| datasource     | package | from   | to     |
| -------------- | ------- | ------ | ------ |
| golang-version | go      | 1.24.6 | 1.25.1 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| docker     | golang  | 1.24.6 | 1.25.1 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
…dnative-pg#217)

| datasource | package                | from   | to     |
| ---------- | ---------------------- | ------ | ------ |
| docker     | golangci/golangci-lint | v2.3.1 | v2.5.0 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
| datasource | package                        | from    | to      |
| ---------- | ------------------------------ | ------- | ------- |
| go         | github.com/onsi/ginkgo/v2      | v2.25.2 | v2.25.3 |
| go         | github.com/spf13/viper         | v1.20.1 | v1.21.0 |
| go         | google.golang.org/grpc         | v1.75.0 | v1.75.1 |
| go         | k8s.io/api                     | v0.34.0 | v0.34.1 |
| go         | k8s.io/apimachinery            | v0.34.0 | v0.34.1 |
| go         | sigs.k8s.io/controller-runtime | v0.22.0 | v0.22.1 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
Previously, every failed gRPC RPC call was logged as an error with a full
stack trace, even when the failure was due to an expected status code.

With this patch, error messages and stack traces are logged only when the
gRPC status code is not explicitly set. This prevents the server from
logging errors for harmless cases such as `NotFound (404)`.

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Ross Golder <ross@golder.org>
Signed-off-by: Peggie <info@cloudnative-pg.io>
Signed-off-by: Ross Golder <ross@golder.org>
| datasource     | package | from   | to     |
| -------------- | ------- | ------ | ------ |
| golang-version | go      | 1.25.1 | 1.25.3 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
…dnative-pg#235)

| datasource | package                | from   | to     |
| ---------- | ---------------------- | ------ | ------ |
| docker     | golangci/golangci-lint | v2.5.0 | v2.7.2 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
| datasource | package                                         | from                               | to                                 |
| ---------- | ----------------------------------------------- | ---------------------------------- | ---------------------------------- |
| go         | github.com/cloudnative-pg/api                   | v1.27.0                            | v1.28.0                            |
| go         | github.com/cloudnative-pg/cnpg-i                | v0.3.0                             | v0.3.1                             |
| go         | github.com/cloudnative-pg/machinery             | v0.3.1                             | v0.3.2                             |
| go         | github.com/grpc-ecosystem/go-grpc-middleware/v2 | v2.3.2                             | v2.3.3                             |
| go         | github.com/onsi/ginkgo/v2                       | v2.25.3                            | v2.27.3                            |
| go         | github.com/onsi/gomega                          | v1.38.2                            | v1.38.3                            |
| go         | github.com/spf13/cobra                          | v1.10.1                            | v1.10.2                            |
| go         | google.golang.org/grpc                          | v1.75.1                            | v1.78.0                            |
| go         | k8s.io/api                                      | v0.34.1                            | v0.35.0                            |
| go         | k8s.io/apimachinery                             | v0.34.1                            | v0.35.0                            |
| go         | k8s.io/utils                                    | v0.0.0-20250820121507-0af2bda4dd1d | v0.0.0-20251222233032-718f0e51e6d2 |
| go         | sigs.k8s.io/controller-runtime                  | v0.22.1                            | v0.22.4                            |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
…pg#228)

| datasource  | package       | from     | to      |
| ----------- | ------------- | -------- | ------- |
| github-tags | dagger/dagger | v0.18.19 | v0.19.8 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
| datasource  | package          | from | to |
| ----------- | ---------------- | ---- | -- |
| github-tags | actions/checkout | v5   | v6 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
| datasource  | package            | from | to |
| ----------- | ------------------ | ---- | -- |
| github-tags | actions/setup-node | v5   | v6 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
| datasource      | package               | from    | to      |
| --------------- | --------------------- | ------- | ------- |
| github-releases | actions/node-versions | 22.21.1 | 24.12.0 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
renovate bot and others added 6 commits February 22, 2026 18:42
| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| docker     | golang  | 1.25.1 | 1.25.5 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
| datasource     | package | from   | to     |
| -------------- | ------- | ------ | ------ |
| golang-version | go      | 1.25.3 | 1.25.5 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
…59e34 (cloudnative-pg#230)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Ross Golder <ross@golder.org>
Signed-off-by: Peggie <info@cloudnative-pg.io>
Signed-off-by: Ross Golder <ross@golder.org>
- Keep --client-cert as deprecated alias for --client-ca-cert
- Print warning when deprecated flag is used
- Update parameter name for clarity: client-cert -> client-ca-cert
- Fix struct field: ClientCertPath -> ClientCACertPath
- Update descriptions to clarify CA certificate purpose
- Update error messages and tests accordingly

Signed-off-by: Ross Golder <ross@golder.org>
- Verify --client-ca-cert flag is present with correct description
- Verify deprecated --client-cert flag is present with deprecation notice

Signed-off-by: Ross Golder <ross@golder.org>
@rossigee rossigee force-pushed the fix/misleading-ca-client-parameter-name branch from 5a0c5d1 to 4157936 Compare February 22, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants