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
mimic: mgr/dashboard: Add support for URI encode #24488
Conversation
Signed-off-by: Tiago Melo <tmelo@suse.com> (cherry picked from commit 44ea474) Conflicts: src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.ts Had to remove new codew related to permissions src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-bucket.service.ts Had to remove code for a new parameter
Created a decorator and pipe to help encode special URI components in the frontend. Modified the backend request handler to decode all the string args. fixes: http://tracker.ceph.com/issues/24621 Signed-off-by: Tiago Melo <tmelo@suse.com> (cherry picked from commit f21d0da) Conflicts: (all paths are relative to src/pybind/mgr/dashboard/) controllers/__init__.py Method where the new code was doesn't exist in mimic, has to put it in another method frontend/src/app/ceph/block/rbd-list/rbd-list.component.html frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.html frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.html frontend/src/app/shared/api/pool.service.ts frontend/src/app/shared/api/rbd.service.spec.ts file doesn't exist in mimic frontend/src/app/shared/api/rbd.service.ts frontend/src/app/shared/api/rgw-bucket.service.ts frontend/src/app/shared/api/rgw-daemon.service.ts frontend/src/app/shared/api/rgw-user.service.ts
By enconding all parameters of api services we were also encoding parameters that were being sent in the body of the request. Those parameters don't need to be enconded and the server never decodes them. With this new decorator you can specify if you don't want a parameter to be enconded. This is a regression introduced in f21d0da. Fixes: http://tracker.ceph.com/issues/26856 Signed-off-by: Tiago Melo <tmelo@suse.com> (cherry picked from commit 45e645b) Conflicts: src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd.service.spec.ts src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd.service.ts
b33ca5a
to
eda4df3
Compare
jenkins re-test this please |
@tspmelo Why is this DNM? |
@smithfarm I was told that #24183 might be backported to mimic. The same applies to #24478. |
@@ -16,6 +16,12 @@ | |||
import threading | |||
import types # pylint: disable=import-error | |||
|
|||
if sys.version_info >= (3, 0): |
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.
Funny thing. #24626 contains a better way to import unquote
if sys.version_info >= (3, 0): | |
from six.moves.urllib.parse import unquote # pylint: disable=import-error |
But I wouldn't change it in Mimic only.
Waiting for @rjfd to review/approve. |
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.
lgtm
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.
LGTM, thanks
Fixes: http://tracker.ceph.com/issues/24907