Skip to content
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

Merged
merged 9 commits into from
Mar 6, 2018

Conversation

AymericDu
Copy link
Member

See #1163

@codecov-io
Copy link

codecov-io commented Feb 15, 2018

Codecov Report

Merging #1363 into 4.x will increase coverage by 0.28%.
The diff coverage is 94.54%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
meta2v2/meta2_gridd_dispatcher.c 68.19% <ø> (ø) ⬆️
tests/unit/container/test_lifecycle.py 98.71% <100%> (-0.04%) ⬇️
meta2v2/meta2_filters_action_container.c 54.61% <100%> (-2.13%) ⬇️
proxy/metacd_http.c 89.12% <100%> (-2.03%) ⬇️
meta2v2/meta2_filters_extract.c 87.88% <100%> (-1.59%) ⬇️
tests/functional/api/test_objectstorage.py 96.14% <100%> (+0.47%) ⬆️
oio/container/client.py 83.28% <100%> (+0.48%) ⬆️
tests/functional/container/test_container.py 99.28% <100%> (+0.04%) ⬆️
proxy/meta2v2_remote.c 80.43% <100%> (-0.79%) ⬇️
...ests/functional/content/test_content_versioning.py 100% <100%> (ø) ⬆️
... and 60 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6280e64...86dcbcf. Read the comment docs.

@fvennetier fvennetier self-requested a review February 26, 2018 16:10
@fvennetier fvennetier changed the title lifecycle: Add action to delete exceeding versions CLI, lifecycle: delete exceeding object versions Feb 27, 2018
def from_element(cls, unused, **kwargs):
return cls(**kwargs)

def match(self, account, container, **kwargs):
Copy link
Member

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.


:param full: if true, check the presence of the chunks in the rawx
:type full: `bool`
"""
Copy link
Member

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.

Copy link
Member

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>
Copy link
Member

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).

@AymericDu AymericDu force-pushed the lifecycle-purge branch 4 times, most recently from 853ae25 to 4398693 Compare March 5, 2018 15:32
n<0 is unlimited number of versions.
n=0 is 1 version.
n>0 is n versions.
"""
Copy link
Member

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.

@fvennetier fvennetier merged commit bdfed02 into open-io:4.x Mar 6, 2018
@AymericDu AymericDu deleted the lifecycle-purge branch March 8, 2018 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants