-
Notifications
You must be signed in to change notification settings - Fork 3k
Automatic Consul Registration for Quarkus Applications #47997
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
base: main
Are you sure you want to change the base?
Automatic Consul Registration for Quarkus Applications #47997
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
|
Please update the title of the PR, thanks. |
...e-stork/deployment/src/main/java/io/quarkus/stork/deployment/StorkRegistrationBuildItem.java
Outdated
Show resolved
Hide resolved
extensions/smallrye-stork/runtime/src/main/java/io/quarkus/stork/StorkConfigUtil.java
Outdated
Show resolved
Hide resolved
8d6bfba to
b597ab2
Compare
b597ab2 to
48b702b
Compare
ef33fb6 to
716fe39
Compare
716fe39 to
5b76000
Compare
65d5227 to
7236cfd
Compare
|
Could we have the commits squashed when this is ready? |
Of course! |
d21ac96 to
528a08d
Compare
|
🎊 PR Preview 104e381 has been successfully built and deployed to https://quarkus-pr-main-47997-preview.surge.sh/version/main/guides/
|
528a08d to
dbc33ce
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
dbc33ce to
5977548
Compare
This comment has been minimized.
This comment has been minimized.
f787ba9 to
a1b48a2
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
a1b48a2 to
6da001a
Compare
|
Can we drop the intermedia commit to Stork |
6da001a to
c297c6d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
c297c6d to
5b79fe3
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5b79fe3 to
fb9c989
Compare
This comment has been minimized.
This comment has been minimized.
fb9c989 to
c5618e9
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…egistrars (Consul, Eureka, Static)
Put relocations in place
c5618e9 to
afb1861
Compare
Status for workflow
|
Status for workflow
|
| Status | Name | Step | Failures | Logs | Raw logs | Build scan |
|---|---|---|---|---|---|---|
| ❌ | JVM Tests - JDK 17 | Build |
Failures | Logs | Raw logs | 🔍 |
| ❌ | JVM Tests - JDK 21 | Build |
Failures | Logs | Raw logs | 🔍 |
| ❌ | JVM Tests - JDK 21 Semeru | Build |
Failures | Logs | Raw logs | 🔍 |
| ❌ | JVM Tests - JDK 25 | Build |
Failures | Logs | Raw logs | 🔍 |
Full information is available in the Build summary check run.
You can consult the Develocity build scans.
Failures
⚙️ JVM Tests - JDK 17 #
- Failing: extensions/smallrye-stork/deployment
! Skipped: devtools/bom-descriptor-json extensions/grpc/deployment extensions/keycloak-admin-rest-client/deployment and 25 more📦 extensions/smallrye-stork/deployment
❌ io.quarkus.stork.HealthExtensionCheckTest. line 39 - History - More details - Source on GitHub
Details
java.util.concurrent.CompletionException: java.lang.RuntimeException: Unable to start Quarkus test resource class io.quarkus.stork.ConsulContainerWithFixedPortsTestResource
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1807)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Suppressed: org.opentest4j.AssertionFailedError: expected: <1> but was: <0>
⚙️ JVM Tests - JDK 21 #
- Failing: extensions/smallrye-stork/deployment
! Skipped: devtools/bom-descriptor-json extensions/grpc/deployment extensions/keycloak-admin-rest-client/deployment and 25 more📦 extensions/smallrye-stork/deployment
❌ io.quarkus.stork.HealthExtensionCheckTest. line 39 - History - More details - Source on GitHub
Details
java.util.concurrent.CompletionException: java.lang.RuntimeException: Unable to start Quarkus test resource class io.quarkus.stork.ConsulContainerWithFixedPortsTestResource
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1807)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Suppressed: org.opentest4j.AssertionFailedError: expected: <1> but was: <0>
⚙️ JVM Tests - JDK 21 Semeru #
- Failing: extensions/smallrye-stork/deployment
! Skipped: devtools/bom-descriptor-json extensions/grpc/deployment extensions/keycloak-admin-rest-client/deployment and 25 more📦 extensions/smallrye-stork/deployment
❌ io.quarkus.stork.HealthExtensionCheckTest. line 39 - History - More details - Source on GitHub
Details
java.util.concurrent.CompletionException: java.lang.RuntimeException: Unable to start Quarkus test resource class io.quarkus.stork.ConsulContainerWithFixedPortsTestResource
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1807)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1595)
Suppressed: org.opentest4j.AssertionFailedError: expected: <1> but was: <0>
⚙️ JVM Tests - JDK 25 #
- Failing: extensions/smallrye-stork/deployment
! Skipped: devtools/bom-descriptor-json extensions/grpc/deployment extensions/keycloak-admin-rest-client/deployment and 25 more📦 extensions/smallrye-stork/deployment
❌ io.quarkus.stork.HealthExtensionCheckTest. line 39 - History - More details - Source on GitHub
Details
java.util.concurrent.CompletionException: java.lang.RuntimeException: Unable to start Quarkus test resource class io.quarkus.stork.ConsulContainerWithFixedPortsTestResource
at java.base/java.util.concurrent.CompletableFuture.wrapInCompletionException(CompletableFuture.java:323)
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:359)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:364)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1828)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
at java.base/java.lang.Thread.run(Thread.java:1474)
Flaky tests - Develocity
⚙️ JVM Integration Tests - JDK 25
📦 integration-tests/virtual-threads/grpc-virtual-threads
❌ io.quarkus.grpc.example.streaming.VirtualThreadTest.testGrpcClient - History
1 expectation failed. Expected status code <200> but was <500>.-java.lang.AssertionError
Details
java.lang.AssertionError:
1 expectation failed.
Expected status code <200> but was <500>.
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:483)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:73)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:60)

This PR introduces automatic service registration support for Quarkus applications using built-in Stork service registrars (consul, eureka, static list). When one of these registrars is present in the classpath, the application will automatically register itself at runtime, even with minimal or no configuration.
The following diagram illustrates the build flow for the automatic Consul service registration feature in the Quarkus SmallRye Stork extension.
It shows how build steps are ordered using custom BuildItems: first the automatic registration configuration is prepared, then Stork is initialized, and finally the service instance is registered in the backend.
This feature simplifies the developer experience without requiring manual registration logic.
A new guide has been added to explain how automatic registration works and how to customize it.
Also, two quickstarts demonstrating different use cases, including implicit and explicit configurations.
This feature is designed to be non-intrusive and backward compatible. Custom service registrars must still be registered programmatically.
Related to Stork#944