Commit Graph

81 Commits

Author SHA1 Message Date
Stanley Cheung 2c574ed771
[PHP tests] Remove non-standard PHP memory leak test (#34257)
This test is not giving us good signals while adding some long term
maintenance cost. The way the test is set up and run was not standard.
There are other sanitizer tests to test for memory leaks.
2023-09-06 10:12:37 +02: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
AJ Heller 7955bfaa4b
[build] Ignore possibly-leaked memory in PHP Valgrind tests (#32917)
Valgrind will now only fail the build on definite leaks, not "possible"
leaks. A trivial example that fails the PHP valgrind test as it is
configured today:

```
namespace {
grpc_core::NoDestruct<grpc_core::BackOff> g_backoff{
    grpc_core::BackOff::Options()};
}  // namespace
```

Valgrind detects a possible leak because BackOff contains an
absl::BitGen, which calls `new` through a chain of ownership
indirection. This is what Valgrind calls an [interior
pointer](https://valgrind.org/docs/manual/mc-manual.html#mc-manual.options:~:text=%22Possibly%20lost%22.%20This,have%20interior%2Dpointers.).
Our CI will no longer fail them
2023-04-21 18:16:17 -07:00
Stanley Cheung fa42edef83
Update PHP docker images PHP versions (#31779) 2022-12-07 13:20:48 -08:00
Brett McBride 14d1403717
fixing php 8.2 deprecations (#30997)
* fixing php8.2 test deprecations
fixes various dynamic property deprecations in the tests themselves

* fixing phpunit9 deprecation
at() matcher is deprecated, to be removed in phpunit 10. switch to withConsecutive

* adding channel property to Grpc\Call
this resolves "Creation of dynamic property Grpc\Call::$channel is deprecated" in php 8.2

* skip implicit cast test in 8.1+
implicit casting from float to int is deprecated from 8.1, so users would receive a deprecation warning if trying to do this

* php8.2rc4
2022-10-26 13:38:23 -07:00
AJ Heller 2ee2c91c92
Reland x2: Make GetDefaultEventEngine return a shared_ptr (#30619)
* Reland x2: Make GetDefaultEventEngine return a shared_ptr

* remove thread leak from NativeDNSResolver

This is not going to work for resolvers that support cancellation.

* give resolvers bounded lifetimes

Some resolver own EventEngines. EventEngines cannot run off the end of
the process since they have unjoined threads (problematic in a small set
of environments). This gives resolvers bounded lifetimes, and allows
replacement of resolvers without ASAN issues of deleting resolvers in
active use (occurs in tests).

* fix

* fix windows

* fix surface init test

* fix

* sanitize

* use after move

* the test must wait for the callback to be destroyed

* windows fix: delete the resolver on iomgr shutdown, not before

* Make TimerManager threads non-joinable

On gRPC shutdown, any unjoined TimerManager threads will cause TSAN to
detect thread leaks. This fix resolves issues I saw in end2end test
shutdown in another PR, where a single timer manager thread was always
alive after the test ended.

The long-term solution is to integrate the new ThreadPool here, but this
unblocks me for now.

* backport fix

* fix

* shared_ptr<EventEngine> in EventEngine benchmarks
2022-09-28 08:39:56 -07:00
AJ Heller d025c1732f
Revert "Reland: Make GetDefaultEventEngine return a shared_ptr (#30563)" (#30573)
This reverts commit ee7c0a8e4c.
2022-08-12 14:31:56 -07:00
AJ Heller ee7c0a8e4c
Reland: Make GetDefaultEventEngine return a shared_ptr (#30563)
* Reland: "Make GetDefaultEventEngine return a shared_ptr (#30280)"

This reverts commit 45959e7cc1.

* Attempted fix with NoDestruct

* Not a process-wide singleton for the type. Just a NonDestruct

* fix
2022-08-12 08:09:31 -07:00
AJ Heller 45959e7cc1
Revert "Make GetDefaultEventEngine return a shared_ptr (#30280)" (#30558)
This reverts commit 4df74f2b4c.
2022-08-10 18:28:30 -07:00
AJ Heller 4df74f2b4c
Make GetDefaultEventEngine return a shared_ptr (#30280)
This works around valgrind memory leaks by giving EventEngines a fixed
lifetime. We eventually want ref-counted EventEngines internally, so this is
a step in the right direction as well.
2022-08-10 11:32:09 -07:00
Jan Tattermusch 519ae7d795
unbreak proto regenerate scripts for C#, ruby, php by allowing protobuf well known types (#29330)
* unbreak proto regenerate scripts for C#, ruby, php by allowing protobuf well known types

* regenerate C# and ruby protos
2022-04-07 09:14:05 +02:00
Jan Tattermusch 8cfff25907
disable PHP valgrind memoryleak test on arm64 (#29099) 2022-03-15 16:58:35 +01:00
Lidi Zheng 6f48ba4d94
Fix the timeout flag name in PHP's Python xds_manager (#27206) 2021-08-31 12:18:00 -07:00
Hannah Shi 7197ce64ee
PHP: php server commit 6/n, add php server interop test (#26202)
* add php server interop test

* fix CI failure
2021-07-01 10:55:52 -07:00
Hannah Shi bba425fa11
add php math_server (#26201) 2021-05-09 23:10:14 -07:00
Hannah Shi 6769ce39f4
PHP: php server commit 4/n, add RpcServer, generator and server examples (#25640)
* add RpcServer and generator
add server examples: greeter and route guide

* php server generator xds client

* add generated stub

* fix clang format fail
2021-05-01 01:07:44 -07:00
Stanley Cheung e8a904368b
PHP: enable fault_injection xds interop test case (#25943)
* PHP: enable fault_injection xds interop test case

* sanity check yaph_code.sh

* some mysterious SIGTERM is being observed

* Remove adhoc test cfg
2021-04-09 15:17:23 -07:00
Stanley Cheung c0a78774f8
PHP: allow xDS interop client to start RPCs asynchronously (#25696)
* PHP: allow xDS interop client to start RPCs asynchronously

* Address review comments

* Remove adhoc test config
2021-04-08 20:02:04 -07:00
Hannah Shi 89d28e7dc9 test both insecure&secure channel 2021-02-05 18:49:40 +00:00
root 1cf42033b7 add php8 test docker 2020-11-19 06:35:18 +00:00
root 840e67984a del several docker related files 2020-09-30 22:11:40 +00:00
root 8c6be42148 add i386 docker and more tests for timeval 2020-09-09 10:51:28 +00:00
Hannah Shi 1e415e24d1 replace sed with awk, since sed in mac is too old 2020-07-28 22:17:32 +00:00
Hannah Shi d3c1cbf4cb replace gawk with awk, so as not to introduce an extra dependency 2020-07-24 19:02:46 +00:00
Hannah Shi c69c06b8d6 generate api reference documents by doxygen 2020-07-19 17:52:59 +00:00
Stanley Cheung 3614b0088c PHP xDS Interop test client 2020-05-27 21:11:49 -07:00
Hannah Shi 290d187f60 ignore-valgrind-undef-errors from php7.3 2020-05-08 19:13:55 +00:00
Jan Tattermusch 710be13856 refactor generate_proto_php.sh 2020-04-22 16:35:13 +02:00
Stanley Cheung c07ddb4504
Merge pull request #22654 from jeffreyqw/dockerfile/centos7
PHP:Dockerfile grpc-centos
2020-04-21 15:21:13 -07:00
jeffreyqw b751f8534a add run centos7 image 2020-04-21 13:35:33 -07:00
Jan Tattermusch 5156db53db revert some generate_proto_php.sh changes, add TODOs 2020-04-18 19:04:37 +02:00
Jan Tattermusch 6ffa02a389 do not eat errors when generating protos 2020-04-18 18:43:55 +02:00
Jan Tattermusch 5baf296292 add link to Protobuf PHP empty.proto issue 2020-04-17 13:27:21 +02:00
Jan Tattermusch 0432f7f6ca use bazel-built protoc and plugin for generate_proto_*.sh scripts
modify scripts
2020-04-17 13:13:36 +02:00
jeffreyqw b26724f327 PHP:Dockerfile grpc-centos
Update Docker image: Centos7 with GCC5, PHP7.2
2020-04-13 20:14:12 -07:00
Stanley Cheung f47d14160a PHP: add various scenarios to test PECL extension 2019-10-01 14:39:48 -07:00
Hannah Shi f0fb27e8cd add if statement around PersistentChannelTests. run the tests by default 2019-07-25 16:11:01 -07:00
Stanley Cheung b873516e6a PHP: fix windows build 2019-04-05 15:10:08 -07:00
Jerry 28145c30b7 removed tailing whitespace and clean MemoryLeakTest 2019-02-13 10:07:01 -08:00
Jerry 63544ea3ae memory leak test for php 2019-02-12 15:45:26 -08:00
Vijay Pai b099ca217e
Revert "Memory leak test for PHP unit tests" 2019-01-28 23:09:49 -08:00
Jerry bf098ed49b remove exit status 2019-01-25 15:13:40 -08:00
Jerry d098a0dabc fixed small issue in run_tests.sh and remove duplicate in CallTest.php 2019-01-25 12:12:39 -08:00
Jerry 4351ca35ee memory leak test for php 2019-01-17 14:36:15 -08:00
ZhouyihaiDing 9ef881e1ac PHP: chang shared channel behavior
PHP: add persistent list upper bounnd check

change upper bound from global to each target

add ref/unreef; Only delete ref_count=0; make the code cleaner

persistent map update after review

u2nd pdate after the review
2018-05-12 15:00:18 -07:00
Matt Kwong 84d6046569 Set DYLD_LIBRARY_PATH to be based off of 2018-04-13 15:40:44 -07:00
Jan Tattermusch 7897ae9308 auto-fix most of licenses 2017-06-08 11:22:41 +02:00
Stanley Cheung 50c878088a Use tmp file instead of writing to current directory 2017-01-12 15:49:56 -08:00
Stanley Cheung 122c687d61 Fix various PHP bugs 2017-01-11 19:36:32 -08:00
Stanley Cheung 39b2e5bec6 PHP Proto3: update tests and README 2016-09-29 17:26:40 -07:00