Skip to content

Conversation

stanley-cheung
Copy link
Collaborator

author:@Jennnnny

@stanley-cheung stanley-cheung requested a review from Jennnnny May 12, 2021 21:54
Copy link
Collaborator

@Jennnnny Jennnnny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generated code with non-closure mode still has MethodInfo so it will definitely break some users.... I think we should update grpc_generator.cc before merging as well(I have a cl for review in critique).

@stanley-cheung
Copy link
Collaborator Author

Sounds good. Part of the reason I want to create this PR is to make sure there is no outstanding unmerged (to google3) changes in grpc_generator.cc. Looks like there's none. So we can safely update grpc_generator.cc in google3 now.

@stanley-cheung
Copy link
Collaborator Author

stanley-cheung commented May 13, 2021

I patched in the grpc_generator.cc change to get rid of some errors related to the generated code still having reference to MethodInfo. Now those errors are gone.

But now bazel test //javascript/net/grpc/web/... failed but I couldn't find any meaningful error log even when running the test locally. They just failed

Executing tests from //javascript/net/grpc/web:grpcwebclientbase_test
-----------------------------------------------------------------------------
Listening http://localhost:46452/index.html
Serving /index.html
Serving /filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js
Serving /filez/io_bazel_rules_closure/closure/testing/phantomjs_jsunit_runner.js
-> 00:57:40.053 : Starting tests: Untitled Test Case
-> 00:57:40.053 : Running test: testDeadline
-> $$JSCompiler_prototypeAlias$$$$getStreamingResponseHeader$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:2808:48
-> http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:2363:101
$JSCompiler_StaticMethods_fireListeners$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:1803:59
$JSCompiler_StaticMethods_goog_events_EventTarget_prototype$dispatchEvent$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:1785:111
$JSCompiler_StaticMethods_simulateReadyStateChange$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:2726:157
$$JSCompiler_prototypeAlias$$$$goog_net_XhrIo_prototype$send$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:2713:55
$JSCompiler_StaticMethods_startStream_$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:2618:68
http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:2520:52
$$module$contents$grpc$web$GrpcWebClientBase_GrpcWebClientBase$$$$$rpcCall$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:2521:20
http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:4232:37
$PolyfillPromise$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:225:18
http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:4231:200
$JSCompiler_StaticMethods_nextStep_$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:124:99
$this$next$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:146:418
http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:172:56
$PolyfillPromise$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:225:18
$$jscomp$asyncExecutePromiseGenerator$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:168:21
$$jscomp$asyncExecutePromiseGeneratorProgram$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:176:49
testDeadline@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:4227:56
[native code]
$$JSCompiler_prototypeAlias$$$$invokeFunction_$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:3676:50
$$JSCompiler_prototypeAlias$$$$safeRunTest_$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:3663:32
$$JSCompiler_prototypeAlias$$$$safeRunTest_$$@[native code]
$goog$testing$Continuation_$run$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:3963:96
http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:3595:324
[native code]
$goog$testing$Continuation_$run$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:3963:96
http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:3594:38
$goog$Promise$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:1224:32
$JSCompiler_StaticMethods_runTestsReturningPromise$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:3593:22
$JSCompiler_StaticMethods_goog_testing_TestRunner_prototype$execute$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:4041:184
http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:4185:78
-> 00:57:40.059 : testDeadline : FAILED

Here's roughly how to reproduce locally:

$ <patch in this PR>
$ docker-compose build common prereqs
$ docker run -it --rm grpcweb/prereqs /bin/bash
$ <now inside the docker image> bazel test --cache_test_results=no //javascript/net/grpc/web/...

@Jennnnny
Copy link
Collaborator

I patched in the grpc_generator.cc change to get rid of some errors related to the generated code still having reference to MethodInfo. Now those errors are gone.

But now bazel test //javascript/net/grpc/web/... failed but I couldn't find any meaningful error log even when running the test locally. They just failed

Executing tests from //javascript/net/grpc/web:grpcwebclientbase_test
-----------------------------------------------------------------------------
Listening http://localhost:46452/index.html
Serving /index.html
Serving /filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js
Serving /filez/io_bazel_rules_closure/closure/testing/phantomjs_jsunit_runner.js
-> 00:57:40.053 : Starting tests: Untitled Test Case
-> 00:57:40.053 : Running test: testDeadline
-> $$JSCompiler_prototypeAlias$$$$getStreamingResponseHeader$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:2808:48
-> http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:2363:101
$JSCompiler_StaticMethods_fireListeners$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:1803:59
$JSCompiler_StaticMethods_goog_events_EventTarget_prototype$dispatchEvent$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:1785:111
$JSCompiler_StaticMethods_simulateReadyStateChange$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:2726:157
$$JSCompiler_prototypeAlias$$$$goog_net_XhrIo_prototype$send$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:2713:55
$JSCompiler_StaticMethods_startStream_$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:2618:68
http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:2520:52
$$module$contents$grpc$web$GrpcWebClientBase_GrpcWebClientBase$$$$$rpcCall$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:2521:20
http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:4232:37
$PolyfillPromise$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:225:18
http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:4231:200
$JSCompiler_StaticMethods_nextStep_$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:124:99
$this$next$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:146:418
http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:172:56
$PolyfillPromise$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:225:18
$$jscomp$asyncExecutePromiseGenerator$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:168:21
$$jscomp$asyncExecutePromiseGeneratorProgram$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:176:49
testDeadline@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:4227:56
[native code]
$$JSCompiler_prototypeAlias$$$$invokeFunction_$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:3676:50
$$JSCompiler_prototypeAlias$$$$safeRunTest_$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:3663:32
$$JSCompiler_prototypeAlias$$$$safeRunTest_$$@[native code]
$goog$testing$Continuation_$run$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:3963:96
http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:3595:324
[native code]
$goog$testing$Continuation_$run$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:3963:96
http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:3594:38
$goog$Promise$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:1224:32
$JSCompiler_StaticMethods_runTestsReturningPromise$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:3593:22
$JSCompiler_StaticMethods_goog_testing_TestRunner_prototype$execute$$@http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:4041:184
http://localhost:46452/filez/com_github_grpc_grpc_web/javascript/net/grpc/web/grpcwebclientbase_test_bin.js:4185:78
-> 00:57:40.059 : testDeadline : FAILED

Here's roughly how to reproduce locally:

$ <patch in this PR>
$ docker-compose build common prereqs
$ docker run -it --rm grpcweb/prereqs /bin/bash
$ <now inside the docker image> bazel test --cache_test_results=no //javascript/net/grpc/web/...

Oh man..I guess I know why this fails. I submitted a cl/371207002 internally to fix the closure testing xhrIo..seems like it is not updated in open source? I saw the first line of the error message is "getStreamingResponseHeader, which is what I fixed in closure lib.

@stanley-cheung
Copy link
Collaborator Author

I see. Our grpc-web third_party/closure-library link is currently at v20201102 released on Nov 17, 2020. Your fix was merged late Apr 2021 so we should watch out for the next 2021 May release to see if your fix is included in there.

@stanley-cheung
Copy link
Collaborator Author

This is getting out of hand. will start to bisect from an older state to see if we can isolate which internal CL causes these errors.

@stanley-cheung stanley-cheung deleted the internal-code-sync branch August 3, 2021 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants