Skip to content

Add config to run additional PHP tests per PR#23321

Closed
stanley-cheung wants to merge 1 commit intogrpc:masterfrom
stanley-cheung:php-additional-tests
Closed

Add config to run additional PHP tests per PR#23321
stanley-cheung wants to merge 1 commit intogrpc:masterfrom
stanley-cheung:php-additional-tests

Conversation

@stanley-cheung
Copy link
Copy Markdown
Contributor

@stanley-cheung stanley-cheung commented Jun 26, 2020

For #23307

In #21941 , there was a core change related to upb, and later we discovered (via the xDS tests breakage) that that change broke the pecl install build of the PHP extension. That breakage wasn't discovered early primarily because we build the PHP extension slightly differently in the PR tests vs in the xDS tests, which are only run in master. In the PR tests, c-core was compiled and installed first and then the PHP extension was built in a 'thin' way. See here. But in the xDS tests, the pecl extension was built fully as if an end user would have used it (i.e. tgz archive, and then pecl install). See here.

So in order to make sure we test this pecl install way, in PR, I'd like to have a new entry point Kokoro config to run additional tests for PHP. This PR adds the config and entry point script for it. There's a corresponding internal CL to add the corresponding Kokoro config.

We already have a series of docker images here that will build the grpc PHP extension the pecl install way and test our grpc PHP extension against a variety of different PHP runtimes. So I'd like to hook those up to be run every pull request.

The concern (why that script was never hooked up before) was that right now we have 9 such PHP docker images and the script wasn't optimized much at all so the script takes an hour or so to run. In order to not draw too much resources to each PR test run, I only run 2 such docker images for now, which would finish around 5-10 minutes, and still should be able to catch a class of errors/breakages as the c-core is being updated.

In the future, there are probably a few things we can do to tools/internal_ci/linux/grpc_php_run_extratests.sh to run the rest of the docker images. And as a follow up I can see how to hook up the proper log file, etc.

@stanley-cheung stanley-cheung added lang/php infra/Kokoro release notes: no Indicates if PR should not be in release notes labels Jun 26, 2020
@stanley-cheung stanley-cheung force-pushed the php-additional-tests branch 7 times, most recently from 3ea9a54 to 3a81a81 Compare June 27, 2020 01:44
@stanley-cheung
Copy link
Copy Markdown
Contributor Author

stanley-cheung commented Jun 27, 2020

So this should be ready to be reviewed.

Here's an adhoc run (on master): https://g3c.corp.google.com/results/invocations/58b2b7d2-95ac-40e9-844d-68ba7204d96d/targets. All the log files seem to be hooked up properly now. This run currently fails with the expected error of, as seen in #23307:

/tmp/pear/temp/grpc/src/core/ext/filters/client_channel/xds/xds_api.h:31:23: fatal error: upb/def.hpp: No such file or directory
 #include "upb/def.hpp"

I also try to run this against the v1.30.x branch, which didn't have the upb change, so it passed:

Screen Shot 2020-06-26 at 9 30 02 PM

@stanley-cheung stanley-cheung force-pushed the php-additional-tests branch 3 times, most recently from b5c9c7f to 5ac186e Compare June 27, 2020 04:23
@jtattermusch
Copy link
Copy Markdown
Contributor

While I appreciate the attempt to add more test coverage for things that got broken in the past, I think we need a better and more organized approach than adding a new kokoro job each time something breaks (because the kokoro jobs get unmanageable pretty soon and we already have a lot of them - and every "special" job makes things harder to maintain).

@stanley-cheung
Copy link
Copy Markdown
Contributor Author

I also just realized that there are already tests executing this build path for PHP in the grpc_distribtests test suite, which is also only run on master: https://fusion.corp.google.com/projectanalysis/history/KOKORO/prod%3Agrpc%2Fcore%2Fmaster%2Flinux%2Fgrpc_distribtests.

This test suite has been broken since #21941 is merged. Looks like some Python distribtests are failing too.

@jtattermusch
Copy link
Copy Markdown
Contributor

So is this PR safe to close?

@stanley-cheung
Copy link
Copy Markdown
Contributor Author

Yes closing this.

@stanley-cheung stanley-cheung deleted the php-additional-tests branch July 14, 2020 21:22
markdroth added a commit to markdroth/grpc that referenced this pull request Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra/Kokoro lang/php release notes: no Indicates if PR should not be in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants