New issue
Advanced search Search tips

Issue 897178 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 22
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[soundwave] Some requests errors are not displayed properly

Project Member Reported by perezju@chromium.org, Oct 19

Issue description

When making some bad requests we get e.g.:

$ ./bin/pinpoint_cli start-job test --revision 'HEAD@{2018-10-1}'
Traceback (most recent call last):
  File "./bin/pinpoint_cli", line 72, in <module>
    sys.exit(main())
  File "./bin/pinpoint_cli", line 66, in main
    print api.pinpoint.NewJob(**options)
  File "./services/pinpoint_service.py", line 43, in NewJob
    return self.Request('/new', method='POST', data=kwargs)
  File "./services/pinpoint_service.py", line 25, in Request
    return json.loads(request.Request(self.SERVICE_URL + endpoint, **kwargs))
  File "/usr/local/google/code/clankium/src/third_party/catapult/common/py_utils/py_utils/retry_util.py", line 47, in Wrapper
    return f(*args, **kwargs)
  File "./services/request.py", line 125, in Request
    raise BuildRequestError(url, response, content)
services.request.ClientError: <exception str() failed>

pinpoint doesn't understand the 'HEAD@{2018-10-1}' revision, and we can't properly display the error message we get back. :P
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 22

The following revision refers to this bug:
  https://chromium.googlesource.com/catapult/+/b20529ac11a6b779aee789e14499d84f0592212e

commit b20529ac11a6b779aee789e14499d84f0592212e
Author: Juan Antonio Navarro Perez <perezju@chromium.org>
Date: Mon Oct 22 09:05:50 2018

[soundwave] Fix encoding when building RequestError message

Ensure the exception message is explicitly encoded as utf-8; otherwise
by default python will encode as ascii and choke when trying to display
the exception message.

Bug:  chromium:897178 
Change-Id: Id84cf8d3e04f18ebd77cdd34c006fe68bf3d0187
Reviewed-on: https://chromium-review.googlesource.com/c/1291373
Reviewed-by: Dave Tu <dtu@chromium.org>
Commit-Queue: Juan Antonio Navarro Pérez <perezju@chromium.org>

[modify] https://crrev.com/b20529ac11a6b779aee789e14499d84f0592212e/experimental/soundwave/services/request.py
[modify] https://crrev.com/b20529ac11a6b779aee789e14499d84f0592212e/experimental/soundwave/services/request_test.py

Status: Fixed (was: Started)
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 22

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fea12d58a43018330c3ae256917b0edfdebc256e

commit fea12d58a43018330c3ae256917b0edfdebc256e
Author: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com>
Date: Mon Oct 22 10:02:49 2018

Roll src/third_party/catapult b026043a43f9..b20529ac11a6 (2 commits)

https://chromium.googlesource.com/catapult.git/+log/b026043a43f9..b20529ac11a6


git log b026043a43f9..b20529ac11a6 --date=short --no-merges --format='%ad %ae %s'
2018-10-22 perezju@chromium.org [soundwave] Fix encoding when building RequestError message
2018-10-22 perezju@chromium.org [pinpoint_cli] Fix bug when iterating over output isolates


Created with:
  gclient setdep -r src/third_party/catapult@b20529ac11a6

The AutoRoll server is located here: https://autoroll.skia.org/r/catapult-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel

BUG= chromium:897178 , chromium:897052 
TBR=sullivan@chromium.org

Change-Id: I5ca0605b6d78dc87a31ef59c2d0257bf9bffe390
Reviewed-on: https://chromium-review.googlesource.com/c/1293242
Reviewed-by: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#601512}
[modify] https://crrev.com/fea12d58a43018330c3ae256917b0edfdebc256e/DEPS

Sign in to add a comment