CAMEL-23931: Fix camel.jbang.quarkus.platform.url ignored from application.properties - #25254
Conversation
…n.properties QuarkusPlatformMixin.of() only honoured QUARKUS_EXTENSION_REGISTRY_BASE_URI (camel.jbang.quarkusExtensionRegistryBaseUri) when loading properties, so setting camel.jbang.quarkus.platform.url in application.properties was silently ignored - unlike all other camel.jbang.* properties. Also read QUARKUS_PLATFORM_URL_PROPERTY (camel.jbang.quarkus.platform.url) from the supplied Properties as a fallback for quarkusExtensionRegistryBaseUri, stripping the /client/platforms suffix if present (same logic already applied for the system property in QuarkusExtensionRegistryMixin). This regression was introduced in 4.18.3 by the CAMEL-23353 backport.
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
gnodet
left a comment
There was a problem hiding this comment.
Clean, well-tested fix for a real user-facing bug where camel.jbang.quarkus.platform.url set in application.properties was silently ignored during export. The logic correctly mirrors the existing system-property handling in QuarkusExtensionRegistryMixin.quarkusExtensionRegistryBaseUri().
Observations (not blocking):
- Good job including tests for the two-phase loading pattern (app-properties then system-properties), which matches the real call sites in
Export.java. The canonical-key-takes-priority-over-legacy-key test is important and well-designed. - Minor: the suffix-stripping logic for
/client/platformsand trailing-slash stripping is now duplicated betweenQuarkusPlatformMixin.of()andQuarkusExtensionRegistryMixin.quarkusExtensionRegistryBaseUri(). Acceptable for this focused fix, but a future cleanup could extract a shared normalisation helper. - Pre-existing (not introduced by this PR): the
resolve()method uses the raw fieldquarkusExtensionRegistryBaseUriat line 74 (whenquarkusVersion != null) but calls the methodquarkusExtensionRegistryBaseUri()at line 80 (else branch). The field access bypasses the system-property fallback. With this PR theof()path now normalises the value before storing it in the field, which partially mitigates this inconsistency.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of Guillaume Nodet
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 7 tested, 8 compile-only — current: 6 all testedMaveniverse Scalpel detected 15 affected modules (current approach: 6).
|
Fixes CAMEL-23931
Setting camel.jbang.quarkus.platform.url in application.properties had no effect —the export always used the default public registry. Only JVM -D flags or the --quarkus-ext-registry CLI flag worked.
Fixed QuarkusPlatformMixin.of() to also read this property from the properties file.
Regression from CAMEL-23353 backport in 4.18.3.