[CU-86b9ybg6d] Migrate to java-libraries-monorepo 4.0.0-rc2#160
Open
jfuerth wants to merge 6 commits into
Open
[CU-86b9ybg6d] Migrate to java-libraries-monorepo 4.0.0-rc2#160jfuerth wants to merge 6 commits into
jfuerth wants to merge 6 commits into
Conversation
Adopt the java-libraries-monorepo parent (4.0.0-rc2-9-gd79f5a8). The parent now manages versions for: spring-boot 3.5.14, spring-cloud 2024.0.3, dnastack-token-validator, spring-boot-audit-event-logger, dnastack-oauth-client-factory-spring-starter, logback-extensions, jdbi 3.52.1, resilience4j 2.4.0, zonky embedded-postgres, postgresql 42.7.11 (CVE-2026-42198), bouncycastle 1.84 (CVE-2026-5598). Drop the local Jackson 2.18.x pin (was needed when oauth-client-factory 1.0.5 used the removed-in-2.19 PropertyNamingStrategy.SNAKE_CASE). Switch micrometer-tracing-bridge-brave -> bridge-otel. The bridge-otel artifact comes from OTel; Brave is going away in the monorepo libs. Remove duplicate dependencyManagement entries that the new parent already provides (logback, jdbi BOM, spring-cloud BOM). Remove the audit-event-logger zipkin-reporter exclusions; those were needed for the 1.0.x lib and don't apply to the 4.x version. This commit only updates the POM and intentionally does not touch the source code yet; subsequent commits migrate the affected APIs (brave -> micrometer, OAuthClientFactory -> FeignClients, etc.) to keep the diff reviewable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…eStrategy Jackson 2.19 removed the deprecated PropertyNamingStrategy.SNAKE_CASE constant and KebabCaseStrategy inner class. The replacements have lived in PropertyNamingStrategies since 2.12, so this is a drop-in swap: PropertyNamingStrategy.SNAKE_CASE -> PropertyNamingStrategies.SNAKE_CASE PropertyNamingStrategy.KebabCaseStrategy -> PropertyNamingStrategies.KebabCaseStrategy Touches DataConnectAuthRequest (JSON serialization of the auth challenge returned to clients), and the two tablesregistry config classes used by the deprecated tables-registry feature. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…gnClients Threads Micrometer Observation / OpenTelemetry through every previous Brave integration point, in line with the rest of the platform's 4.0 library migration: - brave.Tracing / brave.Tracer injection sites replaced with io.micrometer.tracing.Tracer and io.micrometer.observation.ObservationRegistry. Span creation rewritten with tracer.nextSpan().name(...).start(), tracer.withSpan(span), span.end(). The 128-bit traceId() string replaces brave's 16-char traceIdString() everywhere (X-Trino-Trace-Token, QueryJob.originalTraceId, GlobalControllerExceptionHandler trace_id response field). - JwtTokenParserFactory / PermissionCheckerFactory / TokenActionsHttpClientFactory migrated to their new (ObservationRegistry, ConnectionPool) signatures. Added a tokenValidatorConnectionPool bean and an OidcHttpClient bean; CachingIssuerPubKeyJwksResolver.create(issuerUri, oidcHttpClient) replaces the old constructor. - OAuthClientFactory.builderWithCommonSetup(...) callers (the collection-service and indexing-service Feign clients) migrated to FeignClients.newBuilder(config.withOverrides(...), feignClient, feignClient), with a per-resource OkHttp client built via OkHttpClients.buildOkHttpClient(name, observationRegistry, type) so metrics get a meaningful resource dimension. The same client is passed for the main and token slots — neither client has different network requirements from the other. - TrinoHttpClient.execute(): drop B3 single-format propagation through the X-Trino-Extra-Credential header. B3 isn't available without Brave; substituted W3C traceparent built from the current TraceContext so the SAC plugin / tables connector can still correlate downstream activity. X-Trino-Trace-Token continues to carry the raw traceId. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Was only setting enabled: false. With the Brave -> Micrometer/OTel migration there is no Zipkin sender on the classpath at all, so the block has nothing to disable. Not adding management.tracing.sampling.probability either; it's a no-op without an exporter and we'd just have to remove it later. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
TrinoDataConnectAdapterTest used a live brave.Tracing instance plus a span-in-scope to satisfy the adapter's tracer dependency. Brave is no longer on the classpath, and the adapter now takes io.micrometer.tracing.Tracer. The test only needs tracer.currentTraceContext().context().traceId() (used when persisting QueryJob.originalTraceId), so a thin Mockito stub returning a fixed 128-bit traceId is enough. No tearDown needed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…gin compatibility The publisher SAC plugin (CU-86b9ybr65) and ga4gh-tables-connector (CU-86b9ybr0e) still read `b3` from Trino's extra-credentials map and parse it via brave's B3SingleFormat. Brave's parser handles 128-bit (32-hex) trace IDs natively, so the new OTel trace context can be hand-formatted into the same B3 single-format header without bringing brave back as a dependency. Sending both b3 and traceparent keeps existing plugins working unchanged while pre-positioning new plugins to consume the W3C traceparent once they migrate to the OpenTelemetry SPI. The b3 line can be dropped in a follow-up to CU-86b9ybg6d after both plugins ship.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates data-connect-trino off the pre-monorepo DNAstack 1.x libraries and onto
com.dnastack.starter:spring-boot-parent:4.0.0-rc2-9-gd79f5a8. This is part of the parent ticket CU-86b9yb0pe to roll all services onto the consolidated java-libraries-monorepo.Headline changes:
org.springframework.boot:spring-boot-starter-parent:3.5.13forcom.dnastack.starter:spring-boot-parent:4.0.0-rc2-9-gd79f5a8. Removes the local Jackson 2.18.x pin (no longer needed — every remaining caller usesPropertyNamingStrategies.SNAKE_CASE). Drops duplicate<dependencyManagement>entries (logback, jdbi, spring-cloud) and per-dep version pins for libs now managed by the parent (token-validator, audit-event-logger, oauth-client-factory-starter, jdbi, resilience4j, zonky).brave.Tracing/brave.Tracer→io.micrometer.tracing.Tracer+io.micrometer.observation.ObservationRegistry.micrometer-tracing-bridge-brave→bridge-otel.traceIdString()(16 hex) →traceId()(32 hex / 128-bit) everywhere it surfaces (audit events,X-Trino-Trace-Token,QueryJob.originalTraceId,trace_idin error responses).JwtTokenParserFactory,PermissionCheckerFactory, andTokenActionsHttpClientFactorymigrated to their new(ObservationRegistry, ConnectionPool)signatures. AddedtokenValidatorConnectionPoolandOidcHttpClientbeans; switched toCachingIssuerPubKeyJwksResolver.create(issuerUri, oidcHttpClient).OAuthClientFactory.builderWithCommonSetup(...)toFeignClients.newBuilder(cfg.withOverrides(oauthClient), feignClient, feignClient), with per-resource OkHttp clients built viaOkHttpClients.buildOkHttpClient(name, observationRegistry, type)so metrics get meaningful resource dimensions.TrinoHttpClient.execute()no longer emits a B3 single-format header insideX-Trino-Extra-Credential(Brave is gone). Replaced with W3Ctraceparentso the SAC plugin / tables connector can still correlate downstream activity;X-Trino-Trace-Tokencontinues to carry the raw traceId.PropertyNamingStrategy.SNAKE_CASE→PropertyNamingStrategies.SNAKE_CASE;PropertyNamingStrategy.KebabCaseStrategy→PropertyNamingStrategies.KebabCaseStrategy(touchesDataConnectAuthRequestand the two deprecated tables-registry client configs).spring.zipkin:block (with Brave/Zipkin gone there's nothing to disable). Intentionally not addingmanagement.tracing.sampling.probability— it's a no-op without an exporter.TrinoDataConnectAdapterTestswapped its livebrave.Tracingfixture for a thin MockitoTracerstub returning a fixed 128-bit traceId.Commits are split logically so each is independently reviewable: parent bump, Jackson naming fixups, Brave + OAuthClientFactory migration, application.yml cleanup, test fixture swap.
Test plan
./mvnw clean test— 49 tests pass locally (Java 21)./mvnw dependency:tree -Dincludes='com.dnastack:*'— every DNAstack jar resolves to4.0.0-rc2-9-gd79f5a8(withlogback-extensionscorrectly remaining on its standalone 1.0.1 line)trace_idvalues