Skip to content

NC | lifecycle | fix expire-delete-marker issues #9008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

nadavMiz
Copy link
Contributor

@nadavMiz nadavMiz commented May 5, 2025

Describe the Problem

three problems:

  1. if both noncurrent and expire delete marker rules were defined together. the delete marker rules would set the state as is_finished causing nocurrent rule to not run
  2. list_version did not pass properly between nocurrent rules causing it to try to load again
  3. for expiration rule the default was to get the number of dats from the rule. but if there was no number of days defined, say when expire delete marker rule is used. then it will assume number of days 0

Explain the Changes

  1. check if isFinished only if version list is not defined. if it is defined than it got it from a previous action that determined that the rule is not finished
  2. move the versions_list to a params object, and pass it between the actions. that way it will be saved between actions. and we will not need to list again
  3. for getting the expiration add a condition for days argument. also set the default to be -1, which means do not run. so if both days and date are not defined (currently expire delete marker), the rule will not run

Issues: Fixed #xxx / Gap #xxx

Testing Instructions:

  • Doc added/updated
  • Tests added

@nadavMiz nadavMiz requested a review from romayalon May 5, 2025 09:56
@nadavMiz nadavMiz force-pushed the lifecycle-fix-delete-marker-expiration branch from b349fde to bd80fa7 Compare May 5, 2025 10:00
@nadavMiz nadavMiz self-assigned this May 5, 2025
@nadavMiz nadavMiz merged commit 13bfb61 into noobaa:master May 5, 2025
11 checks passed
@romayalon romayalon mentioned this pull request May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants