From 03b46b228e83e1d258c4672904442a9bf7a4a9a6 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Mon, 8 Nov 2021 12:55:26 -0800 Subject: [PATCH] Fix RBE upload (#27969) --- tools/run_tests/python_utils/upload_rbe_results.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/python_utils/upload_rbe_results.py b/tools/run_tests/python_utils/upload_rbe_results.py index 3e8038db5c5..5eb40ec62a7 100755 --- a/tools/run_tests/python_utils/upload_rbe_results.py +++ b/tools/run_tests/python_utils/upload_rbe_results.py @@ -127,7 +127,10 @@ def _get_resultstore_data(api_key, invocation_id): 'https://resultstore.googleapis.com/v2/invocations/%s/targets/-/configuredTargets/-/actions?key=%s&pageToken=%s&fields=next_page_token,actions.id,actions.status_attributes,actions.timing,actions.test_action' % (invocation_id, api_key, page_token), headers={'Content-Type': 'application/json'}) - results = json.loads(urllib.request.urlopen(req).read()) + raw_resp = urllib.request.urlopen(req).read() + decoded_resp = raw_resp if isinstance( + raw_resp, str) else raw_resp.decode('utf-8', 'ignore') + results = json.loads(decoded_resp) all_actions.extend(results['actions']) if 'nextPageToken' not in results: break