Extension Doc Server: Assert failure while running update_cache.py. |
|||
Issue descriptionChrome Version: 59.0.3033.0 Steps: 1) Run python chrome/common/extensions/docs/server2/update_cache.py --no-push --save-file=FOOCACHE --data-source=api_list It fails with - INFO:root:Starting refresh from commit 52f904d3bf07e423a6bb907ff6f344935532affa... INFO:root:Updating api_list... ERROR:root:APIListDataSource: error Traceback (most recent call last): File "chrome/common/extensions/docs/server2/update_cache.py", line 99, in _UpdateDataSource data_source.Refresh().Get() File "/Users/karandeepb/Desktop/chromium/src/chrome/common/extensions/docs/server2/future.py", line 129, in Get self._Raise() File "/Users/karandeepb/Desktop/chromium/src/chrome/common/extensions/docs/server2/future.py", line 125, in Get self._value = self._callback() File "/Users/karandeepb/Desktop/chromium/src/chrome/common/extensions/docs/server2/future.py", line 114, in then return val.Get() if isinstance(val, Future) else val File "/Users/karandeepb/Desktop/chromium/src/chrome/common/extensions/docs/server2/future.py", line 129, in Get self._Raise() File "/Users/karandeepb/Desktop/chromium/src/chrome/common/extensions/docs/server2/future.py", line 125, in Get self._value = self._callback() File "/Users/karandeepb/Desktop/chromium/src/chrome/common/extensions/docs/server2/future.py", line 111, in then val = error_handler(e) File "/Users/karandeepb/Desktop/chromium/src/chrome/common/extensions/docs/server2/future.py", line 13, in _DefaultErrorHandler raise error AssertionError INFO:root:Updating api_list took 173 seconds Traceback (most recent call last): File "chrome/common/extensions/docs/server2/update_cache.py", line 205, in <module> _Main(sys.argv[1:]) File "chrome/common/extensions/docs/server2/update_cache.py", line 184, in _Main commit=commit) File "chrome/common/extensions/docs/server2/update_cache.py", line 122, in UpdateCache _UpdateDataSource(single_data_source, data_sources[single_data_source]) File "chrome/common/extensions/docs/server2/update_cache.py", line 102, in _UpdateDataSource raise e AssertionError
,
Mar 10 2017
,
Mar 13 2017
Just to confirm. I'm seeing the same issue when auto-generating a ClojureScript wrapper library[1] for Chrome Extension APIs. Also having two other minor issues I was able to work around in the past: 1. need to call build_server.main() before update_cache.py can be called from command-line: https://github.com/binaryage/chromex/blob/fd4455e723843fca92417eba0c8b685a5222e5dd/tools/build-cache.sh#L45-L50 2. need to apply a patch to prevent assert breaking the cache update: https://github.com/binaryage/chromex/blob/master/tools/chromium.patch It would be great if those two could be addressed as well while you are at it. I'm currently running update_cache.py cold without loading prior state via --load-file. [1] https://github.com/binaryage/chromex
,
Mar 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/08614915649c30c0278a9b154825e370b819a6de commit 08614915649c30c0278a9b154825e370b819a6de Author: karandeepb <karandeepb@chromium.org> Date: Tue Mar 14 18:28:01 2017 Extensions: Fix DocServer assert failures. Currently, there are a couple of assert failures happening for the DocServer. Two issues are involved: - r446160 updated tools/json_schema_compiler/model.py. It changed the logic to assign the callback for a function, so that only the last parameter function of a function could be recognised as a callback. This broke some DocServer tests and hence the extension presubmit script. - Recently the API endpoint https://omahaproxy.appspot.com/history.json?channel=dev&os=win&json=1 that we use to fetch the branch for a particular Chrome version, stopped providing info. for version 15. This led to an assert failure when generating the Availability info. for the Webstore API. This CL fixes the issues so that the extension presubmit tests pass. For issue 1, a new category type is introduced to APICategorizer for the internal APIs. It is ensured that the API data source does not generate info. for internal APIs which are never documented. Existing tests are updated to work around the fact that only the last parameter of a function can be recognised as a callback. For issue 2 , it is ensured that the assert failure is not reached. However, the core issue (omahaproxy endpoint not providing details of all Chrome versions) still needs to be tackled. BUG= 696767 , 700234 Review-Url: https://codereview.chromium.org/2738623003 Cr-Commit-Position: refs/heads/master@{#456767} [modify] https://crrev.com/08614915649c30c0278a9b154825e370b819a6de/chrome/common/extensions/docs/server2/api_categorizer.py [modify] https://crrev.com/08614915649c30c0278a9b154825e370b819a6de/chrome/common/extensions/docs/server2/api_data_source.py [modify] https://crrev.com/08614915649c30c0278a9b154825e370b819a6de/chrome/common/extensions/docs/server2/api_schema_graph.py [modify] https://crrev.com/08614915649c30c0278a9b154825e370b819a6de/chrome/common/extensions/docs/server2/app.yaml [modify] https://crrev.com/08614915649c30c0278a9b154825e370b819a6de/chrome/common/extensions/docs/server2/availability_finder.py [modify] https://crrev.com/08614915649c30c0278a9b154825e370b819a6de/chrome/common/extensions/docs/server2/test_data/object_level_availability/tabs.py
,
Mar 14 2017
,
Mar 14 2017
Regarding c#3, point 2, it should be fixed by the change in c#4. Feel free to open a new bug it it isn't.
,
Mar 14 2017
Thanks for the fixes. I confirm that the c#4 commit fixed[1] my script as well and no extra patching of chromium is needed on my side anymore. [1] https://github.com/binaryage/chromex/commit/15ccf7fab83b2a74b3f25967274b0b02c953f74e
,
Mar 15 2017
Good to know! |
|||
►
Sign in to add a comment |
|||
Comment 1 by karandeepb@chromium.org
, Mar 10 2017