Skip to content

fix(backup): use correct pod name in event when pod is not found#9552

Merged
mnencia merged 1 commit intomainfrom
dev/podname-backup-empty
Dec 22, 2025
Merged

fix(backup): use correct pod name in event when pod is not found#9552
mnencia merged 1 commit intomainfrom
dev/podname-backup-empty

Conversation

@armru
Copy link
Member

@armru armru commented Dec 22, 2025

In isValidBackupRunning, when the elected backup pod is not found, the event message was incorrectly referencing pod.Name which is empty since the Get() call returned NotFound. Changed to use the actual pod name from backup.Status.InstanceID.PodName which contains the name of the pod that couldn't be found.

@armru armru requested a review from a team as a code owner December 22, 2025 14:50
@armru armru added the no-issue label Dec 22, 2025
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Dec 22, 2025
@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.25 release-1.27 release-1.28 labels Dec 22, 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

@dosubot dosubot bot added the bug 🐛 Something isn't working label Dec 22, 2025
@armru armru force-pushed the dev/podname-backup-empty branch from 04dff75 to 5ecdc28 Compare December 22, 2025 14:54
@armru
Copy link
Member Author

armru commented Dec 22, 2025

/test

@github-actions
Copy link
Contributor

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

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 22, 2025
In isValidBackupRunning, when the elected backup pod is not found, the
event message was incorrectly referencing pod.Name which is empty since
the Get() call returned NotFound. Changed to use the actual pod name
from backup.Status.InstanceID.PodName which contains the name of the
pod that couldn't be found.

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
@mnencia mnencia force-pushed the dev/podname-backup-empty branch from 5ecdc28 to dcad3ef Compare December 22, 2025 16:03
@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Dec 22, 2025
@mnencia mnencia merged commit ea7c496 into main Dec 22, 2025
35 of 36 checks passed
@mnencia mnencia deleted the dev/podname-backup-empty branch December 22, 2025 17:27
cnpg-bot pushed a commit that referenced this pull request Dec 22, 2025
In isValidBackupRunning, when the elected backup pod is not found, the
event message was incorrectly referencing pod.Name which is empty since
the Get() call returned NotFound. Changed to use the actual pod name
from backup.Status.InstanceID.PodName which contains the name of the pod
that couldn't be found.

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
(cherry picked from commit ea7c496)
cnpg-bot pushed a commit that referenced this pull request Dec 22, 2025
In isValidBackupRunning, when the elected backup pod is not found, the
event message was incorrectly referencing pod.Name which is empty since
the Get() call returned NotFound. Changed to use the actual pod name
from backup.Status.InstanceID.PodName which contains the name of the pod
that couldn't be found.

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
(cherry picked from commit ea7c496)
mnencia pushed a commit that referenced this pull request Dec 22, 2025
In isValidBackupRunning, when the elected backup pod is not found, the
event message was incorrectly referencing pod.Name which is empty since
the Get() call returned NotFound. Changed to use the actual pod name
from backup.Status.InstanceID.PodName which contains the name of the pod
that couldn't be found.

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
(cherry picked from commit ea7c496)
mnencia pushed a commit that referenced this pull request Jan 20, 2026
In isValidBackupRunning, when the elected backup pod is not found, the
event message was incorrectly referencing pod.Name which is empty since
the Get() call returned NotFound. Changed to use the actual pod name
from backup.Status.InstanceID.PodName which contains the name of the pod
that couldn't be found.

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
(cherry picked from commit ea7c496)
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 no-issue ok to merge 👌 This PR can be merged release-1.25 release-1.27 release-1.28 size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants