Skip to content

Conversation

@aureamunoz
Copy link
Member

@aureamunoz aureamunoz commented May 22, 2025

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.

quarkus_stork_build_flow

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

@quarkus-bot quarkus-bot bot added area/dependencies Pull requests that update a dependency file area/smallrye area/stork labels May 22, 2025
@quarkus-bot

This comment was marked as resolved.

@geoand
Copy link
Contributor

geoand commented May 23, 2025

Please update the title of the PR, thanks.

@aureamunoz aureamunoz changed the title first try Automatic Consul Registration for Quarkus Applications May 23, 2025
@aureamunoz aureamunoz force-pushed the automatic-registration-stork-944 branch 2 times, most recently from 8d6bfba to b597ab2 Compare June 4, 2025 12:37
@aureamunoz aureamunoz force-pushed the automatic-registration-stork-944 branch from b597ab2 to 48b702b Compare June 13, 2025 09:07
@aureamunoz aureamunoz force-pushed the automatic-registration-stork-944 branch 2 times, most recently from ef33fb6 to 716fe39 Compare July 24, 2025 13:46
@aureamunoz aureamunoz force-pushed the automatic-registration-stork-944 branch from 716fe39 to 5b76000 Compare July 29, 2025 10:55
@aureamunoz aureamunoz force-pushed the automatic-registration-stork-944 branch 5 times, most recently from 65d5227 to 7236cfd Compare August 5, 2025 09:22
@geoand
Copy link
Contributor

geoand commented Aug 5, 2025

Could we have the commits squashed when this is ready?

@aureamunoz
Copy link
Member Author

Could we have the commits squashed when this is ready?

Of course!

@aureamunoz aureamunoz force-pushed the automatic-registration-stork-944 branch from d21ac96 to 528a08d Compare August 6, 2025 08:15
@github-actions
Copy link

github-actions bot commented Aug 6, 2025

🎊 PR Preview 104e381 has been successfully built and deployed to https://quarkus-pr-main-47997-preview.surge.sh/version/main/guides/

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

@aureamunoz aureamunoz force-pushed the automatic-registration-stork-944 branch from 528a08d to dbc33ce Compare August 6, 2025 09:10
@aureamunoz aureamunoz marked this pull request as ready for review August 6, 2025 09:17
@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

@aureamunoz aureamunoz force-pushed the automatic-registration-stork-944 branch from dbc33ce to 5977548 Compare August 6, 2025 09:49
@quarkus-bot

This comment has been minimized.

@aureamunoz aureamunoz force-pushed the automatic-registration-stork-944 branch from f787ba9 to a1b48a2 Compare November 17, 2025 11:00
@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

@aureamunoz aureamunoz force-pushed the automatic-registration-stork-944 branch from a1b48a2 to 6da001a Compare November 21, 2025 14:44
@geoand geoand removed area/documentation area/smallrye area/dependencies Pull requests that update a dependency file area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure labels Nov 21, 2025
@geoand
Copy link
Contributor

geoand commented Nov 21, 2025

Can we drop the intermedia commit to Stork 2.7.6?

@aureamunoz aureamunoz force-pushed the automatic-registration-stork-944 branch from 6da001a to c297c6d Compare November 21, 2025 15:14
@quarkus-bot quarkus-bot bot added area/dependencies Pull requests that update a dependency file area/documentation area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure area/smallrye labels Nov 21, 2025
@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

@aureamunoz aureamunoz force-pushed the automatic-registration-stork-944 branch from c297c6d to 5b79fe3 Compare December 23, 2025 10:51
@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

@aureamunoz aureamunoz force-pushed the automatic-registration-stork-944 branch from 5b79fe3 to fb9c989 Compare December 23, 2025 14:38
@quarkus-bot

This comment has been minimized.

@aureamunoz aureamunoz force-pushed the automatic-registration-stork-944 branch from fb9c989 to c5618e9 Compare December 23, 2025 14:59
@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

Auri Munoz and others added 2 commits December 24, 2025 11:20
Put relocations in place
@aureamunoz aureamunoz force-pushed the automatic-registration-stork-944 branch from c5618e9 to afb1861 Compare December 24, 2025 10:36
@quarkus-bot
Copy link

quarkus-bot bot commented Dec 24, 2025

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit afb1861.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

@quarkus-bot
Copy link

quarkus-bot bot commented Dec 24, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit afb1861.

Failing Jobs

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/dependencies Pull requests that update a dependency file area/documentation area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure area/smallrye area/stork release/noteworthy-feature triage/flaky-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants