Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change auto configs to use @Configuration(proxyBeanMethods = false) #383

Merged
merged 2 commits into from Jul 20, 2020

Conversation

ST-DDT
Copy link
Collaborator

@ST-DDT ST-DDT commented Jul 15, 2020

This should improve compatibility with GraalVM.

Fixes #379

@lthd92 Can you please verify whether this is all that needs to be done for GraalVM support?

This should improve compatibility with GraalVM. Fixes #379
@ST-DDT ST-DDT added enhancement A feature request or improvement incompatibility Incompatibilities between components or versions labels Jul 15, 2020
@ST-DDT ST-DDT self-assigned this Jul 15, 2020
@ST-DDT ST-DDT marked this pull request as draft July 15, 2020 23:01
@ST-DDT
Copy link
Collaborator Author

ST-DDT commented Jul 15, 2020

  • TODO: Check for this.beanMethodCall()

@nickjn92
Copy link

This should improve compatibility with GraalVM.

Fixes #379

@lthd92 Can you please verify whether this is all that needs to be done for GraalVM support?

Will verify it later today 👍

@ST-DDT ST-DDT marked this pull request as ready for review July 16, 2020 16:02
@nickjn92
Copy link

nickjn92 commented Jul 16, 2020

This should improve compatibility with GraalVM.
Fixes #379
@lthd92 Can you please verify whether this is all that needs to be done for GraalVM support?

Will verify it later today +1

Successfully builds and start a native image built on a ubuntu system.

Instead of a 2-3 second startup time we now have:

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                        

2020-07-16 23:24:11.097  INFO 2134349 --- [           main] .l.GraalGrpcSpringBootStarterApplication : Starting GraalGrpcSpringBootStarterApplication on x with PID 2134349 (/home/x/git/graalvm-grpc-starter/build/native/grpc-graal started by x in /home/x/git/graalvm-grpc-starter/build/native)
2020-07-16 23:24:11.097  INFO 2134349 --- [           main] .l.GraalGrpcSpringBootStarterApplication : No active profile set, falling back to default profiles: default
2020-07-16 23:24:11.193  INFO 2134349 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 2 endpoint(s) beneath base path '/actuator'
2020-07-16 23:24:11.198  WARN 2134349 --- [           main] i.m.c.i.binder.jvm.JvmGcMetrics          : GC notifications will not be available because MemoryPoolMXBeans are not provided by the JVM
2020-07-16 23:24:11.208  INFO 2134349 --- [           main] o.s.b.web.embedded.netty.NettyWebServer  : Netty started on port(s): 8080
2020-07-16 23:24:11.210  INFO 2134349 --- [           main] .l.GraalGrpcSpringBootStarterApplication : Started GraalGrpcSpringBootStarterApplication in 0.12 seconds (JVM running for 0.123)

@nickjn92
Copy link

nickjn92 commented Jul 16, 2020

This should improve compatibility with GraalVM.
Fixes #379
@lthd92 Can you please verify whether this is all that needs to be done for GraalVM support?

Will verify it later today +1

Successfully builds and start a native image built on a ubuntu system.

Instead of a 2-3 second startup time we now have:

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                        

2020-07-16 23:24:11.097  INFO 2134349 --- [           main] .l.GraalGrpcSpringBootStarterApplication : Starting GraalGrpcSpringBootStarterApplication on x with PID 2134349 (/home/x/git/graalvm-grpc-starter/build/native/grpc-graal started by x in /home/x/git/graalvm-grpc-starter/build/native)
2020-07-16 23:24:11.097  INFO 2134349 --- [           main] .l.GraalGrpcSpringBootStarterApplication : No active profile set, falling back to default profiles: default
2020-07-16 23:24:11.193  INFO 2134349 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 2 endpoint(s) beneath base path '/actuator'
2020-07-16 23:24:11.198  WARN 2134349 --- [           main] i.m.c.i.binder.jvm.JvmGcMetrics          : GC notifications will not be available because MemoryPoolMXBeans are not provided by the JVM
2020-07-16 23:24:11.208  INFO 2134349 --- [           main] o.s.b.web.embedded.netty.NettyWebServer  : Netty started on port(s): 8080
2020-07-16 23:24:11.210  INFO 2134349 --- [           main] .l.GraalGrpcSpringBootStarterApplication : Started GraalGrpcSpringBootStarterApplication in 0.12 seconds (JVM running for 0.123)

However connection to the server doesnt seem to work. Getting

"error": "14 UNAVAILABLE: failed to connect to all addresses"

The actuator endpoints work fine which are running on netty 8080 but the actual grpc server which runs on 6080 is unable to handle receive requests

@ST-DDT
Copy link
Collaborator Author

ST-DDT commented Jul 16, 2020

Lets get this merged, as it improves startup times (a tiny bit) even without GraalVM native image.


I assume that this is caused by some missing configurations (reflection or alike).

The server doesn't show any logs related to the grpc server startup

gRPC Server started, listening on address: <address>, port: <port>

Maybe you have to use grpc-netty instead of grpc-netty-shaded?
The shaded dependency still refers to the non-shaded class names in the native-image configuration:

Args = --initialize-at-run-time=io.netty.buffer.PooledByteBufAllocator,io.netty.buffer.ByteBufAllocator[...]

I'll have a look at it later, when I finished some of the other issues for the current milestone.

@ST-DDT ST-DDT requested a review from yidongnan July 16, 2020 21:44
@ST-DDT ST-DDT added this to the 2.10.0 milestone Jul 16, 2020
Copy link
Collaborator

@yidongnan yidongnan left a comment

Choose a reason for hiding this comment

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

LGTM

@yidongnan yidongnan merged commit 833058b into master Jul 20, 2020
@yidongnan yidongnan deleted the feature/graalvm/part1 branch July 20, 2020 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature request or improvement incompatibility Incompatibilities between components or versions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[GraalVM Support] Disabling CGLIB proxies for autoconfiguration
3 participants