rhos-infra / shade_janitor

Utility based on shade to select and cleanup resources from CI runs in a tenant
GNU General Public License v3.0
1 stars 6 forks source link

Remove select_age module #28

Closed bregman-arie closed 8 years ago

bregman-arie commented 8 years ago

select_age module contains one method that can be included in resources.

In my opinion it should be contained in resources since there is no real use for it as a seperate object. It only selects resources (as resource module) but by age parameters.

In addition, it will allow us to move all "old" and "unused" logic from janitor main loop to resources module where it should be.

yazug commented 8 years ago

resources is an additive collection object with no reset right now. This refactor Breaks the age related cleanup behavior. Prior behavior it would clean up one old instance per run, this branch attempts to cleanup up all of them.

If you want to change behavior please make that a separate pull request, if you are refactoring please maintain all functionality in the refactor.

Will not merge as is.

yazug commented 8 years ago

Also I'd like to see unittest around the age selection functionality before it is moved.

bregman-arie commented 8 years ago

"Prior behavior it would clean up one old instance per run, this branch attempts to cleanup up all of them"

Why would you want it cleanup only one per run? I'm not sure if it's clear for users who use it. I would expect it to cleanup all old instances..