Skip to content

Conversation

@pooknull
Copy link
Contributor

@pooknull pooknull commented Dec 19, 2025

K8SPSMDB-1542 Powered by Pull Request Badge

https://perconadev.atlassian.net/browse/K8SPSMDB-1542

DESCRIPTION

This PR makes operator to use a .spec.backup.startingDeadlineSeconds as a deadline for PBM backup being in starting status. If this field is not specified, it defaults to 120 seconds

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?
  • Are OpenShift compare files changed for E2E tests (compare/*-oc.yml)?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are all needed new/changed options added to the Helm Chart?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported MongoDB version?
  • Does the change support oldest and newest supported Kubernetes version?

Copilot AI review requested due to automatic review settings December 19, 2025 11:58
@pull-request-size pull-request-size bot added the size/L 100-499 lines label Dec 19, 2025
@github-actions github-actions bot added the tests label Dec 19, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new configurable field pbmStartingDeadlineSeconds to the BackupSpec API, allowing users to customize the timeout for backups stuck in the "starting" state. The default timeout remains 120 seconds, with the ability to override it at the cluster backup specification level.

Key Changes

  • New PBMStartingDeadlineSeconds field added to BackupSpec with int64 type
  • Updated backup status logic to use the configurable timeout instead of hardcoded value
  • Test coverage added for custom deadline scenarios

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/apis/psmdb/v1/psmdb_types.go Adds PBMStartingDeadlineSeconds field to BackupSpec struct
pkg/apis/psmdb/v1/zz_generated.deepcopy.go Auto-generated DeepCopy method for the new field
pkg/controller/perconaservermongodbbackup/backup.go Updates timeout logic to use configurable value with default fallback
pkg/controller/perconaservermongodbbackup/psmdb_backup_controller.go Passes cluster parameter to Status method
pkg/controller/perconaservermongodbbackup/backup_test.go Adds test case for custom deadline scenario
config/crd/bases/psmdb.percona.com_perconaservermongodbs.yaml Adds CRD schema definition for new field
deploy/crd.yaml Adds CRD schema definition for new field
deploy/bundle.yaml Adds CRD schema definition for new field
deploy/cw-bundle.yaml Adds CRD schema definition for new field
e2e-tests/version-service/conf/crd.yaml Adds CRD schema definition for new field
deploy/cr.yaml Adds commented example configuration with default value

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pooknull pooknull marked this pull request as ready for review December 22, 2025 10:21
Copilot AI review requested due to automatic review settings December 22, 2025 10:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings December 22, 2025 12:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pull-request-size pull-request-size bot added size/M 30-99 lines and removed size/L 100-499 lines labels Dec 22, 2025
@pooknull pooknull changed the title K8SPSMDB-1542: add pbmStartingDeadlineSeconds field K8SPSMDB-1542: use startingDeadlineSeconds for PBM Dec 22, 2025
@JNKPercona
Copy link
Collaborator

Test Name Result Time
arbiter passed 00:11:40
balancer passed 00:18:41
cross-site-sharded passed 00:19:25
custom-replset-name passed 00:10:48
custom-tls passed 00:14:30
custom-users-roles passed 00:11:18
custom-users-roles-sharded passed 00:12:55
data-at-rest-encryption passed 00:13:54
data-sharded passed 00:23:26
demand-backup passed 00:15:56
demand-backup-eks-credentials-irsa passed 00:00:07
demand-backup-fs passed 00:22:29
demand-backup-if-unhealthy passed 00:08:51
demand-backup-incremental passed 00:44:45
demand-backup-incremental-sharded failure 00:40:08
demand-backup-physical-parallel passed 00:08:13
demand-backup-physical-aws passed 00:12:22
demand-backup-physical-azure passed 00:12:07
demand-backup-physical-gcp-s3 passed 00:11:29
demand-backup-physical-gcp-native passed 00:12:10
demand-backup-physical-minio passed 00:20:42
demand-backup-physical-minio-native passed 00:20:03
demand-backup-physical-sharded-parallel passed 00:10:59
demand-backup-physical-sharded-aws passed 00:18:29
demand-backup-physical-sharded-azure passed 00:17:23
demand-backup-physical-sharded-gcp-native passed 00:18:06
demand-backup-physical-sharded-minio passed 00:17:36
demand-backup-physical-sharded-minio-native passed 00:18:23
demand-backup-sharded passed 00:25:58
expose-sharded passed 00:34:17
finalizer passed 00:10:10
ignore-labels-annotations passed 00:07:54
init-deploy passed 00:13:02
ldap passed 00:09:21
ldap-tls passed 00:13:00
limits passed 00:06:29
liveness passed 00:08:14
mongod-major-upgrade passed 00:12:13
mongod-major-upgrade-sharded passed 00:21:46
monitoring-2-0 passed 00:25:50
monitoring-pmm3 passed 00:29:23
multi-cluster-service passed 00:11:59
multi-storage passed 00:19:21
non-voting-and-hidden passed 00:16:42
one-pod passed 00:07:56
operator-self-healing-chaos passed 00:13:13
pitr passed 00:32:50
pitr-physical passed 01:12:10
pitr-sharded passed 00:22:48
pitr-to-new-cluster passed 00:25:38
pitr-physical-backup-source failure 01:17:36
preinit-updates passed 00:05:25
pvc-resize passed 00:13:31
recover-no-primary failure 01:14:20
replset-overrides passed 00:17:24
replset-remapping passed 00:08:49
replset-remapping-sharded passed 00:18:19
rs-shard-migration passed 00:14:41
scaling passed 00:11:44
scheduled-backup passed 00:17:44
security-context passed 00:06:51
self-healing-chaos passed 00:15:33
service-per-pod passed 00:19:00
serviceless-external-nodes passed 00:07:35
smart-update passed 00:08:07
split-horizon passed 00:08:12
stable-resource-version passed 00:09:13
storage passed 00:10:30
tls-issue-cert-manager failure 00:04:30
upgrade passed 00:11:58
upgrade-consistency passed 00:08:12
upgrade-consistency-sharded-tls passed 00:54:25
upgrade-sharded passed 00:19:22
upgrade-partial-backup passed 00:15:58
users passed 00:18:00
users-vault passed 00:14:04
version-service passed 00:25:41
Summary Value
Tests Run 77/77
Job Duration 03:45:12
Total Test Time 23:44:33

commit: df65e35
image: perconalab/percona-server-mongodb-operator:PR-2156-df65e35b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M 30-99 lines tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants