From b5232c18cc89d3c587b2aeffc4335ead574889d4 Mon Sep 17 00:00:00 2001 From: Lianghui Yu Date: Fri, 27 Mar 2026 12:15:40 +0800 Subject: [PATCH] remove o11yphant from kojiji remove o11yphant as it is not used anymore and will cause downstream repo to contain o11yphant as transmission dependency --- pom.xml | 11 ------ .../com/redhat/red/build/koji/KojiClient.java | 16 ++------- .../http/httpclient4/HC4SyncObjectClient.java | 34 ++----------------- 3 files changed, 5 insertions(+), 56 deletions(-) diff --git a/pom.xml b/pom.xml index f22e172..a91e713 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,6 @@ 1.1.8 2.22.0 2.1.0 - 1.9.2 postgres:9.4 docker.io/buildchimp/koji-dojo-hub:dev @@ -114,12 +113,6 @@ ${kerbyVersion} - - - org.commonjava.util - o11yphant-metrics-api - ${o11yphantVersion} - @@ -226,10 +219,6 @@ kerb-client - - org.commonjava.util - o11yphant-metrics-api - diff --git a/src/main/java/com/redhat/red/build/koji/KojiClient.java b/src/main/java/com/redhat/red/build/koji/KojiClient.java index 64fcec3..4b3f16f 100644 --- a/src/main/java/com/redhat/red/build/koji/KojiClient.java +++ b/src/main/java/com/redhat/red/build/koji/KojiClient.java @@ -33,7 +33,6 @@ import org.apache.http.impl.client.CloseableHttpClient; import org.commonjava.atlas.maven.ident.ref.ProjectRef; import org.commonjava.atlas.maven.ident.ref.ProjectVersionRef; -import org.commonjava.o11yphant.metrics.api.MetricRegistry; import org.commonjava.rwx.api.RWXMapper; import org.commonjava.rwx.core.Registry; import org.commonjava.rwx.error.XmlRpcException; @@ -100,8 +99,6 @@ public class KojiClient private ExecutorService executorService; - private MetricRegistry metricRegistry; - private KojiObjectMapper objectMapper; private KojiConfig config; @@ -164,22 +161,15 @@ private UrlBuilder sessionUrlBuilder( KojiSessionInfo session, Supplier T call( final Object request, final Class responseType, final UrlBuilder urlBuilder, final RequestModifier requestModifier ) throws XmlRpcException { - if ( metricRegistry == null ) - { - return RetryUtils.withRetry( () -> doCall( request, responseType, urlBuilder, requestModifier ) ); - } - - // Apply global and per request metric - - try ( final Timer.Context timerContext = metricRegistry.timer( name( getClass(), "call" ) ).time(); - final Timer.Context requestTimerContext = metricRegistry.timer( name( request.getClass(), "call" ) ).time() ) - { - try - { - return RetryUtils.withRetry( () -> doCall( request, responseType, urlBuilder, requestModifier ) ); - } - finally - { - timerContext.stop(); - requestTimerContext.stop(); - } - } - catch ( Exception e ) - { - throw new XmlRpcException( e.getMessage(), e ); - } + return RetryUtils.withRetry( () -> doCall( request, responseType, urlBuilder, requestModifier ) ); } private T doCall( final Object request, final Class responseType, final UrlBuilder urlBuilder,