Skip to content

fix(backup): add reconciliation timestamps to backup status#9351

Merged
leonardoce merged 2 commits intomainfrom
dev/backup-started-at
Dec 22, 2025
Merged

fix(backup): add reconciliation timestamps to backup status#9351
leonardoce merged 2 commits intomainfrom
dev/backup-started-at

Conversation

@armru
Copy link
Member

@armru armru commented Dec 2, 2025

Add reconciliationStartedAt and reconciliationTerminatedAt fields to the BackupStatus to track when the operator started and terminated the backup reconciliation process.

This separates the operator's reconciliation timing from the backup tool's execution timing (startedAt/stoppedAt), which allows for better monitoring of long-running backups.

Previously, startedAt was not set until the backup completed, making it difficult to monitor backup progress. Now:

  • reconciliationStartedAt: Set when the operator begins processing the backup (in SetAsStarted)
  • reconciliationTerminatedAt: Set when the operator finishes processing (in SetAsCompleted or SetAsFailed)
  • startedAt/stoppedAt: Reserved for the backup tool's actual execution times

For volume snapshot backups, startedAt and stoppedAt are now aligned with the reconciliation timestamps since the backup execution is managed by the operator.

Fixes monitoring of long-running backups by providing accurate timing information throughout the backup lifecycle.

Closes #9352

@armru armru requested review from a team and jsilvela as code owners December 2, 2025 14:47
@armru armru added the no-issue label Dec 2, 2025
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 2, 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 Dec 2, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

❗ 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

@armru armru added do not backport This PR must not be backported - it will be in the next minor release and removed backport-requested ◀️ This pull request should be backported to all supported releases release-1.25 size:L This PR changes 100-499 lines, ignoring generated files. release-1.26 release-1.27 labels Dec 2, 2025
@dosubot dosubot bot added enhancement 🪄 New feature or request observability 🔍 Observability, Monitoring, Logging labels Dec 2, 2025
@armru armru force-pushed the dev/backup-started-at branch from f70e078 to 2ec6599 Compare December 2, 2025 14:49
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 2, 2025
@armru
Copy link
Member Author

armru commented Dec 2, 2025

/test

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

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

@armru armru changed the title feat(backup): add reconciliation timestamps to backup status fix(backup): add reconciliation timestamps to backup status Dec 2, 2025
@armru armru added bug 🐛 Something isn't working and removed no-issue labels Dec 2, 2025
@armru
Copy link
Member Author

armru commented Dec 2, 2025

/test

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

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

@armru armru force-pushed the dev/backup-started-at branch from 2ec6599 to 4458b41 Compare December 2, 2025 16:45
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Dec 2, 2025
@armru
Copy link
Member Author

armru commented Dec 2, 2025

/test

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

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

@armru armru force-pushed the dev/backup-started-at branch from 4458b41 to ac5dce6 Compare December 2, 2025 16:47
@armru
Copy link
Member Author

armru commented Dec 2, 2025

/test

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

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

@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Dec 2, 2025
Copy link
Contributor

@gabriele-wolfox gabriele-wolfox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 10, 2025
@leonardoce leonardoce force-pushed the dev/backup-started-at branch from ac5dce6 to adcd08b Compare December 17, 2025 09:33
armru and others added 2 commits December 22, 2025 08:13
Add `reconciliationStartedAt` and `reconciliationTerminatedAt` fields to
the BackupStatus to track when the operator started and terminated the
backup reconciliation process.

This separates the operator's reconciliation timing from the backup
tool's execution timing (`startedAt`/`stoppedAt`), which allows for
better monitoring of long-running backups.

Previously, `startedAt` was not set until the backup completed, making
it difficult to monitor backup progress. Now:

- `reconciliationStartedAt`: Set when the operator begins processing
  the backup (in `SetAsStarted`)
- `reconciliationTerminatedAt`: Set when the operator finishes
  processing (in `SetAsCompleted` or `SetAsFailed`)
- `startedAt`/`stoppedAt`: Reserved for the backup tool's actual
  execution times

For volume snapshot backups, `startedAt` and `stoppedAt` are now
aligned with the reconciliation timestamps since the backup execution
is managed by the operator.

Fixes monitoring of long-running backups by providing accurate timing
information throughout the backup lifecycle.

Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Leonardo Cecchi <[email protected]>
@leonardoce leonardoce force-pushed the dev/backup-started-at branch from a56067a to 2b227f8 Compare December 22, 2025 07:13
@leonardoce leonardoce merged commit 5e51c55 into main Dec 22, 2025
34 checks passed
@leonardoce leonardoce deleted the dev/backup-started-at branch December 22, 2025 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐛 Something isn't working do not backport This PR must not be backported - it will be in the next minor release enhancement 🪄 New feature or request lgtm This PR has been approved by a maintainer observability 🔍 Observability, Monitoring, Logging ok to merge 👌 This PR can be merged 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]: Backup status does not set startedAt until backup completes

5 participants