[Findit] gae_ts_mon prevents findit from running locally |
|||||||
Issue description
Commands I executed:
make polymer-install
make run
All services start, but when navigating to default endpoint I get the following traceback:
Traceback (most recent call last):
File "/usr/local/google/home/wylieb/chromium/infra-internal/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/usr/local/google/home/wylieb/chromium/infra-internal/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/usr/local/google/home/wylieb/chromium/infra-internal/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "/usr/local/google/home/wylieb/chromium/infra-internal/infra/appengine/findit/main.py", line 8, in <module>
import gae_ts_mon
File "/usr/local/google/home/wylieb/chromium/infra-internal/infra/appengine/findit/first_party/gae_ts_mon/__init__.py", line 32, in <module>
import infra_libs.ts_mon.httplib2_utils
File "/usr/local/google/home/wylieb/chromium/infra-internal/infra/appengine/findit/first_party/gae_ts_mon/httplib2_utils.py", line 21, in <module>
from infra_libs.ts_mon.common import http_metrics
File "/usr/local/google/home/wylieb/chromium/infra-internal/infra/appengine/findit/first_party/gae_ts_mon/common/http_metrics.py", line 6, in <module>
from infra_libs.ts_mon.common import metrics
File "/usr/local/google/home/wylieb/chromium/infra-internal/infra/appengine/findit/first_party/gae_ts_mon/common/metrics.py", line 10, in <module>
from infra_libs.ts_mon.protos import metrics_pb2
File "/usr/local/google/home/wylieb/chromium/infra-internal/infra/appengine/findit/first_party/gae_ts_mon/protos/metrics_pb2.py", line 6, in <module>
from google.protobuf.internal import enum_type_wrapper
File "/usr/local/google/home/wylieb/chromium/infra-internal/google_appengine/google/appengine/tools/devappserver2/python/runtime/sandbox.py", line 1132, in load_module
raise ImportError('No module named %s' % fullname)
ImportError: No module named google.protobuf
It looks like gae_ts_mon is preventing a localrun from taking place because it requires google.protobuf which isn't found.
,
Oct 16 2017
Hey Dave, Could you take a quick look at this? Our local build is failing -- have you seen something like this before?
,
Oct 16 2017
I don't work on this any more, maybe Sergey or Vadim can take a look?
,
Oct 17 2017
+katthomas@ had to deal with google.protobuf in infra.git lately - any ideas? I also don't work on this directly anymore, but in theory it all should work locally. The fundamental problem here is that protobuf uses a "namespace" python package called "google", which only works if all packages under "google" declare it as "namespace". Unfortunatel, appengine creates its packages under "google" path without declaring it as "namespace", thus if appengine's "google" loads first, no further package under "google" can load later. The 'gae_ts_mon' code referenced above attempts to amend this by adding protobuf to the "google" path (it's almost equivalent to how namespace packages are declared), but something must be loading incorrectly when it's run locally...
,
Oct 17 2017
Ah, yes, I did deal with this but with much support from Dan and Robbie. However, I was adding a dependency which depended on google.protobuf. I don't see why you would encounter this unless your environment isn't activated or configured correctly. So, just to double-check, is the environment activated and configured correctly?
,
Oct 17 2017
Nothing jumps out at me. "../../ENV/bin/python" "gae.py" devserver Is the command that is used to run the app. Looks gae.py is symlinked, but that looks standard across the infra apps. Is there any setup that we might have missed that would prevent it from running locally? (deploying this to appengine works)
,
Nov 8 2017
,
Nov 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/infra/infra/+/1f7c77e4d5a2f9c132fd04d8befd61bc108722d4 commit 1f7c77e4d5a2f9c132fd04d8befd61bc108722d4 Author: Shuotao Gao <stgao@chromium.org> Date: Thu Nov 09 21:44:17 2017 [Findit] Fix path conflict of protobuf for non-production environment. Bug: 775107 Change-Id: I3f73336c1d928cfc9d79ab8536c13089e1dfce09 Reviewed-on: https://chromium-review.googlesource.com/761405 Reviewed-by: Brandon Wylie <wylieb@chromium.org> Reviewed-by: Chan Li <chanli@chromium.org> Commit-Queue: Shuotao Gao <stgao@chromium.org> [modify] https://crrev.com/1f7c77e4d5a2f9c132fd04d8befd61bc108722d4/appengine/findit/appengine_config.py
,
Nov 9 2017
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by wylieb@chromium.org
, Oct 16 2017