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

feat: add object restore functionality #677

Merged
merged 19 commits into from
Sep 16, 2024

Conversation

ddelgrosso1
Copy link
Contributor

@ddelgrosso1 ddelgrosso1 commented Sep 12, 2024

Fixes #654

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to README are included in PR

@ddelgrosso1 ddelgrosso1 changed the title Soft delete feat: add object restore functionality Sep 12, 2024
Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.74%. Comparing base (61bce3c) to head (632f127).
Report is 42 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #677      +/-   ##
==========================================
+ Coverage   98.69%   98.74%   +0.04%     
==========================================
  Files          50       50              
  Lines        8492     8738     +246     
==========================================
+ Hits         8381     8628     +247     
+ Misses        111      110       -1     
Flag Coverage Δ
unittests 98.74% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ddelgrosso1
Copy link
Contributor Author

This does not add the ability to list/get soft deleted objects. Should it?

@ddelgrosso1 ddelgrosso1 marked this pull request as ready for review September 13, 2024 15:31
@ddelgrosso1 ddelgrosso1 requested a review from a team as a code owner September 13, 2024 15:31
@ddelgrosso1
Copy link
Contributor Author

Will add get / list operations as well. Looks easy enough.

Copy link
Contributor

@cojenco cojenco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just have a few questions. Thanks for adding this!

testbench/database.py Show resolved Hide resolved
testbench/database.py Show resolved Hide resolved
tests/test_grpc_server.py Outdated Show resolved Hide resolved
blob.metadata.metageneration = 1
blob.metadata.generation = blob.metadata.generation + 1
if bucket_with_metadata.metadata.autoclass.enabled is True:
blob.metadata.storage_class = "STANDARD"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

testbench/database.py Show resolved Hide resolved
@cojenco cojenco merged commit deb04f3 into googleapis:main Sep 16, 2024
13 checks passed
@ddelgrosso1 ddelgrosso1 deleted the soft-delete branch September 16, 2024 20:22
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.

Add support for object softdelete
2 participants