From e03719e4be16ffae779bb92c04713bdb70f7b725 Mon Sep 17 00:00:00 2001 From: Shivaji Byrapaneni Date: Tue, 8 Sep 2026 10:13:44 +0100 Subject: [PATCH 1/5] build(calm-hub): add observability and GitHub-backend dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extracted from #3001. Adds caffeine, jgit, quarkus-scheduler and the OpenTelemetry/Micrometer stack — all inert until consumed by later slices. OTEL is env-gated (CALM_OTEL_ENABLED=false by default), so this changes no runtime behaviour on its own. Original-PR: finos/architecture-as-code#3001 --- calm-hub/pom.xml | 30 +++++++++++++++++++ .../src/main/resources/application.properties | 15 +++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/calm-hub/pom.xml b/calm-hub/pom.xml index e5ec065af..0872a6129 100644 --- a/calm-hub/pom.xml +++ b/calm-hub/pom.xml @@ -97,6 +97,36 @@ owasp-java-html-sanitizer 20240325.1 + + + + com.github.ben-manes.caffeine + caffeine + + + + + org.eclipse.jgit + org.eclipse.jgit + 7.2.0.202503040940-r + + + + + io.quarkus + quarkus-scheduler + + + + + io.quarkus + quarkus-opentelemetry + + + io.quarkus + quarkus-micrometer-opentelemetry + + io.quarkus quarkus-oidc diff --git a/calm-hub/src/main/resources/application.properties b/calm-hub/src/main/resources/application.properties index bb30515be..06e1c9c47 100644 --- a/calm-hub/src/main/resources/application.properties +++ b/calm-hub/src/main/resources/application.properties @@ -155,4 +155,17 @@ calm.mcp.enabled=false # Log every JSON-RPC message in dev mode for easier debugging of MCP clients. %dev.quarkus.mcp.server.traffic-logging=true quarkus.log.category."org.finos.calm".level=DEBUG -quarkus.log.category."org.mongodb.driver".level=OFF \ No newline at end of file +quarkus.log.category."org.mongodb.driver".level=OFF + +# OpenTelemetry — disabled by default, enable via CALM_OTEL_ENABLED=true in production +quarkus.otel.service.name=${OTEL_SERVICE_NAME:calm-hub} +quarkus.otel.enabled=${CALM_OTEL_ENABLED:false} +quarkus.otel.exporter.otlp.endpoint=${OTEL_EXPORTER_OTLP_ENDPOINT:http://localhost:4317} +quarkus.otel.traces.sampler=parentbased_traceidratio +quarkus.otel.traces.sampler.arg=${CALM_OTEL_SAMPLING_RATIO:1.0} +quarkus.micrometer.enabled=true +quarkus.micrometer.binder.http-server.enabled=${CALM_OTEL_METRICS_ENABLED:false} +quarkus.micrometer.binder.http-client.enabled=${CALM_OTEL_METRICS_ENABLED:false} + +# Test profile: disable OTEL/Micrometer to avoid noise +%test.quarkus.otel.enabled=false \ No newline at end of file From d83a8fdc296f6a8eeeb09c7eac59bee2d870cf5a Mon Sep 17 00:00:00 2001 From: Shivaji Byrapaneni Date: Tue, 8 Sep 2026 18:43:35 +0100 Subject: [PATCH 2/5] fix(calm-hub): actually disable Micrometer in the test profile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The comment said the test profile disables both OTEL and Micrometer, but only quarkus.otel.enabled was %test.-prefixed — Micrometer's core registry (and its auto-enabled binders) stayed active during mvn test despite the stated intent. Claude-Session: https://claude.ai/code/session_0199XmacMNTrxWL4x5CSXyp1 --- calm-hub/src/main/resources/application.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/calm-hub/src/main/resources/application.properties b/calm-hub/src/main/resources/application.properties index 06e1c9c47..28b416f74 100644 --- a/calm-hub/src/main/resources/application.properties +++ b/calm-hub/src/main/resources/application.properties @@ -168,4 +168,5 @@ quarkus.micrometer.binder.http-server.enabled=${CALM_OTEL_METRICS_ENABLED:false} quarkus.micrometer.binder.http-client.enabled=${CALM_OTEL_METRICS_ENABLED:false} # Test profile: disable OTEL/Micrometer to avoid noise -%test.quarkus.otel.enabled=false \ No newline at end of file +%test.quarkus.otel.enabled=false +%test.quarkus.micrometer.enabled=false \ No newline at end of file From 7713e7d4ada5f0354ae044eda83615342126788d Mon Sep 17 00:00:00 2001 From: Shivaji Byrapaneni Date: Tue, 8 Sep 2026 18:52:33 +0100 Subject: [PATCH 3/5] fix(calm-hub): disable OTEL/Micrometer under every custom test profile, not just 'test' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit quarkus.otel.enabled and quarkus.micrometer.enabled are both build/ run-time-fixed per active profile NAME (the same pitfall the jacoco comment in this file already documents) — a %test. prefix only applies when a test's QuarkusTestProfile.getConfigProfile() is literally "test". This module has four other custom profile names (integration-test, nitrite-integration-test, secure, proxy-auth), so both properties stayed enabled under mvn -P integration verify despite the previous fix. Verified: full integration suite (540 tests) still passes with all profiles now suppressed. Claude-Session: https://claude.ai/code/session_0199XmacMNTrxWL4x5CSXyp1 --- .../src/main/resources/application.properties | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/calm-hub/src/main/resources/application.properties b/calm-hub/src/main/resources/application.properties index 28b416f74..cabbb3ec4 100644 --- a/calm-hub/src/main/resources/application.properties +++ b/calm-hub/src/main/resources/application.properties @@ -167,6 +167,19 @@ quarkus.micrometer.enabled=true quarkus.micrometer.binder.http-server.enabled=${CALM_OTEL_METRICS_ENABLED:false} quarkus.micrometer.binder.http-client.enabled=${CALM_OTEL_METRICS_ENABLED:false} -# Test profile: disable OTEL/Micrometer to avoid noise +# Disable OTEL/Micrometer to avoid noise across every test profile in this module. +# Both quarkus.otel.enabled and quarkus.micrometer.enabled are build/run-time-fixed +# per active profile NAME (the same pitfall the jacoco comment above documents) — +# a %test. prefix only applies when a test's QuarkusTestProfile.getConfigProfile() +# is literally "test", so each custom profile name used in this module needs its +# own override or these stay enabled (default true/CALM_OTEL_ENABLED) under it. %test.quarkus.otel.enabled=false -%test.quarkus.micrometer.enabled=false \ No newline at end of file +%test.quarkus.micrometer.enabled=false +%integration-test.quarkus.otel.enabled=false +%integration-test.quarkus.micrometer.enabled=false +%nitrite-integration-test.quarkus.otel.enabled=false +%nitrite-integration-test.quarkus.micrometer.enabled=false +%secure.quarkus.otel.enabled=false +%secure.quarkus.micrometer.enabled=false +%proxy-auth.quarkus.otel.enabled=false +%proxy-auth.quarkus.micrometer.enabled=false \ No newline at end of file From 33d6c9bb79c9ec2846f57e1374d83682fdd1bfce Mon Sep 17 00:00:00 2001 From: Shivaji Byrapaneni Date: Tue, 8 Sep 2026 19:09:40 +0100 Subject: [PATCH 4/5] fix(calm-hub): make the OTel production toggle actually work at deploy time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit quarkus.otel.enabled is build-time-fixed (verified via javap against the Quarkus 3.34.7 jars: OTelBuildConfig.enabled() is BUILD_AND_RUN_TIME_FIXED). Empirically confirmed the bug: packaging with CALM_OTEL_ENABLED unset (default false) and then running the same jar with CALM_OTEL_ENABLED=true at runtime produced zero OTel activity — the env var was silently ignored either direction, despite the adjacent comment claiming a deploy-time toggle. In a build-once- deploy-many pipeline this meant OTel could never actually be turned on without rebuilding the artifact. Fixed by always compiling the extension in (quarkus.otel.enabled=true) and gating it via the genuinely RUN_TIME-scoped quarkus.otel.sdk.disabled instead, defaulting to disabled. Renamed the env var to CALM_OTEL_DISABLED (inverted polarity to match) since the old CALM_OTEL_ENABLED name described a toggle that never worked; nothing in the tree references it yet. Verified empirically: packaged an uber-jar once, then ran it twice with only the env var changed — CALM_OTEL_DISABLED unset produced no OTel activity, CALM_OTEL_DISABLED=false produced live OTLP export attempts (connection-refused, since nothing was listening — proving the SDK was actually active). Full unit (2868) and integration (540) suites still pass. Micrometer has no equivalent runtime-mutable switch (confirmed via javap: its binder .enabled properties are nested under the same BUILD_AND_RUN_TIME_FIXED root as the master switch, and the runtime- scoped HttpServerConfig/HttpClientConfig classes carry no enabled field) — updated the comment to say so honestly rather than implying a deploy-time toggle Quarkus doesn't provide for it. Claude-Session: https://claude.ai/code/session_0199XmacMNTrxWL4x5CSXyp1 --- .../src/main/resources/application.properties | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/calm-hub/src/main/resources/application.properties b/calm-hub/src/main/resources/application.properties index cabbb3ec4..127bd6f21 100644 --- a/calm-hub/src/main/resources/application.properties +++ b/calm-hub/src/main/resources/application.properties @@ -157,29 +157,35 @@ calm.mcp.enabled=false quarkus.log.category."org.finos.calm".level=DEBUG quarkus.log.category."org.mongodb.driver".level=OFF -# OpenTelemetry — disabled by default, enable via CALM_OTEL_ENABLED=true in production +# OpenTelemetry — the extension is always compiled in (quarkus.otel.enabled is a +# build-time flag; a build-once-deploy-many pipeline can't flip it per environment) +# and disabled at runtime by default via the genuinely runtime-mutable +# quarkus.otel.sdk.disabled. Set CALM_OTEL_DISABLED=false on the deployed +# container/process to turn it on — no rebuild required. quarkus.otel.service.name=${OTEL_SERVICE_NAME:calm-hub} -quarkus.otel.enabled=${CALM_OTEL_ENABLED:false} +quarkus.otel.enabled=true +quarkus.otel.sdk.disabled=${CALM_OTEL_DISABLED:true} quarkus.otel.exporter.otlp.endpoint=${OTEL_EXPORTER_OTLP_ENDPOINT:http://localhost:4317} quarkus.otel.traces.sampler=parentbased_traceidratio quarkus.otel.traces.sampler.arg=${CALM_OTEL_SAMPLING_RATIO:1.0} +# Micrometer has no equivalent runtime-mutable switch — quarkus.micrometer.enabled +# and the binder .enabled properties below are all build-time-fixed (they decide +# which binder beans get compiled in at all), so CALM_OTEL_METRICS_ENABLED is a +# build-time knob: it must be set when the artifact is built, not per-deployment. quarkus.micrometer.enabled=true quarkus.micrometer.binder.http-server.enabled=${CALM_OTEL_METRICS_ENABLED:false} quarkus.micrometer.binder.http-client.enabled=${CALM_OTEL_METRICS_ENABLED:false} -# Disable OTEL/Micrometer to avoid noise across every test profile in this module. -# Both quarkus.otel.enabled and quarkus.micrometer.enabled are build/run-time-fixed -# per active profile NAME (the same pitfall the jacoco comment above documents) — -# a %test. prefix only applies when a test's QuarkusTestProfile.getConfigProfile() -# is literally "test", so each custom profile name used in this module needs its -# own override or these stay enabled (default true/CALM_OTEL_ENABLED) under it. -%test.quarkus.otel.enabled=false +# Disable Micrometer to avoid noise across every test profile in this module — +# quarkus.micrometer.enabled is build/run-time-fixed per active profile NAME (the +# same pitfall the jacoco comment above documents), so a %test. prefix only +# applies when a test's QuarkusTestProfile.getConfigProfile() is literally "test"; +# each custom profile name used in this module needs its own override or +# Micrometer's core registry (and its auto-enabled binders) stays active under it. +# quarkus.otel.sdk.disabled needs no such per-profile treatment: it's genuinely +# RUN_TIME-scoped and already defaults to disabled everywhere, tests included. %test.quarkus.micrometer.enabled=false -%integration-test.quarkus.otel.enabled=false %integration-test.quarkus.micrometer.enabled=false -%nitrite-integration-test.quarkus.otel.enabled=false %nitrite-integration-test.quarkus.micrometer.enabled=false -%secure.quarkus.otel.enabled=false %secure.quarkus.micrometer.enabled=false -%proxy-auth.quarkus.otel.enabled=false %proxy-auth.quarkus.micrometer.enabled=false \ No newline at end of file From 0e64cb5f66084aa9f921ae5764797ca4ee2614b7 Mon Sep 17 00:00:00 2001 From: James Gough Date: Wed, 9 Sep 2026 07:48:54 +0100 Subject: [PATCH 5/5] fix(calm-hub): use the quarkus-caffeine extension instead of the bare caffeine jar Caffeine builds its cache implementation classes reflectively. quarkus-caffeine supplies the native-image reflection config for that; the bare com.github.ben-manes.caffeine:caffeine jar would only surface this as a native build failure, and calm-hub's native image builds don't run in PR CI. The extension pulls the same caffeine jar in transitively, so nothing else changes. --- calm-hub/pom.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/calm-hub/pom.xml b/calm-hub/pom.xml index 0872a6129..9e37b4d4f 100644 --- a/calm-hub/pom.xml +++ b/calm-hub/pom.xml @@ -98,10 +98,14 @@ 20240325.1 - + - com.github.ben-manes.caffeine - caffeine + io.quarkus + quarkus-caffeine