queries through remote api has the error "Couldn't build proto file into descriptor pool!" |
||
Issue description
/b/i/infra/appengine/findit$ python util_scripts/remote_queries/manipulate_pipeline_errors.py -h
Traceback (most recent call last):
File "util_scripts/remote_queries/manipulate_pipeline_errors.py", line 28, in <module>
from model.flake.master_flake_analysis import MasterFlakeAnalysis
File "util_scripts/remote_queries/../../model/flake/master_flake_analysis.py", line 10, in <module>
from common.waterfall import buildbucket_client
File "util_scripts/remote_queries/../../common/waterfall/buildbucket_client.py", line 12, in <module>
from buildbucket_proto.rpc_pb2 import GetBuildRequest
File "/b/i/infra/appengine/findit/first_party/buildbucket_proto/rpc_pb2.py", line 35, in <module>
notification__pb2.DESCRIPTOR,
File "/usr/lib/python2.7/dist-packages/google/protobuf/descriptor.py", line 827, in __new__
return _message.default_pool.AddSerializedFile(serialized_pb)
TypeError: Couldn't build proto file into descriptor pool!
Invalid proto descriptor for file "rpc.proto":
rpc.proto: Import "google/rpc/status.proto" has not been loaded.
buildbucket.v2.BatchResponse.Response.error: "google.rpc.Status" seems to be defined in "status.proto", which is not imported by "rpc.proto". To use it here, please add the necessary import.
,
Aug 29
The difference is that: 1) /usr/bin/python won't work: /usr/lib/python2.7/dist-packages/google/protobuf is used, its version is 3.0.0 2) /b/i/infra/ENV/bin/python works: /b/i/infra/ENV/lib/python2.7/site-packages/google/protobuf is used, its version is 3.5.1
,
Aug 29
Another difference: /b/i/infra/ENV/lib/python2.7/site-packages/google/rpc exists, while /usr/lib/python2.7/dist-packages/google doesn't.
,
Aug 29
FWIU /b/i/infra/ENV/bin/python should be used
,
Aug 30
The following revision refers to this bug: https://chromium.googlesource.com/infra/infra/+/2dc70c0f241182f72c8817a906cc14aee50b8247 commit 2dc70c0f241182f72c8817a906cc14aee50b8247 Author: Shuotao Gao <stgao@chromium.org> Date: Thu Aug 30 00:22:20 2018 [Findit] Fix run local scripts through remote api. Use the infra/ENV/bin/python runtime setup to run local script with remote apis. This could avoid some unexpected behavior. For example, buildbucket grew a dependency in google.rpc which is available in infra/ENV/lib/python2.7/site-packages/google/rpc but not available in the system environment /usr/lib/python2.7/dist-packages/google/rpc. Bug: 878619 Change-Id: Ie47da12caa7d828f6e4709906062fac1e9baa69f Reviewed-on: https://chromium-review.googlesource.com/1195945 Commit-Queue: Shuotao Gao <stgao@chromium.org> Reviewed-by: Roberto Carrillo <robertocn@chromium.org> Cr-Commit-Position: refs/heads/master@{#17302} [modify] https://crrev.com/2dc70c0f241182f72c8817a906cc14aee50b8247/appengine/findit/util_scripts/remote_queries/backfill_bq_events.py [modify] https://crrev.com/2dc70c0f241182f72c8817a906cc14aee50b8247/appengine/findit/local_libs/remote_api.py [modify] https://crrev.com/2dc70c0f241182f72c8817a906cc14aee50b8247/appengine/findit/util_scripts/remote_queries/try_job_data_query.py [modify] https://crrev.com/2dc70c0f241182f72c8817a906cc14aee50b8247/appengine/findit/util_scripts/remote_queries/get_time_between_analyses.py [modify] https://crrev.com/2dc70c0f241182f72c8817a906cc14aee50b8247/appengine/findit/util_scripts/remote_queries/calculate_confidence_scores.py [modify] https://crrev.com/2dc70c0f241182f72c8817a906cc14aee50b8247/appengine/findit/util_scripts/remote_queries/flake_analyzer_report.py [modify] https://crrev.com/2dc70c0f241182f72c8817a906cc14aee50b8247/appengine/findit/local_libs/script_util.py [modify] https://crrev.com/2dc70c0f241182f72c8817a906cc14aee50b8247/appengine/findit/util_scripts/remote_queries/detection_rate_at_step_level.py [modify] https://crrev.com/2dc70c0f241182f72c8817a906cc14aee50b8247/appengine/findit/util_scripts/remote_queries/bottleneck_query.py [delete] https://crrev.com/0b0a237c1be3a2d1c4202ca4a1be54dad966ac57/appengine/findit/util_scripts/__init__.py [modify] https://crrev.com/2dc70c0f241182f72c8817a906cc14aee50b8247/appengine/findit/util_scripts/remote_queries/findit_groups.py [modify] https://crrev.com/2dc70c0f241182f72c8817a906cc14aee50b8247/appengine/findit/util_scripts/remote_queries/analyze_bottlenecks.py [modify] https://crrev.com/2dc70c0f241182f72c8817a906cc14aee50b8247/appengine/findit/util_scripts/remote_queries/try_job_data_metrics.py [modify] https://crrev.com/2dc70c0f241182f72c8817a906cc14aee50b8247/appengine/findit/util_scripts/remote_queries/check_trybot_mapping.py [rename] https://crrev.com/2dc70c0f241182f72c8817a906cc14aee50b8247/appengine/findit/util_scripts/remote_queries/sample_remote_api_query.py [modify] https://crrev.com/2dc70c0f241182f72c8817a906cc14aee50b8247/appengine/findit/util_scripts/remote_queries/swarming_task_data_query.py
,
Aug 30
|
||
►
Sign in to add a comment |
||
Comment 1 by st...@chromium.org
, Aug 29