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

Delete folder api implementation #1954

Merged
merged 21 commits into from
Jun 14, 2024
Merged

Delete folder api implementation #1954

merged 21 commits into from
Jun 14, 2024

Conversation

Tulsishah
Copy link
Collaborator

@Tulsishah Tulsishah commented May 27, 2024

Description

Implemented the DeleteFolder API for HNS buckets. For HNS buckets, it will first attempt to call deleteObject. If this results in a "not found" error, it will be ignored, as the object may still exist as a folder within the HNS bucket. A second call will then be made from the control client to specifically delete the folder.

For FLAT bucket the existing flow will hit.

Link to the issue in case of a bug fix.

NA

Testing details

  1. Manual - Manually tested the flow for deleting folders on HNS bucket as well in FLAT bucket.
  2. Unit tests - Added
  3. Integration tests - Automated

@Tulsishah Tulsishah force-pushed the implement_delete_api branch from 545dbd1 to 4a776e6 Compare May 27, 2024 13:21
Copy link

codecov bot commented May 27, 2024

Codecov Report

Attention: Patch coverage is 27.53623% with 50 lines in your changes missing coverage. Please review.

Project coverage is 73.32%. Comparing base (fabd295) to head (b6ea521).
Report is 1 commits behind head on master.

Files Patch % Lines
internal/storage/mock_bucket.go 0.00% 13 Missing ⚠️
internal/storage/fake/bucket.go 0.00% 8 Missing ⚠️
internal/ratelimit/throttled_bucket.go 0.00% 6 Missing ⚠️
internal/monitor/bucket.go 0.00% 5 Missing ⚠️
internal/storage/debug_bucket.go 0.00% 5 Missing ⚠️
internal/fs/inode/dir.go 0.00% 2 Missing and 2 partials ⚠️
internal/storage/caching/fast_stat_bucket.go 0.00% 4 Missing ⚠️
internal/gcsx/prefix_bucket.go 0.00% 3 Missing ⚠️
internal/storage/bucket_handle.go 88.88% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1954      +/-   ##
==========================================
- Coverage   73.65%   73.32%   -0.34%     
==========================================
  Files          97       97              
  Lines       10381    10450      +69     
==========================================
+ Hits         7646     7662      +16     
- Misses       2398     2447      +49     
- Partials      337      341       +4     
Flag Coverage Δ
unittests 73.32% <27.53%> (-0.34%) ⬇️

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.

@Tulsishah Tulsishah added the execute-integration-tests Run only integration tests label May 30, 2024
@Tulsishah Tulsishah changed the title delete folder api implementation Delete folder api implementation May 30, 2024
@Tulsishah Tulsishah marked this pull request as ready for review May 30, 2024 11:32
@Tulsishah Tulsishah requested a review from a team as a code owner May 30, 2024 11:32
internal/fs/inode/dir.go Outdated Show resolved Hide resolved
internal/storage/bucket_handle.go Outdated Show resolved Hide resolved
internal/storage/bucket_handle.go Outdated Show resolved Hide resolved
internal/storage/mock_control_client.go Show resolved Hide resolved
internal/storage/bucket_handle_test.go Show resolved Hide resolved
internal/storage/debug_bucket.go Show resolved Hide resolved
@Tulsishah Tulsishah force-pushed the implement_delete_api branch from 2a7ee14 to c58d61b Compare June 10, 2024 06:34
@Tulsishah Tulsishah requested a review from ankitaluthra1 June 10, 2024 09:21
@Tulsishah Tulsishah force-pushed the implement_delete_api branch from fa11940 to 60d97b3 Compare June 12, 2024 05:54
@Tulsishah Tulsishah merged commit 70b6407 into master Jun 14, 2024
12 checks passed
@Tulsishah Tulsishah deleted the implement_delete_api branch July 19, 2024 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
execute-integration-tests Run only integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants