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

Updates for force delete and prefix and delim bug #100

Merged
merged 9 commits into from
Jan 6, 2025

Conversation

casibbald
Copy link
Contributor

@casibbald casibbald commented Dec 28, 2024

  1. Adding force delete
  • This functionality is critical for testing against MinIO, which is heavily used in corporate environments, and the API some enterprise-level storage systems utilise.
  1. Fixes for prefix and delim bug

Copy link

codecov bot commented Dec 28, 2024

Codecov Report

Attention: Patch coverage is 11.86441% with 52 lines in your changes missing coverage. Please review.

Project coverage is 64.95%. Comparing base (0da3aa9) to head (ead58cb).
Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
backend/s3afero/single.go 0.00% 20 Missing ⚠️
backend/s3afero/multi.go 0.00% 15 Missing ⚠️
gofakes3.go 33.33% 7 Missing and 3 partials ⚠️
backend/s3mem/backend.go 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #100      +/-   ##
==========================================
- Coverage   66.15%   64.95%   -1.20%     
==========================================
  Files          28       28              
  Lines        2712     2768      +56     
==========================================
+ Hits         1794     1798       +4     
- Misses        650      699      +49     
- Partials      268      271       +3     

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

@casibbald casibbald closed this Dec 28, 2024
@johannesboyne
Copy link
Owner

Hi @casibbald, if you want to re-open the PR, I am more than happy to review and merge the changes. Looks like a meaningful improvement.

@casibbald
Copy link
Contributor Author

Hi Johannes, It's likely a reduced version of the PR may come through with just the prefix/delim bug fix.
We will check if Weave-gitops still needs the force delete of buckets, if it does we will put that in.
I cancelled the PR we felt that it might be two PR's

@casibbald casibbald reopened this Dec 29, 2024
@johannesboyne
Copy link
Owner

Great to hear that! Will take a look at it shortly!

Copy link
Owner

@johannesboyne johannesboyne left a comment

Choose a reason for hiding this comment

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

Everything looks good! Thanks a lot for the contribution!

One could add to https://github.com/johannesboyne/gofakes3/blob/master/gofakes3_test.go#L486C1-L512C2 the additional check

// pseudo code - not fully integrated/tested
t.Run("forece-delete-does-not-fail-if-not-empty", func(t *testing.T) {
	ts := newTestServer(t, withoutInitialBuckets())
	defer ts.Close()
	svc := ts.s3Client()

	ts.backendCreateBucket("test")
	ts.backendPutString("test", "test", nil, "test")
	ts.OKAll(svc.ForceDeleteBucket(&s3.DeleteBucketInput{
		Bucket: aws.String("test"),
	}))
})

Copy link
Owner

@johannesboyne johannesboyne left a comment

Choose a reason for hiding this comment

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

Awesome work!

Copy link

sonarqubecloud bot commented Jan 4, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
6.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@casibbald
Copy link
Contributor Author

I think I have noticed some error/stdout messages that 'read wrong'. The code is good. will update over the weekend
Please do not merge before.

@johannesboyne johannesboyne merged commit 5c39aec into johannesboyne:master Jan 6, 2025
1 of 4 checks passed
@johannesboyne
Copy link
Owner

Hi @casibbald sorry, I did not read your last comment properly! But let's just roll forward and integrate the changed error/stdout messages.

casibbald added a commit to weaveworks/weave-gitops that referenced this pull request Jan 6, 2025
Reverts #4325

Reverting, now that the following
[PR](johannesboyne/gofakes3#100) has made it
into Goflakes3
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.

3 participants