Commit Graph

55 Commits

Author SHA1 Message Date
Xuan Wang 4feb98e82b
[Python test] Fix a typo in bazelify_tests target (#36292)
Typo introduced in: https://github.com/grpc/grpc/pull/34450
<!--

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.

-->
2024-04-09 12:21:50 -07:00
Xuan Wang 73b0ac2067 [Python Version] Drop support for Python 3.7 (#34450)
### NOTE
* We shouldn't merge this PR until GCP cloud functions drops support for Python 3.7 ([Currently scheduled for GCF](https://cloud.google.com/functions/docs/runtime-support#python))

As part of supporting Python 3.12, we're now officially drop support for Python 3.7.

This PR:

* Changed supported Python version from 3.7 to 3.8 in README.
* Replaced distribution test image from `debian:buster` to `debian:bullseye` since the default Python version in buster is 3.7.

<!--

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.

-->

Closes #34450

PiperOrigin-RevId: 622899511
2024-04-08 11:17:51 -07:00
Esun Kim 1ce1159a75 [CI] Moved to Bazel 7 (#36105)
Let's use Bazel 7 by default.

Closes #36105

PiperOrigin-RevId: 617653203
2024-03-20 16:16:12 -07:00
Ming-Chuan d6bb391449 [Build] Migrate Android NDK, android rules and platforms (#36116)
This commit does the following 3 things for Android bazel rules, which depends on each other

1. Update NDK to 26.2.11394342 (and a few other Android things)
2. Use rules_android_ndk instead of builtin `native.android_ndk_repository`
    * `third_party/android/android_configure.bzl` was a workaround for users who don't set `$ANDROID_NDK_HOME` env var. Now with rules_android_ndk, we can declare repo without registering the toolchain. Instead users who need NDK toolchain should use `--extra_toolchains` to manually register the toolchain, as shown in README.md.
3. Migrate to platforms. See https://bazel.build/concepts/platforms
    * Currently we declares android platforms that is needed for binder transport APK. Later gRPC repo can gradually migrate to platforms for other platforms.
    * The value of `crosstool_top` will still be `//external:android/crosstool` (which is the default value), so existings android `config_settings` will still work. We should migrate them to match with `@platforms//os:android` constraint later.

The platforms migration needs Bazel 7.0 to work so we also override bazel version in testing scripts.

Closes #36116

PiperOrigin-RevId: 617244655
2024-03-19 11:46:15 -07:00
Esun Kim 0703276770 [CI] Bazel upgrade (#36104)
Upgraded Bazel as follows;
- Bazel 6.4 to 6.5
- Bazel 7.0 to 7.1

Closes #36104

PiperOrigin-RevId: 616237591
2024-03-15 14:08:10 -07:00
Esun Kim e34c20cd13 [CI] Refactor android_ndk docker (#36091)
Refactored android-ndk docker image to have
- Replaced a full Android SDK with a Android command line tool (generally good for docker usage) and bumped its version to the latest among ones that support JDK 11
- Upgraded Debian from 10 to 11
- Upgraded Java SDK 8 to 11
- Upgraded Google CLI to the latest

Closes #36091

PiperOrigin-RevId: 615088973
2024-03-12 10:24:10 -07:00
tony 5043eb4d65 [csharp] Fix csharp_ubuntu2204_x64 docker image (#36019)
Fix the docker image for C# distribution tests - csharp_ubuntu2204_x64

The package that installed the .NET 7.0 SDK is missing setting up links and thus the `dotnet` command cannot find the SDK. Setting this links has been added to the dockerfile.

**NOTE**: I'm unable to update `tools/dockerfile/distribtest/csharp_ubuntu2204_x64.current_version` as I don't have access to the artifact registry.

Closes #36019

PiperOrigin-RevId: 611590679
2024-02-29 14:10:36 -08:00
apolcyn 9054988785 [csharp] Use a stable/supported C# runtime in ubuntu 22.04 distribtest docker images (#35955)
The current .NET SDK in these tests is EOL, and we've been seeing strange SSL errors transiently.

Update to a supported version and remove cruft in the docker image that was there to install the older version.

TODO: submitting first with the ubuntu 22.04 image test skipped, need to follow-up with a fix and unskip the test

Closes #35955

PiperOrigin-RevId: 610798209
2024-02-27 10:34:33 -08:00
Esun Kim 2ca568663f [CI] Upgraded the docker images for Ruby Distrib Tests (#35911)
- Dropped Ruby 2.7 test (Ruby 2.7 hit EOL 1 year ago)
- Upgraded the base image of Ruby docker images from Debian:10 to Debian:11 (Debian:10 hit EOL)

Closes #35911

PiperOrigin-RevId: 607088383
2024-02-14 13:34:40 -08:00
apolcyn f82ecf4b0b [ruby] add distrib tests for ruby 3.1-3.3 (#35788)
As title

Partial followup to https://github.com/grpc/grpc/pull/35399

Closes #35788

PiperOrigin-RevId: 603786425
2024-02-02 14:24:00 -08:00
apolcyn d9c253fe32 [csharp] try rebuilding distrib ubuntu image (#35674)
rebuilt `tools/dockerfile/distribtest/csharp_ubuntu2204_x64/Dockerfile` (without actually changing anything in the docker instructions) in an attempt to fix `The SSL connection could not be established, see inner exception.` errors happening in `dotnet restore` commands in distrib tests using this image.

Closes #35674

PiperOrigin-RevId: 601856906
2024-01-26 13:47:13 -08:00
Esun Kim af95eafb34 [CI] Using clang-17 for clang tidy & format (#35595)
Clang-17 is now better at formatting. Clang-16 used to do some questionable formatting.

Closes #35595

PiperOrigin-RevId: 600829055
2024-01-23 10:19:25 -08:00
Esun Kim 5c0f349761 [Build] Bump the required CMake version to 3.13 (#35572)
We've been trying to upgrade Cmake to 3.13 or later as OSS policy bumped it. But we couldn't as Android has a weird linker error with Cmake 3.18 (you can see the error from https://github.com/grpc/grpc/pull/34331) This PR instead upgrades it to use 3.22 for Android test.

Closes #35572

PiperOrigin-RevId: 599317285
2024-01-17 16:08:53 -08:00
Chad Wilson 43d2b28e02 [ruby] Build/test ruby 3.3 and build native gems with Ruby 3.3 support (#35399)
Updates ruby-compiler-dock to 1.4.0 which brings Ruby 3.3 final support per https://github.com/rake-compiler/rake-compiler-dock/releases/tag/1.4.0 and starts cross-compiling for ruby 3.3.

I can't find obviously where the test infrastructure configuration is to run the tests under Ruby 3.3, so might need pointers or an accompanying PR for the test infra. (I note #31991 from @apolcyn so perhaps currently they are not run against newer versions)

Fixes #35396

- Backport to `1.60` is desirable since currently the Ruby gems cannot be installed with Ruby 3.3 and have to be built from source.

Closes #35399

PiperOrigin-RevId: 599200628
2024-01-17 09:37:18 -08:00
Esun Kim 53d79d4beb [Test] Upgrade clang test from 16 to 17 (#35524)
Closes #35524

PiperOrigin-RevId: 597883649
2024-01-12 10:41:43 -08:00
AJ Heller bd1eb96b5b [test-infra] Update all Ubuntu docker images to v20.04 or newer (#35440)
Closes #35440

PiperOrigin-RevId: 595515422
2024-01-03 15:14:54 -08:00
Esun Kim 1e4fb21b7c
Fix Bazel 7 build (more) (#35392)
It turned out that the previous change missed two things which this PR
has

- Fix function `_dockerized_genrule` not to have `timeout` and `flaky`
which Bazel doesn't have. (Bazel 7 may either drop these arguments or
become more strict about passing unrecognized ones)
- Disabled python bazel distribution tests with Bazel 7. This needs to
be addressed by https://github.com/grpc/grpc/issues/35391.
2023-12-27 09:32:51 -08:00
Esun Kim 45aecbe355 [Tool] Added Bazel 7 basic support (#35362)
- Added Bazel 7 to the support bazel versions.
- Changed the default Bazel version to 7.
- Fixed Android Binder build issue.

Closes #35362

PiperOrigin-RevId: 592946781
2023-12-21 14:13:56 -08:00
Xuan Wang 2d7b751d4e [Python run_test] Support Python3.12 (#35325)
Fix: https://github.com/grpc/grpc/issues/35085
<!--

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.

-->

Closes #35325

PiperOrigin-RevId: 592635611
2023-12-20 12:59:24 -08:00
Gregory Cooke 12c0058bf2 [Security - Testing] OpenSSL 1.0.2 and 1.1.1 CI Testing (#35236)
Enable OpenSSL 1.0.2 tests and add a container for 1.1.1 so that it is tested during portability testing as well.

Closes #35236

PiperOrigin-RevId: 590345568
2023-12-12 14:52:43 -08:00
Esun Kim d77e5c0dd3
[Build] Dropped Bazel 5.x and Upgraded Bazel 6.4.0 (#34813)
- Dropped Bazel 5.x support aligned with [Foundational C++ support
policy:
Bazel](https://opensource.google/documentation/policies/cplusplus-support).
- Upgraded Bazel 6 to 6.4.0 (the latest)
- Updated gRPC Bazel documentation to be aligned with the policy above.
2023-11-06 15:47:29 -08:00
AJ Heller 0c58f1551c
[build] Speed up the strict_build CI job (#34841)
The `bazel_build_with_strict_warnings_linux` job was taking nearly an
hour to complete. This change brings it down to ~20m by splitting up the
build targets into 7 separate RBE actions.

---------

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2023-11-01 10:06:01 -07:00
Xuan Wang 43661ab364
[Python run_test] Revert "Revert "[Python run_test] Fix run_test"" (#34671)
Reverts grpc/grpc#34667

The change was reverted because it failed to import to g3, after some
changes, now it's safe to reapply those changes.

Tested by importing this PR internally, it passed presubmit:
cl/573836270
2023-10-19 09:47:17 -07:00
Esun Kim dd3a355cc1
[Test] RBE back to Ubuntu 20.04 (#34720)
Partial rollback of https://github.com/grpc/grpc/pull/34473 for RBE as
RBE needs Ubuntu 20.04 to get clang artifacts which Google publishes.
There aren't artifacts for Ubuntu 22.04 yet so there is no point of
upgrading RBE image to 22.04.
2023-10-18 09:49:00 -07:00
apolcyn 36af323673
[ruby] create debug symbol packages (#34632)
Introduce `grpc-native-debug` gems containing debug symbol packages that
complement the shared libraries shipped in pre-compiled binary gems.

src/ruby/nativedebug/README.md has details on usage.
2023-10-17 10:45:08 -07:00
Craig Tiller 0496589405
Revert "[Python run_test] Fix run_test" (#34667)
Reverts grpc/grpc#34292
2023-10-11 17:46:20 -07:00
Yijie Ma bae0c705aa
[Deps] Update to Clang-16 (#34492)
<!--

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-10-11 16:26:32 -07:00
Xuan Wang 11d9b083f3
[Python run_test] Fix run_test (#34292)
We're not running any test at all from `run_test.py` because of the way
we filter test cases:

1d136fd05f/src/python/grpcio_tests/tests/_runner.py (L137)

* `testcase_filter` is read from a json file (like [this
one](https://github.com/grpc/grpc/blob/master/src/python/grpcio_tests/tests/tests.json))
and test name is similar to `unit._metadata_test.MetadataTest`.
* `case.id()` is loaded by `iterate_suite_cases` and will always have a
prefix of `tests`, an example of case id will be:
`tests.unit._metadata_test.MetadataTest`.

Because of the prefix, none of the test case will be matched thus we're
not running any of the tests.

This PR fixes the prefix issue and all the regressions comes from not
running tests using `run_test.py`.

#### Other Changes
* Added couple of `__init__.py` file since it's required to load tests.
* Added `py_status_code` to Aio rpc state.
* `code()` is expecting to return a python gRPC code but current
`status_code` is a Cython code.
* Added `libsqlite3-dev` to our dockers because it's required for
`coverage==7.2.0`.
* Renamed csds and admin test because test case file have to end with
`_test`:
1d136fd05f/src/python/grpcio_tests/tests/_loader.py (L26)
* Removed gevent test from `run_test.py` because Bazel gevent tests
should be good enough for us.

<!--

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-10-11 09:50:53 -07:00
Jan Tattermusch 14f5d4768d
[bazelify tests] Add "concurrent_bazel.sh" wrapper to enable parallel invocations of bazel (#34568)
(I had to first solve a problem with "dubious file ownership" error that
was happening inside the grpc_repo_archive action when using the
concurrent wrapper).

Example:
```
tools/docker_runners/examples/concurrent_bazel.sh --bazelrc=tools/remote_build/linux.bazelrc test --genrule_strategy=remote,local --workspace_status_command=tools/bazelify_tests/workspace_status_cmd.sh //tools/bazelify_tests/test:runtests_csharp_linux_dbg
```
2023-10-06 01:02:40 -07:00
Esun Kim 10e08e06bd
[Test] Bump the timeout for bazelify distribtest_php_linux_x64_debian10 (#34600)
Bump the timeout as distribtest_php_linux_x64_debian10 takes longer
while building core.
2023-10-05 15:22:57 -07:00
Jan Tattermusch 3b40af376e
[bazelified tests] First attempt at bazelified rules for building artifacts/packages (#34462)
Foundation for being able to bazelify the build artifact -> build
package -> distribtest workflow tests.

Main ideas:
- "build artifact" and "build packages" will be represented by a custom
genrule (that runs the build on RBE under a docker container).
- since genrule doesn't support displaying logs for each target as a
separate "target log" (in the same way that bazel tests do), and we
generally want readable per-target logs for the bazelified test, a pair
of targets will be created for each "build artifact task":
- a genrule that actually performs the build, creates an archive with
artifacts and stores the exitcode and build log as rule outputs
- a corresponding "build_test" sh_test that simply looks at the result
of the genrule and presents the build log and build result a "target
log" for this test.
2023-10-04 11:08:49 -07:00
Eugene Ostroukhov e82d025cbe
[test] Add OpenSSL1.0 to C# Ubuntu 22.04 image (#34502) 2023-09-27 12:53:59 -07:00
Eugene Ostroukhov 0f47441d5c
[build] Update Ubuntu docker images to 22 (#34473) 2023-09-26 15:41:50 -07:00
Eugene Ostroukhov 16e26b1091
[test] Fix venv version installed on Fedora 26 (#34477) 2023-09-26 09:10:35 -07:00
Eugene Ostroukhov a5b215024c
[test] Update images to Fedora 36 (#34469) 2023-09-25 13:45:40 -07:00
Jan Tattermusch 4c0e8086e5
[bazelified tests] Unbreak RBE bazelified tests after #34444 (#34463)
Unbreak what was broken by
https://github.com/grpc/grpc/pull/34444#issuecomment-1733830982.
2023-09-25 16:22:46 +00:00
Esun Kim 05f14d002d
[Test] Changed gcc-7 to gcc-8 (#34444)
Bumping gcc 7 to 8 to workaround the ongoing gcc segfault problem when
building Protobuf C++. Currently Foundational C++ requires gcc 7 so this
is a temporary measure to make the test green. We need to either make a
decision to change the minimum version of gcc in the Foundational C++ or
find a way to support gcc 7 without gcc segfault soon.
2023-09-22 12:14:48 -07:00
Xuan Wang ffdb58dd5f
[Python 3.12] Support Python 3.12 (#34398)
Support Python 3.12.

### Testing
* Passed all Distribution Tests.
* Also tested locally by installing 3.12 artifact.


<!--

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-09-22 09:57:29 -07:00
Jan Tattermusch 60f25c289b
[bazelified tests] Bazelify tests from "linux/grpc_bazel_build" and make the original test job a noop. (#34429)
Bazelify tests from "linux/grpc_bazel_build" kokoro job by creating 3
bazelified tests - "build with strict warning", "build with no_xds=True"
and "build with no_xds=True negative test".

- also make the original "linux/grpc_bazel_build" kokoro job a no-op
(since bazelified tests now provide the same coverage).
2023-09-22 08:25:42 -07:00
Jan Tattermusch 866fc41067
[bazelified tests] Make bazelified C basictests build only (#34428)
- make C-core basictests use `--build_only` when running as bazelified
tests. This is because the volume of C core tests is expected to grow
very significantly after https://github.com/grpc/grpc/pull/34419 and
currently the non-bazelified counterpart of the tests (the presubmit
grpc_basictests_c_cpp_build_only job) is also "build only".
- make the linux presubmit job `grpc_basictests_c_cpp_build_only` a
noop, since the bazelified tests already give the same coverage on
presubmit.
2023-09-21 21:02:05 +02:00
Jan Tattermusch b62edde1e3
[bazelified tests] Add more bazelified portability tests (and make them SOT for presubmit) (#34388)
- bring parity between legacy portability_build_only linux job and
bazelified RBE portability tests.
- make grpc_portability_build_only job a no-op, since it's fully
replaced by that bazelified tests (but keep grpc_portability on master
job for now).

For comparison:
[legacy portability linux build only
tests](https://source.cloud.google.com/results/invocations/f26f8b32-6878-43c7-9613-05f3111fa07c/targets)
[bazel RBE bazelified
tests](https://source.cloud.google.com/results/invocations/b656625f-b1e8-4b5c-9be0-b34ac9fcb31e/targets)
(before this PR).
2023-09-19 19:27:29 +02:00
Jan Tattermusch a3b4c797a7
[bazelified tests] Reenable runtests_php_linux_dbg after #34257 (#34266)
The valgrind based test (removed in
https://github.com/grpc/grpc/pull/34257) was the reason why the dbg test
was disabled in the past.
2023-09-18 07:52:03 +00:00
Eugene Ostroukhov 58f1c74383
[test] Update NDK image with newer CMake (#34341)
1. Switch to CMake 1.18.
2. Make ergonomic change to push_testing_images.sh to allow building
just a single image.
3. Update packages to reduce a number of vulnerabilities reported.
2023-09-14 12:34:06 -07:00
apolcyn fb635a1959
[ruby] drop ruby 2.6 support (#34198)
As title
2023-08-30 11:02:45 -07:00
Jan Tattermusch fdf3f5a36b
[bazelified tests] Shard bazelified bazel distribtests to make them faster (#34102)
Basically run each of the subtests (buildtest, distribtest_cpp,
distribtest_python) as a separate bazel target.

- currently the bazel distribtest are the slowest targets in
grpc_bazel_rbe_nonbazel
- the shards are basically independent tests anyway
- when split into multiple targets, they each get a separate target log
so it's easier debug issues since there isn't multiple bazel invocations
in each log.
2023-08-21 15:13:37 +02:00
Jan Tattermusch d3548a3941
[bazel] Upgrade bazel repo-wide to 6.3.2 (#34088)
- Upgrade bazel
- Reduce the number of places where bazel version needs to be upgraded
in future.
- also make sure the list of bazel versions to test by bazelified tests
is loaded from supported_versions.txt (it was hardcoded before).
- ~~Try upgrading windows RBE build to bazel 6.3.2 as well.~~

The core idea:
- the source of truth for supported bazel versions is in
`bazel/supported_versions.txt`
- the first version listed in `bazel/supported_versions.txt` is
considered to be the "primary" bazel version and is going to be used in
most places thoroughout the repo.
- use templates to include the primary bazel version in testing
dockerfiles and in a newly introduced `.bazelversion` files (which gets
loaded by our existing `tools/bazel` wrapper).


~~Supersedes https://github.com/grpc/grpc/pull/33880~~
2023-08-18 10:11:33 +02:00
Jan Tattermusch 422d7adf47
[bazelified tests] Reenable gcc_12 bazelified portability test (#34078)
Needs https://github.com/grpc/grpc/pull/34035 to be merged first. With
newer ccache in available in the gcc12 test image, the build is now
faster so we can reenable the test.
2023-08-17 08:49:14 +02:00
Jan Tattermusch e756a09e92
[bazel] enable more bazelified C++ distribtests (#34031)
Reenable the bazelified version of `cpp_distribtest_cmake_linux` and
`cpp_distribtest_cmake_pkgconfig_linux` distribtests
2023-08-17 08:46:28 +02:00
Jan Tattermusch a526a091ae
[docker images] Consolidate git directory ownership workaround and upgrade ccache (#34035)
Based on https://github.com/grpc/grpc/pull/34033

Bunch of cleanup and rebuilding many docker images from scratch
- consolidate the workaround for "dubious ownership" issue reported by
git. Other team members have run into this recently and used similar but
not identical workarounds so some cleanup is due.
- rebuilding many images increases the chance that we fix the "dubious
ownership" git issue early on rather than later on in the one-at-a-time
fashion in the future (and the former will prevent many teammembers from
wasting time on this weird issue).
- Newer version of ccache is needed for some portability tests to be
able to benefit from caching (e.g. the GCC 12 portability test to get
benefits of local disk caching) - this is a prerequisite for reenabling
the bazelified gcc12 portability test.
- upgrade node interop images to debian:11 (since debian jessie is long
past EOL).
2023-08-17 00:28:21 +02:00
Jan Tattermusch 4c3ff07dac
[bazel] Reintroduce bazelified ruby and python tests (#34033)
Reintroduce https://github.com/grpc/grpc/pull/33959.

I added a fix for the python arm64 build (which is the reason why the
change has been reverted earlier).
2023-08-16 19:00:19 +02:00