Skip to content

Conversation

daimon243
Copy link
Contributor

Description

Fix bug in SnapshotPolicy where deletion schedule incorrectly uses creation schedule values instead of deletion schedule values.

Changes:

  • Fix deletion schedule to use r.instance.Spec.Deletion.Schedule instead of r.instance.Spec.Creation.Schedule
  • Add nil check for r.instance.Spec.Deletion.Schedule to prevent panic
  • Add unit tests to verify deletion schedule is used correctly
  • Add unit test for nil deletion schedule case

Issues Resolved

Closes #1121 - Bug: SnapshotPolicy deletion schedule incorrectly uses creation schedule

Check List

  • Commits are signed per the DCO using --signoff
  • Unittest added for the new/changed functionality and all unit tests are successful
  • Customer-visible features documented
  • No linter warnings (make lint)

If CRDs are changed:

  • CRD YAMLs updated (make manifests) and also copied into the helm chart
  • Changes to CRDs documented

Please refer to the PR guidelines before submitting this pull request.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

- Fix deletion schedule to use r.instance.Spec.Deletion.Schedule instead of r.instance.Spec.Creation.Schedule
- Add nil check for r.instance.Spec.Deletion.Schedule to prevent panic
- Add unit tests to verify deletion schedule is used correctly
- Add unit test for nil deletion schedule case

Signed-off-by: Dmitry Teikovtcev <[email protected]>
@prudhvigodithi
Copy link
Member

Thanks for your contribution @daimon243, this is an important bug fix.
@getsaurabh02 @synhershko

@prudhvigodithi prudhvigodithi merged commit 56d04b5 into opensearch-project:main Oct 11, 2025
10 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In Review to ✅ Done in Engineering Effectiveness Board Oct 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Bug: SnapshotPolicy deletion schedule incorrectly uses creation schedule

2 participants