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

Management interface - URLs are resolved at build time with runtime config #44644

Open
gsmet opened this issue Nov 22, 2024 · 3 comments
Open

Comments

@gsmet
Copy link
Member

gsmet commented Nov 22, 2024

NonApplicationRootPathBuildItem#getManagementUrlPrefix() resolves non-application URLs using runtime config.

While it's not that big of a deal when the result of this call is used in dev mode, it becomes a problem when some of these paths (well, they are actually URLs when the management interface is enabled) are used at runtime such as when the Health UI is made available at runtime.

I think we should avoid using the host when configuring the Health UI as there's a good chance you won't use the interface address to get access to it. I will try to address that in a PR.
But that doesn't solve the more general problem we have here.

Noticed while trying to fix NonApplicationRootPathBuildItem#getManagementUrlPrefix() and getting NonApplicationRootPathBuildItemTest to fail.

It can be very easily reproducer with the following project:

management-url-issue.zip

Then:

mvn clean package
java -Dquarkus.management.port=9008 -jar target/quarkus-app/quarkus-run.jar

Go to http://localhost:9008/q/health-ui/ , you will see the following error:

Error while fetching data from [http://0.0.0.0:9000/q/health]

because the config used the URL generated at build time with some default config.

Copy link

quarkus-bot bot commented Nov 22, 2024

/cc @radcortez (config)

@gsmet
Copy link
Member Author

gsmet commented Nov 22, 2024

/cc @cescoffier

@gsmet
Copy link
Member Author

gsmet commented Nov 22, 2024

FWIW, I fixed the Health UI issue in #44647 but that doesn't solve the fact that we are building URLs at build time with runtime elements.

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

No branches or pull requests

1 participant