-
Notifications
You must be signed in to change notification settings - Fork 80
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
add encoding url to list objects #7122
Conversation
Note about the implementation: There were two options for this implementation:
second option was chosen for readability and easier maintenance. |
This PR will be merged after adding an action regarding the Ceph S3 tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shirady don't we have the same encoding type that we need to handle also in list objects, list versions and list uploads? if so we can make it all in one to make it uniform...
Regarding implementing the encoding type in other operations (for example, list-object-versions and list-multipart-uploads, we can reuse as a second stage. when I started with the Ceph S3 tests I understand that we do not support the encoding type in any op (if we did I just had to copy the function from other ops). So we could add those tests to 'Not implemented' (out of the list of tests) or try to implement, from the PR this decision is clear. During my investigations, I found out that the client that we are using in Ceph S3 tests is using boto3 (AWS SDK for python) which sets automatically the encoding type url (see link):
Today the test are hard-coded, by doing this change the client will receive encoded fields that the tester did not expect.
|
ok so why not add the same handling to list objects etc? what is the problem with it? |
We can, I separated the functions so it will be easier to reuse. |
The effort seems minimal. I suggest doing it in this PR |
I added the changes of adding encoding support to list-object-version and list-multipart-uploads. I will try to explain how these changes will be reflected in the status of Ceph S3 tests: The encoding-type url is added in 3 operations:
Additional notes:A) I used the testing instructions, but I had to change the wait time in kubectl to finish the running of all the tests, in file - kubectl wait --for=condition=complete job/${TEST_RUN_NAME} --timeout=500s -n ${NAMESPACE}
+ kubectl wait --for=condition=complete job/${TEST_RUN_NAME} --timeout=800s -n ${NAMESPACE} B) I created a copy of this repo (noobaa-core) and ran the tests in GitHub Action if you would like to observe it see the process s3-tests and the list of the tests (the repo will be available for a limited time and will be deleted after this PR will be closed):
C) Now I have the status, unlike what I commented before, this PR will be merged after it gets your approval.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, just some comments to organize the code a bit
Signed-off-by: shirady <[email protected]> add formatter to the file Signed-off-by: shirady <[email protected]> change call encode url for every field instead of using object fields_to_encode. Signed-off-by: shirady <[email protected]> add encodying url to list multi part uploads and list versions Signed-off-by: shirady <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good @shirady
Signed-off-by: shirady [email protected]
Explain the changes
Today we do not encode any field in our response to list objects and list object v2.
In this PR we add encoding to fields specified in the documentation.
Issues: Fixed #xxx / Gap #xxx
originally was found since the test
test_bucket_listv2_encoding_basic
andtest_bucket_list_encoding_basic
were failing.Testing Instructions:
see here