Skip to content

cp,pipe: don't omit some of the metadata flags - #658

Merged
denizsurmeli merged 6 commits into
peak:masterfrom
denizsurmeli:fix/aclbug
Sep 15, 2023
Merged

denizsurmeli merged 6 commits into
peak:masterfrom
denizsurmeli:fix/aclbug

Conversation

@denizsurmeli

Copy link
Copy Markdown
Contributor

#657 mentioned that acl flag was broken in v2.2.1. After looking at the issue, it was discovered that not only the acl flag was broken, there are couple of more flags that were being omitted during the mentioned commands, which all of them caused by this faulty PR.

Resolves #657.

@denizsurmeli
denizsurmeli requested review from a team, ilkinulas and seruman and removed request for a team September 3, 2023 17:40

@seruman seruman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've missed these on the review, sorry. While you're at it, what do you think about adding test cases for each metadata flag if possible? I think we could have catch this early with failing tests.

@denizsurmeli

Copy link
Copy Markdown
Contributor Author

I'm afraid that some of the metadata flags(acl, expires and cache-control) are not supported by gofakes3. We can try to patch the fork or we can run these tests against a minio or localstack instance maybe ?

@denizsurmeli

denizsurmeli commented Sep 10, 2023

Copy link
Copy Markdown
Contributor Author

This PR adds support for the missing metadata flags, except for the ACL, since the ACL of the object is not a part of the s3.GetObjectResult but a separate call, namely the s3.GetObjectACL. This call however is not implemented in gofakes3, I'm working on an implementation but it might take a while. I have prepared the tests for all other flags except ACL, which I will push to this branch after the gofakes3 PR is merged.

@denizsurmeli

Copy link
Copy Markdown
Contributor Author

@seruman, 5394a50 covers all flags except the ACL. Would you like to discuss a strategy on how should we test that feature ? Currently, gofakes3 does not implement ACL related features, we either can work on that feature for it or prepare an "integration" test where we run the test against a minio or localstack instance, really any s3 compatible storage service where it supports ACL features.

Comment thread e2e/cp_test.go Outdated
Comment on lines +791 to +794
// NOTE: This test needs an implementation of the
// `ACL` feature in gofakes3.
func TestCopySingleFileToS3WithACLFlag(t *testing.T) {
t.Skip()

@seruman seruman Sep 11, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would you like to discuss a strategy on how should we test that feature ? Currently, gofakes3 does not implement ACL related features, we either can work on that feature for it or prepare an "integration" test where we run the test against a minio or localstack instance, really any s3 compatible storage service where it supports ACL features.

If it would not require much test setup i'm on the side of adding it. There's already an integration test for select which only runs if an endpoint has given.

It is not a blocker though IMHO, if we can assert that it fixed -manually- we may add the automated tests later in some another PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

c177bb2, unfortunately minio does not support ACL features. We should add this test to the backlog.

ilkinulas
ilkinulas previously approved these changes Sep 11, 2023
seruman
seruman previously approved these changes Sep 12, 2023
@denizsurmeli
denizsurmeli merged commit 48f7e59 into peak:master Sep 15, 2023
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.

cp: acl: seems acl set broken in 2.2.1

4 participants