Commit Graph

898 Commits

Author SHA1 Message Date
apolcyn b32d94de05
[ruby fork support] skip new fork tests since they're flaky at introduction (#33664)
These tests have been flaky since they were added in
https://github.com/grpc/grpc/pull/33430
2023-07-12 12:02:11 -07:00
apolcyn fe11ec9bcb
[ruby] experimental client side fork support (#33430)
Adds experimental fork support to gRPC/Ruby

Works towards https://github.com/grpc/grpc/issues/8798 (see caveats for why this wasn't marked fixed yet)
Works towards https://github.com/grpc/grpc/issues/33578 (see caveats for why this wasn't marked fixed yet)

This leverages existing `pthread_atfork` based C-core support for
forking that python/php use, but there's a bit extra involved mainly
because gRPC/Ruby has additional background threads.

New tests under `src/ruby/end2end` show example usage.

Based on https://github.com/grpc/grpc/pull/33495

Caveats:
- Bidi streams are not yet supported (bidi streams spawn background
threads which are not yet fork safe)
- Servers not supported
- Only linux supported
2023-07-10 13:34:10 -07:00
Sergii Tkachenko de6ed9ba9f
[Python] Migrate from yapf to black (#33138)
- Switched  from yapf to black
- Reconfigure isort for black
- Resolve black/pylint idiosyncrasies 

Note: I used `--experimental-string-processing` because black was
producing "implicit string concatenation", similar to what described
here: https://github.com/psf/black/issues/1837. While currently this
feature is experimental, it will be enabled by default:
https://github.com/psf/black/issues/2188. After running black with the
new string processing so that the generated code merges these `"hello" "
world"` strings concatenations, then I removed
`--experimental-string-processing` for stability, and regenerated the
code again.

To the reviewer: don't even try to open "Files Changed" tab 😄 It's
better to review commit-by-commit, and ignore `run black and isort`.
2023-06-09 15:08:55 -07:00
Esun Kim a8b787fae3
[Test] Used python 3.9 for python-alpine (#32931)
Fix at-head tests (this is a missing piece of
https://github.com/grpc/grpc/pull/32905) with the following error;

```
/var/local/git/grpc/tools/run_tests/helper_scripts/build_python.sh: line 126: python3.8: command not found
```
2023-04-24 14:37:16 -07:00
Jan Tattermusch a6c723d64e
[test-infra] Re-enable skipped windows tests (#32658)
Followup for https://github.com/grpc/grpc/pull/32649 (which disabled the
tests mentioned below).
Also sets correct path for tests build by ninja on windows, so that they
don't get skipped.

Once merged, I'll backport to 1.54.x and 1.53.x

The original issue with tests being skipped.
```
+ python3 workspace_c_windows_dbg_native/tools/run_tests/run_tests.py -t -j 8 -x run_tests/c_windows_dbg_native/sponge_log.xml --report_suite_name c_windows_dbg_native -l c -c dbg --iomgr_platform native --bq_result_table aggregate_results --measure_cpu_costs
2023-03-20 07:56:53,523 START: tools\run_tests\helper_scripts\build_cxx.bat

2023-03-20 08:04:51,388 PASSED: tools\run_tests\helper_scripts\build_cxx.bat [time=477.9sec, retries=0:0; cpu_cost=0.0; estimated=1.0]

2023-03-20 08:04:52,434 detected port server running version 21

2023-03-20 08:04:52,672 my port server is version 21

2023-03-20 08:04:52,703 SUCCESS: All tests passed



WARNING: binary not found, skipping cmake/build/Debug/bad_server_response_test.exe



WARNING: binary not found, skipping cmake/build/Debug/connection_refused_test.exe



WARNING: binary not found, skipping cmake/build/Debug/goaway_server_test.exe



WARNING: binary not found, skipping cmake/build/Debug/invalid_call_argument_test.exe



WARNING: binary not found, skipping cmake/build/Debug/multiple_server_queues_test.exe



WARNING: binary not found, skipping cmake/build/Debug/no_server_test.exe



WARNING: binary not found, skipping cmake/build/Debug/pollset_windows_starvation_test.exe



WARNING: binary not found, skipping cmake/build/Debug/public_headers_must_be_c89.exe



```
2023-04-05 10:33:53 +02:00
Jan Tattermusch 43c3d1f932
Switch all VS2017 builds to VS2019 (#32662)
(part of removing support for VS2017)

Also see https://github.com/grpc/grpc/pull/32649
Also see https://github.com/grpc/grpc/pull/32615

The switch to grpc-win2019 windows workers has already happened:
(cl/517400022).

Once this PR lands, I'll backport to 1.53.x branch as well (since that
release removes the VS2017 support).
2023-03-23 16:44:39 +01:00
Jan Tattermusch 5873ba96dc
Ensure compatibility with the new custom kokoro win2019 image (#32649)
Fix incompatibilities identified when running adhoc runs on the new
custom win2019 image.
After merging this, it should be possible to switch to the new image
without breaking any tests.

- for most fixes I added a comment that explains why they're necessary.
- the new image won't have VS2015 installed, so I'm switching the protoc
artifact build to VS2017

This PR will need to be backported to older release branches to ensure
the windows tests continue working on those branches as well (IMHO I
haven't made any changes that would be difficult to backport and I tried
to keeps the diff as small as possible to avoid issues when
backporting).

After we switch to the new image (and all the windows tests are green),
we can incrementally move the builds that are still using VS2017 to
VS2019.
2023-03-20 16:03:50 +01:00
apolcyn 2cfdf3fc50
[ruby]: skip grpc_class_init_test.rb (#32523)
This test has been occasionally failing on CI with "Bus Error" crashes
while requiring the grpc shared library.

These crashes have been unreproducible locally. Let's continue debugging
(b/266212253) but skip this on CI.
2023-03-02 10:43:32 -08:00
Jan Tattermusch 740932c899
Make remaining objc test jobs to pass on MacOS monterey (#32493)
Make remaining objC jobs compatible with kokoro monterey workers and
prepare for boringssl upgrade.

The changes here are taken from https://github.com/grpc/grpc/pull/32357,
but they should be merged in a separate PR
(we need the changes to be able to upgrade to monterey anyway and
there's no reason to make the boringssl upgrade PR more complicated by
bundling more fixes into it).

I've checked that the grpc_basictests_objc_examples and
grpc_ios_binary_size are green if switched to monterey.
Unfortunately it's hard to make grpc_basictests_objc_examples pass on
both monterey and mojave, so I suggest merging this PR at the same time
as CL to upgrade the kokoro jobs to monterey.
- that way both PR and continuous runs will remain green
- older branches would need a backport anyway

---------

Co-authored-by: Hannah Shi <hannahshisfb@gmail.com>
2023-03-01 09:55:33 +01:00
Hannah Shi 2ac1b1708d
[ObjC] run cpp ios cronet test with bazel (#31808)
Cleanup and remove ios cpp test cronet

To test manually:
./tools/bazel test //src/objective-c/tests:CppCronetTests

@sampajano 
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-02-13 17:51:03 -08:00
Esun Kim 0014c91858
Increased timeout for sanity test variants (#32288) 2023-02-03 09:49:23 -08:00
Esun Kim ff88928415
Fix cmake on macos (#32241) 2023-01-31 10:12:46 -08:00
Esun Kim b64d623f24
CMake's better handling c++14 requirement (#31916)
* Bumped the cmake version version to 3.8

* Switch to target_compile_features for cxx_std_14

* Regen
2023-01-27 09:51:31 -08:00
Cheng-Yu Chung 384982ba2b
[bugfixes] Fix vulnerability for PyYAML (#32007)
* Fix vulnerability for PyYAML

* Fix

* Revert "Fix"

This reverts commit 5522d226c4.

* Fix

* Fix format
2023-01-04 12:33:29 +08:00
Esun Kim 530b702259
Update Clang 15 (#31518)
* clang-15

* iwyu

* run clang_format_code

* Clang-Tidy config

* Fix misc-unused-using-decls

* Fixed performance-inefficient-vector-operation

* Sanity
2022-11-04 09:08:03 -07:00
Hannah Shi c7a2fc8e75
[ObjC] Run ios perf test from bazel (#31019)
* run ios CronetTest from bazel

* run ios perf test from bazel

* ci fix

Co-authored-by: Denny C. Dai <dennycd@me.com>
2022-10-24 23:58:32 -07:00
Jan Tattermusch db693b37c2
Move objc TvTests to bazel (and make it "build-only") (#31046)
* try TvTests with bazel

* remove tvos-test-basictests from run_tests.py

* add a build-only test for TvTests

* style fixes
2022-10-17 21:03:50 +02:00
Esun Kim 4b491e3274
Use 64bit linker on windows even when creating 32bit targets (#31237)
* Try CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE

* Target

* fix vcvarsall.bat argument

Co-authored-by: Jan Tattermusch <jtattermusch@google.com>
2022-10-11 10:49:57 -07:00
Craig Tiller f69c64b270
[sanity] Split IWYU, clang-tidy into their own jobs (#31141)
* [sanity] Split IWYU, clang-tidy into their own jobs

* fix typo

* fix

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-27 17:04:54 -07:00
Hannah Shi 96d27634a4
run ios CronetTest from bazel (#30439) 2022-09-27 14:49:38 -07:00
Esun Kim e90972bef6
Bump gcc 6 to 7 (#30903)
* Bump gcc 6 to 7

* Update

* Update 2
2022-09-09 09:23:11 -07:00
apolcyn 8b941bb648
Drop support for ruby 2.5 (#30699)
* Drop ruby 2.5 support
2022-08-25 21:39:31 -07:00
Yash Tibrewal 41ec08c69a
Update third_party/protobuf to 3.21.4 (#30377)
* Update third_party/protobuf

* run tools/distrib/python/make_grpcio_tools.py

* regenerate protos for ruby, php

* update build_handwritten.yaml

* regenerate projects

* Build - Use :well_known_type_protos instead of :well_known_protos

* Fix target

* Update upb

* Update Python for Protobuf 4.21 (#140)

* Update protobuf dependency on grpcio-tools

* Off by one

* Drop python 3.6 support

* Try upgrading pip

* And in the other script

* Try to figure out if we're compatible with abi3

* See what we've already got installed

* Update the requirements.txt file I didn't know existed

* And here too

* See what's installed

* Let's try that again

* Remove

* Try to confirm version

* Let me see the generated code

* Fix non-Bazel test runner

* Work for all test directories

* Regenerate example protos

* Clean up

* Generate .pyi files

* Fix type checking and linting

* Exclude pyi files from isort

* Upgrade to 3.21.4

* Update iwyu to get around messy protobuf IWYU rules

Co-authored-by: Richard Belleville <gnossen@gmail.com>
2022-08-04 09:39:49 -07:00
Esun Kim 8f7927f7bc
Added gcc12 (#30388) 2022-07-22 14:32:49 -07:00
Denny C. Dai 4fb924f939
[gRPC/iOS] Remove and cleanup CoreTest iOS test (#30095) 2022-06-23 17:42:31 -07:00
Hannah Shi 3ad945947c
[ObjC]interop tests with bazel (#29800)
* interop tests with bazel

* remove env in BUILD

* clang format
2022-06-09 19:03:17 -07:00
Esun Kim 0afcc37589
MSVC 2015 -> 2017 (#29754)
* MSVC 2015 -> 2017

* Update by review
2022-05-24 14:09:55 -07:00
Jan Tattermusch 4976933e6b
Remove some ObjC tests already run by objc_bazel_tests from run_tests.py (#29678)
* stop running objc plugin tests with run_tests.py

* stop running bazel examples as part of run_tests.py

* stop running UnitTests and MacTests as part part of run_tests.py
2022-05-18 11:35:40 -07:00
Jan Tattermusch b7034041de
Convert ObjC codegen plugin tests to bazel tests. (#29676)
* add initial version of bazelified plugin tests

* polish the bazel sh_test scripts

* add objc_codegen_plugin tests

* add objc plugin tests to bazel test job
2022-05-18 14:54:29 +02:00
Jan Tattermusch 345f12afa6
Improve ObjC bazel test and add TODOs. (#29665)
* objC bazel test: run InteropTests and MacTests

* objC bazel test: run TvTests

* Revert "objC bazel test: run TvTests"

This reverts commit 46a81991a9.

* avoid running flaky objC InteropTests under bazel

* add TODOs for objc run_tests.py tasks

* add a note about GRPC_VERBOSITY=debug being set

* increase timeout for ios-buildtest-example-tvOS-sample test task
2022-05-18 12:25:30 +02:00
Esun Kim 4edd63772e
Bump version of gcc and clang (#29594) 2022-05-06 10:26:03 -07:00
Craig Tiller 42b083322f
Check IWYU status in presubmits (#28180)
* fixes

* fixes

* fixes

* allow running outside docker

* x

* Automated change: Fix sanity tests

* fix

* fix

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-04-30 21:37:20 -07:00
Jan Tattermusch 5c35dbed93
run tests using the correct runtime for C# (#29302) 2022-04-06 13:58:59 +02:00
Craig Tiller 766cd6b573
Remove epollex poller (#29160)
* start delete

* remove build.gn... again

* remove more

* Automated change: Fix sanity tests

* fixes

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-03-21 10:27:52 -07:00
Jan Tattermusch 6d3c45ff7b
Add dockerized ARM64 tests (bazel C/C++, C#, PHP, ruby, python) (#28966)
* C# arm64 docker image

* add ruby arm64 docker image

* add bazel_arm64 docker image

* add python arm64 image

* add php arm64 docker image

* regenerate

* add support for running arm64 tests with run_tests.py

* restrict arm64 testing to python3.9

* first version of bazel arm64 C++ tests

* add arm64 job configs

* add initial checks to push_testing_images.sh
2022-03-14 13:30:52 +01:00
Esun Kim 6565584c7b
Bump the minimum gcc to 5 (#28786) 2022-02-11 10:31:25 -08:00
Jan Tattermusch e324bf5eee
Speed up windows C/C++ builds by using cmake Ninja generator (#28833)
* support building C/C++ with ninja

* make cmake_ninja_vs2015 build the default for C/C++

* fix vcvarsall location for vs2017
2022-02-11 09:59:51 +01:00
Jan Tattermusch 0ec0479ded
run_tests.py cleanup and simplification (#28808)
* only support cmake for CLanguage in run_tests.py

* add support for run_tests.py build step environ

* switch C/C++ run_tests.py build to build_cxx script

* CLanguage cleanup

* build C# entirely with build_csharp script

* move entire PHP build to build_php.sh

* fixup C# build on linux and mac

* run_dep_checks Makefile target is deprecated

* get rid of the "makefile" logic in run_tests.py

* fixup C# build on linux and mac

* XML_REPORT env variable is useless for --use_docker runs

* add a TODO

* move "main" functionality towards end of run_tests.py

* use self.args instead of global

* yapf format

* remove the no longer useful --update_submodules features of run_tests.py

* fix check_epollexclusive check in run_tests.py
2022-02-08 18:41:56 +01:00
Jan Tattermusch c8c1774ec4
Revert "Revert "Cleanup run docker machinery in run_tests.py, task_runner.py and elsewhere (#28704)" (#28741)" (#28748)
* Revert "Revert "Cleanup run docker machinery in run_tests.py, task_runner.py and elsewhere (#28704)" (#28741)"

This reverts commit 9a79d44e9b.

* fix python distribtest failure on fedora34
2022-02-01 11:33:56 +01:00
Yash Tibrewal 9a79d44e9b
Revert "Cleanup run docker machinery in run_tests.py, task_runner.py and elsewhere (#28704)" (#28741)
This reverts commit be723121fc.
2022-01-28 11:42:12 -08:00
Jan Tattermusch be723121fc
Cleanup run docker machinery in run_tests.py, task_runner.py and elsewhere (#28704)
* attempt

* slim down build_docker_and_run_tests.sh

* HOST_GIT_ROOT is unused

* config and arch variable no need to propagate to run_tests.py

* unify unused LOCAL_GIT_ROOT to EXTERNAL_GIT_ROOT

* mounting gcloud config seems useless

* reorder docker args

* cleanup

* allow passing args to build_docker_and_run_tests.sh

* converge build_docker_and_run_tests.sh and build_and_run_docker.sh

* more convergence

* convergence of docker runners

* finalize convergence of run_docker scripts

* GRPC_TEST_REPORT_BASE_DIR might not exist

* adjust report copying

* make report_dir and output_dir readable

* alpine linux does not support cp -t
2022-01-28 11:46:36 +01:00
Jan Tattermusch 321379da54
run_tests.py print useful info for reproducing issues as epilogue. (#28726)
* cleanup: remove the run_tests.py --forever option

* print debug info at the end of run_tests.py
2022-01-27 18:28:52 +01:00
Jan Tattermusch 1289cdae2e
Upgrade PHP docker images to debian11 (#28701)
* upgrade PHP docker images to debian11

* regenerate dockerfiles

* adjust testrunners to php debian11 images
2022-01-27 06:45:52 +01:00
Jan Tattermusch 1cf6b085f2
Enable ccache in more builds (#28665)
* upgrade ruby docker images to debian 11

* upgrade C# docker images to debian11

* update sanity dockerimage to debian11

* upgrade cxx interop to debian11

* add ccache to python interop images

* enable use of ccache for interop tests

* adjust run_tests.py to new docker images

* add ccache to rake-compiler-dock docker images

* improve prepare_ccache_symlinks_rc

* enable use of ccache in rake-compiler-dock docker containers

* add ccache support for python_manylinux2014_aarch64

* add ccache support for python_linux_armv7

* deduplicate python3.9 install

* ccache for crosscompiled darwin gems is broken

* fix bash -l resetting of PATH in grpc_artifact_python_linux_armv7
2022-01-25 20:37:04 +01:00
Jan Tattermusch 27b6b45c32
Upgrade C++ and Python docker images to debian stable (debian 11) (#28664)
* upgrade C++ and python docker images

* regenerate dockerfiles

* upgrade grpc_artifact_python docker images

* adjust run_tests scripts to dockerimages upgrades
2022-01-25 10:23:01 +01:00
Esun Kim 55d7631a99
Bump clang 12 to 13 (#28639) 2022-01-21 14:47:04 -08:00
Jan Tattermusch a215992f0e
speedup C# basictests: only build C# once for coreclr and mono tests (#28587)
* only build C# once for coreclr and mono tests

* one more attempt

* only build C# once for coreclr and mono
2022-01-18 11:09:49 -08:00
Lidi Zheng 7069770ee0
Merge the 3 repeating Python binary compilations (Attempt 2) (#28543)
* Revert "Revert "Merge the 3 repeating Python binary compilations (#28500)" (#28539)"

This reverts commit 0554cbee9c.

* Update hardcoded Python path

* Repect existing images and only use new path for newer releases

* fix interop_matrix testcases

Co-authored-by: Jan Tattermusch <jtattermusch@google.com>
2022-01-14 09:25:33 -08:00
Jan Tattermusch 0554cbee9c
Revert "Merge the 3 repeating Python binary compilations (#28500)" (#28539)
This reverts commit 2d4f3c5600.
2022-01-12 18:31:02 +01:00
Jan Tattermusch 98999225be
Speedup linux portability build_only tests (#28461)
* try speeding up linux portability test

* remove gcc8.3 portability test

* c-ares is the default resolver on linux

* dont set parallel run_tests jobs too high

* original parallelism might lead to better results
2022-01-12 14:56:28 +01:00