-
Notifications
You must be signed in to change notification settings - Fork 92
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
CLI, lifecycle: delete exceeding object versions #1363
Conversation
Codecov Report
@@ Coverage Diff @@
## 4.x #1363 +/- ##
==========================================
+ Coverage 78.15% 78.42% +0.28%
==========================================
Files 300 300
Lines 55859 56098 +239
Branches 6486 6488 +2
==========================================
+ Hits 43650 43992 +342
+ Misses 11975 11966 -9
+ Partials 234 140 -94
Continue to review full report at Codecov.
|
ce9c763
to
30c44c8
Compare
oio/container/lifecycle.py
Outdated
def from_element(cls, unused, **kwargs): | ||
return cls(**kwargs) | ||
|
||
def match(self, account, container, **kwargs): |
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.
The signature is different from LifecycleAction.match
.
I agree there is a design flaw in this API: the from_element
method could take an instance of ContainerLifecycle
instead of (or along with) an instance of an ObjectStorageApi
, to get an access to the account and container names.
oio/api/object_storage.py
Outdated
|
||
:param full: if true, check the presence of the chunks in the rawx | ||
:type full: `bool` | ||
""" |
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.
I propose we extend this API with a trust_level
parameter instead of full
.
trust_level=0
: do not check chunks;trust_level=1
: check if there are enough chunks to read the object;trust_level=2
: check if all chunks are present.
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.
In the scope of this pull-request, you can stop at trust_level=0
and trust_level=2
, letting trust_level=1
to another pull-request.
</Filter> | ||
<Status>Enabled</Status> | ||
<ExceedingVersionExpiration> | ||
</ExceedingVersionExpiration> |
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.
To be consistent, we may need to put that inside <NonCurrentVersionExpiration>
, and make it configurable (independently from the versioning configuration of the container).
853ae25
to
4398693
Compare
oio/cli/container/container.py
Outdated
n<0 is unlimited number of versions. | ||
n=0 is 1 version. | ||
n>0 is n versions. | ||
""" |
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.
Specifying max-versions < 1 is not relevant.
795a51c
to
3836285
Compare
3836285
to
f83c574
Compare
See #1163