Dummy presubmit errors on large CLs |
|||
Issue descriptionWhen I upload large (multiple files CL) I often get bogus presubmit warnings that look like this : Example CLs where this occured on upload : https://chromium-review.googlesource.com/c/chromium/src/+/1163628, https://chromium-review.googlesource.com/c/chromium/src/+/1161116 <snip> ** Presubmit Warnings ** .\tools_unittest.py (0.97s) failed 'javac' is not recognized as an internal or external command, operable program or batch file. 'jar' is not recognized as an internal or external command, operable program or batch file. 'javac' is not recognized as an internal or external command, operable program or batch file. 'jar' is not recognized as an internal or external command, operable program or batch file. EE'javac' is not recognized as an internal or external command, operable program or batch file. 'jar' is not recognized as an internal or external command, operable program or batch file. 'javac' is not recognized as an internal or external command, operable program or batch file. 'jar' is not recognized as an internal or external command, operable program or batch file. EE'javac' is not recognized as an internal or external command, operable program or batch file. 'jar' is not recognized as an internal or external command, operable program or batch file. '.' is not recognized as an internal or external command, operable program or batch file. FE'javac' is not recognized as an internal or external command, operable program or batch file. 'jar' is not recognized as an internal or external command, operable program or batch file. '.' is not recognized as an internal or external command, operable program or batch file. FE ====================================================================== ERROR: test_check_api_calls_failure (api_static_checks_unittest.ApiStaticCheckUnitTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\src\chrome\src\components\cronet\tools\api_static_checks_unittest.py", line 127, in test_check_api_calls_failure 'public static void a(){}', 'void b(){Api.a();}'), File "D:\src\chrome\src\components\cronet\tools\api_static_checks_unittest.py", line 111, in run_check_api_calls return_code = api_static_checks.check_api_calls(opts) File "D:\src\chrome\src\components\cronet\tools\api_static_checks.py", line 123, in check_api_calls build_utils.CheckOutput(jar_cmd, cwd=temp_dir) File "D:\src\chrome\src\build/android/gyp/util\build_utils.py", line 192, in CheckOutput stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd, env=env) File "D:\src\depot_tools\win_tools-2_7_6_bin\python\bin\Lib\subprocess.py", line 709, in __init__ errread, errwrite) File "D:\src\depot_tools\win_tools-2_7_6_bin\python\bin\Lib\subprocess.py", line 957, in _execute_child startupinfo) WindowsError: [Error 2] The system cannot find the file specified ====================================================================== ERROR: test_check_api_calls_failure (api_static_checks_unittest.ApiStaticCheckUnitTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\src\chrome\src\components\cronet\tools\api_static_checks_unittest.py", line 83, in tearDown shutil.rmtree(self.temp_dir) File "D:\src\depot_tools\win_tools-2_7_6_bin\python\bin\Lib\shutil.py", line 256, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "D:\src\depot_tools\win_tools-2_7_6_bin\python\bin\Lib\shutil.py", line 254, in rmtree os.rmdir(path) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\src\\temp\\tmp9xghuk' ====================================================================== ERROR: test_check_api_calls_success (api_static_checks_unittest.ApiStaticCheckUnitTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\src\chrome\src\components\cronet\tools\api_static_checks_unittest.py", line 118, in test_check_api_calls_success 'void a(){}', 'void b(){}'), [True, '']) File "D:\src\chrome\src\components\cronet\tools\api_static_checks_unittest.py", line 111, in run_check_api_calls return_code = api_static_checks.check_api_calls(opts) File "D:\src\chrome\src\components\cronet\tools\api_static_checks.py", line 123, in check_api_calls build_utils.CheckOutput(jar_cmd, cwd=temp_dir) File "D:\src\chrome\src\build/android/gyp/util\build_utils.py", line 192, in CheckOutput stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd, env=env) File "D:\src\depot_tools\win_tools-2_7_6_bin\python\bin\Lib\subprocess.py", line 709, in __init__ errread, errwrite) File "D:\src\depot_tools\win_tools-2_7_6_bin\python\bin\Lib\subprocess.py", line 957, in _execute_child startupinfo) WindowsError: [Error 2] The system cannot find the file specified ====================================================================== ERROR: test_check_api_calls_success (api_static_checks_unittest.ApiStaticCheckUnitTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\src\chrome\src\components\cronet\tools\api_static_checks_unittest.py", line 83, in tearDown shutil.rmtree(self.temp_dir) File "D:\src\depot_tools\win_tools-2_7_6_bin\python\bin\Lib\shutil.py", line 256, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "D:\src\depot_tools\win_tools-2_7_6_bin\python\bin\Lib\shutil.py", line 254, in rmtree os.rmdir(path) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\src\\temp\\tmpuixenc' ====================================================================== ERROR: test_update_api_failure (api_static_checks_unittest.ApiStaticCheckUnitTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\src\chrome\src\components\cronet\tools\api_static_checks_unittest.py", line 83, in tearDown shutil.rmtree(self.temp_dir) File "D:\src\depot_tools\win_tools-2_7_6_bin\python\bin\Lib\shutil.py", line 256, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "D:\src\depot_tools\win_tools-2_7_6_bin\python\bin\Lib\shutil.py", line 254, in rmtree os.rmdir(path) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\src\\temp\\tmponqdav' ====================================================================== ERROR: test_update_api_success (api_static_checks_unittest.ApiStaticCheckUnitTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\src\chrome\src\components\cronet\tools\api_static_checks_unittest.py", line 83, in tearDown shutil.rmtree(self.temp_dir) File "D:\src\depot_tools\win_tools-2_7_6_bin\python\bin\Lib\shutil.py", line 256, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "D:\src\depot_tools\win_tools-2_7_6_bin\python\bin\Lib\shutil.py", line 254, in rmtree os.rmdir(path) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\src\\temp\\tmpez77t0' ====================================================================== FAIL: test_update_api_failure (api_static_checks_unittest.ApiStaticCheckUnitTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\src\chrome\src\components\cronet\tools\api_static_checks_unittest.py", line 226, in test_update_api_failure """, '1']) AssertionError: Lists differ: [False, '', '}\n', '0'] != [True, '', 'DO NOT EDIT THIS F... First differing element 0: False True - [False, '', '}\n', '0'] + [True, + '', + 'DO NOT EDIT THIS FILE, USE update_api.py TO UPDATE IT\n\npublic class Api {\n public Api();\n public void a();\n}\n', + '1'] ====================================================================== FAIL: test_update_api_success (api_static_checks_unittest.ApiStaticCheckUnitTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\src\chrome\src\components\cronet\tools\api_static_checks_unittest.py", line 165, in test_update_api_success """, '1']) AssertionError: Lists differ: [False, '', '}\n', '0'] != [True, '', 'DO NOT EDIT THIS F... First differing element 0: False True - [False, '', '}\n', '0'] + [True, + '', + 'DO NOT EDIT THIS FILE, USE update_api.py TO UPDATE IT\n\npublic class Api {\n public Api();\n public void a();\n}\n', + '1'] ---------------------------------------------------------------------- Ran 4 tests in 0.388s FAILED (failures=2, errors=6) Presubmit checks took 10.9s to calculate. There were presubmit warnings. Are you sure you wish to continue? (y/N): y </snip>
,
Aug 8
Hmm I can reproduce but I'm not sure exactly what to do. Cronet is largely Android-specific and I don't think Android development is possible on Windows (e.g. no javac.exe AFAIK). These presubmit checks have been in place for years I believe. I'd recommend making any Cronet changes on Linux. I'm hesitant to disable the presubmit checks on Windows as they're very important. BTW this isn't specific to large CLs; any tiny CL that modifies components/cronet/ will trip this.
,
Aug 8
Ah I see, well I've seen these in the past too just finally got bothered enough to file. It's annoying whenever making large scale mechanical refactors to have to bypass incorrect errors which look scary. At least update the presubmit on Windows to be something like "warning : components/cronet should only be modified from a Posix checkout unless you know what you are doing and are okay with skipping its presubmit checks." Then I can know that it's safe to ignore it when mass renaming headers and stuff.
,
Aug 13
Possible fix: https://chromium-review.googlesource.com/c/chromium/src/+/1172918
,
Aug 14
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/eca797abf67a768a4543a348d4416914c159ce8b commit eca797abf67a768a4543a348d4416914c159ce8b Author: Paul Jensen <pauljensen@chromium.org> Date: Tue Aug 14 19:32:46 2018 [Cronet] Only run tools unittests when tools have changed These tests are slow and only relvant to tools changes so there is no point in running them all the time. These tests fail on Windows, so this change prevents them from interfereing with large-scale-refactorings done on Windows that don't affect the tools. Bug: 871754 Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet Change-Id: Iccf6042665a027efb181848508128ef435cdd22b Reviewed-on: https://chromium-review.googlesource.com/1172918 Commit-Queue: Paul Jensen <pauljensen@chromium.org> Reviewed-by: Misha Efimov <mef@chromium.org> Cr-Commit-Position: refs/heads/master@{#582995} [modify] https://crrev.com/eca797abf67a768a4543a348d4416914c159ce8b/components/cronet/PRESUBMIT.py
,
Aug 15
|
|||
►
Sign in to add a comment |
|||
Comment 1 by ehmaldonado@chromium.org
, Aug 7