Skip to content

Add containerId to DevServicesContent #48964

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Jul 17, 2025

For example, for mongo the property could look like:

quarkus.devservices.mongodb-client.containerId=someId

This info could then be used by tests that need to actually interact with the container itself in some way.

For example, for mongo the property could look like:

quarkus.devservices.mongodb-client.containerId=someId

This info could then be used by tests that need to actually
interact with the container itself in some way.

- Relates to: quarkusio#48963
@holly-cummins
Copy link
Contributor

This may need an update to make sure containerId is populated for services on the new model (which, if so, we should do anyway, because otherwise it's a bug).

@geoand
Copy link
Contributor Author

geoand commented Jul 17, 2025

I actually realised that this solution only work with @QuarkusIntegrationTest which is definitely not great...

@geoand
Copy link
Contributor Author

geoand commented Jul 17, 2025

Looking at DevServiceDescriptionBuildItem, the ContainerInfo has all the info we need... @ozangunalp I think it makes sense to add that to DevServicesContext, WDYT?

It seems doable but would require touching plenty of things which I don't want to do while you and @holly-cummins are on the refactoring journey.

@ozangunalp
Copy link
Contributor

Looking at DevServiceDescriptionBuildItem, the ContainerInfo has all the info we need... @ozangunalp I think it makes sense to add that to DevServicesContext, WDYT?

I agree, it seems reasonable to expose the container details through DevServicesContext. But let's wait for the advancement of WG - Dev Services Lifecycle.

I am kind of against exposing the containerId as config property. The info may be needed in tests or exposed ports can be mapped to config properties. but DevServicesAware implementors should do it.

@geoand
Copy link
Contributor Author

geoand commented Jul 17, 2025

Agreed to keep this on ice for now

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

Successfully merging this pull request may close these issues.

3 participants