Commit Graph

178 Commits

Author SHA1 Message Date
Richard Belleville b6cc72f129
Revert "Run 2to3 on tools directory (#26002)" (#27183)
This reverts commit a388361c3d.
2021-08-30 12:29:20 -07:00
Richard Belleville a388361c3d
Run 2to3 on tools directory (#26002)
* Run 2to3 on tools directory

* Delete github_stats_tracking

* Re-run 2to3

* Remove unused script

* Remove unused script

* Remove unused line count utility

* Yapf. Isort

* Remove accidentally included file

* Restore line_count directory
2021-08-30 09:25:21 -07:00
yifeizhuang 48b194f737
release v1.40.0: build gcr images for release, fix python2.7 (#27045) 2021-08-18 08:22:11 -07:00
Lidi Zheng 2231c2ba77
Introduce Python import sorting to our sanity test suite (#26768)
* Add isort_code.sh to sanity tests

* Run tools/distrib/isort_code.sh

* Fine tune the import order for relative imports

* Make pylint and project generation happy

* Fix a few corner cases

* Use --check instead of --diff

* The import order impacts test result somehow

* Make isort print diff and check output at the same time

* Let tools/run_tests/python_utils be firstparty library

* Run isort against latest HEAD
2021-07-26 12:31:21 -07:00
Sergii Tkachenko 368b9077e2
xds-k8s kokoro buildscripts: exclude from tests suites (#26098) 2021-04-27 19:26:53 -04:00
AJ Heller 6ff042277e
Fix invalid use of python's traceback.print_exc (#25743)
The exception is being interpreted as a `limit` (int) to cap the number
of stack trace entries to print.

https://docs.python.org/3/library/traceback.html#traceback.print_exc
2021-03-17 12:04:15 -07:00
AJ Heller 5139a012e7
Migrate the bm_diff benchmarks to python3 (#25619)
* Migrate the bm_diff benchmarks to python3

Includes a requirements.txt pinned at ~2017 versions, when this script
was first written.

* Replace p2 with p3 scipy/numpy dependencies.

* py2->3 for benchmark setup scripts

* upgrade pip to resolve python3 cryptography/setuptools-rust problem

* re-add jobset import (accidentally removed)

* re-add six's urllib import. This file is still used in py2 tests

* force py3 in run_if_c_cpp_modified.sh

* Fix another instance of subprocess.check_output binary mode

* Use the requirements.txt for CI perf environment setup

* Try to upgrade PyJWT. (v2.0.0 was problematic, #25053)

v2.x makes encode return strs from jwt.encode in both py2 and py3.
Previously, py3 would return bytes, and py2 a str.

* upgate cryptography lib version requirements for jwt.

* Wrap pip requirements specifier in quotes '>=x,<y'

* Decode subprocess output once instead of for every line

* Revert "Decode subprocess output once instead of for every line"

This reverts commit 28d14026431622ac7afd3535a8d7118e5be96628.

py2 doesn't support the `text` argument to subprocess.check_output.

* Address reviewer requests

* Pin a valid scipy version

* Remove scipy and tabulate dependencies from macos tests
2021-03-09 15:44:00 +01:00
Lidi Zheng 39cc797025
[xDS Proto] Modernize buildgen scripts (#25512)
* [xDS Proto] Modernize buildgen scripts

* This PR only covers some buildgen scripts that will be used by xDS
proto
* This PR also improves the debuggability of some scripts
* Merge with master

* Adopt reviewer's advices
2021-03-02 11:25:01 -08:00
Yash Tibrewal 9526a55776 Remove disrespectful term 2021-02-08 15:23:18 -08:00
Sergii Tkachenko 2258cee7b2
xds-k8s exclude fix: dirs end with a slash 2021-01-19 22:42:57 -05:00
Sergii Tkachenko 83501b822d
xds-k8s driver: exclude from tests suites 2021-01-19 22:36:58 -05:00
Jan Tattermusch d446ec036f
Merge pull request #24861 from dapeng-mi/master
Bug fix: decode bytes object to string for subprocess.check_output ou…
2021-01-15 17:09:10 +01:00
Sergii Tkachenko 8db79e2e71 Python style: reformat code using updated yapf 0.30.0 2021-01-13 14:00:12 -05:00
dapeng-mi 965aa55c9e Bug fix: add __lt__ method for JobSpec class.
Another exception is found when running "./tools/run_tests/run_tests.py
 -l c++ -c dbg" test in python3 environment. The exception complains
the "<" method is not supported when calling sorted() function to sort
the JobSpec class.

Here is the exception.

./tools/run_tests/run_tests.py -l c++ -c dbg
PASSED: make [time=1.6sec, retries=0:0]

Omitting EPOLLEXCLUSIVE tests

2020-12-01 10:49:42,122 detected port server running version 21
2020-12-01 10:49:42,182 my port server is version 21
Traceback (most recent call last):
  File "./tools/run_tests/run_tests.py", line 1919, in <module>
    build_only=args.build_only)
  File "./tools/run_tests/run_tests.py", line 1800, in _build_and_run
    one_run = set(spec for language in languages
  File "./tools/run_tests/run_tests.py", line 1801, in <genexpr>
    for spec in language.test_specs()
  File "./tools/run_tests/run_tests.py", line 425, in test_specs
    return sorted(out)
TypeError: '<' not supported between instances of 'JobSpec' and 'JobSpec'

Signed-off-by: dapeng-mi <clark_mdp@163.com>
2020-12-04 09:57:57 +08:00
Lidi Zheng 511af22c78 Hopefully fixed 27 build on winserver2016
* Download the working msys64 and use it to compile 27
* Remove the cygwin detection override logic
* Only install Python interpreters in jobs running on winserver2016
* Fix the batch script substring check
* Increase the timeout for related jobs
* TIL that there is an allow list for Kokoro env vars
2020-11-23 14:17:58 -08:00
Lidi Zheng 0e275f3d2b Change to explicitly encode 2020-11-13 12:07:45 -08:00
Lidi Zheng e191e98f37 Unify the encoding to ascii 2020-11-13 12:07:44 -08:00
Lidi Zheng 892e7bacb1 Explicitly set encoding to ascii to prevent TypeError in 3.7+ 2020-11-13 12:07:44 -08:00
Esun Kim eeb2b0f3a9 Fix pagination in upload_rbe_results 2020-10-19 11:26:30 -07:00
zhungxd e4cdcb7b25 fix wrong path 2020-09-09 19:41:32 +08:00
Jan Tattermusch 3456636150
Merge pull request #23455 from jtattermusch/port_server_python3
Make port server python3 compatible
2020-07-14 20:21:53 +02:00
Jan Tattermusch e329d1ddd0 bytes(string, encoding) is not supported in python2
results in error "TypeError: str() takes at most 1 argument (2 given)"
2020-07-14 17:46:27 +02:00
Jan Tattermusch 375b8551f7 update bigquery partition expiration 2020-07-13 15:04:53 +02:00
Jan Tattermusch 4847f85367 make port server python3 compatible 2020-07-13 11:35:07 +02:00
Vijay Pai 9d82fcc1a2
Fix test filter for C++ include files 2020-06-16 08:38:04 -07:00
Jan Tattermusch 6ad89b6369 also upload className in upload_rbe_results.py 2020-03-29 11:01:21 -04:00
Eric Gribkoff 9e1110cb11 Split logs by test case and run client separately for each test 2020-03-22 23:56:44 -07:00
Jan Tattermusch fea074384f sometimes not all RBE results are uploaded 2020-03-16 07:32:20 -04:00
Jan Tattermusch e20ed51e6f easier debugging for upload_rbe_results.py 2020-03-16 07:32:20 -04:00
Esun Kim 7be821ac47 Yapf all target python sources 2020-01-03 09:25:10 -08:00
chentanjun 05b3eeff77 fix-up some spelling mistakes 2019-09-25 23:29:47 +08:00
Jan Tattermusch f268db6f33 yapf format code 2019-09-11 04:56:10 -04:00
Jan Tattermusch babb70705d fixup in report_utils.py 2019-09-11 10:05:54 +02:00
Jan Tattermusch 11222b78c2 only use multi_target report for selected languages 2019-09-11 09:27:59 +02:00
Jan Tattermusch 9e0eb19ca4 generate separate sponge target for each test suite 2019-09-11 09:02:54 +02:00
Jan Tattermusch 952ddb6a2b fix uploading bazel RBE results to bigquery 2019-04-29 12:06:34 -04:00
Lidi Zheng 6b437ca80f Increase the retry interval 2019-03-06 15:30:33 -08:00
Lidi Zheng cf70b744f1 Silent the check_on_pr failure 2019-03-06 15:02:29 -08:00
Bill Feng 987ac52ee2 formatting 2019-02-14 17:46:41 -08:00
Bill Feng 43277f83c8 filted out malformed resultstore data 2019-02-14 16:29:08 -08:00
Bill Feng 4564b78b27 more fields for filter 2019-02-14 15:29:19 -08:00
Bill Feng be55d61b64 more fields for filter 2019-02-14 15:07:04 -08:00
Bill Feng 5428bdeb83 more debug printouts 2019-02-14 11:09:55 -08:00
Bill Feng 1898e1be25 debug printouts 2019-02-14 10:39:47 -08:00
Bill Feng 95f3a99467
Merge pull request #18017 from billfeng327/hotfix/add-fieldmask-for-resultstore
added fieldmask to resultstore upload for RBE
2019-02-13 16:43:49 -08:00
Bill Feng 152626b13c removed debug printouts 2019-02-13 15:22:23 -08:00
Bill Feng 1709313023 changed fields 2019-02-13 12:02:43 -08:00
Lidi Zheng 684690c2d7 Adopt reviewers' advice 2019-02-12 16:04:21 -08:00
Lidi Zheng bf8bef9c78 Add retries for check_on_pr 2019-02-12 15:13:27 -08:00
Bill Feng ea3fd88eca debug printout for testing 2019-02-12 14:12:04 -08:00