Skip to content

all: let interop test use shaded dependency correctly#6780

Merged
dapengzhang0 merged 5 commits intogrpc:masterfrom
dapengzhang0:interop-shaded
Feb 28, 2020
Merged

all: let interop test use shaded dependency correctly#6780
dapengzhang0 merged 5 commits intogrpc:masterfrom
dapengzhang0:interop-shaded

Conversation

@dapengzhang0
Copy link
Copy Markdown
Contributor

@dapengzhang0 dapengzhang0 commented Feb 27, 2020

Update: This PR was reverted by #6791

@dapengzhang0 dapengzhang0 requested a review from ejona86 February 27, 2020 22:11
project(':grpc-testing-proto'),
project(':grpc-testing'),
libraries.truth
shadow project(':grpc-core')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I figured out why this is here: it is necessary for the pom to include a dependency on grpc-core.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I see. Changed back.

xds/build.gradle Outdated

compileOnly libraries.javax_annotation
compileOnly libraries.javax_annotation,
// The unshaded netty_epoll should not be a transitive dependency.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This comment sort of just reexplains what a compileOnly dependency is. Instead how about:

      // At runtime use the epoll included in grpc-netty-shaded

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@dapengzhang0
Copy link
Copy Markdown
Contributor Author

gae-interop-testing was failing https://source.cloud.google.com/results/invocations/24432bbe-0f09-4149-89dd-7190c766cf73/targets
because the test uses ManagedChannelBuilder and then NettyChannelBuilder

assertTrue(builder instanceof NettyChannelBuilder);
((NettyChannelBuilder) builder).flowControlWindow(65 * 1024);

@dapengzhang0 dapengzhang0 added kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run and removed kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run labels Feb 28, 2020
@dapengzhang0 dapengzhang0 merged commit c5f48b8 into grpc:master Feb 28, 2020
@dapengzhang0 dapengzhang0 deleted the interop-shaded branch February 28, 2020 18:04
@ejona86
Copy link
Copy Markdown
Member

ejona86 commented Mar 2, 2020

This PR caused a regression in the ALTS tests. https://source.cloud.google.com/results/invocations/691d9965-fea1-487d-b606-352a5234039e/targets/grpc%2Fcore%2Fpull_request%2Flinux%2Fgrpc_interop_toprod/log

2020-03-01 20:02:12,491 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang3/SystemUtils
	at io.grpc.alts.CheckGcpEnvironment.isRunningOnGcp(CheckGcpEnvironment.java:69)
	at io.grpc.alts.CheckGcpEnvironment.isOnGcp(CheckGcpEnvironment.java:44)
	at io.grpc.alts.ComputeEngineChannelBuilder.<init>(ComputeEngineChannelBuilder.java:62)
	at io.grpc.alts.ComputeEngineChannelBuilder.forTarget(ComputeEngineChannelBuilder.java:72)
	at io.grpc.alts.ComputeEngineChannelBuilder.forAddress(ComputeEngineChannelBuilder.java:77)
	at io.grpc.testing.integration.TestServiceClient$Tester.createChannel(TestServiceClient.java:399)
	at io.grpc.testing.integration.AbstractInteropTest.setUp(AbstractInteropTest.java:309)
	at io.grpc.testing.integration.TestServiceClient.setUp(TestServiceClient.java:198)
	at io.grpc.testing.integration.TestServiceClient.main(TestServiceClient.java:56)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.SystemUtils
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 9 more

It can be trivially reproduced by running on your machine (no need for any other setup):

$ ./build/install/grpc-interop-testing/bin/test-client --use_alts=true

@dapengzhang0, we should probably revert this change while we try to figure out the solution.

@vjpai
Copy link
Copy Markdown

vjpai commented Mar 2, 2020

Cc: @jtattermusch

dapengzhang0 added a commit to dapengzhang0/grpc-java that referenced this pull request Mar 2, 2020
dapengzhang0 added a commit that referenced this pull request Mar 2, 2020
This reverts commit c5f48b8.  (#6780)

Revert because caused a regression in the ALTS tests. https://source.cloud.google.com/results/invocations/691d9965-fea1-487d-b606-352a5234039e/targets/grpc%2Fcore%2Fpull_request%2Flinux%2Fgrpc_interop_toprod/log

2020-03-01 20:02:12,491 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang3/SystemUtils
at io.grpc.alts.CheckGcpEnvironment.isRunningOnGcp(CheckGcpEnvironment.java:69)
at io.grpc.alts.CheckGcpEnvironment.isOnGcp(CheckGcpEnvironment.java:44)
at io.grpc.alts.ComputeEngineChannelBuilder.(ComputeEngineChannelBuilder.java:62)
at io.grpc.alts.ComputeEngineChannelBuilder.forTarget(ComputeEngineChannelBuilder.java:72)
at io.grpc.alts.ComputeEngineChannelBuilder.forAddress(ComputeEngineChannelBuilder.java:77)
at io.grpc.testing.integration.TestServiceClient$Tester.createChannel(TestServiceClient.java:399)
at io.grpc.testing.integration.AbstractInteropTest.setUp(AbstractInteropTest.java:309)
at io.grpc.testing.integration.TestServiceClient.setUp(TestServiceClient.java:198)
at io.grpc.testing.integration.TestServiceClient.main(TestServiceClient.java:56)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.SystemUtils
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 9 more
dapengzhang0 added a commit to dapengzhang0/grpc-java that referenced this pull request Mar 2, 2020
@dapengzhang0
Copy link
Copy Markdown
Contributor Author

Trying to fix the issue of missing transitive dependencies for shadow configuration in #6792.

dfawley pushed a commit to dfawley/grpc-java that referenced this pull request Jan 15, 2021
dfawley pushed a commit to dfawley/grpc-java that referenced this pull request Jan 15, 2021
)"

This reverts commit c5f48b8.  (grpc#6780)

Revert because caused a regression in the ALTS tests. https://source.cloud.google.com/results/invocations/691d9965-fea1-487d-b606-352a5234039e/targets/grpc%2Fcore%2Fpull_request%2Flinux%2Fgrpc_interop_toprod/log

2020-03-01 20:02:12,491 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang3/SystemUtils
at io.grpc.alts.CheckGcpEnvironment.isRunningOnGcp(CheckGcpEnvironment.java:69)
at io.grpc.alts.CheckGcpEnvironment.isOnGcp(CheckGcpEnvironment.java:44)
at io.grpc.alts.ComputeEngineChannelBuilder.(ComputeEngineChannelBuilder.java:62)
at io.grpc.alts.ComputeEngineChannelBuilder.forTarget(ComputeEngineChannelBuilder.java:72)
at io.grpc.alts.ComputeEngineChannelBuilder.forAddress(ComputeEngineChannelBuilder.java:77)
at io.grpc.testing.integration.TestServiceClient$Tester.createChannel(TestServiceClient.java:399)
at io.grpc.testing.integration.AbstractInteropTest.setUp(AbstractInteropTest.java:309)
at io.grpc.testing.integration.TestServiceClient.setUp(TestServiceClient.java:198)
at io.grpc.testing.integration.TestServiceClient.main(TestServiceClient.java:56)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.SystemUtils
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 9 more
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants