-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Allow user defined dev services for any image #42587
Conversation
Cool stuff! I'll have a close look at the PR when I'm back (in 10 days or so) |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor nitpicks, looks awesome! Great job
...ces/deployment/src/main/java/io/quarkus/devservices/deployment/any/DevServicesProcessor.java
Outdated
Show resolved
Hide resolved
...ervices/deployment/src/main/java/io/quarkus/devservices/deployment/any/DevServiceConfig.java
Outdated
Show resolved
Hide resolved
...ervices/deployment/src/main/java/io/quarkus/devservices/deployment/any/DevServiceConfig.java
Outdated
Show resolved
Hide resolved
...evservices/deployment/src/main/java/io/quarkus/devservices/deployment/any/WaitForConfig.java
Outdated
Show resolved
Hide resolved
We need documentation/guide for this new extension too |
This will be really useful, IMO. The code looks similar to the patterns I was able to work out for #42535, so to my knowledge, it's correct. :) We should include a reference to this in the dev services doc as a nice clean example, once it merges. I have a few little questions: Reuse + mapped portsI wonder if false is the right default for reuse, in the presence of mapped ports? I found live reload pretty intolerable with fixed ports and reuse false. But have a default change depending on other values is complex, so maybe we just document that people should turn reuse off if they set the port? But that leads me to ... DocumentationThere doesn't seem to be any. :) Reuse, againI noticed that a lot of the extensions which reused containers, like ElasticSearch, did really complex things about storing static variables and customising shutdown. I think part of that comes when the container is shared across several instances, so maybe we can ignore all that, but I did feel uneasy that my example service was so much simpler than the ones in the Quarkus codebase. The same worry applies here, and @gsmet did imply some of the complexity was necessary - but maybe it's just a question of articulating when the complexity is needed and when it's not. Extension nameMy main question is about the name. I wonder if users might think they need to add this extension, to get dev services? And I wonder if extension-developers might get confused about what the difference is between this and |
This comment has been minimized.
This comment has been minimized.
🎊 PR Preview 6b0a25d has been successfully built and deployed to https://quarkus-pr-main-42587-preview.surge.sh/version/main/guides/
|
agree with @holly-cummins there is a lot of code that checks for "shared" dev services etc and proper shutdown. I follow those patterns because a lot of the built in Quarkus Dev Services follow that pattern. |
Hi @holly-cummins , @gastaldi , @melloware . Thanks for your feedback. @gastaldi - I applied your suggestions. Reuse + mapped ports
Documentation Reuse, again Extension name |
Signed-off-by: Phillip Kruger <[email protected]>
95c58c4
to
b60ab6d
Compare
Status for workflow
|
Status | Name | Step | Failures | Logs | Raw logs | Build scan |
---|---|---|---|---|---|---|
✖ | Initial JDK 17 Build | Build |
Failures | Logs | Raw logs | 🔍 |
You can consult the Develocity build scans.
Failures
⚙️ Initial JDK 17 Build #
- Failing: extensions/agroal/runtime extensions/elasticsearch-rest-client-common/runtime extensions/infinispan-client/runtime and 16 more
! Skipped: devtools/bom-descriptor-json docs extensions/agroal/deployment and 324 more
📦 extensions/agroal/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-agroal: The deployment artifact io.quarkus:quarkus-agroal-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-agroal:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/elasticsearch-rest-client-common/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-elasticsearch-rest-client-common: The deployment artifact io.quarkus:quarkus-elasticsearch-rest-client-common-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-elasticsearch-rest-client-common:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/infinispan-client/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-infinispan-client: The deployment artifact io.quarkus:quarkus-infinispan-client-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-infinispan-client:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/kafka-client/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-kafka-client: The deployment artifact io.quarkus:quarkus-kafka-client-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-kafka-client:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/kubernetes-client/runtime-internal
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-kubernetes-client-internal: The deployment artifact io.quarkus:quarkus-kubernetes-client-internal-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-kubernetes-client-internal:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/mongodb-client/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-mongodb-client: The deployment artifact io.quarkus:quarkus-mongodb-client-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-mongodb-client:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/observability-devservices/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-observability-devservices: The deployment artifact io.quarkus:quarkus-observability-devservices-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-observability-devservices:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/oidc-client/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-oidc-client: The deployment artifact io.quarkus:quarkus-oidc-client-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-oidc-client:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/oidc/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-oidc: The deployment artifact io.quarkus:quarkus-oidc-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-oidc:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/reactive-datasource/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-reactive-datasource: The deployment artifact io.quarkus:quarkus-reactive-datasource-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-reactive-datasource:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/redis-client/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-redis-client: The deployment artifact io.quarkus:quarkus-redis-client-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-redis-client:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/schema-registry/apicurio/avro/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-apicurio-registry-avro: The deployment artifact io.quarkus:quarkus-apicurio-registry-avro-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-apicurio-registry-avro:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/schema-registry/apicurio/json-schema/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-apicurio-registry-json-schema: The deployment artifact io.quarkus:quarkus-apicurio-registry-json-schema-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-apicurio-registry-json-schema:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/schema-registry/confluent/avro/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-confluent-registry-avro: The deployment artifact io.quarkus:quarkus-confluent-registry-avro-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-confluent-registry-avro:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/schema-registry/confluent/json-schema/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-confluent-registry-json-schema: The deployment artifact io.quarkus:quarkus-confluent-registry-json-schema-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-confluent-registry-json-schema:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/smallrye-reactive-messaging-amqp/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-messaging-amqp: The deployment artifact io.quarkus:quarkus-messaging-amqp-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-messaging-amqp:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/smallrye-reactive-messaging-mqtt/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-messaging-mqtt: The deployment artifact io.quarkus:quarkus-messaging-mqtt-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-messaging-mqtt:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/smallrye-reactive-messaging-pulsar/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-messaging-pulsar: The deployment artifact io.quarkus:quarkus-messaging-pulsar-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-messaging-pulsar:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
📦 extensions/smallrye-reactive-messaging-rabbitmq/runtime
✖ Failed to execute goal io.quarkus:quarkus-extension-maven-plugin:999-SNAPSHOT:extension-descriptor (generate-extension-descriptor) on project quarkus-messaging-rabbitmq: The deployment artifact io.quarkus:quarkus-messaging-rabbitmq-deployment::jar depends on the following Quarkus extension deployment artifacts whose corresponding runtime artifacts were not found among the dependencies of io.quarkus:quarkus-messaging-rabbitmq:jar:999-SNAPSHOT: io.quarkus:quarkus-devservices-deployment::jar
Status for workflow
|
@phillip-kruger another optiion you might want to offer is
in Mailpit I have this Which hooks into TestContainers to print out the logs of the container you just wire it in like this. // forward the container logs
super.withLogConsumer(new JbossContainerLogConsumer(log).withPrefix(MailpitProcessor.FEATURE)); |
That is already there (I copied the one from Mailpit, thanks:) ) |
Nice! i don't know how i missed that! |
Closing here. Discussed with @cescoffier - we are going to take another approach. |
This PR propose an enhanced Dev Services to also allow user defined services for any container image. This is useful when users have multiple microservices of their own that can now be started up by a Quarkus app that depends on it.
Here is an example where I have an app with the following config to start up 3 dev services with my Quarkus app (nginx, httpd and hello-world):
The hello world and httpd is just there to test the minimal config needed and to test multiple user defined dev services.
If you look at the nginx config you can see this is a bit more configured, and actually serve static pages from /tmp/http. It also captures the log:
The user defined dev services will also show up in Dev UI:
For a user to use this, just add :