8000 add special char s3 test + fix moto lookup with cleaned up key name by bentsku · Pull Request #8470 · localstack/localstack · GitHub
[go: up one dir, main page]

Skip to content

add special char s3 test + fix moto lookup with cleaned up key name #8470

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

Merged
merged 4 commits into from
Jul 3, 2023

Conversation

bentsku
Copy link
Contributor
@bentsku bentsku commented Jun 9, 2023

This fix the second issue reported in #8174

Moto will by default clean up the key name (I'm not sure to what end? I think this should be removed because it can cause conflict between keys, one url encoded and the other not will have the same key in moto).

So I've added the key cleaning in our moto access, which at least allows us to use keys with %XX encoded in them.

However, as moto cleans up name, what returns from ListObject and ListObjectsV2 is still wrong and is url decoded. However, we cannot for sure know if the key was clean or not, so we can't fix it in our provider. This would need to be fixed upstream.

@bentsku bentsku requested a review from macnev2013 as a code owner June 9, 2023 14:36
@bentsku bentsku added semver: patch Non-breaking changes which can be included in patch releases aws:s3 Amazon Simple Storage Service labels Jun 9, 2023
@bentsku bentsku self-assigned this Jun 9, 2023
@coveralls
Copy link
coveralls commented Jun 9, 2023

Coverage Status

coverage: 82.727% (+0.009%) from 82.718% when pulling f890979 on add-special-char-s3-test into 3d8dd50 on master.

@github-actions
Copy link
github-actions bot commented Jun 9, 2023

LocalStack Community integration with Pro

       2 files         2 suites   2h 10m 23s ⏱️
2 173 tests 1 835 ✔️ 330 💤 8
2 174 runs  1 835 ✔️ 331 💤 8

For more details on these failures, see this check.

Results for commit f890979.

♻️ This comment has been updated with latest results.

Copy link
Contributor
@macnev2013 macnev2013 left a comment

Choose a reason for hiding this comment

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

LGTM

@bentsku bentsku force-pushed the add-special-char-s3-test branch from 3eeba58 to 9428044 Compare July 3, 2023 11:26
@bentsku bentsku merged commit b7e9ac8 into master Jul 3, 2023
@bentsku bentsku deleted the add-special-char-s3-test branch July 3, 2023 13:47
@dfangl dfangl added this to the 2.2 milestone Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:s3 Amazon Simple Storage Service semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: S3 returns PutObject => 404 (NoSuchKey) when creating a folder with special character
4 participants
0