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
Fix regression from #9481 about defaulting prune images arguments #11552
Conversation
…ments Currently oadm prune images has no default arguments, but keepTagRevisions should be 3 and keepYoungerThan should be 60 mins. Upon adding pruneOverSizeLimit that was broken, this commit fixes that problem. Additionally, I've added logs about what the parameters are set to other prune commands.
@mfojtik fyi, since it'll require your approval as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor suggestion regarding logging messages. LGTM otherwise.
|
||
glog.V(1).Infof("Creating image pruner with keepYoungerThan=%v, keepTagRevisions=%v, pruneOverSizeLimit=%v", | ||
options.KeepYoungerThan, options.KeepTagRevisions, options.PruneOverSizeLimit) | ||
keepTagRevisions := "<nil>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"<nil>"
reveals an implementation detail. To a regular user, it may look like a magic. Would it be perhaps better not to print unset parameters at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's consistent with what we have in other places. I wouldn't worry about this exposing implementation details ;)
[test] |
Evaluated for origin test up to 81a32a2 |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/10663/) (Base Commit: 7cd5ade) |
[merge] |
Evaluated for origin merge up to 81a32a2 |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/10663/) (Base Commit: 38c9545) (Image: devenv-rhel7_5250) |
Currently
oadm prune images
has no default arguments, butkeepTagRevisions
should be 3 andkeepYoungerThan
should be 60 mins. Upon addingpruneOverSizeLimit
that was broken (compare to #9481, here specifically), this commit fixes that problem.Additionally, I've added logs about what the parameters are set to other prune commands.
@miminar I've mentioned you that on IRC