You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(lifecycle): add support for profile-specific backup retention policies
Summary of changes:
- Extended the communication layer to allow PBM configuration profiles
to carry nested 'lifecycle' configuration blocks.
- Fixed a bug in the lifecycle evaluation engine where the 'minKeep'
safety threshold was not correctly rescuing the last successful backups
from the purge list.
- Updated the engine to respect 'Enabled: false' states instantly,
preventing accidental purges when the policy is disabled.
Key Technical Modifications:
- pbm/ctrl/cmd.go: Added Lifecycle struct to ProfileCmd payload.
- pbm/ctrl/send.go: Updated SendAddConfigProfile to accept lifecycle data.
- sdk/impl.go: Modified AddConfigProfile to pass lifecycle pointers from
the parsed YAML configuration.
- pbm-agent/profile.go: Updated handleAddConfigProfile to map received
lifecycle metadata back into the MongoDB profile documents.
- pbm/lifecycle/manager.go: Re-engineered Evaluate() to correctly enforce
MinKeep logic and handle disabled policies via early exit.
- pbm/lifecycle/manager_test.go: Updated unit tests to reflect and
verify the corrected safety behavior for in-progress and last-base backups.
Validated in a sharded lab environment with physical and logical storage
profiles, verifying that retention rules are applied correctly per-profile.
0 commit comments