Commit Graph

351 Commits

Author SHA1 Message Date
Esun Kim 740b58a9ac Reintroduced GCC 7 test (#36565)
GCC 7 was disabled due to its gcc internal error while building protobuf C++. But we still need to support gcc7 and there appear to be issues causing gcc 7 to not build grpc so let's reintroduce gcc 7 test.

Closes #36565

PiperOrigin-RevId: 631947203
2024-05-08 15:41:46 -07:00
Esun Kim 542c160fe6 [Test] Adding an additional tag to test docker images (#36341)
Updated `push_testing_images.sh` to add an additional tag, `infrastructure-public-image-HASH` to a new image to be excluded from the GCP Vulnerability scanner.

To reviewer:
- Only  `tools/dockerfile/push_testing_images.sh` has an interesting change (adding a new tag)
- Clang 6 and 17 don't have an actual change other than clean-up which is to test if the script is working.

Closes #36341

PiperOrigin-RevId: 623944712
2024-04-11 14:45:08 -07:00
Esun Kim e510ff89aa [CI] Rebuilt docker images (#36329)
Rebuilt all test docker images to get them up-to-dated, expecting they've got more security fixes.

Closes #36329

PiperOrigin-RevId: 623884120
2024-04-11 11:27:03 -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
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
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
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
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
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
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
Eugene Ostroukhov 0f47441d5c
[build] Update Ubuntu docker images to 22 (#34473) 2023-09-26 15:41:50 -07: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
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
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
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 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
Xuan Wang 08659ad1c3
Revert "[bazel] Add bazelified run_tests.py tests for ruby and python" (#33999)
Reverts grpc/grpc#33959
2023-08-07 12:43:55 -07:00
Jan Tattermusch cb235a3e22
[bazel] Add bazelified run_tests.py tests for ruby and python (#33959)
Context: https://github.com/grpc/grpc/pull/33707

Add python and ruby tests. Both required a few fixes so I wanted to add
them separately from https://github.com/grpc/grpc/pull/33707

Manual run of all the tests:
https://source.cloud.google.com/results/invocations/24c7b6ed-a8b3-4367-a4bf-8828919a9340
2023-08-07 16:14:17 +02:00
Esun Kim 6574096a64
[Test] Added a new portability test with OpenSSL 3.0.9 (#33944) 2023-08-01 15:14:35 -07:00
Yijie Ma 4dee8bf3fd
[CI] Update cxx_* docker images to install twisted (#33857)
This is so that the newly added dns_test (which uses twisted-based
server) within the posix_event_engine_test can run on those platforms.

<!--

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-07-26 09:13:34 -07:00
Richard Belleville 498fc99479
[packaging] Publish xds-protos as part of the standard package pipeline (#33797)
This PR:

- Fixes the xds-protos Python package, which was broken when the `udpa`
submodule was removed
  - This required re-adding the protoc-gen-validate submodule
- Adds non-Bazel tests for xds-protos and all of its dependent packages
- Versions xds-protos the same way as the rest of the Python packages
- Fixes Python 3.11 support in `run_tests.py`, which is necessary for
the testing mentioned above


CC @sergiitk You won't be able to consume this in the interop tests
until it makes it into a release. I'm thinking I'll want to backport
this to the 1.57.x branch to make that happen faster.

CC @drfloob to inform him about the likely backport.
2023-07-25 16:41:02 -07:00
Esun Kim cd74cfe49a
[Test] Made Android docker to have NDK & CMake installed (#33449)
It is not uncommon for Android tests to fail due to an NDK download
failure. To address this issue, the Android Docker image has been
updated to include NDK and CMake. This will help to avoid download
problem.

I verified this works as intended to see the invocation log not having
installation log for NDK and CMake such as

```
Checking the license for package NDK (Side by side) 25.1.8937393 in /opt/android-sdk/licenses
License for package NDK (Side by side) 25.1.8937393 accepted.
Preparing "Install NDK (Side by side) 25.1.8937393 (revision: 25.1.8937393)".
"Install NDK (Side by side) 25.1.8937393 (revision: 25.1.8937393)" ready.
Installing NDK (Side by side) 25.1.8937393 in /opt/android-sdk/ndk/25.1.8937393
"Install NDK (Side by side) 25.1.8937393 (revision: 25.1.8937393)" complete.
"Install NDK (Side by side) 25.1.8937393 (revision: 25.1.8937393)" finished.
Checking the license for package CMake 3.10.2.4988404 in /opt/android-sdk/licenses
License for package CMake 3.10.2.4988404 accepted.
Preparing "Install CMake 3.10.2.4988404 (revision: 3.10.2)".
"Install CMake 3.10.2.4988404 (revision: 3.10.2)" ready.
Installing CMake 3.10.2.4988404 in /opt/android-sdk/cmake/3.10.2.4988404
"Install CMake 3.10.2.4988404 (revision: 3.10.2)" complete.
"Install CMake 3.10.2.4988404 (revision: 3.10.2)" finished.
```
2023-06-15 11:04:53 -07:00
Jan Tattermusch 30b3d5061a
[test-infra] Switch RBE linux build to a new custom image rbe_ubuntu2004. (#32748)
- Add a new docker image "rbe_ubuntu2004" that is built in a way that's
analogous to how our other testing docker images are built (this gives
us control over what exactly is contained in the docker image and
ability to fine-tune our RBE configuration)
- Switch RBE on linux to the new image (which gives us ubuntu20.04-based
builds)

For some reason, RBE seems to have trouble pulling the docker image from
Google Artifact Registry (GAR), which is where our public testing images
normally live, so for now, I used a workaround and I upload a copy of
the rbe_ubuntu2004 docker image to GCR as well, and that makes RBE works
just fine (see comment in the `renerate_linux_rbe_configs.sh` script).

More followup items (config cleanup, getting local sanitizer builds
working etc.) are in go/grpc-rbe-tech-debt-2023
2023-05-01 11:47:27 -07:00
Esun Kim 3bd6c38650
[Infra] Use Bazel 6 and drop Bazel 4 (Part 2) (#32910)
Oops I missed important changes from
https://github.com/grpc/grpc/pull/32712. And it turned out that there
are two problems that I couldn't fix at this point.
- Windows Bazel RBE Linker Error: This may be caused by how new Bazel 6
invokes build tools chain but it's not clear. I put workaround to use
Bazel 5 by using `OVERRIDE_BAZEL_VERSION=5.4.1`
- Rule `rules_pods` to fetch CronetFramework from CocoaPod has
incompatibility with sort of built-in apple toolchain.
(https://github.com/bazel-xcode/PodToBUILD/issues/232): I couldn't find
a workaround to fix this so I ended up disabling all tests depending
this target.
2023-04-21 15:53:52 -07:00
Esun Kim 63ae99d36e
[Test] Fix git on Alpine (#32913)
Fix `python_alpine` test failure with

```
fatal: detected dubious ownership in repository at '/var/local/jenkins/grpc'
To add an exception for this directory, call:

	git config --global --add safe.directory /var/local/jenkins/grpc
```
2023-04-21 11:23:50 -07:00
Esun Kim c59fd2ed88
[Test] Upgrade Alpine Linux to 3.15 (#32905)
Upgrade Alpine Linux version as 3.15 is the oldest supported version.
2023-04-20 14:44:07 -07:00
Richard Belleville 86bd0721ea
[fork] Generate GDB backtraces in fork tests on Kokoro (#32535)
<!--

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-03-08 10:30:46 -08:00
Esun Kim faa80eaa10
Updated clang 15 images (#32317)
This is to get the latest version of clang 15 (15.0.7) for our docker
images based on that. By doing so, I had to address this new git
security enforcement so I added a new file to tame it. In a nutshell,
this PR is about polishing docker images based on clang 15.
2023-02-13 13:06:07 -08:00
Esun Kim 564a46291b
Update all Debian:9 to Debian:10 (#31917) 2023-01-23 10:50:41 -08:00
Esun Kim 25b0aff1e7
Update a sanity docker image to run iwyu (#31956)
* Added missing iwyu deps

* Docker image pushed
2022-12-21 14:54:38 -08:00
Jan Tattermusch ed39634fe8
Move docker images from dockerhub to artifact registry. (#31591)
* push_testing_images.sh overhaul

* simplify dockerize scripts

* update run_in_docker.sh script

* add generated .current_version files for docker images

* improvements to push_testing_images.sh

* add local-only check for push_testing_images.sh to sanity tests

* fix sanity check

* add expiration for TRANSFER_FROM_DOCKERHUB

* add a readme file
2022-11-17 10:12:39 +01: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
Jan Tattermusch 78fd1f637a
Run grpc_android job under docker for better maintainability. (#31504)
* run grpc_android in a docker container

* add TODO

* fixup android_ndk dockerfile
2022-11-02 11:09:19 +01:00
Jan Tattermusch 3f1c3f23bd
Python virtualenv dockerfile cleanup (#31139)
* python tests install pinned virtualenv themselves

* more alpine image simplifications

* regenerate alpine image

* introduce dockerfile template for xds interop tests harness deps

* cleanup interop_http2 docker image, remove python_deps.include
2022-10-04 19:20:02 +02:00
Richard Belleville b15097142a
Silence dubious ownership issue in bazel image (#30963)
* Silence dubious ownership issue in bazel image

* Agh. It's a template
2022-09-13 16:42:21 -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
Jan Tattermusch 631392f2e7
Upgrade bazel version to bazel 5.3 (repo-wide) (#30844)
* update bazel to 5.3.0

* regenerate dockerfiles

* update bazel distribtest

* update docker image templates

* regenerate dockerfiles 2

* regenerate bazel_support.md

* upgrade rules_apple and apple_support bazel deps

* Revert "upgrade rules_apple and apple_support bazel deps"

This reverts commit eb9a0d2155.

* fix objc bazel 5.3 build on kokoro mojave image
2022-09-08 11:18:54 +02:00
apolcyn 8b941bb648
Drop support for ruby 2.5 (#30699)
* Drop ruby 2.5 support
2022-08-25 21:39:31 -07:00
Esun Kim 8f7927f7bc
Added gcc12 (#30388) 2022-07-22 14:32:49 -07:00