Closed alimaredia closed 5 years ago
Update: Per a discussion with Alfredo last week, the purge rotation can't filter by flavor, only ref. I plan on making some changes to chacra to be able to update the purge rotation by flavor.
@alfredodeza made those minor changes. Do you know why one of the checks is failing?
retest this please
jenkins test this please
@alfredodeza tests all pass now!
@andrewschoen @alfredodeza i remember this got stalled on the situation where either the keep minimum is set to 0 or the days is set to 0 in the purge rotation. As of now this PR purges the repo if either is set to 0, but you wanted two wanted me to only purge the repos if both are set to 0.
I think we should merge since I don't think having either one of those inputs in the purge_rotation is a realistic input.
@alimaredia we aren't expecting things to be set to 0
across the board. We are expecting that if any conditions matches to keep a repo around, to respect that.
Your proposed change worked the other way around: if any conditions matched the delete a repo, regardless of any other setting, it would get deleted. That should not be the case.
One of your tests has this configuration:
conf.purge_rotation = {'nfs-ganesha': {'flavor': {'ceph_master': {'keep_minimum': 0}}, 'ref': {'next': {'days': 70}}}, '__force_dict__': True}
In that case, if the 'flavor' is ceph_master
but it is day 1 of the next
ref, I would expect this not to be removed.
Seems like maybe this needs a rebase
@alfredodeza Here is an overview of the test coverage for the functionality of the PR: https://paste.fedoraproject.org/paste/QvwRqVRN0cBU6MOguldnEw
If there's anything else you want me to add that I missed let me know and I'll put it in.
Signed-off-by: Ali Maredia amaredia@redhat.com