Skip to content

fix(plugin): recognize barman-plugin in status command#8690

Merged
mnencia merged 4 commits intomainfrom
dev/8276
Oct 9, 2025
Merged

fix(plugin): recognize barman-plugin in status command#8690
mnencia merged 4 commits intomainfrom
dev/8276

Conversation

@gbartolini
Copy link
Contributor

@gbartolini gbartolini commented Sep 30, 2025

The status command previously interrupted the display of continuous backup information when .spec.backup was empty. It now also checks that the plugin list is empty before doing so.

The first recoverability point is shown only if .spec.backup is present.

Closes #8276
See plugin-barman-cloud #541

@gbartolini gbartolini requested a review from a team as a code owner September 30, 2025 11:49
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Sep 30, 2025
@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.25 release-1.26 release-1.27 labels Sep 30, 2025
@github-actions
Copy link
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@gbartolini
Copy link
Contributor Author

I have created the demo setup from the cnpg-playground project and run the command. This is how it looks:

$ ./bin/kubectl-cnpg status pg-eu
Cluster Summary
Name                 default/pg-eu
System ID:           7555788083300945948
PostgreSQL Image:    ghcr.io/cloudnative-pg/postgresql:18-standard-trixie
Primary instance:    pg-eu-1
Primary start time:  2025-09-30 07:57:08 +0000 UTC (uptime 4h8m34s)
Status:              Cluster in healthy state
Instances:           3
Ready instances:     3
Size:                176M
Current Write LSN:   0/A000000 (Timeline: 1 - WAL File: 00000001000000000000000A)

Continuous Backup status
Working WAL archiving:        OK
WALs waiting to be archived:  0
Last Archived WAL:            000000010000000000000009   @   2025-09-30T08:08:42.787418Z
Last Failed WAL:              -

Streaming Replication status
Replication Slots Enabled
Name     Sent LSN   Write LSN  Flush LSN  Replay LSN  Write Lag  Flush Lag  Replay Lag  State      Sync State  Sync Priority  Replication Slot
----     --------   ---------  ---------  ----------  ---------  ---------  ----------  -----      ----------  -------------  ----------------
pg-eu-2  0/A000000  0/A000000  0/A000000  0/A000000   00:00:00   00:00:00   00:00:00    streaming  async       0              active
pg-eu-3  0/A000000  0/A000000  0/A000000  0/A000000   00:00:00   00:00:00   00:00:00    streaming  async       0              active

Instances status
Name     Current LSN  Replication role  Status  QoS         Manager Version  Node
----     -----------  ----------------  ------  ---         ---------------  ----
pg-eu-1  0/A000000    Primary           OK      BestEffort  1.27.0           k8s-eu-worker4
pg-eu-2  0/A000000    Standby (async)   OK      BestEffort  1.27.0           k8s-eu-worker5
pg-eu-3  0/A000000    Standby (async)   OK      BestEffort  1.27.0           k8s-eu-worker3

Plugins status
Name                            Version  Status  Reported Operator Capabilities
----                            -------  ------  ------------------------------
barman-cloud.cloudnative-pg.io  0.7.0    N/A     Reconciler Hooks, Lifecycle Service

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Oct 6, 2025
@armru armru force-pushed the dev/8276 branch 2 times, most recently from 6a2036d to 5f5d4d0 Compare October 6, 2025 11:11
@armru armru changed the title fix(plugin): handle empty backup section in status command fix(plugin): recognize barman-plugin in status command Oct 6, 2025
@armru armru force-pushed the dev/8276 branch 3 times, most recently from 1aff7a1 to 11223d1 Compare October 6, 2025 11:14
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 6, 2025
@mnencia
Copy link
Member

mnencia commented Oct 9, 2025

/test

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/18376281443

gbartolini and others added 2 commits October 9, 2025 16:51
The `status` command previously interrupted the display of continuous
backup information when `.spec.backup` was empty. It now also checks
that the plugin list is empty before doing so.

The first recoverability point is shown only if `.spec.backup` is
present.

Closes #8276

Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
armru and others added 2 commits October 9, 2025 16:51
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Oct 9, 2025
@mnencia mnencia merged commit 83fe052 into main Oct 9, 2025
35 checks passed
@mnencia mnencia deleted the dev/8276 branch October 9, 2025 16:38
mnencia pushed a commit that referenced this pull request Oct 9, 2025
The `status` command previously interrupted the display of continuous
backup information when `.spec.backup` was empty. It now also checks
that the plugin list is empty before doing so.

The first recoverability point is shown only if `.spec.backup` is
present.

Closes #8276
See cloudnative-pg/plugin-barman-cloud#541

Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
(cherry picked from commit 83fe052)
mnencia pushed a commit that referenced this pull request Oct 9, 2025
The `status` command previously interrupted the display of continuous
backup information when `.spec.backup` was empty. It now also checks
that the plugin list is empty before doing so.

The first recoverability point is shown only if `.spec.backup` is
present.

Closes #8276
See cloudnative-pg/plugin-barman-cloud#541

Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
(cherry picked from commit 83fe052)
mnencia pushed a commit that referenced this pull request Oct 9, 2025
The `status` command previously interrupted the display of continuous
backup information when `.spec.backup` was empty. It now also checks
that the plugin list is empty before doing so.

The first recoverability point is shown only if `.spec.backup` is
present.

Closes #8276
See cloudnative-pg/plugin-barman-cloud#541

Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
(cherry picked from commit 83fe052)
THE-BRAHMA pushed a commit to THE-BRAHMA/cloudnative-pg that referenced this pull request Oct 30, 2025
…-pg#8690)

The `status` command previously interrupted the display of continuous
backup information when `.spec.backup` was empty. It now also checks
that the plugin list is empty before doing so.

The first recoverability point is shown only if `.spec.backup` is
present.

Closes cloudnative-pg#8276
See cloudnative-pg/plugin-barman-cloud#541

Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: theBrahma <office.utpal.brahma@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-requested ◀️ This pull request should be backported to all supported releases bug 🐛 Something isn't working lgtm This PR has been approved by a maintainer ok to merge 👌 This PR can be merged release-1.25 release-1.26 release-1.27 size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: kubectl cnpg status does not report Continuous Backup status when using barman-cloud objectstore

4 participants