-
Notifications
You must be signed in to change notification settings - Fork 94
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
Fix inaccurate s3 rewrite rule. #1040
Conversation
error({external_client_tests, Reason}) | ||
end. | ||
|
||
execute_cmd(Cmd, Opts) -> |
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.
I'd recommend just using rt_cs_dev:cmd/2
instead.
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.
I don't like duplicate code ^^;
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.
rt_cs_dev:cmd/2 doesn't look suitable for this case because it doesn't handle exit code, or output log until the command finishes.I'd like to extract these function to rtcs module.
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.
In master branch of riak_test rtdev:cmd/2 handles the return value. We're just stale.
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.
And also in master branch, rt_cs_dev:cmd/2
does.
|
||
-module(legacy_s3_rewrite_test). | ||
|
||
%% @doc `riak_test' module for testing object get behavior. |
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.
This is a stale comment from copy source.
I believe you should update |
I also believe it is a good opportunity to write eqc tests on rewrite. If you can't afford time for now, I can do it later. |
|
||
-define(TEST_BUCKET, "legacy-s3-rewrite-test"). | ||
|
||
confirm() -> |
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.
I'd be good if this test includes the exact case where the problem happened, like:
- put key "foo bar" with content "foo bar"
- put key "foo+bar" with content "foo+bar"
- read "foo bar" and "foo+bar" and verify they have different content
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.
Maybe it's about testing legacy code, so I'd say this is enough to test old behaviour.
Memo: to preserve old path translation behaviour, users should update app.config as |
After upgraded to the latest version and not to preserve old odd behaviour, new key for the old object put as "foo+bar", is "foo bar". |
By removing URL decode at rewrite module, bucket part of path style For example, using GET Bucket request (client can URL encode any characters in path part,
Current
This branch (at commit d1c3d02) responds with error:
|
As for @shino 's comment, we'll leave it for bucket names bug just fix object keys. If legacy behaviour preferred, just use legacy rewrite module. |
ah 🙏 |
All riak_test has passed as usual. test-riak_cs is still screwed, although. |
|
Note: The above diagram is only on |
Fix inaccurate s3 rewrite rule. Reviewed-by: kuenishi
@borshop merge |
This also fixed #977 which described the case of |
Reopening to get on sprint backlog - will close again shortly. _[posted via JIRA by Deborah Rakow]_ |
Re-closing after adding to sprint _[posted via JIRA by Deborah Rakow]_ |
Conflicts: riak_test/src/rtcs.erl
Riak CS doesn't handle some specific characters in object name well.
see: https://gist.github.com/ksauzz/9f0dc13c9b8cb0f2a85e
related to #910
This PR includes:
Topics I'd like to discuss
test-python
reasonable for regression test ? At least, boto test saved me from my bad codes.How access log format changes after this patches.
before
after
TODO: