From 1257d5d970a8d9b7b6de50ed67b3f5f8f79d116b Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 5 Feb 2020 17:10:33 -0800 Subject: [PATCH 001/273] all: only set Publish var for jdk8 builds --- .travis.yml | 9 ++++++--- buildViaTravis.sh | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2337f8d0..e57d0cc0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,10 @@ language: java -jdk: - - openjdk8 - - openjdk11 +matrix: + include: + - jdk: openjdk8 + env: GRADLE_PUBLISH=true + - jdk: openjdk11 + env: GRADLE_PUBLISH=false install: "./installViaTravis.sh" script: "./buildViaTravis.sh" cache: diff --git a/buildViaTravis.sh b/buildViaTravis.sh index 014d5e0a..57aa2c3a 100755 --- a/buildViaTravis.sh +++ b/buildViaTravis.sh @@ -1,7 +1,7 @@ #!/bin/bash # This script will build the project. -if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then +if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ "$GRADLE_PUBLISH" == "false" ]; then echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" ./gradlew build elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then From ce3286b76776a446543f4bffea2acb3202caa1c2 Mon Sep 17 00:00:00 2001 From: Suyi Liu Date: Fri, 14 Feb 2020 14:38:56 -0800 Subject: [PATCH 002/273] zuul-core Add Cause of SSL Handshake Error from Origin When SSL handler reads the message that the handshake failed (for example, because peer certificates are not verified), it populates the through handlers and eventually the failure message goes away. When ProxyEndpoint later tries to talk to origin it usually gets the error of SSLEngine Closed already, which does not display the actual reason why it was closed. This change catches the detailed failure cause and adds it to proxy attempt so client can know what went wrong: "error":"General OpenSslEngine problem","cause":"java.security.cert.CertificateException: Certificate application name (applicationname) does not match expected name: expectedname","exceptionType":"SSLHandshakeException" --- .../netty/server/OriginResponseReceiver.java | 17 ++++++++++++++++- .../com/netflix/zuul/niws/RequestAttempt.java | 11 +++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/OriginResponseReceiver.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/OriginResponseReceiver.java index 052e47f2..58560649 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/OriginResponseReceiver.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/OriginResponseReceiver.java @@ -34,8 +34,10 @@ import io.netty.handler.codec.http.HttpRequest; import io.netty.handler.codec.http.HttpResponse; import io.netty.handler.codec.http.HttpVersion; +import io.netty.handler.ssl.SslHandshakeCompletionEvent; import io.netty.handler.timeout.IdleStateEvent; import io.netty.handler.timeout.ReadTimeoutException; +import io.netty.util.AttributeKey; import io.netty.util.ReferenceCountUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -56,6 +58,7 @@ public class OriginResponseReceiver extends ChannelDuplexHandler { private volatile ProxyEndpoint edgeProxy; private static final Logger LOG = LoggerFactory.getLogger(OriginResponseReceiver.class); + private static final AttributeKey SSL_HANDSHAKE_UNSUCCESS_FROM_ORIGIN_THROWABLE = AttributeKey.newInstance("_ssl_handshake_from_origin_throwable"); public static final String CHANNEL_HANDLER_NAME = "_origin_response_receiver"; public OriginResponseReceiver(final ProxyEndpoint edgeProxy) { @@ -115,6 +118,10 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc postCompleteHook(ctx, evt); } } + else if (evt instanceof SslHandshakeCompletionEvent && !((SslHandshakeCompletionEvent) evt).isSuccess()) { + Throwable cause = ((SslHandshakeCompletionEvent) evt).cause(); + ctx.channel().attr(SSL_HANDSHAKE_UNSUCCESS_FROM_ORIGIN_THROWABLE).set(cause); + } else if (evt instanceof IdleStateEvent) { if (edgeProxy != null) { LOG.error("Origin request received IDLE event: {}", ChannelUtils.channelInfoForLogging(ctx.channel())); @@ -182,7 +189,15 @@ public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) if (msg instanceof HttpRequestMessage) { promise.addListener((future) -> { if (!future.isSuccess()) { - fireWriteError("request headers", future.cause(), ctx); + Throwable cause = ctx.channel().attr(SSL_HANDSHAKE_UNSUCCESS_FROM_ORIGIN_THROWABLE).get(); + if (cause != null) { + // Set the specific SSL handshake error if the handlers have already caught them + ctx.channel().attr(SSL_HANDSHAKE_UNSUCCESS_FROM_ORIGIN_THROWABLE).set(null); + fireWriteError("request headers", cause, ctx); + LOG.debug("SSLException is overridden by SSLHandshakeException caught in handler level. Original SSL exception message: ", future.cause()); + } else { + fireWriteError("request headers", future.cause(), ctx); + } } }); diff --git a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java index 9c20e53f..493e1b7b 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java +++ b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java @@ -19,6 +19,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; +import com.google.common.base.Throwables; import com.netflix.appinfo.AmazonInfo; import com.netflix.appinfo.InstanceInfo; import com.netflix.client.config.IClientConfig; @@ -29,6 +30,8 @@ import com.netflix.zuul.netty.connectionpool.OriginConnectException; import io.netty.handler.timeout.ReadTimeoutException; +import javax.net.ssl.SSLHandshakeException; + /** * User: michaels@netflix.com * Date: 9/2/14 @@ -41,6 +44,7 @@ public class RequestAttempt private int attempt; private int status; private long duration; + private String cause; private String error; private String exceptionType; private String app; @@ -321,9 +325,15 @@ else if (t instanceof OutboundException) { error = obe.getOutboundErrorType().toString(); exceptionType = OutboundException.class.getSimpleName(); } + else if (t instanceof SSLHandshakeException) { + error = t.getMessage(); + exceptionType = t.getClass().getSimpleName(); + cause = t.getCause().getMessage(); + } else { error = t.getMessage(); exceptionType = t.getClass().getSimpleName(); + cause = Throwables.getStackTraceAsString(t); } } } @@ -352,6 +362,7 @@ public ObjectNode toJsonNode() root.put("attempt", attempt); putNullableAttribute(root, "error", error); + putNullableAttribute(root, "cause", cause); putNullableAttribute(root, "exceptionType", exceptionType); putNullableAttribute(root, "region", region); putNullableAttribute(root, "asg", asg); From 0dd5b6477530d76d4cb6bb350c818fe029b62c8d Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 18 Feb 2020 16:38:51 -0800 Subject: [PATCH 003/273] zuul-core: rethrow bind exceptions with more detail --- .../main/java/com/netflix/zuul/netty/server/Server.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java index 1f71d000..11bee844 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java @@ -254,7 +254,14 @@ private ChannelFuture setupServerBootstrap( serverStatusManager.localStatus(InstanceInfo.InstanceStatus.UP); // Bind and start to accept incoming connections. - return serverBootstrap.bind(listenAddress).sync(); + ChannelFuture bindFuture = serverBootstrap.bind(listenAddress); + try { + return bindFuture.sync(); + } catch (Exception e) { + // sync() sneakily throws a checked Exception, but doesn't declare it. This can happen if there is a bind + // failure, which is typically an IOException. Just chain it and rethrow. + throw new RuntimeException("Failed to bind on addr " + listenAddress, e); + } } /** From 12a325105806cc717099b369425b4616cf183cf0 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 19 Feb 2020 11:49:02 -0800 Subject: [PATCH 004/273] zuul-core: wire socket address from ClientChannelManager down to ClientConnectFactory This is needed to ensure IPv6 support, and additionally to pass in LocalAddresses for testing in the future. This avoids passing a string host around, and forces name resolution to happen earlier in the connection. The address to connect to is no longer owned by the Server object, and instead part of the connection pool. The Server object now functions as a way to logically reference a backend. Additionally, several arguments are no longer used and have been removed, like the path, method, and attempt number in multiple places. Lastly, blocking DNS reads are still possible, but this change is complicated as it is. I will make this async in a future PR. --- .../zuul/filters/endpoint/ProxyEndpoint.java | 3 +- .../connectionpool/ClientChannelManager.java | 9 +- .../DefaultClientChannelManager.java | 110 ++++++++++---- .../netty/connectionpool/IConnectionPool.java | 4 +- .../NettyClientConnectionFactory.java | 27 +--- .../PerServerConnectionPool.java | 138 +++++++----------- .../netty/server/ClientRequestReceiver.java | 5 +- .../zuul/origins/BasicNettyOrigin.java | 9 +- 8 files changed, 164 insertions(+), 141 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 0d474338..0d0cc2ea 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -388,7 +388,8 @@ private void proxyRequestToOrigin() { updateOriginRpsTrackers(origin, attemptNum); // We pass this AtomicReference here and the origin impl will assign the chosen server to it. - promise = origin.connectToOrigin(zuulRequest, channelCtx.channel().eventLoop(), attemptNum, passport, chosenServer, chosenHostAddr); + promise = origin.connectToOrigin( + zuulRequest, channelCtx.channel().eventLoop(), attemptNum, passport, chosenServer, chosenHostAddr); storeAndLogOriginRequestInfo(); currentRequestAttempt = origin.newRequestAttempt(chosenServer.get(), context, attemptNum); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java index a430522e..b7941aed 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java @@ -43,9 +43,12 @@ public interface ClientChannelManager Promise acquire(EventLoop eventLoop); - Promise acquire(EventLoop eventLoop, Object key, String httpMethod, String uri, int retryNum, - CurrentPassport passport, AtomicReference selectedServer, - AtomicReference selectedHostAddr); + Promise acquire( + EventLoop eventLoop, + Object key, + CurrentPassport passport, + AtomicReference selectedServer, + AtomicReference selectedHostAddr); boolean isCold(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java index 7bd0f41f..f5a7bd5e 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java @@ -20,6 +20,7 @@ import com.google.common.base.Throwables; import com.google.common.collect.Sets; +import com.google.common.net.InetAddresses; import com.netflix.appinfo.InstanceInfo; import com.netflix.client.config.IClientConfig; import com.netflix.loadbalancer.DynamicServerListLoadBalancer; @@ -43,7 +44,9 @@ import io.netty.channel.EventLoop; import io.netty.handler.timeout.IdleStateHandler; import io.netty.util.concurrent.Promise; -import java.lang.reflect.InvocationTargetException; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.SocketAddress; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -51,6 +54,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; +import javax.annotation.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -312,20 +316,16 @@ public boolean remove(PooledConnection conn) { @Override public Promise acquire(final EventLoop eventLoop) { - return acquire(eventLoop, null, null, null, 1, CurrentPassport.create(), - new AtomicReference<>(), new AtomicReference<>()); + return acquire(eventLoop, null, CurrentPassport.create(), new AtomicReference<>(), new AtomicReference<>()); } @Override - public Promise acquire(final EventLoop eventLoop, final Object key, final String httpMethod, - final String uri, final int attemptNum, final CurrentPassport passport, - final AtomicReference selectedServer, - final AtomicReference selectedHostAdddr) - { - - if (attemptNum < 1) { - throw new IllegalArgumentException("attemptNum must be greater than zero"); - } + public Promise acquire( + EventLoop eventLoop, + @Nullable Object key, + CurrentPassport passport, + AtomicReference selectedServer, + AtomicReference selectedHostAddr) { if (shuttingDown) { Promise promise = eventLoop.newPromise(); @@ -341,12 +341,68 @@ public Promise acquire(final EventLoop eventLoop, final Object return promise; } - final InstanceInfo instanceInfo = chosenServer instanceof DiscoveryEnabledServer ? - ((DiscoveryEnabledServer) chosenServer).getInstanceInfo() : - // create mock instance info for non-discovery instances - new InstanceInfo(chosenServer.getId(), null, null, chosenServer.getHost(), chosenServer.getId(), - null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null); + String rawHost; + int port; + InstanceInfo instanceInfo; + if (chosenServer instanceof DiscoveryEnabledServer) { + DiscoveryEnabledServer discoveryServer = (DiscoveryEnabledServer) chosenServer; + // Configuration for whether to use IP address or host has already been applied in the + // DiscoveryEnabledServer constructor. + rawHost = discoveryServer.getHost(); + port = discoveryServer.getPort(); + instanceInfo = discoveryServer.getInstanceInfo(); + // TODO(carl-mastrangelo): pull the IPv6 addr from the instance info, if present. + } else { + // create mock instance info for non-discovery instances + rawHost = chosenServer.getHost(); + port = chosenServer.getPort(); + instanceInfo = new InstanceInfo( + chosenServer.getId(), + null, + null, + chosenServer.getHost(), + chosenServer.getId(), + null, + null, + null, + null, + null, + null, + null, + null, + 0, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null); + } + InetSocketAddress serverAddr; + try { + InetAddress ipAddr = InetAddresses.forString(rawHost); + serverAddr = new InetSocketAddress(ipAddr, port); + } catch (IllegalArgumentException e1) { + LOG.warn("NettyClientConnectionFactory got an unresolved address, addr: {}", rawHost); + Counter unresolvedDiscoveryHost = SpectatorUtils.newCounter( + "unresolvedDiscoveryHost", + connPoolConfig.getOriginName() == null ? "unknownOrigin" : connPoolConfig.getOriginName()); + unresolvedDiscoveryHost.increment(); + try { + serverAddr = new InetSocketAddress(rawHost, port); + } catch (RuntimeException e2) { + e1.addSuppressed(e2); + throw e1; + } + } + final InetSocketAddress finalServerAddr = serverAddr; selectedServer.set(chosenServer); @@ -360,13 +416,13 @@ public Promise acquire(final EventLoop eventLoop, final Object PooledConnectionFactory pcf = createPooledConnectionFactory(chosenServer, instanceInfo, stats, clientChannelMgr, closeConnCounter, closeWrtBusyConnCounter); // Create a new pool for this server. - return createConnectionPool(chosenServer, stats, instanceInfo, clientConnFactory, pcf, connPoolConfig, + return createConnectionPool(chosenServer, stats, instanceInfo, finalServerAddr, clientConnFactory, pcf, connPoolConfig, clientConfig, createNewConnCounter, createConnSucceededCounter, createConnFailedCounter, requestConnCounter, reuseConnCounter, connTakenFromPoolIsNotOpen, maxConnsPerHostExceededCounter, connEstablishTimer, connsInPool, connsInUse); }); - return pool.acquire(eventLoop, null, httpMethod, uri, attemptNum, passport, selectedHostAdddr); + return pool.acquire(eventLoop, passport, selectedHostAddr); } protected PooledConnectionFactory createPooledConnectionFactory(Server chosenServer, InstanceInfo instanceInfo, ServerStats stats, ClientChannelManager clientChannelMgr, @@ -374,18 +430,18 @@ protected PooledConnectionFactory createPooledConnectionFactory(Server chosenSer return ch -> new PooledConnection(ch, chosenServer, clientChannelMgr, instanceInfo, stats, closeConnCounter, closeWrtBusyConnCounter); } - protected IConnectionPool createConnectionPool(Server chosenServer, ServerStats stats, InstanceInfo instanceInfo, - NettyClientConnectionFactory clientConnFactory, PooledConnectionFactory pcf, - ConnectionPoolConfig connPoolConfig, IClientConfig clientConfig, - Counter createNewConnCounter, Counter createConnSucceededCounter, - Counter createConnFailedCounter, Counter requestConnCounter, - Counter reuseConnCounter, Counter connTakenFromPoolIsNotOpen, - Counter maxConnsPerHostExceededCounter, PercentileTimer connEstablishTimer, - AtomicInteger connsInPool, AtomicInteger connsInUse) { + protected IConnectionPool createConnectionPool( + Server chosenServer, ServerStats stats, InstanceInfo instanceInfo, SocketAddress serverAddr, + NettyClientConnectionFactory clientConnFactory, PooledConnectionFactory pcf, + ConnectionPoolConfig connPoolConfig, IClientConfig clientConfig, Counter createNewConnCounter, + Counter createConnSucceededCounter, Counter createConnFailedCounter, Counter requestConnCounter, + Counter reuseConnCounter, Counter connTakenFromPoolIsNotOpen, Counter maxConnsPerHostExceededCounter, + PercentileTimer connEstablishTimer, AtomicInteger connsInPool, AtomicInteger connsInUse) { return new PerServerConnectionPool( chosenServer, stats, instanceInfo, + serverAddr, clientConnFactory, pcf, connPoolConfig, diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/IConnectionPool.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/IConnectionPool.java index 132d0985..94809f42 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/IConnectionPool.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/IConnectionPool.java @@ -29,8 +29,8 @@ */ public interface IConnectionPool { - Promise acquire(EventLoop eventLoop, Object key, String httpMethod, String uri, - int retryNum, CurrentPassport passport, AtomicReference selectedHostAddr); + Promise acquire( + EventLoop eventLoop, CurrentPassport passport, AtomicReference selectedHostAddr); boolean release(PooledConnection conn); boolean remove(PooledConnection conn); void shutdown(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/NettyClientConnectionFactory.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/NettyClientConnectionFactory.java index 1a8d73d8..3648c5d4 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/NettyClientConnectionFactory.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/NettyClientConnectionFactory.java @@ -16,8 +16,6 @@ package com.netflix.zuul.netty.connectionpool; -import com.netflix.spectator.api.Counter; -import com.netflix.zuul.netty.SpectatorUtils; import com.netflix.zuul.netty.server.Server; import com.netflix.zuul.passport.CurrentPassport; import io.netty.bootstrap.Bootstrap; @@ -26,37 +24,29 @@ import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoop; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.net.InetSocketAddress; +import java.net.SocketAddress; +import java.util.Objects; /** * Created by saroskar on 3/16/16. */ -public class NettyClientConnectionFactory { +public final class NettyClientConnectionFactory { private final ConnectionPoolConfig connPoolConfig; private final ChannelInitializer channelInitializer; - private final Counter unresolvedDiscoveryHost; - - private static final Logger LOGGER = LoggerFactory.getLogger(NettyClientConnectionFactory.class); - NettyClientConnectionFactory(final ConnectionPoolConfig connPoolConfig, final ChannelInitializer channelInitializer) { this.connPoolConfig = connPoolConfig; this.channelInitializer = channelInitializer; - this.unresolvedDiscoveryHost = SpectatorUtils.newCounter("unresolvedDiscoveryHost", - connPoolConfig.getOriginName() == null ? "unknownOrigin" : connPoolConfig.getOriginName()); } - public ChannelFuture connect(final EventLoop eventLoop, String host, final int port, CurrentPassport passport) { - InetSocketAddress socketAddress = new InetSocketAddress(host, port); - if (socketAddress.isUnresolved()) { - LOGGER.warn("NettyClientConnectionFactory got an unresolved address, host: {}, port: {}", host, port); - unresolvedDiscoveryHost.increment(); + public ChannelFuture connect(final EventLoop eventLoop, SocketAddress socketAddress, CurrentPassport passport) { + Objects.requireNonNull(socketAddress, "socketAddress"); + if (socketAddress instanceof InetSocketAddress) { + // This should be checked by the ClientConnectionManager + assert !((InetSocketAddress) socketAddress).isUnresolved() : socketAddress; } - final Bootstrap bootstrap = new Bootstrap() .channel(Server.defaultOutboundChannelType.get()) .handler(channelInitializer) @@ -73,5 +63,4 @@ public ChannelFuture connect(final EventLoop eventLoop, String host, final int p .remoteAddress(socketAddress); return bootstrap.connect(); } - } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java index fd78b1b3..796baf6c 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java @@ -16,12 +16,10 @@ package com.netflix.zuul.netty.connectionpool; -import com.google.common.base.Strings; import com.netflix.appinfo.InstanceInfo; import com.netflix.client.config.IClientConfig; import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.ServerStats; -import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Timer; import com.netflix.zuul.exception.OutboundErrorType; @@ -31,15 +29,18 @@ import io.netty.channel.ChannelFuture; import io.netty.channel.EventLoop; import io.netty.util.concurrent.Promise; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - +import java.net.SocketAddress; import java.util.Deque; +import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedDeque; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Function; +import javax.annotation.Nullable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * User: michaels@netflix.com @@ -48,17 +49,20 @@ */ public class PerServerConnectionPool implements IConnectionPool { - private ConcurrentHashMap> connectionsPerEventLoop = new ConcurrentHashMap<>(); + private static final Logger LOG = LoggerFactory.getLogger(PerServerConnectionPool.class); + + private final ConcurrentHashMap> connectionsPerEventLoop = + new ConcurrentHashMap<>(); private final Server server; private final ServerStats stats; private final InstanceInfo instanceInfo; + private final SocketAddress serverAddr; private final NettyClientConnectionFactory connectionFactory; private final PooledConnectionFactory pooledConnectionFactory; private final ConnectionPoolConfig config; private final IClientConfig niwsClientConfig; - private final Counter createNewConnCounter; private final Counter createConnSucceededCounter; private final Counter createConnFailedCounter; @@ -77,26 +81,29 @@ public class PerServerConnectionPool implements IConnectionPool */ private final AtomicInteger connCreationsInProgress; - private static final Logger LOG = LoggerFactory.getLogger(PerServerConnectionPool.class); - - - public PerServerConnectionPool(Server server, ServerStats stats, InstanceInfo instanceInfo, - NettyClientConnectionFactory connectionFactory, - PooledConnectionFactory pooledConnectionFactory, - ConnectionPoolConfig config, - IClientConfig niwsClientConfig, - Counter createNewConnCounter, - Counter createConnSucceededCounter, - Counter createConnFailedCounter, - Counter requestConnCounter, Counter reuseConnCounter, - Counter connTakenFromPoolIsNotOpen, - Counter maxConnsPerHostExceededCounter, - Timer connEstablishTimer, - AtomicInteger connsInPool, AtomicInteger connsInUse) - { + public PerServerConnectionPool( + Server server, + ServerStats stats, + InstanceInfo instanceInfo, + SocketAddress serverAddr, + NettyClientConnectionFactory connectionFactory, + PooledConnectionFactory pooledConnectionFactory, + ConnectionPoolConfig config, + IClientConfig niwsClientConfig, + Counter createNewConnCounter, + Counter createConnSucceededCounter, + Counter createConnFailedCounter, + Counter requestConnCounter, Counter reuseConnCounter, + Counter connTakenFromPoolIsNotOpen, + Counter maxConnsPerHostExceededCounter, + Timer connEstablishTimer, + AtomicInteger connsInPool, + AtomicInteger connsInUse) { this.server = server; this.stats = stats; this.instanceInfo = instanceInfo; + // Note: child classes can sometimes connect to different addresses than + this.serverAddr = Objects.requireNonNull(serverAddr, "serverAddr"); this.connectionFactory = connectionFactory; this.pooledConnectionFactory = pooledConnectionFactory; this.config = config; @@ -126,21 +133,14 @@ public IClientConfig getNiwsClientConfig() return niwsClientConfig; } - public Server getServer() - { - return server; - } - @Override public boolean isAvailable() { return true; } - /** function to run when a connection is acquired before returning it to caller. */ - private void onAcquire(final PooledConnection conn, String httpMethod, String uriStr, - int attemptNum, CurrentPassport passport) + private void onAcquire(final PooledConnection conn, CurrentPassport passport) { passport.setOnChannel(conn.getChannel()); removeIdleStateHandler(conn); @@ -154,10 +154,8 @@ protected void removeIdleStateHandler(PooledConnection conn) { } @Override - public Promise acquire(EventLoop eventLoop, Object key, String httpMethod, String uri, - int attemptNum, CurrentPassport passport, - AtomicReference selectedHostAddr) - { + public Promise acquire( + EventLoop eventLoop, CurrentPassport passport, AtomicReference selectedHostAddr) { requestConnCounter.increment(); stats.incrementActiveRequestsCount(); @@ -170,13 +168,15 @@ public Promise acquire(EventLoop eventLoop, Object key, String conn.startRequestTimer(); conn.incrementUsageCount(); conn.getChannel().read(); - onAcquire(conn, httpMethod, uri, attemptNum, passport); + onAcquire(conn, passport); initPooledConnection(conn, promise); - selectedHostAddr.set(getHostFromServer(conn.getServer())); + // TODO(carl-mastrangelo): it is unclear what the use of this. I am recording the port now too, not sure + // if this is incorrect. + selectedHostAddr.set(serverAddr.toString()); } else { // connection pool empty, create new connection using client connection factory. - tryMakingNewConnection(eventLoop, promise, httpMethod, uri, attemptNum, passport, selectedHostAddr); + tryMakingNewConnection(eventLoop, promise, passport, selectedHostAddr); } return promise; @@ -228,10 +228,9 @@ protected Deque getPoolForEventLoop(EventLoop eventLoop) return pool; } - protected void tryMakingNewConnection(final EventLoop eventLoop, final Promise promise, - final String httpMethod, final String uri, final int attemptNum, - final CurrentPassport passport, final AtomicReference selectedHostAddr) - { + protected void tryMakingNewConnection( + EventLoop eventLoop, Promise promise, CurrentPassport passport, + AtomicReference selectedHostAddr) { // Enforce MaxConnectionsPerHost config. int maxConnectionsPerHost = config.maxConnectionsPerHost(); int openAndOpeningConnectionCount = stats.getOpenConnectionsCount() + connCreationsInProgress.get(); @@ -254,22 +253,20 @@ protected void tryMakingNewConnection(final EventLoop eventLoop, final Promise

{ try { endConnEstablishTimer(timing); - handleConnectCompletion((ChannelFuture) future, promise, httpMethod, uri, attemptNum, passport); + handleConnectCompletion((ChannelFuture) future, promise, passport); } catch (Throwable e) { if (! promise.isDone()) { @@ -289,8 +286,8 @@ protected void tryMakingNewConnection(final EventLoop eventLoop, final Promise

callerPromise, - final String httpMethod, - final String uri, - final int attemptNum, - final CurrentPassport passport) - { + protected void handleConnectCompletion( + ChannelFuture cf, Promise callerPromise, CurrentPassport passport) { connCreationsInProgress.decrementAndGet(); if (cf.isSuccess()) { @@ -341,7 +315,7 @@ protected void handleConnectCompletion(final ChannelFuture cf, createConnSucceededCounter.increment(); connsInUse.incrementAndGet(); - createConnection(cf, callerPromise, httpMethod, uri, attemptNum, passport); + createConnection(cf, callerPromise, passport); } else { stats.incrementSuccessiveConnectionFailureCount(); @@ -352,14 +326,14 @@ protected void handleConnectCompletion(final ChannelFuture cf, } } - protected void createConnection(ChannelFuture cf, Promise callerPromise, String httpMethod, String uri, - int attemptNum, CurrentPassport passport) { + protected void createConnection( + ChannelFuture cf, Promise callerPromise, CurrentPassport passport) { final PooledConnection conn = pooledConnectionFactory.create(cf.channel()); conn.incrementUsageCount(); conn.startRequestTimer(); conn.getChannel().read(); - onAcquire(conn, httpMethod, uri, attemptNum, passport); + onAcquire(conn, passport); callerPromise.setSuccess(conn); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java index 66e96f0c..50235a60 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java @@ -116,7 +116,7 @@ public void channelRead(final ChannelHandlerContext ctx, Object msg) throws Exce if (clientRequest.decoderResult().isFailure()) { String errorMsg = "Invalid http request. " + "clientRequest = " + clientRequest.toString() - + ", uri = " + String.valueOf(clientRequest.uri()) + + ", uri = " + clientRequest.uri() + ", info = " + ChannelUtils.channelInfoForLogging(ctx.channel()); String causeMsg = String.valueOf(clientRequest.decoderResult().cause()); final ZuulException ze = new ZuulException(errorMsg, causeMsg, true); @@ -235,7 +235,8 @@ private void handleExpect100Continue(ChannelHandlerContext ctx, HttpRequest req) } // Build a ZuulMessage from the netty request. - private HttpRequestMessage buildZuulHttpRequest(final HttpRequest nativeRequest, final ChannelHandlerContext clientCtx) { + private HttpRequestMessage buildZuulHttpRequest( + final HttpRequest nativeRequest, final ChannelHandlerContext clientCtx) { // Setup the context for this request. final SessionContext context; if (decorator != null) { // Optionally decorate the context. diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java index 844d6047..cf89c0f7 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java @@ -117,11 +117,10 @@ public boolean isCold() { } @Override - public Promise connectToOrigin(HttpRequestMessage zuulReq, EventLoop eventLoop, int attemptNumber, - CurrentPassport passport, AtomicReference chosenServer, - AtomicReference chosenHostAddr) { - return clientChannelManager.acquire(eventLoop, null, zuulReq.getMethod().toUpperCase(), - zuulReq.getPath(), attemptNumber, passport, chosenServer, chosenHostAddr); + public Promise connectToOrigin( + HttpRequestMessage zuulReq, EventLoop eventLoop, int attemptNumber, CurrentPassport passport, + AtomicReference chosenServer, AtomicReference chosenHostAddr) { + return clientChannelManager.acquire(eventLoop, null, passport, chosenServer, chosenHostAddr); } @Override From 30b612fcafa86d5ad9f1795f2b3cedb1e3df9e24 Mon Sep 17 00:00:00 2001 From: Argha C <007.argha@gmail.com> Date: Wed, 19 Feb 2020 16:01:25 -0800 Subject: [PATCH 005/273] Refactor channel handler for proxy protocol. ElbProxyProtocolChannelHandler is reduced to a decision maker and either delegates to the relevant handlers or removes itself from the pipeline --- .../ElbProxyProtocolChannelHandler.java | 139 +++--------------- .../HAProxyMessageChannelHandler.java | 119 +++++++++++++++ .../OptionalHAProxyMessageDecoder.java | 80 ---------- .../server/http2/Http2StreamInitializer.java | 12 +- .../OptionalHAProxyMessageDecoderTest.java | 133 ----------------- .../ElbProxyProtocolChannelHandlerTest.java | 60 +++++--- .../BaseZuulChannelInitializerTest.java | 3 - 7 files changed, 186 insertions(+), 360 deletions(-) create mode 100644 zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java delete mode 100644 zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/OptionalHAProxyMessageDecoder.java delete mode 100644 zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/OptionalHAProxyMessageDecoderTest.java diff --git a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java index 5af8414e..0b30ad3e 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java @@ -16,142 +16,43 @@ package com.netflix.netty.common.proxyprotocol; -import com.google.common.net.InetAddresses; -import com.netflix.netty.common.SourceAddressChannelHandler; -import io.netty.channel.Channel; -import io.netty.channel.ChannelFutureListener; +import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.channel.ChannelPipeline; -import io.netty.handler.codec.haproxy.HAProxyMessage; -import io.netty.handler.codec.haproxy.HAProxyProtocolVersion; -import io.netty.util.AttributeKey; - -import java.net.InetSocketAddress; -import java.net.SocketAddress; - -import io.netty.util.ReferenceCounted; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import io.netty.handler.codec.ProtocolDetectionState; +import io.netty.handler.codec.haproxy.HAProxyMessageDecoder; /** - * Copies any decoded HAProxyMessage into the channel attributes, and doesn't pass - * it any further along the pipeline. - * - * Use in conjunction with OptionalHAProxyMessageDecoder if ProxyProtocol is enabled on the ELB. - * - * User: michaels@netflix.com - * Date: 3/24/16 - * Time: 11:59 AM + * Decides if we need to decode a HAProxyMessage. If so, adds the decoder followed by the handler. + * Else, removes itself from the pipeline. + * User: arghac@netflix.com Date: 02/19/2020 */ -public class ElbProxyProtocolChannelHandler extends ChannelInboundHandlerAdapter -{ - public static final String NAME = "ElbProxyProtocolChannelHandler"; - public static final AttributeKey ATTR_HAPROXY_MESSAGE = AttributeKey.newInstance("_haproxy_message"); - public static final AttributeKey ATTR_HAPROXY_VERSION = AttributeKey.newInstance("_haproxy_version"); - - private static final Logger logger = LoggerFactory.getLogger("ElbProxyProtocolChannelHandler"); +public class ElbProxyProtocolChannelHandler extends ChannelInboundHandlerAdapter { + public static final String NAME = "ElbProxyProtocolChannelHandler"; private final boolean withProxyProtocol; - public ElbProxyProtocolChannelHandler(boolean withProxyProtocol) - { + public ElbProxyProtocolChannelHandler(boolean withProxyProtocol) { this.withProxyProtocol = withProxyProtocol; } - /** - * Setup the required handlers on pipeline using this method. - * - * @param pipeline - */ - public void addProxyProtocol(ChannelPipeline pipeline) - { + public void addProxyProtocol(ChannelPipeline pipeline) { pipeline.addLast(NAME, this); - - if (withProxyProtocol) { - pipeline.addBefore(NAME, OptionalHAProxyMessageDecoder.NAME, new OptionalHAProxyMessageDecoder()); - } } @Override - public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception - { - if (withProxyProtocol) { - if (msg instanceof HAProxyMessage && msg != null) { - HAProxyMessage hapm = (HAProxyMessage) msg; - Channel channel = ctx.channel(); - channel.attr(ATTR_HAPROXY_MESSAGE).set(hapm); - ctx.channel().closeFuture().addListener((ChannelFutureListener) future -> { - if (hapm instanceof ReferenceCounted) { - hapm.release(); - } - }); - channel.attr(ATTR_HAPROXY_VERSION).set(hapm.protocolVersion()); - // Get the real host and port that the client connected to ELB with. - String destinationAddress = hapm.destinationAddress(); - if (destinationAddress != null) { - channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDRESS).set(destinationAddress); - channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_PORT).set(hapm.destinationPort()); - - SocketAddress addr; - out: { - switch (hapm.proxiedProtocol()) { - case UNKNOWN: - throw new IllegalArgumentException("unknown proxy protocl" + destinationAddress); - case TCP4: - case TCP6: - addr = new InetSocketAddress( - InetAddresses.forString(destinationAddress), hapm.destinationPort()); - break out; - case UNIX_STREAM: // TODO: implement - case UDP4: - case UDP6: - case UNIX_DGRAM: - throw new IllegalArgumentException("unknown proxy protocol" + destinationAddress); - } - throw new AssertionError(hapm.proxiedProtocol()); - } - channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDR).set(addr); - } - - // Get the real client IP from the ProxyProtocol message sent by the ELB, and overwrite the SourceAddress - // channel attribute. - String sourceAddress = hapm.sourceAddress(); - if (sourceAddress != null) { - channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS).set(sourceAddress); - channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_PORT).set(hapm.sourcePort()); - - SocketAddress addr; - out: { - switch (hapm.proxiedProtocol()) { - case UNKNOWN: - throw new IllegalArgumentException("unknown proxy protocl" + sourceAddress); - case TCP4: - case TCP6: - addr = new InetSocketAddress( - InetAddresses.forString(sourceAddress), hapm.sourcePort()); - break out; - case UNIX_STREAM: // TODO: implement - case UDP4: - case UDP6: - case UNIX_DGRAM: - throw new IllegalArgumentException("unknown proxy protocol" + sourceAddress); - } - throw new AssertionError(hapm.proxiedProtocol()); - } - channel.attr(SourceAddressChannelHandler.ATTR_REMOTE_ADDR).set(addr); - } - - // TODO - fire an additional event to notify interested parties that we now know the IP? - - // Remove ourselves (this handler) from the channel now, as no more work to do. - ctx.pipeline().remove(this); - - // Do not continue propagating the message. - return; - } + public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { + if (withProxyProtocol && isHAPMDetected(msg)) { + ctx.pipeline().addAfter(NAME, null, new HAProxyMessageChannelHandler()) + .replace(this, null, new HAProxyMessageDecoder()); + } else { + ctx.pipeline().remove(this); } - super.channelRead(ctx, msg); } + + private boolean isHAPMDetected(Object msg) { + return HAProxyMessageDecoder.detectProtocol((ByteBuf) msg).state() == ProtocolDetectionState.DETECTED; + } } diff --git a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java new file mode 100644 index 00000000..03261164 --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java @@ -0,0 +1,119 @@ +/* + * Copyright 2018 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.netty.common.proxyprotocol; + +import com.google.common.net.InetAddresses; +import com.netflix.netty.common.SourceAddressChannelHandler; +import io.netty.channel.Channel; +import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelInboundHandlerAdapter; +import io.netty.handler.codec.haproxy.HAProxyMessage; +import io.netty.handler.codec.haproxy.HAProxyProtocolVersion; +import io.netty.util.AttributeKey; +import io.netty.util.ReferenceCounted; +import java.net.InetSocketAddress; +import java.net.SocketAddress; + +/** + * Copies any decoded HAProxyMessage into the channel attributes, and doesn't pass it any further along the pipeline. + * Use in conjunction with HAProxyMessageDecoder if proxy protocol is enabled on the ELB. + * User: michaels@netflix.com Date: 3/24/16 Time: 11:59 AM + */ + +public class HAProxyMessageChannelHandler extends ChannelInboundHandlerAdapter { + public static final AttributeKey ATTR_HAPROXY_MESSAGE = AttributeKey.newInstance("_haproxy_message"); + public static final AttributeKey ATTR_HAPROXY_VERSION = AttributeKey.newInstance("_haproxy_version"); + + + @Override + public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { + if (msg instanceof HAProxyMessage && msg != null) { + HAProxyMessage hapm = (HAProxyMessage) msg; + Channel channel = ctx.channel(); + channel.attr(ATTR_HAPROXY_MESSAGE).set(hapm); + ctx.channel().closeFuture().addListener((ChannelFutureListener) future -> { + if (hapm instanceof ReferenceCounted) { + hapm.release(); + } + }); + channel.attr(ATTR_HAPROXY_VERSION).set(hapm.protocolVersion()); + // Get the real host and port that the client connected to ELB with. + String destinationAddress = hapm.destinationAddress(); + if (destinationAddress != null) { + channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDRESS).set(destinationAddress); + channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_PORT).set(hapm.destinationPort()); + + SocketAddress addr; + out: { + switch (hapm.proxiedProtocol()) { + case UNKNOWN: + throw new IllegalArgumentException("unknown proxy protocl" + destinationAddress); + case TCP4: + case TCP6: + addr = new InetSocketAddress( + InetAddresses.forString(destinationAddress), hapm.destinationPort()); + break out; + case UNIX_STREAM: // TODO: implement + case UDP4: + case UDP6: + case UNIX_DGRAM: + throw new IllegalArgumentException("unknown proxy protocol" + destinationAddress); + } + throw new AssertionError(hapm.proxiedProtocol()); + } + channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDR).set(addr); + } + + // Get the real client IP from the ProxyProtocol message sent by the ELB, and overwrite the SourceAddress + // channel attribute. + String sourceAddress = hapm.sourceAddress(); + if (sourceAddress != null) { + channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS).set(sourceAddress); + channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_PORT).set(hapm.sourcePort()); + + SocketAddress addr; + out: { + switch (hapm.proxiedProtocol()) { + case UNKNOWN: + throw new IllegalArgumentException("unknown proxy protocl" + sourceAddress); + case TCP4: + case TCP6: + addr = new InetSocketAddress( + InetAddresses.forString(sourceAddress), hapm.sourcePort()); + break out; + case UNIX_STREAM: // TODO: implement + case UDP4: + case UDP6: + case UNIX_DGRAM: + throw new IllegalArgumentException("unknown proxy protocol" + sourceAddress); + } + throw new AssertionError(hapm.proxiedProtocol()); + } + channel.attr(SourceAddressChannelHandler.ATTR_REMOTE_ADDR).set(addr); + } + + // TODO - fire an additional event to notify interested parties that we now know the IP? + + // Remove ourselves (this handler) from the channel now, as no more work to do. + ctx.pipeline().remove(this); + + // Do not continue propagating the message. + return; + } + } +} diff --git a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/OptionalHAProxyMessageDecoder.java b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/OptionalHAProxyMessageDecoder.java deleted file mode 100644 index 0455fe71..00000000 --- a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/OptionalHAProxyMessageDecoder.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2018 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.netty.common.proxyprotocol; - -import com.netflix.config.CachedDynamicBooleanProperty; -import io.netty.buffer.ByteBuf; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInboundHandlerAdapter; -import io.netty.handler.codec.ProtocolDetectionResult; -import io.netty.handler.codec.ProtocolDetectionState; -import io.netty.handler.codec.haproxy.HAProxyMessageDecoder; -import io.netty.handler.codec.haproxy.HAProxyProtocolVersion; -import io.netty.util.CharsetUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Chooses whether a new connection is prefixed with the ProxyProtocol from an ELB. If it is, then - * it adds a HAProxyMessageDecoder into the pipeline after THIS handler. - * - * User: michaels@netflix.com - * Date: 3/24/16 - * Time: 3:13 PM - */ -public final class OptionalHAProxyMessageDecoder extends ChannelInboundHandlerAdapter -{ - // TODO(carl-mastrangelo): delete the name, as the class name is good enough. - public static final String NAME = "OptionalHAProxyMessageDecoder"; - private static final Logger logger = LoggerFactory.getLogger("OptionalHAProxyMessageDecoder"); - - // TODO(https://github.com/Netflix/zuul/issues/623): delete this property - private static final CachedDynamicBooleanProperty dumpHAProxyByteBuf = - new CachedDynamicBooleanProperty("zuul.haproxy.dump.bytebuf", false); - - OptionalHAProxyMessageDecoder() {} - - @Override - public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception - { - if (msg instanceof ByteBuf) { - try { - ProtocolDetectionResult result = HAProxyMessageDecoder.detectProtocol((ByteBuf) msg); - - // TODO - is it possible that this message could be split over multiple ByteBufS, and therefore this would fail? - if (result.state() == ProtocolDetectionState.DETECTED) { - // Add the actual HAProxy decoder. - // Note that the HAProxyMessageDecoder will remove itself once it has finished decoding the initial ProxyProtocol message(s). - ctx.pipeline().addAfter(NAME, null, new HAProxyMessageDecoder()); - - // Remove this handler, as now no longer needed. - ctx.pipeline().remove(this); - } - } catch (Exception e) { - if (msg != null) { - logger.error("Exception in OptionalHAProxyMessageDecoder {}" + e.getClass().getCanonicalName()); - if (dumpHAProxyByteBuf.get()) { - logger.error("Exception Stack: {}" + e.getStackTrace()); - logger.error("Bytebuf is: {} " + ((ByteBuf) msg).toString(CharsetUtil.US_ASCII)); - } - ((ByteBuf) msg).release(); - } - } - } - super.channelRead(ctx, msg); - } -} diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java index a1691829..66ed3a8d 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java @@ -16,9 +16,12 @@ package com.netflix.zuul.netty.server.http2; +import static com.netflix.zuul.netty.server.http2.Http2OrHttpHandler.PROTOCOL_NAME; import com.netflix.netty.common.Http2ConnectionCloseHandler; import com.netflix.netty.common.Http2ConnectionExpiryHandler; +import com.netflix.netty.common.SourceAddressChannelHandler; import com.netflix.netty.common.metrics.Http2MetricsChannelHandlers; +import com.netflix.netty.common.proxyprotocol.HAProxyMessageChannelHandler; import com.netflix.zuul.netty.server.BaseZuulChannelInitializer; import com.netflix.zuul.netty.server.ssl.SslHandshakeInfoHandler; import io.netty.channel.Channel; @@ -28,13 +31,8 @@ import io.netty.channel.ChannelPipeline; import io.netty.handler.codec.http2.Http2StreamFrameToHttpObjectCodec; import io.netty.util.AttributeKey; -import com.netflix.netty.common.SourceAddressChannelHandler; -import com.netflix.netty.common.proxyprotocol.ElbProxyProtocolChannelHandler; - import java.util.function.Consumer; -import static com.netflix.zuul.netty.server.http2.Http2OrHttpHandler.PROTOCOL_NAME; - /** * TODO - can this be done when we create the Http2StreamChannelBootstrap instead now? */ @@ -103,8 +101,8 @@ protected void copyAttrsFromParentChannel(Channel parent, Channel child) PROTOCOL_NAME, SslHandshakeInfoHandler.ATTR_SSL_INFO, - ElbProxyProtocolChannelHandler.ATTR_HAPROXY_MESSAGE, - ElbProxyProtocolChannelHandler.ATTR_HAPROXY_VERSION, + HAProxyMessageChannelHandler.ATTR_HAPROXY_MESSAGE, + HAProxyMessageChannelHandler.ATTR_HAPROXY_VERSION, BaseZuulChannelInitializer.ATTR_CHANNEL_CONFIG }; diff --git a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/OptionalHAProxyMessageDecoderTest.java b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/OptionalHAProxyMessageDecoderTest.java deleted file mode 100644 index eebf3fc7..00000000 --- a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/OptionalHAProxyMessageDecoderTest.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright 2019 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.netty.common.proxyprotocol; - -import io.netty.buffer.ByteBuf; -import io.netty.buffer.ByteBufUtil; -import io.netty.buffer.Unpooled; -import io.netty.channel.embedded.EmbeddedChannel; -import io.netty.handler.codec.haproxy.HAProxyMessage; -import io.netty.util.ReferenceCounted; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -import java.nio.charset.StandardCharsets; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -/** - * Unit tests for {@link OptionalHAProxyMessageDecoder}. - */ -@RunWith(JUnit4.class) -public class OptionalHAProxyMessageDecoderTest { - @Test - public void detectsPpv1Message() { - OptionalHAProxyMessageDecoder decoder = new OptionalHAProxyMessageDecoder(); - EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(OptionalHAProxyMessageDecoder.NAME, decoder); - - ByteBuf buf = Unpooled.wrappedBuffer( - "PROXY TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); - channel.writeInbound(buf); - - Object msg = channel.readInbound(); - HAProxyMessage hapm = (HAProxyMessage) msg; - - // The handler should remove itself. - assertNull(channel.pipeline().context(OptionalHAProxyMessageDecoder.NAME)); - - // TODO(carl-mastrangelo): make this always happen once netty has been upgraded. - if (hapm instanceof ReferenceCounted) { - hapm.release(); - } - } - - @Test - @Ignore // TODO(carl-mastrangelo): reenable this. - public void detectsSplitPpv1Message() { - OptionalHAProxyMessageDecoder decoder = new OptionalHAProxyMessageDecoder(); - EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(OptionalHAProxyMessageDecoder.NAME, decoder); - - ByteBuf buf1 = Unpooled.wrappedBuffer( - "PROXY TCP4".getBytes(StandardCharsets.US_ASCII)); - channel.writeInbound(buf1); - ByteBuf buf2 = Unpooled.wrappedBuffer( - "192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); - channel.writeInbound(buf2); - - Object msg = channel.readInbound(); - HAProxyMessage hapm = (HAProxyMessage) msg; - - // The handler should remove itself. - assertNull(channel.pipeline().context(OptionalHAProxyMessageDecoder.NAME)); - - // TODO(carl-mastrangelo): make this always happen once netty has been upgraded. - if (hapm instanceof ReferenceCounted) { - hapm.release(); - } - } - - @Test - public void extraDataForwarded() { - OptionalHAProxyMessageDecoder decoder = new OptionalHAProxyMessageDecoder(); - EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(OptionalHAProxyMessageDecoder.NAME, decoder); - - ByteBuf buf = Unpooled.wrappedBuffer( - "PROXY TCP4 192.168.0.1 124.123.111.111 10008 443\r\nPOTATO".getBytes(StandardCharsets.US_ASCII)); - channel.writeInbound(buf); - - Object msg = channel.readInbound(); - HAProxyMessage hapm = (HAProxyMessage) msg; - - // The handler should remove itself. - assertNull(channel.pipeline().context(OptionalHAProxyMessageDecoder.NAME)); - - // TODO(carl-mastrangelo): make this always happen once netty has been upgraded. - if (hapm instanceof ReferenceCounted) { - hapm.release(); - } - - Object msg2 = channel.readInbound(); - ByteBuf readBuf = (ByteBuf) msg2; - assertEquals("POTATO", new String(ByteBufUtil.getBytes(readBuf), StandardCharsets.US_ASCII)); - readBuf.release(); - } - - @Test - public void ignoresNonPpMessage() { - OptionalHAProxyMessageDecoder decoder = new OptionalHAProxyMessageDecoder(); - EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(OptionalHAProxyMessageDecoder.NAME, decoder); - - ByteBuf buf = Unpooled.wrappedBuffer( - "BOGUS TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); - channel.writeInbound(buf); - - Object msg = channel.readInbound(); - ByteBuf readBuf = (ByteBuf) msg; - readBuf.release(); - - // TODO(carl-mastrangelo): this is wrong, it should remove itself. Change it. - assertNotNull(channel.pipeline().context(OptionalHAProxyMessageDecoder.NAME)); - } -} diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java index 75426922..f1902bae 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java @@ -16,24 +16,23 @@ package com.netflix.zuul.netty.common.proxyprotocol; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; import com.google.common.net.InetAddresses; import com.netflix.netty.common.SourceAddressChannelHandler; import com.netflix.netty.common.proxyprotocol.ElbProxyProtocolChannelHandler; +import com.netflix.netty.common.proxyprotocol.HAProxyMessageChannelHandler; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.embedded.EmbeddedChannel; import io.netty.handler.codec.haproxy.HAProxyProtocolVersion; import java.net.InetSocketAddress; +import java.nio.charset.StandardCharsets; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import java.nio.charset.StandardCharsets; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - @RunWith(JUnit4.class) public class ElbProxyProtocolChannelHandlerTest { @@ -49,10 +48,35 @@ public void noProxy() { Object dropped = channel.readInbound(); assertEquals(dropped, buf); - // TODO(carl-mastrangelo): the handler should remove itself, but it currently doesn't. - assertNotNull(channel.pipeline().context(ElbProxyProtocolChannelHandler.NAME)); - assertNull(channel.attr(ElbProxyProtocolChannelHandler.ATTR_HAPROXY_VERSION).get()); - assertNull(channel.attr(ElbProxyProtocolChannelHandler.ATTR_HAPROXY_MESSAGE).get()); + assertNull(channel.pipeline().context(ElbProxyProtocolChannelHandler.NAME)); + assertNull(channel.pipeline().context("HAProxyMessageChannelHandler")); + assertNull(channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_VERSION).get()); + assertNull(channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_MESSAGE).get()); + assertNull(channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDRESS).get()); + assertNull(channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDR).get()); + assertNull(channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_PORT).get()); + assertNull(channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS).get()); + assertNull(channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_PORT).get()); + assertNull(channel.attr(SourceAddressChannelHandler.ATTR_REMOTE_ADDR).get()); + + } + + @Test + public void passThrough_ProxyProtocolEnabled_nonProxyBytes() { + ElbProxyProtocolChannelHandler handler = new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ true); + EmbeddedChannel channel = new EmbeddedChannel(); + handler.addProxyProtocol(channel.pipeline()); + ByteBuf buf = Unpooled.wrappedBuffer( + "TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); + channel.writeInbound(buf); + + Object dropped = channel.readInbound(); + assertEquals(dropped, buf); + + assertNull(channel.pipeline().context(ElbProxyProtocolChannelHandler.NAME)); + assertNull(channel.pipeline().context("HAProxyMessageChannelHandler")); + assertNull(channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_VERSION).get()); + assertNull(channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_MESSAGE).get()); assertNull(channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDRESS).get()); assertNull(channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDR).get()); assertNull(channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_PORT).get()); @@ -76,11 +100,11 @@ public void negotiateProxy_ppv1_ipv4() { // The handler should remove itself. assertNull(channel.pipeline().context(ElbProxyProtocolChannelHandler.NAME)); - assertEquals( - HAProxyProtocolVersion.V1, channel.attr(ElbProxyProtocolChannelHandler.ATTR_HAPROXY_VERSION).get()); + assertNull(channel.pipeline().context("HAProxyMessageChannelHandler")); + assertEquals(HAProxyProtocolVersion.V1, channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_VERSION).get()); // TODO(carl-mastrangelo): this check is in place, but it should be removed. The message is not properly GC'd // in later versions of netty. - assertNotNull(channel.attr(ElbProxyProtocolChannelHandler.ATTR_HAPROXY_MESSAGE).get()); + assertNotNull(channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_MESSAGE).get()); assertEquals("124.123.111.111", channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDRESS).get()); assertEquals( new InetSocketAddress(InetAddresses.forString("124.123.111.111"), 443), @@ -108,10 +132,10 @@ public void negotiateProxy_ppv1_ipv6() { // The handler should remove itself. assertNull(channel.pipeline().context(ElbProxyProtocolChannelHandler.NAME)); assertEquals( - HAProxyProtocolVersion.V1, channel.attr(ElbProxyProtocolChannelHandler.ATTR_HAPROXY_VERSION).get()); + HAProxyProtocolVersion.V1, channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_VERSION).get()); // TODO(carl-mastrangelo): this check is in place, but it should be removed. The message is not properly GC'd // in later versions of netty. - assertNotNull(channel.attr(ElbProxyProtocolChannelHandler.ATTR_HAPROXY_MESSAGE).get()); + assertNotNull(channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_MESSAGE).get()); assertEquals("::2", channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDRESS).get()); assertEquals( new InetSocketAddress(InetAddresses.forString("::2"), 443), @@ -132,7 +156,7 @@ public void negotiateProxy_ppv2_ipv4() { ByteBuf buf = Unpooled.wrappedBuffer( new byte[]{0x0D, 0x0A, 0x0D, 0x0A, 0x00, 0x0D, 0x0A, 0x51, 0x55, 0x49, 0x54, 0x0A, 0x21, 0x11, 0x00, - 0x0C, (byte) 0xC0, (byte) 0xA8, 0x00, 0x01, 0x7C, 0x7B, 0x6F, 0x6F, 0x27, 0x18, 0x01, + 0x0C, (byte) 0xC0, (byte) 0xA8, 0x00, 0x01, 0x7C, 0x7B, 0x6F, 0x6F, 0x27, 0x18, 0x01, (byte) 0xbb}); channel.writeInbound(buf); @@ -142,10 +166,10 @@ public void negotiateProxy_ppv2_ipv4() { // The handler should remove itself. assertNull(channel.pipeline().context(ElbProxyProtocolChannelHandler.NAME)); assertEquals( - HAProxyProtocolVersion.V2, channel.attr(ElbProxyProtocolChannelHandler.ATTR_HAPROXY_VERSION).get()); + HAProxyProtocolVersion.V2, channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_VERSION).get()); // TODO(carl-mastrangelo): this check is in place, but it should be removed. The message is not properly GC'd // in later versions of netty. - assertNotNull(channel.attr(ElbProxyProtocolChannelHandler.ATTR_HAPROXY_MESSAGE).get()); + assertNotNull(channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_MESSAGE).get()); assertEquals("124.123.111.111", channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDRESS).get()); assertEquals( new InetSocketAddress(InetAddresses.forString("124.123.111.111"), 443), diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializerTest.java index 430f44f1..6f67402e 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializerTest.java @@ -22,7 +22,6 @@ import com.netflix.netty.common.metrics.PerEventLoopMetricsChannelHandler; import com.netflix.netty.common.metrics.ServerChannelMetrics; import com.netflix.netty.common.proxyprotocol.ElbProxyProtocolChannelHandler; -import com.netflix.netty.common.proxyprotocol.OptionalHAProxyMessageDecoder; import com.netflix.netty.common.throttle.MaxInboundConnectionsHandler; import com.netflix.spectator.api.NoopRegistry; import com.netflix.zuul.netty.ratelimiting.NullChannelHandlerProvider; @@ -68,7 +67,6 @@ protected void initChannel(Channel ch) {} assertNotNull(channel.pipeline().context(ServerChannelMetrics.class)); assertNotNull(channel.pipeline().context(PerEventLoopMetricsChannelHandler.Connections.class)); assertNotNull(channel.pipeline().context(ElbProxyProtocolChannelHandler.NAME)); - assertNull(channel.pipeline().context(OptionalHAProxyMessageDecoder.NAME)); assertNotNull(channel.pipeline().context(MaxInboundConnectionsHandler.class)); } @@ -97,7 +95,6 @@ protected void initChannel(Channel ch) {} assertNotNull(channel.pipeline().context(ServerChannelMetrics.class)); assertNotNull(channel.pipeline().context(PerEventLoopMetricsChannelHandler.Connections.class)); assertNotNull(channel.pipeline().context(ElbProxyProtocolChannelHandler.NAME)); - assertNotNull(channel.pipeline().context(OptionalHAProxyMessageDecoder.NAME)); assertNotNull(channel.pipeline().context(MaxInboundConnectionsHandler.class)); } } From 31d64e7f560fe50e574408ecf7004d7d3eb80fc8 Mon Sep 17 00:00:00 2001 From: Argha C <007.argha@gmail.com> Date: Thu, 20 Feb 2020 09:57:05 -0800 Subject: [PATCH 006/273] Address comments. Refactor and move test to correct package --- .../ElbProxyProtocolChannelHandler.java | 5 +- .../HAProxyMessageChannelHandler.java | 24 ++++----- .../ElbProxyProtocolChannelHandlerTest.java | 51 +++++++++++++------ 3 files changed, 49 insertions(+), 31 deletions(-) rename zuul-core/src/test/java/com/netflix/{zuul => }/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java (82%) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java index 0b30ad3e..81699e1a 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java @@ -26,11 +26,10 @@ /** * Decides if we need to decode a HAProxyMessage. If so, adds the decoder followed by the handler. * Else, removes itself from the pipeline. - * User: arghac@netflix.com Date: 02/19/2020 */ -public class ElbProxyProtocolChannelHandler extends ChannelInboundHandlerAdapter { +public final class ElbProxyProtocolChannelHandler extends ChannelInboundHandlerAdapter { - public static final String NAME = "ElbProxyProtocolChannelHandler"; + public static final String NAME = ElbProxyProtocolChannelHandler.class.getSimpleName(); private final boolean withProxyProtocol; public ElbProxyProtocolChannelHandler(boolean withProxyProtocol) { diff --git a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java index 03261164..0b83ecfa 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java @@ -32,25 +32,23 @@ /** * Copies any decoded HAProxyMessage into the channel attributes, and doesn't pass it any further along the pipeline. * Use in conjunction with HAProxyMessageDecoder if proxy protocol is enabled on the ELB. - * User: michaels@netflix.com Date: 3/24/16 Time: 11:59 AM */ -public class HAProxyMessageChannelHandler extends ChannelInboundHandlerAdapter { - public static final AttributeKey ATTR_HAPROXY_MESSAGE = AttributeKey.newInstance("_haproxy_message"); - public static final AttributeKey ATTR_HAPROXY_VERSION = AttributeKey.newInstance("_haproxy_version"); +public final class HAProxyMessageChannelHandler extends ChannelInboundHandlerAdapter { + + public static final AttributeKey ATTR_HAPROXY_MESSAGE = AttributeKey + .newInstance("_haproxy_message"); + public static final AttributeKey ATTR_HAPROXY_VERSION = AttributeKey + .newInstance("_haproxy_version"); @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { - if (msg instanceof HAProxyMessage && msg != null) { + if (msg instanceof HAProxyMessage) { HAProxyMessage hapm = (HAProxyMessage) msg; Channel channel = ctx.channel(); channel.attr(ATTR_HAPROXY_MESSAGE).set(hapm); - ctx.channel().closeFuture().addListener((ChannelFutureListener) future -> { - if (hapm instanceof ReferenceCounted) { - hapm.release(); - } - }); + ctx.channel().closeFuture().addListener((ChannelFutureListener) future -> hapm.release()); channel.attr(ATTR_HAPROXY_VERSION).set(hapm.protocolVersion()); // Get the real host and port that the client connected to ELB with. String destinationAddress = hapm.destinationAddress(); @@ -59,7 +57,8 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_PORT).set(hapm.destinationPort()); SocketAddress addr; - out: { + out: + { switch (hapm.proxiedProtocol()) { case UNKNOWN: throw new IllegalArgumentException("unknown proxy protocl" + destinationAddress); @@ -87,7 +86,8 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_PORT).set(hapm.sourcePort()); SocketAddress addr; - out: { + out: + { switch (hapm.proxiedProtocol()) { case UNKNOWN: throw new IllegalArgumentException("unknown proxy protocl" + sourceAddress); diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java similarity index 82% rename from zuul-core/src/test/java/com/netflix/zuul/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java rename to zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java index f1902bae..5a2d62f0 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java @@ -14,21 +14,23 @@ * limitations under the License. */ -package com.netflix.zuul.netty.common.proxyprotocol; +package com.netflix.netty.common.proxyprotocol; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import com.google.common.net.InetAddresses; import com.netflix.netty.common.SourceAddressChannelHandler; -import com.netflix.netty.common.proxyprotocol.ElbProxyProtocolChannelHandler; -import com.netflix.netty.common.proxyprotocol.HAProxyMessageChannelHandler; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.embedded.EmbeddedChannel; +import io.netty.handler.codec.haproxy.HAProxyMessage; import io.netty.handler.codec.haproxy.HAProxyProtocolVersion; import java.net.InetSocketAddress; import java.nio.charset.StandardCharsets; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -38,9 +40,9 @@ public class ElbProxyProtocolChannelHandlerTest { @Test public void noProxy() { - ElbProxyProtocolChannelHandler handler = new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ false); EmbeddedChannel channel = new EmbeddedChannel(); - handler.addProxyProtocol(channel.pipeline()); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, + new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ false)); ByteBuf buf = Unpooled.wrappedBuffer( "PROXY TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf); @@ -58,14 +60,13 @@ public void noProxy() { assertNull(channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS).get()); assertNull(channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_PORT).get()); assertNull(channel.attr(SourceAddressChannelHandler.ATTR_REMOTE_ADDR).get()); - } @Test public void passThrough_ProxyProtocolEnabled_nonProxyBytes() { - ElbProxyProtocolChannelHandler handler = new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ true); EmbeddedChannel channel = new EmbeddedChannel(); - handler.addProxyProtocol(channel.pipeline()); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, + new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ true)); ByteBuf buf = Unpooled.wrappedBuffer( "TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf); @@ -83,14 +84,33 @@ public void passThrough_ProxyProtocolEnabled_nonProxyBytes() { assertNull(channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS).get()); assertNull(channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_PORT).get()); assertNull(channel.attr(SourceAddressChannelHandler.ATTR_REMOTE_ADDR).get()); + } + + @Ignore + @Test + public void detectsSplitPpv1Message() { + EmbeddedChannel channel = new EmbeddedChannel(); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, + new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ true)); + ByteBuf buf1 = Unpooled.wrappedBuffer( + "PROXY TCP4".getBytes(StandardCharsets.US_ASCII)); + channel.writeInbound(buf1); + ByteBuf buf2 = Unpooled.wrappedBuffer( + "192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); + channel.writeInbound(buf2); + + Object msg = channel.readInbound(); + assertTrue(msg instanceof HAProxyMessage); + // The handler should remove itself. + assertNull(channel.pipeline().context(ElbProxyProtocolChannelHandler.class)); } @Test public void negotiateProxy_ppv1_ipv4() { - ElbProxyProtocolChannelHandler handler = new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ true); EmbeddedChannel channel = new EmbeddedChannel(); - handler.addProxyProtocol(channel.pipeline()); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, + new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ true)); ByteBuf buf = Unpooled.wrappedBuffer( "PROXY TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf); @@ -100,7 +120,7 @@ public void negotiateProxy_ppv1_ipv4() { // The handler should remove itself. assertNull(channel.pipeline().context(ElbProxyProtocolChannelHandler.NAME)); - assertNull(channel.pipeline().context("HAProxyMessageChannelHandler")); + assertNull(channel.pipeline().context(HAProxyMessageChannelHandler.class)); assertEquals(HAProxyProtocolVersion.V1, channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_VERSION).get()); // TODO(carl-mastrangelo): this check is in place, but it should be removed. The message is not properly GC'd // in later versions of netty. @@ -119,9 +139,9 @@ public void negotiateProxy_ppv1_ipv4() { @Test public void negotiateProxy_ppv1_ipv6() { - ElbProxyProtocolChannelHandler handler = new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ true); EmbeddedChannel channel = new EmbeddedChannel(); - handler.addProxyProtocol(channel.pipeline()); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, + new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ true)); ByteBuf buf = Unpooled.wrappedBuffer( "PROXY TCP6 ::1 ::2 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf); @@ -150,10 +170,9 @@ public void negotiateProxy_ppv1_ipv6() { @Test public void negotiateProxy_ppv2_ipv4() { - ElbProxyProtocolChannelHandler handler = new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ true); EmbeddedChannel channel = new EmbeddedChannel(); - handler.addProxyProtocol(channel.pipeline()); - + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, + new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ true)); ByteBuf buf = Unpooled.wrappedBuffer( new byte[]{0x0D, 0x0A, 0x0D, 0x0A, 0x00, 0x0D, 0x0A, 0x51, 0x55, 0x49, 0x54, 0x0A, 0x21, 0x11, 0x00, 0x0C, (byte) 0xC0, (byte) 0xA8, 0x00, 0x01, 0x7C, 0x7B, 0x6F, 0x6F, 0x27, 0x18, 0x01, From 10e0091d7896ce5b8c69db078e544d1bdd7ce136 Mon Sep 17 00:00:00 2001 From: Argha C <007.argha@gmail.com> Date: Thu, 20 Feb 2020 16:28:28 -0800 Subject: [PATCH 007/273] Release Netty objects after test --- .../HAProxyMessageChannelHandler.java | 8 ++-- .../ElbProxyProtocolChannelHandlerTest.java | 41 +++++++++++++------ 2 files changed, 33 insertions(+), 16 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java index 0b83ecfa..684b42cd 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java @@ -36,10 +36,10 @@ public final class HAProxyMessageChannelHandler extends ChannelInboundHandlerAdapter { - public static final AttributeKey ATTR_HAPROXY_MESSAGE = AttributeKey - .newInstance("_haproxy_message"); - public static final AttributeKey ATTR_HAPROXY_VERSION = AttributeKey - .newInstance("_haproxy_version"); + public static final AttributeKey ATTR_HAPROXY_MESSAGE = + AttributeKey.newInstance("_haproxy_message"); + public static final AttributeKey ATTR_HAPROXY_VERSION = + AttributeKey.newInstance("_haproxy_version"); @Override diff --git a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java index 5a2d62f0..9ad0a168 100644 --- a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java @@ -24,6 +24,7 @@ import com.google.common.net.InetAddresses; import com.netflix.netty.common.SourceAddressChannelHandler; import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufUtil; import io.netty.buffer.Unpooled; import io.netty.channel.embedded.EmbeddedChannel; import io.netty.handler.codec.haproxy.HAProxyMessage; @@ -41,14 +42,14 @@ public class ElbProxyProtocolChannelHandlerTest { @Test public void noProxy() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, - new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ false)); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(false)); ByteBuf buf = Unpooled.wrappedBuffer( "PROXY TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf); Object dropped = channel.readInbound(); assertEquals(dropped, buf); + buf.release(); assertNull(channel.pipeline().context(ElbProxyProtocolChannelHandler.NAME)); assertNull(channel.pipeline().context("HAProxyMessageChannelHandler")); @@ -62,17 +63,34 @@ public void noProxy() { assertNull(channel.attr(SourceAddressChannelHandler.ATTR_REMOTE_ADDR).get()); } + @Test + public void extraDataForwarded() { + EmbeddedChannel channel = new EmbeddedChannel(); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(true)); + ByteBuf buf = Unpooled.wrappedBuffer( + "PROXY TCP4 192.168.0.1 124.123.111.111 10008 443\r\nPOTATO".getBytes(StandardCharsets.US_ASCII)); + channel.writeInbound(buf); + + Object msg = channel.readInbound(); + assertNull(channel.pipeline().context(ElbProxyProtocolChannelHandler.NAME)); + + ByteBuf readBuf = (ByteBuf) msg; + assertEquals("POTATO", new String(ByteBufUtil.getBytes(readBuf), StandardCharsets.US_ASCII)); + readBuf.release(); + } + @Test public void passThrough_ProxyProtocolEnabled_nonProxyBytes() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, - new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ true)); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(true)); + //Note that the bytes aren't prefixed by PROXY, as required by the spec ByteBuf buf = Unpooled.wrappedBuffer( "TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf); Object dropped = channel.readInbound(); assertEquals(dropped, buf); + buf.release(); assertNull(channel.pipeline().context(ElbProxyProtocolChannelHandler.NAME)); assertNull(channel.pipeline().context("HAProxyMessageChannelHandler")); @@ -90,8 +108,7 @@ public void passThrough_ProxyProtocolEnabled_nonProxyBytes() { @Test public void detectsSplitPpv1Message() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, - new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ true)); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(true)); ByteBuf buf1 = Unpooled.wrappedBuffer( "PROXY TCP4".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf1); @@ -101,6 +118,9 @@ public void detectsSplitPpv1Message() { Object msg = channel.readInbound(); assertTrue(msg instanceof HAProxyMessage); + buf1.release(); + buf2.release(); + ((HAProxyMessage) msg).release(); // The handler should remove itself. assertNull(channel.pipeline().context(ElbProxyProtocolChannelHandler.class)); @@ -109,8 +129,7 @@ public void detectsSplitPpv1Message() { @Test public void negotiateProxy_ppv1_ipv4() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, - new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ true)); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(true)); ByteBuf buf = Unpooled.wrappedBuffer( "PROXY TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf); @@ -140,8 +159,7 @@ public void negotiateProxy_ppv1_ipv4() { @Test public void negotiateProxy_ppv1_ipv6() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, - new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ true)); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(true)); ByteBuf buf = Unpooled.wrappedBuffer( "PROXY TCP6 ::1 ::2 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf); @@ -171,8 +189,7 @@ public void negotiateProxy_ppv1_ipv6() { @Test public void negotiateProxy_ppv2_ipv4() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, - new ElbProxyProtocolChannelHandler(/* withProxyProtocol= */ true)); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(true)); ByteBuf buf = Unpooled.wrappedBuffer( new byte[]{0x0D, 0x0A, 0x0D, 0x0A, 0x00, 0x0D, 0x0A, 0x51, 0x55, 0x49, 0x54, 0x0A, 0x21, 0x11, 0x00, 0x0C, (byte) 0xC0, (byte) 0xA8, 0x00, 0x01, 0x7C, 0x7B, 0x6F, 0x6F, 0x27, 0x18, 0x01, From a39f2918a8c73b385c4d4d36acbf7f354181b9de Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 21 Feb 2020 18:53:54 -0800 Subject: [PATCH 008/273] zuul-core: Factor out Request rejection logic for internal and external use. This code needs to be split out from the internal code so that bad requests can be failed. --- .../netty/common/throttle/RejectionType.java | 43 ++++ .../netty/common/throttle/RejectionUtils.java | 227 ++++++++++++++++++ .../common/throttle/RequestRejectedEvent.java | 52 ++++ 3 files changed, 322 insertions(+) create mode 100644 zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionType.java create mode 100644 zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java create mode 100644 zuul-core/src/main/java/com/netflix/netty/common/throttle/RequestRejectedEvent.java diff --git a/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionType.java b/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionType.java new file mode 100644 index 00000000..67566757 --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionType.java @@ -0,0 +1,43 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.netty.common.throttle; + +/** + * Indicates a rejection type for DoS protection. While similar, rejection is distinct from throttling in that + * throttling is intended for non-malicious traffic. + */ +public enum RejectionType { + // "It's not you, it's me." + + /** + * Indicates that the request should not be allowed. An HTTP response will be generated as a result. + */ + REJECT, + + /** + * Indicates that the connection should be closed, not allowing the request to proceed. No HTTP response will be + * returned. + */ + CLOSE, + + /** + * Allows the request to proceed, followed by closing the connection. This is typically used in conjunction with + * throttling handling, where the response may need to be handled by the filter chain. It is not expected that the + * request will be proxied. + */ + ALLOW_THEN_CLOSE; +} diff --git a/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java b/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java new file mode 100644 index 00000000..1c97ef47 --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java @@ -0,0 +1,227 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.netty.common.throttle; + +import static com.netflix.netty.common.proxyprotocol.HAProxyMessageChannelHandler.ATTR_HAPROXY_VERSION; + +import com.netflix.netty.common.ConnectionCloseChannelAttributes; +import com.netflix.zuul.passport.CurrentPassport; +import com.netflix.zuul.passport.PassportState; +import com.netflix.zuul.stats.status.StatusCategory; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; +import io.netty.channel.Channel; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.haproxy.HAProxyProtocolVersion; +import io.netty.handler.codec.http.DefaultFullHttpResponse; +import io.netty.handler.codec.http.DefaultHttpHeaders; +import io.netty.handler.codec.http.EmptyHttpHeaders; +import io.netty.handler.codec.http.FullHttpResponse; +import io.netty.handler.codec.http.HttpHeaderNames; +import io.netty.handler.codec.http.HttpRequest; +import io.netty.handler.codec.http.HttpResponseStatus; +import io.netty.handler.codec.http.HttpVersion; +import io.netty.handler.codec.http.LastHttpContent; +import io.netty.util.ReferenceCountUtil; +import java.nio.charset.StandardCharsets; +import java.util.concurrent.TimeUnit; +import javax.annotation.Nullable; + +/** + * A collection of rejection related utilities useful for failing requests. These are tightly coupled with the channel + * pipeline, but can be called from different handlers. + */ +public final class RejectionUtils { + + // TODO(carl-mastrangelo): add tests for this. + + private static final HttpResponseStatus REJECT_CLOSING_STATUS = new HttpResponseStatus(999, "Closing(Rejection)"); + + /** + * Closes the connection without sending a response, and fires a {@link RequestRejectedEvent} back up the pipeline. + * + * @param nfStatus the status to use for metric reporting + * @param reason the reason for rejecting the request. This is not sent back to the client. + * @param request the request that is being rejected. + * @param injectedLatencyMillis optional parameter to delay sending a response. The reject notification is still + * sent up the pipeline. + */ + public static void rejectByClosingConnection( + ChannelHandlerContext ctx, StatusCategory nfStatus, String reason, HttpRequest request, + @Nullable Integer injectedLatencyMillis) { + if (injectedLatencyMillis != null && injectedLatencyMillis > 0) { + // Delay closing the connection for configured time. + ctx.executor().schedule(() -> { + CurrentPassport.fromChannel(ctx.channel()).add(PassportState.SERVER_CH_REJECTING); + ctx.close(); + }, injectedLatencyMillis, TimeUnit.MILLISECONDS); + } else { + // Close the connection immediately. + CurrentPassport.fromChannel(ctx.channel()).add(PassportState.SERVER_CH_REJECTING); + ctx.close(); + } + + // Notify other handlers that we've rejected this request. + notifyHandlers(ctx, nfStatus, REJECT_CLOSING_STATUS, reason, request); + } + + /** + * Sends a rejection response back to the client, and fires a {@link RequestRejectedEvent} back up the pipeline. + * + * @param ctx the channel handler processing the request + * @param nfStatus the status to use for metric reporting + * @param reason the reason for rejecting the request. This is not sent back to the client. + * @param request the request that is being rejected. + * @param injectedLatencyMillis optional parameter to delay sending a response. The reject notification is still + * sent up the pipeline. + * @param rejectedCode the HTTP code to send back to the client. + * @param rejectedBody the HTTP body to be sent back. It is assumed to be of type text/plain. + */ + public static void sendRejectionResponse( + ChannelHandlerContext ctx, StatusCategory nfStatus, String reason, HttpRequest request, + @Nullable Integer injectedLatencyMillis, HttpResponseStatus rejectedCode, String rejectedBody) { + boolean shouldClose = closeConnectionAfterReject(ctx.channel()); + // Write out a rejection response message. + FullHttpResponse response = createRejectionResponse(rejectedCode, rejectedBody, shouldClose); + + if (injectedLatencyMillis != null && injectedLatencyMillis > 0) { + // Delay writing the response for configured time. + ctx.executor().schedule(() -> { + CurrentPassport.fromChannel(ctx.channel()).add(PassportState.IN_REQ_REJECTED); + ctx.writeAndFlush(response); + }, injectedLatencyMillis, TimeUnit.MILLISECONDS); + } else { + // Write the response immediately. + CurrentPassport.fromChannel(ctx.channel()).add(PassportState.IN_REQ_REJECTED); + ctx.writeAndFlush(response); + } + + // Notify other handlers that we've rejected this request. + notifyHandlers(ctx, nfStatus, rejectedCode, reason, request); + } + + /** + * Marks the given channel for being closed after the next response. + * + * @param ctx the channel handler processing the request + */ + public static void allowThenClose(ChannelHandlerContext ctx) { + // Just flag this channel to be closed after response complete. + ctx.channel().attr(ConnectionCloseChannelAttributes.CLOSE_AFTER_RESPONSE).set(ctx.newPromise()); + + // And allow this request through without rejecting. + } + + /** + * Throttle either by sending rejection response message, or by closing the connection now, or just drop the + * message. Only call this if ThrottleResult.shouldThrottle() returned {@code true}. + */ + public static void handleRejection( + ChannelHandlerContext ctx, Object msg, RejectionType rejectionType, StatusCategory nfStatus, String reason, + @Nullable Integer injectedLatencyMillis, HttpResponseStatus rejectedCode, String rejectedBody) + throws Exception { + + boolean shouldDropMessage = false; + if (rejectionType == RejectionType.REJECT || rejectionType == RejectionType.CLOSE) { + shouldDropMessage = true; + } + + boolean shouldRejectNow = false; + if (rejectionType == RejectionType.REJECT && msg instanceof LastHttpContent) { + shouldRejectNow = true; + } else if (rejectionType == RejectionType.CLOSE && msg instanceof HttpRequest) { + shouldRejectNow = true; + } else if (rejectionType == RejectionType.ALLOW_THEN_CLOSE && msg instanceof HttpRequest) { + shouldRejectNow = true; + } + + if (shouldRejectNow) { + // Send a rejection response. + HttpRequest request = msg instanceof HttpRequest ? (HttpRequest) msg : null; + reject(ctx, rejectionType, nfStatus, reason, request, injectedLatencyMillis, rejectedCode, rejectedBody); + } + + if (shouldDropMessage) { + ReferenceCountUtil.safeRelease(msg); + } else { + ctx.fireChannelRead(msg); + } + } + + /** + * Switches on the rejection type to decide how to reject the request and or close the conn. + * + * @param ctx the channel handler processing the request + * @param rejectionType the type of rejection + * @param nfStatus the status to use for metric reporting + * @param reason the reason for rejecting the request. This is not sent back to the client. + * @param request the request that is being rejected. + * @param injectedLatencyMillis optional parameter to delay sending a response. The reject notification is still + * sent up the pipeline. + * @param rejectedCode the HTTP code to send back to the client. + * @param rejectedBody the HTTP body to be sent back. It is assumed to be of type text/plain. + */ + public static void reject( + ChannelHandlerContext ctx, RejectionType rejectionType, StatusCategory nfStatus, String reason, + HttpRequest request, @Nullable Integer injectedLatencyMillis, HttpResponseStatus rejectedCode, + String rejectedBody) { + switch (rejectionType) { + case REJECT: + sendRejectionResponse( + ctx, nfStatus, reason, request, injectedLatencyMillis, rejectedCode, rejectedBody); + return; + case CLOSE: + rejectByClosingConnection(ctx, nfStatus, reason, request, injectedLatencyMillis); + return; + case ALLOW_THEN_CLOSE: + allowThenClose(ctx); + return; + } + throw new AssertionError("Bad rejection type: " + rejectionType); + } + + private static void notifyHandlers( + ChannelHandlerContext ctx, StatusCategory nfStatus, HttpResponseStatus status, String reason, + HttpRequest request) { + RequestRejectedEvent event = new RequestRejectedEvent(request, nfStatus, status, reason); + ctx.fireUserEventTriggered(event); + } + + private static boolean closeConnectionAfterReject(Channel channel) { + if (channel.hasAttr(ATTR_HAPROXY_VERSION)) { + return HAProxyProtocolVersion.V2 == channel.attr(ATTR_HAPROXY_VERSION).get(); + } else { + return false; + } + } + + private static FullHttpResponse createRejectionResponse( + HttpResponseStatus status, String plaintextMessage, boolean closeConnection) { + ByteBuf body = Unpooled.wrappedBuffer(plaintextMessage.getBytes(StandardCharsets.UTF_8)); + int length = body.readableBytes(); + DefaultHttpHeaders headers = new DefaultHttpHeaders(); + headers.set(HttpHeaderNames.CONTENT_TYPE, "text/plain; charset=utf-8"); + headers.set(HttpHeaderNames.CONTENT_LENGTH, length); + if (closeConnection) { + headers.set(HttpHeaderNames.CONNECTION, "close"); + } + + return new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, status, body, headers, EmptyHttpHeaders.INSTANCE); + } + + private RejectionUtils() {} +} diff --git a/zuul-core/src/main/java/com/netflix/netty/common/throttle/RequestRejectedEvent.java b/zuul-core/src/main/java/com/netflix/netty/common/throttle/RequestRejectedEvent.java new file mode 100644 index 00000000..a18d529a --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/netty/common/throttle/RequestRejectedEvent.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.netty.common.throttle; + +import com.netflix.zuul.stats.status.StatusCategory; +import io.netty.handler.codec.http.HttpRequest; +import io.netty.handler.codec.http.HttpResponseStatus; + +public final class RequestRejectedEvent { + private final HttpRequest request; + private final StatusCategory nfStatus; + private final HttpResponseStatus httpStatus; + private final String reason; + + public RequestRejectedEvent( + HttpRequest request, StatusCategory nfStatus, HttpResponseStatus httpStatus, String reason) { + this.request = request; + this.nfStatus = nfStatus; + this.httpStatus = httpStatus; + this.reason = reason; + } + + public HttpRequest request() { + return request; + } + + public StatusCategory getNfStatus() { + return nfStatus; + } + + public HttpResponseStatus getHttpStatus() { + return httpStatus; + } + + public String getReason() { + return reason; + } +} From 98b8ef70369ab10cf757021bc089b66a6e4fb95b Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 24 Feb 2020 11:41:14 -0800 Subject: [PATCH 009/273] zuul-core: set the selected address as a ip address string Some of our smoke tests depend on the exact string form of the IP address, which was accidentally being set to `/127.0.0.1:1234`, rather than `127.0.0.1`. I had commented on this originally since it was unclear what purpose it had, but now we know. I'll try adding tests for this in a followup PR, but right now the code is not structured properly for tests. --- .../PerServerConnectionPool.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java index 796baf6c..f93370c2 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java @@ -29,6 +29,7 @@ import io.netty.channel.ChannelFuture; import io.netty.channel.EventLoop; import io.netty.util.concurrent.Promise; +import java.net.InetSocketAddress; import java.net.SocketAddress; import java.util.Deque; import java.util.Objects; @@ -170,9 +171,7 @@ public Promise acquire( conn.getChannel().read(); onAcquire(conn, passport); initPooledConnection(conn, promise); - // TODO(carl-mastrangelo): it is unclear what the use of this. I am recording the port now too, not sure - // if this is incorrect. - selectedHostAddr.set(serverAddr.toString()); + selectedHostAddr.set(getSelectedHostString(serverAddr)); } else { // connection pool empty, create new connection using client connection factory. @@ -254,7 +253,7 @@ protected void tryMakingNewConnection( connCreationsInProgress.incrementAndGet(); passport.add(PassportState.ORIGIN_CH_CONNECTING); - selectedHostAddr.set(serverAddr.toString()); + selectedHostAddr.set(getSelectedHostString(serverAddr)); final ChannelFuture cf = connectToServer(eventLoop, passport, serverAddr); @@ -420,4 +419,15 @@ public int getConnsInUse() { return connsInUse.get(); } + private static String getSelectedHostString(SocketAddress addr) { + if (addr instanceof InetSocketAddress) { + // This is used for logging mainly. TODO(carl-mastrangelo): consider passing the whole address back + // rather than the string form. + return ((InetSocketAddress) addr).getAddress().getHostAddress(); + } else { + // If it's some other kind of address, just set it to the string form as a best effort guess. + return addr.toString(); + } + } + } From ceee0a3f40d043ad57acb86b8e2a5e24ac3ba734 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 26 Feb 2020 11:08:15 -0800 Subject: [PATCH 010/273] zuul-core: Drop malformed requests before passing them up the filter chain --- .../netty/common/throttle/RejectionUtils.java | 5 ++- .../netty/server/ClientRequestReceiver.java | 38 ++++++++++--------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java b/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java index 1c97ef47..c54cfb42 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java @@ -49,7 +49,7 @@ public final class RejectionUtils { // TODO(carl-mastrangelo): add tests for this. - private static final HttpResponseStatus REJECT_CLOSING_STATUS = new HttpResponseStatus(999, "Closing(Rejection)"); + public static final HttpResponseStatus REJECT_CLOSING_STATUS = new HttpResponseStatus(999, "Closing(Rejection)"); /** * Closes the connection without sending a response, and fires a {@link RequestRejectedEvent} back up the pipeline. @@ -198,7 +198,8 @@ private static void notifyHandlers( ChannelHandlerContext ctx, StatusCategory nfStatus, HttpResponseStatus status, String reason, HttpRequest request) { RequestRejectedEvent event = new RequestRejectedEvent(request, nfStatus, status, reason); - ctx.fireUserEventTriggered(event); + // Send this from the beginning of the pipeline, as it may be sent from the ClientRequestReceiver. + ctx.pipeline().fireUserEventTriggered(event); } private static boolean closeConnectionAfterReject(Channel channel) { diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java index 50235a60..16c710fa 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java @@ -16,6 +16,7 @@ package com.netflix.zuul.netty.server; +import com.netflix.netty.common.throttle.RejectionUtils; import com.netflix.zuul.context.Debug; import com.netflix.zuul.context.SessionContext; import com.netflix.zuul.context.SessionContextDecorator; @@ -98,7 +99,6 @@ public static boolean isLastContentReceivedForChannel(Channel ch) { @Override public void channelRead(final ChannelHandlerContext ctx, Object msg) throws Exception { - // Flag that we have now received the LastContent for this request from the client. // This is needed for ClientResponseReceiver to know whether it's yet safe to start writing // a response to the client channel. @@ -110,23 +110,22 @@ public void channelRead(final ChannelHandlerContext ctx, Object msg) throws Exce clientRequest = (HttpRequest) msg; zuulRequest = buildZuulHttpRequest(clientRequest, ctx); - handleExpect100Continue(ctx, clientRequest); // Handle invalid HTTP requests. if (clientRequest.decoderResult().isFailure()) { - String errorMsg = "Invalid http request. " - + "clientRequest = " + clientRequest.toString() - + ", uri = " + clientRequest.uri() - + ", info = " + ChannelUtils.channelInfoForLogging(ctx.channel()); - String causeMsg = String.valueOf(clientRequest.decoderResult().cause()); - final ZuulException ze = new ZuulException(errorMsg, causeMsg, true); - ze.setStatusCode(400); - - StatusCategoryUtils.setStatusCategory(zuulRequest.getContext(), - ZuulStatusCategory.FAILURE_CLIENT_BAD_REQUEST); - - zuulRequest.getContext().setError(ze); - zuulRequest.getContext().setShouldSendErrorResponse(true); + LOG.warn( + "Invalid http request. clientRequest = {} , uri = {}, info = {}", + clientRequest.toString(), + clientRequest.uri(), + ChannelUtils.channelInfoForLogging(ctx.channel()), + clientRequest.decoderResult().cause()); + RejectionUtils.rejectByClosingConnection( + ctx, + ZuulStatusCategory.FAILURE_CLIENT_BAD_REQUEST, + "decodefailure", + clientRequest, + /* injectedLatencyMillis= */ null); + return; } else if (zuulRequest.hasBody() && zuulRequest.getBodyLength() > zuulRequest.getMaxBodySize()) { String errorMsg = "Request too large. " + "clientRequest = " + clientRequest.toString() @@ -141,6 +140,9 @@ public void channelRead(final ChannelHandlerContext ctx, Object msg) throws Exce zuulRequest.getContext().setShouldSendErrorResponse(true); } + handleExpect100Continue(ctx, clientRequest); + + //Send the request down the filter pipeline ctx.fireChannelRead(zuulRequest); } @@ -208,7 +210,7 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc super.userEventTriggered(ctx, evt); - if (evt instanceof CompleteEvent) { + if (evt instanceof CompleteEvent) { final Channel channel = ctx.channel(); channel.attr(ATTR_ZUUL_REQ).set(null); channel.attr(ATTR_ZUUL_RESP).set(null); @@ -225,7 +227,7 @@ private void handleExpect100Continue(ChannelHandlerContext ctx, HttpRequest req) final ChannelFuture f = ctx.writeAndFlush(new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.CONTINUE)); f.addListener((s) -> { if (! s.isSuccess()) { - throw new ZuulException( s.cause(), "Failed while writing 100-continue response", true); + throw new ZuulException(s.cause(), "Failed while writing 100-continue response", true); } }); // Remove the Expect: 100-Continue header from request as we don't want to proxy it downstream. @@ -379,4 +381,4 @@ private void fireWriteError(String requestPart, Throwable cause, ChannelHandlerC } } -} \ No newline at end of file +} From cd98880eb32e7103d331b3f5d1956508c997a740 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 2 Mar 2020 14:04:00 -0800 Subject: [PATCH 011/273] zuul-core: update netty to 4.1.46 --- gradle.properties | 2 +- zuul-core/build.gradle | 2 +- zuul-core/dependencies.lock | 190 ++++++++++++++++++------------------ 3 files changed, 97 insertions(+), 97 deletions(-) diff --git a/gradle.properties b/gradle.properties index ca8c932a..ca03dfc5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ versions_groovy=2.4.4 versions_ribbon=2.2.4 -versions_netty=4.1.45.Final +versions_netty=4.1.46.Final release.scope=patch diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index eadbea2b..84c618b2 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -40,7 +40,7 @@ dependencies { compile "io.netty:netty-transport:${versions_netty}" compile "io.netty:netty-transport-native-epoll:${versions_netty}:linux-x86_64" compile "io.netty:netty-transport-native-kqueue:${versions_netty}:osx-x86_64" - runtime "io.netty:netty-tcnative-boringssl-static:2.0.28.Final" + runtime "io.netty:netty-tcnative-boringssl-static:2.0.29.Final" // To ensure that zuul-netty gets this correct later version. compile "com.netflix.governator:governator:1.+" diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 8e0a474c..3ee6e484 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -102,43 +102,43 @@ }, "io.netty:netty-buffer": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-common": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-handler": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "locked": "0.20.1", @@ -288,43 +288,43 @@ }, "io.netty:netty-buffer": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-common": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-handler": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "locked": "0.20.1", @@ -474,47 +474,47 @@ }, "io.netty:netty-buffer": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-common": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-handler": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.28.Final", - "requested": "2.0.28.Final" + "requested": "2.0.29.Final" }, "io.netty:netty-transport": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "locked": "0.20.1", @@ -664,47 +664,47 @@ }, "io.netty:netty-buffer": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-common": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-handler": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.28.Final", - "requested": "2.0.28.Final" + "requested": "2.0.29.Final" }, "io.netty:netty-transport": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "locked": "0.20.1", @@ -854,47 +854,47 @@ }, "io.netty:netty-buffer": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-common": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-handler": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.28.Final", - "requested": "2.0.28.Final" + "requested": "2.0.29.Final" }, "io.netty:netty-transport": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "locked": "0.20.1", @@ -1048,43 +1048,43 @@ }, "io.netty:netty-buffer": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-common": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-handler": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "locked": "0.20.1", @@ -1238,43 +1238,43 @@ }, "io.netty:netty-buffer": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-common": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-handler": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "locked": "0.20.1", @@ -1428,47 +1428,47 @@ }, "io.netty:netty-buffer": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-common": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-handler": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.28.Final", - "requested": "2.0.28.Final" + "requested": "2.0.29.Final" }, "io.netty:netty-transport": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "locked": "0.20.1", @@ -1626,47 +1626,47 @@ }, "io.netty:netty-buffer": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-common": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-handler": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.28.Final", - "requested": "2.0.28.Final" + "requested": "2.0.29.Final" }, "io.netty:netty-transport": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "locked": "4.1.45.Final", - "requested": "4.1.45.Final" + "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "locked": "0.20.1", From b28109c26b80c3ea2de323866330a2f54ce32b1a Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 6 Mar 2020 13:27:52 -0800 Subject: [PATCH 012/273] zuul-core: fix generics on Filter loaders --- .../com/netflix/zuul/DynamicCodeCompiler.java | 4 +- .../java/com/netflix/zuul/FilterFactory.java | 2 +- .../java/com/netflix/zuul/FilterLoader.java | 102 ++++++++---------- .../netflix/zuul/filters/FilterRegistry.java | 23 ++-- .../netflix/zuul/groovy/GroovyCompiler.java | 8 +- .../zuul/guice/GuiceFilterFactory.java | 4 +- .../server/BaseZuulChannelInitializer.java | 10 +- .../com/netflix/zuul/FilterLoaderTest.java | 4 +- 8 files changed, 73 insertions(+), 84 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/DynamicCodeCompiler.java b/zuul-core/src/main/java/com/netflix/zuul/DynamicCodeCompiler.java index 6ed3e5f0..7a4aa717 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/DynamicCodeCompiler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/DynamicCodeCompiler.java @@ -26,7 +26,7 @@ * Time: 11:35 AM */ public interface DynamicCodeCompiler { - Class compile(String sCode, String sName) throws Exception; + Class compile(String sCode, String sName) throws Exception; - Class compile(File file) throws Exception; + Class compile(File file) throws Exception; } diff --git a/zuul-core/src/main/java/com/netflix/zuul/FilterFactory.java b/zuul-core/src/main/java/com/netflix/zuul/FilterFactory.java index cf900d09..bd6e7b22 100755 --- a/zuul-core/src/main/java/com/netflix/zuul/FilterFactory.java +++ b/zuul-core/src/main/java/com/netflix/zuul/FilterFactory.java @@ -29,5 +29,5 @@ public interface FilterFactory { * @return an instance of ZuulFilter * @throws Exception if an error occurs */ - public ZuulFilter newInstance(Class clazz) throws Exception; + ZuulFilter newInstance(Class clazz) throws Exception; } diff --git a/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java b/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java index 85991704..1db1dcfd 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java +++ b/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java @@ -15,18 +15,21 @@ */ package com.netflix.zuul; -import com.netflix.zuul.filters.*; +import com.netflix.zuul.filters.FilterRegistry; +import com.netflix.zuul.filters.FilterType; +import com.netflix.zuul.filters.ZuulFilter; import com.netflix.zuul.groovy.GroovyCompiler; -import javax.inject.Inject; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.inject.Singleton; import java.io.File; -import java.io.IOException; import java.lang.reflect.Modifier; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; import java.util.concurrent.ConcurrentHashMap; +import javax.inject.Inject; +import javax.inject.Singleton; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This class is one of the core classes in Zuul. It compiles, loads from a File, and checks if source code changed. @@ -41,11 +44,11 @@ public class FilterLoader { private static final Logger LOG = LoggerFactory.getLogger(FilterLoader.class); - private final ConcurrentHashMap filterClassLastModified = new ConcurrentHashMap(); - private final ConcurrentHashMap filterClassCode = new ConcurrentHashMap(); - private final ConcurrentHashMap filterCheck = new ConcurrentHashMap(); - private final ConcurrentHashMap> hashFiltersByType = new ConcurrentHashMap<>(); - private final ConcurrentHashMap filtersByNameAndType = new ConcurrentHashMap<>(); + private final ConcurrentHashMap filterClassLastModified = new ConcurrentHashMap<>(); + private final ConcurrentHashMap filterClassCode = new ConcurrentHashMap<>(); + private final ConcurrentHashMap filterCheck = new ConcurrentHashMap<>(); + private final ConcurrentHashMap>> hashFiltersByType = new ConcurrentHashMap<>(); + private final ConcurrentHashMap> filtersByNameAndType = new ConcurrentHashMap<>(); private final FilterRegistry filterRegistry; @@ -71,11 +74,8 @@ public FilterLoader(FilterRegistry filterRegistry, DynamicCodeCompiler compiler, * @param sCode source code * @param sName name of the filter * @return the IZuulFilter - * @throws IllegalAccessException - * @throws InstantiationException */ - public ZuulFilter getFilter(String sCode, String sName) throws Exception { - + public ZuulFilter getFilter(String sCode, String sName) throws Exception { if (filterCheck.get(sName) == null) { filterCheck.putIfAbsent(sName, sName); if (!sCode.equals(filterClassCode.get(sName))) { @@ -83,9 +83,9 @@ public ZuulFilter getFilter(String sCode, String sName) throws Exception { filterRegistry.remove(sName); } } - ZuulFilter filter = filterRegistry.get(sName); + ZuulFilter filter = filterRegistry.get(sName); if (filter == null) { - Class clazz = compiler.compile(sCode, sName); + Class clazz = compiler.compile(sCode, sName); if (!Modifier.isAbstract(clazz.getModifiers())) { filter = filterFactory.newInstance(clazz); } @@ -105,41 +105,36 @@ public int filterInstanceMapSize() { * From a file this will read the ZuulFilter source code, compile it, and add it to the list of current filters * a true response means that it was successful. * - * @param file + * @param file the file to load * @return true if the filter in file successfully read, compiled, verified and added to Zuul - * @throws IllegalAccessException - * @throws InstantiationException - * @throws IOException */ - public boolean putFilter(File file) throws Exception - { + public boolean putFilter(File file) { try { String sName = file.getAbsolutePath(); - if (filterClassLastModified.get(sName) != null && (file.lastModified() != filterClassLastModified.get(sName))) { + if (filterClassLastModified.get(sName) != null + && (file.lastModified() != filterClassLastModified.get(sName))) { LOG.debug("reloading filter " + sName); filterRegistry.remove(sName); } - ZuulFilter filter = filterRegistry.get(sName); + ZuulFilter filter = filterRegistry.get(sName); if (filter == null) { - Class clazz = compiler.compile(file); + Class clazz = compiler.compile(file); if (!Modifier.isAbstract(clazz.getModifiers())) { filter = filterFactory.newInstance(clazz); putFilter(sName, filter, file.lastModified()); return true; } } - } - catch (Exception e) { - LOG.error("Error loading filter! Continuing. file=" + String.valueOf(file), e); + } catch (Exception e) { + LOG.error("Error loading filter! Continuing. file=" + file, e); return false; } return false; } - void putFilter(String sName, ZuulFilter filter, long lastModified) - { - List list = hashFiltersByType.get(filter.filterType()); + private void putFilter(String sName, ZuulFilter filter, long lastModified) { + List> list = hashFiltersByType.get(filter.filterType()); if (list != null) { hashFiltersByType.remove(filter.filterType()); //rebuild this list } @@ -159,24 +154,20 @@ void putFilter(String sName, ZuulFilter filter, long lastModified) * @throws Exception If any specified filter fails to load, this will abort. This is a safety mechanism so we can * prevent running in a partially loaded state. */ - public List putFiltersForClasses(String[] classNames) throws Exception - { - List newFilters = new ArrayList<>(); - for (String className : classNames) - { + public List> putFiltersForClasses(String[] classNames) throws Exception { + List> newFilters = new ArrayList<>(); + for (String className : classNames) { newFilters.add(putFilterForClassName(className)); } - return newFilters; + return Collections.unmodifiableList(newFilters); } - public ZuulFilter putFilterForClassName(String className) throws Exception - { - Class clazz = Class.forName(className); - if (! ZuulFilter.class.isAssignableFrom(clazz)) { + public ZuulFilter putFilterForClassName(String className) throws Exception { + Class clazz = Class.forName(className); + if (!ZuulFilter.class.isAssignableFrom(clazz)) { throw new IllegalArgumentException("Specified filter class does not implement ZuulFilter interface!"); - } - else { - ZuulFilter filter = filterFactory.newInstance(clazz); + } else { + ZuulFilter filter = filterFactory.newInstance(clazz); putFilter(className, filter, System.currentTimeMillis()); return filter; } @@ -185,29 +176,26 @@ public ZuulFilter putFilterForClassName(String className) throws Exception /** * Returns a list of filters by the filterType specified */ - public List getFiltersByType(FilterType filterType) { - - List list = hashFiltersByType.get(filterType); + public List> getFiltersByType(FilterType filterType) { + List> list = hashFiltersByType.get(filterType); if (list != null) return list; - list = new ArrayList(); + list = new ArrayList<>(); - Collection filters = filterRegistry.getAllFilters(); - for (Iterator iterator = filters.iterator(); iterator.hasNext(); ) { - ZuulFilter filter = iterator.next(); + for (ZuulFilter filter : filterRegistry.getAllFilters()) { if (filter.filterType().equals(filterType)) { list.add(filter); } } // Sort by filterOrder. - Collections.sort(list, Comparator.comparingInt(ZuulFilter::filterOrder)); + list.sort(Comparator.comparingInt(ZuulFilter::filterOrder)); hashFiltersByType.putIfAbsent(filterType, list); - return list; + return Collections.unmodifiableList(list); } - public ZuulFilter getFilterByNameAndType(String name, FilterType type) + public ZuulFilter getFilterByNameAndType(String name, FilterType type) { if (name == null || type == null) return null; diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/FilterRegistry.java b/zuul-core/src/main/java/com/netflix/zuul/filters/FilterRegistry.java index a048314f..adfa1fa5 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/FilterRegistry.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/FilterRegistry.java @@ -24,27 +24,26 @@ * @author mhawthorne */ @Singleton -public class FilterRegistry -{ - private final ConcurrentHashMap filters = new ConcurrentHashMap(); +public class FilterRegistry { + private final ConcurrentHashMap> filters = new ConcurrentHashMap<>(); - public ZuulFilter remove(String key) { - return this.filters.remove(key); + public ZuulFilter remove(String key) { + return filters.remove(key); } - public ZuulFilter get(String key) { - return this.filters.get(key); + public ZuulFilter get(String key) { + return filters.get(key); } - public void put(String key, ZuulFilter filter) { - this.filters.putIfAbsent(key, filter); + public void put(String key, ZuulFilter filter) { + filters.putIfAbsent(key, filter); } public int size() { - return this.filters.size(); + return filters.size(); } - public Collection getAllFilters() { - return this.filters.values(); + public Collection> getAllFilters() { + return filters.values(); } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/groovy/GroovyCompiler.java b/zuul-core/src/main/java/com/netflix/zuul/groovy/GroovyCompiler.java index 5d17e050..1ec3f252 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/groovy/GroovyCompiler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/groovy/GroovyCompiler.java @@ -42,10 +42,10 @@ public class GroovyCompiler implements DynamicCodeCompiler { * @param sName * @return */ - public Class compile(String sCode, String sName) { + public Class compile(String sCode, String sName) { GroovyClassLoader loader = getGroovyClassLoader(); LOG.warn("Compiling filter: " + sName); - Class groovyClass = loader.parseClass(sCode, sName); + Class groovyClass = loader.parseClass(sCode, sName); return groovyClass; } @@ -63,9 +63,9 @@ GroovyClassLoader getGroovyClassLoader() { * @return * @throws java.io.IOException */ - public Class compile(File file) throws IOException { + public Class compile(File file) throws IOException { GroovyClassLoader loader = getGroovyClassLoader(); - Class groovyClass = loader.parseClass(file); + Class groovyClass = loader.parseClass(file); return groovyClass; } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/guice/GuiceFilterFactory.java b/zuul-core/src/main/java/com/netflix/zuul/guice/GuiceFilterFactory.java index de32cd72..2e731565 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/guice/GuiceFilterFactory.java +++ b/zuul-core/src/main/java/com/netflix/zuul/guice/GuiceFilterFactory.java @@ -33,7 +33,7 @@ public GuiceFilterFactory(Injector injector) { } @Override - public ZuulFilter newInstance(Class clazz) throws Exception { - return (ZuulFilter) injector.getInstance(clazz); + public ZuulFilter newInstance(Class clazz) throws Exception { + return injector.getInstance(clazz.asSubclass(ZuulFilter.class)); } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java index dd18941a..aff1fd91 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java @@ -354,12 +354,14 @@ protected ZuulFilterChainRunner(filters, filterUsageNotifier, filterRunner); } - public ZuulFilter [] getFilters(final ZuulFilter start, final ZuulFilter stop) { - final List zuulFilters = filterLoader.getFiltersByType(start.filterType()); - final ZuulFilter[] filters = new ZuulFilter[zuulFilters.size() + 2]; + @SuppressWarnings("unchecked") // For the conversion from getFiltersByType. It's not safe, sorry. + public ZuulFilter [] getFilters(ZuulFilter start, ZuulFilter stop) { + final List> zuulFilters = filterLoader.getFiltersByType(start.filterType()); + final ZuulFilter[] filters = new ZuulFilter[zuulFilters.size() + 2]; filters[0] = start; for (int i=1, j=0; i < filters.length && j < zuulFilters.size(); i++,j++) { - filters[i] = zuulFilters.get(j); + // TODO(carl-mastrangelo): find some way to make this cast not needed. + filters[i] = (ZuulFilter) zuulFilters.get(j); } filters[filters.length -1] = stop; return filters; diff --git a/zuul-core/src/test/java/com/netflix/zuul/FilterLoaderTest.java b/zuul-core/src/test/java/com/netflix/zuul/FilterLoaderTest.java index 719b67dc..e489df38 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/FilterLoaderTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/FilterLoaderTest.java @@ -100,11 +100,11 @@ public void testGetFiltersByType() throws Exception { verify(registry).put(any(String.class), any(ZuulFilter.class)); - final List filters = new ArrayList(); + final List> filters = new ArrayList<>(); filters.add(filter); when(registry.getAllFilters()).thenReturn(filters); - List list = loader.getFiltersByType(FilterType.INBOUND); + List> list = loader.getFiltersByType(FilterType.INBOUND); assertTrue(list != null); assertTrue(list.size() == 1); ZuulFilter filter = list.get(0); From d78f49026049c858d59c7fe180113d62d0cadc81 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Tue, 10 Mar 2020 17:24:50 -0700 Subject: [PATCH 013/273] fix catching handshake timeouts --- .../netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java index 1e4eb8f5..472fbfdf 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java @@ -125,7 +125,7 @@ else if (LOG.isInfoEnabled()) { + ", client_ip = " + String.valueOf(clientIP) + ", channel_info = " + ChannelUtils.channelInfoForLogging(ctx.channel())); } - else if (cause instanceof SSLException && "handshake timed out".equals(cause.getMessage())) { + else if (cause instanceof SSLException && cause.getMessage().contains("handshake timed out")) { LOG.info("Client timed-out doing the ssl handshake. " + ", client_ip = " + String.valueOf(clientIP) + ", channel_info = " + ChannelUtils.channelInfoForLogging(ctx.channel())); From dd2fa7d0fbb9e8b31718cf236c7387d92dc27d18 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 11 Mar 2020 18:39:11 -0700 Subject: [PATCH 014/273] zuul-processor: Create an annotation processor which can identify Zuul Filters based on an annotation * zuul-core: Add an Annotation processor for filters * zuul-sample: Try out new annotation processor * Format file better * Move annotation processor to its own package * Fix generated dir being marked for test --- build.gradle | 14 +-- settings.gradle | 1 + .../main/java/com/netflix/zuul/Filter.java | 39 ++++++++ zuul-processor/build.gradle | 10 ++ .../filters/processor/FilterProcessor.java | 99 +++++++++++++++++++ .../gradle/incremental.annotation.processors | 1 + .../javax.annotation.processing.Processor | 1 + zuul-sample/build.gradle | 3 + .../netflix/zuul/sample/filters/Debug.java} | 27 ++--- 9 files changed, 169 insertions(+), 26 deletions(-) create mode 100644 zuul-core/src/main/java/com/netflix/zuul/Filter.java create mode 100644 zuul-processor/build.gradle create mode 100644 zuul-processor/src/main/java/com/netflix/zuul/filters/processor/FilterProcessor.java create mode 100644 zuul-processor/src/main/resources/META-INF/gradle/incremental.annotation.processors create mode 100644 zuul-processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor rename zuul-sample/src/main/{groovy/com/netflix/zuul/sample/filters/inbound/Debug.groovy => java/com/netflix/zuul/sample/filters/Debug.java} (61%) diff --git a/build.gradle b/build.gradle index 475b03c6..83bb9842 100644 --- a/build.gradle +++ b/build.gradle @@ -33,25 +33,13 @@ subprojects { license { ignoreFailures = false + exclude "META-INF/services/*" } group = "com.netflix.${githubProjectName}" sourceCompatibility = '1.8' - sourceSets { - test { - java { - srcDirs = ['src/main/java', 'src/test/java'] - include '**/*.java' - } - groovy { - srcDirs = ['filters', 'src/main/groovy'] - include '**/*.groovy' - } - } - } - eclipse { classpath { downloadSources = true diff --git a/settings.gradle b/settings.gradle index 72506e6c..7c94b213 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,4 +1,5 @@ rootProject.name='zuul' include 'zuul-core' +include 'zuul-processor' include 'zuul-sample' diff --git a/zuul-core/src/main/java/com/netflix/zuul/Filter.java b/zuul-core/src/main/java/com/netflix/zuul/Filter.java new file mode 100644 index 00000000..a561edc4 --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/zuul/Filter.java @@ -0,0 +1,39 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import com.netflix.zuul.filters.FilterType; +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; +import javax.annotation.Nullable; + +@Target({TYPE}) +@Retention(RUNTIME) +@Documented +public @interface Filter { + + /** + * The order in which to be loaded. + */ + int value(); + + FilterType type() default FilterType.INBOUND; +} diff --git a/zuul-processor/build.gradle b/zuul-processor/build.gradle new file mode 100644 index 00000000..03eca96a --- /dev/null +++ b/zuul-processor/build.gradle @@ -0,0 +1,10 @@ +dependencies { + implementation project(":zuul-core") +} + +// Silences log statements during tests. This still allows normal failures to be printed. +test { + testLogging { + showStandardStreams = false + } +} diff --git a/zuul-processor/src/main/java/com/netflix/zuul/filters/processor/FilterProcessor.java b/zuul-processor/src/main/java/com/netflix/zuul/filters/processor/FilterProcessor.java new file mode 100644 index 00000000..dccfecef --- /dev/null +++ b/zuul-processor/src/main/java/com/netflix/zuul/filters/processor/FilterProcessor.java @@ -0,0 +1,99 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.filters.processor; + +import com.netflix.zuul.Filter; +import java.io.Writer; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.TreeMap; +import javax.annotation.processing.AbstractProcessor; +import javax.annotation.processing.Filer; +import javax.annotation.processing.RoundEnvironment; +import javax.annotation.processing.SupportedAnnotationTypes; +import javax.annotation.processing.SupportedSourceVersion; +import javax.lang.model.SourceVersion; +import javax.lang.model.element.Element; +import javax.lang.model.element.Modifier; +import javax.lang.model.element.TypeElement; +import javax.lang.model.util.Elements; +import javax.tools.JavaFileObject; + +@SupportedAnnotationTypes("com.netflix.zuul.Filter") +@SupportedSourceVersion(SourceVersion.RELEASE_8) +public final class FilterProcessor extends AbstractProcessor { + + private final Map> packageToElements = new TreeMap<>(); + + @Override + public boolean process(Set annotations, RoundEnvironment roundEnv) { + Set annotated = roundEnv.getElementsAnnotatedWith(Filter.class); + Elements elementUtils = processingEnv.getElementUtils(); + for (Element el : annotated) { + el.getModifiers().contains(Modifier.ABSTRACT); + packageToElements.computeIfAbsent( + String.valueOf(elementUtils.getPackageOf(el).getQualifiedName()), k -> new LinkedHashSet<>()) + .add(el); + } + + if (!annotated.isEmpty()) { + try { + writeFiles(processingEnv.getFiler(), packageToElements); + } catch (Exception e) { + throw new RuntimeException(e); + } finally { + packageToElements.clear(); + } + return true; + } + + return true; + } + + private static void writeFiles(Filer filer, Map> packageToElements) throws Exception { + for (Entry> entry : packageToElements.entrySet()) { + String pkg = entry.getKey(); + List elements = new ArrayList<>(entry.getValue()); + JavaFileObject source = filer.createSourceFile(pkg + ".AllFilters", elements.toArray(new Element[0])); + try (Writer w = source.openWriter()) { + w.write("package " + pkg + ";\n"); + w.write("\n"); + w.write("@javax.annotation.Generated(\"by: \\\"" + FilterProcessor.class.getName() + "\\\"\")\n"); + w.write("public final class AllFilters {\n"); + w.write("\n"); + w.write(" private AllFilters () {}\n"); + w.write("\n"); + w.write(" public static final java.util.List>> FILTERS =\n"); + w.write(" java.util.Collections.unmodifiableList(java.util.Arrays.asList(\n"); + for (int i = 0; i < elements.size(); i++) { + w.write(" " + elements.get(i) + ".class"); + if (i != elements.size() - 1) { + w.write(','); + } + w.write('\n'); + } + w.write(" ));\n"); + w.write("}\n"); + } + } + } +} diff --git a/zuul-processor/src/main/resources/META-INF/gradle/incremental.annotation.processors b/zuul-processor/src/main/resources/META-INF/gradle/incremental.annotation.processors new file mode 100644 index 00000000..ce8f0f56 --- /dev/null +++ b/zuul-processor/src/main/resources/META-INF/gradle/incremental.annotation.processors @@ -0,0 +1 @@ +com.netflix.zuul.filters.processor.FilterProcessor,aggregating \ No newline at end of file diff --git a/zuul-processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor b/zuul-processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor new file mode 100644 index 00000000..6479b872 --- /dev/null +++ b/zuul-processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor @@ -0,0 +1 @@ +com.netflix.zuul.filters.processor.FilterProcessor \ No newline at end of file diff --git a/zuul-sample/build.gradle b/zuul-sample/build.gradle index d9abcae6..544dc58e 100644 --- a/zuul-sample/build.gradle +++ b/zuul-sample/build.gradle @@ -4,7 +4,10 @@ apply plugin: 'application' dependencies { compile project(":zuul-core") + annotationProcessor project(":zuul-processor") + compile 'com.netflix.blitz4j:blitz4j:1.37.2' + } jar { diff --git a/zuul-sample/src/main/groovy/com/netflix/zuul/sample/filters/inbound/Debug.groovy b/zuul-sample/src/main/java/com/netflix/zuul/sample/filters/Debug.java similarity index 61% rename from zuul-sample/src/main/groovy/com/netflix/zuul/sample/filters/inbound/Debug.groovy rename to zuul-sample/src/main/java/com/netflix/zuul/sample/filters/Debug.java index de254de4..7e687abf 100644 --- a/zuul-sample/src/main/groovy/com/netflix/zuul/sample/filters/inbound/Debug.groovy +++ b/zuul-sample/src/main/java/com/netflix/zuul/sample/filters/Debug.java @@ -14,10 +14,11 @@ * limitations under the License. */ -package com.netflix.zuul.sample.filters.inbound +package com.netflix.zuul.sample.filters; -import com.netflix.zuul.filters.http.HttpInboundSyncFilter -import com.netflix.zuul.message.http.HttpRequestMessage +import com.netflix.zuul.Filter; +import com.netflix.zuul.filters.http.HttpInboundSyncFilter; +import com.netflix.zuul.message.http.HttpRequestMessage; /** * Determine if requests need to be debugged. @@ -27,23 +28,23 @@ * Author: Arthur Gonigberg * Date: December 22, 2017 */ -class Debug extends HttpInboundSyncFilter { +@Filter(20) +public class Debug extends HttpInboundSyncFilter { @Override - int filterOrder() { - return 20 + public int filterOrder() { + return 20; } @Override - boolean shouldFilter(HttpRequestMessage request) { - return "true".equalsIgnoreCase(request.getQueryParams().getFirst("debugRequest")) + public boolean shouldFilter(HttpRequestMessage request) { + return "true".equalsIgnoreCase(request.getQueryParams().getFirst("debugRequest")); } @Override - HttpRequestMessage apply(HttpRequestMessage request) { - request.getContext().setDebugRequest(true) - request.getContext().setDebugRouting(true) + public HttpRequestMessage apply(HttpRequestMessage request) { + request.getContext().setDebugRequest(true); + request.getContext().setDebugRouting(true); - return request + return request; } - } From d9ee4b68bd2cd6202b43de9b9ccf60a8383e56ab Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 12 Mar 2020 12:00:39 -0700 Subject: [PATCH 015/273] zuul-processor: add some unit tests --- .../main/java/com/netflix/zuul/Filter.java | 18 +++- zuul-processor/build.gradle | 7 ++ .../filters/processor/FilterProcessor.java | 90 ++++++++++++----- .../processor/FilterProcessorTest.java | 83 ++++++++++++++++ .../zuul/filters/processor/TestFilter.java | 96 +++++++++++++++++++ .../filters/processor/TopLevelFilter.java | 47 +++++++++ .../subpackage/SubpackageFilter.java | 25 +++++ .../netflix/zuul/sample/filters/Debug.java | 2 +- 8 files changed, 341 insertions(+), 27 deletions(-) create mode 100644 zuul-processor/src/test/java/com/netflix/zuul/filters/processor/FilterProcessorTest.java create mode 100644 zuul-processor/src/test/java/com/netflix/zuul/filters/processor/TestFilter.java create mode 100644 zuul-processor/src/test/java/com/netflix/zuul/filters/processor/TopLevelFilter.java create mode 100644 zuul-processor/src/test/java/com/netflix/zuul/filters/processor/subpackage/SubpackageFilter.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/Filter.java b/zuul-core/src/main/java/com/netflix/zuul/Filter.java index a561edc4..6ec77913 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/Filter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/Filter.java @@ -19,21 +19,33 @@ import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; +import com.netflix.zuul.filters.FilterSyncType; import com.netflix.zuul.filters.FilterType; +import com.netflix.zuul.filters.ZuulFilter; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.Target; -import javax.annotation.Nullable; +/** + * Identifies a {@link ZuulFilter}. + */ @Target({TYPE}) @Retention(RUNTIME) @Documented public @interface Filter { /** - * The order in which to be loaded. + * The order in which to run. See {@link ZuulFilter#filterOrder()}. */ - int value(); + int order(); + /** + * Indicates the type of this filter. + */ FilterType type() default FilterType.INBOUND; + + /** + * Indicates if this is a synchronous filter. + */ + FilterSyncType sync() default FilterSyncType.SYNC; } diff --git a/zuul-processor/build.gradle b/zuul-processor/build.gradle index 03eca96a..bc50aef7 100644 --- a/zuul-processor/build.gradle +++ b/zuul-processor/build.gradle @@ -1,5 +1,12 @@ dependencies { + implementation("com.google.guava:guava:28.2-jre") + implementation project(":zuul-core") + + testCompile 'junit:junit:4.13-rc-1' + testCompile 'com.google.truth:truth:1.0.1' + + testAnnotationProcessor project(":zuul-processor") } // Silences log statements during tests. This still allows normal failures to be printed. diff --git a/zuul-processor/src/main/java/com/netflix/zuul/filters/processor/FilterProcessor.java b/zuul-processor/src/main/java/com/netflix/zuul/filters/processor/FilterProcessor.java index dccfecef..e6fb00c8 100644 --- a/zuul-processor/src/main/java/com/netflix/zuul/filters/processor/FilterProcessor.java +++ b/zuul-processor/src/main/java/com/netflix/zuul/filters/processor/FilterProcessor.java @@ -16,15 +16,23 @@ package com.netflix.zuul.filters.processor; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.CaseFormat; +import com.google.common.base.Converter; +import com.google.common.base.Splitter; import com.netflix.zuul.Filter; +import java.io.IOException; import java.io.Writer; import java.util.ArrayList; +import java.util.Collection; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.Objects; import java.util.Set; import java.util.TreeMap; +import java.util.TreeSet; import javax.annotation.processing.AbstractProcessor; import javax.annotation.processing.Filer; import javax.annotation.processing.RoundEnvironment; @@ -41,14 +49,16 @@ @SupportedSourceVersion(SourceVersion.RELEASE_8) public final class FilterProcessor extends AbstractProcessor { - private final Map> packageToElements = new TreeMap<>(); + private final Map> packageToElements = new TreeMap<>(String::compareTo); @Override public boolean process(Set annotations, RoundEnvironment roundEnv) { Set annotated = roundEnv.getElementsAnnotatedWith(Filter.class); Elements elementUtils = processingEnv.getElementUtils(); for (Element el : annotated) { - el.getModifiers().contains(Modifier.ABSTRACT); + if (el.getModifiers().contains(Modifier.ABSTRACT)) { + continue; + } packageToElements.computeIfAbsent( String.valueOf(elementUtils.getPackageOf(el).getQualifiedName()), k -> new LinkedHashSet<>()) .add(el); @@ -68,32 +78,66 @@ public boolean process(Set annotations, RoundEnvironment return true; } + @VisibleForTesting + static void writeFile(Writer writer, String packageName, String className, Collection elements) + throws IOException { + writer.write("package " + packageName + ";\n"); + writer.write("\n"); + writer.write("@javax.annotation.Generated(\"by: \\\"" + FilterProcessor.class.getName() + "\\\"\")\n"); + writer.write("public final class " + className + " {\n"); + writer.write("\n"); + writer.write(" private " + className + "() {}\n"); + writer.write("\n"); + writer.write(" public static java.util.List>> getFilters() {\n"); + writer.write(" return FILTERS;\n"); + writer.write(" }\n"); + writer.write("\n"); + writer.write(" private static final java.util.List>> FILTERS =\n"); + writer.write(" java.util.Collections.unmodifiableList(java.util.Arrays.asList(\n"); + int i = 0; + for (Element element : elements) { + writer.write(" " + element + ".class"); + if (++i < elements.size()) { + writer.write(','); + } + writer.write('\n'); + } + writer.write(" ));\n"); + writer.write("}\n"); + } + private static void writeFiles(Filer filer, Map> packageToElements) throws Exception { for (Entry> entry : packageToElements.entrySet()) { String pkg = entry.getKey(); List elements = new ArrayList<>(entry.getValue()); - JavaFileObject source = filer.createSourceFile(pkg + ".AllFilters", elements.toArray(new Element[0])); - try (Writer w = source.openWriter()) { - w.write("package " + pkg + ";\n"); - w.write("\n"); - w.write("@javax.annotation.Generated(\"by: \\\"" + FilterProcessor.class.getName() + "\\\"\")\n"); - w.write("public final class AllFilters {\n"); - w.write("\n"); - w.write(" private AllFilters () {}\n"); - w.write("\n"); - w.write(" public static final java.util.List>> FILTERS =\n"); - w.write(" java.util.Collections.unmodifiableList(java.util.Arrays.asList(\n"); - for (int i = 0; i < elements.size(); i++) { - w.write(" " + elements.get(i) + ".class"); - if (i != elements.size() - 1) { - w.write(','); - } - w.write('\n'); - } - w.write(" ));\n"); - w.write("}\n"); + String className = deriveGeneratedClassName(pkg); + JavaFileObject source = filer.createSourceFile(pkg + "." + className, elements.toArray(new Element[0])); + try (Writer writer = source.openWriter()) { + writeFile(writer, pkg, className, elements); } } } + + @VisibleForTesting + static String deriveGeneratedClassName(String packageName) { + Objects.requireNonNull(packageName, "packageName"); + List parts = Splitter.on('.').splitToList(packageName); + Converter converter = CaseFormat.LOWER_UNDERSCORE.converterTo(CaseFormat.UPPER_CAMEL); + String baseName = ""; + switch (parts.size()) { + default: + // fallthrough + case 2: + baseName += converter.convert(parts.get(parts.size() - 2)); + // fallthrough + case 1: + baseName += converter.convert(parts.get(parts.size() - 1)); + // fallthrough + case 0: + baseName += "Filters"; + } + return baseName; + } } diff --git a/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/FilterProcessorTest.java b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/FilterProcessorTest.java new file mode 100644 index 00000000..85c15b63 --- /dev/null +++ b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/FilterProcessorTest.java @@ -0,0 +1,83 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.filters.processor; + +import static org.junit.Assert.assertEquals; + +import com.google.common.truth.Truth; +import com.netflix.zuul.filters.ZuulFilter; +import com.netflix.zuul.filters.processor.subpackage.ProcessorSubpackageFilters; +import com.netflix.zuul.filters.processor.subpackage.SubpackageFilter; +import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** + * Tests for {@link FilterProcessor}. + */ +@RunWith(JUnit4.class) +public class FilterProcessorTest { + + @Test + public void allFilterClassedRecorded() { + List>> filters = FiltersProcessorFilters.getFilters(); + List>> subpackage = ProcessorSubpackageFilters.getFilters(); + + Truth.assertThat(filters).containsExactly( + OuterClassFilter.class, + TopLevelFilter.class, + TopLevelFilter.StaticSubclassFilter.class, + TopLevelFilter.SubclassFilter.class); + Truth.assertThat(subpackage).containsExactly(SubpackageFilter.class); + } + + @Test + public void deriveGeneratedClassName_emptyPackage() { + String className = FilterProcessor.deriveGeneratedClassName(""); + + assertEquals("Filters", className); + } + + @Test + public void deriveGeneratedClassName_shortPackage() { + String className = FilterProcessor.deriveGeneratedClassName("somepackage"); + + assertEquals("SomepackageFilters", className); + } + + @Test + public void deriveGeneratedClassName_twoPartPackage() { + String className = FilterProcessor.deriveGeneratedClassName("two.part"); + + assertEquals("TwoPartFilters", className); + } + + @Test + public void deriveGeneratedClassName_threePartPackage() { + String className = FilterProcessor.deriveGeneratedClassName("packed.three.part"); + + assertEquals("ThreePartFilters", className); + } + + @Test + public void deriveGeneratedClassName_underscorePackage() { + String className = FilterProcessor.deriveGeneratedClassName("packed.three_under.part"); + + assertEquals("ThreeUnderPartFilters", className); + } +} diff --git a/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/TestFilter.java b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/TestFilter.java new file mode 100644 index 00000000..72cbe14b --- /dev/null +++ b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/TestFilter.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.filters.processor; + +import com.netflix.zuul.exception.ZuulFilterConcurrencyExceededException; +import com.netflix.zuul.filters.FilterSyncType; +import com.netflix.zuul.filters.FilterType; +import com.netflix.zuul.filters.ZuulFilter; +import com.netflix.zuul.message.ZuulMessage; +import io.netty.handler.codec.http.HttpContent; +import rx.Observable; + +/** + * A dummy filter which is used for testing. + */ +public abstract class TestFilter implements ZuulFilter { + + @Override + public boolean isDisabled() { + throw new UnsupportedOperationException(); + } + + @Override + public String filterName() { + throw new UnsupportedOperationException(); + } + + @Override + public int filterOrder() { + throw new UnsupportedOperationException(); + } + + @Override + public FilterType filterType() { + throw new UnsupportedOperationException(); + } + + @Override + public boolean overrideStopFilterProcessing() { + throw new UnsupportedOperationException(); + } + + @Override + public void incrementConcurrency() throws ZuulFilterConcurrencyExceededException { + throw new UnsupportedOperationException(); + } + + @Override + public Observable applyAsync(ZuulMessage input) { + throw new UnsupportedOperationException(); + } + + @Override + public void decrementConcurrency() { + throw new UnsupportedOperationException(); + } + + @Override + public FilterSyncType getSyncType() { + throw new UnsupportedOperationException(); + } + + @Override + public ZuulMessage getDefaultOutput(ZuulMessage input) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean needsBodyBuffered(ZuulMessage input) { + throw new UnsupportedOperationException(); + } + + @Override + public HttpContent processContentChunk(ZuulMessage zuulMessage, HttpContent chunk) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean shouldFilter(ZuulMessage msg) { + throw new UnsupportedOperationException(); + } +} diff --git a/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/TopLevelFilter.java b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/TopLevelFilter.java new file mode 100644 index 00000000..69e24f4d --- /dev/null +++ b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/TopLevelFilter.java @@ -0,0 +1,47 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.filters.processor; + +import com.netflix.zuul.Filter; +import com.netflix.zuul.filters.FilterType; + +/** + * Used to test generated code. + */ +@Filter(order = 20, type = FilterType.INBOUND) +final class TopLevelFilter extends TestFilter { + + @Filter(order = 21, type = FilterType.INBOUND) + static final class StaticSubclassFilter extends TestFilter {} + + @SuppressWarnings("unused") // This should be ignored by the processor, since it is abstract + @Filter(order = 22, type = FilterType.INBOUND) + static abstract class AbstractSubclassFilter extends TestFilter {} + + @Filter(order = 23, type = FilterType.INBOUND) + final class SubclassFilter extends TestFilter {} + + static { + // This should be ignored by the processor, since it is private. + // See https://bugs.openjdk.java.net/browse/JDK-6587158 + @SuppressWarnings("unused") + @Filter(order = 23, type = FilterType.INBOUND) + final class MethodClassFilter {} + } +} +@Filter(order = 24, type = FilterType.INBOUND) +final class OuterClassFilter extends TestFilter {} diff --git a/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/subpackage/SubpackageFilter.java b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/subpackage/SubpackageFilter.java new file mode 100644 index 00000000..ff82213f --- /dev/null +++ b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/subpackage/SubpackageFilter.java @@ -0,0 +1,25 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.filters.processor.subpackage; + +import com.netflix.zuul.Filter; +import com.netflix.zuul.filters.FilterType; +import com.netflix.zuul.filters.processor.TestFilter; + +@Filter(order = 30, type = FilterType.INBOUND) +public final class SubpackageFilter extends TestFilter { +} diff --git a/zuul-sample/src/main/java/com/netflix/zuul/sample/filters/Debug.java b/zuul-sample/src/main/java/com/netflix/zuul/sample/filters/Debug.java index 7e687abf..0e9f4067 100644 --- a/zuul-sample/src/main/java/com/netflix/zuul/sample/filters/Debug.java +++ b/zuul-sample/src/main/java/com/netflix/zuul/sample/filters/Debug.java @@ -28,7 +28,7 @@ * Author: Arthur Gonigberg * Date: December 22, 2017 */ -@Filter(20) +@Filter(order = 20) public class Debug extends HttpInboundSyncFilter { @Override public int filterOrder() { From 4ec1fe28c09de65136a2cb33adbb1d6121340bc7 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 12 Mar 2020 18:55:40 -0700 Subject: [PATCH 016/273] all: bump dependency locks --- zuul-core/dependencies.lock | 190 +-- zuul-processor/dependencies.lock | 1902 ++++++++++++++++++++++++++++++ zuul-sample/dependencies.lock | 498 ++++++-- 3 files changed, 2396 insertions(+), 194 deletions(-) create mode 100644 zuul-processor/dependencies.lock diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 3ee6e484..5d0912f3 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -101,43 +101,43 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-common": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-handler": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { @@ -287,43 +287,43 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-common": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-handler": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { @@ -473,47 +473,47 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-common": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-handler": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.28.Final", + "locked": "2.0.29.Final", "requested": "2.0.29.Final" }, "io.netty:netty-transport": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { @@ -663,47 +663,47 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-common": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-handler": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.28.Final", + "locked": "2.0.29.Final", "requested": "2.0.29.Final" }, "io.netty:netty-transport": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { @@ -853,47 +853,47 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-common": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-handler": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.28.Final", + "locked": "2.0.29.Final", "requested": "2.0.29.Final" }, "io.netty:netty-transport": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { @@ -1047,43 +1047,43 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-common": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-handler": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { @@ -1237,43 +1237,43 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-common": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-handler": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { @@ -1427,47 +1427,47 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-common": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-handler": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.28.Final", + "locked": "2.0.29.Final", "requested": "2.0.29.Final" }, "io.netty:netty-transport": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { @@ -1625,47 +1625,47 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-common": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-handler": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.28.Final", + "locked": "2.0.29.Final", "requested": "2.0.29.Final" }, "io.netty:netty-transport": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.45.Final", + "locked": "4.1.46.Final", "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock new file mode 100644 index 00000000..83560055 --- /dev/null +++ b/zuul-processor/dependencies.lock @@ -0,0 +1,1902 @@ +{ + "compile": { + "com.google.inject.extensions:guice-assistedinject": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "locked": "4.2.2", + "requested": "4.2.2" + } + }, + "compileClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.2-jre", + "requested": "28.2-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.5" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.4" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.2" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.59.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-collections:commons-collections": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.2.2" + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "commons-fileupload:commons-fileupload": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.3" + }, + "commons-io:commons-io": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-resolver": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.29.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.20.1" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.13" + }, + "log4j:log4j": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.17" + }, + "org.apache.commons:commons-lang3": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.4" + }, + "org.bouncycastle:bcpg-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.json:json": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "20090211" + }, + "org.mockito:mockito-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.5" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "default": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.2-jre", + "requested": "28.2-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.4" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.59.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-collections:commons-collections": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.2.2" + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "commons-fileupload:commons-fileupload": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.3" + }, + "commons-io:commons-io": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-resolver": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.29.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.20.1" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.13" + }, + "log4j:log4j": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.17" + }, + "org.apache.commons:commons-lang3": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.4" + }, + "org.bouncycastle:bcpg-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.json:json": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "20090211" + }, + "org.mockito:mockito-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.5" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "runtime": { + "com.google.inject.extensions:guice-assistedinject": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "locked": "4.2.2", + "requested": "4.2.2" + } + }, + "runtimeClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.2-jre", + "requested": "28.2-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.4" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.59.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-collections:commons-collections": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.2.2" + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "commons-fileupload:commons-fileupload": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.3" + }, + "commons-io:commons-io": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-resolver": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.29.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.20.1" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.13" + }, + "log4j:log4j": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.17" + }, + "org.apache.commons:commons-lang3": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.4" + }, + "org.bouncycastle:bcpg-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.json:json": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "20090211" + }, + "org.mockito:mockito-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.5" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "testAnnotationProcessor": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-processor" + ], + "locked": "28.2-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-processor" + ], + "locked": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-processor" + ], + "locked": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-processor" + ], + "locked": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-processor" + ], + "locked": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-processor" + ], + "locked": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-processor" + ], + "locked": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.4" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.59.0" + }, + "com.netflix.zuul:zuul-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-processor" + ], + "project": true + }, + "com.netflix.zuul:zuul-processor": { + "project": true + }, + "commons-collections:commons-collections": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.2.2" + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "commons-fileupload:commons-fileupload": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.3" + }, + "commons-io:commons-io": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-resolver": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.29.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.20.1" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.13" + }, + "log4j:log4j": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.17" + }, + "org.apache.commons:commons-lang3": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.4" + }, + "org.bouncycastle:bcpg-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.json:json": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "20090211" + }, + "org.mockito:mockito-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.5" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "testCompile": { + "com.google.inject.extensions:guice-assistedinject": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.truth:truth": { + "locked": "1.0.1", + "requested": "1.0.1" + }, + "junit:junit": { + "locked": "4.13-rc-1", + "requested": "4.13-rc-1" + } + }, + "testCompileClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.2-jre", + "requested": "28.2-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.truth:truth": { + "locked": "1.0.1", + "requested": "1.0.1" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.5" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.4" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.2" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.59.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-collections:commons-collections": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.2.2" + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "commons-fileupload:commons-fileupload": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.3" + }, + "commons-io:commons-io": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-resolver": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.29.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.20.1" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.13", + "requested": "4.13-rc-1" + }, + "log4j:log4j": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.17" + }, + "org.apache.commons:commons-lang3": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.4" + }, + "org.bouncycastle:bcpg-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.json:json": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "20090211" + }, + "org.mockito:mockito-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.5" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "testRuntime": { + "com.google.inject.extensions:guice-assistedinject": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.truth:truth": { + "locked": "1.0.1", + "requested": "1.0.1" + }, + "junit:junit": { + "locked": "4.13-rc-1", + "requested": "4.13-rc-1" + } + }, + "testRuntimeClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.2-jre", + "requested": "28.2-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.truth:truth": { + "locked": "1.0.1", + "requested": "1.0.1" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.4" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.59.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-collections:commons-collections": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.2.2" + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "commons-fileupload:commons-fileupload": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.3" + }, + "commons-io:commons-io": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-resolver": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.29.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.20.1" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.13", + "requested": "4.13-rc-1" + }, + "log4j:log4j": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.17" + }, + "org.apache.commons:commons-lang3": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.4" + }, + "org.bouncycastle:bcpg-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.json:json": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "20090211" + }, + "org.mockito:mockito-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.5" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + } +} \ No newline at end of file diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index ac2f0741..1e1f8a6e 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -1,4 +1,304 @@ { + "annotationProcessor": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-processor" + ], + "locked": "28.2-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-processor" + ], + "locked": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-processor" + ], + "locked": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-processor" + ], + "locked": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-processor" + ], + "locked": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-processor" + ], + "locked": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-processor" + ], + "locked": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.4" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.59.0" + }, + "com.netflix.zuul:zuul-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-processor" + ], + "project": true + }, + "com.netflix.zuul:zuul-processor": { + "project": true + }, + "commons-collections:commons-collections": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.2.2" + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "commons-fileupload:commons-fileupload": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.3" + }, + "commons-io:commons-io": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-resolver": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.29.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.46.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.20.1" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.13" + }, + "log4j:log4j": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.17" + }, + "org.apache.commons:commons-lang3": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.4" + }, + "org.bouncycastle:bcpg-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.json:json": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "20090211" + }, + "org.mockito:mockito-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.5" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, "compile": { "com.fasterxml.jackson.core:jackson-core": { "firstLevelTransitive": [ @@ -167,67 +467,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.28.Final" + "locked": "2.0.29.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -464,67 +764,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.28.Final" + "locked": "2.0.29.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -761,67 +1061,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.28.Final" + "locked": "2.0.29.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -1058,67 +1358,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.28.Final" + "locked": "2.0.29.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -1355,67 +1655,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.28.Final" + "locked": "2.0.29.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -1652,67 +1952,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.28.Final" + "locked": "2.0.29.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -1949,67 +2249,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.28.Final" + "locked": "2.0.29.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -2246,67 +2546,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.28.Final" + "locked": "2.0.29.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -2543,67 +2843,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.28.Final" + "locked": "2.0.29.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.45.Final" + "locked": "4.1.46.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ From 0b8d92ec8eaee319aca3e4db4e34d2ccbf9849a7 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 12 Mar 2020 19:04:30 -0700 Subject: [PATCH 017/273] all: update spectator api --- zuul-core/build.gradle | 2 +- zuul-core/dependencies.lock | 50 ++++++++++++++++---------------- zuul-processor/dependencies.lock | 20 ++++++------- zuul-sample/dependencies.lock | 36 +++++++++++------------ 4 files changed, 54 insertions(+), 54 deletions(-) diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index 84c618b2..a892d7ed 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -20,7 +20,7 @@ dependencies { compile "com.netflix.archaius:archaius-core:0.7.5" compile "com.netflix.servo:servo-core:0.7.2" - compile "com.netflix.spectator:spectator-api:0.59.0" + compile "com.netflix.spectator:spectator-api:0.103.0" compile "com.netflix.netflix-commons:netflix-commons-util:0.3.0" compile "com.netflix.ribbon:ribbon-core:${versions_ribbon}" diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 5d0912f3..132e2ce7 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -81,8 +81,8 @@ "requested": "0.7.2" }, "com.netflix.spectator:spectator-api": { - "locked": "0.59.0", - "requested": "0.59.0" + "locked": "0.103.0", + "requested": "0.103.0" }, "commons-collections:commons-collections": { "locked": "3.2.2", @@ -181,7 +181,7 @@ "requested": "1.9.+" }, "org.slf4j:slf4j-api": { - "locked": "1.7.25", + "locked": "1.7.30", "requested": "1.7.25" } }, @@ -267,8 +267,8 @@ "requested": "0.7.2" }, "com.netflix.spectator:spectator-api": { - "locked": "0.59.0", - "requested": "0.59.0" + "locked": "0.103.0", + "requested": "0.103.0" }, "commons-collections:commons-collections": { "locked": "3.2.2", @@ -453,8 +453,8 @@ "requested": "0.7.2" }, "com.netflix.spectator:spectator-api": { - "locked": "0.59.0", - "requested": "0.59.0" + "locked": "0.103.0", + "requested": "0.103.0" }, "commons-collections:commons-collections": { "locked": "3.2.2", @@ -557,7 +557,7 @@ "requested": "1.9.+" }, "org.slf4j:slf4j-api": { - "locked": "1.7.25", + "locked": "1.7.30", "requested": "1.7.25" } }, @@ -643,8 +643,8 @@ "requested": "0.7.2" }, "com.netflix.spectator:spectator-api": { - "locked": "0.59.0", - "requested": "0.59.0" + "locked": "0.103.0", + "requested": "0.103.0" }, "commons-collections:commons-collections": { "locked": "3.2.2", @@ -747,7 +747,7 @@ "requested": "1.9.+" }, "org.slf4j:slf4j-api": { - "locked": "1.7.25", + "locked": "1.7.30", "requested": "1.7.25" } }, @@ -833,8 +833,8 @@ "requested": "0.7.2" }, "com.netflix.spectator:spectator-api": { - "locked": "0.59.0", - "requested": "0.59.0" + "locked": "0.103.0", + "requested": "0.103.0" }, "commons-collections:commons-collections": { "locked": "3.2.2", @@ -937,7 +937,7 @@ "requested": "1.9.+" }, "org.slf4j:slf4j-api": { - "locked": "1.7.25", + "locked": "1.7.30", "requested": "1.7.25" } }, @@ -1027,8 +1027,8 @@ "requested": "0.7.2" }, "com.netflix.spectator:spectator-api": { - "locked": "0.59.0", - "requested": "0.59.0" + "locked": "0.103.0", + "requested": "0.103.0" }, "commons-collections:commons-collections": { "locked": "3.2.2", @@ -1127,7 +1127,7 @@ "requested": "1.9.+" }, "org.slf4j:slf4j-api": { - "locked": "1.7.25", + "locked": "1.7.30", "requested": "1.7.25" } }, @@ -1217,8 +1217,8 @@ "requested": "0.7.2" }, "com.netflix.spectator:spectator-api": { - "locked": "0.59.0", - "requested": "0.59.0" + "locked": "0.103.0", + "requested": "0.103.0" }, "commons-collections:commons-collections": { "locked": "3.2.2", @@ -1407,8 +1407,8 @@ "requested": "0.7.2" }, "com.netflix.spectator:spectator-api": { - "locked": "0.59.0", - "requested": "0.59.0" + "locked": "0.103.0", + "requested": "0.103.0" }, "commons-collections:commons-collections": { "locked": "3.2.2", @@ -1511,7 +1511,7 @@ "requested": "1.9.+" }, "org.slf4j:slf4j-api": { - "locked": "1.7.29", + "locked": "1.7.30", "requested": "1.7.25" }, "org.slf4j:slf4j-simple": { @@ -1605,8 +1605,8 @@ "requested": "0.7.2" }, "com.netflix.spectator:spectator-api": { - "locked": "0.59.0", - "requested": "0.59.0" + "locked": "0.103.0", + "requested": "0.103.0" }, "commons-collections:commons-collections": { "locked": "3.2.2", @@ -1709,7 +1709,7 @@ "requested": "1.9.+" }, "org.slf4j:slf4j-api": { - "locked": "1.7.29", + "locked": "1.7.30", "requested": "1.7.25" }, "org.slf4j:slf4j-simple": { diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 83560055..352be159 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -157,7 +157,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.59.0" + "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -451,7 +451,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.59.0" + "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -610,7 +610,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.7.25" + "locked": "1.7.30" } }, "runtime": { @@ -771,7 +771,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.59.0" + "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -930,7 +930,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.7.25" + "locked": "1.7.30" } }, "testAnnotationProcessor": { @@ -1065,7 +1065,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.59.0" + "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { "firstLevelTransitive": [ @@ -1230,7 +1230,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.7.25" + "locked": "1.7.30" } }, "testCompile": { @@ -1403,7 +1403,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.59.0" + "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -1736,7 +1736,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.59.0" + "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -1896,7 +1896,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.7.25" + "locked": "1.7.30" } } } \ No newline at end of file diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 1e1f8a6e..d2d4a908 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -131,7 +131,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.59.0" + "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { "firstLevelTransitive": [ @@ -296,7 +296,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.7.25" + "locked": "1.7.30" } }, "compile": { @@ -434,7 +434,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.59.0" + "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -593,7 +593,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.7.25" + "locked": "1.7.30" } }, "compileClasspath": { @@ -731,7 +731,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.59.0" + "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -1028,7 +1028,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.59.0" + "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -1187,7 +1187,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.7.25" + "locked": "1.7.30" } }, "runtime": { @@ -1325,7 +1325,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.59.0" + "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -1484,7 +1484,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.7.25" + "locked": "1.7.30" } }, "runtimeClasspath": { @@ -1622,7 +1622,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.59.0" + "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -1781,7 +1781,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.7.25" + "locked": "1.7.30" } }, "testCompile": { @@ -1919,7 +1919,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.59.0" + "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -2078,7 +2078,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.7.25" + "locked": "1.7.30" } }, "testCompileClasspath": { @@ -2216,7 +2216,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.59.0" + "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -2513,7 +2513,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.59.0" + "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -2672,7 +2672,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.7.25" + "locked": "1.7.30" } }, "testRuntimeClasspath": { @@ -2810,7 +2810,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.59.0" + "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -2969,7 +2969,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.7.25" + "locked": "1.7.30" } } } \ No newline at end of file From 378987ab07791d152390cb36613a37a2a537e12f Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 12 Mar 2020 19:29:30 -0700 Subject: [PATCH 018/273] zuul-core: add more Filter annotations --- .../netflix/zuul/filters/TestSyncFilter.java | 46 ------------------- .../filters/common/GZipResponseFilter.java | 3 ++ .../filters/common/SurgicalDebugFilter.java | 3 ++ .../MissingEndpointHandlingFilter.java | 4 +- .../zuul/filters/endpoint/ProxyEndpoint.java | 3 ++ .../InboundPassportStampingFilter.java | 2 + .../OutboundPassportStampingFilter.java | 2 + .../filters/processor/TopLevelFilter.java | 1 + 8 files changed, 17 insertions(+), 47 deletions(-) delete mode 100644 zuul-core/src/main/java/com/netflix/zuul/filters/TestSyncFilter.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/TestSyncFilter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/TestSyncFilter.java deleted file mode 100644 index ca45bf1a..00000000 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/TestSyncFilter.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2018 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.netflix.zuul.filters; - -import com.netflix.zuul.message.http.HttpRequestMessage; - -/** - * User: michaels@netflix.com - * Date: 5/15/15 - * Time: 10:54 AM - */ -public class TestSyncFilter extends BaseSyncFilter -{ - @Override - public HttpRequestMessage apply(HttpRequestMessage input) { - return input; - } - - @Override - public int filterOrder() { - return 0; - } - - @Override - public FilterType filterType() { - return FilterType.INBOUND; - } - - @Override - public boolean shouldFilter(HttpRequestMessage msg) { - return true; - } -} diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/common/GZipResponseFilter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/common/GZipResponseFilter.java index 871e2dfc..3d7fa45d 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/common/GZipResponseFilter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/common/GZipResponseFilter.java @@ -20,7 +20,9 @@ import com.netflix.config.CachedDynamicBooleanProperty; import com.netflix.config.CachedDynamicIntProperty; import com.netflix.config.DynamicStringSetProperty; +import com.netflix.zuul.Filter; import com.netflix.zuul.context.CommonContextKeys; +import com.netflix.zuul.filters.FilterType; import com.netflix.zuul.filters.http.HttpOutboundSyncFilter; import com.netflix.zuul.message.Headers; import com.netflix.zuul.message.ZuulMessage; @@ -41,6 +43,7 @@ * * @author Mike Smith */ +@Filter(order = 101, type = FilterType.OUTBOUND) public class GZipResponseFilter extends HttpOutboundSyncFilter { private static DynamicStringSetProperty GZIPPABLE_CONTENT_TYPES = new DynamicStringSetProperty("zuul.gzip.contenttypes", diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/common/SurgicalDebugFilter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/common/SurgicalDebugFilter.java index b8604fab..231c4cf7 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/common/SurgicalDebugFilter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/common/SurgicalDebugFilter.java @@ -17,9 +17,11 @@ import com.netflix.config.DynamicBooleanProperty; import com.netflix.config.DynamicStringProperty; +import com.netflix.zuul.Filter; import com.netflix.zuul.constants.ZuulConstants; import com.netflix.zuul.constants.ZuulHeaders; import com.netflix.zuul.context.SessionContext; +import com.netflix.zuul.filters.FilterType; import com.netflix.zuul.filters.http.HttpInboundSyncFilter; import com.netflix.zuul.message.http.HttpQueryParams; import com.netflix.zuul.message.http.HttpRequestMessage; @@ -32,6 +34,7 @@ * Date: 6/27/12 * Time: 12:54 PM */ +@Filter(order = 99, type = FilterType.INBOUND) public class SurgicalDebugFilter extends HttpInboundSyncFilter { /** diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/MissingEndpointHandlingFilter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/MissingEndpointHandlingFilter.java index 7d7a5dca..d190fccc 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/MissingEndpointHandlingFilter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/MissingEndpointHandlingFilter.java @@ -16,8 +16,10 @@ package com.netflix.zuul.filters.endpoint; +import com.netflix.zuul.Filter; import com.netflix.zuul.context.SessionContext; import com.netflix.zuul.exception.ZuulException; +import com.netflix.zuul.filters.FilterType; import com.netflix.zuul.filters.SyncZuulFilterAdapter; import com.netflix.zuul.message.http.HttpRequestMessage; import com.netflix.zuul.message.http.HttpResponseMessage; @@ -28,6 +30,7 @@ /** * Created by saroskar on 2/13/17. */ +@Filter(order = 0, type = FilterType.ENDPOINT) public final class MissingEndpointHandlingFilter extends SyncZuulFilterAdapter { private final String name; @@ -56,5 +59,4 @@ public String filterName() { public HttpResponseMessage getDefaultOutput(final HttpRequestMessage input) { return HttpResponseMessageImpl.defaultErrorResponse(input); } - } diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 0d0cc2ea..d4d33794 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -28,6 +28,7 @@ import com.netflix.loadbalancer.reactive.ExecutionContext; import com.netflix.netty.common.channel.config.CommonChannelConfigKeys; import com.netflix.spectator.api.Counter; +import com.netflix.zuul.Filter; import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.context.Debug; import com.netflix.zuul.context.SessionContext; @@ -35,6 +36,7 @@ import com.netflix.zuul.exception.OutboundErrorType; import com.netflix.zuul.exception.OutboundException; import com.netflix.zuul.exception.ZuulException; +import com.netflix.zuul.filters.FilterType; import com.netflix.zuul.filters.SyncZuulFilterAdapter; import com.netflix.zuul.message.HeaderName; import com.netflix.zuul.message.Headers; @@ -105,6 +107,7 @@ * attempt/retry. All the retry attempts for a given HTTP/1.1 request proxied share the same EdgeProxyEndpoint instance * Created by saroskar on 5/31/17. */ +@Filter(order = 0, type = FilterType.ENDPOINT) public class ProxyEndpoint extends SyncZuulFilterAdapter implements GenericFutureListener> { private final ChannelHandlerContext channelCtx; diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/passport/InboundPassportStampingFilter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/passport/InboundPassportStampingFilter.java index 291c41d7..870f21e1 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/passport/InboundPassportStampingFilter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/passport/InboundPassportStampingFilter.java @@ -16,6 +16,7 @@ package com.netflix.zuul.filters.passport; +import com.netflix.zuul.Filter; import com.netflix.zuul.filters.FilterType; import com.netflix.zuul.message.http.HttpRequestMessage; import com.netflix.zuul.passport.PassportState; @@ -25,6 +26,7 @@ /** * Created by saroskar on 3/14/17. */ +@Filter(order = 0, type = INBOUND) public final class InboundPassportStampingFilter extends PassportStampingFilter { public InboundPassportStampingFilter(PassportState stamp) { diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/passport/OutboundPassportStampingFilter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/passport/OutboundPassportStampingFilter.java index d3cff91b..776657e2 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/passport/OutboundPassportStampingFilter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/passport/OutboundPassportStampingFilter.java @@ -16,6 +16,7 @@ package com.netflix.zuul.filters.passport; +import com.netflix.zuul.Filter; import com.netflix.zuul.filters.FilterType; import com.netflix.zuul.message.http.HttpResponseMessage; import com.netflix.zuul.passport.PassportState; @@ -25,6 +26,7 @@ /** * Created by saroskar on 3/14/17. */ +@Filter(order = 0, type = OUTBOUND) public final class OutboundPassportStampingFilter extends PassportStampingFilter { public OutboundPassportStampingFilter(PassportState stamp) { diff --git a/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/TopLevelFilter.java b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/TopLevelFilter.java index 69e24f4d..300a97cb 100644 --- a/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/TopLevelFilter.java +++ b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/TopLevelFilter.java @@ -32,6 +32,7 @@ static final class StaticSubclassFilter extends TestFilter {} @Filter(order = 22, type = FilterType.INBOUND) static abstract class AbstractSubclassFilter extends TestFilter {} + @SuppressWarnings("InnerClassMayBeStatic") // The purpose of this test @Filter(order = 23, type = FilterType.INBOUND) final class SubclassFilter extends TestFilter {} From 17a9c63604bb28d4cf50ed2e9efed51367bec16b Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 18 Mar 2020 16:42:14 -0700 Subject: [PATCH 019/273] zuul-core: Fix host and port parsing in HttpRequestMessageImpl --- .../message/http/HttpRequestMessageImpl.java | 78 ++++++++++-------- .../http/HttpRequestMessageImplTest.java | 82 +++++++++++++++++++ 2 files changed, 125 insertions(+), 35 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java index 046c5ec5..29f74e25 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java @@ -32,6 +32,8 @@ import io.netty.handler.codec.http.HttpContent; import java.net.InetSocketAddress; import java.net.SocketAddress; +import java.net.URI; +import java.net.URISyntaxException; import java.net.URLDecoder; import java.util.ArrayList; import java.util.List; @@ -69,7 +71,6 @@ public class HttpRequestMessageImpl implements HttpRequestMessage } } - private static final Pattern PTN_COLON = Pattern.compile(":"); private static final String URI_SCHEME_SEP = "://"; private static final String URI_SCHEME_HTTP = "http"; private static final String URI_SCHEME_HTTPS = "https"; @@ -475,21 +476,29 @@ protected String generateInfoForLogging() * @return */ @Override - public String getOriginalHost() - { - String host = getHeaders().getFirst(HttpHeaderNames.X_FORWARDED_HOST); - if (host == null) { - host = getHeaders().getFirst(HttpHeaderNames.HOST); - if (host != null) { - // Host header may have a trailing port. Strip that out if it does. - host = PTN_COLON.split(host)[0]; - } + public String getOriginalHost() { + try { + return getOriginalHost(getHeaders(), getServerName()); + } catch (URISyntaxException e) { + throw new IllegalArgumentException(e); + } + } - if (host == null) { - host = getServerName(); + @VisibleForTesting + static String getOriginalHost(Headers headers, String serverName) throws URISyntaxException { + String xForwardedHost = headers.getFirst(HttpHeaderNames.X_FORWARDED_HOST); + if (xForwardedHost != null) { + return xForwardedHost; + } + String host = headers.getFirst(HttpHeaderNames.HOST); + if (host != null) { + URI uri = new URI(/* scheme= */ null, host, /* path= */ null, /* query= */ null, /* fragment= */ null); + if (uri.getHost() == null) { + throw new URISyntaxException(host, "Bad host name"); } + return uri.getHost(); } - return host; + return serverName; } @Override @@ -513,30 +522,29 @@ public String getOriginalProtocol() } @Override - public int getOriginalPort() - { - int port; - String portStr = getHeaders().getFirst(HttpHeaderNames.X_FORWARDED_PORT); - if (portStr == null) { - // Check if port was specified on a Host header. - String hostHeader = getHeaders().getFirst(HttpHeaderNames.HOST); - if (hostHeader != null) { - String[] hostParts = PTN_COLON.split(hostHeader); - if (hostParts.length == 2) { - port = Integer.parseInt(hostParts[1]); - } - else { - port = getPort(); - } - } - else { - port = getPort(); - } + public int getOriginalPort() { + try { + return getOriginalPort(getHeaders(), getPort()); + } catch (URISyntaxException e) { + throw new IllegalArgumentException(e); } - else { - port = Integer.parseInt(portStr); + } + + @VisibleForTesting + static int getOriginalPort(Headers headers, int serverPort) throws URISyntaxException { + String portStr = headers.getFirst(HttpHeaderNames.X_FORWARDED_PORT); + if (portStr != null) { + return Integer.parseInt(portStr); } - return port; + // Check if port was specified on a Host header. + String host = headers.getFirst(HttpHeaderNames.HOST); + if (host != null) { + URI uri = new URI(/* scheme= */ null, host, /* path= */ null, /* query= */ null, /* fragment= */ null); + if (uri.getPort() != -1) { + return uri.getPort(); + } + } + return serverPort; } @Override diff --git a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java index 58bc787a..6871e740 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java @@ -17,6 +17,7 @@ package com.netflix.zuul.message.http; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.Mockito.spy; @@ -29,6 +30,7 @@ import io.netty.channel.local.LocalAddress; import java.net.InetSocketAddress; import java.net.SocketAddress; +import java.net.URISyntaxException; import java.util.Optional; import org.junit.Assert; import org.junit.Test; @@ -199,6 +201,38 @@ public void testGetOriginalHost() { "192.168.0.2", "https", 7002, "localhost"); Assert.assertEquals("blah.netflix.com", request.getOriginalHost()); + queryParams = new HttpQueryParams(); + headers = new Headers(); + headers.add("Host", "0.0.0.1"); + request = new HttpRequestMessageImpl(new SessionContext(), "HTTP/1.1", "POST", "/some/where", queryParams, + headers, + "192.168.0.2", "https", 7002, "localhost"); + Assert.assertEquals("0.0.0.1", request.getOriginalHost()); + + queryParams = new HttpQueryParams(); + headers = new Headers(); + headers.add("Host", "0.0.0.1:2"); + request = new HttpRequestMessageImpl(new SessionContext(), "HTTP/1.1", "POST", "/some/where", queryParams, + headers, + "192.168.0.2", "https", 7002, "localhost"); + Assert.assertEquals("0.0.0.1", request.getOriginalHost()); + + queryParams = new HttpQueryParams(); + headers = new Headers(); + headers.add("Host", "[::2]"); + request = new HttpRequestMessageImpl(new SessionContext(), "HTTP/1.1", "POST", "/some/where", queryParams, + headers, + "192.168.0.2", "https", 7002, "localhost"); + Assert.assertEquals("[::2]", request.getOriginalHost()); + + queryParams = new HttpQueryParams(); + headers = new Headers(); + headers.add("Host", "[::2]:3"); + request = new HttpRequestMessageImpl(new SessionContext(), "HTTP/1.1", "POST", "/some/where", queryParams, + headers, + "192.168.0.2", "https", 7002, "localhost"); + Assert.assertEquals("[::2]", request.getOriginalHost()); + headers = new Headers(); headers.add("Host", "blah.netflix.com"); headers.add("X-Forwarded-Host", "foo.netflix.com"); @@ -222,6 +256,18 @@ public void testGetOriginalHost() { Assert.assertEquals("blah.netflix.com", request.getOriginalHost()); } + @Test + public void getOriginalHost_failsOnUnbracketedIpv6Address() { + HttpQueryParams queryParams = new HttpQueryParams(); + Headers headers = new Headers(); + headers.add("Host", "ba::dd"); + request = new HttpRequestMessageImpl(new SessionContext(), "HTTP/1.1", "POST", "/some/where", queryParams, + headers, + "192.168.0.2", "https", 7002, "localhost"); + + assertThrows(URISyntaxException.class, () -> HttpRequestMessageImpl.getOriginalHost(headers, "server")); + } + @Test public void testGetOriginalPort() { HttpQueryParams queryParams = new HttpQueryParams(); @@ -246,6 +292,34 @@ public void testGetOriginalPort() { "192.168.0.2", "https", 7002, "localhost"); Assert.assertEquals(443, request.getOriginalPort()); + headers = new Headers(); + headers.add("Host", "127.0.0.2:443"); + request = new HttpRequestMessageImpl(new SessionContext(), "HTTP/1.1", "POST", "/some/where", queryParams, + headers, + "192.168.0.2", "https", 7002, "localhost"); + Assert.assertEquals(443, request.getOriginalPort()); + + headers = new Headers(); + headers.add("Host", "127.0.0.2"); + request = new HttpRequestMessageImpl(new SessionContext(), "HTTP/1.1", "POST", "/some/where", queryParams, + headers, + "192.168.0.2", "https", 7002, "localhost"); + Assert.assertEquals(7002, request.getOriginalPort()); + + headers = new Headers(); + headers.add("Host", "[::2]:443"); + request = new HttpRequestMessageImpl(new SessionContext(), "HTTP/1.1", "POST", "/some/where", queryParams, + headers, + "192.168.0.2", "https", 7002, "localhost"); + Assert.assertEquals(443, request.getOriginalPort()); + + headers = new Headers(); + headers.add("Host", "[::2]"); + request = new HttpRequestMessageImpl(new SessionContext(), "HTTP/1.1", "POST", "/some/where", queryParams, + headers, + "192.168.0.2", "https", 7002, "localhost"); + Assert.assertEquals(7002, request.getOriginalPort()); + headers = new Headers(); headers.add("Host", "blah.netflix.com:443"); headers.add("X-Forwarded-Port", "7005"); @@ -255,6 +329,14 @@ public void testGetOriginalPort() { Assert.assertEquals(7005, request.getOriginalPort()); } + @Test + public void getOriginalPort_fallsBackOnUnbracketedIpv6Address() throws URISyntaxException { + Headers headers = new Headers(); + headers.add("Host", "ba::33"); + + assertEquals(9999, HttpRequestMessageImpl.getOriginalPort(headers, 9999)); + } + @Test public void testCleanCookieHeaders() { assertEquals("BlahId=12345; something=67890;", From b16bd0014c75765d29e5907d3ac5eba0d8d8c5e5 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 19 Mar 2020 10:40:48 -0700 Subject: [PATCH 020/273] all: update to latest tcnative and perfmark --- zuul-core/build.gradle | 4 +-- zuul-core/dependencies.lock | 56 ++++++++++++++++---------------- zuul-processor/dependencies.lock | 24 +++++++------- zuul-sample/dependencies.lock | 40 +++++++++++------------ 4 files changed, 62 insertions(+), 62 deletions(-) diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index a892d7ed..49dedf87 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -40,7 +40,7 @@ dependencies { compile "io.netty:netty-transport:${versions_netty}" compile "io.netty:netty-transport-native-epoll:${versions_netty}:linux-x86_64" compile "io.netty:netty-transport-native-kqueue:${versions_netty}:osx-x86_64" - runtime "io.netty:netty-tcnative-boringssl-static:2.0.29.Final" + runtime "io.netty:netty-tcnative-boringssl-static:2.0.30.Final" // To ensure that zuul-netty gets this correct later version. compile "com.netflix.governator:governator:1.+" @@ -50,7 +50,7 @@ dependencies { compile "junit:junit:latest.release" compile "org.mockito:mockito-core:1.9.+" - compile 'io.perfmark:perfmark-api:0.20.1' + compile 'io.perfmark:perfmark-api:0.21.0' testCompile "com.netflix.governator:governator-test-junit:1.+" testCompile 'junit:junit:4.13-rc-1' diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 132e2ce7..a326ff24 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -141,8 +141,8 @@ "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.20.1", - "requested": "0.20.1" + "locked": "0.21.0", + "requested": "0.21.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -327,8 +327,8 @@ "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.20.1", - "requested": "0.20.1" + "locked": "0.21.0", + "requested": "0.21.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -501,8 +501,8 @@ "requested": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.29.Final", - "requested": "2.0.29.Final" + "locked": "2.0.30.Final", + "requested": "2.0.30.Final" }, "io.netty:netty-transport": { "locked": "4.1.46.Final", @@ -517,8 +517,8 @@ "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.20.1", - "requested": "0.20.1" + "locked": "0.21.0", + "requested": "0.21.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -691,8 +691,8 @@ "requested": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.29.Final", - "requested": "2.0.29.Final" + "locked": "2.0.30.Final", + "requested": "2.0.30.Final" }, "io.netty:netty-transport": { "locked": "4.1.46.Final", @@ -707,8 +707,8 @@ "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.20.1", - "requested": "0.20.1" + "locked": "0.21.0", + "requested": "0.21.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -881,8 +881,8 @@ "requested": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.29.Final", - "requested": "2.0.29.Final" + "locked": "2.0.30.Final", + "requested": "2.0.30.Final" }, "io.netty:netty-transport": { "locked": "4.1.46.Final", @@ -897,8 +897,8 @@ "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.20.1", - "requested": "0.20.1" + "locked": "0.21.0", + "requested": "0.21.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -1087,8 +1087,8 @@ "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.20.1", - "requested": "0.20.1" + "locked": "0.21.0", + "requested": "0.21.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -1277,8 +1277,8 @@ "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.20.1", - "requested": "0.20.1" + "locked": "0.21.0", + "requested": "0.21.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -1455,8 +1455,8 @@ "requested": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.29.Final", - "requested": "2.0.29.Final" + "locked": "2.0.30.Final", + "requested": "2.0.30.Final" }, "io.netty:netty-transport": { "locked": "4.1.46.Final", @@ -1471,8 +1471,8 @@ "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.20.1", - "requested": "0.20.1" + "locked": "0.21.0", + "requested": "0.21.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -1653,8 +1653,8 @@ "requested": "4.1.46.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.29.Final", - "requested": "2.0.29.Final" + "locked": "2.0.30.Final", + "requested": "2.0.30.Final" }, "io.netty:netty-transport": { "locked": "4.1.46.Final", @@ -1669,8 +1669,8 @@ "requested": "4.1.46.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.20.1", - "requested": "0.20.1" + "locked": "0.21.0", + "requested": "0.21.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 352be159..de67e7ff 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -232,7 +232,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.29.Final" + "locked": "2.0.30.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -256,7 +256,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.20.1" + "locked": "0.21.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -526,7 +526,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.29.Final" + "locked": "2.0.30.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -550,7 +550,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.20.1" + "locked": "0.21.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -846,7 +846,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.29.Final" + "locked": "2.0.30.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -870,7 +870,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.20.1" + "locked": "0.21.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1146,7 +1146,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.29.Final" + "locked": "2.0.30.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -1170,7 +1170,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.20.1" + "locked": "0.21.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1478,7 +1478,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.29.Final" + "locked": "2.0.30.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -1502,7 +1502,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.20.1" + "locked": "0.21.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1811,7 +1811,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.29.Final" + "locked": "2.0.30.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -1835,7 +1835,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.20.1" + "locked": "0.21.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index d2d4a908..df049920 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -212,7 +212,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.29.Final" + "locked": "2.0.30.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -236,7 +236,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.20.1" + "locked": "0.21.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -509,7 +509,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.29.Final" + "locked": "2.0.30.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -533,7 +533,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.20.1" + "locked": "0.21.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -806,7 +806,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.29.Final" + "locked": "2.0.30.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -830,7 +830,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.20.1" + "locked": "0.21.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1103,7 +1103,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.29.Final" + "locked": "2.0.30.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -1127,7 +1127,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.20.1" + "locked": "0.21.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1400,7 +1400,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.29.Final" + "locked": "2.0.30.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -1424,7 +1424,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.20.1" + "locked": "0.21.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1697,7 +1697,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.29.Final" + "locked": "2.0.30.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -1721,7 +1721,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.20.1" + "locked": "0.21.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1994,7 +1994,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.29.Final" + "locked": "2.0.30.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -2018,7 +2018,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.20.1" + "locked": "0.21.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -2291,7 +2291,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.29.Final" + "locked": "2.0.30.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -2315,7 +2315,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.20.1" + "locked": "0.21.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -2588,7 +2588,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.29.Final" + "locked": "2.0.30.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -2612,7 +2612,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.20.1" + "locked": "0.21.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -2885,7 +2885,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.29.Final" + "locked": "2.0.30.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -2909,7 +2909,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.20.1" + "locked": "0.21.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ From 64b2a2b9d6606560c5111085610f163582bf31b4 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 20 Mar 2020 12:57:51 -0700 Subject: [PATCH 021/273] zuul-sample,zuul-core: remove Log4J references, and use Log4J2 in Sample --- zuul-core/build.gradle | 2 - zuul-core/dependencies.lock | 36 --- .../zuul/logging/FilteredPatternLayout.java | 223 ------------------ zuul-processor/dependencies.lock | 36 --- zuul-sample/build.gradle | 3 +- zuul-sample/dependencies.lock | 136 ++++------- .../src/main/resources/log4j.properties | 7 +- 7 files changed, 43 insertions(+), 400 deletions(-) delete mode 100644 zuul-core/src/main/java/com/netflix/zuul/logging/FilteredPatternLayout.java diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index 49dedf87..cd7582b7 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -2,8 +2,6 @@ apply plugin: "groovy" apply plugin: "com.google.osdetector" dependencies { - - compile "log4j:log4j:1.2.17" compile "commons-io:commons-io:2.4" compile "commons-fileupload:commons-fileupload:1.3" compile 'commons-collections:commons-collections:3.2.2' diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index a326ff24..3e5641c8 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -152,10 +152,6 @@ "locked": "4.13", "requested": "latest.release" }, - "log4j:log4j": { - "locked": "1.2.17", - "requested": "1.2.17" - }, "org.apache.commons:commons-lang3": { "locked": "3.4", "requested": "3.4" @@ -338,10 +334,6 @@ "locked": "4.13", "requested": "latest.release" }, - "log4j:log4j": { - "locked": "1.2.17", - "requested": "1.2.17" - }, "org.apache.commons:commons-lang3": { "locked": "3.4", "requested": "3.4" @@ -528,10 +520,6 @@ "locked": "4.13", "requested": "latest.release" }, - "log4j:log4j": { - "locked": "1.2.17", - "requested": "1.2.17" - }, "org.apache.commons:commons-lang3": { "locked": "3.4", "requested": "3.4" @@ -718,10 +706,6 @@ "locked": "4.13", "requested": "latest.release" }, - "log4j:log4j": { - "locked": "1.2.17", - "requested": "1.2.17" - }, "org.apache.commons:commons-lang3": { "locked": "3.4", "requested": "3.4" @@ -908,10 +892,6 @@ "locked": "4.13", "requested": "latest.release" }, - "log4j:log4j": { - "locked": "1.2.17", - "requested": "1.2.17" - }, "org.apache.commons:commons-lang3": { "locked": "3.4", "requested": "3.4" @@ -1098,10 +1078,6 @@ "locked": "4.13", "requested": "latest.release" }, - "log4j:log4j": { - "locked": "1.2.17", - "requested": "1.2.17" - }, "org.apache.commons:commons-lang3": { "locked": "3.4", "requested": "3.4" @@ -1288,10 +1264,6 @@ "locked": "4.13", "requested": "latest.release" }, - "log4j:log4j": { - "locked": "1.2.17", - "requested": "1.2.17" - }, "org.apache.commons:commons-lang3": { "locked": "3.4", "requested": "3.4" @@ -1482,10 +1454,6 @@ "locked": "4.13", "requested": "latest.release" }, - "log4j:log4j": { - "locked": "1.2.17", - "requested": "1.2.17" - }, "org.apache.commons:commons-lang3": { "locked": "3.4", "requested": "3.4" @@ -1680,10 +1648,6 @@ "locked": "4.13", "requested": "latest.release" }, - "log4j:log4j": { - "locked": "1.2.17", - "requested": "1.2.17" - }, "org.apache.commons:commons-lang3": { "locked": "3.4", "requested": "3.4" diff --git a/zuul-core/src/main/java/com/netflix/zuul/logging/FilteredPatternLayout.java b/zuul-core/src/main/java/com/netflix/zuul/logging/FilteredPatternLayout.java deleted file mode 100644 index 9985a8f8..00000000 --- a/zuul-core/src/main/java/com/netflix/zuul/logging/FilteredPatternLayout.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright 2018 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.zuul.logging; - -import org.apache.log4j.PatternLayout; -import org.apache.log4j.spi.LoggingEvent; -import org.apache.log4j.spi.ThrowableInformation; - -import java.util.HashSet; -import java.util.Iterator; -import java.util.Set; - - -/** - * A modified copy of FilteredPatternLayout. - * - * An extension of org.apache.log4j.PatternLayout which strips out from stack traces a list of configured - * entries. Sample configuration: - * - *

- *  <appender name="console" class="org.apache.log4j.ConsoleAppender">
- *      <layout class="it.openutils.log4j.FilteredPatternLayout">
- *          <param name="ConversionPattern" value="%-5p  %c %F(%M:%L) %d{dd.MM.yyyy HH:mm:ss}  %m%n" />
- *          <param name="Filter" value="org.apache.catalina" />
- *          <param name="Filter" value="sun.reflect" />
- *          <param name="Filter" value="javax.servlet.http" />
- *      </layout>
- *  </appender>
- * 
- * - * @author Fabrizio Giustina - * @author Michael Smith - * - */ -public class FilteredPatternLayout extends PatternLayout -{ - - /** - * Holds the list of filtered frames. - */ - private Set filteredFrames = new HashSet(); - - private String header; - - private String footer; - - /** - * Line separator for stacktrace frames. - */ - private static String lineSeparator = "\n"; - - static - { - try - { - lineSeparator = System.getProperty("line.separator"); - } - catch (SecurityException ex) - { - // ignore - } - } - - private static final String FILTERED_LINE_INDICATOR = "\t... filtered lines = "; - - - /** - * Returns the header. - * @return the header - */ - @Override - public String getHeader() - { - return header; - } - - /** - * Sets the header. - * @param header the header to set - */ - public void setHeader(String header) - { - this.header = header; - } - - /** - * Returns the footer. - * @return the footer - */ - @Override - public String getFooter() - { - return footer; - } - - /** - * Sets the footer. - * @param footer the footer to set - */ - public void setFooter(String footer) - { - this.footer = footer; - } - - /** - * @see org.apache.log4j.Layout#ignoresThrowable() - */ - @Override - public boolean ignoresThrowable() - { - return false; - } - - /** - * @see PatternLayout#format(LoggingEvent) - */ - @Override - public String format(LoggingEvent event) - { - String result = super.format(event); - - ThrowableInformation throwableInformation = event.getThrowableInformation(); - - if (throwableInformation != null) - { - result += getFilteredStacktrace(throwableInformation); - } - - return result; - } - - /** - * Adds new filtered frames. Any stack frame starting with "at " + filter will not be - * written to the log. - * @param filters a comma-delimited list of class names or package names to be filtered - */ - public void setFilters(String filters) - { - for (String filter : filters.split(",")) { - filteredFrames.add("at " + filter.trim()); - } - } - - - private String getFilteredStacktrace(ThrowableInformation throwableInformation) - { - StringBuffer buffer = new StringBuffer(); - - String[] s = throwableInformation.getThrowableStrRep(); - - boolean previousLineWasAMatch = false; - int consecutiveFilteredCount = 0; - for (int j = 0; j < s.length; j++) - { - String string = s[j]; - boolean shouldAppend = true; - - if (startsWithAFilteredPAttern(string)) { - shouldAppend = false; - previousLineWasAMatch = true; - consecutiveFilteredCount++; - } - else { - appendFilteredLineIndicator(buffer, previousLineWasAMatch, consecutiveFilteredCount); - consecutiveFilteredCount = 0; - previousLineWasAMatch = false; - } - - if (shouldAppend) { - buffer.append(string); - buffer.append(lineSeparator); - } - } - - // In case consecutive filtered lines run to end of trace. - appendFilteredLineIndicator(buffer, previousLineWasAMatch, consecutiveFilteredCount); - - return buffer.toString(); - } - - private void appendFilteredLineIndicator(StringBuffer buffer, boolean previousLineWasAMatch, int consecutiveFilteredCount) - { - // For the last consecutive filtered line, append some indication that lines have been filtered. - if (previousLineWasAMatch) { - buffer.append(FILTERED_LINE_INDICATOR).append(consecutiveFilteredCount); - buffer.append(lineSeparator); - } - } - - /** - * Check if the given string starts with any of the filtered patterns. - * @param string checked String - * @return true if the begininning of the string matches a filtered pattern, false - * otherwise - */ - private boolean startsWithAFilteredPAttern(String string) - { - Iterator iterator = filteredFrames.iterator(); - while (iterator.hasNext()) - { - if (string.trim().startsWith(iterator.next())) - { - return true; - } - } - return false; - } - -} \ No newline at end of file diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index de67e7ff..3e75a0e6 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -270,12 +270,6 @@ ], "locked": "4.13" }, - "log4j:log4j": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.2.17" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -564,12 +558,6 @@ ], "locked": "4.13" }, - "log4j:log4j": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.2.17" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -884,12 +872,6 @@ ], "locked": "4.13" }, - "log4j:log4j": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.2.17" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1184,12 +1166,6 @@ ], "locked": "4.13" }, - "log4j:log4j": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.2.17" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1517,12 +1493,6 @@ "locked": "4.13", "requested": "4.13-rc-1" }, - "log4j:log4j": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.2.17" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1850,12 +1820,6 @@ "locked": "4.13", "requested": "4.13-rc-1" }, - "log4j:log4j": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.2.17" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" diff --git a/zuul-sample/build.gradle b/zuul-sample/build.gradle index 544dc58e..f1effdd5 100644 --- a/zuul-sample/build.gradle +++ b/zuul-sample/build.gradle @@ -6,7 +6,8 @@ dependencies { annotationProcessor project(":zuul-processor") - compile 'com.netflix.blitz4j:blitz4j:1.37.2' + runtime 'org.apache.logging.log4j:log4j-core:2.13.1' + runtime 'org.apache.logging.log4j:log4j-slf4j-impl:2.13.1' } diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index df049920..c1109428 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -250,12 +250,6 @@ ], "locked": "4.13" }, - "log4j:log4j": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.2.17" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -366,10 +360,6 @@ ], "locked": "0.7.6" }, - "com.netflix.blitz4j:blitz4j": { - "locked": "1.37.2", - "requested": "1.37.2" - }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -547,12 +537,6 @@ ], "locked": "4.13" }, - "log4j:log4j": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.2.17" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -663,10 +647,6 @@ ], "locked": "0.7.5" }, - "com.netflix.blitz4j:blitz4j": { - "locked": "1.37.2", - "requested": "1.37.2" - }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -844,12 +824,6 @@ ], "locked": "4.13" }, - "log4j:log4j": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.2.17" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -960,10 +934,6 @@ ], "locked": "0.7.6" }, - "com.netflix.blitz4j:blitz4j": { - "locked": "1.37.2", - "requested": "1.37.2" - }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1141,18 +1111,20 @@ ], "locked": "4.13" }, - "log4j:log4j": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.2.17" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "3.4" }, + "org.apache.logging.log4j:log4j-core": { + "locked": "2.13.1", + "requested": "2.13.1" + }, + "org.apache.logging.log4j:log4j-slf4j-impl": { + "locked": "2.13.1", + "requested": "2.13.1" + }, "org.bouncycastle:bcpg-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1257,10 +1229,6 @@ ], "locked": "0.7.6" }, - "com.netflix.blitz4j:blitz4j": { - "locked": "1.37.2", - "requested": "1.37.2" - }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1438,18 +1406,20 @@ ], "locked": "4.13" }, - "log4j:log4j": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.2.17" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "3.4" }, + "org.apache.logging.log4j:log4j-core": { + "locked": "2.13.1", + "requested": "2.13.1" + }, + "org.apache.logging.log4j:log4j-slf4j-impl": { + "locked": "2.13.1", + "requested": "2.13.1" + }, "org.bouncycastle:bcpg-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1554,10 +1524,6 @@ ], "locked": "0.7.6" }, - "com.netflix.blitz4j:blitz4j": { - "locked": "1.37.2", - "requested": "1.37.2" - }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1735,18 +1701,20 @@ ], "locked": "4.13" }, - "log4j:log4j": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.2.17" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "3.4" }, + "org.apache.logging.log4j:log4j-core": { + "locked": "2.13.1", + "requested": "2.13.1" + }, + "org.apache.logging.log4j:log4j-slf4j-impl": { + "locked": "2.13.1", + "requested": "2.13.1" + }, "org.bouncycastle:bcpg-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1851,10 +1819,6 @@ ], "locked": "0.7.6" }, - "com.netflix.blitz4j:blitz4j": { - "locked": "1.37.2", - "requested": "1.37.2" - }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2032,12 +1996,6 @@ ], "locked": "4.13" }, - "log4j:log4j": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.2.17" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2148,10 +2106,6 @@ ], "locked": "0.7.5" }, - "com.netflix.blitz4j:blitz4j": { - "locked": "1.37.2", - "requested": "1.37.2" - }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2329,12 +2283,6 @@ ], "locked": "4.13" }, - "log4j:log4j": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.2.17" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2445,10 +2393,6 @@ ], "locked": "0.7.6" }, - "com.netflix.blitz4j:blitz4j": { - "locked": "1.37.2", - "requested": "1.37.2" - }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2626,18 +2570,20 @@ ], "locked": "4.13" }, - "log4j:log4j": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.2.17" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "3.4" }, + "org.apache.logging.log4j:log4j-core": { + "locked": "2.13.1", + "requested": "2.13.1" + }, + "org.apache.logging.log4j:log4j-slf4j-impl": { + "locked": "2.13.1", + "requested": "2.13.1" + }, "org.bouncycastle:bcpg-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2742,10 +2688,6 @@ ], "locked": "0.7.6" }, - "com.netflix.blitz4j:blitz4j": { - "locked": "1.37.2", - "requested": "1.37.2" - }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2923,18 +2865,20 @@ ], "locked": "4.13" }, - "log4j:log4j": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.2.17" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "3.4" }, + "org.apache.logging.log4j:log4j-core": { + "locked": "2.13.1", + "requested": "2.13.1" + }, + "org.apache.logging.log4j:log4j-slf4j-impl": { + "locked": "2.13.1", + "requested": "2.13.1" + }, "org.bouncycastle:bcpg-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" diff --git a/zuul-sample/src/main/resources/log4j.properties b/zuul-sample/src/main/resources/log4j.properties index af17cd19..e24cf1af 100644 --- a/zuul-sample/src/main/resources/log4j.properties +++ b/zuul-sample/src/main/resources/log4j.properties @@ -30,10 +30,5 @@ log4j.logger.com.netflix.config=WARN log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout.ConversionPattern=%d %-5p %c [%t] %m%n -# filter out repeating lines for Rx -log4j.appender.stdout.layout=com.netflix.zuul.logging.FilteredPatternLayout -log4j.appender.stdout.layout.Filters=rx.Observable,rx.internal,rx.Subscriber - # async appender -batcher.com.netflix.logging.AsyncAppender.stdout.waitTimeinMillis=120000 -log4j.logger.asyncAppenders=INFO,stdout +log4j.logger.asyncAppenders=INFO From f13fa3db0ee7322a9c22ec84a93da95fb9f47c70 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 23 Mar 2020 10:38:40 -0700 Subject: [PATCH 022/273] zuul-core: refactor Filter loading into mutable and immutable parts This step is needed to support the construction of static filter registries. While dynamic loading will still be supported, Zuul will be moving towards a fixed filter set model. This lowers load on live running servers, avoids a dependency on doing disk reads. Wide deploying code to live running servers is a risky endeavor, and Zuul did not develop the necessary safeguards to support this. After this change, FilterFileManager will be optional, as its sole purpose is to populate the loader/registry. --- .../java/com/netflix/zuul/FilterLoader.java | 65 ++++++++++++------- .../netflix/zuul/filters/FilterRegistry.java | 62 +++++++++--------- .../zuul/filters/MutableFilterRegistry.java | 62 ++++++++++++++++++ .../com/netflix/zuul/FilterLoaderTest.java | 36 +++++----- 4 files changed, 155 insertions(+), 70 deletions(-) create mode 100644 zuul-core/src/main/java/com/netflix/zuul/filters/MutableFilterRegistry.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java b/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java index 1db1dcfd..dddeb28b 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java +++ b/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java @@ -17,6 +17,7 @@ import com.netflix.zuul.filters.FilterRegistry; import com.netflix.zuul.filters.FilterType; +import com.netflix.zuul.filters.MutableFilterRegistry; import com.netflix.zuul.filters.ZuulFilter; import com.netflix.zuul.groovy.GroovyCompiler; import java.io.File; @@ -26,6 +27,7 @@ import java.util.Comparator; import java.util.List; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; import javax.inject.Inject; import javax.inject.Singleton; import org.slf4j.Logger; @@ -44,11 +46,11 @@ public class FilterLoader { private static final Logger LOG = LoggerFactory.getLogger(FilterLoader.class); - private final ConcurrentHashMap filterClassLastModified = new ConcurrentHashMap<>(); - private final ConcurrentHashMap filterClassCode = new ConcurrentHashMap<>(); - private final ConcurrentHashMap filterCheck = new ConcurrentHashMap<>(); - private final ConcurrentHashMap>> hashFiltersByType = new ConcurrentHashMap<>(); - private final ConcurrentHashMap> filtersByNameAndType = new ConcurrentHashMap<>(); + private final ConcurrentMap filterClassLastModified = new ConcurrentHashMap<>(); + private final ConcurrentMap filterClassCode = new ConcurrentHashMap<>(); + private final ConcurrentMap filterCheck = new ConcurrentHashMap<>(); + private final ConcurrentMap>> hashFiltersByType = new ConcurrentHashMap<>(); + private final ConcurrentMap> filtersByNameAndType = new ConcurrentHashMap<>(); private final FilterRegistry filterRegistry; @@ -57,41 +59,49 @@ public class FilterLoader private final FilterFactory filterFactory; public FilterLoader() { - this(new FilterRegistry(), new GroovyCompiler(), new DefaultFilterFactory()); + this(new MutableFilterRegistry(), new GroovyCompiler(), new DefaultFilterFactory()); } @Inject - public FilterLoader(FilterRegistry filterRegistry, DynamicCodeCompiler compiler, FilterFactory filterFactory) { + public FilterLoader( + FilterRegistry filterRegistry, + DynamicCodeCompiler compiler, + FilterFactory filterFactory) { this.filterRegistry = filterRegistry; this.compiler = compiler; this.filterFactory = filterFactory; } /** - * Given source and name will compile and store the filter if it detects that the filter code has changed or - * the filter doesn't exist. Otherwise it will return an instance of the requested ZuulFilter + * Given source and name will compile and store the filter if it detects that the filter code + * has changed or the filter doesn't exist. Otherwise it will return an instance of the + * requested ZuulFilter. * - * @param sCode source code - * @param sName name of the filter - * @return the IZuulFilter + * @deprecated it is unclear to me why this method is needed. Nothing seems to use it, and the + * swapping of code seems to happen elsewhere. This will be removed in a later + * Zuul release. */ - public ZuulFilter getFilter(String sCode, String sName) throws Exception { - if (filterCheck.get(sName) == null) { - filterCheck.putIfAbsent(sName, sName); - if (!sCode.equals(filterClassCode.get(sName))) { - LOG.info("reloading code " + sName); - filterRegistry.remove(sName); + @Deprecated + public ZuulFilter getFilter(String sourceCode, String filterName) throws Exception { + if (filterCheck.get(filterName) == null) { + filterCheck.putIfAbsent(filterName, filterName); + if (!sourceCode.equals(filterClassCode.get(filterName))) { + if (filterRegistry.isMutable()) { + LOG.info("reloading code {}", filterName); + filterRegistry.remove(filterName); + } else { + LOG.warn("Filter registry is not mutable, discarding {}", filterName); + } } } - ZuulFilter filter = filterRegistry.get(sName); + ZuulFilter filter = filterRegistry.get(filterName); if (filter == null) { - Class clazz = compiler.compile(sCode, sName); + Class clazz = compiler.compile(sourceCode, filterName); if (!Modifier.isAbstract(clazz.getModifiers())) { filter = filterFactory.newInstance(clazz); } } return filter; - } /** @@ -109,6 +119,9 @@ public int filterInstanceMapSize() { * @return true if the filter in file successfully read, compiled, verified and added to Zuul */ public boolean putFilter(File file) { + if (!filterRegistry.isMutable()) { + return false; + } try { String sName = file.getAbsolutePath(); if (filterClassLastModified.get(sName) != null @@ -133,7 +146,11 @@ public boolean putFilter(File file) { return false; } - private void putFilter(String sName, ZuulFilter filter, long lastModified) { + private void putFilter(String filterName, ZuulFilter filter, long lastModified) { + if (!filterRegistry.isMutable()) { + LOG.warn("Filter registry is not mutable, discarding {}", filterName); + return; + } List> list = hashFiltersByType.get(filter.filterType()); if (list != null) { hashFiltersByType.remove(filter.filterType()); //rebuild this list @@ -142,8 +159,8 @@ private void putFilter(String sName, ZuulFilter filter, long lastModified) String nameAndType = filter.filterType() + ":" + filter.filterName(); filtersByNameAndType.put(nameAndType, filter); - filterRegistry.put(sName, filter); - filterClassLastModified.put(sName, lastModified); + filterRegistry.put(filterName, filter); + filterClassLastModified.put(filterName, lastModified); } /** diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/FilterRegistry.java b/zuul-core/src/main/java/com/netflix/zuul/filters/FilterRegistry.java index adfa1fa5..42e70667 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/FilterRegistry.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/FilterRegistry.java @@ -15,35 +15,37 @@ */ package com.netflix.zuul.filters; - -import javax.inject.Singleton; import java.util.Collection; -import java.util.concurrent.ConcurrentHashMap; - -/** - * @author mhawthorne - */ -@Singleton -public class FilterRegistry { - private final ConcurrentHashMap> filters = new ConcurrentHashMap<>(); - - public ZuulFilter remove(String key) { - return filters.remove(key); - } - - public ZuulFilter get(String key) { - return filters.get(key); - } - - public void put(String key, ZuulFilter filter) { - filters.putIfAbsent(key, filter); - } - - public int size() { - return filters.size(); - } - - public Collection> getAllFilters() { - return filters.values(); - } +import javax.annotation.Nullable; + +public interface FilterRegistry { + @Nullable + ZuulFilter get(String key); + + int size(); + + Collection> getAllFilters(); + + /** + * Indicates if this registry can be modified. Implementations should not change the return; + * they return the same value each time. + */ + boolean isMutable(); + + /** + * Removes the filter from the registry, and returns it. Returns {@code null} no such filter + * was found. Callers should check {@link #isMutable()} before calling this method. + * + * @throws IllegalStateException if this registry is not mutable. + */ + @Nullable + ZuulFilter remove(String key); + + /** + * Stores the filter into the registry. If an existing filter was present with the same key, + * it is removed. Callers should check {@link #isMutable()} before calling this method. + * + * @throws IllegalStateException if this registry is not mutable. + */ + void put(String key, ZuulFilter filter); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/MutableFilterRegistry.java b/zuul-core/src/main/java/com/netflix/zuul/filters/MutableFilterRegistry.java new file mode 100644 index 00000000..122745a6 --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/MutableFilterRegistry.java @@ -0,0 +1,62 @@ +/* + * Copyright 2018 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.netflix.zuul.filters; + +import static java.util.Objects.requireNonNull; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.concurrent.ConcurrentHashMap; +import javax.annotation.Nullable; +import javax.inject.Singleton; + +@Singleton +public final class MutableFilterRegistry implements FilterRegistry { + private final ConcurrentHashMap> filters = new ConcurrentHashMap<>(); + + @Nullable + @Override + public ZuulFilter remove(String key) { + return filters.remove(requireNonNull(key, "key")); + } + + @Override + @Nullable + public ZuulFilter get(String key) { + return filters.get(requireNonNull(key, "key")); + } + + @Override + public void put(String key, ZuulFilter filter) { + filters.putIfAbsent(requireNonNull(key, "key"), requireNonNull(filter, "filter")); + } + + @Override + public int size() { + return filters.size(); + } + + @Override + public Collection> getAllFilters() { + return Collections.unmodifiableList(new ArrayList<>(filters.values())); + } + + @Override + public boolean isMutable() { + return true; + } +} diff --git a/zuul-core/src/test/java/com/netflix/zuul/FilterLoaderTest.java b/zuul-core/src/test/java/com/netflix/zuul/FilterLoaderTest.java index e489df38..f9c00cf0 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/FilterLoaderTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/FilterLoaderTest.java @@ -15,6 +15,7 @@ */ package com.netflix.zuul; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.mockito.Matchers.any; @@ -28,10 +29,12 @@ import com.netflix.zuul.filters.BaseSyncFilter; import com.netflix.zuul.filters.FilterRegistry; import com.netflix.zuul.filters.FilterType; +import com.netflix.zuul.filters.MutableFilterRegistry; import com.netflix.zuul.filters.ZuulFilter; import com.netflix.zuul.message.ZuulMessage; import java.io.File; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import org.junit.Before; import org.junit.Test; @@ -44,19 +47,18 @@ public class FilterLoaderTest { @Mock - File file; + private File file; @Mock - DynamicCodeCompiler compiler; + private DynamicCodeCompiler compiler; - @Mock - FilterRegistry registry; + private final FilterRegistry registry = new MutableFilterRegistry(); - FilterFactory filterFactory = new DefaultFilterFactory(); + private final FilterFactory filterFactory = new DefaultFilterFactory(); - FilterLoader loader; + private FilterLoader loader; - TestZuulFilter filter = new TestZuulFilter(); + private final TestZuulFilter filter = new TestZuulFilter(); @Before public void before() throws Exception @@ -72,13 +74,17 @@ public void before() throws Exception @Test public void testGetFilterFromFile() throws Exception { assertTrue(loader.putFilter(file)); - verify(registry).put(any(String.class), any(BaseFilter.class)); + + Collection> filters = registry.getAllFilters(); + assertEquals(1, filters.size()); } @Test public void testPutFiltersForClasses() throws Exception { loader.putFiltersForClasses(new String[]{TestZuulFilter.class.getName()}); - verify(registry).put(any(String.class), any(BaseFilter.class)); + + Collection> filters = registry.getAllFilters(); + assertEquals(1, filters.size()); } @Test @@ -91,23 +97,21 @@ public void testPutFiltersForClassesException() throws Exception { caught = e; } assertTrue(caught != null); - verify(registry, times(0)).put(any(String.class), any(BaseFilter.class)); + Collection> filters = registry.getAllFilters(); + assertEquals(0, filters.size()); } @Test public void testGetFiltersByType() throws Exception { assertTrue(loader.putFilter(file)); - verify(registry).put(any(String.class), any(ZuulFilter.class)); - - final List> filters = new ArrayList<>(); - filters.add(filter); - when(registry.getAllFilters()).thenReturn(filters); + Collection> filters = registry.getAllFilters(); + assertEquals(1, filters.size()); List> list = loader.getFiltersByType(FilterType.INBOUND); assertTrue(list != null); assertTrue(list.size() == 1); - ZuulFilter filter = list.get(0); + ZuulFilter filter = list.get(0); assertTrue(filter != null); assertTrue(filter.filterType().equals(FilterType.INBOUND)); } From 7092dabebe4fed59e41aa3750ff6513be0ded76d Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 23 Mar 2020 17:50:23 -0700 Subject: [PATCH 023/273] zuul-core: split FilterLoader into mutable / immutable classes --- .../com/netflix/zuul/DynamicFilterLoader.java | 224 ++++++++++++++++++ .../java/com/netflix/zuul/FilterLoader.java | 185 +-------------- .../com/netflix/zuul/StaticFilterLoader.java | 100 ++++++++ ...Test.java => DynamicFilterLoaderTest.java} | 12 +- .../netflix/zuul/StaticFilterLoaderTest.java | 107 +++++++++ 5 files changed, 443 insertions(+), 185 deletions(-) create mode 100644 zuul-core/src/main/java/com/netflix/zuul/DynamicFilterLoader.java create mode 100644 zuul-core/src/main/java/com/netflix/zuul/StaticFilterLoader.java rename zuul-core/src/test/java/com/netflix/zuul/{FilterLoaderTest.java => DynamicFilterLoaderTest.java} (92%) create mode 100644 zuul-core/src/test/java/com/netflix/zuul/StaticFilterLoaderTest.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/DynamicFilterLoader.java b/zuul-core/src/main/java/com/netflix/zuul/DynamicFilterLoader.java new file mode 100644 index 00000000..fa0c3f26 --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/zuul/DynamicFilterLoader.java @@ -0,0 +1,224 @@ +/* + * Copyright 2018 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul; + +import com.netflix.zuul.filters.FilterRegistry; +import com.netflix.zuul.filters.FilterType; +import com.netflix.zuul.filters.MutableFilterRegistry; +import com.netflix.zuul.filters.ZuulFilter; +import com.netflix.zuul.groovy.GroovyCompiler; +import java.io.File; +import java.lang.reflect.Modifier; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import javax.inject.Inject; +import javax.inject.Singleton; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@Singleton +public final class DynamicFilterLoader implements FilterLoader { + private static final Logger LOG = LoggerFactory.getLogger(FilterLoader.class); + + private final ConcurrentMap filterClassLastModified = new ConcurrentHashMap<>(); + private final ConcurrentMap filterClassCode = new ConcurrentHashMap<>(); + private final ConcurrentMap filterCheck = new ConcurrentHashMap<>(); + private final ConcurrentMap>> hashFiltersByType = new ConcurrentHashMap<>(); + private final ConcurrentMap> filtersByNameAndType = new ConcurrentHashMap<>(); + + private final FilterRegistry filterRegistry; + + private final DynamicCodeCompiler compiler; + + private final FilterFactory filterFactory; + + /** + * TODO(carl-mastrangelo): remove this ctor as it creates an unwanted dependency on Groovy. + */ + @Deprecated + public DynamicFilterLoader() { + this(new MutableFilterRegistry(), new GroovyCompiler(), new DefaultFilterFactory()); + } + + @Inject + public DynamicFilterLoader( + FilterRegistry filterRegistry, + DynamicCodeCompiler compiler, + FilterFactory filterFactory) { + this.filterRegistry = filterRegistry; + this.compiler = compiler; + this.filterFactory = filterFactory; + } + + /** + * Given source and name will compile and store the filter if it detects that the filter code + * has changed or the filter doesn't exist. Otherwise it will return an instance of the + * requested ZuulFilter. + * + * @deprecated it is unclear to me why this method is needed. Nothing seems to use it, and the + * swapping of code seems to happen elsewhere. This will be removed in a later + * Zuul release. + */ + @Deprecated + public ZuulFilter getFilter(String sourceCode, String filterName) throws Exception { + if (filterCheck.get(filterName) == null) { + filterCheck.putIfAbsent(filterName, filterName); + if (!sourceCode.equals(filterClassCode.get(filterName))) { + if (filterRegistry.isMutable()) { + LOG.info("reloading code {}", filterName); + filterRegistry.remove(filterName); + } else { + LOG.warn("Filter registry is not mutable, discarding {}", filterName); + } + } + } + ZuulFilter filter = filterRegistry.get(filterName); + if (filter == null) { + Class clazz = compiler.compile(sourceCode, filterName); + if (!Modifier.isAbstract(clazz.getModifiers())) { + filter = filterFactory.newInstance(clazz); + } + } + return filter; + } + + /** + * @return the total number of Zuul filters + */ + public int filterInstanceMapSize() { + return filterRegistry.size(); + } + + /** + * From a file this will read the ZuulFilter source code, compile it, and add it to the list of current filters + * a true response means that it was successful. + * + * @param file the file to load + * @return true if the filter in file successfully read, compiled, verified and added to Zuul + */ + @Override + public boolean putFilter(File file) { + if (!filterRegistry.isMutable()) { + return false; + } + try { + String sName = file.getAbsolutePath(); + if (filterClassLastModified.get(sName) != null + && (file.lastModified() != filterClassLastModified.get(sName))) { + LOG.debug("reloading filter " + sName); + filterRegistry.remove(sName); + } + ZuulFilter filter = filterRegistry.get(sName); + if (filter == null) { + Class clazz = compiler.compile(file); + if (!Modifier.isAbstract(clazz.getModifiers())) { + filter = filterFactory.newInstance(clazz); + putFilter(sName, filter, file.lastModified()); + return true; + } + } + } catch (Exception e) { + LOG.error("Error loading filter! Continuing. file=" + file, e); + return false; + } + + return false; + } + + private void putFilter(String filterName, ZuulFilter filter, long lastModified) { + if (!filterRegistry.isMutable()) { + LOG.warn("Filter registry is not mutable, discarding {}", filterName); + return; + } + List> list = hashFiltersByType.get(filter.filterType()); + if (list != null) { + hashFiltersByType.remove(filter.filterType()); //rebuild this list + } + + String nameAndType = filter.filterType() + ":" + filter.filterName(); + filtersByNameAndType.put(nameAndType, filter); + + filterRegistry.put(filterName, filter); + filterClassLastModified.put(filterName, lastModified); + } + + /** + * Load and cache filters by className + * + * @param classNames The class names to load + * @return List of the loaded filters + * @throws Exception If any specified filter fails to load, this will abort. This is a safety mechanism so we can + * prevent running in a partially loaded state. + */ + @Override + public List> putFiltersForClasses(String[] classNames) throws Exception { + List> newFilters = new ArrayList<>(); + for (String className : classNames) { + newFilters.add(putFilterForClassName(className)); + } + return Collections.unmodifiableList(newFilters); + } + + @Override + public ZuulFilter putFilterForClassName(String className) throws Exception { + Class clazz = Class.forName(className); + if (!ZuulFilter.class.isAssignableFrom(clazz)) { + throw new IllegalArgumentException("Specified filter class does not implement ZuulFilter interface!"); + } else { + ZuulFilter filter = filterFactory.newInstance(clazz); + putFilter(className, filter, System.currentTimeMillis()); + return filter; + } + } + + /** + * Returns a list of filters by the filterType specified + */ + @Override + public List> getFiltersByType(FilterType filterType) { + List> list = hashFiltersByType.get(filterType); + if (list != null) return list; + + list = new ArrayList<>(); + + for (ZuulFilter filter : filterRegistry.getAllFilters()) { + if (filter.filterType().equals(filterType)) { + list.add(filter); + } + } + + // Sort by filterOrder. + list.sort(Comparator.comparingInt(ZuulFilter::filterOrder)); + + hashFiltersByType.putIfAbsent(filterType, list); + return Collections.unmodifiableList(list); + } + + @Override + public ZuulFilter getFilterByNameAndType(String name, FilterType type) { + if (name == null || type == null) { + return null; + } + + String nameAndType = type + ":" + name; + return filtersByNameAndType.get(nameAndType); + } +} diff --git a/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java b/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java index dddeb28b..98195afc 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java +++ b/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java @@ -15,102 +15,16 @@ */ package com.netflix.zuul; -import com.netflix.zuul.filters.FilterRegistry; import com.netflix.zuul.filters.FilterType; -import com.netflix.zuul.filters.MutableFilterRegistry; import com.netflix.zuul.filters.ZuulFilter; -import com.netflix.zuul.groovy.GroovyCompiler; import java.io.File; -import java.lang.reflect.Modifier; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; import java.util.List; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; -import javax.inject.Inject; -import javax.inject.Singleton; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * This class is one of the core classes in Zuul. It compiles, loads from a File, and checks if source code changed. * It also holds ZuulFilters by filterType. - * - * @author Mikey Cohen - * Date: 11/3/11 - * Time: 1:59 PM */ -@Singleton -public class FilterLoader -{ - private static final Logger LOG = LoggerFactory.getLogger(FilterLoader.class); - - private final ConcurrentMap filterClassLastModified = new ConcurrentHashMap<>(); - private final ConcurrentMap filterClassCode = new ConcurrentHashMap<>(); - private final ConcurrentMap filterCheck = new ConcurrentHashMap<>(); - private final ConcurrentMap>> hashFiltersByType = new ConcurrentHashMap<>(); - private final ConcurrentMap> filtersByNameAndType = new ConcurrentHashMap<>(); - - private final FilterRegistry filterRegistry; - - private final DynamicCodeCompiler compiler; - - private final FilterFactory filterFactory; - - public FilterLoader() { - this(new MutableFilterRegistry(), new GroovyCompiler(), new DefaultFilterFactory()); - } - - @Inject - public FilterLoader( - FilterRegistry filterRegistry, - DynamicCodeCompiler compiler, - FilterFactory filterFactory) { - this.filterRegistry = filterRegistry; - this.compiler = compiler; - this.filterFactory = filterFactory; - } - - /** - * Given source and name will compile and store the filter if it detects that the filter code - * has changed or the filter doesn't exist. Otherwise it will return an instance of the - * requested ZuulFilter. - * - * @deprecated it is unclear to me why this method is needed. Nothing seems to use it, and the - * swapping of code seems to happen elsewhere. This will be removed in a later - * Zuul release. - */ - @Deprecated - public ZuulFilter getFilter(String sourceCode, String filterName) throws Exception { - if (filterCheck.get(filterName) == null) { - filterCheck.putIfAbsent(filterName, filterName); - if (!sourceCode.equals(filterClassCode.get(filterName))) { - if (filterRegistry.isMutable()) { - LOG.info("reloading code {}", filterName); - filterRegistry.remove(filterName); - } else { - LOG.warn("Filter registry is not mutable, discarding {}", filterName); - } - } - } - ZuulFilter filter = filterRegistry.get(filterName); - if (filter == null) { - Class clazz = compiler.compile(sourceCode, filterName); - if (!Modifier.isAbstract(clazz.getModifiers())) { - filter = filterFactory.newInstance(clazz); - } - } - return filter; - } - - /** - * @return the total number of Zuul filters - */ - public int filterInstanceMapSize() { - return filterRegistry.size(); - } - +public interface FilterLoader { /** * From a file this will read the ZuulFilter source code, compile it, and add it to the list of current filters * a true response means that it was successful. @@ -118,106 +32,25 @@ public int filterInstanceMapSize() { * @param file the file to load * @return true if the filter in file successfully read, compiled, verified and added to Zuul */ - public boolean putFilter(File file) { - if (!filterRegistry.isMutable()) { - return false; - } - try { - String sName = file.getAbsolutePath(); - if (filterClassLastModified.get(sName) != null - && (file.lastModified() != filterClassLastModified.get(sName))) { - LOG.debug("reloading filter " + sName); - filterRegistry.remove(sName); - } - ZuulFilter filter = filterRegistry.get(sName); - if (filter == null) { - Class clazz = compiler.compile(file); - if (!Modifier.isAbstract(clazz.getModifiers())) { - filter = filterFactory.newInstance(clazz); - putFilter(sName, filter, file.lastModified()); - return true; - } - } - } catch (Exception e) { - LOG.error("Error loading filter! Continuing. file=" + file, e); - return false; - } - - return false; - } - - private void putFilter(String filterName, ZuulFilter filter, long lastModified) { - if (!filterRegistry.isMutable()) { - LOG.warn("Filter registry is not mutable, discarding {}", filterName); - return; - } - List> list = hashFiltersByType.get(filter.filterType()); - if (list != null) { - hashFiltersByType.remove(filter.filterType()); //rebuild this list - } - - String nameAndType = filter.filterType() + ":" + filter.filterName(); - filtersByNameAndType.put(nameAndType, filter); - - filterRegistry.put(filterName, filter); - filterClassLastModified.put(filterName, lastModified); - } + boolean putFilter(File file); /** - * Load and cache filters by className + * Load and cache filters by className. * * @param classNames The class names to load * @return List of the loaded filters * @throws Exception If any specified filter fails to load, this will abort. This is a safety mechanism so we can * prevent running in a partially loaded state. */ - public List> putFiltersForClasses(String[] classNames) throws Exception { - List> newFilters = new ArrayList<>(); - for (String className : classNames) { - newFilters.add(putFilterForClassName(className)); - } - return Collections.unmodifiableList(newFilters); - } + List> putFiltersForClasses(String[] classNames) throws Exception; - public ZuulFilter putFilterForClassName(String className) throws Exception { - Class clazz = Class.forName(className); - if (!ZuulFilter.class.isAssignableFrom(clazz)) { - throw new IllegalArgumentException("Specified filter class does not implement ZuulFilter interface!"); - } else { - ZuulFilter filter = filterFactory.newInstance(clazz); - putFilter(className, filter, System.currentTimeMillis()); - return filter; - } - } + + ZuulFilter putFilterForClassName(String className) throws Exception; /** - * Returns a list of filters by the filterType specified + * Returns a list of filters by the filterType specified. */ - public List> getFiltersByType(FilterType filterType) { - List> list = hashFiltersByType.get(filterType); - if (list != null) return list; - - list = new ArrayList<>(); - - for (ZuulFilter filter : filterRegistry.getAllFilters()) { - if (filter.filterType().equals(filterType)) { - list.add(filter); - } - } - - // Sort by filterOrder. - list.sort(Comparator.comparingInt(ZuulFilter::filterOrder)); - - hashFiltersByType.putIfAbsent(filterType, list); - return Collections.unmodifiableList(list); - } - - public ZuulFilter getFilterByNameAndType(String name, FilterType type) - { - if (name == null || type == null) - return null; + List> getFiltersByType(FilterType filterType); - String nameAndType = type.toString() + ":" + name; - return filtersByNameAndType.get(nameAndType); - } + ZuulFilter getFilterByNameAndType(String name, FilterType type); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/StaticFilterLoader.java b/zuul-core/src/main/java/com/netflix/zuul/StaticFilterLoader.java new file mode 100644 index 00000000..17d8653d --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/zuul/StaticFilterLoader.java @@ -0,0 +1,100 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul; + +import com.netflix.zuul.filters.FilterType; +import com.netflix.zuul.filters.ZuulFilter; +import java.io.File; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.EnumMap; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import javax.annotation.Nullable; +import javax.inject.Inject; + +/** + * An immutable static collection of filters. + */ +public final class StaticFilterLoader implements FilterLoader { + + private final Map>> filtersByType; + private final Map>> filtersByTypeAndName; + + @Inject + public StaticFilterLoader( + FilterFactory filterFactory, List>> filterTypes) { + Map>> filtersByType = new EnumMap<>(FilterType.class); + Map>> filtersByName = new EnumMap<>(FilterType.class); + for (Class> clz : filterTypes) { + try { + ZuulFilter f = filterFactory.newInstance(clz); + filtersByType.computeIfAbsent(f.filterType(), k -> new ArrayList<>()).add(f); + filtersByName.computeIfAbsent(f.filterType(), k -> new HashMap<>()).put(f.filterName(), f); + } catch (RuntimeException | Error e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + } + Map>> sortedFilters = new EnumMap<>(FilterType.class); + for (Entry>> entry : filtersByType.entrySet()) { + entry.getValue().sort(Comparator.comparingInt(ZuulFilter::filterOrder)); + entry.getValue().trimToSize(); + sortedFilters.put(entry.getKey(), Collections.unmodifiableList(entry.getValue())); + } + Map>> immutableFiltersByName = new EnumMap<>(FilterType.class); + for (Entry>> entry : filtersByName.entrySet()) { + immutableFiltersByName.put(entry.getKey(), Collections.unmodifiableMap(entry.getValue())); + } + this.filtersByTypeAndName = Collections.unmodifiableMap(immutableFiltersByName); + this.filtersByType = Collections.unmodifiableMap(sortedFilters); + } + + @Override + public boolean putFilter(File file) { + throw new UnsupportedOperationException(); + } + + @Override + public List> putFiltersForClasses(String[] classNames) { + throw new UnsupportedOperationException(); + } + + @Override + public ZuulFilter putFilterForClassName(String className) { + throw new UnsupportedOperationException(); + } + + @Override + public List> getFiltersByType(FilterType filterType) { + return filtersByType.get(filterType); + } + + @Override + @Nullable + public ZuulFilter getFilterByNameAndType(String name, FilterType type) { + Map> filtersByName = filtersByTypeAndName.get(type); + if (filtersByName == null) { + return null; + } + return filtersByName.get(name); + } +} diff --git a/zuul-core/src/test/java/com/netflix/zuul/FilterLoaderTest.java b/zuul-core/src/test/java/com/netflix/zuul/DynamicFilterLoaderTest.java similarity index 92% rename from zuul-core/src/test/java/com/netflix/zuul/FilterLoaderTest.java rename to zuul-core/src/test/java/com/netflix/zuul/DynamicFilterLoaderTest.java index f9c00cf0..03feb98b 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/FilterLoaderTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/DynamicFilterLoaderTest.java @@ -18,14 +18,9 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.mockito.Matchers.any; import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import com.netflix.zuul.filters.BaseFilter; import com.netflix.zuul.filters.BaseSyncFilter; import com.netflix.zuul.filters.FilterRegistry; import com.netflix.zuul.filters.FilterType; @@ -33,7 +28,6 @@ import com.netflix.zuul.filters.ZuulFilter; import com.netflix.zuul.message.ZuulMessage; import java.io.File; -import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.junit.Before; @@ -44,7 +38,7 @@ import org.mockito.MockitoAnnotations; @RunWith(JUnit4.class) -public class FilterLoaderTest { +public class DynamicFilterLoaderTest { @Mock private File file; @@ -56,7 +50,7 @@ public class FilterLoaderTest { private final FilterFactory filterFactory = new DefaultFilterFactory(); - private FilterLoader loader; + private DynamicFilterLoader loader; private final TestZuulFilter filter = new TestZuulFilter(); @@ -65,7 +59,7 @@ public void before() throws Exception { MockitoAnnotations.initMocks(this); - loader = spy(new FilterLoader(registry, compiler, filterFactory)); + loader = new DynamicFilterLoader(registry, compiler, filterFactory); doReturn(TestZuulFilter.class).when(compiler).compile(file); when(file.getAbsolutePath()).thenReturn("/filters/in/SomeFilter.groovy"); diff --git a/zuul-core/src/test/java/com/netflix/zuul/StaticFilterLoaderTest.java b/zuul-core/src/test/java/com/netflix/zuul/StaticFilterLoaderTest.java new file mode 100644 index 00000000..267c4ac9 --- /dev/null +++ b/zuul-core/src/test/java/com/netflix/zuul/StaticFilterLoaderTest.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul; + +import static org.junit.Assert.assertEquals; + +import com.netflix.zuul.filters.FilterType; +import com.netflix.zuul.filters.ZuulFilter; +import com.netflix.zuul.filters.http.HttpInboundSyncFilter; +import com.netflix.zuul.message.http.HttpRequestMessage; +import java.util.Arrays; +import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class StaticFilterLoaderTest { + + + private static final FilterFactory factory = new DefaultFilterFactory(); + + @Test + public void getFiltersByType() { + + StaticFilterLoader filterLoader = + new StaticFilterLoader(factory, Arrays.asList(DummyFilter2.class, DummyFilter1.class)); + + List> filters = filterLoader.getFiltersByType(FilterType.INBOUND); + assertEquals(2, filters.size()); + // Filters are sorted by order + assertEquals(DummyFilter1.class, filters.get(0).getClass()); + assertEquals(DummyFilter2.class, filters.get(1).getClass()); + } + + @Test + public void getFilterByNameAndType() { + StaticFilterLoader filterLoader = + new StaticFilterLoader(factory, Arrays.asList(DummyFilter2.class, DummyFilter1.class)); + + ZuulFilter filter = filterLoader.getFilterByNameAndType("Robin", FilterType.INBOUND); + + assertEquals(DummyFilter2.class, filter.getClass()); + } + + @Filter(order = 0, type = FilterType.INBOUND) + static class DummyFilter1 extends HttpInboundSyncFilter { + + @Override + public String filterName() { + return "Batman"; + } + + @Override + public int filterOrder() { + return 0; + } + + @Override + public boolean shouldFilter(HttpRequestMessage msg) { + return true; + } + + @Override + public HttpRequestMessage apply(HttpRequestMessage input) { + return input; + } + } + + @Filter(order = 1, type = FilterType.INBOUND) + static class DummyFilter2 extends HttpInboundSyncFilter { + + @Override + public String filterName() { + return "Robin"; + } + + @Override + public int filterOrder() { + return 1; + } + + @Override + public boolean shouldFilter(HttpRequestMessage msg) { + return true; + } + + @Override + public HttpRequestMessage apply(HttpRequestMessage input) { + return input; + } + } +} From 4b855ae81a807424a89b5bfbdd277f1802d3c741 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 24 Mar 2020 11:29:57 -0700 Subject: [PATCH 024/273] zuul-processor: support overriding package names --- .../main/java/com/netflix/zuul/Filter.java | 9 +++++ zuul-processor/build.gradle | 2 - .../filters/processor/FilterProcessor.java | 37 ++++++++++++++++--- .../processor/FilterProcessorTest.java | 8 +++- .../SubpackageFilter.java | 2 +- .../processor/override/package-info.java | 18 +++++++++ .../processor/subpackage/OverrideFilter.java | 25 +++++++++++++ 7 files changed, 90 insertions(+), 11 deletions(-) rename zuul-processor/src/test/java/com/netflix/zuul/filters/processor/{subpackage => override}/SubpackageFilter.java (94%) create mode 100644 zuul-processor/src/test/java/com/netflix/zuul/filters/processor/override/package-info.java create mode 100644 zuul-processor/src/test/java/com/netflix/zuul/filters/processor/subpackage/OverrideFilter.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/Filter.java b/zuul-core/src/main/java/com/netflix/zuul/Filter.java index 6ec77913..44bf30ea 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/Filter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/Filter.java @@ -16,7 +16,9 @@ package com.netflix.zuul; +import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.CLASS; import static java.lang.annotation.RetentionPolicy.RUNTIME; import com.netflix.zuul.filters.FilterSyncType; @@ -48,4 +50,11 @@ * Indicates if this is a synchronous filter. */ FilterSyncType sync() default FilterSyncType.SYNC; + + @Target({PACKAGE}) + @Retention(CLASS) + @Documented + @interface FilterPackageName { + String value(); + } } diff --git a/zuul-processor/build.gradle b/zuul-processor/build.gradle index bc50aef7..9ab23e18 100644 --- a/zuul-processor/build.gradle +++ b/zuul-processor/build.gradle @@ -1,11 +1,9 @@ dependencies { implementation("com.google.guava:guava:28.2-jre") - implementation project(":zuul-core") testCompile 'junit:junit:4.13-rc-1' testCompile 'com.google.truth:truth:1.0.1' - testAnnotationProcessor project(":zuul-processor") } diff --git a/zuul-processor/src/main/java/com/netflix/zuul/filters/processor/FilterProcessor.java b/zuul-processor/src/main/java/com/netflix/zuul/filters/processor/FilterProcessor.java index e6fb00c8..3c8ee179 100644 --- a/zuul-processor/src/main/java/com/netflix/zuul/filters/processor/FilterProcessor.java +++ b/zuul-processor/src/main/java/com/netflix/zuul/filters/processor/FilterProcessor.java @@ -21,10 +21,12 @@ import com.google.common.base.Converter; import com.google.common.base.Splitter; import com.netflix.zuul.Filter; +import com.netflix.zuul.Filter.FilterPackageName; import java.io.IOException; import java.io.Writer; import java.util.ArrayList; import java.util.Collection; +import java.util.HashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; @@ -40,21 +42,35 @@ import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; +import javax.lang.model.element.ElementKind; import javax.lang.model.element.Modifier; import javax.lang.model.element.TypeElement; import javax.lang.model.util.Elements; import javax.tools.JavaFileObject; -@SupportedAnnotationTypes("com.netflix.zuul.Filter") + +@SupportedAnnotationTypes({FilterProcessor.FILTER_TYPE, FilterProcessor.FILTER_PACKAGE_TYPE}) @SupportedSourceVersion(SourceVersion.RELEASE_8) public final class FilterProcessor extends AbstractProcessor { + static final String FILTER_TYPE = "com.netflix.zuul.Filter"; + static final String FILTER_PACKAGE_TYPE = "com.netflix.zuul.Filter.FilterPackageName"; + private final Map> packageToElements = new TreeMap<>(String::compareTo); + private final Map packageNameOverride = new HashMap<>(); @Override public boolean process(Set annotations, RoundEnvironment roundEnv) { + Set packageAnnotated = roundEnv.getElementsAnnotatedWith(FilterPackageName.class); Set annotated = roundEnv.getElementsAnnotatedWith(Filter.class); Elements elementUtils = processingEnv.getElementUtils(); + for (Element pkg : packageAnnotated) { + assert pkg.getKind() == ElementKind.PACKAGE : pkg; + String name = String.valueOf(elementUtils.getPackageOf(pkg).getQualifiedName()); + String override = pkg.getAnnotation(FilterPackageName.class).value(); + packageNameOverride.put(name, override); + } + for (Element el : annotated) { if (el.getModifiers().contains(Modifier.ABSTRACT)) { continue; @@ -64,15 +80,16 @@ public boolean process(Set annotations, RoundEnvironment .add(el); } - if (!annotated.isEmpty()) { + // We can't check if processing is over, because we can't use the filer after that. + if (!packageToElements.isEmpty()) { try { - writeFiles(processingEnv.getFiler(), packageToElements); + writeFiles(processingEnv.getFiler(), packageToElements, packageNameOverride); } catch (Exception e) { throw new RuntimeException(e); } finally { packageToElements.clear(); + packageNameOverride.clear(); } - return true; } return true; @@ -108,11 +125,19 @@ static void writeFile(Writer writer, String packageName, String className, Colle writer.write("}\n"); } - private static void writeFiles(Filer filer, Map> packageToElements) throws Exception { + private static void writeFiles( + Filer filer, + Map> packageToElements, + Map packageNameOverride) throws Exception { for (Entry> entry : packageToElements.entrySet()) { String pkg = entry.getKey(); List elements = new ArrayList<>(entry.getValue()); - String className = deriveGeneratedClassName(pkg); + String className; + if (packageNameOverride.containsKey(pkg)) { + className = packageNameOverride.get(pkg); + } else { + className = deriveGeneratedClassName(pkg); + } JavaFileObject source = filer.createSourceFile(pkg + "." + className, elements.toArray(new Element[0])); try (Writer writer = source.openWriter()) { writeFile(writer, pkg, className, elements); diff --git a/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/FilterProcessorTest.java b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/FilterProcessorTest.java index 85c15b63..5c443ff4 100644 --- a/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/FilterProcessorTest.java +++ b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/FilterProcessorTest.java @@ -20,8 +20,10 @@ import com.google.common.truth.Truth; import com.netflix.zuul.filters.ZuulFilter; +import com.netflix.zuul.filters.processor.override.MySubpackage; +import com.netflix.zuul.filters.processor.override.SubpackageFilter; +import com.netflix.zuul.filters.processor.subpackage.OverrideFilter; import com.netflix.zuul.filters.processor.subpackage.ProcessorSubpackageFilters; -import com.netflix.zuul.filters.processor.subpackage.SubpackageFilter; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; @@ -37,13 +39,15 @@ public class FilterProcessorTest { public void allFilterClassedRecorded() { List>> filters = FiltersProcessorFilters.getFilters(); List>> subpackage = ProcessorSubpackageFilters.getFilters(); + List>> override = MySubpackage.getFilters(); Truth.assertThat(filters).containsExactly( OuterClassFilter.class, TopLevelFilter.class, TopLevelFilter.StaticSubclassFilter.class, TopLevelFilter.SubclassFilter.class); - Truth.assertThat(subpackage).containsExactly(SubpackageFilter.class); + Truth.assertThat(subpackage).containsExactly(OverrideFilter.class); + Truth.assertThat(override).containsExactly(SubpackageFilter.class); } @Test diff --git a/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/subpackage/SubpackageFilter.java b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/override/SubpackageFilter.java similarity index 94% rename from zuul-processor/src/test/java/com/netflix/zuul/filters/processor/subpackage/SubpackageFilter.java rename to zuul-processor/src/test/java/com/netflix/zuul/filters/processor/override/SubpackageFilter.java index ff82213f..3ec6fec3 100644 --- a/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/subpackage/SubpackageFilter.java +++ b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/override/SubpackageFilter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.netflix.zuul.filters.processor.subpackage; +package com.netflix.zuul.filters.processor.override; import com.netflix.zuul.Filter; import com.netflix.zuul.filters.FilterType; diff --git a/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/override/package-info.java b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/override/package-info.java new file mode 100644 index 00000000..2636cc1a --- /dev/null +++ b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/override/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@com.netflix.zuul.Filter.FilterPackageName("MySubpackage") +package com.netflix.zuul.filters.processor.override; \ No newline at end of file diff --git a/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/subpackage/OverrideFilter.java b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/subpackage/OverrideFilter.java new file mode 100644 index 00000000..a3354077 --- /dev/null +++ b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/subpackage/OverrideFilter.java @@ -0,0 +1,25 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.filters.processor.subpackage; + +import com.netflix.zuul.Filter; +import com.netflix.zuul.filters.FilterType; +import com.netflix.zuul.filters.processor.TestFilter; + +@Filter(order = 30, type = FilterType.INBOUND) +public final class OverrideFilter extends TestFilter { +} From c8cbeacc994f3681e6cae17b91232ca8a72b46d7 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 25 Mar 2020 15:43:18 -0700 Subject: [PATCH 025/273] all: update to latest netty version --- gradle.properties | 2 +- zuul-core/dependencies.lock | 360 +++++++++++++++---------------- zuul-processor/dependencies.lock | 120 +++++------ zuul-sample/dependencies.lock | 200 ++++++++--------- 4 files changed, 341 insertions(+), 341 deletions(-) diff --git a/gradle.properties b/gradle.properties index ca03dfc5..58090fa2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ versions_groovy=2.4.4 versions_ribbon=2.2.4 -versions_netty=4.1.46.Final +versions_netty=4.1.48.Final release.scope=patch diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 3e5641c8..c2ad2da9 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -101,44 +101,44 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-common": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-handler": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "locked": "0.21.0", @@ -283,44 +283,44 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-common": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-handler": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "locked": "0.21.0", @@ -465,48 +465,48 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-common": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-handler": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.30.Final", "requested": "2.0.30.Final" }, "io.netty:netty-transport": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "locked": "0.21.0", @@ -651,48 +651,48 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-common": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-handler": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.30.Final", "requested": "2.0.30.Final" }, "io.netty:netty-transport": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "locked": "0.21.0", @@ -837,48 +837,48 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-common": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-handler": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.30.Final", "requested": "2.0.30.Final" }, "io.netty:netty-transport": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "locked": "0.21.0", @@ -1027,44 +1027,44 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-common": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-handler": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "locked": "0.21.0", @@ -1213,44 +1213,44 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-common": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-handler": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "locked": "0.21.0", @@ -1399,48 +1399,48 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-common": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-handler": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.30.Final", "requested": "2.0.30.Final" }, "io.netty:netty-transport": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "locked": "0.21.0", @@ -1593,48 +1593,48 @@ "requested": "2.4" }, "io.netty:netty-buffer": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-common": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-handler": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-resolver": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.30.Final", "requested": "2.0.30.Final" }, "io.netty:netty-transport": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.46.Final", - "requested": "4.1.46.Final" + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "locked": "0.21.0", diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 3e75a0e6..fbb8c11e 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -190,43 +190,43 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -238,19 +238,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -478,43 +478,43 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -526,19 +526,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -792,43 +792,43 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -840,19 +840,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -1086,43 +1086,43 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1134,19 +1134,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -1412,43 +1412,43 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1460,19 +1460,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -1739,43 +1739,43 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1787,19 +1787,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index c1109428..3c7634c5 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -170,43 +170,43 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -218,19 +218,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -457,43 +457,43 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -505,19 +505,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -744,43 +744,43 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -792,19 +792,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -1031,43 +1031,43 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1079,19 +1079,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -1326,43 +1326,43 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1374,19 +1374,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -1621,43 +1621,43 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1669,19 +1669,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -1916,43 +1916,43 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1964,19 +1964,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -2203,43 +2203,43 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -2251,19 +2251,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -2490,43 +2490,43 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -2538,19 +2538,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -2785,43 +2785,43 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-resolver": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -2833,19 +2833,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.46.Final" + "locked": "4.1.48.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ From 1fe773e4e0e65a4d28b0d649f0bf6c4d7e51bfac Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 27 Mar 2020 14:55:28 -0700 Subject: [PATCH 026/273] all: bump ribbon version --- gradle.properties | 2 +- zuul-core/build.gradle | 1 + zuul-core/dependencies.lock | 180 ++++++++++++++++++------------- zuul-processor/dependencies.lock | 84 ++++++++++----- zuul-sample/dependencies.lock | 140 +++++++++++++++++------- 5 files changed, 270 insertions(+), 137 deletions(-) diff --git a/gradle.properties b/gradle.properties index 58090fa2..78275e52 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ versions_groovy=2.4.4 -versions_ribbon=2.2.4 +versions_ribbon=2.7.17 versions_netty=4.1.48.Final release.scope=patch diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index cd7582b7..9bcfd98e 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -25,6 +25,7 @@ dependencies { compile "com.netflix.ribbon:ribbon-httpclient:${versions_ribbon}" compile "com.netflix.ribbon:ribbon-loadbalancer:${versions_ribbon}" compile "com.netflix.ribbon:ribbon-eureka:${versions_ribbon}" + compile "com.netflix.ribbon:ribbon-archaius:${versions_ribbon}" compile "com.netflix.eureka:eureka-client:1.9.4" compile "io.reactivex:rxjava:1.2.1" diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index c2ad2da9..a06b2d4d 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -60,21 +60,25 @@ "locked": "0.3.0", "requested": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.7.17", + "requested": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.servo:servo-core": { "locked": "0.12.21", @@ -242,21 +246,25 @@ "locked": "0.3.0", "requested": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.7.17", + "requested": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.servo:servo-core": { "locked": "0.7.2", @@ -424,21 +432,25 @@ "locked": "0.3.0", "requested": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.7.17", + "requested": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.servo:servo-core": { "locked": "0.12.21", @@ -610,21 +622,25 @@ "locked": "0.3.0", "requested": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.7.17", + "requested": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.servo:servo-core": { "locked": "0.12.21", @@ -796,21 +812,25 @@ "locked": "0.3.0", "requested": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.7.17", + "requested": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.servo:servo-core": { "locked": "0.12.21", @@ -986,21 +1006,25 @@ "locked": "0.3.0", "requested": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.7.17", + "requested": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.servo:servo-core": { "locked": "0.12.21", @@ -1172,21 +1196,25 @@ "locked": "0.3.0", "requested": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.7.17", + "requested": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.servo:servo-core": { "locked": "0.7.2", @@ -1358,21 +1386,25 @@ "locked": "0.3.0", "requested": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.7.17", + "requested": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.servo:servo-core": { "locked": "0.12.21", @@ -1552,21 +1584,25 @@ "locked": "0.3.0", "requested": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.7.17", + "requested": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.2.4", - "requested": "2.2.4" + "locked": "2.7.17", + "requested": "2.7.17" }, "com.netflix.servo:servo-core": { "locked": "0.12.21", diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index fbb8c11e..a5f43ca6 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -123,29 +123,35 @@ ], "locked": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.servo:servo-core": { "firstLevelTransitive": [ @@ -411,29 +417,35 @@ ], "locked": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.servo:servo-core": { "firstLevelTransitive": [ @@ -725,29 +737,35 @@ ], "locked": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.servo:servo-core": { "firstLevelTransitive": [ @@ -1013,29 +1031,35 @@ ], "locked": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.servo:servo-core": { "firstLevelTransitive": [ @@ -1345,29 +1369,35 @@ ], "locked": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.servo:servo-core": { "firstLevelTransitive": [ @@ -1672,29 +1702,35 @@ ], "locked": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.servo:servo-core": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 3c7634c5..2cc3b509 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -97,29 +97,35 @@ ], "locked": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.servo:servo-core": { "firstLevelTransitive": [ @@ -390,29 +396,35 @@ ], "locked": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.servo:servo-core": { "firstLevelTransitive": [ @@ -677,29 +689,35 @@ ], "locked": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.servo:servo-core": { "firstLevelTransitive": [ @@ -964,29 +982,35 @@ ], "locked": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.servo:servo-core": { "firstLevelTransitive": [ @@ -1259,29 +1283,35 @@ ], "locked": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.servo:servo-core": { "firstLevelTransitive": [ @@ -1554,29 +1584,35 @@ ], "locked": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.servo:servo-core": { "firstLevelTransitive": [ @@ -1849,29 +1885,35 @@ ], "locked": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.servo:servo-core": { "firstLevelTransitive": [ @@ -2136,29 +2178,35 @@ ], "locked": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.servo:servo-core": { "firstLevelTransitive": [ @@ -2423,29 +2471,35 @@ ], "locked": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.servo:servo-core": { "firstLevelTransitive": [ @@ -2718,29 +2772,35 @@ ], "locked": "0.3.0" }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.2.4" + "locked": "2.7.17" }, "com.netflix.servo:servo-core": { "firstLevelTransitive": [ From 959ebc21c1b1a36bcfe415dfd48077d7ec55ba5b Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 27 Mar 2020 15:17:38 -0700 Subject: [PATCH 027/273] all: bump eureka deps --- zuul-core/build.gradle | 2 +- zuul-core/dependencies.lock | 36 ++++++++++++++++---------------- zuul-processor/dependencies.lock | 12 +++++------ zuul-sample/dependencies.lock | 20 +++++++++--------- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index 9bcfd98e..6098c501 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -26,7 +26,7 @@ dependencies { compile "com.netflix.ribbon:ribbon-loadbalancer:${versions_ribbon}" compile "com.netflix.ribbon:ribbon-eureka:${versions_ribbon}" compile "com.netflix.ribbon:ribbon-archaius:${versions_ribbon}" - compile "com.netflix.eureka:eureka-client:1.9.4" + compile "com.netflix.eureka:eureka-client:1.9.18" compile "io.reactivex:rxjava:1.2.1" compile "io.netty:netty-common:${versions_netty}" diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index a06b2d4d..7e941a20 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -41,8 +41,8 @@ "requested": "0.7.5" }, "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" + "locked": "1.9.18", + "requested": "1.9.18" }, "com.netflix.governator:governator": { "locked": "1.17.10", @@ -227,8 +227,8 @@ "requested": "0.7.5" }, "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" + "locked": "1.9.18", + "requested": "1.9.18" }, "com.netflix.governator:governator": { "locked": "1.17.10", @@ -413,8 +413,8 @@ "requested": "0.7.5" }, "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" + "locked": "1.9.18", + "requested": "1.9.18" }, "com.netflix.governator:governator": { "locked": "1.17.10", @@ -603,8 +603,8 @@ "requested": "0.7.5" }, "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" + "locked": "1.9.18", + "requested": "1.9.18" }, "com.netflix.governator:governator": { "locked": "1.17.10", @@ -793,8 +793,8 @@ "requested": "0.7.5" }, "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" + "locked": "1.9.18", + "requested": "1.9.18" }, "com.netflix.governator:governator": { "locked": "1.17.10", @@ -983,8 +983,8 @@ "requested": "0.7.5" }, "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" + "locked": "1.9.18", + "requested": "1.9.18" }, "com.netflix.governator:governator": { "locked": "1.17.10", @@ -1173,8 +1173,8 @@ "requested": "0.7.5" }, "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" + "locked": "1.9.18", + "requested": "1.9.18" }, "com.netflix.governator:governator": { "locked": "1.17.10", @@ -1363,8 +1363,8 @@ "requested": "0.7.5" }, "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" + "locked": "1.9.18", + "requested": "1.9.18" }, "com.netflix.governator:governator": { "locked": "1.17.10", @@ -1561,8 +1561,8 @@ "requested": "0.7.5" }, "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" + "locked": "1.9.18", + "requested": "1.9.18" }, "com.netflix.governator:governator": { "locked": "1.17.10", diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index a5f43ca6..b35ac0a9 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -97,7 +97,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.4" + "locked": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -391,7 +391,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.4" + "locked": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -711,7 +711,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.4" + "locked": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -1005,7 +1005,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.4" + "locked": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -1343,7 +1343,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.4" + "locked": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -1676,7 +1676,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.4" + "locked": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 2cc3b509..95431f26 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -71,7 +71,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.4" + "locked": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -370,7 +370,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.4" + "locked": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -663,7 +663,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.4" + "locked": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -956,7 +956,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.4" + "locked": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -1257,7 +1257,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.4" + "locked": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -1558,7 +1558,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.4" + "locked": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -1859,7 +1859,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.4" + "locked": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -2152,7 +2152,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.4" + "locked": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -2445,7 +2445,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.4" + "locked": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -2746,7 +2746,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.4" + "locked": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ From 92e7e2dd6eeb656c301acc8cd15423fd04cb73cd Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 30 Mar 2020 15:20:23 -0700 Subject: [PATCH 028/273] zuul-core: remove reference to Servo Counter --- .../zuul/monitoring/CounterFactory.java | 53 --------------- .../zuul/monitoring/MonitoringHelper.java | 6 -- .../com/netflix/zuul/plugins/Counter.java | 65 ------------------- 3 files changed, 124 deletions(-) delete mode 100644 zuul-core/src/main/java/com/netflix/zuul/monitoring/CounterFactory.java delete mode 100644 zuul-core/src/main/java/com/netflix/zuul/plugins/Counter.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/monitoring/CounterFactory.java b/zuul-core/src/main/java/com/netflix/zuul/monitoring/CounterFactory.java deleted file mode 100644 index 3d9e83c0..00000000 --- a/zuul-core/src/main/java/com/netflix/zuul/monitoring/CounterFactory.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2018 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.netflix.zuul.monitoring; - -/** - * Abstraction layer to provide counter based monitoring. - * - * @author mhawthorne - */ -public abstract class CounterFactory { - - private static CounterFactory INSTANCE; - - /** - * Pass in a CounterFactory Instance. This must be done to use Zuul as Zuul uses several internal counters - * - * @param f a CounterFactory value - */ - public static final void initialize(CounterFactory f) { - INSTANCE = f; - } - - /** - * return the singleton CounterFactory instance. - * - * @return a CounterFactory value - */ - public static final CounterFactory instance() { - if(INSTANCE == null) throw new IllegalStateException(String.format("%s not initialized", CounterFactory.class.getSimpleName())); - return INSTANCE; - } - - /** - * Increments the counter of the given name - * - * @param name a String value - */ - public abstract void increment(String name); - -} diff --git a/zuul-core/src/main/java/com/netflix/zuul/monitoring/MonitoringHelper.java b/zuul-core/src/main/java/com/netflix/zuul/monitoring/MonitoringHelper.java index 81f5c4ef..12b2653f 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/monitoring/MonitoringHelper.java +++ b/zuul-core/src/main/java/com/netflix/zuul/monitoring/MonitoringHelper.java @@ -22,15 +22,9 @@ public class MonitoringHelper { public static final void initMocks() { - CounterFactory.initialize(new CounterFactoryImpl()); TracerFactory.initialize(new TracerFactoryImpl()); } - private static final class CounterFactoryImpl extends CounterFactory { - @Override - public void increment(String name) {} - } - private static final class TracerFactoryImpl extends TracerFactory { @Override public Tracer startMicroTracer(String name) { diff --git a/zuul-core/src/main/java/com/netflix/zuul/plugins/Counter.java b/zuul-core/src/main/java/com/netflix/zuul/plugins/Counter.java deleted file mode 100644 index d640dd7c..00000000 --- a/zuul-core/src/main/java/com/netflix/zuul/plugins/Counter.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2018 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.netflix.zuul.plugins; - -import com.netflix.servo.DefaultMonitorRegistry; -import com.netflix.servo.monitor.BasicCounter; -import com.netflix.servo.monitor.MonitorConfig; -import com.netflix.servo.tag.InjectableTag; -import com.netflix.servo.tag.Tag; -import com.netflix.zuul.monitoring.CounterFactory; - -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; - -/** - * Plugin to hook up a Servo counter to the CounterFactory - * @author Mikey Cohen - * Date: 4/10/13 - * Time: 4:50 PM - */ -public class Counter extends CounterFactory { - final static ConcurrentMap map = new ConcurrentHashMap(); - final Object lock = new Object(); - - @Override - public void increment(String name) { - BasicCounter counter = getCounter(name); - counter.increment(); - } - - private BasicCounter getCounter(String name) { - BasicCounter counter = map.get(name); - if (counter == null) { - synchronized (lock) { - counter = map.get(name); - if (counter != null) { - return counter; - } - - List tags = new ArrayList(2); - tags.add(InjectableTag.HOSTNAME); - tags.add(InjectableTag.IP); - counter = new BasicCounter(MonitorConfig.builder(name).withTags(tags).build()); - map.putIfAbsent(name, counter); - DefaultMonitorRegistry.getInstance().register(counter); - } - } - return counter; - } -} From 29a2d88b0b3d974674220839e130a0cc6becfd04 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 30 Mar 2020 16:11:15 -0700 Subject: [PATCH 029/273] zuul-core: remove BaseFilterTest * zuul-core: remove BaseFilterTest * rename BaseFilter2Test * drop dep on junit and mockito --- zuul-core/build.gradle | 3 - zuul-core/dependencies.lock | 72 ++--------- .../netflix/zuul/filters/BaseFilterTest.java | 88 ------------- ...seFilter2Test.java => BaseFilterTest.java} | 4 +- .../common/GZipResponseFilterTest.java | 20 ++- zuul-processor/dependencies.lock | 70 +--------- zuul-sample/dependencies.lock | 120 ------------------ 7 files changed, 28 insertions(+), 349 deletions(-) delete mode 100644 zuul-core/src/main/java/com/netflix/zuul/filters/BaseFilterTest.java rename zuul-core/src/test/java/com/netflix/zuul/filters/{BaseFilter2Test.java => BaseFilterTest.java} (94%) diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index 6098c501..97518264 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -46,9 +46,6 @@ dependencies { compile "com.netflix.governator:governator-archaius:1.+" compile "com.netflix.governator:governator-core:1.+" - compile "junit:junit:latest.release" - compile "org.mockito:mockito-core:1.9.+" - compile 'io.perfmark:perfmark-api:0.21.0' testCompile "com.netflix.governator:governator-test-junit:1.+" diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 7e941a20..8954203d 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -152,10 +152,6 @@ "locked": "1.2.1", "requested": "1.2.1" }, - "junit:junit": { - "locked": "4.13", - "requested": "latest.release" - }, "org.apache.commons:commons-lang3": { "locked": "3.4", "requested": "3.4" @@ -176,10 +172,6 @@ "locked": "20090211", "requested": "20090211" }, - "org.mockito:mockito-core": { - "locked": "1.9.5", - "requested": "1.9.+" - }, "org.slf4j:slf4j-api": { "locked": "1.7.30", "requested": "1.7.25" @@ -338,10 +330,6 @@ "locked": "1.2.1", "requested": "1.2.1" }, - "junit:junit": { - "locked": "4.13", - "requested": "latest.release" - }, "org.apache.commons:commons-lang3": { "locked": "3.4", "requested": "3.4" @@ -362,10 +350,6 @@ "locked": "20090211", "requested": "20090211" }, - "org.mockito:mockito-core": { - "locked": "1.9.5", - "requested": "1.9.+" - }, "org.slf4j:slf4j-api": { "locked": "1.7.25", "requested": "1.7.25" @@ -528,10 +512,6 @@ "locked": "1.2.1", "requested": "1.2.1" }, - "junit:junit": { - "locked": "4.13", - "requested": "latest.release" - }, "org.apache.commons:commons-lang3": { "locked": "3.4", "requested": "3.4" @@ -552,10 +532,6 @@ "locked": "20090211", "requested": "20090211" }, - "org.mockito:mockito-core": { - "locked": "1.9.5", - "requested": "1.9.+" - }, "org.slf4j:slf4j-api": { "locked": "1.7.30", "requested": "1.7.25" @@ -718,10 +694,6 @@ "locked": "1.2.1", "requested": "1.2.1" }, - "junit:junit": { - "locked": "4.13", - "requested": "latest.release" - }, "org.apache.commons:commons-lang3": { "locked": "3.4", "requested": "3.4" @@ -742,10 +714,6 @@ "locked": "20090211", "requested": "20090211" }, - "org.mockito:mockito-core": { - "locked": "1.9.5", - "requested": "1.9.+" - }, "org.slf4j:slf4j-api": { "locked": "1.7.30", "requested": "1.7.25" @@ -908,10 +876,6 @@ "locked": "1.2.1", "requested": "1.2.1" }, - "junit:junit": { - "locked": "4.13", - "requested": "latest.release" - }, "org.apache.commons:commons-lang3": { "locked": "3.4", "requested": "3.4" @@ -932,10 +896,6 @@ "locked": "20090211", "requested": "20090211" }, - "org.mockito:mockito-core": { - "locked": "1.9.5", - "requested": "1.9.+" - }, "org.slf4j:slf4j-api": { "locked": "1.7.30", "requested": "1.7.25" @@ -1099,8 +1059,8 @@ "requested": "1.2.1" }, "junit:junit": { - "locked": "4.13", - "requested": "latest.release" + "locked": "4.13-rc-1", + "requested": "4.13-rc-1" }, "org.apache.commons:commons-lang3": { "locked": "3.4", @@ -1122,10 +1082,6 @@ "locked": "20090211", "requested": "20090211" }, - "org.mockito:mockito-core": { - "locked": "1.9.5", - "requested": "1.9.+" - }, "org.slf4j:slf4j-api": { "locked": "1.7.30", "requested": "1.7.25" @@ -1289,8 +1245,8 @@ "requested": "1.2.1" }, "junit:junit": { - "locked": "4.13", - "requested": "latest.release" + "locked": "4.13-rc-1", + "requested": "4.13-rc-1" }, "org.apache.commons:commons-lang3": { "locked": "3.4", @@ -1312,10 +1268,6 @@ "locked": "20090211", "requested": "20090211" }, - "org.mockito:mockito-core": { - "locked": "1.9.5", - "requested": "1.9.+" - }, "org.slf4j:slf4j-api": { "locked": "1.7.25", "requested": "1.7.25" @@ -1483,8 +1435,8 @@ "requested": "1.2.1" }, "junit:junit": { - "locked": "4.13", - "requested": "latest.release" + "locked": "4.13-rc-1", + "requested": "4.13-rc-1" }, "org.apache.commons:commons-lang3": { "locked": "3.4", @@ -1506,10 +1458,6 @@ "locked": "20090211", "requested": "20090211" }, - "org.mockito:mockito-core": { - "locked": "1.9.5", - "requested": "1.9.+" - }, "org.slf4j:slf4j-api": { "locked": "1.7.30", "requested": "1.7.25" @@ -1681,8 +1629,8 @@ "requested": "1.2.1" }, "junit:junit": { - "locked": "4.13", - "requested": "latest.release" + "locked": "4.13-rc-1", + "requested": "4.13-rc-1" }, "org.apache.commons:commons-lang3": { "locked": "3.4", @@ -1704,10 +1652,6 @@ "locked": "20090211", "requested": "20090211" }, - "org.mockito:mockito-core": { - "locked": "1.9.5", - "requested": "1.9.+" - }, "org.slf4j:slf4j-api": { "locked": "1.7.30", "requested": "1.7.25" diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/BaseFilterTest.java b/zuul-core/src/main/java/com/netflix/zuul/filters/BaseFilterTest.java deleted file mode 100644 index 767e0231..00000000 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/BaseFilterTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2018 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.zuul.filters; - -import com.netflix.zuul.context.SessionContext; -import com.netflix.zuul.message.Headers; -import com.netflix.zuul.message.http.*; -import org.junit.Before; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.runners.MockitoJUnitRunner; - -import static org.mockito.Mockito.when; - -/** - * A convenience superclass to extend when writing Filter unit-tests. - * - * @author Mike Smith - */ -@RunWith(MockitoJUnitRunner.class) -public abstract class BaseFilterTest -{ - @Mock - protected HttpResponseMessage response; - @Mock - protected HttpRequestMessage request; - @Mock - protected HttpRequestInfo originalRequest; - @Mock - protected HttpResponseInfo originResponse; - - protected SessionContext context; - protected Headers originalRequestHeaders; - protected Headers requestHeaders; - protected HttpQueryParams requestParams; - protected Cookies requestCookies; - protected Headers originResponseHeaders; - protected Headers responseHeaders; - - @Before - public void setup() - { - context = new SessionContext(); - - when(request.getContext()).thenReturn(context); - when(response.getContext()).thenReturn(context); - when(request.getInboundRequest()).thenReturn(originalRequest); - when(response.getOutboundRequest()).thenReturn(request); - when(response.getInboundRequest()).thenReturn(originalRequest); - when(response.getInboundResponse()).thenReturn(originResponse); - - originResponseHeaders = new Headers(); - when(originResponse.getHeaders()).thenReturn(originResponseHeaders); - - originalRequestHeaders = new Headers(); - requestHeaders = new Headers(); - when(request.getHeaders()).thenReturn(requestHeaders); - when(originalRequest.getHeaders()).thenReturn(originalRequestHeaders); - - requestParams = new HttpQueryParams(); - when(request.getQueryParams()).thenReturn(requestParams); - when(originalRequest.getQueryParams()).thenReturn(requestParams); - - requestCookies = new Cookies(); - when(request.parseCookies()).thenReturn(requestCookies); - - responseHeaders = new Headers(); - when(response.getHeaders()).thenReturn(responseHeaders); - } - - protected void setRequestHost(String host) { - when(originalRequest.getOriginalHost()).thenReturn(host); - } -} diff --git a/zuul-core/src/test/java/com/netflix/zuul/filters/BaseFilter2Test.java b/zuul-core/src/test/java/com/netflix/zuul/filters/BaseFilterTest.java similarity index 94% rename from zuul-core/src/test/java/com/netflix/zuul/filters/BaseFilter2Test.java rename to zuul-core/src/test/java/com/netflix/zuul/filters/BaseFilterTest.java index 602b6539..69934ef9 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/filters/BaseFilter2Test.java +++ b/zuul-core/src/test/java/com/netflix/zuul/filters/BaseFilterTest.java @@ -29,11 +29,9 @@ /** * Tests for {@link BaseFilter}. Currently named BaseFilter2Test as there is an existing * class named BaseFilterTest. - * - * TODO(carl-mastrangelo): refactor {@link BaseFilterTest} to not conflict with this class. */ @RunWith(JUnit4.class) -public class BaseFilter2Test { +public class BaseFilterTest { @Mock private BaseFilter f1; diff --git a/zuul-core/src/test/java/com/netflix/zuul/filters/common/GZipResponseFilterTest.java b/zuul-core/src/test/java/com/netflix/zuul/filters/common/GZipResponseFilterTest.java index 009a4079..6f7c2875 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/filters/common/GZipResponseFilterTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/filters/common/GZipResponseFilterTest.java @@ -19,9 +19,12 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.when; -import com.netflix.zuul.filters.BaseFilterTest; +import com.netflix.zuul.context.SessionContext; +import com.netflix.zuul.message.Headers; import com.netflix.zuul.message.http.HttpHeaderNames; +import com.netflix.zuul.message.http.HttpRequestMessage; import com.netflix.zuul.message.http.HttpResponseMessage; import com.netflix.zuul.message.http.HttpResponseMessageImpl; import io.netty.buffer.Unpooled; @@ -34,21 +37,32 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.runners.MockitoJUnitRunner; @RunWith(MockitoJUnitRunner.class) -public class GZipResponseFilterTest extends BaseFilterTest { +public class GZipResponseFilterTest { + private final SessionContext context = new SessionContext(); + private final Headers originalRequestHeaders = new Headers(); + + @Mock + private HttpRequestMessage request; + @Mock + private HttpRequestMessage originalRequest; GZipResponseFilter filter; HttpResponseMessage response; @Before public void setup() { - super.setup(); + when(request.getContext()).thenReturn(context); + when(originalRequest.getHeaders()).thenReturn(originalRequestHeaders); + filter = Mockito.spy(new GZipResponseFilter()); response = new HttpResponseMessageImpl(context, request, 99); response.getHeaders().set(HttpHeaderNames.CONTENT_TYPE, "text/html"); + when(response.getInboundRequest()).thenReturn(originalRequest); } @Test diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index b35ac0a9..e476cb8e 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -270,12 +270,6 @@ ], "locked": "1.2.1" }, - "junit:junit": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.13" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -306,12 +300,6 @@ ], "locked": "20090211" }, - "org.mockito:mockito-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.9.5" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -564,12 +552,6 @@ ], "locked": "1.2.1" }, - "junit:junit": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.13" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -600,12 +582,6 @@ ], "locked": "20090211" }, - "org.mockito:mockito-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.9.5" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -884,12 +860,6 @@ ], "locked": "1.2.1" }, - "junit:junit": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.13" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -920,12 +890,6 @@ ], "locked": "20090211" }, - "org.mockito:mockito-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.9.5" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1184,12 +1148,6 @@ ], "locked": "1.2.1" }, - "junit:junit": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.13" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1220,12 +1178,6 @@ ], "locked": "20090211" }, - "org.mockito:mockito-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.9.5" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1517,10 +1469,7 @@ "locked": "1.2.1" }, "junit:junit": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.13", + "locked": "4.13-rc-1", "requested": "4.13-rc-1" }, "org.apache.commons:commons-lang3": { @@ -1553,12 +1502,6 @@ ], "locked": "20090211" }, - "org.mockito:mockito-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.9.5" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1850,10 +1793,7 @@ "locked": "1.2.1" }, "junit:junit": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.13", + "locked": "4.13-rc-1", "requested": "4.13-rc-1" }, "org.apache.commons:commons-lang3": { @@ -1886,12 +1826,6 @@ ], "locked": "20090211" }, - "org.mockito:mockito-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.9.5" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 95431f26..fd1e2b88 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -250,12 +250,6 @@ ], "locked": "1.2.1" }, - "junit:junit": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.13" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -286,12 +280,6 @@ ], "locked": "20090211" }, - "org.mockito:mockito-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.9.5" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -543,12 +531,6 @@ ], "locked": "1.2.1" }, - "junit:junit": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.13" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -579,12 +561,6 @@ ], "locked": "20090211" }, - "org.mockito:mockito-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.9.5" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -836,12 +812,6 @@ ], "locked": "1.2.1" }, - "junit:junit": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.13" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -872,12 +842,6 @@ ], "locked": "20090211" }, - "org.mockito:mockito-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.9.5" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1129,12 +1093,6 @@ ], "locked": "1.2.1" }, - "junit:junit": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.13" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1173,12 +1131,6 @@ ], "locked": "20090211" }, - "org.mockito:mockito-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.9.5" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1430,12 +1382,6 @@ ], "locked": "1.2.1" }, - "junit:junit": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.13" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1474,12 +1420,6 @@ ], "locked": "20090211" }, - "org.mockito:mockito-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.9.5" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1731,12 +1671,6 @@ ], "locked": "1.2.1" }, - "junit:junit": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.13" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1775,12 +1709,6 @@ ], "locked": "20090211" }, - "org.mockito:mockito-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.9.5" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2032,12 +1960,6 @@ ], "locked": "1.2.1" }, - "junit:junit": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.13" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2068,12 +1990,6 @@ ], "locked": "20090211" }, - "org.mockito:mockito-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.9.5" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2325,12 +2241,6 @@ ], "locked": "1.2.1" }, - "junit:junit": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.13" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2361,12 +2271,6 @@ ], "locked": "20090211" }, - "org.mockito:mockito-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.9.5" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2618,12 +2522,6 @@ ], "locked": "1.2.1" }, - "junit:junit": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.13" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2662,12 +2560,6 @@ ], "locked": "20090211" }, - "org.mockito:mockito-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.9.5" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2919,12 +2811,6 @@ ], "locked": "1.2.1" }, - "junit:junit": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.13" - }, "org.apache.commons:commons-lang3": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2963,12 +2849,6 @@ ], "locked": "20090211" }, - "org.mockito:mockito-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.9.5" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" From edec3c17f91435fe7829cace5d93d708c5d458b3 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 30 Mar 2020 16:50:39 -0700 Subject: [PATCH 030/273] zuul-core: remove groovy language support --- build.gradle | 1 - zuul-core/build.gradle | 6 +- .../zuul/groovy/GroovyCompatability.groovy | 60 ------------------- zuul-processor/build.gradle | 2 + zuul-sample/build.gradle | 1 + 5 files changed, 4 insertions(+), 66 deletions(-) delete mode 100755 zuul-core/src/main/java/com/netflix/zuul/groovy/GroovyCompatability.groovy diff --git a/build.gradle b/build.gradle index 83bb9842..d72e9892 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,6 @@ configurations.all { subprojects { apply plugin: 'nebula.netflixoss' apply plugin: 'java' - apply plugin: 'groovy' apply plugin: 'nebula.javadoc-jar' apply plugin: 'nebula.dependency-lock' diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index 97518264..b9c5a318 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -1,5 +1,5 @@ -apply plugin: "groovy" apply plugin: "com.google.osdetector" +apply plugin: "java-library" dependencies { compile "commons-io:commons-io:2.4" @@ -53,10 +53,6 @@ dependencies { testRuntime 'org.slf4j:slf4j-simple:1.7.29' } -jar { - from sourceSets.main.allGroovy -} - // Silences log statements during tests. This still allows normal failures to be printed. test { testLogging { diff --git a/zuul-core/src/main/java/com/netflix/zuul/groovy/GroovyCompatability.groovy b/zuul-core/src/main/java/com/netflix/zuul/groovy/GroovyCompatability.groovy deleted file mode 100755 index 813a9c5d..00000000 --- a/zuul-core/src/main/java/com/netflix/zuul/groovy/GroovyCompatability.groovy +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2018 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.zuul.groovy - -import com.netflix.zuul.context.SessionContext -import org.junit.Test -import org.junit.runner.RunWith -import org.mockito.runners.MockitoJUnitRunner - -import static org.junit.Assert.assertEquals -import static org.junit.Assert.assertNotNull - -/** - * Unit test class to verify groovy compatibility with RequestContext - * Created by IntelliJ IDEA. - * User: mcohen - * Date: 1/3/12 - * Time: 4:55 PM - */ -class GroovyCompatability { - - - @RunWith(MockitoJUnitRunner.class) - public static class TestUnit { - - @Test - public void testRequestContext() { - SessionContext context = new SessionContext() - - context.test = "moo" - assertNotNull(context.test) - assertEquals(context.test, "moo") - assertNotNull(context.get("test")) - assertEquals(context.get("test"), "moo") - - context.set("test", "ik") - assertEquals(context.get("test"), "ik") - assertEquals(context.test, "ik") - assertNotNull(context) - assertEquals(context.test, "ik") - - } - - } - -} diff --git a/zuul-processor/build.gradle b/zuul-processor/build.gradle index 9ab23e18..91076c7d 100644 --- a/zuul-processor/build.gradle +++ b/zuul-processor/build.gradle @@ -1,3 +1,5 @@ +apply plugin: "java" + dependencies { implementation("com.google.guava:guava:28.2-jre") implementation project(":zuul-core") diff --git a/zuul-sample/build.gradle b/zuul-sample/build.gradle index f1effdd5..48e6f573 100644 --- a/zuul-sample/build.gradle +++ b/zuul-sample/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'groovy' +apply plugin: "java" apply plugin: 'application' dependencies { From c689d5570dec903c002670bffa38e0fd983e3bcd Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 30 Mar 2020 21:18:11 -0700 Subject: [PATCH 031/273] all: Stop exposing deps as compile time * Remove reference to ZuulEndPointRunner. For some reason, the groovy compiler really wants to link all the classes from there, which includes the base class BaseZuulFilterRunner. The problem is that a private inner class there uses PerfMark on the ABI which is not present on the groovy compilation classpath. When groovy tries to compile, it looks for all deps and fails. Instead, link to the Proxy endpoint directly to avoid the groovy wart. * remove governator archaius * drop apache io and fileupload * move guava deps up * remove apache commons and guava * hide haproxy and bouncycastle * remove refs to Apache Lang --- build.gradle | 10 + zuul-core/build.gradle | 43 +- zuul-core/dependencies.lock | 524 +--------------- .../HAProxyMessageChannelHandler.java | 1 - .../com/netflix/zuul/FilterFileManager.java | 24 +- .../java/com/netflix/zuul/context/Debug.java | 31 +- .../com/netflix/zuul/event/ZuulEvent.java | 39 -- .../com/netflix/zuul/filters/BaseFilter.java | 2 - .../zuul/filters/SyncZuulFilterAdapter.java | 3 - .../zuul/filters/endpoint/ProxyEndpoint.java | 55 +- .../zuul/message/http/HttpQueryParams.java | 16 +- .../netty/filter/BaseZuulFilterRunner.java | 3 - .../netty/server/ClientRequestReceiver.java | 35 +- .../zuul/netty/ssl/BaseSslContextFactory.java | 15 +- .../zuul/origins/BasicNettyOrigin.java | 13 +- .../com/netflix/zuul/stats/ZuulEvent.java | 115 ---- .../java/com/netflix/zuul/util/HttpUtils.java | 20 +- .../common/GZipResponseFilterTest.java | 14 +- zuul-processor/build.gradle | 6 +- zuul-processor/dependencies.lock | 412 +------------ zuul-sample/dependencies.lock | 566 +----------------- .../zuul/sample/filters/inbound/Routes.groovy | 4 +- 22 files changed, 171 insertions(+), 1780 deletions(-) delete mode 100644 zuul-core/src/main/java/com/netflix/zuul/event/ZuulEvent.java delete mode 100644 zuul-core/src/main/java/com/netflix/zuul/stats/ZuulEvent.java diff --git a/build.gradle b/build.gradle index d72e9892..ed33d83c 100644 --- a/build.gradle +++ b/build.gradle @@ -49,6 +49,16 @@ subprojects { tasks.withType(Javadoc).each { it.classpath = sourceSets.main.compileClasspath } + ext { + libraries = [ + guava: "com.google.guava:guava:28.1-jre", + junit: "junit:junit:4.13", + mockito: 'org.mockito:mockito-core:1.10.19', + slf4j: "org.slf4j:slf4j-api:1.7.25", + truth: 'com.google.truth:truth:1.0.1' + ] + } + dependencies { ext.versions_guice = "4.2.2" diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index b9c5a318..70f74725 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -2,17 +2,12 @@ apply plugin: "com.google.osdetector" apply plugin: "java-library" dependencies { - compile "commons-io:commons-io:2.4" - compile "commons-fileupload:commons-fileupload:1.3" - compile 'commons-collections:commons-collections:3.2.2' compile 'commons-configuration:commons-configuration:1.8' - compile "org.apache.commons:commons-lang3:3.4" - compile "com.google.guava:guava:28.1-jre" + implementation libraries.guava compile "org.codehaus.groovy:groovy-all:${versions_groovy}" - compile "org.slf4j:slf4j-api:1.7.25" - compile "org.json:json:20090211" - compile 'org.bouncycastle:bcpg-jdk15on:1.+' - compile 'org.bouncycastle:bcprov-jdk15on:1.+' + // TODO(carl-mastrangelo): this can be implementation; remove Logger from public api points. + api libraries.slf4j + implementation 'org.bouncycastle:bcprov-jdk15on:1.+' compile 'com.fasterxml.jackson.core:jackson-core:2.9.8' compile 'com.fasterxml.jackson.core:jackson-databind:2.9.8' @@ -29,28 +24,28 @@ dependencies { compile "com.netflix.eureka:eureka-client:1.9.18" compile "io.reactivex:rxjava:1.2.1" - compile "io.netty:netty-common:${versions_netty}" - compile "io.netty:netty-buffer:${versions_netty}" - compile "io.netty:netty-codec-http:${versions_netty}" - compile "io.netty:netty-codec-http2:${versions_netty}" - compile "io.netty:netty-codec-haproxy:${versions_netty}" - compile "io.netty:netty-handler:${versions_netty}" - compile "io.netty:netty-resolver:${versions_netty}" - compile "io.netty:netty-transport:${versions_netty}" - compile "io.netty:netty-transport-native-epoll:${versions_netty}:linux-x86_64" - compile "io.netty:netty-transport-native-kqueue:${versions_netty}:osx-x86_64" - runtime "io.netty:netty-tcnative-boringssl-static:2.0.30.Final" + // TODO(carl-mastrangelo): some of these could probably be implementation. Do a deeper check. + api "io.netty:netty-common:${versions_netty}" + api "io.netty:netty-buffer:${versions_netty}" + api "io.netty:netty-codec-http:${versions_netty}" + api "io.netty:netty-codec-http2:${versions_netty}" + api "io.netty:netty-handler:${versions_netty}" + api "io.netty:netty-transport:${versions_netty}" + + implementation "io.netty:netty-codec-haproxy:${versions_netty}" + implementation "io.netty:netty-transport-native-epoll:${versions_netty}:linux-x86_64" + implementation "io.netty:netty-transport-native-kqueue:${versions_netty}:osx-x86_64" + runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.30.Final" // To ensure that zuul-netty gets this correct later version. compile "com.netflix.governator:governator:1.+" - compile "com.netflix.governator:governator-archaius:1.+" compile "com.netflix.governator:governator-core:1.+" - compile 'io.perfmark:perfmark-api:0.21.0' + implementation 'io.perfmark:perfmark-api:0.21.0' testCompile "com.netflix.governator:governator-test-junit:1.+" - testCompile 'junit:junit:4.13-rc-1' - testRuntime 'org.slf4j:slf4j-simple:1.7.29' + testImplementation libraries.junit + testRuntimeOnly 'org.slf4j:slf4j-simple:1.7.29' } // Silences log statements during tests. This still allows normal failures to be printed. diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 8954203d..774449db 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -8,10 +8,6 @@ "locked": "2.9.8", "requested": "2.9.8" }, - "com.google.guava:guava": { - "locked": "28.1-jre", - "requested": "28.1-jre" - }, "com.google.inject.extensions:guice-assistedinject": { "locked": "4.2.2", "requested": "4.2.2" @@ -48,10 +44,6 @@ "locked": "1.17.10", "requested": "1.+" }, - "com.netflix.governator:governator-archaius": { - "locked": "1.17.10", - "requested": "1.+" - }, "com.netflix.governator:governator-core": { "locked": "1.17.10", "requested": "1.+" @@ -88,93 +80,17 @@ "locked": "0.103.0", "requested": "0.103.0" }, - "commons-collections:commons-collections": { - "locked": "3.2.2", - "requested": "3.2.2" - }, "commons-configuration:commons-configuration": { "locked": "1.8", "requested": "1.8" }, - "commons-fileupload:commons-fileupload": { - "locked": "1.3", - "requested": "1.3" - }, - "commons-io:commons-io": { - "locked": "2.4", - "requested": "2.4" - }, - "io.netty:netty-buffer": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-codec-haproxy": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-codec-http": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-codec-http2": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-common": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-handler": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-resolver": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-transport": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-transport-native-epoll": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.perfmark:perfmark-api": { - "locked": "0.21.0", - "requested": "0.21.0" - }, "io.reactivex:rxjava": { "locked": "1.2.1", "requested": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "locked": "3.4", - "requested": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "locked": "1.64", - "requested": "1.+" - }, - "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.64", - "requested": "1.+" - }, "org.codehaus.groovy:groovy-all": { "locked": "2.4.4", "requested": "2.4.4" - }, - "org.json:json": { - "locked": "20090211", - "requested": "20090211" - }, - "org.slf4j:slf4j-api": { - "locked": "1.7.30", - "requested": "1.7.25" } }, "compileClasspath": { @@ -226,10 +142,6 @@ "locked": "1.17.10", "requested": "1.+" }, - "com.netflix.governator:governator-archaius": { - "locked": "1.17.10", - "requested": "1.+" - }, "com.netflix.governator:governator-core": { "locked": "1.17.10", "requested": "1.+" @@ -266,22 +178,10 @@ "locked": "0.103.0", "requested": "0.103.0" }, - "commons-collections:commons-collections": { - "locked": "3.2.2", - "requested": "3.2.2" - }, "commons-configuration:commons-configuration": { "locked": "1.8", "requested": "1.8" }, - "commons-fileupload:commons-fileupload": { - "locked": "1.3", - "requested": "1.3" - }, - "commons-io:commons-io": { - "locked": "2.4", - "requested": "2.4" - }, "io.netty:netty-buffer": { "locked": "4.1.48.Final", "requested": "4.1.48.Final" @@ -306,10 +206,6 @@ "locked": "4.1.48.Final", "requested": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, "io.netty:netty-transport": { "locked": "4.1.48.Final", "requested": "4.1.48.Final" @@ -330,14 +226,6 @@ "locked": "1.2.1", "requested": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "locked": "3.4", - "requested": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "locked": "1.64", - "requested": "1.+" - }, "org.bouncycastle:bcprov-jdk15on": { "locked": "1.64", "requested": "1.+" @@ -346,10 +234,6 @@ "locked": "2.4.4", "requested": "2.4.4" }, - "org.json:json": { - "locked": "20090211", - "requested": "20090211" - }, "org.slf4j:slf4j-api": { "locked": "1.7.25", "requested": "1.7.25" @@ -404,10 +288,6 @@ "locked": "1.17.10", "requested": "1.+" }, - "com.netflix.governator:governator-archaius": { - "locked": "1.17.10", - "requested": "1.+" - }, "com.netflix.governator:governator-core": { "locked": "1.17.10", "requested": "1.+" @@ -444,22 +324,10 @@ "locked": "0.103.0", "requested": "0.103.0" }, - "commons-collections:commons-collections": { - "locked": "3.2.2", - "requested": "3.2.2" - }, "commons-configuration:commons-configuration": { "locked": "1.8", "requested": "1.8" }, - "commons-fileupload:commons-fileupload": { - "locked": "1.3", - "requested": "1.3" - }, - "commons-io:commons-io": { - "locked": "2.4", - "requested": "2.4" - }, "io.netty:netty-buffer": { "locked": "4.1.48.Final", "requested": "4.1.48.Final" @@ -484,10 +352,6 @@ "locked": "4.1.48.Final", "requested": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.30.Final", "requested": "2.0.30.Final" @@ -512,14 +376,6 @@ "locked": "1.2.1", "requested": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "locked": "3.4", - "requested": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "locked": "1.64", - "requested": "1.+" - }, "org.bouncycastle:bcprov-jdk15on": { "locked": "1.64", "requested": "1.+" @@ -528,10 +384,6 @@ "locked": "2.4.4", "requested": "2.4.4" }, - "org.json:json": { - "locked": "20090211", - "requested": "20090211" - }, "org.slf4j:slf4j-api": { "locked": "1.7.30", "requested": "1.7.25" @@ -546,10 +398,6 @@ "locked": "2.9.8", "requested": "2.9.8" }, - "com.google.guava:guava": { - "locked": "28.1-jre", - "requested": "28.1-jre" - }, "com.google.inject.extensions:guice-assistedinject": { "locked": "4.2.2", "requested": "4.2.2" @@ -586,10 +434,6 @@ "locked": "1.17.10", "requested": "1.+" }, - "com.netflix.governator:governator-archaius": { - "locked": "1.17.10", - "requested": "1.+" - }, "com.netflix.governator:governator-core": { "locked": "1.17.10", "requested": "1.+" @@ -626,97 +470,17 @@ "locked": "0.103.0", "requested": "0.103.0" }, - "commons-collections:commons-collections": { - "locked": "3.2.2", - "requested": "3.2.2" - }, "commons-configuration:commons-configuration": { "locked": "1.8", "requested": "1.8" }, - "commons-fileupload:commons-fileupload": { - "locked": "1.3", - "requested": "1.3" - }, - "commons-io:commons-io": { - "locked": "2.4", - "requested": "2.4" - }, - "io.netty:netty-buffer": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-codec-haproxy": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-codec-http": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-codec-http2": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-common": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-handler": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-resolver": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.30.Final", - "requested": "2.0.30.Final" - }, - "io.netty:netty-transport": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-transport-native-epoll": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.perfmark:perfmark-api": { - "locked": "0.21.0", - "requested": "0.21.0" - }, "io.reactivex:rxjava": { "locked": "1.2.1", "requested": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "locked": "3.4", - "requested": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "locked": "1.64", - "requested": "1.+" - }, - "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.64", - "requested": "1.+" - }, "org.codehaus.groovy:groovy-all": { "locked": "2.4.4", "requested": "2.4.4" - }, - "org.json:json": { - "locked": "20090211", - "requested": "20090211" - }, - "org.slf4j:slf4j-api": { - "locked": "1.7.30", - "requested": "1.7.25" } }, "runtimeClasspath": { @@ -768,10 +532,6 @@ "locked": "1.17.10", "requested": "1.+" }, - "com.netflix.governator:governator-archaius": { - "locked": "1.17.10", - "requested": "1.+" - }, "com.netflix.governator:governator-core": { "locked": "1.17.10", "requested": "1.+" @@ -808,22 +568,10 @@ "locked": "0.103.0", "requested": "0.103.0" }, - "commons-collections:commons-collections": { - "locked": "3.2.2", - "requested": "3.2.2" - }, "commons-configuration:commons-configuration": { "locked": "1.8", "requested": "1.8" }, - "commons-fileupload:commons-fileupload": { - "locked": "1.3", - "requested": "1.3" - }, - "commons-io:commons-io": { - "locked": "2.4", - "requested": "2.4" - }, "io.netty:netty-buffer": { "locked": "4.1.48.Final", "requested": "4.1.48.Final" @@ -848,10 +596,6 @@ "locked": "4.1.48.Final", "requested": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.30.Final", "requested": "2.0.30.Final" @@ -876,14 +620,6 @@ "locked": "1.2.1", "requested": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "locked": "3.4", - "requested": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "locked": "1.64", - "requested": "1.+" - }, "org.bouncycastle:bcprov-jdk15on": { "locked": "1.64", "requested": "1.+" @@ -892,10 +628,6 @@ "locked": "2.4.4", "requested": "2.4.4" }, - "org.json:json": { - "locked": "20090211", - "requested": "20090211" - }, "org.slf4j:slf4j-api": { "locked": "1.7.30", "requested": "1.7.25" @@ -910,10 +642,6 @@ "locked": "2.9.8", "requested": "2.9.8" }, - "com.google.guava:guava": { - "locked": "28.1-jre", - "requested": "28.1-jre" - }, "com.google.inject.extensions:guice-assistedinject": { "locked": "4.2.2", "requested": "4.2.2" @@ -950,10 +678,6 @@ "locked": "1.17.10", "requested": "1.+" }, - "com.netflix.governator:governator-archaius": { - "locked": "1.17.10", - "requested": "1.+" - }, "com.netflix.governator:governator-core": { "locked": "1.17.10", "requested": "1.+" @@ -994,97 +718,17 @@ "locked": "0.103.0", "requested": "0.103.0" }, - "commons-collections:commons-collections": { - "locked": "3.2.2", - "requested": "3.2.2" - }, "commons-configuration:commons-configuration": { "locked": "1.8", "requested": "1.8" }, - "commons-fileupload:commons-fileupload": { - "locked": "1.3", - "requested": "1.3" - }, - "commons-io:commons-io": { - "locked": "2.4", - "requested": "2.4" - }, - "io.netty:netty-buffer": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-codec-haproxy": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-codec-http": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-codec-http2": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-common": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-handler": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-resolver": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-transport": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-transport-native-epoll": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.perfmark:perfmark-api": { - "locked": "0.21.0", - "requested": "0.21.0" - }, "io.reactivex:rxjava": { "locked": "1.2.1", "requested": "1.2.1" }, - "junit:junit": { - "locked": "4.13-rc-1", - "requested": "4.13-rc-1" - }, - "org.apache.commons:commons-lang3": { - "locked": "3.4", - "requested": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "locked": "1.64", - "requested": "1.+" - }, - "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.64", - "requested": "1.+" - }, "org.codehaus.groovy:groovy-all": { "locked": "2.4.4", "requested": "2.4.4" - }, - "org.json:json": { - "locked": "20090211", - "requested": "20090211" - }, - "org.slf4j:slf4j-api": { - "locked": "1.7.30", - "requested": "1.7.25" } }, "testCompileClasspath": { @@ -1136,10 +780,6 @@ "locked": "1.17.10", "requested": "1.+" }, - "com.netflix.governator:governator-archaius": { - "locked": "1.17.10", - "requested": "1.+" - }, "com.netflix.governator:governator-core": { "locked": "1.17.10", "requested": "1.+" @@ -1180,22 +820,10 @@ "locked": "0.103.0", "requested": "0.103.0" }, - "commons-collections:commons-collections": { - "locked": "3.2.2", - "requested": "3.2.2" - }, "commons-configuration:commons-configuration": { "locked": "1.8", "requested": "1.8" }, - "commons-fileupload:commons-fileupload": { - "locked": "1.3", - "requested": "1.3" - }, - "commons-io:commons-io": { - "locked": "2.4", - "requested": "2.4" - }, "io.netty:netty-buffer": { "locked": "4.1.48.Final", "requested": "4.1.48.Final" @@ -1220,10 +848,6 @@ "locked": "4.1.48.Final", "requested": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, "io.netty:netty-transport": { "locked": "4.1.48.Final", "requested": "4.1.48.Final" @@ -1245,16 +869,8 @@ "requested": "1.2.1" }, "junit:junit": { - "locked": "4.13-rc-1", - "requested": "4.13-rc-1" - }, - "org.apache.commons:commons-lang3": { - "locked": "3.4", - "requested": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "locked": "1.64", - "requested": "1.+" + "locked": "4.13", + "requested": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { "locked": "1.64", @@ -1264,10 +880,6 @@ "locked": "2.4.4", "requested": "2.4.4" }, - "org.json:json": { - "locked": "20090211", - "requested": "20090211" - }, "org.slf4j:slf4j-api": { "locked": "1.7.25", "requested": "1.7.25" @@ -1282,10 +894,6 @@ "locked": "2.9.8", "requested": "2.9.8" }, - "com.google.guava:guava": { - "locked": "28.1-jre", - "requested": "28.1-jre" - }, "com.google.inject.extensions:guice-assistedinject": { "locked": "4.2.2", "requested": "4.2.2" @@ -1322,10 +930,6 @@ "locked": "1.17.10", "requested": "1.+" }, - "com.netflix.governator:governator-archaius": { - "locked": "1.17.10", - "requested": "1.+" - }, "com.netflix.governator:governator-core": { "locked": "1.17.10", "requested": "1.+" @@ -1366,105 +970,17 @@ "locked": "0.103.0", "requested": "0.103.0" }, - "commons-collections:commons-collections": { - "locked": "3.2.2", - "requested": "3.2.2" - }, "commons-configuration:commons-configuration": { "locked": "1.8", "requested": "1.8" }, - "commons-fileupload:commons-fileupload": { - "locked": "1.3", - "requested": "1.3" - }, - "commons-io:commons-io": { - "locked": "2.4", - "requested": "2.4" - }, - "io.netty:netty-buffer": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-codec-haproxy": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-codec-http": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-codec-http2": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-common": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-handler": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-resolver": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.30.Final", - "requested": "2.0.30.Final" - }, - "io.netty:netty-transport": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-transport-native-epoll": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, - "io.perfmark:perfmark-api": { - "locked": "0.21.0", - "requested": "0.21.0" - }, "io.reactivex:rxjava": { "locked": "1.2.1", "requested": "1.2.1" }, - "junit:junit": { - "locked": "4.13-rc-1", - "requested": "4.13-rc-1" - }, - "org.apache.commons:commons-lang3": { - "locked": "3.4", - "requested": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "locked": "1.64", - "requested": "1.+" - }, - "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.64", - "requested": "1.+" - }, "org.codehaus.groovy:groovy-all": { "locked": "2.4.4", "requested": "2.4.4" - }, - "org.json:json": { - "locked": "20090211", - "requested": "20090211" - }, - "org.slf4j:slf4j-api": { - "locked": "1.7.30", - "requested": "1.7.25" - }, - "org.slf4j:slf4j-simple": { - "locked": "1.7.29", - "requested": "1.7.29" } }, "testRuntimeClasspath": { @@ -1516,10 +1032,6 @@ "locked": "1.17.10", "requested": "1.+" }, - "com.netflix.governator:governator-archaius": { - "locked": "1.17.10", - "requested": "1.+" - }, "com.netflix.governator:governator-core": { "locked": "1.17.10", "requested": "1.+" @@ -1560,22 +1072,10 @@ "locked": "0.103.0", "requested": "0.103.0" }, - "commons-collections:commons-collections": { - "locked": "3.2.2", - "requested": "3.2.2" - }, "commons-configuration:commons-configuration": { "locked": "1.8", "requested": "1.8" }, - "commons-fileupload:commons-fileupload": { - "locked": "1.3", - "requested": "1.3" - }, - "commons-io:commons-io": { - "locked": "2.4", - "requested": "2.4" - }, "io.netty:netty-buffer": { "locked": "4.1.48.Final", "requested": "4.1.48.Final" @@ -1600,10 +1100,6 @@ "locked": "4.1.48.Final", "requested": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" - }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.30.Final", "requested": "2.0.30.Final" @@ -1629,16 +1125,8 @@ "requested": "1.2.1" }, "junit:junit": { - "locked": "4.13-rc-1", - "requested": "4.13-rc-1" - }, - "org.apache.commons:commons-lang3": { - "locked": "3.4", - "requested": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "locked": "1.64", - "requested": "1.+" + "locked": "4.13", + "requested": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { "locked": "1.64", @@ -1648,10 +1136,6 @@ "locked": "2.4.4", "requested": "2.4.4" }, - "org.json:json": { - "locked": "20090211", - "requested": "20090211" - }, "org.slf4j:slf4j-api": { "locked": "1.7.30", "requested": "1.7.25" diff --git a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java index 684b42cd..860702da 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java @@ -25,7 +25,6 @@ import io.netty.handler.codec.haproxy.HAProxyMessage; import io.netty.handler.codec.haproxy.HAProxyProtocolVersion; import io.netty.util.AttributeKey; -import io.netty.util.ReferenceCounted; import java.net.InetSocketAddress; import java.net.SocketAddress; diff --git a/zuul-core/src/main/java/com/netflix/zuul/FilterFileManager.java b/zuul-core/src/main/java/com/netflix/zuul/FilterFileManager.java index a881aa66..cf581952 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/FilterFileManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/FilterFileManager.java @@ -15,16 +15,9 @@ */ package com.netflix.zuul; +import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.netflix.config.DynamicIntProperty; import com.netflix.zuul.groovy.GroovyFileFilter; -import org.apache.commons.lang3.concurrent.BasicThreadFactory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; -import javax.inject.Inject; -import javax.inject.Singleton; import java.io.File; import java.io.FilenameFilter; import java.io.IOException; @@ -35,7 +28,14 @@ import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; +import javax.annotation.PostConstruct; +import javax.annotation.PreDestroy; +import javax.inject.Inject; +import javax.inject.Singleton; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This class manages the directory polling for changes and new Groovy filters. @@ -64,11 +64,9 @@ public class FilterFileManager { public FilterFileManager(FilterFileManagerConfig config, FilterLoader filterLoader) { this.config = config; this.filterLoader = filterLoader; - - BasicThreadFactory threadFactory = new BasicThreadFactory.Builder() - .namingPattern("FilterFileManager_ProcessFiles-%d") - .build(); - this.processFilesService = Executors.newFixedThreadPool(FILE_PROCESSOR_THREADS.get(), threadFactory); + ThreadFactory tf = + new ThreadFactoryBuilder().setDaemon(true).setNameFormat("FilterFileManager_ProcessFiles-%d").build(); + this.processFilesService = Executors.newFixedThreadPool(FILE_PROCESSOR_THREADS.get(), tf); } /** diff --git a/zuul-core/src/main/java/com/netflix/zuul/context/Debug.java b/zuul-core/src/main/java/com/netflix/zuul/context/Debug.java index 89d53817..3f7724c8 100755 --- a/zuul-core/src/main/java/com/netflix/zuul/context/Debug.java +++ b/zuul-core/src/main/java/com/netflix/zuul/context/Debug.java @@ -16,21 +16,15 @@ package com.netflix.zuul.context; import com.netflix.zuul.message.Header; -import com.netflix.zuul.message.Headers; import com.netflix.zuul.message.ZuulMessage; -import com.netflix.zuul.message.http.*; -import com.netflix.zuul.util.HttpUtils; -import org.apache.commons.io.IOUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import rx.Observable; - -import java.io.ByteArrayInputStream; -import java.io.IOException; +import com.netflix.zuul.message.http.HttpRequestInfo; +import com.netflix.zuul.message.http.HttpResponseInfo; import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import java.util.zip.GZIPInputStream; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import rx.Observable; /** * Simple wrapper class around the RequestContext for setting and managing Request level Debug data. @@ -210,19 +204,4 @@ public static Observable writeDebugMessage(SessionContext context, Zuul return obs; } - - public static String bodyToText(byte[] bodyBytes, Headers headers) - { - try { - if (HttpUtils.isGzipped(headers)) { - GZIPInputStream gzIn = new GZIPInputStream(new ByteArrayInputStream(bodyBytes)); - bodyBytes = IOUtils.toByteArray(gzIn); - } - return IOUtils.toString(bodyBytes, "UTF-8"); - } - catch (IOException e) { - LOG.error("Error reading message body for debugging.", e); - return "ERROR READING MESSAGE BODY!"; - } - } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/event/ZuulEvent.java b/zuul-core/src/main/java/com/netflix/zuul/event/ZuulEvent.java deleted file mode 100644 index 46f8d864..00000000 --- a/zuul-core/src/main/java/com/netflix/zuul/event/ZuulEvent.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2018 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.netflix.zuul.event; - -/** - * Simple event class - * @author Mikey Cohen - * Date: 3/22/13 - * Time: 10:09 AM - */ -public class ZuulEvent { - String eventType; - String eventMessage; - - public ZuulEvent( String eventType, String eventMessage) { - this.eventMessage = eventMessage; - this.eventType = eventType; - } - - public String getEventType() { - return this.eventType; - } - public String getEventMessage() { - return this.eventMessage; - } -} diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/BaseFilter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/BaseFilter.java index 406d6ba5..5a9c5589 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/BaseFilter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/BaseFilter.java @@ -23,8 +23,6 @@ import com.netflix.zuul.netty.SpectatorUtils; import io.netty.handler.codec.http.HttpContent; -import io.perfmark.PerfMark; -import io.perfmark.Tag; import java.util.concurrent.atomic.AtomicInteger; /** diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/SyncZuulFilterAdapter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/SyncZuulFilterAdapter.java index 3b78e739..16fe9493 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/SyncZuulFilterAdapter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/SyncZuulFilterAdapter.java @@ -16,11 +16,8 @@ package com.netflix.zuul.filters; -import com.netflix.zuul.exception.ZuulFilterConcurrencyExceededException; import com.netflix.zuul.message.ZuulMessage; import io.netty.handler.codec.http.HttpContent; -import io.perfmark.PerfMark; -import io.perfmark.Tag; import rx.Observable; import static com.netflix.zuul.filters.FilterSyncType.SYNC; diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index d4d33794..6b72f195 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -16,6 +16,19 @@ package com.netflix.zuul.filters.endpoint; +import static com.netflix.client.config.CommonClientConfigKey.ReadTimeout; +import static com.netflix.zuul.context.CommonContextKeys.ORIGIN_CHANNEL; +import static com.netflix.zuul.netty.server.ClientRequestReceiver.ATTR_ZUUL_RESP; +import static com.netflix.zuul.passport.PassportState.ORIGIN_CONN_ACQUIRE_END; +import static com.netflix.zuul.passport.PassportState.ORIGIN_CONN_ACQUIRE_FAILED; +import static com.netflix.zuul.passport.PassportState.ORIGIN_RETRY_START; +import static com.netflix.zuul.stats.status.ZuulStatusCategory.FAILURE_ORIGIN; +import static com.netflix.zuul.stats.status.ZuulStatusCategory.FAILURE_ORIGIN_THROTTLED; +import static com.netflix.zuul.stats.status.ZuulStatusCategory.SUCCESS; +import static com.netflix.zuul.stats.status.ZuulStatusCategory.SUCCESS_LOCAL_NO_ROUTE; +import static com.netflix.zuul.stats.status.ZuulStatusCategory.SUCCESS_NOT_FOUND; + +import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import com.google.common.collect.Sets; import com.netflix.client.ClientException; @@ -26,7 +39,6 @@ import com.netflix.config.DynamicIntegerSetProperty; import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.reactive.ExecutionContext; -import com.netflix.netty.common.channel.config.CommonChannelConfigKeys; import com.netflix.spectator.api.Counter; import com.netflix.zuul.Filter; import com.netflix.zuul.context.CommonContextKeys; @@ -81,26 +93,19 @@ import io.netty.util.concurrent.Future; import io.netty.util.concurrent.GenericFutureListener; import io.netty.util.concurrent.Promise; -import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang3.tuple.Pair; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import java.util.StringTokenizer; import java.util.concurrent.atomic.AtomicReference; - -import static com.netflix.client.config.CommonClientConfigKey.ReadTimeout; -import static com.netflix.zuul.context.CommonContextKeys.ORIGIN_CHANNEL; -import static com.netflix.zuul.netty.server.ClientRequestReceiver.ATTR_ZUUL_RESP; -import static com.netflix.zuul.passport.PassportState.*; -import static com.netflix.zuul.stats.status.ZuulStatusCategory.*; +import javax.annotation.Nullable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Not thread safe! New instance of this class is created per HTTP/1.1 request proxied to the origin but NOT for each @@ -536,7 +541,7 @@ else if (originTimeout == null || requestTimeout == null) { } private Integer parseReadTimeout(Object p) { - if (p instanceof String && StringUtils.isNotBlank((String)p)) { + if (p instanceof String && !Strings.isNullOrEmpty((String) p)) { return Integer.valueOf((String)p); } else if (p instanceof Integer) { @@ -1039,7 +1044,7 @@ protected NettyOrigin getOrigin(HttpRequestMessage request) { } String primaryRoute = context.getRouteVIP(); - if (StringUtils.isEmpty(primaryRoute)) { + if (Strings.isNullOrEmpty(primaryRoute)) { // If no vip selected, leave origin null, then later the handleNoOriginSelected() method will be invoked. return null; } @@ -1056,10 +1061,10 @@ protected NettyOrigin getOrigin(HttpRequestMessage request) { } // Use the custom vip instead if one has been provided. - Pair customVip = injectCustomVip(request); + VipPair customVip = injectCustomVip(request); if (customVip != null) { - restClientVIP = customVip.getLeft(); - restClientName = customVip.getRight(); + restClientVIP = customVip.restClientVip; + restClientName = customVip.restClientName; origin = getOrCreateOrigin(originManager, restClientName, restClientVIP, request.reconstructURI(), useFullName, context); } @@ -1079,15 +1084,23 @@ protected NettyOrigin getOrigin(HttpRequestMessage request) { * * Note: this method gets called in the constructor so if overloading it or any methods called within, you cannot * rely on your own constructor parameters. - * - * @param request - * @return */ - protected Pair injectCustomVip(HttpRequestMessage request) { + @Nullable + protected VipPair injectCustomVip(HttpRequestMessage request) { // override for custom vip injection return null; } + protected static final class VipPair { + final String restClientVip; + final String restClientName; + + public VipPair(String restClientVip, String restClientName) { + this.restClientVip = Objects.requireNonNull(restClientVip, "restClientVip"); + this.restClientName = Objects.requireNonNull(restClientName, "restClientName"); + } + } + private NettyOrigin getOrCreateOrigin(OriginManager originManager, String name, String vip, String uri, boolean useFullVipName, SessionContext ctx) { NettyOrigin origin = originManager.getOrigin(name, vip, uri, ctx); if (origin == null) { diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java index 10b93482..bed6bee0 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java @@ -15,16 +15,20 @@ */ package com.netflix.zuul.message.http; +import com.google.common.base.Strings; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.Iterables; import com.google.common.collect.ListMultimap; -import org.apache.commons.lang3.StringUtils; - import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.net.URLEncoder; -import java.util.*; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.StringTokenizer; /** * User: michaels @@ -78,7 +82,7 @@ public static HttpQueryParams parse(String queryString) { queryParams.add(name, value); // respect trailing equals for key-only params - if (s.endsWith("=") && StringUtils.isBlank(value)) { + if (s.endsWith("=") && value.isEmpty()) { queryParams.setTrailingEquals(name, true); } } @@ -175,7 +179,7 @@ public String toEncodedString() try { for (Map.Entry entry : entries()) { sb.append(URLEncoder.encode(entry.getKey(), "UTF-8")); - if (StringUtils.isNotEmpty(entry.getValue())) { + if (!Strings.isNullOrEmpty(entry.getValue())) { sb.append('='); sb.append(URLEncoder.encode(entry.getValue(), "UTF-8")); } @@ -203,7 +207,7 @@ public String toString() StringBuilder sb = new StringBuilder(); for (Map.Entry entry : entries()) { sb.append(entry.getKey()); - if (StringUtils.isNotEmpty(entry.getValue())) { + if (!Strings.isNullOrEmpty(entry.getValue())) { sb.append('='); sb.append(entry.getValue()); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java index 116a7051..b7d73ad2 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java @@ -38,12 +38,9 @@ import io.perfmark.Link; import io.perfmark.PerfMark; import java.util.concurrent.atomic.AtomicReference; -import java.util.concurrent.atomic.AtomicReferenceArray; -import java.util.function.Consumer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import rx.Observer; -import rx.functions.Action; import rx.functions.Action0; import rx.functions.Action1; import rx.schedulers.Schedulers; diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java index 16c710fa..436c45d8 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java @@ -16,11 +16,18 @@ package com.netflix.zuul.netty.server; +import static com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteEvent; +import static com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteReason; +import static com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteReason.SESSION_COMPLETE; +import static com.netflix.zuul.netty.server.http2.Http2OrHttpHandler.PROTOCOL_NAME; + +import com.netflix.netty.common.SourceAddressChannelHandler; +import com.netflix.netty.common.ssl.SslHandshakeInfo; import com.netflix.netty.common.throttle.RejectionUtils; +import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.context.Debug; import com.netflix.zuul.context.SessionContext; import com.netflix.zuul.context.SessionContextDecorator; -import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.exception.ZuulException; import com.netflix.zuul.message.Headers; import com.netflix.zuul.message.http.HttpQueryParams; @@ -31,7 +38,6 @@ import com.netflix.zuul.netty.server.ssl.SslHandshakeInfoHandler; import com.netflix.zuul.passport.CurrentPassport; import com.netflix.zuul.passport.PassportState; -import com.netflix.zuul.stats.status.StatusCategory; import com.netflix.zuul.stats.status.StatusCategoryUtils; import com.netflix.zuul.stats.status.ZuulStatusCategory; import com.netflix.zuul.util.HttpUtils; @@ -42,24 +48,25 @@ import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelPromise; import io.netty.channel.unix.Errors; -import io.netty.handler.codec.TooLongFrameException; import io.netty.handler.codec.haproxy.HAProxyMessage; -import io.netty.handler.codec.http.*; +import io.netty.handler.codec.http.DefaultFullHttpRequest; +import io.netty.handler.codec.http.DefaultFullHttpResponse; +import io.netty.handler.codec.http.DefaultLastHttpContent; +import io.netty.handler.codec.http.HttpContent; +import io.netty.handler.codec.http.HttpHeaderNames; +import io.netty.handler.codec.http.HttpRequest; +import io.netty.handler.codec.http.HttpResponse; +import io.netty.handler.codec.http.HttpResponseStatus; +import io.netty.handler.codec.http.HttpUtil; +import io.netty.handler.codec.http.HttpVersion; +import io.netty.handler.codec.http.LastHttpContent; import io.netty.util.AttributeKey; import io.netty.util.ReferenceCountUtil; -import com.netflix.netty.common.SourceAddressChannelHandler; -import com.netflix.netty.common.ssl.SslHandshakeInfo; import java.net.SocketAddress; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.util.List; import java.util.Map; - -import static com.netflix.zuul.netty.server.http2.Http2OrHttpHandler.PROTOCOL_NAME; -import static com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteEvent; -import static com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteReason; -import static com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteReason.SESSION_COMPLETE; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java b/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java index 0bbfa43a..1371a2be 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java @@ -17,6 +17,7 @@ package com.netflix.zuul.netty.ssl; import com.netflix.config.DynamicBooleanProperty; +import com.netflix.netty.common.ssl.ServerSslConfig; import com.netflix.spectator.api.Id; import com.netflix.spectator.api.Registry; import io.netty.handler.ssl.CipherSuiteFilter; @@ -28,14 +29,10 @@ import io.netty.handler.ssl.SslContextBuilder; import io.netty.handler.ssl.SslProvider; import io.netty.handler.ssl.SupportedCipherSuiteFilter; -import com.netflix.netty.common.ssl.ServerSslConfig; -import org.apache.commons.io.FileUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; +import java.nio.file.Files; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; @@ -46,8 +43,8 @@ import java.util.Enumeration; import java.util.List; import java.util.function.ToDoubleFunction; - -import static org.apache.commons.collections.CollectionUtils.isNotEmpty; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * User: michaels@netflix.com @@ -88,7 +85,7 @@ public SslContextBuilder createBuilderForServer() { .sessionTimeout(serverSslConfig.getSessionTimeout()) .sslProvider(sslProvider); - if (serverSslConfig.getClientAuth() != null && isNotEmpty(trustedCerts)) { + if (serverSslConfig.getClientAuth() != null && trustedCerts != null && !trustedCerts.isEmpty()) { builder = builder .trustManager(trustedCerts.toArray(new X509Certificate[0])) .clientAuth(serverSslConfig.getClientAuth()); @@ -176,7 +173,7 @@ protected ArrayList getTrustedX509Certificates() throws Certifi trustStorePwdBytes = Base64.getDecoder().decode(serverSslConfig.getClientAuthTrustStorePassword()); } else if (serverSslConfig.getClientAuthTrustStorePasswordFile() != null) { - trustStorePwdBytes = FileUtils.readFileToByteArray(serverSslConfig.getClientAuthTrustStorePasswordFile()); + trustStorePwdBytes = Files.readAllBytes(serverSslConfig.getClientAuthTrustStorePasswordFile().toPath()); } else { throw new IllegalArgumentException("Must specify either ClientAuthTrustStorePassword or ClientAuthTrustStorePasswordFile!"); diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java index cf89c0f7..17fe07fa 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java @@ -16,6 +16,11 @@ package com.netflix.zuul.origins; +import static com.netflix.zuul.stats.status.ZuulStatusCategory.FAILURE_ORIGIN; +import static com.netflix.zuul.stats.status.ZuulStatusCategory.FAILURE_ORIGIN_THROTTLED; +import static com.netflix.zuul.stats.status.ZuulStatusCategory.SUCCESS; + +import com.google.common.base.Strings; import com.netflix.client.config.CommonClientConfigKey; import com.netflix.client.config.DefaultClientConfigImpl; import com.netflix.client.config.IClientConfig; @@ -43,15 +48,9 @@ import com.netflix.zuul.stats.status.StatusCategoryUtils; import io.netty.channel.EventLoop; import io.netty.util.concurrent.Promise; -import org.apache.commons.lang3.StringUtils; - import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; -import static com.netflix.zuul.stats.status.ZuulStatusCategory.FAILURE_ORIGIN; -import static com.netflix.zuul.stats.status.ZuulStatusCategory.FAILURE_ORIGIN_THROTTLED; -import static com.netflix.zuul.stats.status.ZuulStatusCategory.SUCCESS; - /** * Netty Origin basic implementation that can be used for most apps, with the more complex methods having no-op * implementations. @@ -144,7 +143,7 @@ public String getIpAddrFromServer(Server server) { DiscoveryEnabledServer discoveryServer = (DiscoveryEnabledServer) server; if (discoveryServer.getInstanceInfo() != null) { String ip = discoveryServer.getInstanceInfo().getIPAddr(); - if (StringUtils.isNotBlank(ip)) { + if (!Strings.isNullOrEmpty(ip)) { return ip; } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/stats/ZuulEvent.java b/zuul-core/src/main/java/com/netflix/zuul/stats/ZuulEvent.java deleted file mode 100644 index 2b46f833..00000000 --- a/zuul-core/src/main/java/com/netflix/zuul/stats/ZuulEvent.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2018 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.netflix.zuul.stats; - -import org.json.JSONException; -import org.json.JSONObject; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -/** - * An event that can be published to an NFEventPublisher and consumed by an NFEventListener, - * defined by String key-value pairs. - * - * @author mhawthorne - */ -public class ZuulEvent { - - - private static final Logger LOG = LoggerFactory.getLogger(ZuulEvent.class); - - - private static final String TYPE_KEY = "type"; - - private final JSONObject json; - - public ZuulEvent() { - this(new JSONObject()); - } - - public ZuulEvent(JSONObject json) { - this.json = json; - } - - @Deprecated - public ZuulEvent setAttribute(String key, String value) { - return this.set(key, value); - } - - public ZuulEvent set(String key, Object value) { - try { - this.json.put(key, value); - } catch (JSONException e) { - throw new IllegalStateException(e); - } - return this; - } - - public Object get(String key) { - if(!this.has(key)) { - return null; - } - - try { - return this.json.get(key); - } catch (JSONException e) { - LOG.debug(e.getMessage(),e); - return null; - } - } - - public boolean has(String key) { - return this.json.has(key); - } - - public Iterator keys() { - return this.json.keys(); - } - - public JSONObject toJson() { - return this.json; - } - - public Map toMap() { - final Map m = new HashMap(); - for(final Iterator i = this.keys(); i.hasNext();) { - final String key = i.next(); - final Object val = this.get(key); - if (val != null) m.put(key, val); - } - return m; - } - - public Map toStringMap() { - final Map m = new HashMap(); - for(final Iterator i = this.keys(); i.hasNext();) { - final String key = i.next(); - final Object val = this.get(key); - if (val != null) m.put(key, val.toString()); - } - return m; - } - - @Override - public String toString() { - return String.format("%s%s", this.getClass().getSimpleName(), this.json); - } - -} diff --git a/zuul-core/src/main/java/com/netflix/zuul/util/HttpUtils.java b/zuul-core/src/main/java/com/netflix/zuul/util/HttpUtils.java index 183a371c..9f7a13b3 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/util/HttpUtils.java +++ b/zuul-core/src/main/java/com/netflix/zuul/util/HttpUtils.java @@ -15,6 +15,7 @@ */ package com.netflix.zuul.util; +import com.google.common.base.Strings; import com.netflix.zuul.message.Headers; import com.netflix.zuul.message.ZuulMessage; import com.netflix.zuul.message.http.HttpHeaderNames; @@ -22,7 +23,7 @@ import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.http2.Http2StreamChannel; -import org.apache.commons.lang3.StringUtils; +import javax.annotation.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -102,10 +103,15 @@ public static boolean acceptsGzip(Headers headers) { * @param input - decoded header string * @return - clean header string */ - public static String stripMaliciousHeaderChars(String input) - { + public static String stripMaliciousHeaderChars(@Nullable String input) { + if (input == null) { + return null; + } + // TODO(carl-mastrangelo): implement this more efficiently. for (char c : MALICIOUS_HEADER_CHARS) { - input = StringUtils.remove(input, c); + if (input.indexOf(c) != -1) { + input = input.replace(Character.toString(c), ""); + } } return input; } @@ -120,13 +126,13 @@ public static boolean hasNonZeroContentLengthHeader(ZuulMessage msg) public static Integer getContentLengthIfPresent(ZuulMessage msg) { final String contentLengthValue = msg.getHeaders().getFirst(com.netflix.zuul.message.http.HttpHeaderNames.CONTENT_LENGTH); - if (StringUtils.isNotEmpty(contentLengthValue) && StringUtils.isNumeric(contentLengthValue)) { + if (!Strings.isNullOrEmpty(contentLengthValue)) { try { return Integer.valueOf(contentLengthValue); } catch (NumberFormatException e) { LOG.info("Invalid Content-Length header value on request. " + - "value = " + String.valueOf(contentLengthValue)); + "value = {}", contentLengthValue, e); } } return null; @@ -147,7 +153,7 @@ public static boolean hasChunkedTransferEncodingHeader(ZuulMessage msg) { boolean isChunked = false; String teValue = msg.getHeaders().getFirst(com.netflix.zuul.message.http.HttpHeaderNames.TRANSFER_ENCODING); - if (StringUtils.isNotEmpty(teValue)) { + if (!Strings.isNullOrEmpty(teValue)) { isChunked = "chunked".equals(teValue.toLowerCase()); } return isChunked; diff --git a/zuul-core/src/test/java/com/netflix/zuul/filters/common/GZipResponseFilterTest.java b/zuul-core/src/test/java/com/netflix/zuul/filters/common/GZipResponseFilterTest.java index 6f7c2875..478bf55b 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/filters/common/GZipResponseFilterTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/filters/common/GZipResponseFilterTest.java @@ -32,8 +32,8 @@ import io.netty.handler.codec.http.DefaultLastHttpContent; import io.netty.handler.codec.http.HttpContent; import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; import java.util.zip.GZIPInputStream; -import org.apache.commons.io.IOUtils; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -84,9 +84,17 @@ public void prepareResponseBody_NeedsGZipping() throws Exception { hc1.content().readBytes(body, 0, hc1Len); hc2.content().readBytes(body, hc1Len, hc2Len); + String bodyStr; // Check body is a gzipped version of the origin body. - byte[] unzippedBytes = IOUtils.toByteArray(new GZIPInputStream(new ByteArrayInputStream(body))); - String bodyStr = new String(unzippedBytes, "UTF-8"); + try (ByteArrayInputStream bais = new ByteArrayInputStream(body); + GZIPInputStream gzis = new GZIPInputStream(bais); + ByteArrayOutputStream baos = new ByteArrayOutputStream()) { + int b; + while ((b = gzis.read()) != -1) { + baos.write(b); + } + bodyStr = baos.toString("UTF-8"); + } assertEquals("blah", bodyStr); assertEquals("gzip", result.getHeaders().getFirst("Content-Encoding")); diff --git a/zuul-processor/build.gradle b/zuul-processor/build.gradle index 91076c7d..207a7f7e 100644 --- a/zuul-processor/build.gradle +++ b/zuul-processor/build.gradle @@ -1,11 +1,11 @@ apply plugin: "java" dependencies { - implementation("com.google.guava:guava:28.2-jre") + implementation libraries.guava implementation project(":zuul-core") - testCompile 'junit:junit:4.13-rc-1' - testCompile 'com.google.truth:truth:1.0.1' + testImplementation libraries.junit, + libraries.truth testAnnotationProcessor project(":zuul-processor") } diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index e476cb8e..5465e941 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -39,11 +39,8 @@ "locked": "2.9.8" }, "com.google.guava:guava": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "28.2-jre", - "requested": "28.2-jre" + "locked": "28.1-jre", + "requested": "28.1-jre" }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ @@ -105,12 +102,6 @@ ], "locked": "1.17.10" }, - "com.netflix.governator:governator-archaius": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -168,42 +159,18 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-collections:commons-collections": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.2.2" - }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.8" }, - "commons-fileupload:commons-fileupload": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.3" - }, - "commons-io:commons-io": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "4.1.48.Final" }, - "io.netty:netty-codec-haproxy": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -228,78 +195,24 @@ ], "locked": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, - "io.netty:netty-tcnative-boringssl-static": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.0.30.Final" - }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "4.1.48.Final" }, - "io.netty:netty-transport-native-epoll": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, - "io.netty:netty-transport-native-kqueue": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, - "io.perfmark:perfmark-api": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.21.0" - }, "io.reactivex:rxjava": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, - "org.bouncycastle:bcprov-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "2.4.4" }, - "org.json:json": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "20090211" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -324,8 +237,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "28.2-jre", - "requested": "28.2-jre" + "locked": "28.1-jre", + "requested": "28.1-jre" }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ @@ -387,12 +300,6 @@ ], "locked": "1.17.10" }, - "com.netflix.governator:governator-archaius": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -450,30 +357,12 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-collections:commons-collections": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.2.2" - }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.8" }, - "commons-fileupload:commons-fileupload": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.3" - }, - "commons-io:commons-io": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -510,12 +399,6 @@ ], "locked": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -552,18 +435,6 @@ ], "locked": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -576,12 +447,6 @@ ], "locked": "2.4.4" }, - "org.json:json": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "20090211" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -632,8 +497,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "28.2-jre", - "requested": "28.2-jre" + "locked": "28.1-jre", + "requested": "28.1-jre" }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ @@ -695,12 +560,6 @@ ], "locked": "1.17.10" }, - "com.netflix.governator:governator-archaius": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -758,30 +617,12 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-collections:commons-collections": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.2.2" - }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.8" }, - "commons-fileupload:commons-fileupload": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.3" - }, - "commons-io:commons-io": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -818,12 +659,6 @@ ], "locked": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -860,18 +695,6 @@ ], "locked": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -884,12 +707,6 @@ ], "locked": "2.4.4" }, - "org.json:json": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "20090211" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -915,7 +732,7 @@ "com.netflix.zuul:zuul-core", "com.netflix.zuul:zuul-processor" ], - "locked": "28.2-jre" + "locked": "28.1-jre" }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ @@ -977,12 +794,6 @@ ], "locked": "1.17.10" }, - "com.netflix.governator:governator-archaius": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1046,30 +857,12 @@ "com.netflix.zuul:zuul-processor": { "project": true }, - "commons-collections:commons-collections": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.2.2" - }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.8" }, - "commons-fileupload:commons-fileupload": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.3" - }, - "commons-io:commons-io": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1106,12 +899,6 @@ ], "locked": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1148,18 +935,6 @@ ], "locked": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1172,12 +947,6 @@ ], "locked": "2.4.4" }, - "org.json:json": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "20090211" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1209,14 +978,6 @@ "com.google.inject:guice": { "locked": "4.2.2", "requested": "4.2.2" - }, - "com.google.truth:truth": { - "locked": "1.0.1", - "requested": "1.0.1" - }, - "junit:junit": { - "locked": "4.13-rc-1", - "requested": "4.13-rc-1" } }, "testCompileClasspath": { @@ -1233,11 +994,8 @@ "locked": "2.9.8" }, "com.google.guava:guava": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "28.2-jre", - "requested": "28.2-jre" + "locked": "28.1-jre", + "requested": "28.1-jre" }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ @@ -1303,12 +1061,6 @@ ], "locked": "1.17.10" }, - "com.netflix.governator:governator-archaius": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1366,42 +1118,18 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-collections:commons-collections": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.2.2" - }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.8" }, - "commons-fileupload:commons-fileupload": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.3" - }, - "commons-io:commons-io": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "4.1.48.Final" }, - "io.netty:netty-codec-haproxy": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1426,42 +1154,12 @@ ], "locked": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, - "io.netty:netty-tcnative-boringssl-static": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.0.30.Final" - }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "4.1.48.Final" }, - "io.netty:netty-transport-native-epoll": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, - "io.netty:netty-transport-native-kqueue": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, - "io.perfmark:perfmark-api": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.21.0" - }, "io.reactivex:rxjava": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1469,26 +1167,8 @@ "locked": "1.2.1" }, "junit:junit": { - "locked": "4.13-rc-1", - "requested": "4.13-rc-1" - }, - "org.apache.commons:commons-lang3": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, - "org.bouncycastle:bcprov-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" + "locked": "4.13", + "requested": "4.13" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -1496,12 +1176,6 @@ ], "locked": "2.4.4" }, - "org.json:json": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "20090211" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1533,14 +1207,6 @@ "com.google.inject:guice": { "locked": "4.2.2", "requested": "4.2.2" - }, - "com.google.truth:truth": { - "locked": "1.0.1", - "requested": "1.0.1" - }, - "junit:junit": { - "locked": "4.13-rc-1", - "requested": "4.13-rc-1" } }, "testRuntimeClasspath": { @@ -1560,8 +1226,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "28.2-jre", - "requested": "28.2-jre" + "locked": "28.1-jre", + "requested": "28.1-jre" }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ @@ -1627,12 +1293,6 @@ ], "locked": "1.17.10" }, - "com.netflix.governator:governator-archaius": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1690,30 +1350,12 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-collections:commons-collections": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.2.2" - }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.8" }, - "commons-fileupload:commons-fileupload": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.3" - }, - "commons-io:commons-io": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1750,12 +1392,6 @@ ], "locked": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1793,20 +1429,8 @@ "locked": "1.2.1" }, "junit:junit": { - "locked": "4.13-rc-1", - "requested": "4.13-rc-1" - }, - "org.apache.commons:commons-lang3": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" + "locked": "4.13", + "requested": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ @@ -1820,12 +1444,6 @@ ], "locked": "2.4.4" }, - "org.json:json": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "20090211" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index fd1e2b88..30722330 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -17,7 +17,7 @@ "com.netflix.zuul:zuul-core", "com.netflix.zuul:zuul-processor" ], - "locked": "28.2-jre" + "locked": "28.1-jre" }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ @@ -79,12 +79,6 @@ ], "locked": "1.17.10" }, - "com.netflix.governator:governator-archaius": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -148,30 +142,12 @@ "com.netflix.zuul:zuul-processor": { "project": true }, - "commons-collections:commons-collections": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.2.2" - }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.8" }, - "commons-fileupload:commons-fileupload": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.3" - }, - "commons-io:commons-io": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -208,12 +184,6 @@ ], "locked": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -250,18 +220,6 @@ ], "locked": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -274,12 +232,6 @@ ], "locked": "2.4.4" }, - "org.json:json": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "20090211" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -366,12 +318,6 @@ ], "locked": "1.17.10" }, - "com.netflix.governator:governator-archaius": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -429,30 +375,12 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-collections:commons-collections": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.2.2" - }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.8" }, - "commons-fileupload:commons-fileupload": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.3" - }, - "commons-io:commons-io": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -489,12 +417,6 @@ ], "locked": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -531,18 +453,6 @@ ], "locked": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -555,12 +465,6 @@ ], "locked": "2.4.4" }, - "org.json:json": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "20090211" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -581,12 +485,6 @@ ], "locked": "2.9.8" }, - "com.google.guava:guava": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "28.1-jre" - }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -647,12 +545,6 @@ ], "locked": "1.17.10" }, - "com.netflix.governator:governator-archaius": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -710,42 +602,18 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-collections:commons-collections": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.2.2" - }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.8" }, - "commons-fileupload:commons-fileupload": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.3" - }, - "commons-io:commons-io": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "4.1.48.Final" }, - "io.netty:netty-codec-haproxy": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -770,78 +638,24 @@ ], "locked": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, - "io.netty:netty-tcnative-boringssl-static": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.0.30.Final" - }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "4.1.48.Final" }, - "io.netty:netty-transport-native-epoll": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, - "io.netty:netty-transport-native-kqueue": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, - "io.perfmark:perfmark-api": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.21.0" - }, "io.reactivex:rxjava": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, - "org.bouncycastle:bcprov-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "2.4.4" }, - "org.json:json": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "20090211" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -928,12 +742,6 @@ ], "locked": "1.17.10" }, - "com.netflix.governator:governator-archaius": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -991,30 +799,12 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-collections:commons-collections": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.2.2" - }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.8" }, - "commons-fileupload:commons-fileupload": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.3" - }, - "commons-io:commons-io": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1051,12 +841,6 @@ ], "locked": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1093,12 +877,6 @@ ], "locked": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.4" - }, "org.apache.logging.log4j:log4j-core": { "locked": "2.13.1", "requested": "2.13.1" @@ -1107,12 +885,6 @@ "locked": "2.13.1", "requested": "2.13.1" }, - "org.bouncycastle:bcpg-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1125,12 +897,6 @@ ], "locked": "2.4.4" }, - "org.json:json": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "20090211" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1217,12 +983,6 @@ ], "locked": "1.17.10" }, - "com.netflix.governator:governator-archaius": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1280,30 +1040,12 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-collections:commons-collections": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.2.2" - }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.8" }, - "commons-fileupload:commons-fileupload": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.3" - }, - "commons-io:commons-io": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1340,12 +1082,6 @@ ], "locked": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1382,12 +1118,6 @@ ], "locked": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.4" - }, "org.apache.logging.log4j:log4j-core": { "locked": "2.13.1", "requested": "2.13.1" @@ -1396,12 +1126,6 @@ "locked": "2.13.1", "requested": "2.13.1" }, - "org.bouncycastle:bcpg-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1414,12 +1138,6 @@ ], "locked": "2.4.4" }, - "org.json:json": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "20090211" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1506,12 +1224,6 @@ ], "locked": "1.17.10" }, - "com.netflix.governator:governator-archaius": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1569,30 +1281,12 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-collections:commons-collections": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.2.2" - }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.8" }, - "commons-fileupload:commons-fileupload": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.3" - }, - "commons-io:commons-io": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1629,12 +1323,6 @@ ], "locked": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1671,12 +1359,6 @@ ], "locked": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.4" - }, "org.apache.logging.log4j:log4j-core": { "locked": "2.13.1", "requested": "2.13.1" @@ -1685,12 +1367,6 @@ "locked": "2.13.1", "requested": "2.13.1" }, - "org.bouncycastle:bcpg-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1703,12 +1379,6 @@ ], "locked": "2.4.4" }, - "org.json:json": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "20090211" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1795,12 +1465,6 @@ ], "locked": "1.17.10" }, - "com.netflix.governator:governator-archaius": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1858,30 +1522,12 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-collections:commons-collections": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.2.2" - }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.8" }, - "commons-fileupload:commons-fileupload": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.3" - }, - "commons-io:commons-io": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1918,12 +1564,6 @@ ], "locked": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1960,18 +1600,6 @@ ], "locked": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1984,12 +1612,6 @@ ], "locked": "2.4.4" }, - "org.json:json": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "20090211" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2010,12 +1632,6 @@ ], "locked": "2.9.8" }, - "com.google.guava:guava": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "28.1-jre" - }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2076,12 +1692,6 @@ ], "locked": "1.17.10" }, - "com.netflix.governator:governator-archaius": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2139,42 +1749,18 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-collections:commons-collections": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.2.2" - }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.8" }, - "commons-fileupload:commons-fileupload": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.3" - }, - "commons-io:commons-io": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "4.1.48.Final" }, - "io.netty:netty-codec-haproxy": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2199,78 +1785,24 @@ ], "locked": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, - "io.netty:netty-tcnative-boringssl-static": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.0.30.Final" - }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "4.1.48.Final" }, - "io.netty:netty-transport-native-epoll": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, - "io.netty:netty-transport-native-kqueue": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, - "io.perfmark:perfmark-api": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.21.0" - }, "io.reactivex:rxjava": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.4" - }, - "org.bouncycastle:bcpg-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, - "org.bouncycastle:bcprov-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "2.4.4" }, - "org.json:json": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "20090211" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2357,12 +1889,6 @@ ], "locked": "1.17.10" }, - "com.netflix.governator:governator-archaius": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2420,30 +1946,12 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-collections:commons-collections": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.2.2" - }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.8" }, - "commons-fileupload:commons-fileupload": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.3" - }, - "commons-io:commons-io": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2480,12 +1988,6 @@ ], "locked": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2522,12 +2024,6 @@ ], "locked": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.4" - }, "org.apache.logging.log4j:log4j-core": { "locked": "2.13.1", "requested": "2.13.1" @@ -2536,12 +2032,6 @@ "locked": "2.13.1", "requested": "2.13.1" }, - "org.bouncycastle:bcpg-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2554,12 +2044,6 @@ ], "locked": "2.4.4" }, - "org.json:json": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "20090211" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2646,12 +2130,6 @@ ], "locked": "1.17.10" }, - "com.netflix.governator:governator-archaius": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2709,30 +2187,12 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-collections:commons-collections": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.2.2" - }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], "locked": "1.8" }, - "commons-fileupload:commons-fileupload": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.3" - }, - "commons-io:commons-io": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2769,12 +2229,6 @@ ], "locked": "4.1.48.Final" }, - "io.netty:netty-resolver": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.1.48.Final" - }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2811,12 +2265,6 @@ ], "locked": "1.2.1" }, - "org.apache.commons:commons-lang3": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "3.4" - }, "org.apache.logging.log4j:log4j-core": { "locked": "2.13.1", "requested": "2.13.1" @@ -2825,12 +2273,6 @@ "locked": "2.13.1", "requested": "2.13.1" }, - "org.bouncycastle:bcpg-jdk15on": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.64" - }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -2843,12 +2285,6 @@ ], "locked": "2.4.4" }, - "org.json:json": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "20090211" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" diff --git a/zuul-sample/src/main/groovy/com/netflix/zuul/sample/filters/inbound/Routes.groovy b/zuul-sample/src/main/groovy/com/netflix/zuul/sample/filters/inbound/Routes.groovy index 7b58eb9e..03db3cf2 100644 --- a/zuul-sample/src/main/groovy/com/netflix/zuul/sample/filters/inbound/Routes.groovy +++ b/zuul-sample/src/main/groovy/com/netflix/zuul/sample/filters/inbound/Routes.groovy @@ -17,9 +17,9 @@ package com.netflix.zuul.sample.filters.inbound import com.netflix.zuul.context.SessionContext +import com.netflix.zuul.filters.endpoint.ProxyEndpoint import com.netflix.zuul.filters.http.HttpInboundSyncFilter import com.netflix.zuul.message.http.HttpRequestMessage -import com.netflix.zuul.netty.filter.ZuulEndPointRunner import com.netflix.zuul.sample.filters.endpoint.Healthcheck /** @@ -51,7 +51,7 @@ class Routes extends HttpInboundSyncFilter { context.setEndpoint(Healthcheck.class.getCanonicalName()) } else { - context.setEndpoint(ZuulEndPointRunner.PROXY_ENDPOINT_FILTER_NAME); + context.setEndpoint(ProxyEndpoint.class.getCanonicalName()); context.setRouteVIP("api") } From 36c8e4f2e6d463b30b4cd0e0bc99366d4ba8e166 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 2 Apr 2020 10:09:29 -0700 Subject: [PATCH 032/273] zuul-core: user sorted set on FilterLoader, and accept set on StaticFilterLoader --- zuul-core/build.gradle | 3 +- zuul-core/dependencies.lock | 8 +++ .../com/netflix/zuul/DynamicFilterLoader.java | 26 +++++----- .../java/com/netflix/zuul/FilterLoader.java | 9 +++- .../com/netflix/zuul/StaticFilterLoader.java | 27 ++++++---- .../server/BaseZuulChannelInitializer.java | 8 +-- .../netflix/zuul/DynamicFilterLoaderTest.java | 4 +- .../netflix/zuul/StaticFilterLoaderTest.java | 52 ++++++++++++++----- 8 files changed, 91 insertions(+), 46 deletions(-) diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index 70f74725..197d24d6 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -44,7 +44,8 @@ dependencies { implementation 'io.perfmark:perfmark-api:0.21.0' testCompile "com.netflix.governator:governator-test-junit:1.+" - testImplementation libraries.junit + testImplementation libraries.junit, + libraries.truth testRuntimeOnly 'org.slf4j:slf4j-simple:1.7.29' } diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 774449db..a555356a 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -768,6 +768,10 @@ "locked": "4.2.2", "requested": "4.2.2" }, + "com.google.truth:truth": { + "locked": "1.0.1", + "requested": "1.0.1" + }, "com.netflix.archaius:archaius-core": { "locked": "0.7.5", "requested": "0.7.5" @@ -1020,6 +1024,10 @@ "locked": "4.2.2", "requested": "4.2.2" }, + "com.google.truth:truth": { + "locked": "1.0.1", + "requested": "1.0.1" + }, "com.netflix.archaius:archaius-core": { "locked": "0.7.6", "requested": "0.7.5" diff --git a/zuul-core/src/main/java/com/netflix/zuul/DynamicFilterLoader.java b/zuul-core/src/main/java/com/netflix/zuul/DynamicFilterLoader.java index fa0c3f26..db3928bf 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/DynamicFilterLoader.java +++ b/zuul-core/src/main/java/com/netflix/zuul/DynamicFilterLoader.java @@ -25,8 +25,9 @@ import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Collections; -import java.util.Comparator; import java.util.List; +import java.util.SortedSet; +import java.util.TreeSet; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import javax.inject.Inject; @@ -41,7 +42,7 @@ public final class DynamicFilterLoader implements FilterLoader { private final ConcurrentMap filterClassLastModified = new ConcurrentHashMap<>(); private final ConcurrentMap filterClassCode = new ConcurrentHashMap<>(); private final ConcurrentMap filterCheck = new ConcurrentHashMap<>(); - private final ConcurrentMap>> hashFiltersByType = new ConcurrentHashMap<>(); + private final ConcurrentMap>> hashFiltersByType = new ConcurrentHashMap<>(); private final ConcurrentMap> filtersByNameAndType = new ConcurrentHashMap<>(); private final FilterRegistry filterRegistry; @@ -148,8 +149,8 @@ private void putFilter(String filterName, ZuulFilter filter, long lastModi LOG.warn("Filter registry is not mutable, discarding {}", filterName); return; } - List> list = hashFiltersByType.get(filter.filterType()); - if (list != null) { + SortedSet> set = hashFiltersByType.get(filter.filterType()); + if (set != null) { hashFiltersByType.remove(filter.filterType()); //rebuild this list } @@ -193,23 +194,20 @@ private void putFilter(String filterName, ZuulFilter filter, long lastModi * Returns a list of filters by the filterType specified */ @Override - public List> getFiltersByType(FilterType filterType) { - List> list = hashFiltersByType.get(filterType); - if (list != null) return list; + public SortedSet> getFiltersByType(FilterType filterType) { + SortedSet> set = hashFiltersByType.get(filterType); + if (set != null) return set; - list = new ArrayList<>(); + set = new TreeSet<>(FILTER_COMPARATOR); for (ZuulFilter filter : filterRegistry.getAllFilters()) { if (filter.filterType().equals(filterType)) { - list.add(filter); + set.add(filter); } } - // Sort by filterOrder. - list.sort(Comparator.comparingInt(ZuulFilter::filterOrder)); - - hashFiltersByType.putIfAbsent(filterType, list); - return Collections.unmodifiableList(list); + hashFiltersByType.putIfAbsent(filterType, set); + return Collections.unmodifiableSortedSet(set); } @Override diff --git a/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java b/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java index 98195afc..5338bbe7 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java +++ b/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java @@ -18,7 +18,9 @@ import com.netflix.zuul.filters.FilterType; import com.netflix.zuul.filters.ZuulFilter; import java.io.File; +import java.util.Comparator; import java.util.List; +import java.util.SortedSet; /** * This class is one of the core classes in Zuul. It compiles, loads from a File, and checks if source code changed. @@ -48,9 +50,12 @@ public interface FilterLoader { ZuulFilter putFilterForClassName(String className) throws Exception; /** - * Returns a list of filters by the filterType specified. + * Returns a sorted set of filters by the filterType specified. */ - List> getFiltersByType(FilterType filterType); + SortedSet> getFiltersByType(FilterType filterType); ZuulFilter getFilterByNameAndType(String name, FilterType type); + + Comparator> FILTER_COMPARATOR = + Comparator.>comparingInt(ZuulFilter::filterOrder).thenComparing(ZuulFilter::filterName); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/StaticFilterLoader.java b/zuul-core/src/main/java/com/netflix/zuul/StaticFilterLoader.java index 17d8653d..192991be 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/StaticFilterLoader.java +++ b/zuul-core/src/main/java/com/netflix/zuul/StaticFilterLoader.java @@ -16,10 +16,12 @@ package com.netflix.zuul; +import com.google.errorprone.annotations.DoNotCall; import com.netflix.zuul.filters.FilterType; import com.netflix.zuul.filters.ZuulFilter; import java.io.File; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.EnumMap; @@ -27,6 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.Set; +import java.util.SortedSet; +import java.util.TreeSet; import javax.annotation.Nullable; import javax.inject.Inject; @@ -35,18 +40,18 @@ */ public final class StaticFilterLoader implements FilterLoader { - private final Map>> filtersByType; + private final Map>> filtersByType; private final Map>> filtersByTypeAndName; @Inject public StaticFilterLoader( - FilterFactory filterFactory, List>> filterTypes) { - Map>> filtersByType = new EnumMap<>(FilterType.class); + FilterFactory filterFactory, Set>> filterTypes) { + Map>> filtersByType = new EnumMap<>(FilterType.class); Map>> filtersByName = new EnumMap<>(FilterType.class); for (Class> clz : filterTypes) { try { ZuulFilter f = filterFactory.newInstance(clz); - filtersByType.computeIfAbsent(f.filterType(), k -> new ArrayList<>()).add(f); + filtersByType.computeIfAbsent(f.filterType(), k -> new TreeSet<>(FILTER_COMPARATOR)).add(f); filtersByName.computeIfAbsent(f.filterType(), k -> new HashMap<>()).put(f.filterName(), f); } catch (RuntimeException | Error e) { throw e; @@ -54,37 +59,37 @@ public StaticFilterLoader( throw new RuntimeException(e); } } - Map>> sortedFilters = new EnumMap<>(FilterType.class); - for (Entry>> entry : filtersByType.entrySet()) { - entry.getValue().sort(Comparator.comparingInt(ZuulFilter::filterOrder)); - entry.getValue().trimToSize(); - sortedFilters.put(entry.getKey(), Collections.unmodifiableList(entry.getValue())); + for (Entry>> entry : filtersByType.entrySet()) { + entry.setValue(Collections.unmodifiableSortedSet(entry.getValue())); } Map>> immutableFiltersByName = new EnumMap<>(FilterType.class); for (Entry>> entry : filtersByName.entrySet()) { immutableFiltersByName.put(entry.getKey(), Collections.unmodifiableMap(entry.getValue())); } this.filtersByTypeAndName = Collections.unmodifiableMap(immutableFiltersByName); - this.filtersByType = Collections.unmodifiableMap(sortedFilters); + this.filtersByType = Collections.unmodifiableMap(filtersByType); } @Override + @DoNotCall public boolean putFilter(File file) { throw new UnsupportedOperationException(); } @Override + @DoNotCall public List> putFiltersForClasses(String[] classNames) { throw new UnsupportedOperationException(); } @Override + @DoNotCall public ZuulFilter putFilterForClassName(String className) { throw new UnsupportedOperationException(); } @Override - public List> getFiltersByType(FilterType filterType) { + public SortedSet> getFiltersByType(FilterType filterType) { return filtersByType.get(filterType); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java index aff1fd91..ef429139 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java @@ -68,6 +68,7 @@ import io.netty.util.AttributeKey; import java.util.List; +import java.util.SortedSet; import java.util.concurrent.TimeUnit; import static com.google.common.base.Preconditions.checkNotNull; @@ -356,12 +357,13 @@ protected ZuulFilterChainRunner ZuulFilter [] getFilters(ZuulFilter start, ZuulFilter stop) { - final List> zuulFilters = filterLoader.getFiltersByType(start.filterType()); + final SortedSet> zuulFilters = filterLoader.getFiltersByType(start.filterType()); final ZuulFilter[] filters = new ZuulFilter[zuulFilters.size() + 2]; filters[0] = start; - for (int i=1, j=0; i < filters.length && j < zuulFilters.size(); i++,j++) { + int i = 1; + for (ZuulFilter filter : zuulFilters) { // TODO(carl-mastrangelo): find some way to make this cast not needed. - filters[i] = (ZuulFilter) zuulFilters.get(j); + filters[i++] = (ZuulFilter) filter; } filters[filters.length -1] = stop; return filters; diff --git a/zuul-core/src/test/java/com/netflix/zuul/DynamicFilterLoaderTest.java b/zuul-core/src/test/java/com/netflix/zuul/DynamicFilterLoaderTest.java index 03feb98b..a7299e6a 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/DynamicFilterLoaderTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/DynamicFilterLoaderTest.java @@ -102,10 +102,10 @@ public void testGetFiltersByType() throws Exception { Collection> filters = registry.getAllFilters(); assertEquals(1, filters.size()); - List> list = loader.getFiltersByType(FilterType.INBOUND); + Collection> list = loader.getFiltersByType(FilterType.INBOUND); assertTrue(list != null); assertTrue(list.size() == 1); - ZuulFilter filter = list.get(0); + ZuulFilter filter = list.iterator().next(); assertTrue(filter != null); assertTrue(filter.filterType().equals(FilterType.INBOUND)); } diff --git a/zuul-core/src/test/java/com/netflix/zuul/StaticFilterLoaderTest.java b/zuul-core/src/test/java/com/netflix/zuul/StaticFilterLoaderTest.java index 267c4ac9..d1113023 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/StaticFilterLoaderTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/StaticFilterLoaderTest.java @@ -16,14 +16,15 @@ package com.netflix.zuul; -import static org.junit.Assert.assertEquals; - +import com.google.common.collect.ImmutableSet; +import com.google.common.truth.Truth; import com.netflix.zuul.filters.FilterType; import com.netflix.zuul.filters.ZuulFilter; import com.netflix.zuul.filters.http.HttpInboundSyncFilter; import com.netflix.zuul.message.http.HttpRequestMessage; -import java.util.Arrays; +import java.util.ArrayList; import java.util.List; +import java.util.SortedSet; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -31,30 +32,31 @@ @RunWith(JUnit4.class) public class StaticFilterLoaderTest { - private static final FilterFactory factory = new DefaultFilterFactory(); @Test public void getFiltersByType() { - StaticFilterLoader filterLoader = - new StaticFilterLoader(factory, Arrays.asList(DummyFilter2.class, DummyFilter1.class)); + new StaticFilterLoader(factory, + ImmutableSet.of(DummyFilter2.class, DummyFilter1.class, DummyFilter22.class)); + + SortedSet> filters = filterLoader.getFiltersByType(FilterType.INBOUND); + Truth.assertThat(filters).hasSize(3); + List> filterList = new ArrayList<>(filters); - List> filters = filterLoader.getFiltersByType(FilterType.INBOUND); - assertEquals(2, filters.size()); - // Filters are sorted by order - assertEquals(DummyFilter1.class, filters.get(0).getClass()); - assertEquals(DummyFilter2.class, filters.get(1).getClass()); + Truth.assertThat(filterList.get(0)).isInstanceOf(DummyFilter1.class); + Truth.assertThat(filterList.get(1)).isInstanceOf(DummyFilter2.class); + Truth.assertThat(filterList.get(2)).isInstanceOf(DummyFilter22.class); } @Test public void getFilterByNameAndType() { StaticFilterLoader filterLoader = - new StaticFilterLoader(factory, Arrays.asList(DummyFilter2.class, DummyFilter1.class)); + new StaticFilterLoader(factory, ImmutableSet.of(DummyFilter2.class, DummyFilter1.class)); ZuulFilter filter = filterLoader.getFilterByNameAndType("Robin", FilterType.INBOUND); - assertEquals(DummyFilter2.class, filter.getClass()); + Truth.assertThat(filter).isInstanceOf(DummyFilter2.class); } @Filter(order = 0, type = FilterType.INBOUND) @@ -104,4 +106,28 @@ public HttpRequestMessage apply(HttpRequestMessage input) { return input; } } + + @Filter(order = 1, type = FilterType.INBOUND) + static class DummyFilter22 extends HttpInboundSyncFilter { + + @Override + public String filterName() { + return "Williams"; + } + + @Override + public int filterOrder() { + return 1; + } + + @Override + public boolean shouldFilter(HttpRequestMessage msg) { + return true; + } + + @Override + public HttpRequestMessage apply(HttpRequestMessage input) { + return input; + } + } } From 5565180f5a96a0ed5b01092c273aba14e7bf3543 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 3 Apr 2020 10:58:30 -0700 Subject: [PATCH 033/273] zuul-core: add initial header benchmarks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * zuul-core: add initial header benchmarks ``` Benchmark (count) (nameLength) Mode Cnt Score Error Units HeadersBenchmark.AddHeaders.addHeaders_headerName 0 10 avgt 5 13.235 ± 0.141 ns/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.alloc.rate 0 10 avgt 5 5760.757 ± 81.082 MB/sec HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.alloc.rate.norm 0 10 avgt 5 120.000 ± 0.001 B/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Eden_Space 0 10 avgt 5 5744.278 ± 1085.369 MB/sec HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Eden_Space.norm 0 10 avgt 5 119.652 ± 22.069 B/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Survivor_Space 0 10 avgt 5 0.116 ± 0.165 MB/sec HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Survivor_Space.norm 0 10 avgt 5 0.002 ± 0.003 B/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.count 0 10 avgt 5 71.000 counts HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.time 0 10 avgt 5 46.000 ms HeadersBenchmark.AddHeaders.addHeaders_headerName 1 10 avgt 5 62.569 ± 1.211 ns/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.alloc.rate 1 10 avgt 5 3575.234 ± 59.966 MB/sec HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.alloc.rate.norm 1 10 avgt 5 352.000 ± 0.001 B/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Eden_Space 1 10 avgt 5 3550.663 ± 487.502 MB/sec HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Eden_Space.norm 1 10 avgt 5 349.559 ± 44.697 B/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Survivor_Space 1 10 avgt 5 0.141 ± 0.174 MB/sec HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Survivor_Space.norm 1 10 avgt 5 0.014 ± 0.017 B/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.count 1 10 avgt 5 70.000 counts HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.time 1 10 avgt 5 46.000 ms HeadersBenchmark.AddHeaders.addHeaders_headerName 5 10 avgt 5 217.592 ± 5.030 ns/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.alloc.rate 5 10 avgt 5 2055.443 ± 53.741 MB/sec HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.alloc.rate.norm 5 10 avgt 5 704.000 ± 0.001 B/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Eden_Space 5 10 avgt 5 2070.276 ± 111.870 MB/sec HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Eden_Space.norm 5 10 avgt 5 709.075 ± 30.981 B/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Survivor_Space 5 10 avgt 5 0.125 ± 0.179 MB/sec HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Survivor_Space.norm 5 10 avgt 5 0.043 ± 0.061 B/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.count 5 10 avgt 5 71.000 counts HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.time 5 10 avgt 5 46.000 ms HeadersBenchmark.AddHeaders.addHeaders_headerName 10 10 avgt 5 420.344 ± 54.910 ns/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.alloc.rate 10 10 avgt 5 1730.071 ± 212.700 MB/sec HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.alloc.rate.norm 10 10 avgt 5 1144.000 ± 0.001 B/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Eden_Space 10 10 avgt 5 1730.442 ± 150.538 MB/sec HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Eden_Space.norm 10 10 avgt 5 1144.766 ± 108.126 B/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Survivor_Space 10 10 avgt 5 0.166 ± 0.150 MB/sec HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Survivor_Space.norm 10 10 avgt 5 0.110 ± 0.099 B/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.count 10 10 avgt 5 73.000 counts HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.time 10 10 avgt 5 48.000 ms HeadersBenchmark.AddHeaders.addHeaders_headerName 30 10 avgt 5 1376.939 ± 121.818 ns/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.alloc.rate 30 10 avgt 5 1464.617 ± 126.901 MB/sec HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.alloc.rate.norm 30 10 avgt 5 3176.001 ± 0.001 B/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Eden_Space 30 10 avgt 5 1458.484 ± 91.940 MB/sec HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Eden_Space.norm 30 10 avgt 5 3164.292 ± 390.958 B/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Survivor_Space 30 10 avgt 5 0.199 ± 0.200 MB/sec HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.churn.PS_Survivor_Space.norm 30 10 avgt 5 0.430 ± 0.411 B/op HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.count 30 10 avgt 5 68.000 counts HeadersBenchmark.AddHeaders.addHeaders_headerName:·gc.time 30 10 avgt 5 43.000 ms HeadersBenchmark.AddHeaders.addHeaders_string 0 10 avgt 5 13.310 ± 1.138 ns/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.alloc.rate 0 10 avgt 5 5729.099 ± 462.448 MB/sec HeadersBenchmark.AddHeaders.addHeaders_string:·gc.alloc.rate.norm 0 10 avgt 5 120.000 ± 0.001 B/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Eden_Space 0 10 avgt 5 5776.837 ± 668.533 MB/sec HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Eden_Space.norm 0 10 avgt 5 120.984 ± 5.369 B/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Survivor_Space 0 10 avgt 5 0.129 ± 0.143 MB/sec HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Survivor_Space.norm 0 10 avgt 5 0.003 ± 0.003 B/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.count 0 10 avgt 5 76.000 counts HeadersBenchmark.AddHeaders.addHeaders_string:·gc.time 0 10 avgt 5 48.000 ms HeadersBenchmark.AddHeaders.addHeaders_string 1 10 avgt 5 240.186 ± 11.252 ns/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.alloc.rate 1 10 avgt 5 993.891 ± 45.913 MB/sec HeadersBenchmark.AddHeaders.addHeaders_string:·gc.alloc.rate.norm 1 10 avgt 5 376.000 ± 0.001 B/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Eden_Space 1 10 avgt 5 998.743 ± 107.461 MB/sec HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Eden_Space.norm 1 10 avgt 5 377.854 ± 40.246 B/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Survivor_Space 1 10 avgt 5 0.154 ± 0.121 MB/sec HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Survivor_Space.norm 1 10 avgt 5 0.058 ± 0.045 B/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.count 1 10 avgt 5 72.000 counts HeadersBenchmark.AddHeaders.addHeaders_string:·gc.time 1 10 avgt 5 46.000 ms HeadersBenchmark.AddHeaders.addHeaders_string 5 10 avgt 5 1122.361 ± 33.837 ns/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.alloc.rate 5 10 avgt 5 466.165 ± 14.332 MB/sec HeadersBenchmark.AddHeaders.addHeaders_string:·gc.alloc.rate.norm 5 10 avgt 5 824.000 ± 0.001 B/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Eden_Space 5 10 avgt 5 463.119 ± 48.372 MB/sec HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Eden_Space.norm 5 10 avgt 5 818.664 ± 90.576 B/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Survivor_Space 5 10 avgt 5 0.145 ± 0.186 MB/sec HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Survivor_Space.norm 5 10 avgt 5 0.257 ± 0.332 B/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.count 5 10 avgt 5 69.000 counts HeadersBenchmark.AddHeaders.addHeaders_string:·gc.time 5 10 avgt 5 44.000 ms HeadersBenchmark.AddHeaders.addHeaders_string 10 10 avgt 5 2274.778 ± 47.366 ns/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.alloc.rate 10 10 avgt 5 386.325 ± 9.255 MB/sec HeadersBenchmark.AddHeaders.addHeaders_string:·gc.alloc.rate.norm 10 10 avgt 5 1384.001 ± 0.001 B/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Eden_Space 10 10 avgt 5 386.489 ± 47.807 MB/sec HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Eden_Space.norm 10 10 avgt 5 1384.456 ± 144.856 B/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Survivor_Space 10 10 avgt 5 0.162 ± 0.154 MB/sec HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Survivor_Space.norm 10 10 avgt 5 0.580 ± 0.543 B/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.count 10 10 avgt 5 70.000 counts HeadersBenchmark.AddHeaders.addHeaders_string:·gc.time 10 10 avgt 5 44.000 ms HeadersBenchmark.AddHeaders.addHeaders_string 30 10 avgt 5 6926.132 ± 91.277 ns/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.alloc.rate 30 10 avgt 5 357.382 ± 4.648 MB/sec HeadersBenchmark.AddHeaders.addHeaders_string:·gc.alloc.rate.norm 30 10 avgt 5 3896.003 ± 0.001 B/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Eden_Space 30 10 avgt 5 356.889 ± 25.003 MB/sec HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Eden_Space.norm 30 10 avgt 5 3890.807 ± 312.975 B/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Survivor_Space 30 10 avgt 5 0.158 ± 0.174 MB/sec HeadersBenchmark.AddHeaders.addHeaders_string:·gc.churn.PS_Survivor_Space.norm 30 10 avgt 5 1.720 ± 1.924 B/op HeadersBenchmark.AddHeaders.addHeaders_string:·gc.count 30 10 avgt 5 63.000 counts HeadersBenchmark.AddHeaders.addHeaders_string:·gc.time 30 10 avgt 5 41.000 ms HeadersBenchmark.newHeaders N/A N/A avgt 5 13.160 ± 0.252 ns/op HeadersBenchmark.newHeaders:·gc.alloc.rate N/A N/A avgt 5 5790.750 ± 134.675 MB/sec HeadersBenchmark.newHeaders:·gc.alloc.rate.norm N/A N/A avgt 5 120.000 ± 0.001 B/op HeadersBenchmark.newHeaders:·gc.churn.PS_Eden_Space N/A N/A avgt 5 5799.987 ± 587.873 MB/sec HeadersBenchmark.newHeaders:·gc.churn.PS_Eden_Space.norm N/A N/A avgt 5 120.204 ± 14.045 B/op HeadersBenchmark.newHeaders:·gc.churn.PS_Survivor_Space N/A N/A avgt 5 0.137 ± 0.072 MB/sec HeadersBenchmark.newHeaders:·gc.churn.PS_Survivor_Space.norm N/A N/A avgt 5 0.003 ± 0.001 B/op HeadersBenchmark.newHeaders:·gc.count N/A N/A avgt 5 79.000 counts HeadersBenchmark.newHeaders:·gc.time N/A N/A avgt 5 48.000 ms``` --- build.gradle | 13 +- dependencies.lock | 39 +- zuul-core/build.gradle | 12 + zuul-core/dependencies.lock | 510 +++++++++++++ .../zuul/message/HeadersBenchmark.java | 167 ++++ zuul-processor/dependencies.lock | 711 ++++++++++++++++++ zuul-sample/dependencies.lock | 705 +++++++++++++++++ 7 files changed, 2151 insertions(+), 6 deletions(-) create mode 100644 zuul-core/src/jmh/java/com/netflix/zuul/message/HeadersBenchmark.java diff --git a/build.gradle b/build.gradle index ed33d83c..f7143cd2 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,7 @@ plugins { id 'nebula.netflixoss' version '8.0.0' id 'nebula.dependency-lock' version '8.0.0' id "com.google.osdetector" version "1.6.2" + id "me.champeau.gradle.jmh" version "0.5.0" } ext.githubProjectName = rootProject.name @@ -19,16 +20,18 @@ configurations.all { exclude group: 'asm', module: 'asm-all' } +allprojects { + repositories { + jcenter() + } +} + subprojects { apply plugin: 'nebula.netflixoss' apply plugin: 'java' apply plugin: 'nebula.javadoc-jar' apply plugin: 'nebula.dependency-lock' - - repositories { - jcenter() - mavenLocal() - } + apply plugin: 'me.champeau.gradle.jmh' license { ignoreFailures = false diff --git a/dependencies.lock b/dependencies.lock index 544b7b4d..51c5b634 100644 --- a/dependencies.lock +++ b/dependencies.lock @@ -1,3 +1,40 @@ { - + "jmh": { + "org.openjdk.jmh:jmh-core": { + "locked": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21" + } + }, + "jmhCompileClasspath": { + "org.openjdk.jmh:jmh-core": { + "locked": "1.21", + "requested": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21", + "requested": "1.21" + } + }, + "jmhRuntime": { + "org.openjdk.jmh:jmh-core": { + "locked": "1.21", + "requested": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21", + "requested": "1.21" + } + }, + "jmhRuntimeClasspath": { + "org.openjdk.jmh:jmh-core": { + "locked": "1.21", + "requested": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21", + "requested": "1.21" + } + } } \ No newline at end of file diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index 197d24d6..c7b5a6bc 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -55,3 +55,15 @@ test { showStandardStreams = false } } + +// ./gradlew --no-daemon clean :zuul-core:jmh --stacktrace +jmh { + profilers = ["gc"] + timeOnIteration = "1s" + warmup = "1s" + fork = 1 + warmupIterations = 10 + iterations 5 + // Not sure why duplicate classes are aon the path. Something Nebula related I think. + duplicateClassesStrategy = 'EXCLUDE' +} \ No newline at end of file diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index a555356a..dd978700 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -389,6 +389,516 @@ "requested": "1.7.25" } }, + "jmh": { + "org.openjdk.jmh:jmh-core": { + "locked": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21" + } + }, + "jmhCompileClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "locked": "2.9.8", + "requested": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "locked": "2.9.8", + "requested": "2.9.8" + }, + "com.google.guava:guava": { + "locked": "28.1-jre", + "requested": "28.1-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "locked": "0.7.5", + "requested": "0.7.5" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.18", + "requested": "1.9.18" + }, + "com.netflix.governator:governator": { + "locked": "1.17.10", + "requested": "1.+" + }, + "com.netflix.governator:governator-core": { + "locked": "1.17.10", + "requested": "1.+" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "locked": "0.3.0", + "requested": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.7.17", + "requested": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "locked": "2.7.17", + "requested": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.7.17", + "requested": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "locked": "2.7.17", + "requested": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "locked": "2.7.17", + "requested": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "locked": "0.7.2", + "requested": "0.7.2" + }, + "com.netflix.spectator:spectator-api": { + "locked": "0.103.0", + "requested": "0.103.0" + }, + "commons-configuration:commons-configuration": { + "locked": "1.8", + "requested": "1.8" + }, + "io.netty:netty-buffer": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-codec-haproxy": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-common": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-transport": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-transport-native-epoll": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.perfmark:perfmark-api": { + "locked": "0.21.0", + "requested": "0.21.0" + }, + "io.reactivex:rxjava": { + "locked": "1.2.1", + "requested": "1.2.1" + }, + "org.bouncycastle:bcprov-jdk15on": { + "locked": "1.64", + "requested": "1.+" + }, + "org.codehaus.groovy:groovy-all": { + "locked": "2.4.4", + "requested": "2.4.4" + }, + "org.openjdk.jmh:jmh-core": { + "locked": "1.21", + "requested": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21", + "requested": "1.21" + }, + "org.slf4j:slf4j-api": { + "locked": "1.7.25", + "requested": "1.7.25" + } + }, + "jmhRuntime": { + "com.fasterxml.jackson.core:jackson-core": { + "locked": "2.9.8", + "requested": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "locked": "2.9.8", + "requested": "2.9.8" + }, + "com.google.guava:guava": { + "locked": "28.1-jre", + "requested": "28.1-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.truth:truth": { + "locked": "1.0.1", + "requested": "1.0.1" + }, + "com.netflix.archaius:archaius-core": { + "locked": "0.7.6", + "requested": "0.7.5" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.18", + "requested": "1.9.18" + }, + "com.netflix.governator:governator": { + "locked": "1.17.10", + "requested": "1.+" + }, + "com.netflix.governator:governator-core": { + "locked": "1.17.10", + "requested": "1.+" + }, + "com.netflix.governator:governator-test-junit": { + "locked": "1.17.10", + "requested": "1.+" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "locked": "0.3.0", + "requested": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.7.17", + "requested": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "locked": "2.7.17", + "requested": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.7.17", + "requested": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "locked": "2.7.17", + "requested": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "locked": "2.7.17", + "requested": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "locked": "0.12.21", + "requested": "0.7.2" + }, + "com.netflix.spectator:spectator-api": { + "locked": "0.103.0", + "requested": "0.103.0" + }, + "commons-configuration:commons-configuration": { + "locked": "1.8", + "requested": "1.8" + }, + "io.netty:netty-buffer": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-codec-haproxy": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-common": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "locked": "2.0.30.Final", + "requested": "2.0.30.Final" + }, + "io.netty:netty-transport": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-transport-native-epoll": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.perfmark:perfmark-api": { + "locked": "0.21.0", + "requested": "0.21.0" + }, + "io.reactivex:rxjava": { + "locked": "1.2.1", + "requested": "1.2.1" + }, + "junit:junit": { + "locked": "4.13", + "requested": "4.13" + }, + "org.bouncycastle:bcprov-jdk15on": { + "locked": "1.64", + "requested": "1.+" + }, + "org.codehaus.groovy:groovy-all": { + "locked": "2.4.4", + "requested": "2.4.4" + }, + "org.openjdk.jmh:jmh-core": { + "locked": "1.21", + "requested": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21", + "requested": "1.21" + }, + "org.slf4j:slf4j-api": { + "locked": "1.7.30", + "requested": "1.7.25" + }, + "org.slf4j:slf4j-simple": { + "locked": "1.7.29", + "requested": "1.7.29" + } + }, + "jmhRuntimeClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "locked": "2.9.8", + "requested": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "locked": "2.9.8", + "requested": "2.9.8" + }, + "com.google.guava:guava": { + "locked": "28.1-jre", + "requested": "28.1-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.truth:truth": { + "locked": "1.0.1", + "requested": "1.0.1" + }, + "com.netflix.archaius:archaius-core": { + "locked": "0.7.6", + "requested": "0.7.5" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.18", + "requested": "1.9.18" + }, + "com.netflix.governator:governator": { + "locked": "1.17.10", + "requested": "1.+" + }, + "com.netflix.governator:governator-core": { + "locked": "1.17.10", + "requested": "1.+" + }, + "com.netflix.governator:governator-test-junit": { + "locked": "1.17.10", + "requested": "1.+" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "locked": "0.3.0", + "requested": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.7.17", + "requested": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "locked": "2.7.17", + "requested": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.7.17", + "requested": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "locked": "2.7.17", + "requested": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "locked": "2.7.17", + "requested": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "locked": "0.12.21", + "requested": "0.7.2" + }, + "com.netflix.spectator:spectator-api": { + "locked": "0.103.0", + "requested": "0.103.0" + }, + "commons-configuration:commons-configuration": { + "locked": "1.8", + "requested": "1.8" + }, + "io.netty:netty-buffer": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-codec-haproxy": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-common": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "locked": "2.0.30.Final", + "requested": "2.0.30.Final" + }, + "io.netty:netty-transport": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-transport-native-epoll": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "locked": "4.1.48.Final", + "requested": "4.1.48.Final" + }, + "io.perfmark:perfmark-api": { + "locked": "0.21.0", + "requested": "0.21.0" + }, + "io.reactivex:rxjava": { + "locked": "1.2.1", + "requested": "1.2.1" + }, + "junit:junit": { + "locked": "4.13", + "requested": "4.13" + }, + "org.bouncycastle:bcprov-jdk15on": { + "locked": "1.64", + "requested": "1.+" + }, + "org.codehaus.groovy:groovy-all": { + "locked": "2.4.4", + "requested": "2.4.4" + }, + "org.openjdk.jmh:jmh-core": { + "locked": "1.21", + "requested": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21", + "requested": "1.21" + }, + "org.slf4j:slf4j-api": { + "locked": "1.7.30", + "requested": "1.7.25" + }, + "org.slf4j:slf4j-simple": { + "locked": "1.7.29", + "requested": "1.7.29" + } + }, "runtime": { "com.fasterxml.jackson.core:jackson-core": { "locked": "2.9.8", diff --git a/zuul-core/src/jmh/java/com/netflix/zuul/message/HeadersBenchmark.java b/zuul-core/src/jmh/java/com/netflix/zuul/message/HeadersBenchmark.java new file mode 100644 index 00000000..74881051 --- /dev/null +++ b/zuul-core/src/jmh/java/com/netflix/zuul/message/HeadersBenchmark.java @@ -0,0 +1,167 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.netflix.zuul.message; + +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ThreadLocalRandom; +import java.util.concurrent.TimeUnit; +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Param; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.infra.Blackhole; + + +@State(Scope.Thread) +public class HeadersBenchmark { + + @State(Scope.Thread) + public static class AddHeaders { + @Param({"0", "1", "5", "10", "30"}) + public int count; + + @Param({"10"}) + public int nameLength; + + private String[] stringNames; + private HeaderName[] names; + private String[] values; + + @Setup + public void setUp() { + stringNames = new String[count]; + names = new HeaderName[stringNames.length]; + values = new String[stringNames.length]; + for (int i = 0; i < stringNames.length; i++) { + UUID uuid = new UUID(ThreadLocalRandom.current().nextLong(), ThreadLocalRandom.current().nextLong()); + String name = uuid.toString(); + assert name.length() >= nameLength; + name = name.substring(0, nameLength); + names[i] = new HeaderName(name); + stringNames[i] = name; + values[i] = name; + } + } + + @Benchmark + @BenchmarkMode(Mode.AverageTime) + @OutputTimeUnit(TimeUnit.NANOSECONDS) + public Headers addHeaders_string() { + Headers headers = new Headers(); + for (int i = 0; i < count; i++) { + headers.add(stringNames[i], values[i]); + } + return headers; + } + + @Benchmark + @BenchmarkMode(Mode.AverageTime) + @OutputTimeUnit(TimeUnit.NANOSECONDS) + public Headers addHeaders_headerName() { + Headers headers = new Headers(); + for (int i = 0; i < count; i++) { + headers.add(names[i], values[i]); + } + return headers; + } + } + + + @State(Scope.Thread) + public static class GetSetHeaders { + @Param({"1", "5", "10", "30"}) + public int count; + + @Param({"10"}) + public int nameLength; + + private String[] stringNames; + private HeaderName[] names; + private String[] values; + Headers headers; + + @Setup + public void setUp() { + headers = new Headers(); + stringNames = new String[count]; + names = new HeaderName[stringNames.length]; + values = new String[stringNames.length]; + for (int i = 0; i < stringNames.length; i++) { + UUID uuid = new UUID(ThreadLocalRandom.current().nextLong(), ThreadLocalRandom.current().nextLong()); + String name = uuid.toString(); + assert name.length() >= nameLength; + name = name.substring(0, nameLength); + names[i] = new HeaderName(name); + stringNames[i] = name; + values[i] = name; + headers.add(names[i], values[i]); + } + } + + @Benchmark + @BenchmarkMode(Mode.AverageTime) + @OutputTimeUnit(TimeUnit.NANOSECONDS) + public void setHeader_first() { + headers.set(names[0], "blah"); + } + + @Benchmark + @BenchmarkMode(Mode.AverageTime) + @OutputTimeUnit(TimeUnit.NANOSECONDS) + public void setHeader_last() { + headers.set(names[count - 1], "blah"); + } + + @Benchmark + @BenchmarkMode(Mode.AverageTime) + @OutputTimeUnit(TimeUnit.NANOSECONDS) + public List getHeader_first() { + return headers.get(names[0]); + } + + @Benchmark + @BenchmarkMode(Mode.AverageTime) + @OutputTimeUnit(TimeUnit.NANOSECONDS) + public List getHeader_last() { + return headers.get(names[count - 1]); + } + + @Benchmark + @BenchmarkMode(Mode.AverageTime) + @OutputTimeUnit(TimeUnit.NANOSECONDS) + public void entries(Blackhole blackhole) { + for (Header header : headers.entries()) { + blackhole.consume(header); + } + } + + + + } + + @Benchmark + @BenchmarkMode(Mode.AverageTime) + @OutputTimeUnit(TimeUnit.NANOSECONDS) + public Headers newHeaders() { + return new Headers(); + } + +} \ No newline at end of file diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 5465e941..4c213c35 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -454,6 +454,717 @@ "locked": "1.7.30" } }, + "jmh": { + "org.openjdk.jmh:jmh-core": { + "locked": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21" + } + }, + "jmhCompileClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "locked": "28.1-jre", + "requested": "28.1-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.5" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.2" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.openjdk.jmh:jmh-core": { + "locked": "1.21", + "requested": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21", + "requested": "1.21" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "jmhRuntime": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.1-jre", + "requested": "28.1-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.truth:truth": { + "locked": "1.0.1", + "requested": "1.0.1" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.30.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.21.0" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "locked": "4.13", + "requested": "4.13" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.openjdk.jmh:jmh-core": { + "locked": "1.21", + "requested": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21", + "requested": "1.21" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.30" + } + }, + "jmhRuntimeClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.1-jre", + "requested": "28.1-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.truth:truth": { + "locked": "1.0.1", + "requested": "1.0.1" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.30.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.21.0" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "locked": "4.13", + "requested": "4.13" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.openjdk.jmh:jmh-core": { + "locked": "1.21", + "requested": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21", + "requested": "1.21" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.30" + } + }, "runtime": { "com.google.inject.extensions:guice-assistedinject": { "locked": "4.2.2", diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 30722330..4538bf30 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -904,6 +904,711 @@ "locked": "1.7.30" } }, + "jmh": { + "org.openjdk.jmh:jmh-core": { + "locked": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21" + } + }, + "jmhCompileClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.5" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.2" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.openjdk.jmh:jmh-core": { + "locked": "1.21", + "requested": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21", + "requested": "1.21" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "jmhRuntime": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.1-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.30.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.21.0" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "org.apache.logging.log4j:log4j-core": { + "locked": "2.13.1", + "requested": "2.13.1" + }, + "org.apache.logging.log4j:log4j-slf4j-impl": { + "locked": "2.13.1", + "requested": "2.13.1" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.openjdk.jmh:jmh-core": { + "locked": "1.21", + "requested": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21", + "requested": "1.21" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.30" + } + }, + "jmhRuntimeClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.1-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.30.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.21.0" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "org.apache.logging.log4j:log4j-core": { + "locked": "2.13.1", + "requested": "2.13.1" + }, + "org.apache.logging.log4j:log4j-slf4j-impl": { + "locked": "2.13.1", + "requested": "2.13.1" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.openjdk.jmh:jmh-core": { + "locked": "1.21", + "requested": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21", + "requested": "1.21" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.30" + } + }, "runtime": { "com.fasterxml.jackson.core:jackson-core": { "firstLevelTransitive": [ From 0c3c41b50303569f38f471796e691a5e6b6b8029 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 8 Apr 2020 14:03:02 -0700 Subject: [PATCH 034/273] zuul-core: include a filter comparator for classes --- zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java b/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java index 5338bbe7..8dec7122 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java +++ b/zuul-core/src/main/java/com/netflix/zuul/FilterLoader.java @@ -15,6 +15,8 @@ */ package com.netflix.zuul; +import static java.util.Objects.requireNonNull; + import com.netflix.zuul.filters.FilterType; import com.netflix.zuul.filters.ZuulFilter; import java.io.File; @@ -58,4 +60,9 @@ public interface FilterLoader { Comparator> FILTER_COMPARATOR = Comparator.>comparingInt(ZuulFilter::filterOrder).thenComparing(ZuulFilter::filterName); + + Comparator>> FILTER_CLASS_COMPARATOR = + Comparator.>>comparingInt( + c -> requireNonNull(c.getAnnotation(Filter.class), () -> "missing annotation: " + c).order()) + .thenComparing(Class::getName); } From 98be110b12e88b0a3a574372ab1450e5e3e5747a Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Wed, 8 Apr 2020 10:33:00 -0700 Subject: [PATCH 035/273] Only add filter execution summary if DEBUG enabled --- .../netty/filter/BaseZuulFilterRunner.java | 22 +++++++++++-------- .../outbound/ZuulResponseFilter.groovy | 13 ++++++----- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java index b7d73ad2..56e9d547 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java @@ -70,7 +70,7 @@ public abstract class BaseZuulFilterRunner filter, final I inMesg) { if (!isMessageBodyReadyForFilter(filter, inMesg)) { setFilterAwaitingBody(inMesg, true); - LOG.debug("Filter {} waiting for body, UUID {}", filter.filterName(), inMesg.getContext().getUUID()); + logger.debug("Filter {} waiting for body, UUID {}", filter.filterName(), inMesg.getContext().getUUID()); return null; //wait for whole body to be buffered } setFilterAwaitingBody(inMesg, false); @@ -312,10 +312,10 @@ protected void recordFilterError(final I inMesg, final ZuulFilter filter, final String errorMsg = "Filter Exception: filter=" + filter.filterName() + ", request-info=" + inMesg.getInfoForLogging() + ", msg=" + String.valueOf(t.getMessage()); if (t instanceof ZuulException && !((ZuulException) t).shouldLogAsError()) { - LOG.warn(errorMsg); + logger.warn(errorMsg); } else { - LOG.error(errorMsg, t); + logger.error(errorMsg, t); } // Store this filter error for possible future use. But we still continue with next filter in the chain. @@ -334,16 +334,20 @@ protected void recordFilterCompletion(final ExecutionStatus status, final ZuulFi final long execTimeNs = System.nanoTime() - startTime; final long execTimeMs = execTimeNs / 1_000_000L; if (execTimeMs >= FILTER_EXCESSIVE_EXEC_TIME.get()) { - LOG.warn("Filter {} took {} ms to complete! status = {}", filter.filterName(), execTimeMs, status.name()); + logger.warn("Filter {} took {} ms to complete! status = {}", filter.filterName(), execTimeMs, status.name()); } // Record the execution summary in context. switch (status) { case FAILED: - zuulCtx.addFilterExecutionSummary(filter.filterName(), FAILED.name(), execTimeMs); + if (logger.isDebugEnabled()) { + zuulCtx.addFilterExecutionSummary(filter.filterName(), FAILED.name(), execTimeMs); + } break; case SUCCESS: - zuulCtx.addFilterExecutionSummary(filter.filterName(), SUCCESS.name(), execTimeMs); + if (logger.isDebugEnabled()) { + zuulCtx.addFilterExecutionSummary(filter.filterName(), SUCCESS.name(), execTimeMs); + } if (startSnapshot != null) { //debugRouting == true Debug.addRoutingDebug(zuulCtx, "Filter {" + filter.filterName() + " TYPE:" + filter.filterType().toString() @@ -355,7 +359,7 @@ protected void recordFilterCompletion(final ExecutionStatus status, final ZuulFi break; } - LOG.debug("Filter {} completed with status {}, UUID {}", filter.filterName(), status.name(), + logger.debug("Filter {} completed with status {}, UUID {}", filter.filterName(), status.name(), zuulMesg.getContext().getUUID()); // Notify configured listener. usageNotifier.notify(filter, status); @@ -373,7 +377,7 @@ else if (zuulMesg instanceof HttpResponseMessage) { final String path = (zuulReq != null) ? zuulReq.getPathAndQuery() : "-"; final String method = (zuulReq != null) ? zuulReq.getMethod() : "-"; final String errMesg = "Error with filter: " + filterName + ", path: " + path + ", method: " + method; - LOG.error(errMesg, ex); + logger.error(errMesg, ex); getChannelHandlerContext(zuulMesg).fireExceptionCaught(ex); } diff --git a/zuul-sample/src/main/groovy/com/netflix/zuul/sample/filters/outbound/ZuulResponseFilter.groovy b/zuul-sample/src/main/groovy/com/netflix/zuul/sample/filters/outbound/ZuulResponseFilter.groovy index 3971dcee..92313b93 100644 --- a/zuul-sample/src/main/groovy/com/netflix/zuul/sample/filters/outbound/ZuulResponseFilter.groovy +++ b/zuul-sample/src/main/groovy/com/netflix/zuul/sample/filters/outbound/ZuulResponseFilter.groovy @@ -39,7 +39,7 @@ import static com.netflix.zuul.constants.ZuulHeaders.* * Date: December 21, 2017 */ class ZuulResponseFilter extends HttpOutboundSyncFilter { - private static final Logger log = LoggerFactory.getLogger(ZuulResponseFilter.class) + private static final Logger logger = LoggerFactory.getLogger(ZuulResponseFilter.class) private static final DynamicBooleanProperty SEND_RESPONSE_HEADERS = new DynamicBooleanProperty("zuul.responseFilter.send.headers", true) @@ -76,7 +76,6 @@ class ZuulResponseFilter extends HttpOutboundSyncFilter { headers.set(X_ZUUL, "zuul") headers.set(X_ZUUL_INSTANCE, System.getenv("EC2_INSTANCE_ID") ?: "unknown") headers.set(CONNECTION, KEEP_ALIVE) - headers.set(X_ZUUL_FILTER_EXECUTION_STATUS, context.getFilterExecutionSummary().toString()) headers.set(X_ORIGINATING_URL, response.getInboundRequest().reconstructURI()) if (response.getStatus() >= 400 && context.getError() != null) { @@ -86,13 +85,17 @@ class ZuulResponseFilter extends HttpOutboundSyncFilter { } if (response.getStatus() >= 500) { - log.info("Passport: {}", CurrentPassport.fromSessionContext(context)) + logger.info("Passport: {}", CurrentPassport.fromSessionContext(context)) + } + + if (logger.isDebugEnabled()) { + logger.debug("Filter execution summary :: {}", context.getFilterExecutionSummary()) } } if (context.debugRequest()) { - Debug.getRequestDebug(context).forEach({ s -> log.info("REQ_DEBUG: " + s) }) - Debug.getRoutingDebug(context).forEach({ s -> log.info("ZUUL_DEBUG: " + s) }) + Debug.getRequestDebug(context).forEach({ s -> logger.info("REQ_DEBUG: " + s) }) + Debug.getRoutingDebug(context).forEach({ s -> logger.info("ZUUL_DEBUG: " + s) }) } return response From 96f905c8f5595318de7f6c4ecedaa274257b44c3 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Wed, 8 Apr 2020 15:58:36 -0700 Subject: [PATCH 036/273] add a flag to disable manual Eureka status management --- .../com/netflix/zuul/netty/server/Server.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java index 11bee844..9b435c64 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java @@ -99,6 +99,9 @@ public class Server private static final DynamicBooleanProperty USE_LEASTCONNS_FOR_EVENTLOOPS = new DynamicBooleanProperty("zuul.server.eventloops.use_leastconns", false); + private static final DynamicBooleanProperty MANUAL_DISCOVERY_STATUS = + new DynamicBooleanProperty("zuul.server.netty.manual.discovery.status", true); + private final EventLoopGroupMetrics eventLoopGroupMetrics; private final Thread jvmShutdownHook = new Thread(this::stop, "Zuul-JVM-shutdown-hook"); @@ -250,8 +253,10 @@ private ChannelFuture setupServerBootstrap( LOG.info("Binding to : " + listenAddress); - // Flag status as UP just before binding to the port. - serverStatusManager.localStatus(InstanceInfo.InstanceStatus.UP); + if (MANUAL_DISCOVERY_STATUS.get()) { + // Flag status as UP just before binding to the port. + serverStatusManager.localStatus(InstanceInfo.InstanceStatus.UP); + } // Bind and start to accept incoming connections. ChannelFuture bindFuture = serverBootstrap.bind(listenAddress); @@ -393,10 +398,11 @@ synchronized private void stop() // TODO(carl-mastrangelo): shutdown the netty servers accepting new connections. nettyServers.clear(); - // Flag status as down. - // TODO - is this _only_ changing the local status? And therefore should we also implement a HealthCheckHandler - // that we can flag to return DOWN here (would that then update Discovery? or still be a delay?) - serverStatusManager.localStatus(InstanceInfo.InstanceStatus.DOWN); + if (MANUAL_DISCOVERY_STATUS.get()) { + // Flag status as down. + // that we can flag to return DOWN here (would that then update Discovery? or still be a delay?) + serverStatusManager.localStatus(InstanceInfo.InstanceStatus.DOWN); + } // Shutdown each of the client connections (blocks until complete). // NOTE: ClientConnectionsShutdown can also be configured to gracefully close connections when the From f089cf44bdd3b0593632723bf785e877734f8f8c Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 8 Apr 2020 18:53:03 -0700 Subject: [PATCH 037/273] zuul-core: re-implement Headers with an array --- .../zuul/message/HeadersBenchmark.java | 4 +- .../java/com/netflix/zuul/message/Header.java | 38 +- .../com/netflix/zuul/message/HeaderName.java | 68 +-- .../com/netflix/zuul/message/Headers.java | 540 ++++++++++++------ .../netflix/zuul/message/ZuulMessageImpl.java | 2 +- .../zuul/message/http/HttpHeaderNames.java | 2 +- .../message/http/HttpRequestMessageImpl.java | 8 +- .../message/http/HttpResponseMessageImpl.java | 14 +- .../com/netflix/zuul/context/DebugTest.java | 59 +- .../common/GZipResponseFilterTest.java | 2 +- .../com/netflix/zuul/message/HeadersTest.java | 401 ++++++++++++- 11 files changed, 872 insertions(+), 266 deletions(-) diff --git a/zuul-core/src/jmh/java/com/netflix/zuul/message/HeadersBenchmark.java b/zuul-core/src/jmh/java/com/netflix/zuul/message/HeadersBenchmark.java index 74881051..b4a03e45 100644 --- a/zuul-core/src/jmh/java/com/netflix/zuul/message/HeadersBenchmark.java +++ b/zuul-core/src/jmh/java/com/netflix/zuul/message/HeadersBenchmark.java @@ -134,14 +134,14 @@ public void setHeader_last() { @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public List getHeader_first() { - return headers.get(names[0]); + return headers.getAll(names[0]); } @Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public List getHeader_last() { - return headers.get(names[count - 1]); + return headers.getAll(names[count - 1]); } @Benchmark diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/Header.java b/zuul-core/src/main/java/com/netflix/zuul/message/Header.java index 5de9e188..f589617c 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/Header.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/Header.java @@ -17,12 +17,9 @@ package com.netflix.zuul.message; /** - * User: Mike Smith - * Date: 7/29/15 - * Time: 1:06 PM + * Represents a single header from a {@link Headers} object. */ -public class Header implements Cloneable -{ +public final class Header { private final HeaderName name; private final String value; @@ -33,45 +30,44 @@ public Header(HeaderName name, String value) this.value = value; } - public String getKey() - { + public String getKey() { return name.getName(); } - public HeaderName getName() - { + public HeaderName getName() { return name; } - public String getValue() - { + public String getValue() { return value; } @Override - public boolean equals(Object o) - { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } Header header = (Header) o; - if (!name.equals(header.name)) return false; + if (!name.equals(header.name)) { + return false; + } return !(value != null ? !value.equals(header.value) : header.value != null); - } @Override - public int hashCode() - { + public int hashCode() { int result = name.hashCode(); result = 31 * result + (value != null ? value.hashCode() : 0); return result; } @Override - public String toString() - { + public String toString() { return String.format("%s: %s", name, value); } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/HeaderName.java b/zuul-core/src/main/java/com/netflix/zuul/message/HeaderName.java index 1beed0a3..8728c0bf 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/HeaderName.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/HeaderName.java @@ -16,7 +16,7 @@ package com.netflix.zuul.message; -import com.netflix.config.DynamicPropertyFactory; +import java.util.Locale; /** * Immutable, case-insensitive wrapper around Header name. @@ -25,58 +25,60 @@ * Date: 7/29/15 * Time: 1:07 PM */ -public class HeaderName -{ - private static final boolean SHOULD_INTERN = - DynamicPropertyFactory.getInstance().getBooleanProperty( - "com.netflix.zuul.message.HeaderName.shouldIntern", true).get(); - +public final class HeaderName { private final String name; private final String normalised; + private final int hashCode; - public HeaderName(String name) - { - if (name == null) throw new NullPointerException("HeaderName cannot be null!"); - this.name = SHOULD_INTERN ? name.intern() : name; - this.normalised = SHOULD_INTERN ? name.toLowerCase().intern() : name.toLowerCase(); + public HeaderName(String name) { + if (name == null) { + throw new NullPointerException("HeaderName cannot be null!"); + } + this.name = name; + this.normalised = normalize(name); + this.hashCode = this.normalised.hashCode(); } - public String getName() - { + HeaderName(String name, String normalised) { + this.name = name; + this.normalised = normalised; + this.hashCode = normalised.hashCode(); + } + + /** + * Gets the original, non-normalized name for this header. + */ + public String getName() { return name; } - public String getNormalised() - { + public String getNormalised() { return normalised; } - @Override - public boolean equals(Object o) - { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - HeaderName that = (HeaderName) o; + static String normalize(String s) { + return s.toLowerCase(Locale.ROOT); + } - // Ignore case when comparing. - if (SHOULD_INTERN) { - return normalised == that.normalised; + @Override + public boolean equals(Object o) { + if (this == o) { + return true; } - else { - return normalised.equals(that.normalised); + if (!(o instanceof HeaderName)) { + return false; } + HeaderName that = (HeaderName) o; + return this.normalised.equals(that.normalised); } @Override - public int hashCode() - { - return normalised.hashCode(); + public int hashCode() { + return hashCode; } @Override - public String toString() - { + public String toString() { return name; } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java index 7346ede3..125fec60 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java @@ -15,19 +15,20 @@ */ package com.netflix.zuul.message; -import com.google.common.collect.ArrayListMultimap; -import com.google.common.collect.ImmutableListMultimap; -import com.google.common.collect.Iterables; -import com.google.common.collect.ListMultimap; -import com.netflix.zuul.message.http.HttpHeaderNames; +import static java.util.Objects.requireNonNull; + +import com.google.common.annotations.VisibleForTesting; +import java.util.AbstractMap.SimpleImmutableEntry; +import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.function.Predicate; -import java.util.stream.Collectors; - -import static com.netflix.zuul.util.HttpUtils.stripMaliciousHeaderChars; +import javax.annotation.Nullable; /** * An abstraction over a collection of http headers. Allows multiple headers with same name, and header names are @@ -35,60 +36,55 @@ * * There are methods for getting and setting headers by String AND by HeaderName. When possible, use the HeaderName * variants and cache the HeaderName instances somewhere, to avoid case-insensitive String comparisons. - * - * User: michaels@netflix.com - * Date: 2/20/15 - * Time: 3:13 PM */ -public class Headers implements Cloneable -{ - private final ListMultimap delegate; - private final boolean immutable; +public final class Headers { + private static final int ABSENT = -1; - public Headers() - { - delegate = ArrayListMultimap.create(); - immutable = false; - } + private final List originalNames; + private final List names; + private final List values; - private Headers(ListMultimap delegate) - { - this.delegate = delegate; - immutable = ImmutableListMultimap.class.isAssignableFrom(delegate.getClass()); + public static Headers copyOf(Headers original) { + return new Headers(requireNonNull(original, "original")); } - protected HeaderName getHeaderName(String name) - { - return HttpHeaderNames.get(name); + public Headers() { + originalNames = new ArrayList<>(); + names = new ArrayList<>(); + values = new ArrayList<>(); } - private boolean delegatePut(HeaderName hn, String value) { - return delegate.put(hn, stripMaliciousHeaderChars(value)); + private Headers(Headers original) { + originalNames = new ArrayList<>(original.originalNames); + names = new ArrayList<>(original.names); + values = new ArrayList<>(original.values); } - private void delegatePutAll(Headers headers) { - // enforce using above delegatePut method, for stripping malicious characters - headers.delegate.entries().forEach(entry -> delegatePut(entry.getKey(), entry.getValue())); + /** + * Get the first value found for this key even if there are multiple. If none, then + * return {@code null}. + */ + @Nullable + public String getFirst(String headerName) { + String normalName = HeaderName.normalize(requireNonNull(headerName, "headerName")); + return getFirstNormal(normalName); } /** * Get the first value found for this key even if there are multiple. If none, then - * return null. - * - * @param name - * @return + * return {@code null}. */ - public String getFirst(String name) - { - HeaderName hn = getHeaderName(name); - return getFirst(hn); - } - public String getFirst(HeaderName hn) - { - List values = delegate.get(hn); - if (values != null) { - if (values.size() > 0) { - return values.get(0); + @Nullable + public String getFirst(HeaderName headerName) { + String normalName = requireNonNull(headerName, "headerName").getNormalised(); + return getFirstNormal(normalName); + } + + @Nullable + private String getFirstNormal(String name) { + for (int i = 0; i < size(); i++) { + if (name(i).equals(name)) { + return value(i); } } return null; @@ -97,178 +93,398 @@ public String getFirst(HeaderName hn) /** * Get the first value found for this key even if there are multiple. If none, then * return the specified defaultValue. - * - * @param name - * @return */ - public String getFirst(String name, String defaultValue) - { - String value = getFirst(name); - if (value == null) { - value = defaultValue; + public String getFirst(String headerName, String defaultValue) { + requireNonNull(defaultValue, "defaultValue"); + String value = getFirst(headerName); + if (value != null) { + return value; } - return value; + return defaultValue; } - public String getFirst(HeaderName hn, String defaultValue) - { - String value = getFirst(hn); - if (value == null) { - value = defaultValue; + + /** + * Get the first value found for this key even if there are multiple. If none, then + * return the specified defaultValue. + */ + public String getFirst(HeaderName headerName, String defaultValue) { + requireNonNull(defaultValue, "defaultValue"); + String value = getFirst(headerName); + if (value != null) { + return value; } - return value; + return defaultValue; + } + + /** + * Returns all header values associated with the name. + */ + public List getAll(String headerName) { + String normalName = HeaderName.normalize(requireNonNull(headerName, "headerName")); + return getAllNormal(normalName); } - public List get(String name) - { - HeaderName hn = getHeaderName(name); - return get(hn); + /** + * Returns all header values associated with the name. + */ + public List getAll(HeaderName headerName) { + String normalName = requireNonNull(headerName, "headerName").getNormalised(); + return getAllNormal(normalName); } - public List get(HeaderName hn) - { - return delegate.get(hn); + + private List getAllNormal(String normalName) { + List results = null; + for (int i = 0; i < size(); i++) { + if (name(i).equals(normalName)) { + if (results == null) { + results = new ArrayList<>(1); + } + results.add(value(i)); + } + } + if (results == null) { + return Collections.emptyList(); + } else { + return Collections.unmodifiableList(results); + } } /** * Replace any/all entries with this key, with this single entry. * - * If value is null, then not added, but any existing header of same name is removed. + * If value is {@code null}, then not added, but any existing header of same name is removed. + */ + public void set(String headerName, @Nullable String value) { + String normalName = HeaderName.normalize(requireNonNull(headerName, "headerName")); + setNormal(headerName, normalName, value); + } + + /** + * Replace any/all entries with this key, with this single entry. * - * @param name - * @param value + * If value is {@code null}, then not added, but any existing header of same name is removed. */ - public void set(String name, String value) - { - HeaderName hn = getHeaderName(name); - set(hn, value); - } - public void set(HeaderName hn, String value) - { - delegate.removeAll(hn); + public void set(HeaderName headerName, String value) { + String normalName = requireNonNull(headerName, "headerName").getNormalised(); + setNormal(headerName.getName(), normalName, value); + } + + private void setNormal(String originalName, String normalName, @Nullable String value) { + int i = findNormal(normalName); + if (i == ABSENT) { + if (value != null) { + addNormal(originalName, normalName, value); + } + return; + } if (value != null) { - delegatePut(hn, value); + value(i, value); + originalName(i, originalName); + i++; } + clearMatchingStartingAt(i, normalName, /* removed= */ null); } - public boolean setIfAbsent(String name, String value) - { - HeaderName hn = getHeaderName(name); - return setIfAbsent(hn, value); + /** + * Returns the first index entry that has a matching name. Returns {@link #ABSENT} if absent. + */ + private int findNormal(String normalName) { + for (int i = 0; i < size(); i++) { + if (name(i).equals(normalName)) { + return i; + } + } + return -1; } - public boolean setIfAbsent(HeaderName hn, String value) - { - boolean did = false; - if (! contains(hn)) { - set(hn, value); - did = true; + + /** + * Removes entries that match the name, starting at the given index. + */ + private void clearMatchingStartingAt(int i, String normalName, @Nullable Collection removed) { + // This works by having separate read and write indexes, that iterate along the list. + // Values that don't match are moved to the front, leaving garbage values in place. + // At the end, all values at and values are garbage and are removed. + int w = i; + for (int r = i; r < size(); r++) { + if (!name(r).equals(normalName)) { + originalName(w, originalName(r)); + name(w, name(r)); + value(w, value(r)); + w++; + } else if (removed != null) { + removed.add(value(r)); + } } - return did; + truncate(w); + } + + /** + * Adds the name and value to the headers, except if the name is already present. Unlike + * {@link #set(String, String)}, this method does not accept a {@code null} value. + * + * @return if the value was successfully added. + */ + public boolean setIfAbsent(String headerName, String value) { + requireNonNull(value, "value"); + String normalName = HeaderName.normalize(requireNonNull(headerName, "headerName")); + return setIfAbsentNormal(headerName, normalName, value); } - public void add(String name, String value) - { - HeaderName hn = getHeaderName(name); - add(hn, value); + /** + * Adds the name and value to the headers, except if the name is already present. Unlike + * {@link #set(HeaderName, String)}, this method does not accept a {@code null} value. + * + * @return if the value was successfully added. + */ + public boolean setIfAbsent(HeaderName headerName, String value) { + requireNonNull(value, "value"); + String normalName = requireNonNull(headerName, "headerName").getNormalised(); + return setIfAbsentNormal(headerName.getName(), normalName, value); } - public void add(HeaderName hn, String value) - { - delegatePut(hn, value); + + private boolean setIfAbsentNormal(String originalName, String normalName, String value) { + int i = findNormal(normalName); + if (i != ABSENT) { + return false; + } + addNormal(originalName, normalName, value); + return true; } - public void putAll(Headers headers) - { - delegatePutAll(headers); + /** + * Adds the name and value to the headers. + */ + public void add(String headerName, String value) { + String normalName = HeaderName.normalize(requireNonNull(headerName, "headerName")); + requireNonNull(value, "value"); + addNormal(headerName, normalName, value); } - public List remove(String name) - { - HeaderName hn = getHeaderName(name); - return remove(hn); + /** + * Adds the name and value to the headers. + */ + public void add(HeaderName headerName, String value) { + String normalName = requireNonNull(headerName, "headerName").getNormalised(); + requireNonNull(value, "value"); + addNormal(headerName.getName(), normalName, value); } - public List remove(HeaderName hn) - { - return delegate.removeAll(hn); + + /** + * Adds all the headers into this headers object. + */ + public void putAll(Headers headers) { + for (int i = 0; i < headers.size(); i++) { + addNormal(headers.originalName(i), headers.name(i), headers.value(i)); + } } - public boolean removeIf(Predicate> filter) { - return delegate.entries().removeIf(filter); + /** + * Removes the header entries that match the given header name, and returns them as a list. + */ + public List remove(String headerName) { + String normalName = HeaderName.normalize(requireNonNull(headerName, "headerName")); + return removeNormal(normalName); } - public Collection
entries() - { - return delegate.entries() - .stream() - .map(entry -> new Header(entry.getKey(), entry.getValue())) - .collect(Collectors.toList()); + /** + * Removes the header entries that match the given header name, and returns them as a list. + */ + public List remove(HeaderName headerName) { + String normalName = requireNonNull(headerName, "headerName").getNormalised(); + return removeNormal(normalName); } - public Set keySet() - { - return delegate.keySet(); + private List removeNormal(String normalName) { + List removed = new ArrayList<>(); + clearMatchingStartingAt(0, normalName, removed); + return Collections.unmodifiableList(removed); } - public boolean contains(String name) - { - return contains(getHeaderName(name)); + /** + * Removes all header entries that match the given predicate. Do not access the header list from inside the + * {@link Predicate#test} body. + * + * @return if any elements were removed. + */ + public boolean removeIf(Predicate> filter) { + requireNonNull(filter, "filter"); + boolean removed = false; + int w = 0; + for (int r = 0; r < size(); r++) { + if (filter.test(new SimpleImmutableEntry<>(new HeaderName(originalName(r), name(r)), value(r)))) { + removed = true; + } else { + originalName(w, originalName(r)); + name(w, name(r)); + value(w, value(r)); + w++; + } + } + truncate(w); + return removed; } - public boolean contains(HeaderName hn) - { - return delegate.containsKey(hn); + + /** + * Returns the collection of headers. + */ + public Collection
entries() { + List
entries = new ArrayList<>(size()); + for (int i = 0; i < size(); i++) { + entries.add(new Header(new HeaderName(originalName(i), name(i)), value(i))); + } + return Collections.unmodifiableList(entries); } - public boolean contains(String name, String value) - { - HeaderName hn = getHeaderName(name); - return contains(hn, value); + /** + * Returns a set of header names found in this headers object. If there are duplicate header names, the first + * one present takes precedence. + */ + public Set keySet() { + Set headerNames = new LinkedHashSet<>(size()); + for (int i = 0 ; i < size(); i++) { + HeaderName headerName = new HeaderName(originalName(i), name(i)); + // We actually do need to check contains before adding to the set because the original name may change. + // In this case, the first name wins. + if (!headerNames.contains(headerName)) { + headerNames.add(headerName); + } + } + return Collections.unmodifiableSet(headerNames); } - public boolean contains(HeaderName hn, String value) - { - return delegate.containsEntry(hn, value); + + /** + * Returns if there is a header entry that matches the given name. + */ + public boolean contains(String headerName) { + String normalName = HeaderName.normalize(requireNonNull(headerName, "headerName")); + return findNormal(normalName) != ABSENT; } - public int size() - { - return delegate.size(); + /** + * Returns if there is a header entry that matches the given name. + */ + public boolean contains(HeaderName headerName) { + String normalName = requireNonNull(headerName, "headerName").getNormalised(); + return findNormal(normalName) != ABSENT; } - @Override - public Headers clone() - { - Headers copy = new Headers(); - copy.delegatePutAll(this); - return copy; + /** + * Returns if there is a header entry that matches the given name and value. + */ + public boolean contains(String headerName, String value) { + String normalName = HeaderName.normalize(requireNonNull(headerName, "headerName")); + requireNonNull(value, "value"); + return containsNormal(normalName, value); } - public Headers immutableCopy() - { - return new Headers(ImmutableListMultimap.copyOf(delegate)); + /** + * Returns if there is a header entry that matches the given name and value. + */ + public boolean contains(HeaderName headerName, String value) { + String normalName = requireNonNull(headerName, "headerName").getNormalised(); + requireNonNull(value, "value"); + return containsNormal(normalName, value); } - public boolean isImmutable() - { - return immutable; + private boolean containsNormal(String normalName, String value) { + for (int i = 0; i < size(); i++) { + if (name(i).equals(normalName) && value(i).equals(value)) { + return true; + } + } + return false; } + /** + * Returns the number of header entries. + */ + public int size() { + return names.size(); + } + + /** + * This method should only be used for testing, as it is expensive to call. + */ @Override - public int hashCode() - { - return super.hashCode(); + @VisibleForTesting + public int hashCode() { + return asMap().hashCode(); } + /** + * Equality on headers is not clearly defined, but this method makes an attempt to do so. This method should + * only be used for testing, as it is expensive to call. Two headers object are considered equal if they have + * the same, normalized header names, and have the corresponding header values in the same order. + */ @Override - public boolean equals(Object obj) - { - if (obj == null) - return false; - if (! (obj instanceof Headers)) + @VisibleForTesting + public boolean equals(Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Headers)) { return false; + } + Headers other = (Headers) obj; - Headers h2 = (Headers) obj; - return Iterables.elementsEqual(delegate.entries(), h2.delegate.entries()); + return asMap().equals(other.asMap()); } + private Map> asMap() { + Map> map = new LinkedHashMap<>(size()); + for (int i = 0; i < size(); i++) { + map.computeIfAbsent(name(i), k -> new ArrayList<>()).add(value(i)); + } + // Return an unwrapped collection since it should not ever be returned on the API. + return map; + } + + /** + * This is used for debugging. It is fairly expensive to construct, so don't call it on a hot path. + */ @Override - public String toString() - { - return delegate.toString(); + public String toString() { + return asMap().toString(); + } + + private String originalName(int i) { + return originalNames.get(i); + } + + private void originalName(int i, String originalName) { + originalNames.set(i, originalName); + } + + private String name(int i) { + return names.get(i); + } + + private void name(int i, String name) { + names.set(i, name); + } + + private String value(int i) { + return values.get(i); + } + + private void value(int i, String val) { + values.set(i, val); + } + + private void addNormal(String originalName, String normalName, String value) { + originalNames.add(originalName); + names.add(normalName); + values.add(value); + } + + /** + * Removes all elements at and after the given index. + */ + private void truncate(int i) { + for (int k = size() - 1; k >= i; k--) { + originalNames.remove(k); + names.remove(k); + values.remove(k); + } } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/ZuulMessageImpl.java b/zuul-core/src/main/java/com/netflix/zuul/message/ZuulMessageImpl.java index 44dfab2a..de2d3f2a 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/ZuulMessageImpl.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/ZuulMessageImpl.java @@ -217,7 +217,7 @@ public void runBufferedBodyContentThroughFilter(ZuulFilter filter) { @Override public ZuulMessage clone() { - final ZuulMessageImpl copy = new ZuulMessageImpl(context.clone(), headers.clone()); + final ZuulMessageImpl copy = new ZuulMessageImpl(context.clone(), Headers.copyOf(headers)); this.bodyChunks.forEach(chunk -> { chunk.retain(); copy.bufferBodyContents(chunk); diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpHeaderNames.java b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpHeaderNames.java index b3833c36..e6ab57ff 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpHeaderNames.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpHeaderNames.java @@ -30,7 +30,7 @@ * Date: 8/5/15 * Time: 12:33 PM */ -public class HttpHeaderNames +public final class HttpHeaderNames { private static final DynamicIntProperty MAX_CACHE_SIZE = DynamicPropertyFactory.getInstance().getIntProperty("com.netflix.zuul.message.http.HttpHeaderNames.maxCacheSize", 30); diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java index 29f74e25..1aefcdf8 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java @@ -359,7 +359,7 @@ public Cookies parseCookies() public Cookies reParseCookies() { Cookies cookies = new Cookies(); - for (String aCookieHeader : getHeaders().get(HttpHeaderNames.COOKIE)) + for (String aCookieHeader : getHeaders().getAll(HttpHeaderNames.COOKIE)) { try { if (CLEAN_COOKIES.get()) { @@ -403,7 +403,7 @@ public ZuulMessage clone() { HttpRequestMessageImpl clone = new HttpRequestMessageImpl(message.getContext().clone(), protocol, method, path, - queryParams.clone(), message.getHeaders().clone(), clientIp, scheme, + queryParams.clone(), Headers.copyOf(message.getHeaders()), clientIp, scheme, port, serverName, clientRemoteAddress, immutable); if (getInboundRequest() != null) { clone.inboundRequest = (HttpRequestInfo) getInboundRequest().clone(); @@ -413,10 +413,10 @@ public ZuulMessage clone() protected HttpRequestInfo copyRequestInfo() { - // Unlike clone(), we create immutable copies of the Headers and HttpQueryParams here. + HttpRequestMessageImpl req = new HttpRequestMessageImpl(message.getContext(), protocol, method, path, - queryParams.immutableCopy(), message.getHeaders().immutableCopy(), clientIp, scheme, + queryParams.immutableCopy(), Headers.copyOf(message.getHeaders()), clientIp, scheme, port, serverName, clientRemoteAddress, true); req.setHasBody(hasBody()); return req; diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpResponseMessageImpl.java b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpResponseMessageImpl.java index 89ac667c..693fd368 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpResponseMessageImpl.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpResponseMessageImpl.java @@ -191,7 +191,7 @@ public Cookies parseSetCookieHeader(String setCookieValue) public boolean hasSetCookieWithName(String cookieName) { boolean has = false; - for (String setCookieValue : getHeaders().get(HttpHeaderNames.SET_COOKIE)) { + for (String setCookieValue : getHeaders().getAll(HttpHeaderNames.SET_COOKIE)) { for (Cookie cookie : CookieDecoder.decode(setCookieValue)) { if (cookie.getName().equalsIgnoreCase(cookieName)) { has = true; @@ -251,7 +251,7 @@ public ZuulMessage clone() { // TODO - not sure if should be cloning the outbound request object here or not.... HttpResponseMessageImpl clone = new HttpResponseMessageImpl(getContext().clone(), - getHeaders().clone(), + Headers.copyOf(getHeaders()), getOutboundRequest(), getStatus()); if (getInboundResponse() != null) { clone.inboundResponse = (HttpResponseInfo) getInboundResponse().clone(); @@ -261,10 +261,12 @@ public ZuulMessage clone() protected HttpResponseInfo copyResponseInfo() { - // Unlike clone(), we create immutable copies of the Headers here. - HttpResponseMessageImpl response = new HttpResponseMessageImpl(getContext(), - getHeaders().immutableCopy(), - getOutboundRequest(), getStatus()); + HttpResponseMessageImpl response = + new HttpResponseMessageImpl( + getContext(), + Headers.copyOf(getHeaders()), + getOutboundRequest(), + getStatus()); response.setHasBody(hasBody()); return response; } diff --git a/zuul-core/src/test/java/com/netflix/zuul/context/DebugTest.java b/zuul-core/src/test/java/com/netflix/zuul/context/DebugTest.java index 75c77967..b95e499d 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/context/DebugTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/context/DebugTest.java @@ -26,20 +26,21 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; + +import com.google.common.truth.Truth; import com.netflix.zuul.message.Headers; import com.netflix.zuul.message.http.HttpQueryParams; import com.netflix.zuul.message.http.HttpRequestMessage; import com.netflix.zuul.message.http.HttpRequestMessageImpl; import com.netflix.zuul.message.http.HttpResponseMessage; import com.netflix.zuul.message.http.HttpResponseMessageImpl; -import java.net.SocketAddress; import java.util.List; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.junit.runners.JUnit4; -@RunWith(MockitoJUnitRunner.class) +@RunWith(JUnit4.class) public class DebugTest { private SessionContext ctx; @@ -90,10 +91,10 @@ public void testWriteInboundRequestDebug() { Debug.writeDebugRequest(ctx, request, true).toBlocking().single(); List debugLines = getRequestDebug(ctx); - assertEquals(3, debugLines.size()); - assertEquals("REQUEST_INBOUND:: > LINE: POST /some/where?k1=v1 HTTP/1.1", debugLines.get(0)); - assertEquals("REQUEST_INBOUND:: > HDR: Content-Length:13", debugLines.get(1)); - assertEquals("REQUEST_INBOUND:: > HDR: lah:deda", debugLines.get(2)); + Truth.assertThat(debugLines).containsExactly( + "REQUEST_INBOUND:: > LINE: POST /some/where?k1=v1 HTTP/1.1", + "REQUEST_INBOUND:: > HDR: Content-Length:13", + "REQUEST_INBOUND:: > HDR: lah:deda"); } @Test @@ -103,10 +104,10 @@ public void testWriteOutboundRequestDebug() { Debug.writeDebugRequest(ctx, request, false).toBlocking().single(); List debugLines = getRequestDebug(ctx); - assertEquals(3, debugLines.size()); - assertEquals("REQUEST_OUTBOUND:: > LINE: POST /some/where?k1=v1 HTTP/1.1", debugLines.get(0)); - assertEquals("REQUEST_OUTBOUND:: > HDR: Content-Length:13", debugLines.get(1)); - assertEquals("REQUEST_OUTBOUND:: > HDR: lah:deda", debugLines.get(2)); + Truth.assertThat(debugLines).containsExactly( + "REQUEST_OUTBOUND:: > LINE: POST /some/where?k1=v1 HTTP/1.1", + "REQUEST_OUTBOUND:: > HDR: Content-Length:13", + "REQUEST_OUTBOUND:: > HDR: lah:deda"); } @Test @@ -116,11 +117,11 @@ public void testWriteRequestDebug_WithBody() { Debug.writeDebugRequest(ctx, request, true).toBlocking().single(); List debugLines = getRequestDebug(ctx); - assertEquals(4, debugLines.size()); - assertEquals("REQUEST_INBOUND:: > LINE: POST /some/where?k1=v1 HTTP/1.1", debugLines.get(0)); - assertEquals("REQUEST_INBOUND:: > HDR: Content-Length:13", debugLines.get(1)); - assertEquals("REQUEST_INBOUND:: > HDR: lah:deda", debugLines.get(2)); - assertEquals("REQUEST_INBOUND:: > BODY: some text", debugLines.get(3)); + Truth.assertThat(debugLines).containsExactly( + "REQUEST_INBOUND:: > LINE: POST /some/where?k1=v1 HTTP/1.1", + "REQUEST_INBOUND:: > HDR: Content-Length:13", + "REQUEST_INBOUND:: > HDR: lah:deda", + "REQUEST_INBOUND:: > BODY: some text"); } @Test @@ -130,10 +131,10 @@ public void testWriteInboundResponseDebug() { Debug.writeDebugResponse(ctx, response, true).toBlocking().single(); List debugLines = getRequestDebug(ctx); - assertEquals(3, debugLines.size()); - assertEquals("RESPONSE_INBOUND:: < STATUS: 200", debugLines.get(0)); - assertEquals("RESPONSE_INBOUND:: < HDR: Content-Length:13", debugLines.get(1)); - assertEquals("RESPONSE_INBOUND:: < HDR: lah:deda", debugLines.get(2)); + Truth.assertThat(debugLines).containsExactly( + "RESPONSE_INBOUND:: < STATUS: 200", + "RESPONSE_INBOUND:: < HDR: Content-Length:13", + "RESPONSE_INBOUND:: < HDR: lah:deda"); } @Test @@ -143,10 +144,10 @@ public void testWriteOutboundResponseDebug() { Debug.writeDebugResponse(ctx, response, false).toBlocking().single(); List debugLines = getRequestDebug(ctx); - assertEquals(3, debugLines.size()); - assertEquals("RESPONSE_OUTBOUND:: < STATUS: 200", debugLines.get(0)); - assertEquals("RESPONSE_OUTBOUND:: < HDR: Content-Length:13", debugLines.get(1)); - assertEquals("RESPONSE_OUTBOUND:: < HDR: lah:deda", debugLines.get(2)); + Truth.assertThat(debugLines).containsExactly( + "RESPONSE_OUTBOUND:: < STATUS: 200", + "RESPONSE_OUTBOUND:: < HDR: Content-Length:13", + "RESPONSE_OUTBOUND:: < HDR: lah:deda"); } @Test @@ -156,10 +157,10 @@ public void testWriteResponseDebug_WithBody() { Debug.writeDebugResponse(ctx, response, true).toBlocking().single(); List debugLines = getRequestDebug(ctx); - assertEquals(4, debugLines.size()); - assertEquals("RESPONSE_INBOUND:: < STATUS: 200", debugLines.get(0)); - assertEquals("RESPONSE_INBOUND:: < HDR: Content-Length:13", debugLines.get(1)); - assertEquals("RESPONSE_INBOUND:: < HDR: lah:deda", debugLines.get(2)); - assertEquals("RESPONSE_INBOUND:: < BODY: response text", debugLines.get(3)); + Truth.assertThat(debugLines).containsExactly( + "RESPONSE_INBOUND:: < STATUS: 200", + "RESPONSE_INBOUND:: < HDR: Content-Length:13", + "RESPONSE_INBOUND:: < HDR: lah:deda", + "RESPONSE_INBOUND:: < BODY: response text"); } } diff --git a/zuul-core/src/test/java/com/netflix/zuul/filters/common/GZipResponseFilterTest.java b/zuul-core/src/test/java/com/netflix/zuul/filters/common/GZipResponseFilterTest.java index 478bf55b..2c656ed5 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/filters/common/GZipResponseFilterTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/filters/common/GZipResponseFilterTest.java @@ -99,7 +99,7 @@ public void prepareResponseBody_NeedsGZipping() throws Exception { assertEquals("gzip", result.getHeaders().getFirst("Content-Encoding")); // Check Content-Length header has been removed.; - assertEquals(0, result.getHeaders().get("Content-Length").size()); + assertEquals(0, result.getHeaders().getAll("Content-Length").size()); } @Test diff --git a/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java b/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java index 64612dce..a21ed370 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java @@ -17,19 +17,408 @@ package com.netflix.zuul.message; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; +import com.google.common.truth.Truth; import java.util.List; +import java.util.Set; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.junit.runners.JUnit4; /** * Tests for {@link Headers}. */ -@RunWith(MockitoJUnitRunner.class) +@RunWith(JUnit4.class) public class HeadersTest { + @Test + public void copyOf() { + Headers headers = new Headers(); + headers.set("Content-Length", "5"); + Headers headers2 = Headers.copyOf(headers); + headers2.add("Via", "duct"); + + Truth.assertThat(headers.getAll("Via")).isEmpty(); + Truth.assertThat(headers2.size()).isEqualTo(2); + Truth.assertThat(headers2.getAll("Content-Length")).containsExactly("5"); + } + + @Test + public void getFirst_normalizesName() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + Truth.assertThat(headers.getFirst("cOOkIE")).isEqualTo("this=that"); + } + + @Test + public void getFirst_headerName_normalizesName() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + Truth.assertThat(headers.getFirst(new HeaderName("cOOkIE"))).isEqualTo("this=that"); + } + + @Test + public void getFirst_returnsNull() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + Truth.assertThat(headers.getFirst("Date")).isNull(); + } + + @Test + public void getFirst_headerName_returnsNull() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + Truth.assertThat(headers.getFirst(new HeaderName("Date"))).isNull(); + } + + @Test + public void getFirst_returnsDefault() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + Truth.assertThat(headers.getFirst("Date", "tuesday")).isEqualTo("tuesday"); + } + + @Test + public void getFirst_headerName_returnsDefault() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + Truth.assertThat(headers.getFirst(new HeaderName("Date"), "tuesday")).isEqualTo("tuesday"); + } + + @Test + public void getAll() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + Truth.assertThat(headers.getAll("CookiE")).containsExactly("this=that", "frizzle=frazzle").inOrder(); + } + + @Test + public void getAll_headerName() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + Truth.assertThat(headers.getAll(new HeaderName("CookiE"))) + .containsExactly("this=that", "frizzle=frazzle").inOrder(); + } + + @Test + public void setClearsExisting() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + headers.set("cookIe", "dilly=dally"); + + Truth.assertThat(headers.getAll("CookiE")).containsExactly("dilly=dally"); + Truth.assertThat(headers.size()).isEqualTo(2); + } + + @Test + public void setClearsExisting_headerName() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + headers.set(new HeaderName("cookIe"), "dilly=dally"); + + Truth.assertThat(headers.getAll("CookiE")).containsExactly("dilly=dally"); + Truth.assertThat(headers.size()).isEqualTo(2); + } + + @Test + public void setNullIsEmtpy() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + headers.set("cookIe", null); + + Truth.assertThat(headers.getAll("CookiE")).isEmpty(); + Truth.assertThat(headers.size()).isEqualTo(1); + } + + @Test + public void setNullIsEmtpy_headerName() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + headers.set(new HeaderName("cookIe"), null); + + Truth.assertThat(headers.getAll("CookiE")).isEmpty(); + Truth.assertThat(headers.size()).isEqualTo(1); + } + + @Test + public void setIfAbsentKeepsExisting() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + headers.setIfAbsent("cookIe", "dilly=dally"); + + Truth.assertThat(headers.getAll("CookiE")).containsExactly("this=that", "frizzle=frazzle").inOrder(); + } + + @Test + public void setIfAbsentKeepsExisting_headerName() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + headers.setIfAbsent(new HeaderName("cookIe"), "dilly=dally"); + + Truth.assertThat(headers.getAll("CookiE")).containsExactly("this=that", "frizzle=frazzle").inOrder(); + } + + @Test + public void setIfAbsentFailsOnNull() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + assertThrows(NullPointerException.class, () -> headers.setIfAbsent("cookIe", null)); + } + + @Test + public void setIfAbsentFailsOnNull_headerName() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + assertThrows(NullPointerException.class, () -> headers.setIfAbsent(new HeaderName("cookIe"), null)); + } + + @Test + public void setIfAbsent() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + headers.setIfAbsent("X-Netflix-Awesome", "true"); + + Truth.assertThat(headers.getAll("X-netflix-Awesome")).containsExactly("true"); + } + + @Test + public void setIfAbsent_headerName() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + headers.setIfAbsent(new HeaderName("X-Netflix-Awesome"), "true"); + + Truth.assertThat(headers.getAll("X-netflix-Awesome")).containsExactly("true"); + } + + @Test + public void add() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + headers.add("via", "con Dios"); + + Truth.assertThat(headers.getAll("Via")).containsExactly("duct", "con Dios").inOrder(); + } + + @Test + public void add_headerName() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + headers.add(new HeaderName("via"), "con Dios"); + + Truth.assertThat(headers.getAll("Via")).containsExactly("duct", "con Dios").inOrder(); + } + + @Test + public void putAll() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + Headers other = new Headers(); + other.add("cookie", "a=b"); + other.add("via", "com"); + + headers.putAll(other); + + // Only check the order per field, not for the entire set. + Truth.assertThat(headers.getAll("Via")).containsExactly("duct", "com").inOrder(); + Truth.assertThat(headers.getAll("coOkiE")).containsExactly("this=that", "frizzle=frazzle", "a=b").inOrder(); + Truth.assertThat(headers.size()).isEqualTo(5); + } + + + @Test + public void remove() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + headers.add("Soup", "salad"); + + List removed = headers.remove("Cookie"); + + Truth.assertThat(headers.getAll("Cookie")).isEmpty(); + Truth.assertThat(headers.getAll("Soup")).containsExactly("salad"); + Truth.assertThat(headers.size()).isEqualTo(2); + Truth.assertThat(removed).containsExactly("this=that", "frizzle=frazzle").inOrder(); + } + + @Test + public void remove_headerName() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + headers.add("Soup", "salad"); + + List removed = headers.remove(new HeaderName("Cookie")); + + Truth.assertThat(headers.getAll("Cookie")).isEmpty(); + Truth.assertThat(headers.getAll("Soup")).containsExactly("salad"); + Truth.assertThat(headers.size()).isEqualTo(2); + Truth.assertThat(removed).containsExactly("this=that", "frizzle=frazzle").inOrder(); + } + + @Test + public void removeEmpty() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + headers.add("Soup", "salad"); + + List removed = headers.remove("Monkey"); + + Truth.assertThat(headers.getAll("Cookie")).isNotEmpty(); + Truth.assertThat(headers.getAll("Soup")).containsExactly("salad"); + Truth.assertThat(headers.size()).isEqualTo(4); + Truth.assertThat(removed).isEmpty(); + } + + @Test + public void removeEmpty_headerName() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + headers.add("Soup", "salad"); + + List removed = headers.remove(new HeaderName("Monkey")); + + Truth.assertThat(headers.getAll("Cookie")).isNotEmpty(); + Truth.assertThat(headers.getAll("Soup")).containsExactly("salad"); + Truth.assertThat(headers.size()).isEqualTo(4); + Truth.assertThat(removed).isEmpty(); + } + + @Test + public void removeIf() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("COOkie", "frizzle=frazzle"); + headers.add("Soup", "salad"); + + boolean removed = headers.removeIf(entry -> entry.getKey().getName().equals("Cookie")); + + assertTrue(removed); + Truth.assertThat(headers.getAll("cOoKie")).containsExactly("frizzle=frazzle"); + Truth.assertThat(headers.size()).isEqualTo(3); + } + + @Test + public void keySet() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("COOKie", "this=that"); + headers.add("cookIE", "frizzle=frazzle"); + headers.add("Soup", "salad"); + + Set keySet = headers.keySet(); + + Truth.assertThat(keySet) + .containsExactly(new HeaderName("COOKie"), new HeaderName("Soup"), new HeaderName("Via")); + for (HeaderName headerName : keySet) { + if (headerName.getName().equals("COOKie")) { + return; + } + } + throw new AssertionError("didn't find right cookie in keys: " + keySet); + } + + @Test + public void contains() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("COOKie", "this=that"); + headers.add("cookIE", "frizzle=frazzle"); + headers.add("Soup", "salad"); + + assertTrue(headers.contains("CoOkIe")); + assertTrue(headers.contains(new HeaderName("CoOkIe"))); + assertFalse(headers.contains("Monkey")); + assertFalse(headers.contains(new HeaderName("Monkey"))); + } + + @Test + public void containsValue() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("COOKie", "this=that"); + headers.add("cookIE", "frizzle=frazzle"); + headers.add("Soup", "salad"); + + // note the swapping of the two cookie casings. + assertTrue(headers.contains("CoOkIe", "frizzle=frazzle")); + assertTrue(headers.contains(new HeaderName("CoOkIe"), "frizzle=frazzle")); + assertFalse(headers.contains("Via", "lin")); + assertFalse(headers.contains(new HeaderName("Soup"), "of the day")); + } + @Test public void testCaseInsensitiveKeys_Set() { Headers headers = new Headers(); @@ -38,7 +427,7 @@ public void testCaseInsensitiveKeys_Set() { assertEquals("10", headers.getFirst("Content-Length")); assertEquals("10", headers.getFirst("content-length")); - assertEquals(1, headers.get("content-length").size()); + assertEquals(1, headers.getAll("content-length").size()); } @Test @@ -47,7 +436,7 @@ public void testCaseInsensitiveKeys_Add() { headers.add("Content-Length", "5"); headers.add("content-length", "10"); - List values = headers.get("content-length"); + List values = headers.getAll("content-length"); assertTrue(values.contains("10")); assertTrue(values.contains("5")); assertEquals(2, values.size()); @@ -59,7 +448,7 @@ public void testCaseInsensitiveKeys_SetIfAbsent() { headers.set("Content-Length", "5"); headers.setIfAbsent("content-length", "10"); - List values = headers.get("content-length"); + List values = headers.getAll("content-length"); assertEquals(1, values.size()); assertEquals("5", values.get(0)); } @@ -73,7 +462,7 @@ public void testCaseInsensitiveKeys_PutAll() { Headers headers2 = new Headers(); headers2.putAll(headers); - List values = headers2.get("content-length"); + List values = headers2.getAll("content-length"); assertTrue(values.contains("10")); assertTrue(values.contains("5")); assertEquals(2, values.size()); From 1d7358901e24f96794677fe2cb0b689ea74feb53 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 9 Apr 2020 03:02:43 -0700 Subject: [PATCH 038/273] all: move guice deps down to zuul-core, and avoid most usages --- build.gradle | 15 +- zuul-core/build.gradle | 2 + zuul-core/dependencies.lock | 304 +---------- .../zuul/BasicRequestCompleteHandler.java | 5 +- .../server/push/PushConnectionRegistry.java | 4 +- .../netty/server/push/PushMessageSender.java | 30 +- zuul-processor/dependencies.lock | 460 +--------------- zuul-sample/dependencies.lock | 516 +----------------- .../sample/push/SamplePushMessageSender.java | 2 +- .../SamplePushMessageSenderInitializer.java | 4 +- 10 files changed, 98 insertions(+), 1244 deletions(-) diff --git a/build.gradle b/build.gradle index f7143cd2..c55d7bec 100644 --- a/build.gradle +++ b/build.gradle @@ -52,6 +52,7 @@ subprojects { tasks.withType(Javadoc).each { it.classpath = sourceSets.main.compileClasspath } + ext { libraries = [ guava: "com.google.guava:guava:28.1-jre", @@ -62,20 +63,6 @@ subprojects { ] } - - dependencies { - ext.versions_guice = "4.2.2" - - // Use guice-4 while debugging a startup error that is hidden by guice-3's lack of java8 lambda support. - compile(group: 'com.google.inject', name: 'guice', version: "${versions_guice}") - compile(group: 'com.google.inject.extensions', name: 'guice-multibindings', version: "${versions_guice}") - compile(group: 'com.google.inject.extensions', name: 'guice-grapher', version: "${versions_guice}") - compile(group: 'com.google.inject.extensions', name: 'guice-assistedinject', version: "${versions_guice}") - compile(group: 'com.google.inject.extensions', name: 'guice-servlet', version: "${versions_guice}") - compile(group: 'com.google.inject.extensions', name: 'guice-throwingproviders', version: "${versions_guice}") - } - - test { testLogging { showStandardStreams = true diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index c7b5a6bc..e837f7f1 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -37,6 +37,8 @@ dependencies { implementation "io.netty:netty-transport-native-kqueue:${versions_netty}:osx-x86_64" runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.30.Final" + api(group: 'com.google.inject', name: 'guice', version: "4.2.3") + // To ensure that zuul-netty gets this correct later version. compile "com.netflix.governator:governator:1.+" compile "com.netflix.governator:governator-core:1.+" diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index dd978700..45212a4d 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -8,30 +8,6 @@ "locked": "2.9.8", "requested": "2.9.8" }, - "com.google.inject.extensions:guice-assistedinject": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject:guice": { - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.netflix.archaius:archaius-core": { "locked": "0.7.6", "requested": "0.7.5" @@ -106,29 +82,9 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3", + "requested": "4.2.3" }, "com.netflix.archaius:archaius-core": { "locked": "0.7.5", @@ -227,7 +183,7 @@ "requested": "1.2.1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.64", + "locked": "1.65", "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { @@ -252,29 +208,9 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3", + "requested": "4.2.3" }, "com.netflix.archaius:archaius-core": { "locked": "0.7.6", @@ -377,7 +313,7 @@ "requested": "1.2.1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.64", + "locked": "1.65", "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { @@ -410,29 +346,9 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3", + "requested": "4.2.3" }, "com.netflix.archaius:archaius-core": { "locked": "0.7.5", @@ -531,7 +447,7 @@ "requested": "1.2.1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.64", + "locked": "1.65", "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { @@ -564,29 +480,9 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3", + "requested": "4.2.3" }, "com.google.truth:truth": { "locked": "1.0.1", @@ -701,7 +597,7 @@ "requested": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.64", + "locked": "1.65", "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { @@ -738,29 +634,9 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3", + "requested": "4.2.3" }, "com.google.truth:truth": { "locked": "1.0.1", @@ -875,7 +751,7 @@ "requested": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.64", + "locked": "1.65", "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { @@ -908,30 +784,6 @@ "locked": "2.9.8", "requested": "2.9.8" }, - "com.google.inject.extensions:guice-assistedinject": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject:guice": { - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.netflix.archaius:archaius-core": { "locked": "0.7.6", "requested": "0.7.5" @@ -1006,29 +858,9 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3", + "requested": "4.2.3" }, "com.netflix.archaius:archaius-core": { "locked": "0.7.6", @@ -1131,7 +963,7 @@ "requested": "1.2.1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.64", + "locked": "1.65", "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { @@ -1152,30 +984,6 @@ "locked": "2.9.8", "requested": "2.9.8" }, - "com.google.inject.extensions:guice-assistedinject": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject:guice": { - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.netflix.archaius:archaius-core": { "locked": "0.7.6", "requested": "0.7.5" @@ -1254,29 +1062,9 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3", + "requested": "4.2.3" }, "com.google.truth:truth": { "locked": "1.0.1", @@ -1387,7 +1175,7 @@ "requested": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.64", + "locked": "1.65", "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { @@ -1408,30 +1196,6 @@ "locked": "2.9.8", "requested": "2.9.8" }, - "com.google.inject.extensions:guice-assistedinject": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject:guice": { - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.netflix.archaius:archaius-core": { "locked": "0.7.6", "requested": "0.7.5" @@ -1510,29 +1274,9 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3", + "requested": "4.2.3" }, "com.google.truth:truth": { "locked": "1.0.1", @@ -1647,7 +1391,7 @@ "requested": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.64", + "locked": "1.65", "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { diff --git a/zuul-core/src/main/java/com/netflix/zuul/BasicRequestCompleteHandler.java b/zuul-core/src/main/java/com/netflix/zuul/BasicRequestCompleteHandler.java index d9dd7a12..a3279cbc 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/BasicRequestCompleteHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/BasicRequestCompleteHandler.java @@ -16,13 +16,13 @@ package com.netflix.zuul; -import com.google.inject.Inject; import com.netflix.zuul.message.http.HttpRequestInfo; import com.netflix.zuul.message.http.HttpResponseMessage; import com.netflix.zuul.context.SessionContext; import com.netflix.zuul.stats.RequestMetricsPublisher; import javax.annotation.Nullable; +import javax.inject.Inject; /** * User: michaels@netflix.com @@ -31,7 +31,8 @@ */ public class BasicRequestCompleteHandler implements RequestCompleteHandler { - @Inject @Nullable + @Inject + @Nullable private RequestMetricsPublisher requestMetricsPublisher; @Override diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushConnectionRegistry.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushConnectionRegistry.java index 030f440d..8a36d148 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushConnectionRegistry.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushConnectionRegistry.java @@ -15,13 +15,13 @@ */ package com.netflix.zuul.netty.server.push; -import com.google.inject.Inject; -import com.google.inject.Singleton; import java.security.SecureRandom; import java.util.Base64; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; +import javax.inject.Inject; +import javax.inject.Singleton; /** * Maintains client identity to web socket or SSE channel mapping. diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushMessageSender.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushMessageSender.java index ee61410b..5c8bfb90 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushMessageSender.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushMessageSender.java @@ -15,18 +15,34 @@ */ package com.netflix.zuul.netty.server.push; +import static io.netty.handler.codec.http.HttpResponseStatus.BAD_REQUEST; +import static io.netty.handler.codec.http.HttpResponseStatus.FORBIDDEN; +import static io.netty.handler.codec.http.HttpResponseStatus.INTERNAL_SERVER_ERROR; +import static io.netty.handler.codec.http.HttpResponseStatus.METHOD_NOT_ALLOWED; +import static io.netty.handler.codec.http.HttpResponseStatus.NOT_FOUND; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; +import static io.netty.handler.codec.http.HttpResponseStatus.UNAUTHORIZED; +import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1; + import com.google.common.base.Strings; -import com.google.inject.Inject; -import com.google.inject.Singleton; import io.netty.buffer.ByteBuf; -import io.netty.channel.*; -import io.netty.handler.codec.http.*; +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.SimpleChannelInboundHandler; +import io.netty.handler.codec.http.DefaultFullHttpResponse; +import io.netty.handler.codec.http.FullHttpRequest; +import io.netty.handler.codec.http.FullHttpResponse; +import io.netty.handler.codec.http.HttpMethod; +import io.netty.handler.codec.http.HttpResponseStatus; +import io.netty.handler.codec.http.HttpUtil; +import javax.inject.Inject; +import javax.inject.Singleton; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static io.netty.handler.codec.http.HttpResponseStatus.*; -import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1; - /** * Serves "/push" URL that is used by the backend to POST push messages to a given Zuul instance. This URL handler * MUST BE accessible ONLY from RFC 1918 private internal network space (10.0.0.0 or 172.16.0.0) to guarantee that diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 4c213c35..8d503207 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -1,30 +1,4 @@ { - "compile": { - "com.google.inject.extensions:guice-assistedinject": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject:guice": { - "locked": "4.2.2", - "requested": "4.2.2" - } - }, "compileClasspath": { "com.fasterxml.jackson.core:jackson-core": { "firstLevelTransitive": [ @@ -42,47 +16,11 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -240,47 +178,11 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -439,7 +341,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.64" + "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -479,47 +381,11 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -685,47 +551,11 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.google.truth:truth": { "locked": "1.0.1", @@ -892,7 +722,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.64" + "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -935,47 +765,11 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.google.truth:truth": { "locked": "1.0.1", @@ -1142,7 +936,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.64" + "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -1165,32 +959,6 @@ "locked": "1.7.30" } }, - "runtime": { - "com.google.inject.extensions:guice-assistedinject": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject:guice": { - "locked": "4.2.2", - "requested": "4.2.2" - } - }, "runtimeClasspath": { "com.fasterxml.jackson.core:jackson-core": { "firstLevelTransitive": [ @@ -1211,47 +979,11 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -1410,7 +1142,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.64" + "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -1445,47 +1177,11 @@ ], "locked": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core", - "com.netflix.zuul:zuul-processor" - ], - "locked": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core", - "com.netflix.zuul:zuul-processor" - ], - "locked": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core", - "com.netflix.zuul:zuul-processor" - ], - "locked": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core", - "com.netflix.zuul:zuul-processor" - ], - "locked": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core", - "com.netflix.zuul:zuul-processor" - ], - "locked": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core", - "com.netflix.zuul:zuul-processor" + "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -1650,7 +1346,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.64" + "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -1665,32 +1361,6 @@ "locked": "1.7.30" } }, - "testCompile": { - "com.google.inject.extensions:guice-assistedinject": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject:guice": { - "locked": "4.2.2", - "requested": "4.2.2" - } - }, "testCompileClasspath": { "com.fasterxml.jackson.core:jackson-core": { "firstLevelTransitive": [ @@ -1708,47 +1378,11 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.google.truth:truth": { "locked": "1.0.1", @@ -1894,32 +1528,6 @@ "locked": "1.7.25" } }, - "testRuntime": { - "com.google.inject.extensions:guice-assistedinject": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject:guice": { - "locked": "4.2.2", - "requested": "4.2.2" - } - }, "testRuntimeClasspath": { "com.fasterxml.jackson.core:jackson-core": { "firstLevelTransitive": [ @@ -1940,47 +1548,11 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.google.truth:truth": { "locked": "1.0.1", @@ -2147,7 +1719,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.64" + "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 4538bf30..d9860857 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -19,47 +19,11 @@ ], "locked": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core", - "com.netflix.zuul:zuul-processor" - ], - "locked": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core", - "com.netflix.zuul:zuul-processor" - ], - "locked": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core", - "com.netflix.zuul:zuul-processor" - ], - "locked": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core", - "com.netflix.zuul:zuul-processor" - ], - "locked": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core", - "com.netflix.zuul:zuul-processor" - ], - "locked": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core", - "com.netflix.zuul:zuul-processor" + "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -224,7 +188,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.64" + "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -258,47 +222,11 @@ ], "locked": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -457,7 +385,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.64" + "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -485,47 +413,11 @@ ], "locked": "2.9.8" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -682,47 +574,11 @@ ], "locked": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -889,7 +745,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.64" + "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -925,47 +781,11 @@ ], "locked": "2.9.8" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -1130,47 +950,11 @@ ], "locked": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -1337,7 +1121,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.64" + "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -1379,47 +1163,11 @@ ], "locked": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -1586,7 +1334,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.64" + "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -1628,47 +1376,11 @@ ], "locked": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -1835,7 +1547,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.64" + "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -1869,47 +1581,11 @@ ], "locked": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -2076,7 +1752,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.64" + "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -2110,47 +1786,11 @@ ], "locked": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -2309,7 +1949,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.64" + "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -2337,47 +1977,11 @@ ], "locked": "2.9.8" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -2534,47 +2138,11 @@ ], "locked": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -2741,7 +2309,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.64" + "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -2775,47 +2343,11 @@ ], "locked": "28.1-jre" }, - "com.google.inject.extensions:guice-assistedinject": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-grapher": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-multibindings": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-servlet": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, - "com.google.inject.extensions:guice-throwingproviders": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.2", - "requested": "4.2.2" - }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.2.2", - "requested": "4.2.2" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -2982,7 +2514,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.64" + "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ diff --git a/zuul-sample/src/main/java/com/netflix/zuul/sample/push/SamplePushMessageSender.java b/zuul-sample/src/main/java/com/netflix/zuul/sample/push/SamplePushMessageSender.java index 80ffecfc..d206675a 100644 --- a/zuul-sample/src/main/java/com/netflix/zuul/sample/push/SamplePushMessageSender.java +++ b/zuul-sample/src/main/java/com/netflix/zuul/sample/push/SamplePushMessageSender.java @@ -16,13 +16,13 @@ package com.netflix.zuul.sample.push; import com.google.common.base.Strings; -import com.google.inject.Singleton; import com.netflix.zuul.netty.server.push.PushConnectionRegistry; import com.netflix.zuul.netty.server.push.PushMessageSender; import com.netflix.zuul.netty.server.push.PushUserAuth; import io.netty.channel.ChannelHandler; import io.netty.handler.codec.http.FullHttpRequest; import io.netty.handler.codec.http.HttpResponseStatus; +import javax.inject.Singleton; /** * Author: Susheel Aroskar diff --git a/zuul-sample/src/main/java/com/netflix/zuul/sample/push/SamplePushMessageSenderInitializer.java b/zuul-sample/src/main/java/com/netflix/zuul/sample/push/SamplePushMessageSenderInitializer.java index 52dd2317..85945091 100644 --- a/zuul-sample/src/main/java/com/netflix/zuul/sample/push/SamplePushMessageSenderInitializer.java +++ b/zuul-sample/src/main/java/com/netflix/zuul/sample/push/SamplePushMessageSenderInitializer.java @@ -15,11 +15,11 @@ */ package com.netflix.zuul.sample.push; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.zuul.netty.server.push.PushConnectionRegistry; import com.netflix.zuul.netty.server.push.PushMessageSender; import com.netflix.zuul.netty.server.push.PushMessageSenderInitializer; +import javax.inject.Inject; +import javax.inject.Singleton; /** * Author: Susheel Aroskar From 6b4ec86a33387f7d39e021b12e4a87056fbedbcc Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 9 Apr 2020 21:48:42 -0700 Subject: [PATCH 039/273] zuul-core: fix gzip filter order --- .../com/netflix/zuul/filters/common/GZipResponseFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/common/GZipResponseFilter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/common/GZipResponseFilter.java index 3d7fa45d..d06251a4 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/common/GZipResponseFilter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/common/GZipResponseFilter.java @@ -43,7 +43,7 @@ * * @author Mike Smith */ -@Filter(order = 101, type = FilterType.OUTBOUND) +@Filter(order = 110, type = FilterType.OUTBOUND) public class GZipResponseFilter extends HttpOutboundSyncFilter { private static DynamicStringSetProperty GZIPPABLE_CONTENT_TYPES = new DynamicStringSetProperty("zuul.gzip.contenttypes", From e66aa6039b3c8dc24e497eed88154ab6454670b8 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 10 Apr 2020 18:23:01 -0700 Subject: [PATCH 040/273] zuul-core: Add method to iterate over header entries --- .../com/netflix/zuul/message/Headers.java | 14 ++++++++++++- .../com/netflix/zuul/message/HeadersTest.java | 20 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java index 125fec60..500836cb 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java @@ -27,6 +27,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.function.BiConsumer; import java.util.function.Predicate; import javax.annotation.Nullable; @@ -149,6 +150,17 @@ private List getAllNormal(String normalName) { } } + /** + * Iterates over the header entries with the given consumer. The first argument will be the normalised header + * name as returned by {@link HeaderName#getNormalised()}. The second argument will be the value. Do not modify + * the headers during iteration. + */ + public void forEachNormalised(BiConsumer entryConsumer) { + for (int i = 0; i < size(); i++) { + entryConsumer.accept(name(i), value(i)); + } + } + /** * Replace any/all entries with this key, with this single entry. * @@ -433,7 +445,7 @@ public boolean equals(Object obj) { private Map> asMap() { Map> map = new LinkedHashMap<>(size()); for (int i = 0; i < size(); i++) { - map.computeIfAbsent(name(i), k -> new ArrayList<>()).add(value(i)); + map.computeIfAbsent(name(i), k -> new ArrayList<>(1)).add(value(i)); } // Return an unwrapped collection since it should not ever be returned on the API. return map; diff --git a/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java b/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java index a21ed370..88005c3b 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java @@ -22,7 +22,12 @@ import static org.junit.Assert.assertTrue; import com.google.common.truth.Truth; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.LinkedHashMap; import java.util.List; +import java.util.Map; import java.util.Set; import org.junit.Test; import org.junit.runner.RunWith; @@ -106,6 +111,21 @@ public void getFirst_headerName_returnsDefault() { Truth.assertThat(headers.getFirst(new HeaderName("Date"), "tuesday")).isEqualTo("tuesday"); } + @Test + public void forEachNormalised() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=Frazzle"); + Map> result = new LinkedHashMap<>(); + + headers.forEachNormalised((k, v) -> result.computeIfAbsent(k, discard -> new ArrayList<>()).add(v)); + + Truth.assertThat(result).containsExactly( + "via", Collections.singletonList("duct"), + "cookie", Arrays.asList("this=that", "frizzle=Frazzle")).inOrder(); + } + @Test public void getAll() { Headers headers = new Headers(); From 0a2ddc33a7c5b3cb48273cbcc820985fac389f74 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Sat, 11 Apr 2020 13:47:47 -0700 Subject: [PATCH 041/273] all: update to gradle 6.3 --- build.gradle | 4 +- dependencies.lock | 10 - gradle/wrapper/gradle-wrapper.jar | Bin 55190 -> 55616 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 22 +- gradlew.bat | 18 +- zuul-core/dependencies.lock | 668 +---------- zuul-processor/dependencies.lock | 412 ------- zuul-sample/dependencies.lock | 1278 +--------------------- 9 files changed, 115 insertions(+), 2299 deletions(-) diff --git a/build.gradle b/build.gradle index c55d7bec..00b2c226 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { - id 'nebula.netflixoss' version '8.0.0' - id 'nebula.dependency-lock' version '8.0.0' + id 'nebula.netflixoss' version '8.8.1' + id 'nebula.dependency-lock' version '9.0.0' id "com.google.osdetector" version "1.6.2" id "me.champeau.gradle.jmh" version "0.5.0" } diff --git a/dependencies.lock b/dependencies.lock index 51c5b634..c2280d49 100644 --- a/dependencies.lock +++ b/dependencies.lock @@ -17,16 +17,6 @@ "requested": "1.21" } }, - "jmhRuntime": { - "org.openjdk.jmh:jmh-core": { - "locked": "1.21", - "requested": "1.21" - }, - "org.openjdk.jmh:jmh-generator-bytecode": { - "locked": "1.21", - "requested": "1.21" - } - }, "jmhRuntimeClasspath": { "org.openjdk.jmh:jmh-core": { "locked": "1.21", diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 87b738cbd051603d91cc39de6cb000dd98fe6b02..5c2d1cf016b3885f6930543d57b744ea8c220a1a 100644 GIT binary patch delta 3320 zcmai0c|2768`iN!wwN(!Oxeo5?`tVU3{m#%jC~noTx!q_nHtNnR`zAgWC@krB#b55 znJk4YA);()+(!K-w|npJuix)IpYu7-^SqzuJ>T~|?;j_-ma(;-@!<_I_B>B@4FVej z11CRtM@$8afpkN^v*te{ycR9yTldxXJbmio?@}x{9}zaw&=aQt(a^ZXN9S3i8a+Z% zGc@&(5}jplZjJKk2wNlTp(mbeKL5J9Gjo==yT{-eVKj?*rT1%bQ@%#Xce~~1f{19^ zoD75QEoSzDVh@!9qG4yl`;9=Ysp?rRX=(8$VDRz=R+oA3>jLxjW-H!-2biNSYuy)U z7-B-qC5l;>qjMTg!DbWPY}h7qxi6xp)_T)_O2+*&NDg?v;RyY@5XtWHx%(ImQ_3E% zA%$s3xrxE0Fk>DhG!pG)4}I!pWJl~QtV_3Jl2W4PuWWssMq^UpGatK+4CING9pB#5 z_NDc)aonVrZuXsr5!RcE#?aXFZQjt2VMd)-p00K$EheT?H!m_D2Mdqq;0moaO=C&y zgJnvzgUn!wkx^{r049pU#gsIMhl`%{MDNl;}JRbneC zSTB=5f;o9=2Rt24_lt&%%f~m{Ts)zu8H9j`INrgMp>l-|k%Kj%U`OXL1J2e+CJHJxreHLD_#o*ZeuXE4uGDQAJS_PpEGt7hmd7psmLEBL^h zD#JbHiklZEXkk9(6uF$ErsUu^jg7c~1oRS&CuTq*Xg_cOvGw~FZ&1#p(6|jz9lJnP zSIJ)sX_W2$PSksX&}*_ejz+t*X)xK|JcakaMRGd%c*R)cQcT|?sM^#{fdjh5_I$iK zBX_d;wz+cf>b}r!i3yo6eaua)d`|Mi_|Q3mAz5Qn?#~xgE9In<;TwYN^~mtaYy#WU z*ffWtxwlk&!e@UfqQ$bn23RDFV3o-H_WM}44yQpYw;JuRf$at#XX-qmuVnKqg-Bo# zJjZE39)!{i$qJh?oJzVzWFDlSW;{Wf`Z)33Y$Fh^+qasrsEJsfy9yhyTFe?Lej&3n zEAS(D8WCt(ew(SGD z-J#7@l?KI*ZbS)AVQ23qV&{c=$@zUp0@6=kZp+5by+gnAWdB||7e=!yJ|WTpG0OC7 zKlKWFv6#(>nrEq@d1i-#L9SVxTDNb1DaY%2$=@)`k&3s8wz$M*;THa&!2Isj%6CQS zY>A4HtmWY3@9e@F)mCHJQzBz~Lt(wcJE{!CAr=wxn4|5n(jslTy)~IF?tNK zD^2#hTM0d6MDg>`9;s5*(4W1V8y}F8OT6Xap{`=h1XVKO3zrBh=;JnIs*RB>@7t5T zwV=G^T)L=(9P7tS={6`tEBBBm^u~_!-#m75G*h}y_Jj7|STtiY_LDR5UUHI@awWmB zDn6q9{2M-EHaTm53ln%ENJ$HpLwRcL>7^hUrM=}&`qmWTgtr{Ul*Lqcd_9S0xZ1s>F2dVd(s)3&$`gxFAu6jXYIS ze#M~w@=X@lm)sFI4EEiqKh7JxN=_?+}D=iHCc&S2<^VPZ6 zYKXZgvi(Yne9}k6o=ezgquABVB77}x$nKXh`@LjH&lQPqm_;MTL>4RGO|E#_7AS4@43rz=ij?gcMZalnd-JK4ILhL)Ee(3G zN}g99HmhxoBjHR~y@b>-7{f+`p zIZ<^8%d;wCA#xfwSc6$DNVPjAX6FCkb|MQ|6hFyz9UhoLF0^xUd#*^2Ofn zOJgmwDyb1=Z8T)ArRy|VQOM+BrhZ>W_ELJ6u(d^JTu|j%*6g8JKZ-ewoj)sXJCdS= zHOo?HscL;Z`H18}%WnE1&o42KZ+=fg(*VN>t>kRkcd{mP9NF6;MnzH&m2WsD)sX~h zbhv|Ux$w2avQwoI`IKiGMLrL;Z>R}Y_0K*L=63V z)ut+5tM74Glzb?92kbu5@3M#1Hi7K3$c)?TL$}`aKf0hC3`r!>Xy3!f{ z`}Y#@$`|mG1JlKzVE!vD04aX}x#hV*+AC>bQ|%XJ1<&;=0?uX!RM?CIB=+!tgkB-w zu*HF--^U4#nG1mXz0v^0@|UCs1lt}!1zTaTwoe+k?sPym`pyB-F25ivXx)#1|1%|e zJ7Vpujkk#Lu%U{v6xiQ5LW2`~QXrR`ja@*L=b0ejT977v%C)0WAik0gV7U z6a-7##p#p>>>3a{^Z}e3Z~?A|foBFU12bqaEE*0vqdCCVLFq%{;F%$Dkb6i8;Qo!C z&;zkU(!i5zbSMd)zQzg8(kU^HPQ^flVIzR)<^jwbwget09YD?zV*rx+mx@0IN{#S< zsB|8Ve>>sJI7sHE!@=(((ttqL0ks%C4M^r5!0H?rJ;MV|jtT)1cMl{|9xo_Okp@Ka ze^CzbCPf?IDFWLlE`V1FDDpZ0C@7~VMZt%!6%SFtxz{!Tb1UfBDEg~49x!4|2#_L! zX=6UXeh28_?VY*suC^Sy!?XXp?9-G{ zEbF`ELqycMcTK-$-pw|Jox9S^<_NX$7{PI7aX1p5N>aOyj&D01H#;3?=q^!=_mq@k zUHheWO_|CDYA~8r<-%q8&Gm$uPSx4S`reKPnv?Nif4kS)^smTg&m@kLYT87txGxGxw+Qc zTAi=`vzavOlyLrgf2A~;1~Gx$jcb|fkhfctRt6CjRooL|#wr)(*8D4n;2cBe>p9_T zCeJf!IgCH0h1m)UPLk3hZz120oe5YH$oXjSMHcPv@#wX;OP5bBSJMavm2}5Q8(V&# zXGA!+dAwOiXuQ)|+XwF2HW1@_MPm3*v{M86V_~+xk1K7cI7mxBKU5#bofCjZqqjs$ z(sipv#Ul%KJ)h?ua}a3Dg(6yaxeJ(HD-&`AT9kZJVLJTz?WIfgao$bYwEhXh+&GA= zkpI03HVxtWc*H!~z~9%DC;;Qej=WppOD!i1$MO1`&8LW%IWd2sbnS7j+<0b`v1%qx!owUU+ZIHJFp1yH9BFvUYI^up=ZYX$K_YM|Bn2fCG3sq#(EpRB$|A9~9*^M%Sq)EAjr0&W`hHyz96Z9h*odHK|Ju$JQ0c zO9oayZQv;2b{pLJo`T)C%yS@sAKO*WC%22XDmrdRTd;uFr*sb_{GDl=*Y`l*;>lNWh=XCbn#V}C&jmw3>t zNH(fnG%j@AI$TSggf(e3DxrpHjnpeKExsb|hC`kxjD4HUSmu)&aJNt&DtCWh#51*} zS!qfplP(f0`hJ)VHrXFD_uB7ia4#%U)3S8lGY9^(T1)M8xQxP*3w4&QJr~O`$A&N5 z_taom$34zt+reJDV?oZ*qr5ERUH7#~xm7)D(u#q#m`~~-F+TZ6Q*L)s_#T3GZUuZM zhCH9!{qXnD)9jln$|GDeDPqo=+D6#vQkAjdHtT>{VxU#AQJW-je=UWN5*R>v5vWF6 zK_6z?#thq>&%@fu5epvO$rfx`v9GojdOLGFaQ2V8?Ri z(?L2JBK(;G)bIF7r5T6Ahzst5k4j#hvhl3a`@Ksfyj3^Cx}zGE)vm$ecB$?~2`S&e zE)Nx6TiDO*JO6UmWWc+zLDmnII+)ROEvW3_{*%Fjs8Q^k4+Z&cJ0lp=@p*N!fw0>L zPSWrxar=HPDCwZnmN%orA-K2142{bJ0el>N{KM(xoHJu_HWSQihq^y%SEmj>CsBjl zj6)jxqm7NwiVHh-xQ`ex^02-y_ZO`A`P(1UwLK5G_T8=uI8@e%Kh31Xay z>H$7OG8cQ%>c_RjXhRA|Yh=93MnM)V0JlD#yP-1YNx}5`sg}-vE%slfve&}e$*L>+ zSAq_CMc5SYx6N)5h%-)?JOAhiVM5`TWT7?<9 zKKxMMb9GXHpQ1ajAr?!hxcauobJLf{IpvJ=9ny}FwdGCYmwgj?0qhIG{5zbTTVc2b zo+3h|{F_Yg96k{?rVn`m`%d??#avI-eh^XnTH2r*o>5n>`UuIsuCIeN5Br62W!Yy#8)0uWcVG%-QnMHczpWoe zftoSf-WJq~x8`|ws<-9{Va9@s#SoH3uw`>4!~uyB-(lV)SD9f(TPNa!o7JLL%!a)@gUmedno%~}$ z#zZLYah$5mf@Z2}a(oDDM^$qq>*nb;?aVn?D`($Om=?j+T%S?eSgR1t=zzwGw|kvM zt~WiOO&UVW=7N=8ERxM<4?Wbj4bPIP4z3=hjp(uuT}ne*E9ct0)Lsk?bG=1nNo=oB z0JEoKzAw45q-lB!IbJKsY=Lpru48qY6ql!Z#J13ywC&7??l&AtxiowZ|Cg(k*UE#@ zrJm|m^EV_6jz}f($PrOb`S;imdEwtu`#cCu3aMXBgUUH4t2j_qu=KmOO645(v(_DL z^G5PF%RR0@X5D{(V%x5L{xD1Sa>^wR+$0j(DeVfwk;tp3<@i$~qOsvx^uUy!zV8G0~0`$f?VV=?vm zOwYnZB>UV_b#sh6ibtN`5I+l%mTE9T%*J!xaz}cWisUNLg@>nEiKv4hgmv`5C)GIDbBOgq{?5K-!=>z{CLJ$wIBkL-~yV{}~e*^#eZ1f%)RR;DgcM zfOqnA#42!t$D;@!QT3n50ve1d0$Zl^m}ABc){bz2HDhq#o&{ZLlQ=*lO9Alv7y_uW z`bTL2KkVsP<{%6$`1yeL}DmCZuxPZRJp*( z*Kk1M23@g@UjhQ6PEZ{58CL@Aqv>cB0|#ltT;SR`95{}ptMe0@zz&v<>j{GNDt-bE zn5EFw?u0e)Ee+J0^aq@C>E_j>A%MyU^@?Rcohe{^TCd{d<=ub5$bWAh Date: Sat, 11 Apr 2020 14:05:55 -0700 Subject: [PATCH 042/273] all: avoid gradle 6.3 warnings where possible --- build.gradle | 2 + zuul-core/build.gradle | 37 +++++------ .../common/HttpRequestReadTimeoutHandler.java | 3 - zuul-processor/dependencies.lock | 36 ----------- zuul-sample/build.gradle | 8 ++- zuul-sample/dependencies.lock | 63 +++++++------------ 6 files changed, 50 insertions(+), 99 deletions(-) diff --git a/build.gradle b/build.gradle index 00b2c226..a38413c9 100644 --- a/build.gradle +++ b/build.gradle @@ -51,6 +51,8 @@ subprojects { tasks.withType(Javadoc).each { it.classpath = sourceSets.main.compileClasspath + // Ignore Javadoc warnings for now, re-enable after Zuul 3. + it.options.addStringOption('Xdoclint:none', '-quiet') } ext { diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index e837f7f1..8ab2083b 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -2,27 +2,28 @@ apply plugin: "com.google.osdetector" apply plugin: "java-library" dependencies { - compile 'commons-configuration:commons-configuration:1.8' + implementation 'commons-configuration:commons-configuration:1.8' implementation libraries.guava - compile "org.codehaus.groovy:groovy-all:${versions_groovy}" + api "org.codehaus.groovy:groovy-all:${versions_groovy}" // TODO(carl-mastrangelo): this can be implementation; remove Logger from public api points. api libraries.slf4j implementation 'org.bouncycastle:bcprov-jdk15on:1.+' - compile 'com.fasterxml.jackson.core:jackson-core:2.9.8' - compile 'com.fasterxml.jackson.core:jackson-databind:2.9.8' + implementation 'com.fasterxml.jackson.core:jackson-core:2.9.8' + api 'com.fasterxml.jackson.core:jackson-databind:2.9.8' - compile "com.netflix.archaius:archaius-core:0.7.5" - compile "com.netflix.servo:servo-core:0.7.2" - compile "com.netflix.spectator:spectator-api:0.103.0" - compile "com.netflix.netflix-commons:netflix-commons-util:0.3.0" + api "com.netflix.archaius:archaius-core:0.7.5" + api "com.netflix.servo:servo-core:0.7.2" + api "com.netflix.spectator:spectator-api:0.103.0" + api "com.netflix.netflix-commons:netflix-commons-util:0.3.0" - compile "com.netflix.ribbon:ribbon-core:${versions_ribbon}" - compile "com.netflix.ribbon:ribbon-httpclient:${versions_ribbon}" - compile "com.netflix.ribbon:ribbon-loadbalancer:${versions_ribbon}" - compile "com.netflix.ribbon:ribbon-eureka:${versions_ribbon}" - compile "com.netflix.ribbon:ribbon-archaius:${versions_ribbon}" - compile "com.netflix.eureka:eureka-client:1.9.18" - compile "io.reactivex:rxjava:1.2.1" + api "com.netflix.ribbon:ribbon-core:${versions_ribbon}" + api "com.netflix.ribbon:ribbon-httpclient:${versions_ribbon}" + api "com.netflix.ribbon:ribbon-loadbalancer:${versions_ribbon}" + api "com.netflix.ribbon:ribbon-eureka:${versions_ribbon}" + api "com.netflix.ribbon:ribbon-archaius:${versions_ribbon}" + // TODO(carl-mastrangelo): this is not actually needed, but it is pulling in API deps. Remove it. + api "com.netflix.eureka:eureka-client:1.9.18" + api "io.reactivex:rxjava:1.2.1" // TODO(carl-mastrangelo): some of these could probably be implementation. Do a deeper check. api "io.netty:netty-common:${versions_netty}" @@ -40,12 +41,12 @@ dependencies { api(group: 'com.google.inject', name: 'guice', version: "4.2.3") // To ensure that zuul-netty gets this correct later version. - compile "com.netflix.governator:governator:1.+" - compile "com.netflix.governator:governator-core:1.+" + api "com.netflix.governator:governator:1.+" + api "com.netflix.governator:governator-core:1.+" implementation 'io.perfmark:perfmark-api:0.21.0' - testCompile "com.netflix.governator:governator-test-junit:1.+" + testImplementation "com.netflix.governator:governator-test-junit:1.+" testImplementation libraries.junit, libraries.truth testRuntimeOnly 'org.slf4j:slf4j-simple:1.7.29' diff --git a/zuul-core/src/main/java/com/netflix/netty/common/HttpRequestReadTimeoutHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/HttpRequestReadTimeoutHandler.java index 6dc26ad0..583d7ae9 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/HttpRequestReadTimeoutHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/HttpRequestReadTimeoutHandler.java @@ -56,9 +56,6 @@ protected HttpRequestReadTimeoutHandler(long timeout, TimeUnit unit, BasicCounte /** * Factory which ensures that this handler is added to the pipeline using the * correct name. - * - * @param timeout - * @param unit */ public static void addLast(ChannelPipeline pipeline, long timeout, TimeUnit unit, BasicCounter httpRequestReadTimeoutCounter) { diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 825bafcf..b0d6f994 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -1,11 +1,5 @@ { "compileClasspath": { - "com.fasterxml.jackson.core:jackson-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.9.8" - }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -97,12 +91,6 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-configuration:commons-configuration": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.8" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -167,12 +155,6 @@ } }, "jmhCompileClasspath": { - "com.fasterxml.jackson.core:jackson-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.9.8" - }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -264,12 +246,6 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-configuration:commons-configuration": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.8" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -950,12 +926,6 @@ } }, "testCompileClasspath": { - "com.fasterxml.jackson.core:jackson-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.9.8" - }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1051,12 +1021,6 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-configuration:commons-configuration": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.8" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" diff --git a/zuul-sample/build.gradle b/zuul-sample/build.gradle index 48e6f573..00933c4f 100644 --- a/zuul-sample/build.gradle +++ b/zuul-sample/build.gradle @@ -3,12 +3,14 @@ apply plugin: "java" apply plugin: 'application' dependencies { - compile project(":zuul-core") + implementation project(":zuul-core") + implementation "com.netflix.eureka:eureka-client:1.9.18" + implementation 'commons-configuration:commons-configuration:1.8' annotationProcessor project(":zuul-processor") - runtime 'org.apache.logging.log4j:log4j-core:2.13.1' - runtime 'org.apache.logging.log4j:log4j-slf4j-impl:2.13.1' + runtimeOnly 'org.apache.logging.log4j:log4j-core:2.13.1' + runtimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl:2.13.1' } diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 893c15d6..46ccaa65 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -204,12 +204,6 @@ } }, "compileClasspath": { - "com.fasterxml.jackson.core:jackson-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.9.8" - }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -232,7 +226,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.18" + "locked": "1.9.18", + "requested": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -298,10 +293,8 @@ "project": true }, "commons-configuration:commons-configuration": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.8" + "locked": "1.8", + "requested": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ @@ -367,12 +360,6 @@ } }, "jmhCompileClasspath": { - "com.fasterxml.jackson.core:jackson-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.9.8" - }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -395,7 +382,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.18" + "locked": "1.9.18", + "requested": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -461,10 +449,8 @@ "project": true }, "commons-configuration:commons-configuration": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.8" + "locked": "1.8", + "requested": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ @@ -564,7 +550,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.18" + "locked": "1.9.18", + "requested": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -633,7 +620,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.8" + "locked": "1.8", + "requested": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ @@ -777,7 +765,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.18" + "locked": "1.9.18", + "requested": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -846,7 +835,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.8" + "locked": "1.8", + "requested": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ @@ -948,12 +938,6 @@ } }, "testCompileClasspath": { - "com.fasterxml.jackson.core:jackson-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.9.8" - }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -976,7 +960,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.18" + "locked": "1.9.18", + "requested": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -1042,10 +1027,8 @@ "project": true }, "commons-configuration:commons-configuration": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.8" + "locked": "1.8", + "requested": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ @@ -1137,7 +1120,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.18" + "locked": "1.9.18", + "requested": "1.9.18" }, "com.netflix.governator:governator": { "firstLevelTransitive": [ @@ -1206,7 +1190,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.8" + "locked": "1.8", + "requested": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ From 0c57978fc6b7641da3640f7c7d7f1a286c5d4095 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 14 Apr 2020 11:13:02 -0700 Subject: [PATCH 043/273] zuul-core,zuul-guice: factor guice dependency to separate module --- settings.gradle | 1 + zuul-core/build.gradle | 11 +- zuul-core/dependencies.lock | 144 +-- .../com/netflix/zuul/FilterFileManager.java | 9 +- .../zuul/netty/server/BaseServerStartup.java | 8 +- .../netty/server/DirectMemoryMonitor.java | 14 +- zuul-guice/build.gradle | 18 + zuul-guice/dependencies.lock | 1022 +++++++++++++++++ .../zuul/guice/GuiceFilterFactory.java | 0 .../netflix/zuul/init/ZuulFiltersModule.java | 0 .../guice/GuiceFilterFactoryIntegTest.java | 0 .../guice/TestGuiceConstructorFilter.java | 0 .../zuul/guice/TestGuiceFieldFilter.java | 0 .../com/netflix/zuul/init/InitTestModule.java | 0 .../com/netflix/zuul/init/TestZuulFilter.java | 0 .../zuul/init/ZuulFiltersModuleIntegTest.java | 0 .../zuul/init/ZuulFiltersModuleTest.java | 26 +- .../netflix/zuul/init2/TestZuulFilter2.java | 0 zuul-processor/dependencies.lock | 174 +-- zuul-sample/build.gradle | 5 +- zuul-sample/dependencies.lock | 165 ++- 21 files changed, 1207 insertions(+), 390 deletions(-) create mode 100644 zuul-guice/build.gradle create mode 100644 zuul-guice/dependencies.lock rename {zuul-core => zuul-guice}/src/main/java/com/netflix/zuul/guice/GuiceFilterFactory.java (100%) rename {zuul-core => zuul-guice}/src/main/java/com/netflix/zuul/init/ZuulFiltersModule.java (100%) rename {zuul-core => zuul-guice}/src/test/java/com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java (100%) rename {zuul-core => zuul-guice}/src/test/java/com/netflix/zuul/guice/TestGuiceConstructorFilter.java (100%) rename {zuul-core => zuul-guice}/src/test/java/com/netflix/zuul/guice/TestGuiceFieldFilter.java (100%) rename {zuul-core => zuul-guice}/src/test/java/com/netflix/zuul/init/InitTestModule.java (100%) rename {zuul-core => zuul-guice}/src/test/java/com/netflix/zuul/init/TestZuulFilter.java (100%) rename {zuul-core => zuul-guice}/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java (100%) rename {zuul-core => zuul-guice}/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleTest.java (67%) rename {zuul-core => zuul-guice}/src/test/java/com/netflix/zuul/init2/TestZuulFilter2.java (100%) diff --git a/settings.gradle b/settings.gradle index 7c94b213..6bb18532 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,5 +1,6 @@ rootProject.name='zuul' include 'zuul-core' +include 'zuul-guice' include 'zuul-processor' include 'zuul-sample' diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index 8ab2083b..ae85568e 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -2,7 +2,7 @@ apply plugin: "com.google.osdetector" apply plugin: "java-library" dependencies { - implementation 'commons-configuration:commons-configuration:1.8' + implementation libraries.guava api "org.codehaus.groovy:groovy-all:${versions_groovy}" // TODO(carl-mastrangelo): this can be implementation; remove Logger from public api points. @@ -38,16 +38,11 @@ dependencies { implementation "io.netty:netty-transport-native-kqueue:${versions_netty}:osx-x86_64" runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.30.Final" - api(group: 'com.google.inject', name: 'guice', version: "4.2.3") - - // To ensure that zuul-netty gets this correct later version. - api "com.netflix.governator:governator:1.+" - api "com.netflix.governator:governator-core:1.+" - implementation 'io.perfmark:perfmark-api:0.21.0' + implementation 'javax.inject:javax.inject:1' - testImplementation "com.netflix.governator:governator-test-junit:1.+" testImplementation libraries.junit, + libraries.mockito, libraries.truth testRuntimeOnly 'org.slf4j:slf4j-simple:1.7.29' } diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index a0fc1f51..93bf6efc 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -12,10 +12,6 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject:guice": { - "locked": "4.2.3", - "requested": "4.2.3" - }, "com.netflix.archaius:archaius-core": { "locked": "0.7.5", "requested": "0.7.5" @@ -24,14 +20,6 @@ "locked": "1.9.18", "requested": "1.9.18" }, - "com.netflix.governator:governator": { - "locked": "1.17.10", - "requested": "1.+" - }, - "com.netflix.governator:governator-core": { - "locked": "1.17.10", - "requested": "1.+" - }, "com.netflix.netflix-commons:netflix-commons-util": { "locked": "0.3.0", "requested": "0.3.0" @@ -64,10 +52,6 @@ "locked": "0.103.0", "requested": "0.103.0" }, - "commons-configuration:commons-configuration": { - "locked": "1.8", - "requested": "1.8" - }, "io.netty:netty-buffer": { "locked": "4.1.48.Final", "requested": "4.1.48.Final" @@ -112,6 +96,10 @@ "locked": "1.2.1", "requested": "1.2.1" }, + "javax.inject:javax.inject": { + "locked": "1", + "requested": "1" + }, "org.bouncycastle:bcprov-jdk15on": { "locked": "1.65", "requested": "1.+" @@ -146,10 +134,6 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject:guice": { - "locked": "4.2.3", - "requested": "4.2.3" - }, "com.netflix.archaius:archaius-core": { "locked": "0.7.5", "requested": "0.7.5" @@ -158,14 +142,6 @@ "locked": "1.9.18", "requested": "1.9.18" }, - "com.netflix.governator:governator": { - "locked": "1.17.10", - "requested": "1.+" - }, - "com.netflix.governator:governator-core": { - "locked": "1.17.10", - "requested": "1.+" - }, "com.netflix.netflix-commons:netflix-commons-util": { "locked": "0.3.0", "requested": "0.3.0" @@ -198,10 +174,6 @@ "locked": "0.103.0", "requested": "0.103.0" }, - "commons-configuration:commons-configuration": { - "locked": "1.8", - "requested": "1.8" - }, "io.netty:netty-buffer": { "locked": "4.1.48.Final", "requested": "4.1.48.Final" @@ -246,6 +218,10 @@ "locked": "1.2.1", "requested": "1.2.1" }, + "javax.inject:javax.inject": { + "locked": "1", + "requested": "1" + }, "org.bouncycastle:bcprov-jdk15on": { "locked": "1.65", "requested": "1.+" @@ -280,10 +256,6 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject:guice": { - "locked": "4.2.3", - "requested": "4.2.3" - }, "com.google.truth:truth": { "locked": "1.0.1", "requested": "1.0.1" @@ -296,18 +268,6 @@ "locked": "1.9.18", "requested": "1.9.18" }, - "com.netflix.governator:governator": { - "locked": "1.17.10", - "requested": "1.+" - }, - "com.netflix.governator:governator-core": { - "locked": "1.17.10", - "requested": "1.+" - }, - "com.netflix.governator:governator-test-junit": { - "locked": "1.17.10", - "requested": "1.+" - }, "com.netflix.netflix-commons:netflix-commons-util": { "locked": "0.3.0", "requested": "0.3.0" @@ -340,10 +300,6 @@ "locked": "0.103.0", "requested": "0.103.0" }, - "commons-configuration:commons-configuration": { - "locked": "1.8", - "requested": "1.8" - }, "io.netty:netty-buffer": { "locked": "4.1.48.Final", "requested": "4.1.48.Final" @@ -392,6 +348,10 @@ "locked": "1.2.1", "requested": "1.2.1" }, + "javax.inject:javax.inject": { + "locked": "1", + "requested": "1" + }, "junit:junit": { "locked": "4.13", "requested": "4.13" @@ -404,6 +364,10 @@ "locked": "2.4.4", "requested": "2.4.4" }, + "org.mockito:mockito-core": { + "locked": "1.10.19", + "requested": "1.10.19" + }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", "requested": "1.21" @@ -434,10 +398,6 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject:guice": { - "locked": "4.2.3", - "requested": "4.2.3" - }, "com.netflix.archaius:archaius-core": { "locked": "0.7.6", "requested": "0.7.5" @@ -446,14 +406,6 @@ "locked": "1.9.18", "requested": "1.9.18" }, - "com.netflix.governator:governator": { - "locked": "1.17.10", - "requested": "1.+" - }, - "com.netflix.governator:governator-core": { - "locked": "1.17.10", - "requested": "1.+" - }, "com.netflix.netflix-commons:netflix-commons-util": { "locked": "0.3.0", "requested": "0.3.0" @@ -486,10 +438,6 @@ "locked": "0.103.0", "requested": "0.103.0" }, - "commons-configuration:commons-configuration": { - "locked": "1.8", - "requested": "1.8" - }, "io.netty:netty-buffer": { "locked": "4.1.48.Final", "requested": "4.1.48.Final" @@ -538,6 +486,10 @@ "locked": "1.2.1", "requested": "1.2.1" }, + "javax.inject:javax.inject": { + "locked": "1", + "requested": "1" + }, "org.bouncycastle:bcprov-jdk15on": { "locked": "1.65", "requested": "1.+" @@ -564,10 +516,6 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject:guice": { - "locked": "4.2.3", - "requested": "4.2.3" - }, "com.google.truth:truth": { "locked": "1.0.1", "requested": "1.0.1" @@ -580,18 +528,6 @@ "locked": "1.9.18", "requested": "1.9.18" }, - "com.netflix.governator:governator": { - "locked": "1.17.10", - "requested": "1.+" - }, - "com.netflix.governator:governator-core": { - "locked": "1.17.10", - "requested": "1.+" - }, - "com.netflix.governator:governator-test-junit": { - "locked": "1.17.10", - "requested": "1.+" - }, "com.netflix.netflix-commons:netflix-commons-util": { "locked": "0.3.0", "requested": "0.3.0" @@ -624,10 +560,6 @@ "locked": "0.103.0", "requested": "0.103.0" }, - "commons-configuration:commons-configuration": { - "locked": "1.8", - "requested": "1.8" - }, "io.netty:netty-buffer": { "locked": "4.1.48.Final", "requested": "4.1.48.Final" @@ -672,6 +604,10 @@ "locked": "1.2.1", "requested": "1.2.1" }, + "javax.inject:javax.inject": { + "locked": "1", + "requested": "1" + }, "junit:junit": { "locked": "4.13", "requested": "4.13" @@ -684,6 +620,10 @@ "locked": "2.4.4", "requested": "2.4.4" }, + "org.mockito:mockito-core": { + "locked": "1.10.19", + "requested": "1.10.19" + }, "org.slf4j:slf4j-api": { "locked": "1.7.25", "requested": "1.7.25" @@ -702,10 +642,6 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject:guice": { - "locked": "4.2.3", - "requested": "4.2.3" - }, "com.google.truth:truth": { "locked": "1.0.1", "requested": "1.0.1" @@ -718,18 +654,6 @@ "locked": "1.9.18", "requested": "1.9.18" }, - "com.netflix.governator:governator": { - "locked": "1.17.10", - "requested": "1.+" - }, - "com.netflix.governator:governator-core": { - "locked": "1.17.10", - "requested": "1.+" - }, - "com.netflix.governator:governator-test-junit": { - "locked": "1.17.10", - "requested": "1.+" - }, "com.netflix.netflix-commons:netflix-commons-util": { "locked": "0.3.0", "requested": "0.3.0" @@ -762,10 +686,6 @@ "locked": "0.103.0", "requested": "0.103.0" }, - "commons-configuration:commons-configuration": { - "locked": "1.8", - "requested": "1.8" - }, "io.netty:netty-buffer": { "locked": "4.1.48.Final", "requested": "4.1.48.Final" @@ -814,6 +734,10 @@ "locked": "1.2.1", "requested": "1.2.1" }, + "javax.inject:javax.inject": { + "locked": "1", + "requested": "1" + }, "junit:junit": { "locked": "4.13", "requested": "4.13" @@ -826,6 +750,10 @@ "locked": "2.4.4", "requested": "2.4.4" }, + "org.mockito:mockito-core": { + "locked": "1.10.19", + "requested": "1.10.19" + }, "org.slf4j:slf4j-api": { "locked": "1.7.30", "requested": "1.7.25" diff --git a/zuul-core/src/main/java/com/netflix/zuul/FilterFileManager.java b/zuul-core/src/main/java/com/netflix/zuul/FilterFileManager.java index cf581952..f7634063 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/FilterFileManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/FilterFileManager.java @@ -30,8 +30,6 @@ import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; import javax.inject.Inject; import javax.inject.Singleton; import org.slf4j.Logger; @@ -74,7 +72,7 @@ public FilterFileManager(FilterFileManagerConfig config, FilterLoader filterLoad * * @throws Exception */ - @PostConstruct + @Inject public void init() throws Exception { long startTime = System.currentTimeMillis(); @@ -89,7 +87,6 @@ public void init() throws Exception /** * Shuts down the poller */ - @PreDestroy public void shutdown() { stopPoller(); } @@ -100,6 +97,10 @@ void stopPoller() { void startPoller() { poller = new Thread("GroovyFilterFileManagerPoller") { + { + setDaemon(true); + } + public void run() { while (bRunning) { try { diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java index 1578c314..f2d6627a 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java @@ -47,14 +47,12 @@ import io.netty.util.concurrent.GlobalEventExecutor; import java.net.InetSocketAddress; import java.net.SocketAddress; +import java.util.Map; import javax.annotation.Nullable; +import javax.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.annotation.PostConstruct; -import javax.inject.Inject; -import java.util.Map; - public abstract class BaseServerStartup { protected static final Logger LOG = LoggerFactory.getLogger(BaseServerStartup.class); @@ -102,7 +100,7 @@ public Server server() return server; } - @PostConstruct + @Inject public void init() throws Exception { ChannelGroup clientChannels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/DirectMemoryMonitor.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/DirectMemoryMonitor.java index 0602edf3..1f0a42f7 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/DirectMemoryMonitor.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/DirectMemoryMonitor.java @@ -20,18 +20,16 @@ import com.netflix.servo.DefaultMonitorRegistry; import com.netflix.servo.monitor.LongGauge; import com.netflix.servo.monitor.MonitorConfig; -import io.netty.util.internal.PlatformDependent; -import java.util.function.Supplier; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.annotation.PostConstruct; -import javax.inject.Singleton; import java.lang.reflect.Field; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; +import java.util.function.Supplier; +import javax.inject.Inject; +import javax.inject.Singleton; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * User: michaels@netflix.com @@ -102,7 +100,7 @@ public DirectMemoryMonitor() { DefaultMonitorRegistry.getInstance().register(maxMemoryGauge); } - @PostConstruct + @Inject public void init() { if (directMemoryLimitGetter == null || reservedMemoryGetter == null) { return; diff --git a/zuul-guice/build.gradle b/zuul-guice/build.gradle new file mode 100644 index 00000000..283d8e69 --- /dev/null +++ b/zuul-guice/build.gradle @@ -0,0 +1,18 @@ +apply plugin: "java-library" + +dependencies { + implementation project(":zuul-core") + api(group: 'com.google.inject', name: 'guice', version: "4.2.3") + implementation 'commons-configuration:commons-configuration:1.8' + + testImplementation "com.netflix.governator:governator-test-junit:1.+" + testImplementation libraries.junit, + libraries.truth +} + +// Silences log statements during tests. This still allows normal failures to be printed. +test { + testLogging { + showStandardStreams = false + } +} diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock new file mode 100644 index 00000000..7a4b81d0 --- /dev/null +++ b/zuul-guice/dependencies.lock @@ -0,0 +1,1022 @@ +{ + "compileClasspath": { + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.inject:guice": { + "locked": "4.2.3", + "requested": "4.2.3" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.5" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.2" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-configuration:commons-configuration": { + "locked": "1.8", + "requested": "1.8" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "jmh": { + "org.openjdk.jmh:jmh-core": { + "locked": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21" + } + }, + "jmhCompileClasspath": { + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.inject:guice": { + "locked": "4.2.3", + "requested": "4.2.3" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.5" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.2" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-configuration:commons-configuration": { + "locked": "1.8", + "requested": "1.8" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.openjdk.jmh:jmh-core": { + "locked": "1.21", + "requested": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21", + "requested": "1.21" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "jmhRuntimeClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.1-jre" + }, + "com.google.inject:guice": { + "locked": "4.2.3", + "requested": "4.2.3" + }, + "com.google.truth:truth": { + "locked": "1.0.1", + "requested": "1.0.1" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.governator:governator-test-junit": { + "locked": "1.17.10", + "requested": "1.+" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-configuration:commons-configuration": { + "locked": "1.8", + "requested": "1.8" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.30.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.21.0" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "javax.inject:javax.inject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1" + }, + "junit:junit": { + "locked": "4.13", + "requested": "4.13" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.65" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.openjdk.jmh:jmh-core": { + "locked": "1.21", + "requested": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21", + "requested": "1.21" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.30" + } + }, + "runtimeClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.1-jre" + }, + "com.google.inject:guice": { + "locked": "4.2.3", + "requested": "4.2.3" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-configuration:commons-configuration": { + "locked": "1.8", + "requested": "1.8" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.30.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.21.0" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "javax.inject:javax.inject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.65" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.30" + } + }, + "testCompileClasspath": { + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.inject:guice": { + "locked": "4.2.3", + "requested": "4.2.3" + }, + "com.google.truth:truth": { + "locked": "1.0.1", + "requested": "1.0.1" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.5" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.governator:governator-test-junit": { + "locked": "1.17.10", + "requested": "1.+" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.2" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-configuration:commons-configuration": { + "locked": "1.8", + "requested": "1.8" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "locked": "4.13", + "requested": "4.13" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "testRuntimeClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.1-jre" + }, + "com.google.inject:guice": { + "locked": "4.2.3", + "requested": "4.2.3" + }, + "com.google.truth:truth": { + "locked": "1.0.1", + "requested": "1.0.1" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.governator:governator-test-junit": { + "locked": "1.17.10", + "requested": "1.+" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-configuration:commons-configuration": { + "locked": "1.8", + "requested": "1.8" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.30.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.21.0" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "javax.inject:javax.inject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1" + }, + "junit:junit": { + "locked": "4.13", + "requested": "4.13" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.65" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.30" + } + } +} \ No newline at end of file diff --git a/zuul-core/src/main/java/com/netflix/zuul/guice/GuiceFilterFactory.java b/zuul-guice/src/main/java/com/netflix/zuul/guice/GuiceFilterFactory.java similarity index 100% rename from zuul-core/src/main/java/com/netflix/zuul/guice/GuiceFilterFactory.java rename to zuul-guice/src/main/java/com/netflix/zuul/guice/GuiceFilterFactory.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/init/ZuulFiltersModule.java b/zuul-guice/src/main/java/com/netflix/zuul/init/ZuulFiltersModule.java similarity index 100% rename from zuul-core/src/main/java/com/netflix/zuul/init/ZuulFiltersModule.java rename to zuul-guice/src/main/java/com/netflix/zuul/init/ZuulFiltersModule.java diff --git a/zuul-core/src/test/java/com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java b/zuul-guice/src/test/java/com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java similarity index 100% rename from zuul-core/src/test/java/com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java rename to zuul-guice/src/test/java/com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java diff --git a/zuul-core/src/test/java/com/netflix/zuul/guice/TestGuiceConstructorFilter.java b/zuul-guice/src/test/java/com/netflix/zuul/guice/TestGuiceConstructorFilter.java similarity index 100% rename from zuul-core/src/test/java/com/netflix/zuul/guice/TestGuiceConstructorFilter.java rename to zuul-guice/src/test/java/com/netflix/zuul/guice/TestGuiceConstructorFilter.java diff --git a/zuul-core/src/test/java/com/netflix/zuul/guice/TestGuiceFieldFilter.java b/zuul-guice/src/test/java/com/netflix/zuul/guice/TestGuiceFieldFilter.java similarity index 100% rename from zuul-core/src/test/java/com/netflix/zuul/guice/TestGuiceFieldFilter.java rename to zuul-guice/src/test/java/com/netflix/zuul/guice/TestGuiceFieldFilter.java diff --git a/zuul-core/src/test/java/com/netflix/zuul/init/InitTestModule.java b/zuul-guice/src/test/java/com/netflix/zuul/init/InitTestModule.java similarity index 100% rename from zuul-core/src/test/java/com/netflix/zuul/init/InitTestModule.java rename to zuul-guice/src/test/java/com/netflix/zuul/init/InitTestModule.java diff --git a/zuul-core/src/test/java/com/netflix/zuul/init/TestZuulFilter.java b/zuul-guice/src/test/java/com/netflix/zuul/init/TestZuulFilter.java similarity index 100% rename from zuul-core/src/test/java/com/netflix/zuul/init/TestZuulFilter.java rename to zuul-guice/src/test/java/com/netflix/zuul/init/TestZuulFilter.java diff --git a/zuul-core/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java b/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java similarity index 100% rename from zuul-core/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java rename to zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java diff --git a/zuul-core/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleTest.java b/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleTest.java similarity index 67% rename from zuul-core/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleTest.java rename to zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleTest.java index af7dfe02..b9cd048d 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleTest.java +++ b/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleTest.java @@ -20,7 +20,9 @@ import org.apache.commons.configuration.AbstractConfiguration; import org.junit.Test; import org.junit.runner.RunWith; +import org.mockito.Matchers; import org.mockito.Mock; +import org.mockito.Mockito; import org.mockito.runners.MockitoJUnitRunner; import static org.hamcrest.CoreMatchers.equalTo; @@ -38,7 +40,7 @@ public class ZuulFiltersModuleTest { @Test public void testDefaultFilterLocations() { - when(configuration.getStringArray(eq("zuul.filters.locations"))).thenReturn("inbound,outbound,endpoint".split(",")); + Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.locations"))).thenReturn("inbound,outbound,endpoint".split(",")); String[] filterLocations = module.findFilterLocations(configuration); @@ -48,7 +50,7 @@ public void testDefaultFilterLocations() { @Test public void testEmptyFilterLocations() { - when(configuration.getStringArray(eq("zuul.filters.locations"))).thenReturn(new String[0]); + Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.locations"))).thenReturn(new String[0]); String[] filterLocations = module.findFilterLocations(configuration); @@ -57,8 +59,8 @@ public void testEmptyFilterLocations() { @Test public void testEmptyClassNames() { - when(configuration.getStringArray(eq("zuul.filters.classes"))).thenReturn(new String[]{}); - when(configuration.getStringArray(eq("zuul.filters.packages"))).thenReturn(new String[]{}); + Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.classes"))).thenReturn(new String[]{}); + Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.packages"))).thenReturn(new String[]{}); String[] classNames = module.findClassNames(configuration); @@ -70,8 +72,8 @@ public void testClassNamesOnly() { Class expectedClass = TestZuulFilter.class; - when(configuration.getStringArray(eq("zuul.filters.classes"))).thenReturn(new String[]{"com.netflix.zuul.init.TestZuulFilter"}); - when(configuration.getStringArray(eq("zuul.filters.packages"))).thenReturn(new String[]{}); + Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.classes"))).thenReturn(new String[]{"com.netflix.zuul.init.TestZuulFilter"}); + Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.packages"))).thenReturn(new String[]{}); String[] classNames = module.findClassNames(configuration); @@ -85,8 +87,8 @@ public void testClassNamesPackagesOnly() { Class expectedClass = TestZuulFilter.class; - when(configuration.getStringArray(eq("zuul.filters.classes"))).thenReturn(new String[]{}); - when(configuration.getStringArray(eq("zuul.filters.packages"))).thenReturn(new String[]{"com.netflix.zuul.init"}); + Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.classes"))).thenReturn(new String[]{}); + Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.packages"))).thenReturn(new String[]{"com.netflix.zuul.init"}); String[] classNames = module.findClassNames(configuration); @@ -100,8 +102,8 @@ public void testMultiClasses() { Class expectedClass1 = TestZuulFilter.class; Class expectedClass2 = TestZuulFilter2.class; - when(configuration.getStringArray(eq("zuul.filters.classes"))).thenReturn(new String[]{"com.netflix.zuul.init.TestZuulFilter", "com.netflix.zuul.init2.TestZuulFilter2"}); - when(configuration.getStringArray(eq("zuul.filters.packages"))).thenReturn(new String[0]); + Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.classes"))).thenReturn(new String[]{"com.netflix.zuul.init.TestZuulFilter", "com.netflix.zuul.init2.TestZuulFilter2"}); + Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.packages"))).thenReturn(new String[0]); String[] classNames = module.findClassNames(configuration); @@ -115,8 +117,8 @@ public void testMultiPackages() { Class expectedClass1 = TestZuulFilter.class; Class expectedClass2 = TestZuulFilter2.class; - when(configuration.getStringArray(eq("zuul.filters.classes"))).thenReturn(new String[0]); - when(configuration.getStringArray(eq("zuul.filters.packages"))).thenReturn(new String[]{"com.netflix.zuul.init", "com.netflix.zuul.init2"}); + Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.classes"))).thenReturn(new String[0]); + Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.packages"))).thenReturn(new String[]{"com.netflix.zuul.init", "com.netflix.zuul.init2"}); String[] classNames = module.findClassNames(configuration); diff --git a/zuul-core/src/test/java/com/netflix/zuul/init2/TestZuulFilter2.java b/zuul-guice/src/test/java/com/netflix/zuul/init2/TestZuulFilter2.java similarity index 100% rename from zuul-core/src/test/java/com/netflix/zuul/init2/TestZuulFilter2.java rename to zuul-guice/src/test/java/com/netflix/zuul/init2/TestZuulFilter2.java diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index b0d6f994..665a8b56 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -10,12 +10,6 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject:guice": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.3" - }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -28,18 +22,6 @@ ], "locked": "1.9.18" }, - "com.netflix.governator:governator": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, - "com.netflix.governator:governator-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -165,12 +147,6 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject:guice": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.3" - }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -183,18 +159,6 @@ ], "locked": "1.9.18" }, - "com.netflix.governator:governator": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, - "com.netflix.governator:governator-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -329,12 +293,6 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject:guice": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.3" - }, "com.google.truth:truth": { "locked": "1.0.1", "requested": "1.0.1" @@ -351,18 +309,6 @@ ], "locked": "1.9.18" }, - "com.netflix.governator:governator": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, - "com.netflix.governator:governator-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -414,12 +360,6 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-configuration:commons-configuration": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.8" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -492,6 +432,12 @@ ], "locked": "1.2.1" }, + "javax.inject:javax.inject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1" + }, "junit:junit": { "locked": "4.13", "requested": "4.13" @@ -543,12 +489,6 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject:guice": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.3" - }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -561,18 +501,6 @@ ], "locked": "1.9.18" }, - "com.netflix.governator:governator": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, - "com.netflix.governator:governator-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -624,12 +552,6 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-configuration:commons-configuration": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.8" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -702,6 +624,12 @@ ], "locked": "1.2.1" }, + "javax.inject:javax.inject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1" + }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -741,12 +669,6 @@ ], "locked": "28.1-jre" }, - "com.google.inject:guice": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.3" - }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -759,18 +681,6 @@ ], "locked": "1.9.18" }, - "com.netflix.governator:governator": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, - "com.netflix.governator:governator-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -828,12 +738,6 @@ "com.netflix.zuul:zuul-processor": { "project": true }, - "commons-configuration:commons-configuration": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.8" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -906,6 +810,12 @@ ], "locked": "1.2.1" }, + "javax.inject:javax.inject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1" + }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -936,12 +846,6 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject:guice": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.3" - }, "com.google.truth:truth": { "locked": "1.0.1", "requested": "1.0.1" @@ -958,18 +862,6 @@ ], "locked": "1.9.18" }, - "com.netflix.governator:governator": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, - "com.netflix.governator:governator-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1100,12 +992,6 @@ "locked": "28.1-jre", "requested": "28.1-jre" }, - "com.google.inject:guice": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.3" - }, "com.google.truth:truth": { "locked": "1.0.1", "requested": "1.0.1" @@ -1122,18 +1008,6 @@ ], "locked": "1.9.18" }, - "com.netflix.governator:governator": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, - "com.netflix.governator:governator-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1185,12 +1059,6 @@ "com.netflix.zuul:zuul-core": { "project": true }, - "commons-configuration:commons-configuration": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.8" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1263,6 +1131,12 @@ ], "locked": "1.2.1" }, + "javax.inject:javax.inject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1" + }, "junit:junit": { "locked": "4.13", "requested": "4.13" diff --git a/zuul-sample/build.gradle b/zuul-sample/build.gradle index 00933c4f..a7a39d9c 100644 --- a/zuul-sample/build.gradle +++ b/zuul-sample/build.gradle @@ -3,10 +3,11 @@ apply plugin: "java" apply plugin: 'application' dependencies { - implementation project(":zuul-core") + implementation project(":zuul-core"), + project(":zuul-guice") implementation "com.netflix.eureka:eureka-client:1.9.18" implementation 'commons-configuration:commons-configuration:1.8' - + implementation "com.netflix.governator:governator-core:1.+" annotationProcessor project(":zuul-processor") runtimeOnly 'org.apache.logging.log4j:log4j-core:2.13.1' diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 46ccaa65..1b34a069 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -19,12 +19,6 @@ ], "locked": "28.1-jre" }, - "com.google.inject:guice": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "4.2.3" - }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -37,18 +31,6 @@ ], "locked": "1.9.18" }, - "com.netflix.governator:governator": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, - "com.netflix.governator:governator-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -106,12 +88,6 @@ "com.netflix.zuul:zuul-processor": { "project": true }, - "commons-configuration:commons-configuration": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.8" - }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -184,6 +160,12 @@ ], "locked": "1.2.1" }, + "javax.inject:javax.inject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1" + }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -212,7 +194,7 @@ }, "com.google.inject:guice": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-guice" ], "locked": "4.2.3" }, @@ -229,17 +211,9 @@ "locked": "1.9.18", "requested": "1.9.18" }, - "com.netflix.governator:governator": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" + "locked": "1.17.10", + "requested": "1.+" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -292,6 +266,9 @@ "com.netflix.zuul:zuul-core": { "project": true }, + "com.netflix.zuul:zuul-guice": { + "project": true + }, "commons-configuration:commons-configuration": { "locked": "1.8", "requested": "1.8" @@ -368,7 +345,7 @@ }, "com.google.inject:guice": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-guice" ], "locked": "4.2.3" }, @@ -385,17 +362,9 @@ "locked": "1.9.18", "requested": "1.9.18" }, - "com.netflix.governator:governator": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" + "locked": "1.17.10", + "requested": "1.+" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -448,6 +417,9 @@ "com.netflix.zuul:zuul-core": { "project": true }, + "com.netflix.zuul:zuul-guice": { + "project": true + }, "commons-configuration:commons-configuration": { "locked": "1.8", "requested": "1.8" @@ -536,7 +508,7 @@ }, "com.google.inject:guice": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-guice" ], "locked": "4.2.3" }, @@ -553,17 +525,9 @@ "locked": "1.9.18", "requested": "1.9.18" }, - "com.netflix.governator:governator": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" + "locked": "1.17.10", + "requested": "1.+" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -614,11 +578,17 @@ "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-guice" + ], + "project": true + }, + "com.netflix.zuul:zuul-guice": { "project": true }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-guice" ], "locked": "1.8", "requested": "1.8" @@ -695,6 +665,12 @@ ], "locked": "1.2.1" }, + "javax.inject:javax.inject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1" + }, "org.apache.logging.log4j:log4j-core": { "locked": "2.13.1", "requested": "2.13.1" @@ -751,7 +727,7 @@ }, "com.google.inject:guice": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-guice" ], "locked": "4.2.3" }, @@ -768,17 +744,9 @@ "locked": "1.9.18", "requested": "1.9.18" }, - "com.netflix.governator:governator": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" + "locked": "1.17.10", + "requested": "1.+" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -829,11 +797,17 @@ "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-guice" + ], + "project": true + }, + "com.netflix.zuul:zuul-guice": { "project": true }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-guice" ], "locked": "1.8", "requested": "1.8" @@ -910,6 +884,12 @@ ], "locked": "1.2.1" }, + "javax.inject:javax.inject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1" + }, "org.apache.logging.log4j:log4j-core": { "locked": "2.13.1", "requested": "2.13.1" @@ -946,7 +926,7 @@ }, "com.google.inject:guice": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-guice" ], "locked": "4.2.3" }, @@ -963,17 +943,9 @@ "locked": "1.9.18", "requested": "1.9.18" }, - "com.netflix.governator:governator": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" + "locked": "1.17.10", + "requested": "1.+" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -1026,6 +998,9 @@ "com.netflix.zuul:zuul-core": { "project": true }, + "com.netflix.zuul:zuul-guice": { + "project": true + }, "commons-configuration:commons-configuration": { "locked": "1.8", "requested": "1.8" @@ -1106,7 +1081,7 @@ }, "com.google.inject:guice": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-guice" ], "locked": "4.2.3" }, @@ -1123,17 +1098,9 @@ "locked": "1.9.18", "requested": "1.9.18" }, - "com.netflix.governator:governator": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" - }, "com.netflix.governator:governator-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "1.17.10" + "locked": "1.17.10", + "requested": "1.+" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -1184,11 +1151,17 @@ "locked": "0.103.0" }, "com.netflix.zuul:zuul-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-guice" + ], + "project": true + }, + "com.netflix.zuul:zuul-guice": { "project": true }, "commons-configuration:commons-configuration": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-guice" ], "locked": "1.8", "requested": "1.8" @@ -1265,6 +1238,12 @@ ], "locked": "1.2.1" }, + "javax.inject:javax.inject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1" + }, "org.apache.logging.log4j:log4j-core": { "locked": "2.13.1", "requested": "2.13.1" From 3a237bd3cf1984a50a8b61843b185dc1ce145b3a Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 15 Apr 2020 10:55:34 -0700 Subject: [PATCH 044/273] zuul-core: avoid warnspam on SSL connections --- .../com/netflix/zuul/netty/ssl/BaseSslContextFactory.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java b/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java index 1371a2be..69b66781 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java @@ -75,7 +75,10 @@ public SslContextBuilder createBuilderForServer() { ArrayList trustedCerts = getTrustedX509Certificates(); SslProvider sslProvider = chooseSslProvider(); - LOG.warn("Using SslProvider of type - " + sslProvider.name() + " for certChainFile - " + serverSslConfig.getCertChainFile()); + LOG.debug( + "Using SslProvider of type {} for certChainFile {}", + sslProvider.name(), + serverSslConfig.getCertChainFile()); InputStream certChainInput = new FileInputStream(serverSslConfig.getCertChainFile()); InputStream keyInput = getKeyInputStream(); From 6373b6e7271c2a096035991cda8efca530804669 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 17 Apr 2020 13:14:17 -0700 Subject: [PATCH 045/273] all: run CI with JDK14 --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index e57d0cc0..e813f681 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,8 @@ matrix: env: GRADLE_PUBLISH=true - jdk: openjdk11 env: GRADLE_PUBLISH=false + - jdk: openjdk14 + env: GRADLE_PUBLISH=false install: "./installViaTravis.sh" script: "./buildViaTravis.sh" cache: From 0770a8522ccf751f179fda28311627b3633a31c0 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 17 Apr 2020 17:26:07 -0700 Subject: [PATCH 046/273] all: use Mockito 3 --- build.gradle | 2 +- zuul-core/dependencies.lock | 12 ++++----- .../InstrumentedResourceLeakDetectorTest.java | 2 +- .../netflix/zuul/FilterFileManagerTest.java | 2 +- .../zuul/context/SessionContextTest.java | 2 +- .../common/GZipResponseFilterTest.java | 4 +-- .../zuul/groovy/GroovyCompilerTest.java | 2 +- .../zuul/groovy/GroovyFileFilterTest.java | 27 +++---------------- .../zuul/message/ZuulMessageImplTest.java | 2 +- .../message/http/HttpQueryParamsTest.java | 2 +- .../http/HttpRequestMessageImplTest.java | 2 +- .../http/HttpResponseMessageImplTest.java | 2 +- .../zuul/stats/ErrorStatsDataTest.java | 2 +- .../zuul/stats/ErrorStatsManagerTest.java | 2 +- .../stats/RouteStatusCodeMonitorTest.java | 2 +- .../netflix/zuul/stats/StatsManagerTest.java | 2 +- .../com/netflix/zuul/util/ProxyUtilsTest.java | 2 +- zuul-guice/build.gradle | 1 + zuul-guice/dependencies.lock | 12 +++++++++ .../zuul/init/ZuulFiltersModuleTest.java | 2 +- 20 files changed, 40 insertions(+), 46 deletions(-) diff --git a/build.gradle b/build.gradle index a38413c9..fd663538 100644 --- a/build.gradle +++ b/build.gradle @@ -59,7 +59,7 @@ subprojects { libraries = [ guava: "com.google.guava:guava:28.1-jre", junit: "junit:junit:4.13", - mockito: 'org.mockito:mockito-core:1.10.19', + mockito: 'org.mockito:mockito-core:3.+', slf4j: "org.slf4j:slf4j-api:1.7.25", truth: 'com.google.truth:truth:1.0.1' ] diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 93bf6efc..654a1a4b 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -365,8 +365,8 @@ "requested": "2.4.4" }, "org.mockito:mockito-core": { - "locked": "1.10.19", - "requested": "1.10.19" + "locked": "3.3.3", + "requested": "3.+" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -621,8 +621,8 @@ "requested": "2.4.4" }, "org.mockito:mockito-core": { - "locked": "1.10.19", - "requested": "1.10.19" + "locked": "3.3.3", + "requested": "3.+" }, "org.slf4j:slf4j-api": { "locked": "1.7.25", @@ -751,8 +751,8 @@ "requested": "2.4.4" }, "org.mockito:mockito-core": { - "locked": "1.10.19", - "requested": "1.10.19" + "locked": "3.3.3", + "requested": "3.+" }, "org.slf4j:slf4j-api": { "locked": "1.7.30", diff --git a/zuul-core/src/test/java/com/netflix/netty/common/metrics/InstrumentedResourceLeakDetectorTest.java b/zuul-core/src/test/java/com/netflix/netty/common/metrics/InstrumentedResourceLeakDetectorTest.java index eb319d24..291ed114 100644 --- a/zuul-core/src/test/java/com/netflix/netty/common/metrics/InstrumentedResourceLeakDetectorTest.java +++ b/zuul-core/src/test/java/com/netflix/netty/common/metrics/InstrumentedResourceLeakDetectorTest.java @@ -22,7 +22,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; @RunWith(MockitoJUnitRunner.class) public class InstrumentedResourceLeakDetectorTest { diff --git a/zuul-core/src/test/java/com/netflix/zuul/FilterFileManagerTest.java b/zuul-core/src/test/java/com/netflix/zuul/FilterFileManagerTest.java index 83bdb911..c56fab82 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/FilterFileManagerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/FilterFileManagerTest.java @@ -28,7 +28,7 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; /** * Tests for {@link FilterFileManager}. diff --git a/zuul-core/src/test/java/com/netflix/zuul/context/SessionContextTest.java b/zuul-core/src/test/java/com/netflix/zuul/context/SessionContextTest.java index c88235cd..1c6d6e0e 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/context/SessionContextTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/context/SessionContextTest.java @@ -19,7 +19,7 @@ import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; @RunWith(MockitoJUnitRunner.class) public class SessionContextTest { diff --git a/zuul-core/src/test/java/com/netflix/zuul/filters/common/GZipResponseFilterTest.java b/zuul-core/src/test/java/com/netflix/zuul/filters/common/GZipResponseFilterTest.java index 2c656ed5..92d22463 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/filters/common/GZipResponseFilterTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/filters/common/GZipResponseFilterTest.java @@ -39,7 +39,7 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; @RunWith(MockitoJUnitRunner.class) public class GZipResponseFilterTest { @@ -56,7 +56,7 @@ public class GZipResponseFilterTest { @Before public void setup() { - when(request.getContext()).thenReturn(context); + //when(request.getContext()).thenReturn(context); when(originalRequest.getHeaders()).thenReturn(originalRequestHeaders); filter = Mockito.spy(new GZipResponseFilter()); diff --git a/zuul-core/src/test/java/com/netflix/zuul/groovy/GroovyCompilerTest.java b/zuul-core/src/test/java/com/netflix/zuul/groovy/GroovyCompilerTest.java index 7351aa59..14e2cc0e 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/groovy/GroovyCompilerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/groovy/GroovyCompilerTest.java @@ -24,7 +24,7 @@ import groovy.lang.GroovyObject; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; /** * Unit tests for {@link GroovyCompiler}. diff --git a/zuul-core/src/test/java/com/netflix/zuul/groovy/GroovyFileFilterTest.java b/zuul-core/src/test/java/com/netflix/zuul/groovy/GroovyFileFilterTest.java index f133032c..c9037a7a 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/groovy/GroovyFileFilterTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/groovy/GroovyFileFilterTest.java @@ -18,43 +18,24 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.when; import java.io.File; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.mockito.runners.MockitoJUnitRunner; +import org.junit.runners.JUnit4; /** * Unit tests for {@link GroovyFileFilter}. */ -@RunWith(MockitoJUnitRunner.class) +@RunWith(JUnit4.class) public class GroovyFileFilterTest { - @Mock - private File nonGroovyFile; - @Mock - private File groovyFile; - - @Mock - private File directory; - - @Before - public void before() { - MockitoAnnotations.initMocks(this); - } - @Test public void testGroovyFileFilter() { - when(nonGroovyFile.getName()).thenReturn("file.mikey"); - when(groovyFile.getName()).thenReturn("file.groovy"); GroovyFileFilter filter = new GroovyFileFilter(); - assertFalse(filter.accept(nonGroovyFile, "file.mikey")); - assertTrue(filter.accept(groovyFile, "file.groovy")); + assertFalse(filter.accept(new File("/"), "file.mikey")); + assertTrue(filter.accept(new File("/"), "file.groovy")); } } diff --git a/zuul-core/src/test/java/com/netflix/zuul/message/ZuulMessageImplTest.java b/zuul-core/src/test/java/com/netflix/zuul/message/ZuulMessageImplTest.java index 8ffd0522..494490ae 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/message/ZuulMessageImplTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/message/ZuulMessageImplTest.java @@ -25,7 +25,7 @@ import io.netty.handler.codec.http.DefaultLastHttpContent; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; @RunWith(MockitoJUnitRunner.class) public class ZuulMessageImplTest { diff --git a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpQueryParamsTest.java b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpQueryParamsTest.java index dea88f93..cb79037b 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpQueryParamsTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpQueryParamsTest.java @@ -22,7 +22,7 @@ import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; @RunWith(MockitoJUnitRunner.class) public class HttpQueryParamsTest { diff --git a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java index 6871e740..4edc37ab 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java @@ -35,7 +35,7 @@ import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; @RunWith(MockitoJUnitRunner.class) public class HttpRequestMessageImplTest { diff --git a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpResponseMessageImplTest.java b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpResponseMessageImplTest.java index bd082af4..f0c050bd 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpResponseMessageImplTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpResponseMessageImplTest.java @@ -26,7 +26,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; /** * Unit tests for {@link HttpResponseMessageImpl}. diff --git a/zuul-core/src/test/java/com/netflix/zuul/stats/ErrorStatsDataTest.java b/zuul-core/src/test/java/com/netflix/zuul/stats/ErrorStatsDataTest.java index 314a1f3c..fc1fc10f 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/stats/ErrorStatsDataTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/stats/ErrorStatsDataTest.java @@ -22,7 +22,7 @@ import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; /** * Unit tests for {@link ErrorStatsData}. diff --git a/zuul-core/src/test/java/com/netflix/zuul/stats/ErrorStatsManagerTest.java b/zuul-core/src/test/java/com/netflix/zuul/stats/ErrorStatsManagerTest.java index 24e4f9e0..5be42b76 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/stats/ErrorStatsManagerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/stats/ErrorStatsManagerTest.java @@ -22,7 +22,7 @@ import java.util.concurrent.ConcurrentHashMap; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; /** * Unit tests for {@link ErrorStatsManager}. diff --git a/zuul-core/src/test/java/com/netflix/zuul/stats/RouteStatusCodeMonitorTest.java b/zuul-core/src/test/java/com/netflix/zuul/stats/RouteStatusCodeMonitorTest.java index 2a1ae20b..4a2fc537 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/stats/RouteStatusCodeMonitorTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/stats/RouteStatusCodeMonitorTest.java @@ -22,7 +22,7 @@ import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; /** * Unit tests for {@link RouteStatusCodeMonitor}. diff --git a/zuul-core/src/test/java/com/netflix/zuul/stats/StatsManagerTest.java b/zuul-core/src/test/java/com/netflix/zuul/stats/StatsManagerTest.java index 0e53ab88..400c7fa1 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/stats/StatsManagerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/stats/StatsManagerTest.java @@ -28,7 +28,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; /** * Unit tests for {@link StatsManager}. diff --git a/zuul-core/src/test/java/com/netflix/zuul/util/ProxyUtilsTest.java b/zuul-core/src/test/java/com/netflix/zuul/util/ProxyUtilsTest.java index c1e16163..2fe77cc7 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/util/ProxyUtilsTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/util/ProxyUtilsTest.java @@ -23,7 +23,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; /** * Unit tests for {@link ProxyUtils}. diff --git a/zuul-guice/build.gradle b/zuul-guice/build.gradle index 283d8e69..2ffdb0fa 100644 --- a/zuul-guice/build.gradle +++ b/zuul-guice/build.gradle @@ -7,6 +7,7 @@ dependencies { testImplementation "com.netflix.governator:governator-test-junit:1.+" testImplementation libraries.junit, + libraries.mockito, libraries.truth } diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 7a4b81d0..0a635cf1 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -473,6 +473,10 @@ ], "locked": "2.4.4" }, + "org.mockito:mockito-core": { + "locked": "3.3.3", + "requested": "3.+" + }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", "requested": "1.21" @@ -813,6 +817,10 @@ ], "locked": "2.4.4" }, + "org.mockito:mockito-core": { + "locked": "3.3.3", + "requested": "3.+" + }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1012,6 +1020,10 @@ ], "locked": "2.4.4" }, + "org.mockito:mockito-core": { + "locked": "3.3.3", + "requested": "3.+" + }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" diff --git a/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleTest.java b/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleTest.java index b9cd048d..296980ad 100644 --- a/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleTest.java +++ b/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleTest.java @@ -23,7 +23,7 @@ import org.mockito.Matchers; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.MatcherAssert.assertThat; From 3928932e83642e20288d5b7a9749d7c33155ea53 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 17 Apr 2020 22:55:50 -0700 Subject: [PATCH 047/273] zuul-sample: fix module installation --- .gitignore | 2 ++ .../com/netflix/zuul/sample/ZuulSampleModule.java | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 70bdbb95..38fdd7c2 100644 --- a/.gitignore +++ b/.gitignore @@ -61,5 +61,7 @@ atlassian-ide-plugin.xml .settings .metadata +zuul-sample/src/main/generated/ + # NetBeans specific files/directories .nbattrs diff --git a/zuul-sample/src/main/java/com/netflix/zuul/sample/ZuulSampleModule.java b/zuul-sample/src/main/java/com/netflix/zuul/sample/ZuulSampleModule.java index b1791051..be7eaf23 100644 --- a/zuul-sample/src/main/java/com/netflix/zuul/sample/ZuulSampleModule.java +++ b/zuul-sample/src/main/java/com/netflix/zuul/sample/ZuulSampleModule.java @@ -20,15 +20,20 @@ import com.netflix.config.ConfigurationManager; import com.netflix.discovery.AbstractDiscoveryClientOptionalArgs; import com.netflix.discovery.DiscoveryClient; +import com.netflix.discovery.guice.EurekaModule; import com.netflix.netty.common.accesslog.AccessLogPublisher; import com.netflix.netty.common.status.ServerStatusManager; import com.netflix.spectator.api.DefaultRegistry; import com.netflix.spectator.api.Registry; import com.netflix.zuul.BasicRequestCompleteHandler; +import com.netflix.zuul.DynamicFilterLoader; import com.netflix.zuul.FilterFileManager; +import com.netflix.zuul.FilterLoader; import com.netflix.zuul.RequestCompleteHandler; import com.netflix.zuul.context.SessionContextDecorator; import com.netflix.zuul.context.ZuulSessionContextDecorator; +import com.netflix.zuul.filters.FilterRegistry; +import com.netflix.zuul.filters.MutableFilterRegistry; import com.netflix.zuul.init.ZuulFiltersModule; import com.netflix.zuul.netty.server.BaseServerStartup; import com.netflix.zuul.netty.server.ClientRequestReceiver; @@ -55,6 +60,8 @@ protected void configure() { bind(AbstractConfiguration.class).toInstance(ConfigurationManager.getConfigInstance()); + install(new EurekaModule()); + // sample specific bindings bind(BaseServerStartup.class).to(SampleServerStartup.class); @@ -63,14 +70,16 @@ protected void configure() { // zuul filter loading install(new ZuulFiltersModule()); + bind(FilterLoader.class).to(DynamicFilterLoader.class); + bind(FilterRegistry.class).to(MutableFilterRegistry.class); bind(FilterFileManager.class).asEagerSingleton(); + // general server bindings bind(ServerStatusManager.class); // health/discovery status bind(SessionContextDecorator.class).to(ZuulSessionContextDecorator.class); // decorate new sessions when requests come in bind(Registry.class).to(DefaultRegistry.class); // atlas metrics registry bind(RequestCompleteHandler.class).to(BasicRequestCompleteHandler.class); // metrics post-request completion - bind(AbstractDiscoveryClientOptionalArgs.class).to(DiscoveryClient.DiscoveryClientOptionalArgs.class); // discovery client bind(RequestMetricsPublisher.class).to(BasicRequestMetricsPublisher.class); // timings publisher // access logger, including request ID generator From 3988f9b94abdbc3e46710f03b39d8279394d64e6 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 17 Apr 2020 23:34:53 -0700 Subject: [PATCH 048/273] all: fix license exclude rules --- build.gradle | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index fd663538..97f990a2 100644 --- a/build.gradle +++ b/build.gradle @@ -35,7 +35,13 @@ subprojects { license { ignoreFailures = false - exclude "META-INF/services/*" + excludes([ + "**/META-INF/services/javax.annotation.processing.Processor", + "**/META-INF/gradle/incremental.annotation.processors", + "**/*.cert", + "**/*.jks", + "**/*.key", + ]) } group = "com.netflix.${githubProjectName}" From 3c6bf8f5b416850aacfb0f51542167a7fdc30c1c Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Sat, 18 Apr 2020 00:00:54 -0700 Subject: [PATCH 049/273] zuul-guice: fix lint warnings on test --- .../zuul/init/ZuulFiltersModuleTest.java | 53 ++++++++++--------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleTest.java b/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleTest.java index 296980ad..e8d5b86a 100644 --- a/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleTest.java +++ b/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleTest.java @@ -16,31 +16,29 @@ package com.netflix.zuul.init; +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.MatcherAssert.assertThat; + import com.netflix.zuul.init2.TestZuulFilter2; import org.apache.commons.configuration.AbstractConfiguration; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.Matchers; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.when; - @RunWith(MockitoJUnitRunner.class) public class ZuulFiltersModuleTest { @Mock AbstractConfiguration configuration; - ZuulFiltersModule module = new ZuulFiltersModule(); + private final ZuulFiltersModule module = new ZuulFiltersModule(); @Test public void testDefaultFilterLocations() { - Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.locations"))).thenReturn("inbound,outbound,endpoint".split(",")); + Mockito.when(configuration.getStringArray("zuul.filters.locations")) + .thenReturn("inbound,outbound,endpoint".split(",")); String[] filterLocations = module.findFilterLocations(configuration); @@ -50,7 +48,7 @@ public void testDefaultFilterLocations() { @Test public void testEmptyFilterLocations() { - Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.locations"))).thenReturn(new String[0]); + Mockito.when(configuration.getStringArray("zuul.filters.locations")).thenReturn(new String[0]); String[] filterLocations = module.findFilterLocations(configuration); @@ -59,8 +57,8 @@ public void testEmptyFilterLocations() { @Test public void testEmptyClassNames() { - Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.classes"))).thenReturn(new String[]{}); - Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.packages"))).thenReturn(new String[]{}); + Mockito.when(configuration.getStringArray("zuul.filters.classes")).thenReturn(new String[]{}); + Mockito.when(configuration.getStringArray("zuul.filters.packages")).thenReturn(new String[]{}); String[] classNames = module.findClassNames(configuration); @@ -70,10 +68,11 @@ public void testEmptyClassNames() { @Test public void testClassNamesOnly() { - Class expectedClass = TestZuulFilter.class; + Class expectedClass = TestZuulFilter.class; - Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.classes"))).thenReturn(new String[]{"com.netflix.zuul.init.TestZuulFilter"}); - Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.packages"))).thenReturn(new String[]{}); + Mockito.when(configuration.getStringArray("zuul.filters.classes")) + .thenReturn(new String[]{"com.netflix.zuul.init.TestZuulFilter"}); + Mockito.when(configuration.getStringArray("zuul.filters.packages")).thenReturn(new String[]{}); String[] classNames = module.findClassNames(configuration); @@ -85,10 +84,11 @@ public void testClassNamesOnly() { @Test public void testClassNamesPackagesOnly() { - Class expectedClass = TestZuulFilter.class; + Class expectedClass = TestZuulFilter.class; - Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.classes"))).thenReturn(new String[]{}); - Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.packages"))).thenReturn(new String[]{"com.netflix.zuul.init"}); + Mockito.when(configuration.getStringArray("zuul.filters.classes")).thenReturn(new String[]{}); + Mockito.when(configuration.getStringArray("zuul.filters.packages")) + .thenReturn(new String[]{"com.netflix.zuul.init"}); String[] classNames = module.findClassNames(configuration); @@ -99,11 +99,13 @@ public void testClassNamesPackagesOnly() { @Test public void testMultiClasses() { - Class expectedClass1 = TestZuulFilter.class; - Class expectedClass2 = TestZuulFilter2.class; + Class expectedClass1 = TestZuulFilter.class; + Class expectedClass2 = TestZuulFilter2.class; - Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.classes"))).thenReturn(new String[]{"com.netflix.zuul.init.TestZuulFilter", "com.netflix.zuul.init2.TestZuulFilter2"}); - Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.packages"))).thenReturn(new String[0]); + Mockito.when(configuration.getStringArray("zuul.filters.classes")) + .thenReturn(new String[] { + "com.netflix.zuul.init.TestZuulFilter", "com.netflix.zuul.init2.TestZuulFilter2"}); + Mockito.when(configuration.getStringArray("zuul.filters.packages")).thenReturn(new String[0]); String[] classNames = module.findClassNames(configuration); @@ -114,11 +116,12 @@ public void testMultiClasses() { @Test public void testMultiPackages() { - Class expectedClass1 = TestZuulFilter.class; - Class expectedClass2 = TestZuulFilter2.class; + Class expectedClass1 = TestZuulFilter.class; + Class expectedClass2 = TestZuulFilter2.class; - Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.classes"))).thenReturn(new String[0]); - Mockito.when(configuration.getStringArray(Matchers.eq("zuul.filters.packages"))).thenReturn(new String[]{"com.netflix.zuul.init", "com.netflix.zuul.init2"}); + Mockito.when(configuration.getStringArray("zuul.filters.classes")).thenReturn(new String[0]); + Mockito.when(configuration.getStringArray("zuul.filters.packages")) + .thenReturn(new String[]{"com.netflix.zuul.init", "com.netflix.zuul.init2"}); String[] classNames = module.findClassNames(configuration); From 37b6c6e949769a4bc68fdb46101367579ff03f0e Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Sat, 18 Apr 2020 00:07:10 -0700 Subject: [PATCH 050/273] zuul-core: fix javadoc lint warnings --- .../netflix/zuul/context/SessionContext.java | 22 -------- .../com/netflix/zuul/filters/BaseFilter.java | 11 ++-- .../netflix/zuul/filters/BaseSyncFilter.java | 3 -- .../com/netflix/zuul/filters/ZuulFilter.java | 4 +- .../zuul/filters/endpoint/ProxyEndpoint.java | 7 +-- .../netflix/zuul/groovy/GroovyCompiler.java | 6 --- .../com/netflix/zuul/message/ZuulMessage.java | 2 +- .../netflix/zuul/message/ZuulMessageImpl.java | 7 +-- .../zuul/message/http/HttpQueryParams.java | 6 --- .../message/http/HttpRequestMessageImpl.java | 2 - .../zuul/netty/server/BaseServerStartup.java | 5 -- .../netty/server/push/PushMessageFactory.java | 1 - .../zuul/netty/server/push/PushProtocol.java | 1 - .../zuul/netty/ssl/BaseSslContextFactory.java | 5 -- .../netflix/zuul/niws/RequestAttempts.java | 1 - .../zuul/scriptManager/FilterInfo.java | 52 ++++++++----------- .../zuul/scriptManager/FilterVerifier.java | 24 ++++----- .../zuul/stats/NamedCountingMonitor.java | 7 +-- .../scriptManager/FilterVerifierTest.java | 4 +- .../sample/push/SamplePushAuthHandler.java | 3 -- 20 files changed, 43 insertions(+), 130 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/context/SessionContext.java b/zuul-core/src/main/java/com/netflix/zuul/context/SessionContext.java index 84ce9274..9f5072a7 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/context/SessionContext.java +++ b/zuul-core/src/main/java/com/netflix/zuul/context/SessionContext.java @@ -76,8 +76,6 @@ public SessionContext() /** * Makes a copy of the RequestContext. This is used for debugging. - * - * @return */ @Override public SessionContext clone() @@ -93,7 +91,6 @@ public String getString(String key) /** * Convenience method to return a boolean value for a given key * - * @param key * @return true or false depending what was set. default is false */ public boolean getBoolean(String key) { @@ -103,8 +100,6 @@ public boolean getBoolean(String key) { /** * Convenience method to return a boolean value for a given key * - * @param key - * @param defaultResponse * @return true or false depending what was set. default defaultResponse */ public boolean getBoolean(String key, boolean defaultResponse) { @@ -117,8 +112,6 @@ public boolean getBoolean(String key, boolean defaultResponse) { /** * sets a key value to Boolean.TRUE - * - * @param key */ public void set(String key) { put(key, Boolean.TRUE); @@ -127,8 +120,6 @@ public void set(String key) { /** * puts the key, value into the map. a null value will remove the key from the map * - * @param key - * @param value */ public void set(String key, Object value) { if (value != null) put(key, value); @@ -138,7 +129,6 @@ public void set(String key, Object value) { /** * Makes a copy of the SessionContext. This is used for debugging. * - * @return */ public SessionContext copy() { @@ -195,7 +185,6 @@ public HttpResponseMessage getStaticResponse() { /** * Gets the throwable that will be use in the Error endpoint. * - * @return a set throwable */ public Throwable getError() { return (Throwable) get("_error"); @@ -204,8 +193,6 @@ public Throwable getError() { /** * Sets throwable to use for generating a response in the Error endpoint. - * - * @param th */ public void setError(Throwable th) { put("_error", th); @@ -221,8 +208,6 @@ public void setErrorEndpoint(String name) { /** * sets debugRouting - * - * @param bDebug */ public void setDebugRouting(boolean bDebug) { this.debugRouting = bDebug; @@ -238,11 +223,9 @@ public boolean debugRouting() { /** * sets "debugRequestHeadersOnly" to bHeadersOnly * - * @param bHeadersOnly */ public void setDebugRequestHeadersOnly(boolean bHeadersOnly) { this.debugRequestHeadersOnly = bHeadersOnly; - } /** @@ -254,8 +237,6 @@ public boolean debugRequestHeadersOnly() { /** * sets "debugRequest" - * - * @param bDebug */ public void setDebugRequest(boolean bDebug) { this.debugRequest = bDebug; @@ -318,7 +299,6 @@ public boolean shouldSendErrorResponse() { * Set this to true to indicate that the Error endpoint should be applied after * the end of the current filter processing phase. * - * @param should */ public void setShouldSendErrorResponse(boolean should) { this.shouldSendErrorResponse = should; @@ -338,7 +318,6 @@ public void setErrorResponseSent(boolean should) { * This can be used by filters for flagging if the server is getting overloaded, and then choose * to disable/sample/rate-limit some optional features. * - * @return */ public boolean isInBrownoutMode() { @@ -365,7 +344,6 @@ public boolean shouldStopFilterProcessing() { /** * returns the routeVIP; that is the Eureka "vip" of registered instances * - * @return */ public String getRouteVIP() { return (String) get(KEY_VIP); diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/BaseFilter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/BaseFilter.java index 5a9c5589..3c471c32 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/BaseFilter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/BaseFilter.java @@ -74,26 +74,21 @@ public boolean overrideStopFilterProcessing() /** * The name of the Archaius property to disable this filter. by default it is zuul.[classname].[filtertype].disable - * - * @return */ public String disablePropertyName() { return "zuul." + baseName + ".disable"; } /** - * The name of the Archaius property for this filter's max concurrency. by default it is zuul.[classname].[filtertype].concurrency.limit - * - * @return + * The name of the Archaius property for this filter's max concurrency. by default it is + * zuul.[classname].[filtertype].concurrency.limit */ public String maxConcurrencyPropertyName() { return "zuul." + baseName + ".concurrency.limit"; } /** - * If true, the filter has been disabled by archaius and will not be run - * - * @return + * If true, the filter has been disabled by archaius and will not be run. */ @Override public boolean isDisabled() { diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/BaseSyncFilter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/BaseSyncFilter.java index 8de5169f..12b7aded 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/BaseSyncFilter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/BaseSyncFilter.java @@ -30,9 +30,6 @@ public abstract class BaseSyncFilter applyAsync(I input) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/ZuulFilter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/ZuulFilter.java index a00636a8..4032cabd 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/ZuulFilter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/ZuulFilter.java @@ -93,8 +93,6 @@ public interface ZuulFilter extend boolean needsBodyBuffered(I input); /** - * Optionally transform HTTP content chunk received - * @param chunk - * @return + * Optionally transform HTTP content chunk received. */ HttpContent processContentChunk(ZuulMessage zuulMessage, HttpContent chunk);} diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 6b72f195..81dd9e0b 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -422,9 +422,7 @@ private void proxyRequestToOrigin() { } /** - * Override to track your own request stats - * - * @return + * Override to track your own request stats. */ protected RequestStat createRequestStat() { BasicRequestStat basicRequestStat = new BasicRequestStat(origin.getName()); @@ -1026,9 +1024,6 @@ private static HttpRequestMessage massageRequestURI(HttpRequestMessage request) * * Note: this method gets called in the constructor so if overloading it or any methods called within, you cannot * rely on your own constructor parameters. - * - * @param request - * @return */ protected NettyOrigin getOrigin(HttpRequestMessage request) { SessionContext context = request.getContext(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/groovy/GroovyCompiler.java b/zuul-core/src/main/java/com/netflix/zuul/groovy/GroovyCompiler.java index 1ec3f252..5a0c46f2 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/groovy/GroovyCompiler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/groovy/GroovyCompiler.java @@ -38,9 +38,6 @@ public class GroovyCompiler implements DynamicCodeCompiler { /** * Compiles Groovy code and returns the Class of the compiles code. * - * @param sCode - * @param sName - * @return */ public Class compile(String sCode, String sName) { GroovyClassLoader loader = getGroovyClassLoader(); @@ -59,9 +56,6 @@ GroovyClassLoader getGroovyClassLoader() { /** * Compiles groovy class from a file * - * @param file - * @return - * @throws java.io.IOException */ public Class compile(File file) throws IOException { GroovyClassLoader loader = getGroovyClassLoader(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/ZuulMessage.java b/zuul-core/src/main/java/com/netflix/zuul/message/ZuulMessage.java index 0d8ed910..15f5699e 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/ZuulMessage.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/ZuulMessage.java @@ -112,7 +112,7 @@ public interface ZuulMessage extends Cloneable { /** * Passes the body content chunks through the given filter, and sets them back into this message. */ - void runBufferedBodyContentThroughFilter(ZuulFilter filter); + void runBufferedBodyContentThroughFilter(ZuulFilter filter); /** * Clears the content chunks of this body, calling {@code release()} in the process. Users SHOULD call this method diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/ZuulMessageImpl.java b/zuul-core/src/main/java/com/netflix/zuul/message/ZuulMessageImpl.java index de2d3f2a..bf97503f 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/ZuulMessageImpl.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/ZuulMessageImpl.java @@ -198,7 +198,7 @@ public void disposeBufferedBody() { } @Override - public void runBufferedBodyContentThroughFilter(ZuulFilter filter) { + public void runBufferedBodyContentThroughFilter(ZuulFilter filter) { //Loop optimized for the common case: Most filters' processContentChunk() return // original chunk passed in as is without any processing for (int i=0; i < bodyChunks.size(); i++) { @@ -227,12 +227,9 @@ public ZuulMessage clone() { /** * Override this in more specific subclasses to add request/response info for logging purposes. - * - * @return */ @Override - public String getInfoForLogging() - { + public String getInfoForLogging() { return "ZuulMessage"; } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java index bed6bee0..1b684144 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java @@ -107,9 +107,6 @@ else if (s.length() > 0) { /** * Get the first value found for this key even if there are multiple. If none, then * return null. - * - * @param name - * @return */ public String getFirst(String name) { @@ -139,9 +136,6 @@ public boolean contains(String name, String value) /** * Replace any/all entries with this key, with this single entry. - * - * @param name - * @param value */ public void set(String name, String value) { diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java index 1aefcdf8..0ee4bfee 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java @@ -472,8 +472,6 @@ protected String generateInfoForLogging() * * The Host header may contain port, but in this method we strip it out for consistency - use the * getOriginalPort method for that. - * - * @return */ @Override public String getOriginalHost() { diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java index f2d6627a..6e01807d 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java @@ -171,11 +171,6 @@ protected void addChannelDependencies( * First looks for a property specific to the named listen address of the form - * "server.${addrName}.${propertySuffix}". If none found, then looks for a server-wide property of the form - * "server.${propertySuffix}". If that is also not found, then returns the specified default value. - * - * @param listenAddressName - * @param propertySuffix - * @param defaultValue - * @return */ public static int chooseIntChannelProperty(String listenAddressName, String propertySuffix, int defaultValue) { String globalPropertyName = "server." + propertySuffix; diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushMessageFactory.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushMessageFactory.java index 4b9b09e3..b4130b04 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushMessageFactory.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushMessageFactory.java @@ -40,7 +40,6 @@ public final void sendErrorAndClose(ChannelHandlerContext ctx, int statusCode, S /** * Message server sends to the client just before it force closes connection from its side - * @return */ protected abstract Object serverClosingConnectionMessage(int statusCode, String reasonText); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushProtocol.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushProtocol.java index cafd6d8e..7804d5b0 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushProtocol.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/push/PushProtocol.java @@ -134,7 +134,6 @@ public final void sendErrorAndClose(ChannelHandlerContext ctx, int statusCode, S public abstract Object goAwayMessage(); /** * Message server sends to the client just before it force closes connection from its side - * @return */ public abstract Object serverClosingConnectionMessage(int statusCode, String reasonText); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java b/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java index 69b66781..e08309ef 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java @@ -207,8 +207,6 @@ else if (serverSslConfig.getClientAuthTrustStorePasswordFile() != null) { /** * Can be overridden to implement your own decryption scheme. * - * @param trustStorePwdBytes - * @return */ protected String getTruststorePassword(byte[] trustStorePwdBytes) { return new String(trustStorePwdBytes).trim(); @@ -216,9 +214,6 @@ protected String getTruststorePassword(byte[] trustStorePwdBytes) { /** * Can be overridden to implement your own decryption scheme. - * - * @return - * @throws IOException */ protected InputStream getKeyInputStream() throws IOException { return new FileInputStream(serverSslConfig.getKeyFile()); diff --git a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempts.java b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempts.java index 3e0b78e0..1107f492 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempts.java +++ b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempts.java @@ -60,7 +60,6 @@ public static RequestAttempts getFromSessionContext(SessionContext ctx) /** * This is only intended for use when running on a blocking server (ie. tomcat). - * @return */ public static RequestAttempts getThreadLocalInstance() { diff --git a/zuul-core/src/main/java/com/netflix/zuul/scriptManager/FilterInfo.java b/zuul-core/src/main/java/com/netflix/zuul/scriptManager/FilterInfo.java index 99ab78d1..67f09194 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/scriptManager/FilterInfo.java +++ b/zuul-core/src/main/java/com/netflix/zuul/scriptManager/FilterInfo.java @@ -42,15 +42,15 @@ public class FilterInfo implements Comparable{ /** * Constructor - * @param filter_id - * @param filter_code - * @param filter_type - * @param filter_name - * @param disablePropertyName - * @param filter_order - * @param application_name */ - public FilterInfo(String filter_id, String filter_code, FilterType filter_type, String filter_name, String disablePropertyName, String filter_order, String application_name) { + public FilterInfo( + String filter_id, + String filter_code, + FilterType filter_type, + String filter_name, + String disablePropertyName, + String filter_order, + String application_name) { this.filter_id = filter_id; this.filter_code = filter_code; this.filter_type = filter_type; @@ -80,7 +80,6 @@ public String getFilterCode() { /** - * * @return the name of the property to disable the filter. */ public String getFilterDisablePropertyName() { @@ -88,7 +87,6 @@ public String getFilterDisablePropertyName() { } /** - * * @return the filter_type */ public FilterType getFilterType() { @@ -111,28 +109,25 @@ public String toString() { } /** - * the application name context of the filter. This is for if Zuul is applied to different applications in the same datastor - * @return + * the application name context of the filter. This is for if Zuul is applied to different applications in the same + * datastore. */ public String getApplication_name() { return application_name; } - /** - * - * @param filter_id - * @param revision - * @param creationDate - * @param isActive - * @param isCanary - * @param filter_code - * @param filter_type - * @param filter_name - * @param disablePropertyName - * @param filter_order - * @param application_name - */ - public FilterInfo(String filter_id, int revision, Date creationDate, boolean isActive, boolean isCanary, String filter_code, FilterType filter_type, String filter_name, String disablePropertyName, String filter_order, String application_name) { + public FilterInfo( + String filter_id, + int revision, + Date creationDate, + boolean isActive, + boolean isCanary, + String filter_code, + FilterType filter_type, + String filter_name, + String disablePropertyName, + String filter_order, + String application_name) { this.filter_id = filter_id; this.revision = revision; this.creationDate = creationDate; @@ -199,9 +194,6 @@ public String getFilterOrder() { /** * builds the unique filter_id key - * @param application_name - * @param filter_type - * @param filter_name * @return key is application_name:filter_name:filter_type */ public static String buildFilterID(String application_name, FilterType filter_type, String filter_name) { diff --git a/zuul-core/src/main/java/com/netflix/zuul/scriptManager/FilterVerifier.java b/zuul-core/src/main/java/com/netflix/zuul/scriptManager/FilterVerifier.java index d77cfb9b..7d411849 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/scriptManager/FilterVerifier.java +++ b/zuul-core/src/main/java/com/netflix/zuul/scriptManager/FilterVerifier.java @@ -19,9 +19,10 @@ import com.netflix.zuul.ZuulApplicationInfo; import com.netflix.zuul.filters.BaseFilter; import groovy.lang.GroovyClassLoader; +import org.codehaus.groovy.control.CompilationFailedException; /** - * verifies that the given source code is compilable in Groovy, can be instanciated, and is a ZuulFilter type + * verifies that the given source code is compilable in Groovy, can be instantiated, and is a ZuulFilter type * * @author Mikey Cohen * Date: 6/12/12 @@ -41,16 +42,12 @@ public static FilterVerifier getInstance() { /** * verifies compilation, instanciation and that it is a ZuulFilter * - * @param sFilterCode * @return a FilterInfo object representing that code - * @throws org.codehaus.groovy.control.CompilationFailedException - * - * @throws IllegalAccessException - * @throws InstantiationException */ - public FilterInfo verifyFilter(String sFilterCode) throws org.codehaus.groovy.control.CompilationFailedException, IllegalAccessException, InstantiationException { - Class groovyClass = compileGroovy(sFilterCode); - Object instance = instanciateClass(groovyClass); + public FilterInfo verifyFilter(String sFilterCode) + throws CompilationFailedException, IllegalAccessException, InstantiationException { + Class groovyClass = compileGroovy(sFilterCode); + Object instance = instantiateClass(groovyClass); checkZuulFilterInstance(instance); BaseFilter filter = (BaseFilter) instance; @@ -60,7 +57,7 @@ public FilterInfo verifyFilter(String sFilterCode) throws org.codehaus.groovy.co return new FilterInfo(filter_id, sFilterCode, filter.filterType(), groovyClass.getSimpleName(), filter.disablePropertyName(), "" + filter.filterOrder(), ZuulApplicationInfo.getApplicationName()); } - Object instanciateClass(Class groovyClass) throws InstantiationException, IllegalAccessException { + Object instantiateClass(Class groovyClass) throws InstantiationException, IllegalAccessException { return groovyClass.newInstance(); } @@ -73,12 +70,9 @@ void checkZuulFilterInstance(Object zuulFilter) throws InstantiationException { /** * compiles the Groovy source code * - * @param sFilterCode - * @return - * @throws org.codehaus.groovy.control.CompilationFailedException - * */ - public Class compileGroovy(String sFilterCode) throws org.codehaus.groovy.control.CompilationFailedException { + public Class compileGroovy(String sFilterCode) + throws CompilationFailedException { GroovyClassLoader loader = new GroovyClassLoader(); return loader.parseClass(sFilterCode); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/stats/NamedCountingMonitor.java b/zuul-core/src/main/java/com/netflix/zuul/stats/NamedCountingMonitor.java index 91efe7da..7a6fe628 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/stats/NamedCountingMonitor.java +++ b/zuul-core/src/main/java/com/netflix/zuul/stats/NamedCountingMonitor.java @@ -30,7 +30,7 @@ * * @author mhawthorne */ -public class NamedCountingMonitor implements NamedCount{ +public class NamedCountingMonitor implements NamedCount { private final String name; @@ -47,8 +47,7 @@ public NamedCountingMonitor(String name) { } /** - * reguisters this objects - * @return + * registers this objects */ public NamedCountingMonitor register() { MonitorRegistry.getInstance().registerObject(this); @@ -57,7 +56,6 @@ public NamedCountingMonitor register() { /** * increments the counter - * @return */ public long increment() { return this.count.incrementAndGet(); @@ -69,7 +67,6 @@ public String getName() { } /** - * * @return the current count */ public long getCount() { diff --git a/zuul-core/src/test/java/com/netflix/zuul/scriptManager/FilterVerifierTest.java b/zuul-core/src/test/java/com/netflix/zuul/scriptManager/FilterVerifierTest.java index 1266ec13..16ff0533 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/scriptManager/FilterVerifierTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/scriptManager/FilterVerifierTest.java @@ -127,13 +127,13 @@ public void testZuulFilterInstance() throws Exception { Class filterClass = FilterVerifier.INSTANCE.compileGroovy(sGoodGroovyScriptFilter); assertNotNull(filterClass); - Object filter1 = FilterVerifier.INSTANCE.instanciateClass(filterClass); + Object filter1 = FilterVerifier.INSTANCE.instantiateClass(filterClass); FilterVerifier.INSTANCE.checkZuulFilterInstance(filter1); filterClass = FilterVerifier.INSTANCE.compileGroovy(sNotZuulFilterGroovy); assertNotNull(filterClass); - Object filter2 = FilterVerifier.INSTANCE.instanciateClass(filterClass); + Object filter2 = FilterVerifier.INSTANCE.instantiateClass(filterClass); assertThrows(InstantiationException.class, () -> FilterVerifier.INSTANCE.checkZuulFilterInstance(filter2)); } diff --git a/zuul-sample/src/main/java/com/netflix/zuul/sample/push/SamplePushAuthHandler.java b/zuul-sample/src/main/java/com/netflix/zuul/sample/push/SamplePushAuthHandler.java index e0b1c1e7..03061e9f 100644 --- a/zuul-sample/src/main/java/com/netflix/zuul/sample/push/SamplePushAuthHandler.java +++ b/zuul-sample/src/main/java/com/netflix/zuul/sample/push/SamplePushAuthHandler.java @@ -42,9 +42,6 @@ public SamplePushAuthHandler(String path) { /** * We support only cookie based auth in this sample - * @param req - * @param ctx - * @return */ @Override protected boolean isDelayedAuth(FullHttpRequest req, ChannelHandlerContext ctx) { From 4b9ee15c6412baa32ed2bc8a74fd961e0874938a Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Sat, 18 Apr 2020 00:27:55 -0700 Subject: [PATCH 051/273] all: bump to groovy 3.0.3 --- gradle.properties | 2 +- zuul-core/dependencies.lock | 24 ++++++++++++------------ zuul-guice/dependencies.lock | 12 ++++++------ zuul-processor/dependencies.lock | 14 +++++++------- zuul-sample/dependencies.lock | 14 +++++++------- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/gradle.properties b/gradle.properties index 78275e52..3316457c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -versions_groovy=2.4.4 +versions_groovy=3.0.3 versions_ribbon=2.7.17 versions_netty=4.1.48.Final release.scope=patch diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 654a1a4b..2ad664cc 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -105,8 +105,8 @@ "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { - "locked": "2.4.4", - "requested": "2.4.4" + "locked": "3.0.3", + "requested": "3.0.3" }, "org.slf4j:slf4j-api": { "locked": "1.7.25", @@ -227,8 +227,8 @@ "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { - "locked": "2.4.4", - "requested": "2.4.4" + "locked": "3.0.3", + "requested": "3.0.3" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -361,8 +361,8 @@ "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { - "locked": "2.4.4", - "requested": "2.4.4" + "locked": "3.0.3", + "requested": "3.0.3" }, "org.mockito:mockito-core": { "locked": "3.3.3", @@ -495,8 +495,8 @@ "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { - "locked": "2.4.4", - "requested": "2.4.4" + "locked": "3.0.3", + "requested": "3.0.3" }, "org.slf4j:slf4j-api": { "locked": "1.7.30", @@ -617,8 +617,8 @@ "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { - "locked": "2.4.4", - "requested": "2.4.4" + "locked": "3.0.3", + "requested": "3.0.3" }, "org.mockito:mockito-core": { "locked": "3.3.3", @@ -747,8 +747,8 @@ "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { - "locked": "2.4.4", - "requested": "2.4.4" + "locked": "3.0.3", + "requested": "3.0.3" }, "org.mockito:mockito-core": { "locked": "3.3.3", diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 0a635cf1..cda66dd5 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -123,7 +123,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -264,7 +264,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -471,7 +471,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.mockito:mockito-core": { "locked": "3.3.3", @@ -670,7 +670,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -815,7 +815,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.mockito:mockito-core": { "locked": "3.3.3", @@ -1018,7 +1018,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.mockito:mockito-core": { "locked": "3.3.3", diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 665a8b56..90f7fb0b 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -119,7 +119,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -256,7 +256,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -452,7 +452,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -640,7 +640,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -826,7 +826,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -963,7 +963,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -1151,7 +1151,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 1b34a069..bc211ff2 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -176,7 +176,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -319,7 +319,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -470,7 +470,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -689,7 +689,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -908,7 +908,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -1051,7 +1051,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -1262,7 +1262,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ From 3ac48f130fac0d20606fa56cc0787ba78b3c42dd Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Sat, 18 Apr 2020 00:40:00 -0700 Subject: [PATCH 052/273] all: bump guava to 29.0 --- build.gradle | 2 +- zuul-core/dependencies.lock | 24 ++++++++++++------------ zuul-guice/dependencies.lock | 6 +++--- zuul-processor/dependencies.lock | 26 +++++++++++++------------- zuul-sample/dependencies.lock | 8 ++++---- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/build.gradle b/build.gradle index 97f990a2..60d522e8 100644 --- a/build.gradle +++ b/build.gradle @@ -63,7 +63,7 @@ subprojects { ext { libraries = [ - guava: "com.google.guava:guava:28.1-jre", + guava: "com.google.guava:guava:29.0-jre", junit: "junit:junit:4.13", mockito: 'org.mockito:mockito-core:3.+', slf4j: "org.slf4j:slf4j-api:1.7.25", diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 2ad664cc..137e9f06 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -9,8 +9,8 @@ "requested": "2.9.8" }, "com.google.guava:guava": { - "locked": "28.1-jre", - "requested": "28.1-jre" + "locked": "29.0-jre", + "requested": "29.0-jre" }, "com.netflix.archaius:archaius-core": { "locked": "0.7.5", @@ -131,8 +131,8 @@ "requested": "2.9.8" }, "com.google.guava:guava": { - "locked": "28.1-jre", - "requested": "28.1-jre" + "locked": "29.0-jre", + "requested": "29.0-jre" }, "com.netflix.archaius:archaius-core": { "locked": "0.7.5", @@ -253,8 +253,8 @@ "requested": "2.9.8" }, "com.google.guava:guava": { - "locked": "28.1-jre", - "requested": "28.1-jre" + "locked": "29.0-jre", + "requested": "29.0-jre" }, "com.google.truth:truth": { "locked": "1.0.1", @@ -395,8 +395,8 @@ "requested": "2.9.8" }, "com.google.guava:guava": { - "locked": "28.1-jre", - "requested": "28.1-jre" + "locked": "29.0-jre", + "requested": "29.0-jre" }, "com.netflix.archaius:archaius-core": { "locked": "0.7.6", @@ -513,8 +513,8 @@ "requested": "2.9.8" }, "com.google.guava:guava": { - "locked": "28.1-jre", - "requested": "28.1-jre" + "locked": "29.0-jre", + "requested": "29.0-jre" }, "com.google.truth:truth": { "locked": "1.0.1", @@ -639,8 +639,8 @@ "requested": "2.9.8" }, "com.google.guava:guava": { - "locked": "28.1-jre", - "requested": "28.1-jre" + "locked": "29.0-jre", + "requested": "29.0-jre" }, "com.google.truth:truth": { "locked": "1.0.1", diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index cda66dd5..d050e46c 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -298,7 +298,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "28.1-jre" + "locked": "29.0-jre" }, "com.google.inject:guice": { "locked": "4.2.3", @@ -509,7 +509,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "28.1-jre" + "locked": "29.0-jre" }, "com.google.inject:guice": { "locked": "4.2.3", @@ -845,7 +845,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "28.1-jre" + "locked": "29.0-jre" }, "com.google.inject:guice": { "locked": "4.2.3", diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 90f7fb0b..51294ded 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -7,8 +7,8 @@ "locked": "2.9.8" }, "com.google.guava:guava": { - "locked": "28.1-jre", - "requested": "28.1-jre" + "locked": "29.0-jre", + "requested": "29.0-jre" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -144,8 +144,8 @@ "locked": "2.9.8" }, "com.google.guava:guava": { - "locked": "28.1-jre", - "requested": "28.1-jre" + "locked": "29.0-jre", + "requested": "29.0-jre" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -290,8 +290,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "28.1-jre", - "requested": "28.1-jre" + "locked": "29.0-jre", + "requested": "29.0-jre" }, "com.google.truth:truth": { "locked": "1.0.1", @@ -486,8 +486,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "28.1-jre", - "requested": "28.1-jre" + "locked": "29.0-jre", + "requested": "29.0-jre" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -667,7 +667,7 @@ "com.netflix.zuul:zuul-core", "com.netflix.zuul:zuul-processor" ], - "locked": "28.1-jre" + "locked": "29.0-jre" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -843,8 +843,8 @@ "locked": "2.9.8" }, "com.google.guava:guava": { - "locked": "28.1-jre", - "requested": "28.1-jre" + "locked": "29.0-jre", + "requested": "29.0-jre" }, "com.google.truth:truth": { "locked": "1.0.1", @@ -989,8 +989,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "28.1-jre", - "requested": "28.1-jre" + "locked": "29.0-jre", + "requested": "29.0-jre" }, "com.google.truth:truth": { "locked": "1.0.1", diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index bc211ff2..183445cb 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -17,7 +17,7 @@ "com.netflix.zuul:zuul-core", "com.netflix.zuul:zuul-processor" ], - "locked": "28.1-jre" + "locked": "29.0-jre" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -504,7 +504,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "28.1-jre" + "locked": "29.0-jre" }, "com.google.inject:guice": { "firstLevelTransitive": [ @@ -723,7 +723,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "28.1-jre" + "locked": "29.0-jre" }, "com.google.inject:guice": { "firstLevelTransitive": [ @@ -1077,7 +1077,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "28.1-jre" + "locked": "29.0-jre" }, "com.google.inject:guice": { "firstLevelTransitive": [ From 140391151b6c744ac50e648995a1c90c1bd3fea2 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Sat, 18 Apr 2020 00:57:28 -0700 Subject: [PATCH 053/273] zuul-guice: avoid AOP build to reduce jdk11 warnings --- zuul-guice/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-guice/build.gradle b/zuul-guice/build.gradle index 2ffdb0fa..dc184d47 100644 --- a/zuul-guice/build.gradle +++ b/zuul-guice/build.gradle @@ -2,7 +2,7 @@ apply plugin: "java-library" dependencies { implementation project(":zuul-core") - api(group: 'com.google.inject', name: 'guice', version: "4.2.3") + api(group: 'com.google.inject', name: 'guice', version: "4.2.3", classifier: "no_aop") implementation 'commons-configuration:commons-configuration:1.8' testImplementation "com.netflix.governator:governator-test-junit:1.+" From e031117abb223533bb88cd55ab125fa614715c97 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 20 Apr 2020 13:18:13 -0700 Subject: [PATCH 054/273] zuul-core: make address selection logic overridable --- .../DefaultClientChannelManager.java | 149 ++++++++++-------- .../DefaultClientChannelManagerTest.java | 120 ++++++++++++++ 2 files changed, 207 insertions(+), 62 deletions(-) create mode 100644 zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java index f5a7bd5e..d63d99d8 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java @@ -18,6 +18,7 @@ import static com.netflix.client.config.CommonClientConfigKey.NFLoadBalancerClassName; +import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Throwables; import com.google.common.collect.Sets; import com.google.common.net.InetAddresses; @@ -341,68 +342,8 @@ public Promise acquire( return promise; } - String rawHost; - int port; - InstanceInfo instanceInfo; - if (chosenServer instanceof DiscoveryEnabledServer) { - DiscoveryEnabledServer discoveryServer = (DiscoveryEnabledServer) chosenServer; - // Configuration for whether to use IP address or host has already been applied in the - // DiscoveryEnabledServer constructor. - rawHost = discoveryServer.getHost(); - port = discoveryServer.getPort(); - instanceInfo = discoveryServer.getInstanceInfo(); - // TODO(carl-mastrangelo): pull the IPv6 addr from the instance info, if present. - } else { - // create mock instance info for non-discovery instances - rawHost = chosenServer.getHost(); - port = chosenServer.getPort(); - instanceInfo = new InstanceInfo( - chosenServer.getId(), - null, - null, - chosenServer.getHost(), - chosenServer.getId(), - null, - null, - null, - null, - null, - null, - null, - null, - 0, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null); - } - - InetSocketAddress serverAddr; - try { - InetAddress ipAddr = InetAddresses.forString(rawHost); - serverAddr = new InetSocketAddress(ipAddr, port); - } catch (IllegalArgumentException e1) { - LOG.warn("NettyClientConnectionFactory got an unresolved address, addr: {}", rawHost); - Counter unresolvedDiscoveryHost = SpectatorUtils.newCounter( - "unresolvedDiscoveryHost", - connPoolConfig.getOriginName() == null ? "unknownOrigin" : connPoolConfig.getOriginName()); - unresolvedDiscoveryHost.increment(); - try { - serverAddr = new InetSocketAddress(rawHost, port); - } catch (RuntimeException e2) { - e1.addSuppressed(e2); - throw e1; - } - } - final InetSocketAddress finalServerAddr = serverAddr; + SocketAddress finalServerAddr = pickAddress(chosenServer); + InstanceInfo instanceInfo = deriveInstanceInfo(chosenServer); selectedServer.set(chosenServer); @@ -481,4 +422,88 @@ public IClientConfig getClientConfig() { protected ConcurrentHashMap getPerServerPools() { return perServerPools; } + + protected InstanceInfo deriveInstanceInfo(Server chosenServer) { + return deriveInstanceInfoInternal(chosenServer); + } + + @VisibleForTesting + static InstanceInfo deriveInstanceInfoInternal(Server chosenServer) { + if (chosenServer instanceof DiscoveryEnabledServer) { + DiscoveryEnabledServer discoveryServer = (DiscoveryEnabledServer) chosenServer; + return discoveryServer.getInstanceInfo(); + } else { + return new InstanceInfo( + /* instanceId= */ chosenServer.getId(), + /* appName= */ null, + /* appGroupName= */ null, + /* ipAddr= */ chosenServer.getHost(), + /* sid= */ chosenServer.getId(), + /* port= */ null, + /* securePort= */ null, + /* homePageUrl= */ null, + /* statusPageUrl= */ null, + /* healthCheckUrl= */ null, + /* secureHealthCheckUrl= */ null, + /* vipAddress= */ null, + /* secureVipAddress= */ null, + /* countryId= */ 0, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null); + } + } + + @VisibleForTesting + static SocketAddress pickAddressInternal(Server chosenServer, @Nullable String connPoolConfigOriginName) { + String rawHost; + int port; + if (chosenServer instanceof DiscoveryEnabledServer) { + DiscoveryEnabledServer discoveryServer = (DiscoveryEnabledServer) chosenServer; + // Configuration for whether to use IP address or host has already been applied in the + // DiscoveryEnabledServer constructor. + rawHost = discoveryServer.getHost(); + port = discoveryServer.getPort(); + } else { + // create mock instance info for non-discovery instances + rawHost = chosenServer.getHost(); + port = chosenServer.getPort(); + } + + InetSocketAddress serverAddr; + try { + InetAddress ipAddr = InetAddresses.forString(rawHost); + serverAddr = new InetSocketAddress(ipAddr, port); + } catch (IllegalArgumentException e1) { + LOG.warn("NettyClientConnectionFactory got an unresolved address, addr: {}", rawHost); + Counter unresolvedDiscoveryHost = SpectatorUtils.newCounter( + "unresolvedDiscoveryHost", + connPoolConfigOriginName == null ? "unknownOrigin" : connPoolConfigOriginName); + unresolvedDiscoveryHost.increment(); + try { + serverAddr = new InetSocketAddress(rawHost, port); + } catch (RuntimeException e2) { + e1.addSuppressed(e2); + throw e1; + } + } + + return serverAddr; + } + + /** + * Given a server chosen from the load balancer, pick the appropriate address to connect to. + */ + protected SocketAddress pickAddress(Server chosenServer) { + return pickAddressInternal(chosenServer, connPoolConfig.getOriginName()); + } } diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java new file mode 100644 index 00000000..51dfbf22 --- /dev/null +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java @@ -0,0 +1,120 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.netty.connectionpool; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertTrue; + +import com.google.common.net.InetAddresses; +import com.google.common.truth.Truth; +import com.netflix.appinfo.InstanceInfo; +import com.netflix.appinfo.InstanceInfo.Builder; +import com.netflix.loadbalancer.Server; +import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; +import java.net.InetSocketAddress; +import java.net.SocketAddress; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** + * Tests for {@link DefaultClientChannelManager}. These tests don't use IPv6 addresses because {@link InstanceInfo} + * is not capable of expressing them. + */ +@RunWith(JUnit4.class) +public class DefaultClientChannelManagerTest { + + @Test + public void deriveInstanceInfoInternal_nonDiscovery() { + Server s = new Server("localhost", 443); + + InstanceInfo info = DefaultClientChannelManager.deriveInstanceInfoInternal(s); + + // Despite the port and ipaddr being obviously wrong, this is what the previous implementation did. + // TODO(carl-mastrangelo): find out the original reason why and fix this. + assertEquals(0, info.getPort()); + assertEquals("localhost", info.getIPAddr()); + + assertEquals("localhost:443", info.getId()); + assertEquals("localhost:443", info.getInstanceId()); + } + + @Test + public void deriveInstanceInfoInternal_discovery() { + InstanceInfo instanceInfo = Builder.newBuilder().setAppName("app").build(); + Server s = new DiscoveryEnabledServer(instanceInfo, true); + + InstanceInfo actual = DefaultClientChannelManager.deriveInstanceInfoInternal(s); + + assertSame(instanceInfo, actual); + } + + @Test + public void pickAddressInternal_discovery() { + InstanceInfo instanceInfo = + Builder.newBuilder().setAppName("app").setHostName("192.168.0.1").setPort(443).build(); + Server s = new DiscoveryEnabledServer(instanceInfo, true); + + SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, "originname"); + + Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); + InetSocketAddress socketAddress = (InetSocketAddress) addr; + assertEquals(InetAddresses.forString("192.168.0.1"), socketAddress.getAddress()); + assertEquals(443, socketAddress.getPort()); + } + + @Test + public void pickAddressInternal_discovery_unresolved() { + InstanceInfo instanceInfo = + Builder.newBuilder().setAppName("app").setHostName("localhost").setPort(443).build(); + Server s = new DiscoveryEnabledServer(instanceInfo, true); + + SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, "originname"); + + Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); + InetSocketAddress socketAddress = (InetSocketAddress) addr; + + assertTrue(socketAddress.toString(), socketAddress.getAddress().isLoopbackAddress()); + assertEquals(443, socketAddress.getPort()); + } + + @Test + public void pickAddressInternal_nonDiscovery() { + Server s = new Server("192.168.0.1", 443); + + SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, "originname"); + + Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); + InetSocketAddress socketAddress = (InetSocketAddress) addr; + assertEquals(InetAddresses.forString("192.168.0.1"), socketAddress.getAddress()); + assertEquals(443, socketAddress.getPort()); + } + + @Test + public void pickAddressInternal_nonDiscovery_unresolved() { + Server s = new Server("localhost", 443); + + SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, "originname"); + + Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); + InetSocketAddress socketAddress = (InetSocketAddress) addr; + + assertTrue(socketAddress.toString(), socketAddress.getAddress().isLoopbackAddress()); + assertEquals(443, socketAddress.getPort()); + } +} From e7be794fd7ba11953f0babbbd5f38a2d653db125 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 20 Apr 2020 17:10:31 -0700 Subject: [PATCH 055/273] zuul-processor: Make a Configuration based processor, and stop producing generated Java files. (#791) While Gradle worked fine with the existing code, IntelliJ does not. IntelliJ's incremental compilation does not include the full classpath, making most of the files in the Filter class not available. The generated file thus changes frequently and prevents running from the IDE. JetBrains considers this a feature, and will not change it. Work around this by generating a list of classes, which is appended, rather than created from scratch each compilation. This allows incremental compilation in IntelliJ to keep running at the cost of potentially having stale filters listed. --- .../com/netflix/zuul/StaticFilterLoader.java | 53 ++++++ .../filters/processor/FilterProcessor.java | 168 ++++++++---------- .../processor/FilterProcessorTest.java | 55 +----- 3 files changed, 132 insertions(+), 144 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/StaticFilterLoader.java b/zuul-core/src/main/java/com/netflix/zuul/StaticFilterLoader.java index 192991be..7c6c18d4 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/StaticFilterLoader.java +++ b/zuul-core/src/main/java/com/netflix/zuul/StaticFilterLoader.java @@ -19,13 +19,21 @@ import com.google.errorprone.annotations.DoNotCall; import com.netflix.zuul.filters.FilterType; import com.netflix.zuul.filters.ZuulFilter; +import com.netflix.zuul.message.ZuulMessage; +import java.io.BufferedReader; import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.URL; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.EnumMap; import java.util.HashMap; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -34,12 +42,18 @@ import java.util.TreeSet; import javax.annotation.Nullable; import javax.inject.Inject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * An immutable static collection of filters. */ public final class StaticFilterLoader implements FilterLoader { + private static final Logger logger = LoggerFactory.getLogger(StaticFilterLoader.class); + + public static final String RESOURCE_NAME = "META-INF/zuul/allfilters"; + private final Map>> filtersByType; private final Map>> filtersByTypeAndName; @@ -70,6 +84,45 @@ public StaticFilterLoader( this.filtersByType = Collections.unmodifiableMap(filtersByType); } + public static Set>> loadFilterTypesFromResources(ClassLoader loader) + throws IOException { + Set>> filterTypes = new LinkedHashSet<>(); + for (URL url : Collections.list(loader.getResources(RESOURCE_NAME))) { + try (InputStream is = url.openStream(); + InputStreamReader isr = new InputStreamReader(is, StandardCharsets.UTF_8); + BufferedReader br = new BufferedReader(isr)) { + String line; + while ((line = br.readLine()) != null) { + String trimmed = line.trim(); + if (!trimmed.isEmpty()) { + Class clz; + try { + clz = Class.forName(trimmed, false, loader); + } catch (ClassNotFoundException e) { + // This can happen if a filter is deleted, but the annotation processor doesn't + // remove it from the list. This is mainly a problem with IntelliJ, which + // forces append only annotation processors. Incremental recompilation drops + // most of the classpath, making the processor unable to reconstruct the filter + // list. To work around this problem, use the stale, cached filter list from + // the initial full compilation and add to it. This makes incremental + // compilation work later, at the cost of polluting the filter list. It's a + // better experience to log a warning (and do a clean build), than to + // mysteriously classes. + + logger.warn("Missing Filter", e); + continue; + } + @SuppressWarnings("unchecked") + Class> filterClz = + (Class>) clz.asSubclass(ZuulFilter.class); + filterTypes.add(filterClz); + } + } + } + } + return Collections.unmodifiableSet(filterTypes); + } + @Override @DoNotCall public boolean putFilter(File file) { diff --git a/zuul-processor/src/main/java/com/netflix/zuul/filters/processor/FilterProcessor.java b/zuul-processor/src/main/java/com/netflix/zuul/filters/processor/FilterProcessor.java index 3c8ee179..309e7247 100644 --- a/zuul-processor/src/main/java/com/netflix/zuul/filters/processor/FilterProcessor.java +++ b/zuul-processor/src/main/java/com/netflix/zuul/filters/processor/FilterProcessor.java @@ -17,24 +17,25 @@ package com.netflix.zuul.filters.processor; import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.CaseFormat; -import com.google.common.base.Converter; -import com.google.common.base.Splitter; -import com.netflix.zuul.Filter; -import com.netflix.zuul.Filter.FilterPackageName; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.FileNotFoundException; import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.Reader; import java.io.Writer; +import java.nio.charset.StandardCharsets; +import java.nio.file.NoSuchFileException; import java.util.ArrayList; import java.util.Collection; -import java.util.HashMap; +import java.util.Collections; +import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Objects; import java.util.Set; -import java.util.TreeMap; -import java.util.TreeSet; import javax.annotation.processing.AbstractProcessor; import javax.annotation.processing.Filer; import javax.annotation.processing.RoundEnvironment; @@ -42,127 +43,100 @@ import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; -import javax.lang.model.element.ElementKind; import javax.lang.model.element.Modifier; import javax.lang.model.element.TypeElement; -import javax.lang.model.util.Elements; -import javax.tools.JavaFileObject; +import javax.tools.FileObject; +import javax.tools.StandardLocation; -@SupportedAnnotationTypes({FilterProcessor.FILTER_TYPE, FilterProcessor.FILTER_PACKAGE_TYPE}) +@SupportedAnnotationTypes(FilterProcessor.FILTER_TYPE) @SupportedSourceVersion(SourceVersion.RELEASE_8) public final class FilterProcessor extends AbstractProcessor { static final String FILTER_TYPE = "com.netflix.zuul.Filter"; - static final String FILTER_PACKAGE_TYPE = "com.netflix.zuul.Filter.FilterPackageName"; - private final Map> packageToElements = new TreeMap<>(String::compareTo); - private final Map packageNameOverride = new HashMap<>(); + private final Set annotatedElements = new HashSet<>(); @Override public boolean process(Set annotations, RoundEnvironment roundEnv) { - Set packageAnnotated = roundEnv.getElementsAnnotatedWith(FilterPackageName.class); - Set annotated = roundEnv.getElementsAnnotatedWith(Filter.class); - Elements elementUtils = processingEnv.getElementUtils(); - for (Element pkg : packageAnnotated) { - assert pkg.getKind() == ElementKind.PACKAGE : pkg; - String name = String.valueOf(elementUtils.getPackageOf(pkg).getQualifiedName()); - String override = pkg.getAnnotation(FilterPackageName.class).value(); - packageNameOverride.put(name, override); - } - + Set annotated = + roundEnv.getElementsAnnotatedWith(processingEnv.getElementUtils().getTypeElement(FILTER_TYPE)); for (Element el : annotated) { if (el.getModifiers().contains(Modifier.ABSTRACT)) { continue; } - packageToElements.computeIfAbsent( - String.valueOf(elementUtils.getPackageOf(el).getQualifiedName()), k -> new LinkedHashSet<>()) - .add(el); + annotatedElements.add(processingEnv.getElementUtils().getBinaryName((TypeElement) el).toString()); } - // We can't check if processing is over, because we can't use the filer after that. - if (!packageToElements.isEmpty()) { + if (roundEnv.processingOver()) { try { - writeFiles(processingEnv.getFiler(), packageToElements, packageNameOverride); - } catch (Exception e) { + addNewClasses(processingEnv.getFiler(), annotatedElements); + } catch (IOException e) { throw new RuntimeException(e); } finally { - packageToElements.clear(); - packageNameOverride.clear(); + annotatedElements.clear(); } } - return true; } - @VisibleForTesting - static void writeFile(Writer writer, String packageName, String className, Collection elements) - throws IOException { - writer.write("package " + packageName + ";\n"); - writer.write("\n"); - writer.write("@javax.annotation.Generated(\"by: \\\"" + FilterProcessor.class.getName() + "\\\"\")\n"); - writer.write("public final class " + className + " {\n"); - writer.write("\n"); - writer.write(" private " + className + "() {}\n"); - writer.write("\n"); - writer.write(" public static java.util.List>> getFilters() {\n"); - writer.write(" return FILTERS;\n"); - writer.write(" }\n"); - writer.write("\n"); - writer.write(" private static final java.util.List>> FILTERS =\n"); - writer.write(" java.util.Collections.unmodifiableList(java.util.Arrays.asList(\n"); - int i = 0; - for (Element element : elements) { - writer.write(" " + element + ".class"); - if (++i < elements.size()) { - writer.write(','); + static void addNewClasses(Filer filer, Collection elements) throws IOException { + String resourceName = "META-INF/zuul/allfilters"; + List existing = Collections.emptyList(); + try { + FileObject existingFilters = filer.getResource(StandardLocation.CLASS_OUTPUT, "", resourceName); + try (InputStream is = existingFilters.openInputStream(); + InputStreamReader reader = new InputStreamReader(is, StandardCharsets.UTF_8)) { + existing = readResourceFile(reader); } - writer.write('\n'); + } catch (FileNotFoundException | NoSuchFileException e) { + // Perhaps log this. + } catch (IOException e) { + throw new RuntimeException(e); } - writer.write(" ));\n"); - writer.write("}\n"); - } - private static void writeFiles( - Filer filer, - Map> packageToElements, - Map packageNameOverride) throws Exception { - for (Entry> entry : packageToElements.entrySet()) { - String pkg = entry.getKey(); - List elements = new ArrayList<>(entry.getValue()); - String className; - if (packageNameOverride.containsKey(pkg)) { - className = packageNameOverride.get(pkg); - } else { - className = deriveGeneratedClassName(pkg); + int sizeBefore = existing.size(); + Set existingSet = new LinkedHashSet<>(existing); + List newElements = new ArrayList<>(existingSet); + for (String element : elements) { + if (existingSet.add(element)) { + newElements.add(element); } - JavaFileObject source = filer.createSourceFile(pkg + "." + className, elements.toArray(new Element[0])); - try (Writer writer = source.openWriter()) { - writeFile(writer, pkg, className, elements); + } + if (newElements.size() == sizeBefore) { + // nothing to do. + return; + } + newElements.sort(String::compareTo); + + FileObject dest = filer.createResource(StandardLocation.CLASS_OUTPUT, "", resourceName); + try (OutputStream os = dest.openOutputStream(); + OutputStreamWriter osw = new OutputStreamWriter(os, StandardCharsets.UTF_8)) { + writeResourceFile(osw, newElements); + } + } + + @VisibleForTesting + static List readResourceFile(Reader reader) throws IOException { + BufferedReader br = new BufferedReader(reader); + String line; + List lines = new ArrayList<>(); + while ((line = br.readLine()) != null) { + if (line.trim().isEmpty()) { + continue; } + lines.add(line); } + return Collections.unmodifiableList(lines); } @VisibleForTesting - static String deriveGeneratedClassName(String packageName) { - Objects.requireNonNull(packageName, "packageName"); - List parts = Splitter.on('.').splitToList(packageName); - Converter converter = CaseFormat.LOWER_UNDERSCORE.converterTo(CaseFormat.UPPER_CAMEL); - String baseName = ""; - switch (parts.size()) { - default: - // fallthrough - case 2: - baseName += converter.convert(parts.get(parts.size() - 2)); - // fallthrough - case 1: - baseName += converter.convert(parts.get(parts.size() - 1)); - // fallthrough - case 0: - baseName += "Filters"; + static void writeResourceFile(Writer writer, Collection elements) throws IOException { + BufferedWriter bw = new BufferedWriter(writer); + for (Object element : elements) { + bw.write(String.valueOf(element)); + bw.newLine(); } - return baseName; + bw.flush(); } } diff --git a/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/FilterProcessorTest.java b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/FilterProcessorTest.java index 5c443ff4..5ca74d16 100644 --- a/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/FilterProcessorTest.java +++ b/zuul-processor/src/test/java/com/netflix/zuul/filters/processor/FilterProcessorTest.java @@ -16,15 +16,12 @@ package com.netflix.zuul.filters.processor; -import static org.junit.Assert.assertEquals; - import com.google.common.truth.Truth; +import com.netflix.zuul.StaticFilterLoader; import com.netflix.zuul.filters.ZuulFilter; -import com.netflix.zuul.filters.processor.override.MySubpackage; import com.netflix.zuul.filters.processor.override.SubpackageFilter; import com.netflix.zuul.filters.processor.subpackage.OverrideFilter; -import com.netflix.zuul.filters.processor.subpackage.ProcessorSubpackageFilters; -import java.util.List; +import java.util.Collection; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -36,52 +33,16 @@ public class FilterProcessorTest { @Test - public void allFilterClassedRecorded() { - List>> filters = FiltersProcessorFilters.getFilters(); - List>> subpackage = ProcessorSubpackageFilters.getFilters(); - List>> override = MySubpackage.getFilters(); + public void allFilterClassedRecorded() throws Exception { + Collection>> filters = + StaticFilterLoader.loadFilterTypesFromResources(getClass().getClassLoader()); Truth.assertThat(filters).containsExactly( OuterClassFilter.class, TopLevelFilter.class, TopLevelFilter.StaticSubclassFilter.class, - TopLevelFilter.SubclassFilter.class); - Truth.assertThat(subpackage).containsExactly(OverrideFilter.class); - Truth.assertThat(override).containsExactly(SubpackageFilter.class); - } - - @Test - public void deriveGeneratedClassName_emptyPackage() { - String className = FilterProcessor.deriveGeneratedClassName(""); - - assertEquals("Filters", className); - } - - @Test - public void deriveGeneratedClassName_shortPackage() { - String className = FilterProcessor.deriveGeneratedClassName("somepackage"); - - assertEquals("SomepackageFilters", className); - } - - @Test - public void deriveGeneratedClassName_twoPartPackage() { - String className = FilterProcessor.deriveGeneratedClassName("two.part"); - - assertEquals("TwoPartFilters", className); - } - - @Test - public void deriveGeneratedClassName_threePartPackage() { - String className = FilterProcessor.deriveGeneratedClassName("packed.three.part"); - - assertEquals("ThreePartFilters", className); - } - - @Test - public void deriveGeneratedClassName_underscorePackage() { - String className = FilterProcessor.deriveGeneratedClassName("packed.three_under.part"); - - assertEquals("ThreeUnderPartFilters", className); + TopLevelFilter.SubclassFilter.class, + OverrideFilter.class, + SubpackageFilter.class); } } From 9e0adb0fdaa4bc55c87c19573bbf6316b658502e Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 20 Apr 2020 20:24:41 -0700 Subject: [PATCH 056/273] all: roll back groovy dep as it seems to break publishing --- gradle.properties | 2 +- zuul-core/dependencies.lock | 24 ++++++++++++------------ zuul-guice/dependencies.lock | 12 ++++++------ zuul-processor/dependencies.lock | 14 +++++++------- zuul-sample/dependencies.lock | 14 +++++++------- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3316457c..d60ce94e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -versions_groovy=3.0.3 +versions_groovy=2.4.19 versions_ribbon=2.7.17 versions_netty=4.1.48.Final release.scope=patch diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 137e9f06..d1ee75e1 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -105,8 +105,8 @@ "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { - "locked": "3.0.3", - "requested": "3.0.3" + "locked": "2.4.19", + "requested": "2.4.19" }, "org.slf4j:slf4j-api": { "locked": "1.7.25", @@ -227,8 +227,8 @@ "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { - "locked": "3.0.3", - "requested": "3.0.3" + "locked": "2.4.19", + "requested": "2.4.19" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -361,8 +361,8 @@ "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { - "locked": "3.0.3", - "requested": "3.0.3" + "locked": "2.4.19", + "requested": "2.4.19" }, "org.mockito:mockito-core": { "locked": "3.3.3", @@ -495,8 +495,8 @@ "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { - "locked": "3.0.3", - "requested": "3.0.3" + "locked": "2.4.19", + "requested": "2.4.19" }, "org.slf4j:slf4j-api": { "locked": "1.7.30", @@ -617,8 +617,8 @@ "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { - "locked": "3.0.3", - "requested": "3.0.3" + "locked": "2.4.19", + "requested": "2.4.19" }, "org.mockito:mockito-core": { "locked": "3.3.3", @@ -747,8 +747,8 @@ "requested": "1.+" }, "org.codehaus.groovy:groovy-all": { - "locked": "3.0.3", - "requested": "3.0.3" + "locked": "2.4.19", + "requested": "2.4.19" }, "org.mockito:mockito-core": { "locked": "3.3.3", diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index d050e46c..a29f1775 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -123,7 +123,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -264,7 +264,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -471,7 +471,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.mockito:mockito-core": { "locked": "3.3.3", @@ -670,7 +670,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -815,7 +815,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.mockito:mockito-core": { "locked": "3.3.3", @@ -1018,7 +1018,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.mockito:mockito-core": { "locked": "3.3.3", diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 51294ded..ce4a7522 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -119,7 +119,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -256,7 +256,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -452,7 +452,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -640,7 +640,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -826,7 +826,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -963,7 +963,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -1151,7 +1151,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 183445cb..0d57b236 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -176,7 +176,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -319,7 +319,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -470,7 +470,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -689,7 +689,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -908,7 +908,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -1051,7 +1051,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -1262,7 +1262,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "3.0.3" + "locked": "2.4.19" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ From ff934c22f9b10fa628eb71541ae1bff91519e50f Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 20 Apr 2020 23:15:18 -0700 Subject: [PATCH 057/273] all: pin version Travis CI made a change in how it pulls git repos, which no longer includes all tags. This means the version can't be inferred, causing releases and snapshots to use version 0.0.1. Pin the version for now, which is how other OSS projects work. --- gradle.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/gradle.properties b/gradle.properties index d60ce94e..026034c7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,3 +2,4 @@ versions_groovy=2.4.19 versions_ribbon=2.7.17 versions_netty=4.1.48.Final release.scope=patch +release.version=2.1.8-SNAPSHOT From 14cbe4442b084cf7b7a370736052e9b19244ef29 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 27 Apr 2020 10:16:43 -0700 Subject: [PATCH 058/273] zuul-core,zuul-groovy: split groovy support to a separate package --- settings.gradle | 1 + zuul-core/build.gradle | 1 - zuul-core/dependencies.lock | 24 - .../com/netflix/zuul/DynamicFilterLoader.java | 10 - .../com/netflix/zuul/FilterFileManager.java | 5 - .../netflix/zuul/FilterFileManagerTest.java | 8 +- zuul-groovy/build.gradle | 17 + zuul-groovy/dependencies.lock | 962 ++++++++++++++++++ .../netflix/zuul/groovy/GroovyCompiler.java | 0 .../netflix/zuul/groovy/GroovyFileFilter.java | 8 - .../zuul/scriptManager/FilterInfo.java | 0 .../zuul/scriptManager/FilterVerifier.java | 0 .../zuul/groovy/GroovyCompilerTest.java | 3 +- .../zuul/groovy/GroovyFileFilterTest.java | 0 .../scriptManager/FilterVerifierTest.java | 0 zuul-guice/dependencies.lock | 36 - .../netflix/zuul/init/ZuulFiltersModule.java | 10 +- .../com/netflix/zuul/init/InitTestModule.java | 2 + zuul-processor/dependencies.lock | 42 - zuul-sample/build.gradle | 1 + zuul-sample/dependencies.lock | 39 +- .../netflix/zuul/sample/ZuulSampleModule.java | 6 + 22 files changed, 1030 insertions(+), 145 deletions(-) create mode 100644 zuul-groovy/build.gradle create mode 100644 zuul-groovy/dependencies.lock rename {zuul-core => zuul-groovy}/src/main/java/com/netflix/zuul/groovy/GroovyCompiler.java (100%) rename {zuul-core => zuul-groovy}/src/main/java/com/netflix/zuul/groovy/GroovyFileFilter.java (85%) rename {zuul-core => zuul-groovy}/src/main/java/com/netflix/zuul/scriptManager/FilterInfo.java (100%) rename {zuul-core => zuul-groovy}/src/main/java/com/netflix/zuul/scriptManager/FilterVerifier.java (100%) rename {zuul-core => zuul-groovy}/src/test/java/com/netflix/zuul/groovy/GroovyCompilerTest.java (94%) rename {zuul-core => zuul-groovy}/src/test/java/com/netflix/zuul/groovy/GroovyFileFilterTest.java (100%) rename {zuul-core => zuul-groovy}/src/test/java/com/netflix/zuul/scriptManager/FilterVerifierTest.java (100%) diff --git a/settings.gradle b/settings.gradle index 6bb18532..05cdefb3 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,6 +1,7 @@ rootProject.name='zuul' include 'zuul-core' +include 'zuul-groovy' include 'zuul-guice' include 'zuul-processor' include 'zuul-sample' diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index ae85568e..fc494610 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -4,7 +4,6 @@ apply plugin: "java-library" dependencies { implementation libraries.guava - api "org.codehaus.groovy:groovy-all:${versions_groovy}" // TODO(carl-mastrangelo): this can be implementation; remove Logger from public api points. api libraries.slf4j implementation 'org.bouncycastle:bcprov-jdk15on:1.+' diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index d1ee75e1..8fb7107c 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -104,10 +104,6 @@ "locked": "1.65", "requested": "1.+" }, - "org.codehaus.groovy:groovy-all": { - "locked": "2.4.19", - "requested": "2.4.19" - }, "org.slf4j:slf4j-api": { "locked": "1.7.25", "requested": "1.7.25" @@ -226,10 +222,6 @@ "locked": "1.65", "requested": "1.+" }, - "org.codehaus.groovy:groovy-all": { - "locked": "2.4.19", - "requested": "2.4.19" - }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", "requested": "1.21" @@ -360,10 +352,6 @@ "locked": "1.65", "requested": "1.+" }, - "org.codehaus.groovy:groovy-all": { - "locked": "2.4.19", - "requested": "2.4.19" - }, "org.mockito:mockito-core": { "locked": "3.3.3", "requested": "3.+" @@ -494,10 +482,6 @@ "locked": "1.65", "requested": "1.+" }, - "org.codehaus.groovy:groovy-all": { - "locked": "2.4.19", - "requested": "2.4.19" - }, "org.slf4j:slf4j-api": { "locked": "1.7.30", "requested": "1.7.25" @@ -616,10 +600,6 @@ "locked": "1.65", "requested": "1.+" }, - "org.codehaus.groovy:groovy-all": { - "locked": "2.4.19", - "requested": "2.4.19" - }, "org.mockito:mockito-core": { "locked": "3.3.3", "requested": "3.+" @@ -746,10 +726,6 @@ "locked": "1.65", "requested": "1.+" }, - "org.codehaus.groovy:groovy-all": { - "locked": "2.4.19", - "requested": "2.4.19" - }, "org.mockito:mockito-core": { "locked": "3.3.3", "requested": "3.+" diff --git a/zuul-core/src/main/java/com/netflix/zuul/DynamicFilterLoader.java b/zuul-core/src/main/java/com/netflix/zuul/DynamicFilterLoader.java index db3928bf..ac5af836 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/DynamicFilterLoader.java +++ b/zuul-core/src/main/java/com/netflix/zuul/DynamicFilterLoader.java @@ -18,9 +18,7 @@ import com.netflix.zuul.filters.FilterRegistry; import com.netflix.zuul.filters.FilterType; -import com.netflix.zuul.filters.MutableFilterRegistry; import com.netflix.zuul.filters.ZuulFilter; -import com.netflix.zuul.groovy.GroovyCompiler; import java.io.File; import java.lang.reflect.Modifier; import java.util.ArrayList; @@ -51,14 +49,6 @@ public final class DynamicFilterLoader implements FilterLoader { private final FilterFactory filterFactory; - /** - * TODO(carl-mastrangelo): remove this ctor as it creates an unwanted dependency on Groovy. - */ - @Deprecated - public DynamicFilterLoader() { - this(new MutableFilterRegistry(), new GroovyCompiler(), new DefaultFilterFactory()); - } - @Inject public DynamicFilterLoader( FilterRegistry filterRegistry, diff --git a/zuul-core/src/main/java/com/netflix/zuul/FilterFileManager.java b/zuul-core/src/main/java/com/netflix/zuul/FilterFileManager.java index f7634063..1cc2ceef 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/FilterFileManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/FilterFileManager.java @@ -17,7 +17,6 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.netflix.config.DynamicIntProperty; -import com.netflix.zuul.groovy.GroovyFileFilter; import java.io.File; import java.io.FilenameFilter; import java.io.IOException; @@ -209,10 +208,6 @@ public FilterFileManagerConfig(String[] directories, String[] classNames, int po this.filenameFilter = filenameFilter; } - public FilterFileManagerConfig(String[] directories, String[] classNames, int pollingIntervalSeconds) { - this(directories, classNames, pollingIntervalSeconds, new GroovyFileFilter()); - } - public String[] getDirectories() { return directories; } diff --git a/zuul-core/src/test/java/com/netflix/zuul/FilterFileManagerTest.java b/zuul-core/src/test/java/com/netflix/zuul/FilterFileManagerTest.java index c56fab82..f25dab16 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/FilterFileManagerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/FilterFileManagerTest.java @@ -23,6 +23,7 @@ import static org.mockito.Mockito.verify; import java.io.File; +import java.io.FilenameFilter; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -51,7 +52,12 @@ public void before() { @Test public void testFileManagerInit() throws Exception { - FilterFileManager.FilterFileManagerConfig config = new FilterFileManager.FilterFileManagerConfig(new String[]{"test", "test1"}, new String[]{"com.netflix.blah.SomeFilter"}, 1); + FilterFileManager.FilterFileManagerConfig config = + new FilterFileManager.FilterFileManagerConfig( + new String[]{"test", "test1"}, + new String[]{"com.netflix.blah.SomeFilter"}, + 1, + (dir, name) -> false); FilterFileManager manager = new FilterFileManager(config, filterLoader); manager = spy(manager); diff --git a/zuul-groovy/build.gradle b/zuul-groovy/build.gradle new file mode 100644 index 00000000..553d3cb5 --- /dev/null +++ b/zuul-groovy/build.gradle @@ -0,0 +1,17 @@ +apply plugin: "java-library" + +dependencies { + implementation project(":zuul-core") + api "org.codehaus.groovy:groovy-all:${versions_groovy}" + + testImplementation libraries.junit, + libraries.mockito, + libraries.truth +} + +// Silences log statements during tests. This still allows normal failures to be printed. +test { + testLogging { + showStandardStreams = false + } +} diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock new file mode 100644 index 00000000..db6b3a07 --- /dev/null +++ b/zuul-groovy/dependencies.lock @@ -0,0 +1,962 @@ +{ + "compileClasspath": { + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.5" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.2" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "org.codehaus.groovy:groovy-all": { + "locked": "2.4.19", + "requested": "2.4.19" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "jmh": { + "org.openjdk.jmh:jmh-core": { + "locked": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21" + } + }, + "jmhCompileClasspath": { + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.5" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.2" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "org.codehaus.groovy:groovy-all": { + "locked": "2.4.19", + "requested": "2.4.19" + }, + "org.openjdk.jmh:jmh-core": { + "locked": "1.21", + "requested": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21", + "requested": "1.21" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "jmhRuntimeClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "29.0-jre" + }, + "com.google.truth:truth": { + "locked": "1.0.1", + "requested": "1.0.1" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.30.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.21.0" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "javax.inject:javax.inject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1" + }, + "junit:junit": { + "locked": "4.13", + "requested": "4.13" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.65" + }, + "org.codehaus.groovy:groovy-all": { + "locked": "2.4.19", + "requested": "2.4.19" + }, + "org.mockito:mockito-core": { + "locked": "3.3.3", + "requested": "3.+" + }, + "org.openjdk.jmh:jmh-core": { + "locked": "1.21", + "requested": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21", + "requested": "1.21" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.30" + } + }, + "runtimeClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "29.0-jre" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.30.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.21.0" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "javax.inject:javax.inject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.65" + }, + "org.codehaus.groovy:groovy-all": { + "locked": "2.4.19", + "requested": "2.4.19" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.30" + } + }, + "testCompileClasspath": { + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.truth:truth": { + "locked": "1.0.1", + "requested": "1.0.1" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.5" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.2" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "locked": "4.13", + "requested": "4.13" + }, + "org.codehaus.groovy:groovy-all": { + "locked": "2.4.19", + "requested": "2.4.19" + }, + "org.mockito:mockito-core": { + "locked": "3.3.3", + "requested": "3.+" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "testRuntimeClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "29.0-jre" + }, + "com.google.truth:truth": { + "locked": "1.0.1", + "requested": "1.0.1" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.18" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-eureka": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.7.17" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.103.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.30.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.48.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.21.0" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "javax.inject:javax.inject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1" + }, + "junit:junit": { + "locked": "4.13", + "requested": "4.13" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.65" + }, + "org.codehaus.groovy:groovy-all": { + "locked": "2.4.19", + "requested": "2.4.19" + }, + "org.mockito:mockito-core": { + "locked": "3.3.3", + "requested": "3.+" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.30" + } + } +} \ No newline at end of file diff --git a/zuul-core/src/main/java/com/netflix/zuul/groovy/GroovyCompiler.java b/zuul-groovy/src/main/java/com/netflix/zuul/groovy/GroovyCompiler.java similarity index 100% rename from zuul-core/src/main/java/com/netflix/zuul/groovy/GroovyCompiler.java rename to zuul-groovy/src/main/java/com/netflix/zuul/groovy/GroovyCompiler.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/groovy/GroovyFileFilter.java b/zuul-groovy/src/main/java/com/netflix/zuul/groovy/GroovyFileFilter.java similarity index 85% rename from zuul-core/src/main/java/com/netflix/zuul/groovy/GroovyFileFilter.java rename to zuul-groovy/src/main/java/com/netflix/zuul/groovy/GroovyFileFilter.java index 373f30b9..21b7132c 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/groovy/GroovyFileFilter.java +++ b/zuul-groovy/src/main/java/com/netflix/zuul/groovy/GroovyFileFilter.java @@ -15,14 +15,6 @@ */ package com.netflix.zuul.groovy; -/** - * Created with IntelliJ IDEA. - * User: mcohen - * Date: 5/30/13 - * Time: 11:47 AM - * To change this template use File | Settings | File Templates. - */ - import java.io.File; import java.io.FilenameFilter; diff --git a/zuul-core/src/main/java/com/netflix/zuul/scriptManager/FilterInfo.java b/zuul-groovy/src/main/java/com/netflix/zuul/scriptManager/FilterInfo.java similarity index 100% rename from zuul-core/src/main/java/com/netflix/zuul/scriptManager/FilterInfo.java rename to zuul-groovy/src/main/java/com/netflix/zuul/scriptManager/FilterInfo.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/scriptManager/FilterVerifier.java b/zuul-groovy/src/main/java/com/netflix/zuul/scriptManager/FilterVerifier.java similarity index 100% rename from zuul-core/src/main/java/com/netflix/zuul/scriptManager/FilterVerifier.java rename to zuul-groovy/src/main/java/com/netflix/zuul/scriptManager/FilterVerifier.java diff --git a/zuul-core/src/test/java/com/netflix/zuul/groovy/GroovyCompilerTest.java b/zuul-groovy/src/test/java/com/netflix/zuul/groovy/GroovyCompilerTest.java similarity index 94% rename from zuul-core/src/test/java/com/netflix/zuul/groovy/GroovyCompilerTest.java rename to zuul-groovy/src/test/java/com/netflix/zuul/groovy/GroovyCompilerTest.java index 14e2cc0e..c4b5ab57 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/groovy/GroovyCompilerTest.java +++ b/zuul-groovy/src/test/java/com/netflix/zuul/groovy/GroovyCompilerTest.java @@ -24,6 +24,7 @@ import groovy.lang.GroovyObject; import org.junit.Test; import org.junit.runner.RunWith; +import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; /** @@ -35,7 +36,7 @@ public class GroovyCompilerTest { @Test public void testLoadGroovyFromString() { - GroovyCompiler compiler = spy(new GroovyCompiler()); + GroovyCompiler compiler = Mockito.spy(new GroovyCompiler()); try { diff --git a/zuul-core/src/test/java/com/netflix/zuul/groovy/GroovyFileFilterTest.java b/zuul-groovy/src/test/java/com/netflix/zuul/groovy/GroovyFileFilterTest.java similarity index 100% rename from zuul-core/src/test/java/com/netflix/zuul/groovy/GroovyFileFilterTest.java rename to zuul-groovy/src/test/java/com/netflix/zuul/groovy/GroovyFileFilterTest.java diff --git a/zuul-core/src/test/java/com/netflix/zuul/scriptManager/FilterVerifierTest.java b/zuul-groovy/src/test/java/com/netflix/zuul/scriptManager/FilterVerifierTest.java similarity index 100% rename from zuul-core/src/test/java/com/netflix/zuul/scriptManager/FilterVerifierTest.java rename to zuul-groovy/src/test/java/com/netflix/zuul/scriptManager/FilterVerifierTest.java diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index a29f1775..f8be625c 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -119,12 +119,6 @@ ], "locked": "1.2.1" }, - "org.codehaus.groovy:groovy-all": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.19" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -260,12 +254,6 @@ ], "locked": "1.2.1" }, - "org.codehaus.groovy:groovy-all": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.19" - }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", "requested": "1.21" @@ -467,12 +455,6 @@ ], "locked": "1.65" }, - "org.codehaus.groovy:groovy-all": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.19" - }, "org.mockito:mockito-core": { "locked": "3.3.3", "requested": "3.+" @@ -666,12 +648,6 @@ ], "locked": "1.65" }, - "org.codehaus.groovy:groovy-all": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.19" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -811,12 +787,6 @@ "locked": "4.13", "requested": "4.13" }, - "org.codehaus.groovy:groovy-all": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.19" - }, "org.mockito:mockito-core": { "locked": "3.3.3", "requested": "3.+" @@ -1014,12 +984,6 @@ ], "locked": "1.65" }, - "org.codehaus.groovy:groovy-all": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.19" - }, "org.mockito:mockito-core": { "locked": "3.3.3", "requested": "3.+" diff --git a/zuul-guice/src/main/java/com/netflix/zuul/init/ZuulFiltersModule.java b/zuul-guice/src/main/java/com/netflix/zuul/init/ZuulFiltersModule.java index efcf5efc..ffa7d497 100644 --- a/zuul-guice/src/main/java/com/netflix/zuul/init/ZuulFiltersModule.java +++ b/zuul-guice/src/main/java/com/netflix/zuul/init/ZuulFiltersModule.java @@ -20,13 +20,12 @@ import com.google.inject.AbstractModule; import com.google.inject.Provides; import com.netflix.zuul.BasicFilterUsageNotifier; -import com.netflix.zuul.DynamicCodeCompiler; import com.netflix.zuul.FilterFactory; import com.netflix.zuul.FilterFileManager.FilterFileManagerConfig; import com.netflix.zuul.FilterUsageNotifier; import com.netflix.zuul.filters.ZuulFilter; -import com.netflix.zuul.groovy.GroovyCompiler; import com.netflix.zuul.guice.GuiceFilterFactory; +import java.io.FilenameFilter; import org.apache.commons.configuration.AbstractConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -50,7 +49,6 @@ public class ZuulFiltersModule extends AbstractModule { protected void configure() { LOG.info("Starting Groovy Filter file manager"); - bind(DynamicCodeCompiler.class).to(GroovyCompiler.class); bind(FilterFactory.class).to(GuiceFilterFactory.class); bind(FilterUsageNotifier.class).to(BasicFilterUsageNotifier.class); @@ -59,13 +57,15 @@ protected void configure() { } @Provides - FilterFileManagerConfig provideFilterFileManagerConfig(AbstractConfiguration config) { + FilterFileManagerConfig provideFilterFileManagerConfig( + AbstractConfiguration config, FilenameFilter filenameFilter) { // Get filter directories. String[] filterLocations = findFilterLocations(config); String[] filterClassNames = findClassNames(config); // Init the FilterStore. - FilterFileManagerConfig filterConfig = new FilterFileManagerConfig(filterLocations, filterClassNames, 5); + FilterFileManagerConfig filterConfig = + new FilterFileManagerConfig(filterLocations, filterClassNames, 5, filenameFilter); return filterConfig; } diff --git a/zuul-guice/src/test/java/com/netflix/zuul/init/InitTestModule.java b/zuul-guice/src/test/java/com/netflix/zuul/init/InitTestModule.java index 7adf5c17..ffa0e15b 100644 --- a/zuul-guice/src/test/java/com/netflix/zuul/init/InitTestModule.java +++ b/zuul-guice/src/test/java/com/netflix/zuul/init/InitTestModule.java @@ -18,12 +18,14 @@ import com.google.inject.AbstractModule; import com.netflix.config.ConfigurationManager; +import java.io.FilenameFilter; import org.apache.commons.configuration.AbstractConfiguration; public class InitTestModule extends AbstractModule { @Override protected void configure() { bind(AbstractConfiguration.class).toInstance(ConfigurationManager.getConfigInstance()); + bind(FilenameFilter.class).toInstance((dir, name) -> false); } } diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index ce4a7522..dfc0f46e 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -115,12 +115,6 @@ ], "locked": "1.2.1" }, - "org.codehaus.groovy:groovy-all": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.19" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -252,12 +246,6 @@ ], "locked": "1.2.1" }, - "org.codehaus.groovy:groovy-all": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.19" - }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", "requested": "1.21" @@ -448,12 +436,6 @@ ], "locked": "1.65" }, - "org.codehaus.groovy:groovy-all": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.19" - }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", "requested": "1.21" @@ -636,12 +618,6 @@ ], "locked": "1.65" }, - "org.codehaus.groovy:groovy-all": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.19" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -822,12 +798,6 @@ ], "locked": "1.65" }, - "org.codehaus.groovy:groovy-all": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.19" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -959,12 +929,6 @@ "locked": "4.13", "requested": "4.13" }, - "org.codehaus.groovy:groovy-all": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.19" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1147,12 +1111,6 @@ ], "locked": "1.65" }, - "org.codehaus.groovy:groovy-all": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.19" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" diff --git a/zuul-sample/build.gradle b/zuul-sample/build.gradle index a7a39d9c..5c58e844 100644 --- a/zuul-sample/build.gradle +++ b/zuul-sample/build.gradle @@ -4,6 +4,7 @@ apply plugin: 'application' dependencies { implementation project(":zuul-core"), + project(":zuul-groovy"), project(":zuul-guice") implementation "com.netflix.eureka:eureka-client:1.9.18" implementation 'commons-configuration:commons-configuration:1.8' diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 0d57b236..e7a6ec31 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -172,12 +172,6 @@ ], "locked": "1.65" }, - "org.codehaus.groovy:groovy-all": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.19" - }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -266,6 +260,9 @@ "com.netflix.zuul:zuul-core": { "project": true }, + "com.netflix.zuul:zuul-groovy": { + "project": true + }, "com.netflix.zuul:zuul-guice": { "project": true }, @@ -317,7 +314,7 @@ }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-groovy" ], "locked": "2.4.19" }, @@ -417,6 +414,9 @@ "com.netflix.zuul:zuul-core": { "project": true }, + "com.netflix.zuul:zuul-groovy": { + "project": true + }, "com.netflix.zuul:zuul-guice": { "project": true }, @@ -468,7 +468,7 @@ }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-groovy" ], "locked": "2.4.19" }, @@ -579,10 +579,14 @@ }, "com.netflix.zuul:zuul-core": { "firstLevelTransitive": [ + "com.netflix.zuul:zuul-groovy", "com.netflix.zuul:zuul-guice" ], "project": true }, + "com.netflix.zuul:zuul-groovy": { + "project": true + }, "com.netflix.zuul:zuul-guice": { "project": true }, @@ -687,7 +691,7 @@ }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-groovy" ], "locked": "2.4.19" }, @@ -798,10 +802,14 @@ }, "com.netflix.zuul:zuul-core": { "firstLevelTransitive": [ + "com.netflix.zuul:zuul-groovy", "com.netflix.zuul:zuul-guice" ], "project": true }, + "com.netflix.zuul:zuul-groovy": { + "project": true + }, "com.netflix.zuul:zuul-guice": { "project": true }, @@ -906,7 +914,7 @@ }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-groovy" ], "locked": "2.4.19" }, @@ -998,6 +1006,9 @@ "com.netflix.zuul:zuul-core": { "project": true }, + "com.netflix.zuul:zuul-groovy": { + "project": true + }, "com.netflix.zuul:zuul-guice": { "project": true }, @@ -1049,7 +1060,7 @@ }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-groovy" ], "locked": "2.4.19" }, @@ -1152,10 +1163,14 @@ }, "com.netflix.zuul:zuul-core": { "firstLevelTransitive": [ + "com.netflix.zuul:zuul-groovy", "com.netflix.zuul:zuul-guice" ], "project": true }, + "com.netflix.zuul:zuul-groovy": { + "project": true + }, "com.netflix.zuul:zuul-guice": { "project": true }, @@ -1260,7 +1275,7 @@ }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-groovy" ], "locked": "2.4.19" }, diff --git a/zuul-sample/src/main/java/com/netflix/zuul/sample/ZuulSampleModule.java b/zuul-sample/src/main/java/com/netflix/zuul/sample/ZuulSampleModule.java index be7eaf23..d2099187 100644 --- a/zuul-sample/src/main/java/com/netflix/zuul/sample/ZuulSampleModule.java +++ b/zuul-sample/src/main/java/com/netflix/zuul/sample/ZuulSampleModule.java @@ -26,6 +26,7 @@ import com.netflix.spectator.api.DefaultRegistry; import com.netflix.spectator.api.Registry; import com.netflix.zuul.BasicRequestCompleteHandler; +import com.netflix.zuul.DynamicCodeCompiler; import com.netflix.zuul.DynamicFilterLoader; import com.netflix.zuul.FilterFileManager; import com.netflix.zuul.FilterLoader; @@ -34,6 +35,8 @@ import com.netflix.zuul.context.ZuulSessionContextDecorator; import com.netflix.zuul.filters.FilterRegistry; import com.netflix.zuul.filters.MutableFilterRegistry; +import com.netflix.zuul.groovy.GroovyCompiler; +import com.netflix.zuul.groovy.GroovyFileFilter; import com.netflix.zuul.init.ZuulFiltersModule; import com.netflix.zuul.netty.server.BaseServerStartup; import com.netflix.zuul.netty.server.ClientRequestReceiver; @@ -41,6 +44,7 @@ import com.netflix.zuul.origins.OriginManager; import com.netflix.zuul.stats.BasicRequestMetricsPublisher; import com.netflix.zuul.stats.RequestMetricsPublisher; +import java.io.FilenameFilter; import org.apache.commons.configuration.AbstractConfiguration; /** @@ -59,6 +63,8 @@ protected void configure() { } bind(AbstractConfiguration.class).toInstance(ConfigurationManager.getConfigInstance()); + bind(DynamicCodeCompiler.class).to(GroovyCompiler.class); + bind(FilenameFilter.class).to(GroovyFileFilter.class); install(new EurekaModule()); From cab193ed7b269fcf9addd8ddda642d8b42906d7f Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 27 Apr 2020 12:00:37 -0700 Subject: [PATCH 059/273] zuul-core: avoid using servo api in direct memory monitor --- .../zuul/netty/server/BaseServerStartup.java | 3 +- .../netty/server/DirectMemoryMonitor.java | 91 +++++++------------ 2 files changed, 36 insertions(+), 58 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java index 6e01807d..513117af 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java @@ -59,6 +59,7 @@ public abstract class BaseServerStartup protected final ServerStatusManager serverStatusManager; protected final Registry registry; + @SuppressWarnings("unused") // force initialization protected final DirectMemoryMonitor directMemoryMonitor; protected final EventLoopGroupMetrics eventLoopGroupMetrics; protected final EurekaClient discoveryClient; @@ -109,8 +110,6 @@ public void init() throws Exception addrsToChannelInitializers = chooseAddrsAndChannels(clientChannels); - directMemoryMonitor.init(); - server = new Server( serverStatusManager, addrsToChannelInitializers, diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/DirectMemoryMonitor.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/DirectMemoryMonitor.java index 1f0a42f7..f57ae884 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/DirectMemoryMonitor.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/DirectMemoryMonitor.java @@ -16,14 +16,14 @@ package com.netflix.zuul.netty.server; +import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.netflix.config.DynamicIntProperty; -import com.netflix.servo.DefaultMonitorRegistry; -import com.netflix.servo.monitor.LongGauge; -import com.netflix.servo.monitor.MonitorConfig; +import com.netflix.spectator.api.Registry; +import com.netflix.spectator.api.patterns.PolledMeter; import java.lang.reflect.Field; +import java.time.Duration; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; import java.util.function.Supplier; import javax.inject.Inject; @@ -37,8 +37,7 @@ * Time: 10:23 AM */ @Singleton -public final class DirectMemoryMonitor -{ +public final class DirectMemoryMonitor { private static final Logger LOG = LoggerFactory.getLogger(DirectMemoryMonitor.class); private static final String PROP_PREFIX = "zuul.directmemory"; private static final DynamicIntProperty TASK_DELAY_PROP = new DynamicIntProperty(PROP_PREFIX + ".task.delay", 10); @@ -87,65 +86,45 @@ public final class DirectMemoryMonitor reservedMemoryGetter = reservedMemory; } - private final LongGauge reservedMemoryGauge = - new LongGauge(MonitorConfig.builder(PROP_PREFIX + ".reserved").build()); - private final LongGauge maxMemoryGauge = new LongGauge(MonitorConfig.builder(PROP_PREFIX + ".max").build()); - // TODO(carl-mastrangelo): this should be passed in as a dependency, so it can be shutdown and waited on for // termination. - private final ScheduledExecutorService service = Executors.newScheduledThreadPool(1); - - public DirectMemoryMonitor() { - DefaultMonitorRegistry.getInstance().register(reservedMemoryGauge); - DefaultMonitorRegistry.getInstance().register(maxMemoryGauge); - } + private final ScheduledExecutorService service = + Executors.newSingleThreadScheduledExecutor( + new ThreadFactoryBuilder().setDaemon(true).setNameFormat("dmm-%d").build()); @Inject - public void init() { - if (directMemoryLimitGetter == null || reservedMemoryGetter == null) { - return; + public DirectMemoryMonitor(Registry registry) { + if (reservedMemoryGetter != null) { + PolledMeter.using(registry) + .withName(PROP_PREFIX + ".reserved") + .withDelay(Duration.ofSeconds(TASK_DELAY_PROP.get())) + .scheduleOn(service) + .monitorValue(null, DirectMemoryMonitor::getReservedMemory); } - service.scheduleWithFixedDelay(new Task(), TASK_DELAY_PROP.get(), TASK_DELAY_PROP.get(), TimeUnit.SECONDS); - } - - public void stop() { - service.shutdown(); - } - - final class Task implements Runnable { - @Override - public void run() - { - try { - Current current = measure(); - if (current != null) { - LOG.debug("reservedMemory={}, maxMemory={}", current.reservedMemory, current.maxMemory); - reservedMemoryGauge.set(current.reservedMemory); - maxMemoryGauge.set(current.maxMemory); - } - } - catch (Throwable t) { - LOG.warn("Error in DirectMemoryMonitor task.", t); - } + if (directMemoryLimitGetter != null) { + PolledMeter.using(registry) + .withName(PROP_PREFIX + ".max") + .withDelay(Duration.ofSeconds(TASK_DELAY_PROP.get())) + .scheduleOn(service) + .monitorValue(null, DirectMemoryMonitor::getMaxMemory); } + } - private Current measure() { - try { - Current current = new Current(); - current.maxMemory = directMemoryLimitGetter.get(); - current.reservedMemory = reservedMemoryGetter.get(); - return current; - } - catch (Exception e) { - LOG.warn("Error measuring direct memory.", e); - return null; - } + private static double getReservedMemory(Object discard) { + try { + return reservedMemoryGetter.get(); + } catch (RuntimeException | Error e) { + LOG.warn("Error in DirectMemoryMonitor task.", e); } - + return -1; } - private static final class Current { - long maxMemory; - long reservedMemory; + private static double getMaxMemory(Object discard) { + try { + return directMemoryLimitGetter.get(); + } catch (RuntimeException | Error e) { + LOG.warn("Error in DirectMemoryMonitor task.", e); + } + return -1; } } From 1742abbbb2f116bcdb3a3cd8ac53185bad441b65 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 27 Apr 2020 21:04:53 -0700 Subject: [PATCH 060/273] zuul-core: fix direct memory usage by passing non-null ref --- .../com/netflix/zuul/netty/server/DirectMemoryMonitor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/DirectMemoryMonitor.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/DirectMemoryMonitor.java index f57ae884..065886be 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/DirectMemoryMonitor.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/DirectMemoryMonitor.java @@ -99,14 +99,14 @@ public DirectMemoryMonitor(Registry registry) { .withName(PROP_PREFIX + ".reserved") .withDelay(Duration.ofSeconds(TASK_DELAY_PROP.get())) .scheduleOn(service) - .monitorValue(null, DirectMemoryMonitor::getReservedMemory); + .monitorValue(DirectMemoryMonitor.class, DirectMemoryMonitor::getReservedMemory); } if (directMemoryLimitGetter != null) { PolledMeter.using(registry) .withName(PROP_PREFIX + ".max") .withDelay(Duration.ofSeconds(TASK_DELAY_PROP.get())) .scheduleOn(service) - .monitorValue(null, DirectMemoryMonitor::getMaxMemory); + .monitorValue(DirectMemoryMonitor.class, DirectMemoryMonitor::getMaxMemory); } } From 269a9dcde6106c26187a716b3146316bc655f636 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 27 Apr 2020 21:17:35 -0700 Subject: [PATCH 061/273] Revert "all: roll back groovy dep as it seems to break publishing" (#800) This reverts commit 9e0adb0fdaa4bc55c87c19573bbf6316b658502e. It was not the issue --- gradle.properties | 2 +- zuul-groovy/dependencies.lock | 24 ++++++++++++------------ zuul-sample/dependencies.lock | 12 ++++++------ 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/gradle.properties b/gradle.properties index 026034c7..4550319c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -versions_groovy=2.4.19 +versions_groovy=3.0.3 versions_ribbon=2.7.17 versions_netty=4.1.48.Final release.scope=patch diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index db6b3a07..084c2681 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -112,8 +112,8 @@ "locked": "1.2.1" }, "org.codehaus.groovy:groovy-all": { - "locked": "2.4.19", - "requested": "2.4.19" + "locked": "3.0.3", + "requested": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -243,8 +243,8 @@ "locked": "1.2.1" }, "org.codehaus.groovy:groovy-all": { - "locked": "2.4.19", - "requested": "2.4.19" + "locked": "3.0.3", + "requested": "3.0.3" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -436,8 +436,8 @@ "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { - "locked": "2.4.19", - "requested": "2.4.19" + "locked": "3.0.3", + "requested": "3.0.3" }, "org.mockito:mockito-core": { "locked": "3.3.3", @@ -625,8 +625,8 @@ "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { - "locked": "2.4.19", - "requested": "2.4.19" + "locked": "3.0.3", + "requested": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -756,8 +756,8 @@ "requested": "4.13" }, "org.codehaus.groovy:groovy-all": { - "locked": "2.4.19", - "requested": "2.4.19" + "locked": "3.0.3", + "requested": "3.0.3" }, "org.mockito:mockito-core": { "locked": "3.3.3", @@ -945,8 +945,8 @@ "locked": "1.65" }, "org.codehaus.groovy:groovy-all": { - "locked": "2.4.19", - "requested": "2.4.19" + "locked": "3.0.3", + "requested": "3.0.3" }, "org.mockito:mockito-core": { "locked": "3.3.3", diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index e7a6ec31..e18114fb 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -316,7 +316,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-groovy" ], - "locked": "2.4.19" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -470,7 +470,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-groovy" ], - "locked": "2.4.19" + "locked": "3.0.3" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -693,7 +693,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-groovy" ], - "locked": "2.4.19" + "locked": "3.0.3" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -916,7 +916,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-groovy" ], - "locked": "2.4.19" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -1062,7 +1062,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-groovy" ], - "locked": "2.4.19" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -1277,7 +1277,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-groovy" ], - "locked": "2.4.19" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ From 49abcdd14d68da3b42f5d93ca9ed6860698d49ee Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 27 Apr 2020 21:26:38 -0700 Subject: [PATCH 062/273] zuul-core: bump jmh to 1.23 --- zuul-core/build.gradle | 5 ++++- zuul-core/dependencies.lock | 19 ++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index fc494610..a80b0896 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -44,6 +44,9 @@ dependencies { libraries.mockito, libraries.truth testRuntimeOnly 'org.slf4j:slf4j-simple:1.7.29' + + jmh 'org.openjdk.jmh:jmh-core:1.+' + jmh 'org.openjdk.jmh:jmh-generator-annprocess:1.+' } // Silences log statements during tests. This still allows normal failures to be printed. @@ -53,7 +56,7 @@ test { } } -// ./gradlew --no-daemon clean :zuul-core:jmh --stacktrace +// ./gradlew --no-daemon clean :zuul-core:jmh jmh { profilers = ["gc"] timeOnIteration = "1s" diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 8fb7107c..5cb6e003 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -111,7 +111,12 @@ }, "jmh": { "org.openjdk.jmh:jmh-core": { - "locked": "1.21" + "locked": "1.23", + "requested": "1.+" + }, + "org.openjdk.jmh:jmh-generator-annprocess": { + "locked": "1.23", + "requested": "1.+" }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21" @@ -223,9 +228,13 @@ "requested": "1.+" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.21", + "locked": "1.23", "requested": "1.21" }, + "org.openjdk.jmh:jmh-generator-annprocess": { + "locked": "1.23", + "requested": "1.+" + }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21", "requested": "1.21" @@ -357,9 +366,13 @@ "requested": "3.+" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.21", + "locked": "1.23", "requested": "1.21" }, + "org.openjdk.jmh:jmh-generator-annprocess": { + "locked": "1.23", + "requested": "1.+" + }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21", "requested": "1.21" From 9615f987e62dd3aaa9f5bbe6f8ea15f39fa8a333 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 29 Apr 2020 11:11:13 -0700 Subject: [PATCH 063/273] zuul-core: avoid using servo api in ServerChannelMetrics --- .../common/metrics/ServerChannelMetrics.java | 52 +++++++------------ .../server/BaseZuulChannelInitializer.java | 3 +- 2 files changed, 20 insertions(+), 35 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/metrics/ServerChannelMetrics.java b/zuul-core/src/main/java/com/netflix/netty/common/metrics/ServerChannelMetrics.java index 3e9ae7c9..31974c65 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/metrics/ServerChannelMetrics.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/metrics/ServerChannelMetrics.java @@ -17,11 +17,9 @@ package com.netflix.netty.common.metrics; import com.netflix.netty.common.throttle.MaxInboundConnectionsHandler; -import com.netflix.servo.DefaultMonitorRegistry; -import com.netflix.servo.monitor.BasicCounter; -import com.netflix.servo.monitor.BasicGauge; -import com.netflix.servo.monitor.Gauge; -import com.netflix.servo.monitor.MonitorConfig; +import com.netflix.spectator.api.Counter; +import com.netflix.spectator.api.Gauge; +import com.netflix.spectator.api.Registry; import io.netty.channel.Channel; import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; @@ -46,33 +44,20 @@ public class ServerChannelMetrics extends ChannelInboundHandlerAdapter private final Gauge currentConnectionsGauge; private final AtomicInteger currentConnections = new AtomicInteger(0); - private final BasicCounter totalConnections; - private final BasicCounter connectionClosed; - private final BasicCounter connectionIdleTimeout; - private final BasicCounter connectionErrors; - private final BasicCounter connectionThrottled; + private final Counter totalConnections; + private final Counter connectionClosed; + private final Counter connectionIdleTimeout; + private final Counter connectionErrors; + private final Counter connectionThrottled; - public ServerChannelMetrics(String id) - { - super(); - + public ServerChannelMetrics(String id, Registry registry) { String metricNamePrefix = "server.connections."; - currentConnectionsGauge = new BasicGauge<>(MonitorConfig.builder(metricNamePrefix + "current").withTag("id", id).build(), - () -> currentConnections.get() ); - DefaultMonitorRegistry.getInstance().register(currentConnectionsGauge); - - totalConnections = createCounter(metricNamePrefix + "connect", id); - connectionErrors = createCounter(metricNamePrefix + "errors", id); - connectionClosed = createCounter(metricNamePrefix + "close", id); - connectionIdleTimeout = createCounter(metricNamePrefix + "idle.timeout", id); - connectionThrottled = createCounter(metricNamePrefix + "throttled", id); - } - - private static BasicCounter createCounter(String name, String id) - { - BasicCounter counter = new BasicCounter(MonitorConfig.builder(name).withTag("id", id).build()); - DefaultMonitorRegistry.getInstance().register(counter); - return counter; + currentConnectionsGauge = registry.gauge(metricNamePrefix + "current", "id", id); + totalConnections = registry.counter(metricNamePrefix + "connect", "id", id); + connectionErrors = registry.counter(metricNamePrefix + "errors", "id", id); + connectionClosed = registry.counter(metricNamePrefix + "close", "id", id); + connectionIdleTimeout = registry.counter(metricNamePrefix + "idle.timeout", "id", id); + connectionThrottled = registry.counter(metricNamePrefix + "throttled", "id", id); } public static int currentConnectionCountFromChannel(Channel ch) @@ -82,9 +67,8 @@ public static int currentConnectionCountFromChannel(Channel ch) } @Override - public void channelActive(ChannelHandlerContext ctx) throws Exception - { - currentConnections.incrementAndGet(); + public void channelActive(ChannelHandlerContext ctx) throws Exception { + currentConnectionsGauge.set(currentConnections.incrementAndGet()); totalConnections.increment(); ctx.channel().attr(ATTR_CURRENT_CONNS).set(currentConnections); @@ -98,7 +82,7 @@ public void channelInactive(ChannelHandlerContext ctx) throws Exception super.channelInactive(ctx); } finally { - currentConnections.decrementAndGet(); + currentConnectionsGauge.set(currentConnections.decrementAndGet()); connectionClosed.increment(); } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java index ef429139..eb5dcc43 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java @@ -38,6 +38,7 @@ import com.netflix.netty.common.throttle.MaxInboundConnectionsHandler; import com.netflix.servo.monitor.BasicCounter; import com.netflix.spectator.api.Registry; +import com.netflix.spectator.api.Spectator; import com.netflix.zuul.FilterLoader; import com.netflix.zuul.FilterUsageNotifier; import com.netflix.zuul.RequestCompleteHandler; @@ -179,7 +180,7 @@ private BaseZuulChannelInitializer( this.idleTimeout = channelConfig.get(CommonChannelConfigKeys.idleTimeout); this.httpRequestReadTimeout = channelConfig.get(CommonChannelConfigKeys.httpRequestReadTimeout); - this.channelMetrics = new ServerChannelMetrics("http-" + metricId); + this.channelMetrics = new ServerChannelMetrics("http-" + metricId, Spectator.globalRegistry()); this.registry = channelDependencies.get(ZuulDependencyKeys.registry); this.httpMetricsHandler = new HttpMetricsChannelHandler(registry, "server", "http-" + metricId); From 98d91c510738c3529ac20c0b9e13dfb9328daa20 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 1 May 2020 13:30:25 -0700 Subject: [PATCH 064/273] zuul-core: remove a few more servo refs --- .../common/HttpRequestReadTimeoutHandler.java | 8 ++--- .../zuul/BasicFilterUsageNotifier.java | 16 +++++++-- .../com/netflix/zuul/FilterUsageNotifier.java | 2 +- .../zuul/netty/server/BaseServerStartup.java | 7 ++-- .../server/BaseZuulChannelInitializer.java | 5 ++- .../zuul/netty/server/ZuulDependencyKeys.java | 4 +-- .../zuul/passport/CurrentPassport.java | 27 +++++++-------- .../netflix/zuul/plugins/ServoMonitor.java | 33 ------------------- .../com/netflix/zuul/init/InitTestModule.java | 3 ++ 9 files changed, 39 insertions(+), 66 deletions(-) delete mode 100644 zuul-core/src/main/java/com/netflix/zuul/plugins/ServoMonitor.java diff --git a/zuul-core/src/main/java/com/netflix/netty/common/HttpRequestReadTimeoutHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/HttpRequestReadTimeoutHandler.java index 583d7ae9..43639ee7 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/HttpRequestReadTimeoutHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/HttpRequestReadTimeoutHandler.java @@ -16,7 +16,7 @@ package com.netflix.netty.common; -import com.netflix.servo.monitor.BasicCounter; +import com.netflix.spectator.api.Counter; import com.netflix.zuul.passport.CurrentPassport; import com.netflix.zuul.passport.PassportState; import io.netty.channel.ChannelHandlerContext; @@ -44,9 +44,9 @@ public class HttpRequestReadTimeoutHandler extends ChannelInboundHandlerAdapter private final long timeout; private final TimeUnit unit; - private final BasicCounter httpRequestReadTimeoutCounter; + private final Counter httpRequestReadTimeoutCounter; - protected HttpRequestReadTimeoutHandler(long timeout, TimeUnit unit, BasicCounter httpRequestReadTimeoutCounter) + protected HttpRequestReadTimeoutHandler(long timeout, TimeUnit unit, Counter httpRequestReadTimeoutCounter) { this.timeout = timeout; this.unit = unit; @@ -57,7 +57,7 @@ protected HttpRequestReadTimeoutHandler(long timeout, TimeUnit unit, BasicCounte * Factory which ensures that this handler is added to the pipeline using the * correct name. */ - public static void addLast(ChannelPipeline pipeline, long timeout, TimeUnit unit, BasicCounter httpRequestReadTimeoutCounter) + public static void addLast(ChannelPipeline pipeline, long timeout, TimeUnit unit, Counter httpRequestReadTimeoutCounter) { HttpRequestReadTimeoutHandler handler = new HttpRequestReadTimeoutHandler(timeout, unit, httpRequestReadTimeoutCounter); pipeline.addLast(HANDLER_NAME, handler); diff --git a/zuul-core/src/main/java/com/netflix/zuul/BasicFilterUsageNotifier.java b/zuul-core/src/main/java/com/netflix/zuul/BasicFilterUsageNotifier.java index 81bd0cdd..0f39edb0 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/BasicFilterUsageNotifier.java +++ b/zuul-core/src/main/java/com/netflix/zuul/BasicFilterUsageNotifier.java @@ -16,18 +16,28 @@ package com.netflix.zuul; -import com.netflix.servo.monitor.DynamicCounter; +import com.netflix.spectator.api.Registry; import com.netflix.zuul.filters.ZuulFilter; +import javax.inject.Inject; /** * Publishes a counter metric for each filter on each use. */ public class BasicFilterUsageNotifier implements FilterUsageNotifier { private static final String METRIC_PREFIX = "zuul.filter-"; + private final Registry registry; + + @Inject + BasicFilterUsageNotifier(Registry registry) { + this.registry = registry; + } @Override - public void notify(ZuulFilter filter, ExecutionStatus status) { - DynamicCounter.increment(METRIC_PREFIX + filter.getClass().getSimpleName(), "status", status.name(), "filtertype", filter.filterType().toString()); + public void notify(ZuulFilter filter, ExecutionStatus status) { + registry.counter( + "zuul.filter-" + filter.getClass().getSimpleName(), + "status", status.name(), + "filtertype", filter.filterType().toString()).increment(); } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/FilterUsageNotifier.java b/zuul-core/src/main/java/com/netflix/zuul/FilterUsageNotifier.java index ef30a9cc..76f354d8 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/FilterUsageNotifier.java +++ b/zuul-core/src/main/java/com/netflix/zuul/FilterUsageNotifier.java @@ -26,5 +26,5 @@ * Time: 9:55 PM */ public interface FilterUsageNotifier { - public void notify(ZuulFilter filter, ExecutionStatus status); + void notify(ZuulFilter filter, ExecutionStatus status); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java index 513117af..acdef6f1 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java @@ -30,9 +30,7 @@ import com.netflix.netty.common.proxyprotocol.StripUntrustedProxyHeadersHandler; import com.netflix.netty.common.ssl.ServerSslConfig; import com.netflix.netty.common.status.ServerStatusManager; -import com.netflix.servo.DefaultMonitorRegistry; -import com.netflix.servo.monitor.BasicCounter; -import com.netflix.servo.monitor.MonitorConfig; +import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Registry; import com.netflix.zuul.FilterLoader; import com.netflix.zuul.FilterUsageNotifier; @@ -154,8 +152,7 @@ protected void addChannelDependencies( channelDeps.set(ZuulDependencyKeys.sessionCtxDecorator, sessionCtxDecorator); channelDeps.set(ZuulDependencyKeys.requestCompleteHandler, reqCompleteHandler); - final BasicCounter httpRequestReadTimeoutCounter = new BasicCounter(MonitorConfig.builder("server.http.request.read.timeout").build()); - DefaultMonitorRegistry.getInstance().register(httpRequestReadTimeoutCounter); + final Counter httpRequestReadTimeoutCounter = registry.counter("server.http.request.read.timeout"); channelDeps.set(ZuulDependencyKeys.httpRequestReadTimeoutCounter, httpRequestReadTimeoutCounter); channelDeps.set(ZuulDependencyKeys.filterLoader, filterLoader); channelDeps.set(ZuulDependencyKeys.filterUsageNotifier, usageNotifier); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java index eb5dcc43..70b5b732 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java @@ -34,9 +34,8 @@ import com.netflix.netty.common.metrics.ServerChannelMetrics; import com.netflix.netty.common.proxyprotocol.ElbProxyProtocolChannelHandler; import com.netflix.netty.common.proxyprotocol.StripUntrustedProxyHeadersHandler; -import com.netflix.netty.common.status.ServerStatusManager; import com.netflix.netty.common.throttle.MaxInboundConnectionsHandler; -import com.netflix.servo.monitor.BasicCounter; +import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Registry; import com.netflix.spectator.api.Spectator; import com.netflix.zuul.FilterLoader; @@ -131,7 +130,7 @@ public abstract class BaseZuulChannelInitializer extends ChannelInitializer registry = new ChannelConfigKey<>("registry"); public static final ChannelConfigKey sessionCtxDecorator = new ChannelConfigKey<>("sessionCtxDecorator"); public static final ChannelConfigKey requestCompleteHandler = new ChannelConfigKey<>("requestCompleteHandler"); - public static final ChannelConfigKey httpRequestReadTimeoutCounter = new ChannelConfigKey<>("httpRequestReadTimeoutCounter"); + public static final ChannelConfigKey httpRequestReadTimeoutCounter = new ChannelConfigKey<>("httpRequestReadTimeoutCounter"); public static final ChannelConfigKey filterLoader = new ChannelConfigKey<>("filterLoader"); public static final ChannelConfigKey filterUsageNotifier = new ChannelConfigKey<>("filterUsageNotifier"); public static final ChannelConfigKey discoveryClient = new ChannelConfigKey<>("discoveryClient"); diff --git a/zuul-core/src/main/java/com/netflix/zuul/passport/CurrentPassport.java b/zuul-core/src/main/java/com/netflix/zuul/passport/CurrentPassport.java index bdb9b0fb..804e063e 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/passport/CurrentPassport.java +++ b/zuul-core/src/main/java/com/netflix/zuul/passport/CurrentPassport.java @@ -20,9 +20,8 @@ import com.google.common.base.Ticker; import com.google.common.collect.Sets; import com.netflix.config.CachedDynamicBooleanProperty; -import com.netflix.servo.DefaultMonitorRegistry; -import com.netflix.servo.monitor.BasicCounter; -import com.netflix.servo.monitor.MonitorConfig; +import com.netflix.spectator.api.Counter; +import com.netflix.spectator.api.Spectator; import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.context.SessionContext; import io.netty.channel.Channel; @@ -395,23 +394,21 @@ public void setNow(long now) class CountingCurrentPassport extends CurrentPassport { - private final static BasicCounter IN_REQ_HEADERS_RECEIVED_CNT = createCounter("in_req_hdrs_rec"); - private final static BasicCounter IN_REQ_LAST_CONTENT_RECEIVED_CNT = createCounter("in_req_last_cont_rec"); + private final static Counter IN_REQ_HEADERS_RECEIVED_CNT = createCounter("in_req_hdrs_rec"); + private final static Counter IN_REQ_LAST_CONTENT_RECEIVED_CNT = createCounter("in_req_last_cont_rec"); - private final static BasicCounter IN_RESP_HEADERS_RECEIVED_CNT = createCounter("in_resp_hdrs_rec"); - private final static BasicCounter IN_RESP_LAST_CONTENT_RECEIVED_CNT = createCounter("in_resp_last_cont_rec"); + private final static Counter IN_RESP_HEADERS_RECEIVED_CNT = createCounter("in_resp_hdrs_rec"); + private final static Counter IN_RESP_LAST_CONTENT_RECEIVED_CNT = createCounter("in_resp_last_cont_rec"); - private final static BasicCounter OUT_REQ_HEADERS_SENT_CNT = createCounter("out_req_hdrs_sent"); - private final static BasicCounter OUT_REQ_LAST_CONTENT_SENT_CNT = createCounter("out_req_last_cont_sent"); + private final static Counter OUT_REQ_HEADERS_SENT_CNT = createCounter("out_req_hdrs_sent"); + private final static Counter OUT_REQ_LAST_CONTENT_SENT_CNT = createCounter("out_req_last_cont_sent"); - private final static BasicCounter OUT_RESP_HEADERS_SENT_CNT = createCounter("out_resp_hdrs_sent"); - private final static BasicCounter OUT_RESP_LAST_CONTENT_SENT_CNT = createCounter("out_resp_last_cont_sent"); + private final static Counter OUT_RESP_HEADERS_SENT_CNT = createCounter("out_resp_hdrs_sent"); + private final static Counter OUT_RESP_LAST_CONTENT_SENT_CNT = createCounter("out_resp_last_cont_sent"); - private static BasicCounter createCounter(String name) + private static Counter createCounter(String name) { - BasicCounter counter = new BasicCounter(MonitorConfig.builder("zuul.passport." + name).build()); - DefaultMonitorRegistry.getInstance().register(counter); - return counter; + return Spectator.globalRegistry().counter("zuul.passport." + name); } public CountingCurrentPassport() diff --git a/zuul-core/src/main/java/com/netflix/zuul/plugins/ServoMonitor.java b/zuul-core/src/main/java/com/netflix/zuul/plugins/ServoMonitor.java deleted file mode 100644 index 1d79267e..00000000 --- a/zuul-core/src/main/java/com/netflix/zuul/plugins/ServoMonitor.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2018 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.netflix.zuul.plugins; - -import com.netflix.servo.monitor.Monitors; -import com.netflix.zuul.stats.monitoring.Monitor; -import com.netflix.zuul.stats.monitoring.NamedCount; - -/** - * implementation to hook up the Servo Monitors to register Named counters - * @author Mikey Cohen - * Date: 4/16/13 - * Time: 4:40 PM - */ -public class ServoMonitor implements Monitor { - @Override - public void register(NamedCount monitorObj) { - Monitors.registerObject(monitorObj); - } -} diff --git a/zuul-guice/src/test/java/com/netflix/zuul/init/InitTestModule.java b/zuul-guice/src/test/java/com/netflix/zuul/init/InitTestModule.java index ffa0e15b..967bf3ea 100644 --- a/zuul-guice/src/test/java/com/netflix/zuul/init/InitTestModule.java +++ b/zuul-guice/src/test/java/com/netflix/zuul/init/InitTestModule.java @@ -18,6 +18,8 @@ import com.google.inject.AbstractModule; import com.netflix.config.ConfigurationManager; +import com.netflix.spectator.api.NoopRegistry; +import com.netflix.spectator.api.Registry; import java.io.FilenameFilter; import org.apache.commons.configuration.AbstractConfiguration; @@ -26,6 +28,7 @@ public class InitTestModule extends AbstractModule { protected void configure() { bind(AbstractConfiguration.class).toInstance(ConfigurationManager.getConfigInstance()); bind(FilenameFilter.class).toInstance((dir, name) -> false); + bind(Registry.class).to(NoopRegistry.class); } } From fe5c5b136e0e370ab397b27b76936487bee7a39f Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Tue, 5 May 2020 12:19:55 -0700 Subject: [PATCH 065/273] make use of adjust retry policy method before retrying --- .../java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 81dd9e0b..38a9b7ab 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -693,6 +693,7 @@ private void processErrorFromOrigin(final Throwable ex, final Channel origCh) { if ((isBelowRetryLimit()) && (isRetryable(err))) { //retry request with different origin passport.add(ORIGIN_RETRY_START); + origin.adjustRetryPolicyIfNeeded(zuulRequest); proxyRequestToOrigin(); } else { // Record the exception in context. An error filter should later run which can translate this into an @@ -915,6 +916,7 @@ protected void handleOriginNonSuccessResponse(final HttpResponse originResponse, unlinkFromOrigin(); //retry request with different origin passport.add(ORIGIN_RETRY_START); + origin.adjustRetryPolicyIfNeeded(zuulRequest); proxyRequestToOrigin(); } else { SessionContext zuulCtx = context; From d700e2fe325a155d811ca1b1db122c993f6bb1c4 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 5 May 2020 15:20:07 -0700 Subject: [PATCH 066/273] zuul-core: make filterOrder, type, and sync derived from the annotations --- .../main/java/com/netflix/zuul/Filter.java | 14 ++++++++++ .../com/netflix/zuul/filters/ZuulFilter.java | 27 ++++++++++++++++--- .../filters/common/GZipResponseFilter.java | 13 +++------ .../InboundPassportStampingFilter.java | 11 ++------ .../OutboundPassportStampingFilter.java | 6 ----- 5 files changed, 42 insertions(+), 29 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/Filter.java b/zuul-core/src/main/java/com/netflix/zuul/Filter.java index 44bf30ea..e267d0f0 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/Filter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/Filter.java @@ -57,4 +57,18 @@ @interface FilterPackageName { String value(); } + + /** + * Indicates that the annotated filter should run after another filter in the chain, if the other filter is present. + * In the case of inbound filters, this implies that the annotated filter should have an order greater than the + * filters listed. For outbound filters, the order of this filter should be less than the ones listed. Usage of + * this annotation should be used on homogeneous filter types. Additionally, this should not be applied to endpoint + * filters. + */ + @Target({TYPE}) + @Retention(RUNTIME) + @Documented + @interface ApplyAfter { + Class>[] value(); + } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/ZuulFilter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/ZuulFilter.java index 4032cabd..368720e3 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/ZuulFilter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/ZuulFilter.java @@ -15,6 +15,7 @@ */ package com.netflix.zuul.filters; +import com.netflix.zuul.Filter; import com.netflix.zuul.exception.ZuulFilterConcurrencyExceededException; import com.netflix.zuul.message.ZuulMessage; import io.netty.handler.codec.http.HttpContent; @@ -34,12 +35,18 @@ public interface ZuulFilter extend String filterName(); /** - * filterOrder() must also be defined for a filter. Filters may have the same filterOrder if precedence is not + * filterOrder() must also be defined for a filter. Filters may have the same filterOrder if precedence is not * important for a filter. filterOrders do not need to be sequential. * * @return the int order of a filter */ - int filterOrder(); + default int filterOrder() { + Filter f = getClass().getAnnotation(Filter.class); + if (f != null) { + return f.order(); + } + throw new UnsupportedOperationException("not implemented"); + } /** * to classify a filter by type. Standard types in Zuul are "in" for pre-routing filtering, @@ -47,7 +54,13 @@ public interface ZuulFilter extend * * @return FilterType */ - FilterType filterType(); + default FilterType filterType() { + Filter f = getClass().getAnnotation(Filter.class); + if (f != null) { + return f.type(); + } + throw new UnsupportedOperationException("not implemented"); + } /** * Whether this filter's shouldFilter() method should be checked, and apply() called, even @@ -75,7 +88,13 @@ public interface ZuulFilter extend */ void decrementConcurrency(); - FilterSyncType getSyncType(); + default FilterSyncType getSyncType() { + Filter f = getClass().getAnnotation(Filter.class); + if (f != null) { + return f.sync(); + } + throw new UnsupportedOperationException("not implemented"); + } /** * Choose a default message to use if the applyAsync() method throws an exception. diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/common/GZipResponseFilter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/common/GZipResponseFilter.java index d06251a4..779fed05 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/common/GZipResponseFilter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/common/GZipResponseFilter.java @@ -37,9 +37,10 @@ import io.netty.handler.codec.http.LastHttpContent; /** - * General-purpose filter for gzipping/ungzipping response bodies if requested/needed. + * General-purpose filter for gzipping/ungzipping response bodies if requested/needed. This should be run as late as + * possible to ensure final encoded body length is considered * - * You can just subclass this in your project, and use as-is. + *

You can just subclass this in your project, and use as-is. * * @author Mike Smith */ @@ -59,14 +60,6 @@ public class GZipResponseFilter extends HttpOutboundSyncFilter private static final CachedDynamicBooleanProperty ENABLED = new CachedDynamicBooleanProperty("zuul.response.gzip.filter.enabled", true); - @Override - public int filterOrder() { - - // run as late as possible to ensure the - // final encoded body length is considered - return 110; - } - @Override public boolean shouldFilter(HttpResponseMessage response) { if (!ENABLED.get() || !response.hasBody() || response.getContext().isInBrownoutMode()) { diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/passport/InboundPassportStampingFilter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/passport/InboundPassportStampingFilter.java index 870f21e1..0b0f733e 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/passport/InboundPassportStampingFilter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/passport/InboundPassportStampingFilter.java @@ -16,13 +16,12 @@ package com.netflix.zuul.filters.passport; +import static com.netflix.zuul.filters.FilterType.INBOUND; + import com.netflix.zuul.Filter; -import com.netflix.zuul.filters.FilterType; import com.netflix.zuul.message.http.HttpRequestMessage; import com.netflix.zuul.passport.PassportState; -import static com.netflix.zuul.filters.FilterType.INBOUND; - /** * Created by saroskar on 3/14/17. */ @@ -32,10 +31,4 @@ public final class InboundPassportStampingFilter extends PassportStampingFilter< public InboundPassportStampingFilter(PassportState stamp) { super(stamp); } - - @Override - public FilterType filterType() { - return INBOUND; - } - } diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/passport/OutboundPassportStampingFilter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/passport/OutboundPassportStampingFilter.java index 776657e2..7f355a9f 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/passport/OutboundPassportStampingFilter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/passport/OutboundPassportStampingFilter.java @@ -32,10 +32,4 @@ public final class OutboundPassportStampingFilter extends PassportStampingFilter public OutboundPassportStampingFilter(PassportState stamp) { super(stamp); } - - @Override - public FilterType filterType() { - return OUTBOUND; - } - } From d9f67b5f9dc7a613393b6c0cff8589e791a74a3a Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 5 May 2020 21:46:37 -0700 Subject: [PATCH 067/273] zuul-core: revert passport changes, as the parent class overrides the type incorrectly --- .../passport/InboundPassportStampingFilter.java | 11 +++++++++-- .../passport/OutboundPassportStampingFilter.java | 6 ++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/passport/InboundPassportStampingFilter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/passport/InboundPassportStampingFilter.java index 0b0f733e..870f21e1 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/passport/InboundPassportStampingFilter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/passport/InboundPassportStampingFilter.java @@ -16,12 +16,13 @@ package com.netflix.zuul.filters.passport; -import static com.netflix.zuul.filters.FilterType.INBOUND; - import com.netflix.zuul.Filter; +import com.netflix.zuul.filters.FilterType; import com.netflix.zuul.message.http.HttpRequestMessage; import com.netflix.zuul.passport.PassportState; +import static com.netflix.zuul.filters.FilterType.INBOUND; + /** * Created by saroskar on 3/14/17. */ @@ -31,4 +32,10 @@ public final class InboundPassportStampingFilter extends PassportStampingFilter< public InboundPassportStampingFilter(PassportState stamp) { super(stamp); } + + @Override + public FilterType filterType() { + return INBOUND; + } + } diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/passport/OutboundPassportStampingFilter.java b/zuul-core/src/main/java/com/netflix/zuul/filters/passport/OutboundPassportStampingFilter.java index 7f355a9f..776657e2 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/passport/OutboundPassportStampingFilter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/passport/OutboundPassportStampingFilter.java @@ -32,4 +32,10 @@ public final class OutboundPassportStampingFilter extends PassportStampingFilter public OutboundPassportStampingFilter(PassportState stamp) { super(stamp); } + + @Override + public FilterType filterType() { + return OUTBOUND; + } + } From 41ceed1a028f4c91ca8850b1fee4a4aa5ef5d855 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 6 May 2020 15:30:21 -0700 Subject: [PATCH 068/273] zuul-core: allow expressing ApplyBefore rules --- .../main/java/com/netflix/zuul/Filter.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/zuul-core/src/main/java/com/netflix/zuul/Filter.java b/zuul-core/src/main/java/com/netflix/zuul/Filter.java index e267d0f0..5205ad7d 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/Filter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/Filter.java @@ -71,4 +71,23 @@ @interface ApplyAfter { Class>[] value(); } + + /** + * Indicates that the annotated filter should run before another filter in the chain, if the other filter is present. + * In the case of inbound filters, this implies that the annotated filter should have an order less than the + * filters listed. For outbound filters, the order of this filter should be greater than the ones listed. Usage of + * this annotation should be used on homogeneous filter types. Additionally, this should not be applied to endpoint + * filters. + * + *

Prefer to use this {@link ApplyAfter} instead. This annotation is meant in case where it may be infeasible + * to use {@linkplain ApplyAfter}. (such as due to dependency cycles) + * + * @see ApplyAfter + */ + @Target({TYPE}) + @Retention(RUNTIME) + @Documented + @interface ApplyBefore { + Class>[] value(); + } } From 85998d073b8ed51c0e78158913ccafee81be084c Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Mon, 11 May 2020 18:28:38 -0700 Subject: [PATCH 069/273] add ability to provide headers on request rejection --- .../netty/common/throttle/RejectionUtils.java | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java b/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java index c54cfb42..204311ad 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java @@ -17,7 +17,6 @@ package com.netflix.netty.common.throttle; import static com.netflix.netty.common.proxyprotocol.HAProxyMessageChannelHandler.ATTR_HAPROXY_VERSION; - import com.netflix.netty.common.ConnectionCloseChannelAttributes; import com.netflix.zuul.passport.CurrentPassport; import com.netflix.zuul.passport.PassportState; @@ -38,6 +37,8 @@ import io.netty.handler.codec.http.LastHttpContent; import io.netty.util.ReferenceCountUtil; import java.nio.charset.StandardCharsets; +import java.util.Collections; +import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; @@ -93,10 +94,11 @@ public static void rejectByClosingConnection( */ public static void sendRejectionResponse( ChannelHandlerContext ctx, StatusCategory nfStatus, String reason, HttpRequest request, - @Nullable Integer injectedLatencyMillis, HttpResponseStatus rejectedCode, String rejectedBody) { + @Nullable Integer injectedLatencyMillis, HttpResponseStatus rejectedCode, String rejectedBody, + Map rejectionHeaders) { boolean shouldClose = closeConnectionAfterReject(ctx.channel()); // Write out a rejection response message. - FullHttpResponse response = createRejectionResponse(rejectedCode, rejectedBody, shouldClose); + FullHttpResponse response = createRejectionResponse(rejectedCode, rejectedBody, shouldClose, rejectionHeaders); if (injectedLatencyMillis != null && injectedLatencyMillis > 0) { // Delay writing the response for configured time. @@ -132,7 +134,8 @@ public static void allowThenClose(ChannelHandlerContext ctx) { */ public static void handleRejection( ChannelHandlerContext ctx, Object msg, RejectionType rejectionType, StatusCategory nfStatus, String reason, - @Nullable Integer injectedLatencyMillis, HttpResponseStatus rejectedCode, String rejectedBody) + @Nullable Integer injectedLatencyMillis, HttpResponseStatus rejectedCode, String rejectedBody, + Map rejectedHeaders) throws Exception { boolean shouldDropMessage = false; @@ -152,7 +155,8 @@ public static void handleRejection( if (shouldRejectNow) { // Send a rejection response. HttpRequest request = msg instanceof HttpRequest ? (HttpRequest) msg : null; - reject(ctx, rejectionType, nfStatus, reason, request, injectedLatencyMillis, rejectedCode, rejectedBody); + reject(ctx, rejectionType, nfStatus, reason, request, injectedLatencyMillis, rejectedCode, rejectedBody, + rejectedHeaders); } if (shouldDropMessage) { @@ -162,6 +166,14 @@ public static void handleRejection( } } + + public static void reject( + ChannelHandlerContext ctx, RejectionType rejectionType, StatusCategory nfStatus, String reason, + HttpRequest request, @Nullable Integer injectedLatencyMillis, HttpResponseStatus rejectedCode, + String rejectedBody) { + reject(ctx, rejectionType, nfStatus, reason, request, injectedLatencyMillis, rejectedCode, rejectedBody, + Collections.emptyMap()); + } /** * Switches on the rejection type to decide how to reject the request and or close the conn. * @@ -174,15 +186,17 @@ public static void handleRejection( * sent up the pipeline. * @param rejectedCode the HTTP code to send back to the client. * @param rejectedBody the HTTP body to be sent back. It is assumed to be of type text/plain. + * @param rejectedHeaders additional HTTP headers to add to the rejection response */ public static void reject( ChannelHandlerContext ctx, RejectionType rejectionType, StatusCategory nfStatus, String reason, HttpRequest request, @Nullable Integer injectedLatencyMillis, HttpResponseStatus rejectedCode, - String rejectedBody) { + String rejectedBody, Map rejectedHeaders) { switch (rejectionType) { case REJECT: sendRejectionResponse( - ctx, nfStatus, reason, request, injectedLatencyMillis, rejectedCode, rejectedBody); + ctx, nfStatus, reason, request, injectedLatencyMillis, rejectedCode, rejectedBody, + rejectedHeaders); return; case CLOSE: rejectByClosingConnection(ctx, nfStatus, reason, request, injectedLatencyMillis); @@ -211,7 +225,8 @@ private static boolean closeConnectionAfterReject(Channel channel) { } private static FullHttpResponse createRejectionResponse( - HttpResponseStatus status, String plaintextMessage, boolean closeConnection) { + HttpResponseStatus status, String plaintextMessage, boolean closeConnection, + Map rejectionHeaders) { ByteBuf body = Unpooled.wrappedBuffer(plaintextMessage.getBytes(StandardCharsets.UTF_8)); int length = body.readableBytes(); DefaultHttpHeaders headers = new DefaultHttpHeaders(); @@ -220,6 +235,7 @@ private static FullHttpResponse createRejectionResponse( if (closeConnection) { headers.set(HttpHeaderNames.CONNECTION, "close"); } + rejectionHeaders.forEach(headers::add); return new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, status, body, headers, EmptyHttpHeaders.INSTANCE); } From a8e091c11b436ba981adf3be76e502809270b734 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Tue, 12 May 2020 08:59:46 -0700 Subject: [PATCH 070/273] update javadocs --- .../netty/common/throttle/RejectionUtils.java | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java b/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java index 204311ad..a42f465c 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java @@ -91,6 +91,7 @@ public static void rejectByClosingConnection( * sent up the pipeline. * @param rejectedCode the HTTP code to send back to the client. * @param rejectedBody the HTTP body to be sent back. It is assumed to be of type text/plain. + * @param rejectionHeaders additional HTTP headers to add to the rejection response */ public static void sendRejectionResponse( ChannelHandlerContext ctx, StatusCategory nfStatus, String reason, HttpRequest request, @@ -131,11 +132,22 @@ public static void allowThenClose(ChannelHandlerContext ctx) { /** * Throttle either by sending rejection response message, or by closing the connection now, or just drop the * message. Only call this if ThrottleResult.shouldThrottle() returned {@code true}. + * + * @param ctx the channel handler processing the request + * @param msg the request that is being rejected. + * @param rejectionType the type of rejection + * @param nfStatus the status to use for metric reporting + * @param reason the reason for rejecting the request. This is not sent back to the client. + * @param injectedLatencyMillis optional parameter to delay sending a response. The reject notification is still + * sent up the pipeline. + * @param rejectedCode the HTTP code to send back to the client. + * @param rejectedBody the HTTP body to be sent back. It is assumed to be of type text/plain. + * @param rejectionHeaders additional HTTP headers to add to the rejection response */ public static void handleRejection( ChannelHandlerContext ctx, Object msg, RejectionType rejectionType, StatusCategory nfStatus, String reason, @Nullable Integer injectedLatencyMillis, HttpResponseStatus rejectedCode, String rejectedBody, - Map rejectedHeaders) + Map rejectionHeaders) throws Exception { boolean shouldDropMessage = false; @@ -156,7 +168,7 @@ public static void handleRejection( // Send a rejection response. HttpRequest request = msg instanceof HttpRequest ? (HttpRequest) msg : null; reject(ctx, rejectionType, nfStatus, reason, request, injectedLatencyMillis, rejectedCode, rejectedBody, - rejectedHeaders); + rejectionHeaders); } if (shouldDropMessage) { @@ -186,17 +198,17 @@ public static void reject( * sent up the pipeline. * @param rejectedCode the HTTP code to send back to the client. * @param rejectedBody the HTTP body to be sent back. It is assumed to be of type text/plain. - * @param rejectedHeaders additional HTTP headers to add to the rejection response + * @param rejectionHeaders additional HTTP headers to add to the rejection response */ public static void reject( ChannelHandlerContext ctx, RejectionType rejectionType, StatusCategory nfStatus, String reason, HttpRequest request, @Nullable Integer injectedLatencyMillis, HttpResponseStatus rejectedCode, - String rejectedBody, Map rejectedHeaders) { + String rejectedBody, Map rejectionHeaders) { switch (rejectionType) { case REJECT: sendRejectionResponse( ctx, nfStatus, reason, request, injectedLatencyMillis, rejectedCode, rejectedBody, - rejectedHeaders); + rejectionHeaders); return; case CLOSE: rejectByClosingConnection(ctx, nfStatus, reason, request, injectedLatencyMillis); From dbdc246324d75ee54b3258f46fed353b42cc6d44 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Tue, 12 May 2020 10:21:52 -0700 Subject: [PATCH 071/273] more javadoc updates --- .../netty/common/throttle/RejectionUtils.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java b/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java index a42f465c..621832e2 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/throttle/RejectionUtils.java @@ -179,6 +179,19 @@ public static void handleRejection( } + /** + * Switches on the rejection type to decide how to reject the request and or close the conn. + * + * @param ctx the channel handler processing the request + * @param rejectionType the type of rejection + * @param nfStatus the status to use for metric reporting + * @param reason the reason for rejecting the request. This is not sent back to the client. + * @param request the request that is being rejected. + * @param injectedLatencyMillis optional parameter to delay sending a response. The reject notification is still + * sent up the pipeline. + * @param rejectedCode the HTTP code to send back to the client. + * @param rejectedBody the HTTP body to be sent back. It is assumed to be of type text/plain. + */ public static void reject( ChannelHandlerContext ctx, RejectionType rejectionType, StatusCategory nfStatus, String reason, HttpRequest request, @Nullable Integer injectedLatencyMillis, HttpResponseStatus rejectedCode, @@ -186,6 +199,7 @@ public static void reject( reject(ctx, rejectionType, nfStatus, reason, request, injectedLatencyMillis, rejectedCode, rejectedBody, Collections.emptyMap()); } + /** * Switches on the rejection type to decide how to reject the request and or close the conn. * From 9724dd4591cca638c4d7d1874b9d8f5b6718d9b7 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 14 May 2020 12:55:39 -0700 Subject: [PATCH 072/273] all: update to netty 4.1.50 --- gradle.properties | 2 +- zuul-core/dependencies.lock | 216 +++++++++++++++---------------- zuul-groovy/dependencies.lock | 90 ++++++------- zuul-guice/dependencies.lock | 90 ++++++------- zuul-processor/dependencies.lock | 108 ++++++++-------- zuul-sample/dependencies.lock | 108 ++++++++-------- 6 files changed, 307 insertions(+), 307 deletions(-) diff --git a/gradle.properties b/gradle.properties index 4550319c..56c47dcc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ versions_groovy=3.0.3 versions_ribbon=2.7.17 -versions_netty=4.1.48.Final +versions_netty=4.1.50.Final release.scope=patch release.version=2.1.8-SNAPSHOT diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 5cb6e003..2d994b39 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -53,40 +53,40 @@ "requested": "0.103.0" }, "io.netty:netty-buffer": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-common": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-handler": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-transport": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "locked": "0.21.0", @@ -176,40 +176,40 @@ "requested": "0.103.0" }, "io.netty:netty-buffer": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-common": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-handler": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-transport": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "locked": "0.21.0", @@ -302,44 +302,44 @@ "requested": "0.103.0" }, "io.netty:netty-buffer": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-common": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-handler": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.30.Final", "requested": "2.0.30.Final" }, "io.netty:netty-transport": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "locked": "0.21.0", @@ -440,44 +440,44 @@ "requested": "0.103.0" }, "io.netty:netty-buffer": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-common": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-handler": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.30.Final", "requested": "2.0.30.Final" }, "io.netty:netty-transport": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "locked": "0.21.0", @@ -558,40 +558,40 @@ "requested": "0.103.0" }, "io.netty:netty-buffer": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-common": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-handler": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-transport": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "locked": "0.21.0", @@ -680,44 +680,44 @@ "requested": "0.103.0" }, "io.netty:netty-buffer": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-common": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-handler": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.30.Final", "requested": "2.0.30.Final" }, "io.netty:netty-transport": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.48.Final", - "requested": "4.1.48.Final" + "locked": "4.1.50.Final", + "requested": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "locked": "0.21.0", diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index 084c2681..d765bc5e 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -73,37 +73,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -204,37 +204,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -351,37 +351,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -393,19 +393,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -544,37 +544,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -586,19 +586,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -713,37 +713,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -860,37 +860,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -902,19 +902,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index f8be625c..32492c3b 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -81,37 +81,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -216,37 +216,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -371,37 +371,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -413,19 +413,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -568,37 +568,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -610,19 +610,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -745,37 +745,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -900,37 +900,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -942,19 +942,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index dfc0f46e..23a726c2 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -77,37 +77,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -208,37 +208,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -352,37 +352,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -394,19 +394,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -538,37 +538,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -580,19 +580,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -718,37 +718,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -760,19 +760,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -887,37 +887,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1027,37 +1027,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1069,19 +1069,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index e18114fb..0bb7d540 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -92,37 +92,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -134,19 +134,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -274,37 +274,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -428,37 +428,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -601,37 +601,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -643,19 +643,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -824,37 +824,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -866,19 +866,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -1020,37 +1020,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1185,37 +1185,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1227,19 +1227,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.48.Final" + "locked": "4.1.50.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ From 568f82e469bad2bc033db2662acee42b347059b9 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 14 May 2020 15:05:02 -0700 Subject: [PATCH 073/273] all: update to gradle 6.4 --- gradle/wrapper/gradle-wrapper.jar | Bin 55616 -> 58694 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 29 ++++++++++------------- gradlew.bat | 3 +++ 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 5c2d1cf016b3885f6930543d57b744ea8c220a1a..490fda8577df6c95960ba7077c43220e5bb2c0d9 100644 GIT binary patch delta 22806 zcmZ6yQ*@wBxGor{V_Th$Z6_Vuww;dcFSc#lcG9tJyJOp#f6hK@&DwKYxAoRr4|^NH zhsVL|Xh0E?$rei5K|w%pz(GJ565~iP6XihB0a7MEk%!2QVM#cEb0*URh7uJUIWGWTtUK^9D-vfe{DWcg3A?R^>Sg8gUZSLM)Ff z*pXcos|A;NZqwFWXG#I`a9l3`YBg_S{&9)pIqB^3Y0~kcQ*mAM=2N%zYf6?SHG@-q z%4BS=DwQvB)E^zMtK=0Tu+}={hh--9z&To?iHG2Fxnm&j<1OPLiFNQzJ!Rc*%TvZg z<3#u*KHhaezT~lZK@4wbIXZK%U~FOc1m7vn{X zxsi)y`RU^1tdRumCUm|Y#I1e3!y3V&{{Yy(ducy%=OhwaIT39NaP|Gh8%#aZ=i2R7 zAVadxcH;z{rJqw`Ia9uanQLy?6g0k~vC1_+Q53b4`>E`Cx+PTT`CK2BTrp@hq%*)> z9lEjFi{J^Ws5jJSryvau0Sf~1;|B-`h#-h1C~YMXBnSxUe@Arx_nz^A4P`WS>~8|6 zwL01`ChG8jdLc;=G=^riI<;uZSx7oio2GU8G2$v)*Hg2?S*z>nZr*4A)-RYRvQ_5h zg;duPAo1XVr&ChWsH=B!t#Rk^S(oGc_va^*U*U_S7zi4(-T)*FmT+1UBbhPo_4tio zG9!thnizbliO#SW^HCgtG13)B4~?qC{Hu-F7@vd8do^6o zn^X|aP;qrUvhXJ&y`ki=FX+#Zf*?~U({a}JY^Em1^i-UHQfFm1IhGgHF&g-`){VUc-{+Z zlF6T5^c2;ohNre_W+yjo3mLK}_bI10sv`*6%}rnwMvDuK?TLD6%6J+=?ILBmr~@%j zJM@xmm>)P-wAzqBh(@5_R4ROq+dN?`sT&7{txa)Gmqg{7@<6F%Po!h=U%tZXHX~GL zNA~)RW11M-bW@ntGH&S(O@-!&bp4|iJbj>m%%yrvA&Slc*7E()9P(l4zC(7F&MR8S ztU4n5I6yMoN_`@UG0y-b5LWJhV7y!Of$#o zJJX=o8b`|KW=EczW$Vn2mG)?$VD1YC{>w)fo=HiRj%@u=9kc-pp9Fz=*LciDRt$p2 z1xs5c@uK06FkW7m7r+C16=4igiMovL9UzafIp8x+-|RMiUZO(qXB?agwP2UUTdtZ~ zD?n*ONfi>%-<5{c-}`e`t9C_T0a=fu5Z|7-0Ojk=j!yV|et$v1zvTnKw(dS$XsTd%PXdBqLivC^_? z(7D*MX8o(l^LD1IC@DwoPV}6iEYq!OqpO(Citi?&r7XUz%!7#m9$I@@=iLnEPIVpM z^f?i5jm}qQ;Gk_m40IRL^lr_VO4pL4<-N_8YPk@{&qHzt*`I+XPa({%UC_?RiOTWc zL#Wd~Z9ouqhSD`chvCMM2a$wdNHl~fBo!UMfFON?zKZ?b-?AqBo#%$uqqBPb4ep<1 z$NK)G4?zO3{gp(bBtGp{2HPGXXGE#$Y?B9gO@9B_DEy-KEcm*Kq3$>KxA@tWSVY35 z@2=hwv1Qz65$Ay^e&RE;RQApAP$L}k1_&n!`aN~#DW4QMF$ivjB0l8j`f^5*#K4Qz zDt&M`Ad^LO3(f72AfRj(VF}Q2I`D|Nrg=#pFhb(?Qpe0riMLG8Ar%-O%94%aamoQ* znTH3mS$RR-s?y0LJd#~Z1tN8qFmGgoIr||&aY11su5#^ZINK$;A`h44OZ(;puO}Yf zX!V=+?$=OH19gkwX>j<;1pxxG3jN8$0h`dRkxJ! zRMEe;tl8lvpp+yilUn>**dU}T)S8N_ZTu}PD3cYCtGQDT*{wS-_RYXQ@!oco_1_BQ z<@CKzqkb%%1z%3Pn9Z=yr20`z34eqXZV=!< zrRaeH_4H8(hjy@>8X!PAPrP}r;>%CP`h@>fE;fm z12h73;dl&l+IgSpASE$+ZS-xh)-cT2lCB*jLu5eezofhzodGL4 zHJ@Bs`6n6f+P)1vZjRrM-ISPM8&2V(c&aTLE*4Tb_R0?BTL}JG_U74U)`|Na`_gQ5=CONd#6qw>J5yR@I&GBUXV$vld++0q%dPHw#7|teLV@OaB>|5EiQc@ZO+X z*rjtUr5>(TI8FrGt7HB^k5cvMGVZ70ucMUO&@_*6?Px1OrE49O7)DLx&mO(Ha0$0( zWf9wKm$bNCD6u%t*jJAEq9@gFL#2iFu1k=%W#ylzsqn(ZXjP(KI?GuBcohUKvxk z+aqDKSlAa8e_x58ihc(_A)8fHvUP!FA5Lk9B``1IzrqhUvGNPZ(07}3MRxokrID@Y z{t{&XAqaFN*9J0-O(jl#gO1F1bV8 zaPJJ%r7@%Vv13)^2E0>KRVA5A6QvBP3dHqZE^rk!@PDElB6PJd<5Hd@#$?s+V#f#! zF(rS9s*Gl+Gx*mmd_+Xwy+YN9YV(I~6NKPUoK9bvb5y^(oL_&+<79k;{cp&o2BoTi zooEOx1lXYpqVqK>V75vRsrG5T8)}~`B^UdO1~OSP%F4{Lma{YYWb{KUTf2=hO1!GS z{X$^-0s)e4r&HACQ7hi-Se&l8j&pc8?$4ihDf~vl216 zwznJWLf$b^?PaSn-FxFa|AqE=PQ}^7b;6HH0V-JV>Xp8f+ir+Y!5_WP;1QflWy68G z^gcd>P>B_%tyHaag#+7W;%uU2AGqrACUrX@`Ekj9ts4Q1#a5(vdct>}Kf7uUt5f2( zGt2OxP-<)S&?#9a*@M=}JvkB{{voLLT1Uk2$qM{K92D1H+>?po7shqk+0DL{8}3JP2Jw*!@3kcqs)2xXjojuNZpZ| z_)n=f!$O@lY$JCjsF&Eqi&yM)1;yeq;9p5nmJI1uzg{pgf61VpsJy$aP^LzKy0I_- zgY6lYhb2G}tCj&;vi#22GdC=d@>R~cI>L7HItaqqCiw@I>oD}t4SlKog9$Y^>ky?R zE6JFU_>(~Wt*$3$j7tO@iquQyn23}KJAOJ>0*x_nE&oAUD>|QneOvtsg7Kl4)vc8Y zYvF3}#bYx}8gJ1Pbj5HlCB$?A0Quhob66O=|A7bs;!X$xLi~S!s2{-pFu7_?7mTSw0CPqJl-eF@#4GT8xKssw{2r#H1QdS8OgQ(mh3QGf4l9?_+gOOoZ;f3fD z+0CJ*`bJiV40c4$+aKEDk{xm6y7OeZ^Q^jC&UPI|(({~Wz%^|~{BXoVt>0DW^`_H| z@0VBZOTU|*4?-`X<}n`Y^1{adcKb>_-IEuhuRdUh{UXcn{X+M6Cpz@FLGC*eyEAl+ z^O8V>>AMrl-%Ip%i~l8ops&UYRE5;O)I$PByOmI1i?PWsEc|M_GoLRYUqW=>#kgPN zgXg|oNI-Q+EzS$x!)tCtaKt9J^t?+ajL<(2{JYiaQBYdy^ORq&fK zlF9+z3le|M2$1o@!2gA}qk`H~Ou55+!#^HlSGkA4<}Hrkgb!hb%%*~^WEnPsUQ0x< zUubHSX7t8Hsao|f>-JA5!x9b;;jHabT;IC?C z(`G6`@N0nGBwBxYT()Ghs;GwL5K~yFWYcQgQ<*)@F_Q`}xl49DXG7MK)wGdHwuCiv z-bkvF%ErpLlh_SgXrtPm_lop+@Iqx=62^AzJZkMUt&@X^AeQW6uE)fP_q0f9YcAE`Q}rCWb^=N!t0Y@7zitW#O(v&Kw$Uk&gj(bgJjy;XYI=;}2Y6Wc1jX~O!u zM_Hkf0!6;vb(5gU*m5MPI^b;D-{-yKO;*{)jnLc*>=!^^bqQ#RS^EEKPiOAgd+P{$~K{GW;CM@Qpo_b>HG?jKG;GBYglx(NDnF&M#6`g_)BSil z3I@dxU(#S=a{PU@ehllsSzainh%hNtnjH~CJNa_d0Hb?REL9B@-AorK7$S{~pbi!r z^8B;jS;iom<7+6dm$^(1OnY+}nF4I32wgYBA)J~@!Wd4YhRUk>I>me^<|aM#NZvDO zA?vpH7B-8{gyyc!WL?+BG*ld_Y4@pP;>daEazGgp+o|B!w+J(rV0Us0HZHL1n*`_1~XeNCSwRsZ$IX z7Cj==aP_L;DohS;jzOx|v83~3DB^6y+WfJMHc~OcBR5UB+lIu^jhH1&mV5Z*kUXgZ zr5imHeInuWhI_n(%{M;o&@7C59m+P!u<=RvAs0=DdR>$j+ENqy1F|qZGjX~pn+!-A z4cgpvYb0KDI{iF!ANapbB!Scm64)cJdS#Me7Ol;C>qjF4YCWa9=gK`lGD9wlz2jR& zxY|AL!ZLWfCCkRcIA?7~4fm!R-F{GM&*GT`l6gCc!GuC)gR#7Zrv`jutwLDegj1>& z9JWK76!b8D?-y>Jy~cxfkmk5ue-GyAm3&VSo|F7MZ z%!xbYwObj=yOtC(MPv6=d8EilZT64c6p+DSbW(W?CKQzg%3j(Ou4`zQhR90mNH+Q% z^~IIWf^F6xR>>U0Ho9Ni1QRrCGV*4O;wCL9!-t1tH6C{H0^`_7_**NUtz@xd8`3X# z+Nr61l7bS7GtJqVQOyYA2Zc6XHY=_(@?5;6*gifg^qB=99DlSZklqeG`o_F%D*RHy zeW+OpTqsgTZCEiPC^i+S`Ph>4GUkvik6|?P0|P_TGX+{Y*B!Tt*W*TXsp=U*8>s1G zweNzgG!Qav0CT6GR{ypgcQsOdva?FD!&S5~8$Yv><7^NL|8SJ7bCd{0<0; z>h_nKE>bqTCJb7ao!^V!egrRZc$l$f$ejLRsb4!Mcm9CQx_4VNjgDj(?;F0u5^GkI zb~_jf*KQOr8~bDtsC~;8pYPJ0fj)a;Zmql9foOhcDk4|3+L-`M_$!rqD77m-r$G zY^q+tN~vf54fQNa`e^UFCg#XqXA!gj8~Ky|#U7vS^x*9VN(F#qv=S-B)*e zpXMcI6rR+P##9p@4re8;989c-iWb7{eK#z9r7aPfx%Sup%YSdQM~3*d%B@05K(7AFSbVb=1lOtw)d6h zcE#>p;u9TjfOOs5Xf7?%(p9s>RccM50U7lH#&9xC`(Wm>nqs`+r4QFXE1Q1Ju@qMb z%_KEQRqvl>MGzIjK59?M%CeMMSoz{4%T_ZCETBJh!P_m+dJ9j{u`ud|NQP8+{HJvA z&dOE0DO_PL8quij%0ZdqvG3E{EVNV|2FPZ@vfIpGshzAfwMb4SxezM7&Lub20P5Os zRX<*8^WUJX%ncF7;H_%%)z*~CZOWJ4ugz$$`W!D7JE|{wvaTXC)Kd~)KHVu)O$xQk zIhLDE6jB90>&gF}HFyv;I=U%deP;3J{R?T(hW)*?2YnN$rB2}cgMTuczrQ^+$v8`Y zoTjoWRQ`K^Zepee(e9oNf>~pG56B#f$k(jGFW3*ksXBvsW7gQ(v$R6=G($ESU2(=1 zlsB-M9o;R-qX^98>6*a3rD_~dv1_${R=+H(Syx1RfSQ6A65gn!&IxrwXf><*(ya1^ z!2@eGt#iQ43;}DM$-DIwejKlee2O^>!TqeVEYtL#N>rWc!op1bz{+ip0@yN+F3K$5 zNGHwaaVzu%8g_1Ge!P1GnMVwe9l4lX&!cLt;Aa&O@}2 zmUaJ*=eaw8*RrV89{hPrm;D!O1U}NOvm+h@4)2v#>>5Yr5;n9w^^0c`;yEv|7-bmc zp&pIogD0#I+fwI_YC%|H@SyU*Ip z^TKVp^Yb#ZsM~+xS6F!HJiSGx)$22E?zItW>pl+q6zK&2*z|19Jtcins=z zE|V9{u2e`+6vW!2%1NaD! zbVnr2Q*-GF7?d5@FT42fmA-RQUr0EdlXKY(j*)MJDu3TcT|N%r3;KhXHLY>1#tka% z+Yw1y=E}kwmwOGAE89W|{MBE0>6I7os@s&_ zD@|v_DFb-}J1AXQkux7}v$|Ya9wcSWQSX2bdd4F8`GnH?2*3cV0P-0n^~lg$9aPU1 zW7ibx&xTf)o524argd4nHjY@`hI)3%tyn_u(FZL*}*tj$fW?(-T<9{APzpP zv$`*CD9g#ICCo#`^KYb`P-<}TU!<EYrRfX1~yJzpv=>Rm8&dX4glF&|OA7H++*BglMrDeN|3AVSc(|vPzT5&zPYx1W>ucoeputTXV4a&#QHw@;3 z(FX9pd_pPM6_2DgmF|0^>&WmJ$REm`hwc&WdUeiMsvx$@6W!n$9a^#HGe1@@6Tvtd z>!s3K1qj?VwExij0UyBU;q^y(ynzy18o;tYlg&0*{!77pxHo`@W0Wou;w?BGmB+wr z!Y&?i=0k@cwLHoerK@T0;2!Vln}w;jH+4*Hr^rwb_uGFXo#@|&f0ZEDjyL>;xw9E9 z`F`ViE67Zs{(KLlht@|!4`YIRL7PBbyBYT`1_FM53YS~cf3jyzOwIpw)U2o z)!MI4cY^8O@4x>qhfcg6!);u}4#Gg-vPR!m`_D29K?MQ%^*1 zry5_es~exGD=>2o`Rd@G+qgT{Hl1-?wZtypW|w;ZyO2BZg9!Ms7f9?aA%^yQ5|7Bx zl7iG*Wte-DVF8ApeD45NPUFxhw+z^PtVV|l|VvCb1?eBE$nGEB<26FxTz_V zN}LV8WTPmvqfvCXCS&afT(*K$3ePzikyXi3vlrw?wOUkHPn|GFbB(i+LgRB;Ab#jL zBI1PJ(y~X6?!!G5WRmLw>1{}clqGAoRZ3!&MTzjcBq|_UUQp7)*%omX-;8KEX9$z) zY${)?Lu$db_F6)h5u>W z2Qd|Awb{rx710_Cuc`^+bBs-HDa<%7(y`7+ixOzuio#Wk$XhJu5>}JxFU8;uV}jgp zNDPo&tulb)m>GzMZ86FWP-~)E^@krDS1&fe?*t%H(1o3~wK$A2stv%*(RqU!(O1a- zX!M!8_kicB-Y}A5c*kVU+^=KZh(hZ3r($?R>L=f@LF$iiLGJW&kntAmYP+lSwK7rd z@xb;(Uc*3SBvf2dzWnwT5c>xr&{3(mheY-v(HEP3PVrJ6luPx(<(t3D>s!97?k>}J z@B%ak?9_ej{E|zvT!5c4bnPed*ldW6&!f2Ef%&U`1O1`cm-vzxz<-Re)p!BI_bNJ4UpNpzNCt~Z+w>G24gdFpuS)15$pM{34wM5Fy1yTKZHa{O=x zs;S$s66Vn$wj-^by?#jTXj;KJEhno(l|ZzBFC6Yys&b! zbj|e(vOZGoX!ezrE#CamYPri}Is=ZlzAOk)NGZV_YR|)gsz|{vkcplWebSU{QGQ1q zbw{%#R53RcGI|RgIfl(H)lv&>m}$ZV~hwg94eL7o+z=& z=(N1#3bpQ%$j)@tpk!z3>KHW+?%n$tMEOj$^Q`gEKr1!j9aiJz+8CK;{+m$fO=YjL zVr*vyL!=-+WKkv6HOVS-$GI~Ll%ozb+KI^^&-s;Jm7v=*;hS*WYkn$d#S>^TeI{E? zh<%Z!^5BBR)94%ie#g0tC;)d!pkx zG2k=3(+qk$Clt|yx}O%hA`)-sP-afkZ}-c9$BbF%OjYy2(P58xe8f?SDM-hJVDQ9? zB)9i4AArD&{UxHiRKB1g^ofBJ6z*%8OVM=qTjC4t=AC_Eli%M|cLES+;;n?4D3!6e z4gJ(qGy+pMlccHr6)+56LtX%1(LMD?!+RBgnz<#ucrMc2NNscnqtV*jI)-h6==W!7 zlQTfi^l`&AI+l=^jsF_U$-8$P4ck9 zlizJg5r{we5&l4HvIiv7beA*m*w8DajkHA2{R*xu{n78AMezGhoDVVx={Urs{107p zC3#)QetpYKb{2P}%O`J#5k7~EP*~tE;)DmLYd0nrjv9yWP{qKdpli0E(&m$Vq<0@y zJkqWam>rU!yMv%>9+)i(n4MCXtyt6^B9ciy$ueKuOCuOt%yYmYay108ov_8 z5*)qY`N@_U22A7wu|Nmm|C z5ItnavQ@WZONh?*XMwl0Hnlcv2J#TLWE8n51EcJXtwu;g-RG!nafKLNRHqF zfr^hWJv4gkRsn`h-h(?%6P6kb`0BhRaL}6$8#$|(Jv0B2TeK>Bk8Z2WCf-uLVpY$! zh(2%CXYEawR>WYRs`-wa7M-j2e)H8yJ(c5egjy>|@+u@kJN97n;G|$Z+@-k|+;)AE=$A0DmuZ`c=x@wU zzXS+tc+eAmT=P6On00(y=PwAdnRO)}7iQD>Rm&zm?a_uU@Rnc1&$(J|ui!(Y1Q)BTiBQL~>!W-je)!9MV-p1kg{TdsEZtpL&CBSej zt^9KeXI>`0#2!DRd>(!5xanuIqr|}};eIYJcG1t7xcc<@N!UB<-^v;GamP2CKM8gl zi_%LS9O6oDyz}+*93=gu1D&x_Ep-TsPIXXZ2D;_4|Wt9G{8 z@peyp6?@bUU&ARyWfpn-MfMdqm|*SUl}MS@>nBQrAwo6f$1ma-M9`h@>QlG)K#8t3 znaA6g+z1mp@0e`iJ7clcasd=c(peK_@?9R!|Fm$}cG~L--?vmFG;g%BS=)BlOHZ{R z$UsJ8;iclLDw1q#E?H~GyB}MXz_`HdVYRwp&n4mP`pA4)6f`b0rJ1pkS4~&QO<2Tc zsPd)EZP{q4Mq44XfM15^xU(8Iu}ry=SZkybrmA)zbXG$B8rCZ8_W)`(g6P^=(^$7I zY$8h%;-#k^(JMDEq$zr7X&bACDHK}YLdTVY+IsR_%fqxgIS_$=UxhNeKZeZnPj^cn|=}a zv}0~&NPuV_#{%=7Rr59Ok_XOuwzdI3MB5EC%*i*ZBw7!Q?Yss9S`rDquw&KO#FB6V z5YG|9vEeyfOnM(&%mc`It@bnGjcRqPZ%0CxWI}6EX{e@k^_bP_6RBfHmyKc;b|DI< zp1B)uKmWXcdT$P<(OsH zFT<0vhbpx^eflGCTB?6^DU$NvoZ5>1nqfM^q#?F!XU7QV&Z-Na$1#R68N^3H%xqNb zwHqQ zcAZr3ku4mF)RDtAR{{zA`L`6HOD!U9`f?>kS{nNqeVe9Ec~FfW=xMx)Oop=xCE2YO zbH7UDR;uY68NLAW%C2qEdD;}Su{!h#5!h!04wB$=>NRev0gHAR(BwACS~lJH+ZZx)AHUk6|uHKN=?&eU1AiW^wv@>5-Yo1eqtq97_7t}V5iVD4 zi8`@n<&?TZtCYqvcbMbkgKE3>zVuZr8sH}(f_Cl+w_AQ~^k%UdZ54PoGJN97w%gOr z7pe&fdp<&7OQ!U8?uq7)&6^>Zf-$o9tMTRm1dkc+Qk}n;^-J#szhE6>y>JR{)m^@D z0o`L^@6hR;T{|hK(&^AwvFz&ttaN&A`7yj{I*fj}h(x&lOBfcM7>Wx`qiw1ht5Ey6^OZ0=*8cA_ zxHt3yBnA4fZdX)k(*F8Z3jb;GSH0-#1&_GDLru4bxRK}Z(rIQcNS%{l$M3Ica=E1& zF1~(5i?17uRBo4X4HWYwj$WK|z#co>reSaUrBlSg&@HClMl!kCLvUx5^pt(2V4=0Ju_+e@##2t)$h=C!+ zV6fr|3LB{Beg7_*$*eVy>9V2y>6>*tJ=+GP1`UWdq{xQQZf7&lMjL(l*cK?o|ck*S5h;xb7Yu~Pz4Nl z^Bvp?<~LHv^ABB5#pCPS0d7Elo6sNp6f!*A;16j|jIrSjxC$smMV?q5j}!Gxv&#@F zr3WufD#OZaXc(KlhsyB?fW7w~1mauaWjccHxYm`;lno5Z!xoknz25#PZb;6ZmX8$e zGLjE($Tb-iQ?uv(Rv9(>>w;2xJLBvd0@U0$Ch$ZKAEhK;qsT>-|u77#p_^;50&1+asM45G4uDz)QxW5yC;61|9-;1v+ zA9&fo#9v{_GcA{)T+%wT~SR3EZ$ss{o z?#O<9*_6yP>tF{Mj9-GcdSJR`>R04yre8pBRZ__YDY~Gyw1_Ls?Ax>zRRD9#c#^oJ zNKK0A!Axh5pgb-xlnOsz5_&OlHSf4_uJPYq&X($ zw<@j5@`60&n5SsMU1?0|hjdlI6+T`veH_58Rz4ZBH68h26p8l^3-;UC!uM;K@o z2qr_Q!M;1-U9xnevYyB=;^Bgwp)ALf&h6%`;H-DGJp|>6j~9+4JvZKBm#h9lY$hp7 zT);N#9MJ++RX?n!dNiz_oOFh`AMdj{aMs|?J$J{LFel#D=q~=C!Qc@aINJ#kFI(fK z&=IDQ{?jXrk0_+9W5+#7zx1VH!6(!7Nhz91Djb#9#ro?3bA~eJKt|t^6bXO))juZ3 zRy`)dYMP09U08BB9JzLG^5NiU*}UBzF%AteQicLZ)=Vt6)RoR5ie$Uoc?r`p;q))! z+=}2gTQ0_%S%psohew1IX=n{jxh&pX#w{C*ST7Q+!mC&xncNj*L9pFnx@5fn3#xJ( zzEOBfk@f^fZH_*p{xfAs>@gXfRx~P`zA=!MfzX*D1&=l#PI=GgsBQ15K9Q|jqM%f| zstgM(PO5631g)SuJ|>*tYf3-mXT)%&+evr$nP&h}(lyiej;ti{E&he)r~<22A^b-5+KB}Cm~5*pFDQ~aGEO{$A< znvfG1lpJmC)h5Qc7J2W^E&JJCHLVoz8yJW~0xfvnxd-hO7R9%}CQ6br3jOFcq%+tsX% z%!lWt=`>xz+u9*tS}1oOu=$5ofx>?)E=t#+C2OB1q({F6MESEdFA0k5CqRIy@+S|q z7r0O2>-r5##oq|QUBO?)M4VDimCbR>^5!0Pg}1~zhoYaXcIKlLx1PYaC=qLimMs4m$*^-J{0!-M!J`J`r=DzV2< zQi^DgvvOy}YG;MEAWgB`Z~{ONQQdiPID({j`#iwI7yGzp$2Ot+q(m8QR3Q;Qj<}cYo;Y&uOMJ#S4r^YCJnc zi*NLkl}gc^F7DP8?w0Ta`IKJmTzoG;Nwk9-{K`4CQg$Vq!PuYt$qK}U93i{EiF`4; z&#tI=Fwhxr3n;@%bv-LvMwS-5QYI4=-|;Xh`A<60giwnkd0Z6-dq9N2X2dEjJqtEj zpvS}0_9&12>`9Y9nDvG5)Q5?FCf==qLaxnU!sbK5+=BPg2}15rJFO(0T(1)DOIq4c zTxCbnp)c?{{k?j@s{!~T7wWxX4!f9Y;&c)j8+A$^a>*G+$H?-_-5YeHn0bJ3bDF&p zr=W{3ss5H>GsOUJDq7d3BJOw~*Me`N-_WenQHD+7Xmy{fFK8c9U)uy*jObtL5!6~k zy+fE?L&BflpPBREPw9*wCOIkToh9y&%r~RTF$ZU9?j3EWHUU0g5a(O-bCDKlPI=rD zACyy@g$ekIl#03}+m6axuPf?)S0zw>!@)bTeGu|xxp?P9>_rDQ!78fLSz11VY6XsD zkXv*&DP?(B2cty=_iR|kKH9{8_k~9PgpvjK z!vgQG{HaB^%>jS};T+SKcw<1}Ql`#5pQ2ELj5S2q%JA^|rSBhgRXJtnyw8!qrY4&I zkd&E#7-ow0_2Ul-H-nqyTLb-PBv~4}|84xx)@ak~=S%h`yvjb!C$K#bsIsV}cM}6z zu{J0hsIsyDH}_177xH}fF~IW$zeazDSKye-!yEjL(-BY@0M+7`z|)30{lI*+#m|!k zUsQ?i>cMH*2E%)MKh36F@((SiEW)sMF(N~^xGFu$9*s5Hw~>XmEE#Zx)~i>>FLrxW zjMGCH0w+L*)!{5=h7v%32HwY8w*IkvzA_!p*{!v$H(doJEN4no@k0mSWMO4N2 z<9#bO`yRliB!qzYE4$>UNoUZE#@O*gV-4I+M~uJsgQD+L5#q%7W-M{{iPP@`;whTQ zP~RQ4_mj!&OT?oI&weX>>jWlB@&+UDi>hi_v{AqXXIV!|`_xjwtA6|SLHP~G+X=xU zH$S(~j-U4(p0Bd^O92xcsk}~15DxxR$iEx8%oCu8d-8;Z2&uFEd0_mpWT{d)caLkc z7^iT;IVF}0(w8YM^53&2<)H}bdxG?2(iL&ulQy#Q^mjxtxQciC<79QV}9q)rX#?>pmtl zUN8oiD{qDv;?02I>MIN_Az)O@fT>JxC=Cm2T6rT0+UY3pZbiyJS(Cr2Xor$N3=D1b z-Y%nT&dy^w(;$K3FIKU1P-$J8$oymAB0x4II4F2G)G%-nPe2}!N(t`DL}9iMT_%xK z85aw&cwTB7)V~nu46{FKg~P-yFb3M7NEh5SpA7p7eWDazo)gI07haPS_te{$FF#h$ zJ&&Vcmk)ARpGx05Z70YbY5fS_PoX4pH9+6Q@TZsDFZzT5`x8&L|(OfXcZbL47qhNM| zbS~wdu(^9PTSf63(@A=-m`D5YeX?~g=px}jJgn?Z|JPP6h8U8fxzekoZS8i zWz7n*X6SX*5nT3P*@;<8)y=jH8V$8-_lleS2^)wLdxP@Kjb53Q24Y<9i1P1q)r!I=|5I8ZdSBNKea`^OV4TssE6-jq-~sM902M=!+Z+p z-Rc9&{BtI0+Un$FV>={x^=04YL3lEuRbu}@0ukeXj= zD!<2OuBu!@dkv$Na>&q%(9GmLlt$oxJoMoQj|fmvKq)icz8@@{Q{{Mj*1lUge&!1@~z3d%VrLToAd%xgDDA}b8=Ar8?vOhHO&%77l5jbhtq z$+eOQpx6M#`v&}j(!o`Gu;ORWx;P0niD}BF60hf+sd+x|5w62KIj% zl6A((2khJX>^y!R>J3ATW>#ccr6$GMqnt)Jh=memMx)wvf^-}IG?oH8_L~(T z+#)zKg&-+-+t*9q5D=9A@Q2JI`0A4CD<5UeZN5EgH!h0T=Arm6v{hFWzB71Y z#NHZApkZ_sLS=nPzu{AMPI|}fTn+efE6gnrH6>dFoBqI)3?iGVb+Gmu`-MNaoBisZ zEm$3Kx04mnTTyzY&_K!^SRgN-6sX;p#T#Y3rCIxu>-i3*wleDdkQh(M?DC z--b%lv9mkJf8D+K{~8kH|3{eqJ%t7&tDORPOBj5{(zqVHdIhU6?5+w~0w$6z86dKm zX-TWh;k^yIc8f3uV)G(7A{k7Lq^_3ImJ349DK(a-Lh2onm__KVMH8)GvUGp9d00}c ziLqYtp0B(*{;NTxx*dPMUvlh#*~5M(*z+&*Fv80AtLh|5P~R#X31S)EJV5~rIVgrw zadp!?n9{D;h%+l>VQqaInY`BFFKt1A?rQxMH9M!|}_Si_}cysnVKa)Ja4P~YN&);twmealM)JHPjd9ryqrC) z%6%(3EvSPNI;_i&L<=Wz38T!42AqNj}#ETZY(05`5o_47s@AncSjl!<5OMSKwv2_g3d4CS=wh%uy zvNU!7Iwt$YkS)x7Q{k+(V(f>DolZ#o|&r7>l1{JB^U;To={RcvLJYh9nRm3Srl2VHj1{`6*qnlfn_v}lCq0R zg_v*Z1yXgAERvbjBD4nZ6Md!HmQ93}PO}z9Sq}+0F-RVh)06Bovka>A_WnkHVH}FK zkwC-?iAvP-0>Tk$2Jen>X~RGO7 zWEd@cH6I&Q#F~gZ(we-W@l$=G(07hi&U&as(`vq@)6BRuj`+pr-F;pgy4ZWp{lSSz95|OB@p$YRH5(SH~5cevA(c2Jm3An+(gNF zJ}FfhS&zIoP^0|3dBP^6vbx3z^047qBgszAL-ZI_DY%;+brqK9kJe5&TukLmog4X$ z7r}UCu7OB*jfneUyNJ$)D*}0`rVkhnMo$ zS2Qh&Hm01uMpBF}GUtrafH9RCfA&nMEVi6+jx-{z?tK?2(wx*z`B#E7z!I~bd?Z7$ zCxlsbWJ%aQbFQBiGLqOP+@)WTDX9o6D(X~5RX_w2}JY#=4G^7b^F%$@3f#+lw$>>i~SCBNVJ zE`XZ`nxYb0+f>hA1EJUK6oPKSOuxWB>mCg?v21H2AUi8{6bWd=)#?`OHhSFCmCLpKOLXe|^EN(^A|(fe1UTjB&EUFI4=F z7Y*}cD^&1_;?96G83lRV3DWOGS~7+Du{-hixwj-JH4WrqbRbAbVk|^YrjNFoW$r^8 z+!;yB8C~(0&v$H#nHd#4CkE=71YXM0t_tOFrodWD81H4k;r2UgL$x9v`C;c|mZ)u# zBl6rAggs%ptA6=AT}btvFh<__>ysOb`lk`EMtHO?+s58`qtV@9R6FUGGvP5)Sie?6 z(a5yo0&4aYfMhHwpz6(p;DA-|sH=kyLMbwNYOqKu{G~obkmEg3I9#kV*^!!InU(dy zO7GBXlL=BZzsf&KjC37x3NSaSqb9vc8Tgvw{P~fX;A_9%zkg7)(d#llU>bWWtu2Mm zNNP@fVvchr67pytf3N^Eia!b)x=Pxd5J$hv(8CnPap(PoA`fO30b*WZzE>6=k}}8@ zqip()`J|M`V1QLe#UTD&pm|rHxABCwTdY~#)XbGLzETQLWyD!2e*>Afu9+=KU~Xz@ zjk!30^op%vIgLzt1`z7(Mo86X47j*%=N3{67HQnq^Bj|XdS|gYk3)`;j|vaZ;GGDZ zK)WMTq$SZ}08dZrE&^8?C@W2>GRvz|(U}qwFJcgxM%G(-iuZOO#OTSoBybBfapSz+vmrtFN};zAt>dhExq>sif?zIahR1j!q* zSVNWFCCaWXVc`s{Ax}aic{ZqXbbNby*#(Q9rbh`Rqr2)!)F74viT!He;zwq8s-bQY zUspM#KO!gYM?NC;Dsy~+`c^XB6D=#0H6b(eRrOi%e ztQswfE^u@{6jUI{K%5&X<^m^iFC(?RrTY@z+9=6F2gd7FgMZd(mOpw6=XMmWr96;Q z@h#V_xi@t7nh~Lf!7JQwFqt5;JLq~y*wq89Vgt)@JChKj&9 zn2Q?kAbTISXJVUQX|OrXy*&eMcDPH&yhBenvr1ZqHW`k%Bb_Y0UYVoqi(ZClno z*%k4A?{6-s%u;q9!xbd~vYF(x{lcfq0B75;U+kc6vr5YEa}i_){~uZJ+XpY z15~^2gN{CjGY}n3hm&|52}GEE+v@-gD%77~-{vXLjY6u&eOE!akr66nSE!fG18DP? zL%?UX!M~$Q*BYwEMDrAA>6h;0EBJ)D*(XoiDaD$G(NfLbNr3|t69tvIQQXMSp!aP? zaWo0!0wceJmg!!RQ~!MGWIm<3c0YA__|xu8^{>5rSn>67`ZGU_`)}V0s9GFh5-JIV zRP@FG3}yy$lpi}A0*j&d!UyqsiqxA}r4ij8QM3$mYYi-`!V|#K&1T!4I!$G>kH$=el{-ImxVViyyY?W| zYo5>gnEcH$da}eZbvX{~@Zg2j{OA1mV&<@Q9+gt3qB@43Dw)hn0tBVo#5_i=X443d z{Au=wjsooUDq8hZMK4;)fNxoRy|477$?f#T)c2%RZMX?A;tkxjXF0@Q5)7=J2b+x; zz5cv8!eC?sT*z*?QHYuQYNjrE+KZh@#O43h1{4CCM+!p zAN?!CjxM_%NUzZw;D48ITzBy)m6SDjHBQZY5mMv#RI+oPIM{@flIq6DbrUOk1O7ei z#m=5TkywJ*Z~J`t_4G1%)~NihiUlp%?Ng1uqP(qBZy(o?yHh^I2VVWh6E2Z2Lc#;s z2^>L1FDT~CL>BRo195tuMzYvAh!{w_+{%(cRwvVtQ4zBPnD^hDHE<* zXrL7qpUW$94>~yRw{>?Lu6O>cGri_#t3Tq?O>2P?T@R=ExEP_vz!ydmjb=Lv8Od?@ z{brRWqZ;C|66V;)4AD>XUXok|{6ue-UR7}IULWnD1Y1)b^7e&nMV|00BI=gQ3gTlU zmoZYD4X^Q`z7L9DM=SP`&&n>!t;l1hWj{U@e1*nG(yz!gc93w|#r9d=ofyucFzXU{ z^1eyd_l--%l`4u6&N3p)<@4gH(Ny>Em-HOu-0^_)cmgxo{J? zD3jbemx(u@mjb@MEi(rJmeJ@8hTtLRxCLDQDrllu{Y>g)tGNuL4-cL znnNR~d_h(cG&C46>dOqAyoDkL^|w69P_#5H!h<?4;T=??}5G%JFBvvEh^#wA1slTAx1(Qj@e45jOc7HYbm(^S(HuX_E&Rz4~pLlbD zZ@s)^ISI4PdJ<=>U{39j0%RNjS-zEyRV#W|gD;(Lmoe=2wSDBAy+YjyPvS%aM#-4G2f3o0kixL*9Nl#N8 zK`YS0*ckZ(qM!Cd_1rvghskQorT8!~lOlFR(bIM4CN=Hqs;ca(g-dF4OqeFdtVDR{ zKb%1nwA_%w{HEgHy>o9;$G%!BJ@=%oHnK|ynPqj!@Cz~J+Al<`L?tF35&D8MiMXCj zrhZ|EZMDB^^ewLAmyIssus|%g))no~>p+`LP-_)PaJ4C&)Zh~Fve$*z>H+*c7SPeA3 z4q9L1<|uV;=oCamvA@+6eO>rf=~2J&0Nu!5?UO=wX;TrwbgwOdYLA|axtZSVZ7>y< z->;huW7l0PQ`2|{ll}n#Q$sIqU7i;oyCglLBR3BF(7a2Y zkX*d~a(1%LHSBmo36J-S6<(ID?nq!RUVNrbJKQ*HNv?zh5t?e4s!Uq)4Kfu}z)M_~ ztm$5UX`)$bv@%|ZtK_MTgzML`yKN12^VxjYy8E z49Gy$%W;zV$^5}9dI|MI2BRAiiL^D3R%3FX4x$_KbcJ(cNgiEsJfh`_wp^QOGAzS< zgFzs4o!nn&uz&~W!B9>f){Fe9q5{H=q7vkU<6x}=0&@NZ-!Q`oQaX459e1%K)GEOi z+HU8?b7b-LeQ>-!ce?SY-q)bD_)a$KVeImW3#VN?z6?B_hdVLDdbct>(_#PJx3|Tm|U$NG#c| z&pEPNggK+Kn7s*dujNTZ1FLLzaXLo3nWD2)Y|k&u-pkXL;xnL|^YwS#)efKH zS8EP{R1#B#Uh6Y1bWH?TcWgx3yYMWf>T4~h>Q9j#bbX8WW}AE{b4J&|JF?Fc+o2B| zMez5&u3Vz#yey6zd6+Qq4027nyik7s7yHm9uW(5J*VB|Md(n?yx;1nHJ-Tf78CLYS z4K$<|{9jSUiby84zBhCQJFZB(hrbucFY?_o!1u1en*yAQx1dseSom8$7@`=C4_|%5 zPR;#1g?`U460QrX3-z{)H;-`4<~<9MipJybt~- z?zlO%V?$44B)_rEOb64b2Erp5(V5zbvC>U#*Ji=(suj-i8V{f7EXHh5x-&=MBfcBR zY1%jXRAHT@K{~w_%%nFZyRkNG0;?)q)Vuq3Hl3hsO$xi>qQ>lpFv`=eq;8kdb_C+) z#|-z~{FMIX)a3T!J+n7Bwfjr0h_OoXjd9&7=!(dCxHFh+QA-=q23wJj3{9_4x{A~| z!f%Q7>vTO5^CLwp>A7|s>&5w0Mf|8sUNH_|UHf#mUwdenEP!~n0>j=_D;f(Q9F@Ap zHZ{nm!Mhyas^LZ&?kUnrs%=|;XW8VNj55azy}ZRcm1Ajn1|l`wX|6PoqlB*Tcgs0S z@^_J+Gi)tO@WbW0_e@6*3-5VGN0OGDoiBv34ilPnEoH>)>y7xihTaspjHoWQeElpS zrLa#=`1@g3do{zw<7)Ev36z-NY#4TRMJ^>N#Wn9w*xl6T)P~5`p6b?=Yl_|0Cwd0TcYM@g2@>BZ>kJ z;P0b?{y`4+4+?e732?#v2l!vEIH0f}480|ILZ$dCqgdr0{NaQ{^tTfO&^S&)`(Iw4 zKX7pH-#8o~Z-5fG=!1Yt@BM2!rl$OB96-Mx0!pR7HP6z}qfDHj95$3n3mo=KfNVKY zA~#?>zzNcOa0^NuxCi~C4)TvNp9tN85WK{|)c_d!-#P_U%J;uVPQVoGZy*lAf2$UN z?}HFJx9U4Zg4-$k-wziwG?732xb$y<5`%<*oC-B? z{S^%TW5@pwFp=TkU>GRO>{d+Ir31764}$ z3JeYrfz;dpbz3f!$_Ywv10D>EfqL8k*I^To=1bIt25_)v1_(zuK^U)r(YH{5-h~Qq zK&gp7x9YAfF{%{|AV(nR7pRg_IskuE81y(8)yM=`k5WPZx0!;5Cicg@bH2F+sd__z zjb1RYJ_-R1h2EN2#u%aht_$(e(8T}nYmc}EZTi#R`c;lWKvdDUro%BI=pUiuAAY^D zz!Rh$=s58fJB*YC{YU|xByj+b$0b2$=|I4^1qeI))*Bwc!IN}l9}{`Cq|qKa-EI8gEHA2;AzfdVlC*i-jG zQyl<98zW$Z64&}sA}?xA!N9;21cWmLY)n~$=7s^aX)93qD6rej@Yk~fv;5H)`WPV5 Z!$zsDgoO%|(a?lZ=Qe6kxv{^r{{!uYR<-~D delta 19980 zcmV)OK(@ce$^*c%1F$Or3aZ&=*aHOs0O|>ov1S>QP5~5uE@NzAb90SWTUQfT6#kBx zWMCWxV?cw7gEtZ`iM7^Nu(V3OAOS4_Y((1*$svqRX41*TOYawZ{Rh7GrB7X}eF?O# z+SS+oi~fr~Y4@4QKoWwhEY_Jb`|R8I?S1y-?`OY11#k*KD2U>Mf&om*cuU4b1--bW z;4-c#n8H#IL49*ZaXIO?i!4OI$7a62UyFk*ejA8NFYH67} z^ZK$$l4!=x>*k{F7~;Jyl-yOL!jR0^PBC3{^n%HM)At>{T;@*tf^EAMmtJOc!^*n4 z<8o)5AzTq#hGU7P%pLuno;G!>n9jP6VHL-HiD9QN873e1^3k0lMcCU$nL+VGUa?D* z%kE}lhED(Vs_szsdE0XN19#HYE0v6`7dQ#yzJ z`3!e|SM35rUxR|fS4^IF)BYK0_BIpuupE#VYjt~WXoB>25m))UGkV!mld(dKa+bBLPM!-nQP8eRDPgPP2#%^a zhu0bQZNn3T+IXVEz#SQPRhTHruvFM6tN1{FEJxtTsHkvJRdEmZDP`)JlwYEhS;vyP z?7fRzR6M{#%3JVEh+C*q@gY89=-w1xTfRfItN0k7P{jiDlcrtaf=3mf;%Ja>ofhhO z(^wX{eWv1be4*k?d_`#eq(+0JMpHw#h!V>Gk&3VJ4b^)y>|E7yjS}A|5W~euyJ{AH zG|P51lPd3W&0Xc14@?VuYFE$CX@(Vu3kKD|Sgr~W+TiiZU`oZe_)etuJ;UJtyj=|Y zx9dZ?L7PVn$#yNZHcHsF7v`pj+C;MPdQ6Qs7kjF%nc1S5A4<*SZx6uifp!unE?e1*G{ zZN^1k;sxP4P1@Jz#qq?}VYLNd9a>PHH`~}OZLvwdXwXCq>z;j=y83LRFaKUN`KpVO zTSZjVytpw8M_UF;8$=#zYFu$Hreq?yrI}57nl$DVdP z-Xx$awnIuSK--Yk2IxlQw$2ynlRQA*X7LvS6C;q;WAv7$C!=S0XbtRF+U&q_S|grt zKTgo9`U)6Cf}Yf^7$Pk)W&@-rlZ+3ItYOFO6NGZoACPjP(Hg=vM6&CUYv@=*=a{q( zB`(#lGcHBd8g`9^d?7Cuko71BCWr@}vbmCjxxNk7@^l z_X{xQWz8^7k?5OKXZ>f&DnifcC+N)$NB6B^e+}`Ok*5=(Gg6Oq=tmqL>5)zel4|IS z9;o5qV?^TNUmi*9r|17X!J%BVKj3N|hu5I}>6KQ{(@Uudk~9K6O0ZAT{tUqubZDfb zp&JtfSZGae5Hs!3!8}kCyAgVZn2a|VJMb^*(KYruf+Eo@!3SXXUDH*qIQd4(bSlb8WNLgNKg{P)6h=ZHOo#jom%>jOwdGMglOUq z@JAW%l!6U3MfYK6=H7G8J$G*A*YEE?0o=!92NRfe;9}OsTnh6JZek&Y#T1sz_LhTX z+;)(FZ)3&A9ft8|VI1n`3<*EK#ea}2%bH-gSP5hCy1lz2)EmANQN*jrDv!3f3eCA6 zOzKA1qTGg(d)>9RZirZiRj#FCa9_r;Q00iXT7odeid6NWu6QjHK}YdsQ>fsD?8K4e zwWYHHC5EZG&>KYWNL3rig)(MX^z)VX`~weSp@ZR|l8w6z3;xK$t0mL5wSQM+m^%l^ z;B3mas*3f{^qxLW6^suTX-tyFIi46M8(KFDP1En&mQXhCxhNo@OZ=NS<}$z}i#AqW zn(hNrKiT`!1;0_=MfFqC)rPQ{!9}41Jb!8X#%D()t7!stJU|#hWpAM0XX`;%((b;e)zjhixxTVa>{!-mJB}U8i4#k{WXqDQmE_8H;yg)D(%P$Ct8f) z=9_QkyZYi|e-y+H{IP*A82FPQmg7%@2;t9ycphI=(_d1}pPTrL zAl{F^RLx%*__F%`br8?tZ-V$+d_^^XS4C-mZ{i<<_(%McfqypfdJvoOFMfZhfAxTg zuLkk2__u2OJN_exXYrpV{!3B*TkZ5UMfsY6uPc52M>YSen*USHH&pY6YQCwOZz-K_ znnJVsMNFwMrP2^z5c~02Q~dl&fGlFDo=G=JRS;bgG^IL-YhsyFV@Rzc)tORn$}$5_ z7!nG~a#>-@O10}MLslEI#*}}sDQgW`XUh5@hGc^&8%?=I?Hi#cvdNTNO}WjK&8BQI z<#toHn$n;)*k(whAx#3SE0J*A&bXaQIVnM?&rM#QIgs`yorD(~wY{V(s2l7#-qU-k z=iJbt{%BWk581lU+ZXM&xSg12i+XM>F|kij)0s@9JUihH+3~bvO0$2Uwy(eUNdKW| z^jzmrZX%GbO66-ob;sc0!-x9MMY~QPsstKH3dEBW6AtCA>rT28Z4<6N7I)e%x%Tw5 zS$4$kO2|@j|o1Ac+RH{3c@|=X)r={FJ2a}f)@uWT0w}72H z2kwp~V%~m1N5c{tEH;0AF=gA3z}J}^qmp&qv4qo;o*Hr70ed9wDCZ?d?f8)G#?&}R z^m&sp`hUYxDpSSelA3)t=Dt}o){iC=nuzS?e@wB#Z(jZ?9mG+?CG2}=2%Xw z;FgB$z6r-`8|?4ONr@%f4#(n-mSEUpV@frqODQX}WXwr<m#GZ=NP2u+WlY7H4(gLgPxU)W_Zr$x zZ+YELV#1qbEb}?mnM^Ao%;#g|B7fe^4p;fOirTIz5zE?0IHO8cDo~kBdxBL3b9&R> zblRiS9eaw?6)}G0rVri|DrXZNl{iBVkvw>Ol@ta1QS zKjC=UMeYg5n@rM|Ym4|?XFN`6ZP_{UTaISV^BUQqTMBY^1IGQ0Hzqq0k|j72?~j@zCySn$NH`WRD?tS+ZB!E!ih`TXK)=x9~2!!@^JFXDqo_?ju0u>!d>$u`^a& zO)SG=%qX5x`yWtEhb5hI(87oCVGA!|jxJD&w`hN#TXIMaTXIB>@?2WN086^$m?g)h z+mI8M^hmEIeM;LWE2j?h_jL6fi43NgXpy4>1AP&V8j(`ih$JsMZp2Pd+mtiPqareo z3=uCG$s==wiy}v~10!QRh}_snTJf|-`r-~TLoG|iSW%I5L146%S*XM%-Ppr9kXpU4 z20GHQxUSGZRz2mNNee%Zk602@R-Ts&mc)OB`B1Ocwo+`owL`;{B?)1v2Is+tK);~Q zEt!^wa=BEzc5`7xZ5Dh6l39gva*83y5Z98Fu!{YI1BY9f*J-&}!k1sVybLZ0B8qys z_3~7_btIM;YdvUtwl_2F5R~bCeHtyB<_2C?wGJMe?hFxhezSfaTCpjoXwUoexu$=- zT_!N8$fcM!xkTV&sYoK}MN;YM=_GX+i;y-${D>SII-&FR5|J!hGOf9iQMJVbsFc{3 z!#x$a%a+WjD%3#MdNBuUR&JDotGeuPYMx>wQ>|GP4YF54wl%P=+mdSAl8Q8JN$u1B zZ7b?p@~}KYEGbjrT?Y$ynGH)J*baYI=JtHulm5RYk{H>1z6CC%1Xfq8otyd8om z$2;hZ+vzwHe_hdWSi-0Gs8M2Vm&B~=>hp)){Dm(tbzv;#ru4P*Gz-Z~YJYzeIOp$p z%NiD6G{X($Z(M4wmgXjk1F?3&o+TH!5UuKW9!m3eI`62hW$roU@6@%lv?RW(i%c!P z?q%;pou#)>+TO)mrmL^0{)RIhYFJ;A61m%J+Ew1nk4rBPS*m)r#Zq1KhfMLsvrnN( zL6hZW$ds=khpWn6@|4fN<8yz7(Nx0(MQ$%%+&O8xQRUmjs8e!bI-t2#u2Y+)@8YdP z?eZrO-zi=?MG=V!W$W?<_p@Wil+ON3Zp>o>8uV>fm!eeiX-fKNJegA0CdMQ>I_W5^ zG1xzvOnKQ}A3-qJvsI`}_D-f9g~O_-4!icml)lJKzo}eVOzHaGmMMQ50`#dJPb~;l z?s}}MspU=G({o3yy0?0T!%o?$QAN3Q+rnG&zHG*qz)pBETkbMV|Efskw%hXmD3uqW zVv>Id+*fAJnMG@gcUknbSo59c=*L*%V)6n*zqgDZ&y;a(xyOidSjUW~esWn=&O-GL zZCpA>3do;*rZ;ph6)S(0ee=(fzs4t%qI*hIh3+X~m0HB3IT3&FhMF_i$Bc1kCZ6;@5&3S+=PJs*{_BVqjrDOb<}6DtUWM?(C{3V4^!}p zS*+{{2QpaI?rUrc`)0A4E??7bgnglK*vMdQ*q6b&cK?5}27JnFH`Qpv?qJoP>Z(08 zVSm`nVB_%as*2|^bse{45P1qKKZZ@ATQj(A4x5KVTV`?l%d2WuR$a08)U2x3-|AJ> zE3kE{>OIe)sqqu23~kGx@suVyd#XtZ+(1ZunpOs{tg87WngVDEo0Ti8GH8C`=DYQp zmJC|M{u_TV!~P7~T5h0`l2?3fRl} zedM@@?%&S@xtG-Y(2N7vi4M+mvOS0{97Z3G(BVfh#L*azvHFfPow}LcJq$}Po*>85 zIEfFUA0H*>$1#9caf-4};|n;0FX1e{j0f-)oTGmhr}1^t-oRNAJRp9YlPcI^VMM3E zk5Zdjyn=V*M;O$dcovT{aScko!nr4yE)TNSe~f=sl=?ROID0|Ld;~v%pF}lvyo~p- zS3_%F!%xvxpGu5;O0kzqDfY4{RUy@Q67NH$sI<(j_p7M7$&G6atT(X3 zz%zdao;C1(1J4X|#U+~S8|b)6O#_P=2~js`P00)tT?~BSCJU~9 z(MnWCRuqibOeVhXvrs8<3Jq}Pak}GR28T{GhYo*d za3plJ^3&+b;8;&{=(rkp`#2u144sIQ*zRi)&i7={+wKqh!hTNn3|BUV`Z734hTd1u zf0Zi-)XKrqm0_Qh<8JrOVQ4sXN&(ngUZ#pBi{K=K+D}U#$}0%ve;l8nj>^MLsJKb-l{z4c*Gp2Z_nUNOEzDwGP{4yUM*zI zDt%JEmjQf|y1$QQ^b}$4nW9YDQP6&e&ShRSU}9%S3@3)$-94~?i#AT(NU>HstUebHebKmO=2(tq9 z2*{t(k+B$vPixyk1c1+I+rotUm-P)H!YX=&JwNx^jbC9eK+adSvzD8AGT>oE9 z6YBp(P9peiv#lSZ6$)@b;q_w&000RPlW#N{lh8m0lb_cJf1OwPe;j2Ue%|ac)6ImY zfd-eh5T($~mSlU-)}{w7Nh^^}T9PKAp(vBx>1LYA%sM;U0}nj#RunG?rzb^4DcEdN zs(_-XhziQD{vCck0_yY5>~1!jZEXEv-}8Gs@B4ke-*@)4f4}e|fK7O785=`3M`e?f z&7^Eh*&K^ue>0{OSTU%WR$#{v!<3vja+Fu`5!t(Pr63zmHbvPSk0FB-F`UFH75B=O zkII#gsra~5`9uu&;gfRZQ_c7^J|hM0m($NS<1jwgjB$KkHeXQjMY;T?7`}|J#Bir{ zmcdtL^MHb{srb5z2UUDS#W!Q<#JA+ex23i3#CU**e-u2dU`D|s08+&;EMDy{kWboos^vK5NMV%S+n5vnXbTZ!6g|_iM_j9_WE);;WT>A?E2LP) zv5%U$qN__efzGt!=2AIV&ss+6gsbQChMO7-`rcYm>c{Kd3{UEtwrm|PP7AaJ&Me)| zrG_bBf9I$W^(M{2+6@A$8+qxs3!ZLSQf{Ydo8E4L`x8qEF1&AMnYINZ02m;E4p;IcdR!_ENpPSm~|-p4hNcbTdY9S6Vq7-BOI<-e+elr$7=67~Z6lRq&*S@8WwJ zcH(-)aWer!u5Ah=nPvJDf z+wDwgcv{Z);Kv$%f}d)5Mm9f_Yd^=ce+tfMcn;4CM7s03>uLCf+&+t0daVSS#yh0N zl7e#@=5Sua3%H=*ml}SB7d5lCeQhwXSBMf+Ye-$CYdcn&+!Euan=e|o{O zdua6yd7?M*Hw}N6{%@0aw0fy5q3!yR3#?f(=9Ng4D*>zELXI+r=NI}tgLS}hD<|{) z)ST>^i-RMTGOnR}eqIS|Z&j1gStFRKu(48L4De&PmTHFDs9_L z@vcOJDz<2;%sncqo)atyT%TxEe?{xdVY6B2tB}Ko%bF533jxmM#JP8(;8;b^IH-G* zycj)`F$%2v8(8_%mtD~t9Ao~jRy8m-U+ffF=tf+V)i<&5LFlZ13!_=ddt)B$Mv1m@ z7%ONSzLjYwm-DZ6K^V&QX{j*8FKUc;Y&ne1%0_`5ork~bH7e7s^Sxw#cMD2bhr75FK>V-k$ zB(pPY`&|XV%@RP@Oz|DxZw#o+ZM2{fM_Ne?UE)Jd36hmR&&X z@HsRGGp&S{wkz0_u>2f9s<;{|VZ{vAtS_N$2JKuBaxvJrat>FW2{hXtff7EAaA+6j z;W?}vTs?!SCH=Hl{q%(6;S#PMlh)_(p0a3LoB~}XTtlG}Rt1}@rTKXHJl2E|4+qw+ z9jm~a!*xCWE}!q7e@HxX9`6;H!7e#^pTNsdd!lttuBVfDlxGRhlpV#Rb67ie`ads~ zEk{bYp~U#mAAj6jSKep}+$K)ro}NgZ=_E}C2&M71^}#e$p5C;;VU1dsL_~+(Re^Y< zf+NJu8+q%2uXtn*DVp6d7LS~P5WQkZjPUPS*k^~0RsNsPe*{^&oh(h0n@7mYEIBzz zRz65hK15cYB~xA{SKc5;{z1)m&?nYlpIC?eB8l5XFK!n@I7rKBF@^#000zagI3S+K zkaz{d;&mJnZ(`JE;SnsO-COWMWrZs;$~htG3pvpSJxL{fegl^WMy4k_-a!Blo>`mvhhZ zKg+%I+!qHA5z!p}$W7aMxHKcA87a*uX+~#%qsftGjC_uDQz7RnJkCb^>SJzlbDoTi zm&W7f2|Q7nNp7CZQ`~d|PnE{2@JVhO%hP23$qG+*alV@#;28?fbkhVbaMK1^9i!0>0SlC^E zB4ekzDUX-B_%wMg%jQa6?&d14cH^x^;T3LLh`lg&x-=`LsTB%m2!%6UTqiyC3O6Xc z%EhZ)e3o>qanmwxlxD4)UgLENuUB}3yq@i*T5fXFNMQwcF5V;`=Snk2 z;mvMp3o^n&KJmnZ-~4Xy6F?X zNIox;w~NIz7b*NrCbc#k)}vKHEf&*bOrGkR6_xAi)^4t@ZCtyicKN!swW}I`Hm|N+ zyOJrV?mTUqRvy&Ct>ukIG!SlG%rv|z5{?;K*jTRx z*E89xB7U7|WL+SvH^f8DdUUOZL9sx@rv=w*(SUp>I_*YV0G6ASac8kjFbMA5zNoGl zdUYUXFfGa`!3OIIgSG@(<5A5BM8b;;Eu#k_<)RZYg)e=asqnZ-K_WkYwvPsyO z8e|$_kq_%e`MNc=n39`5rLj$$Gk-y2Jj66QD56)V4J!OCbk_~;W}0_QEl(e^3Og&Z zb9Eq^Vya(e)!h7?K)ZZHm%xeMF3VyH?|@k_=!*xT-ZX}%6%3?On8|x=ZF(mY2k=)5 zOSYKgvqEr*$=39k?u$o%14dVQJ+KHMRtH-3m?0}$#OS%HJ!-@4aRYR9Erd~q8l27X zmKK3}*2d-Vw&pHaUo$kOY;0|qV`?ki!Zu1LnZ^vAAS3z!gs)1u-Qtv$%@ws_Y#EKW zL$&Es+*Sx!83}>TaOD5n?*4$&$ zIz}Mrr!`M#m7WN#bNUz0m&Iot$Kn$WqFJ4D`*&G?AiFF+VRNUuO_J2Y6P8vMH=42A zg1(xVS0>X`dYYb5=^c7krCxeirQg#ZRC=7AQ0Wr-mP!}XH&uF&9#ZLYz6u+kP^l@4 zzNgZ+=`xje5VG#~RsI2At@1T|t-{yI$Mq`zkZ(}=M|=a)@zI5vK3j^wBg&1qH~;xA3hh-^RDAdKq z`Ck61H20~zo3B;*XY>YgLI27%@vspH>8Y5_wB>YD4sUur;GLNto9XpO^q4msF}x^0 z4J{D%YT+(Siz1;$B$}0ZYZBSjYec*)2;^RWy%UKz*yWv_n%7l^QlfwVRn6z2Tjihg z{i3G_RNlk)Fl{<26N$ZJ*dpQ$eKihL-pdcFbSvGa@n{_?xHMCH>q-}3Uz-TMW51R#fG~_kfGy{!) z?wy&j+@9%ek4CW2=<-6-U9y)2u+jv;$`a!c+bcz@HxPqzq9P*<{3+K;Q`4{jIP@wZ>F_j(;VD4oma=0HIRlnaVHlwaD+HLV^E_$!P=2ER|o9X;Z#`ywXzm zWtD%;uc-X01iQSUks+aiqN+$d=r^4hwJ4k;S&Vwy`>RoJOC(z1m8kI>g@3E^Yy1Eb z@#>(i#RN`XIqZt-!M1R$K#K{r4lQhm)5S4IV3u%Lk2 z{)5VYukqDbv_Y_2K}2*S1A}BOTTm5cRth z%>}i!@|<~`HxytIN85q=7*$X>_=;luph;rakNMtXS%PWviCoEirTdMXL2R3+ znUr|_MsZ_a>Z)VMS1!K>YVEj%%Ul;awZ!?VGUG|fL<^EL;E7|GQC;;8#{W5xB z3^lJHhZ&KT{WmeW1+^Km2I*e;F=TMUssWhtkBem>%SY!H>?c5*_u z4(68QRyM~X!MLG|D-2AyU8pkPoi^mI^c#iM;HLjvJSIao)X^?qLAi?3I|HUcEd%4r zjI!Bsk0V$#FH#DJ#JFLBSaq`a0}GlTwmbRQS7g{?6lAK>!jUk_!k{J8xPlB93TCJS zoTH{D(-ql&m7;WiXaNKHA7R- z5N3wl9!U_YPhO~{nG!MHbiLsTS5JNq47^tFV!6{v7A)rR@3>qdc`xNT>hWIgB_gd> zAX%L#l$mB67yZRaaje8BaawN4)-|SnUr8HSYzB$CNC%>SB378 zL5t{Gx(-y_G>@)_er;G=L_egRkZdC4ype9gtZ6ifevCIK-Hg?Cth@zlaQwC8;S12` z#>l0AIpg<}r@ogaG!^&I#0J{}`{+^hu&ct6YtOosCY5>|-85-|J=cCq-zOy=hb&yseqJIn|jDwq1YCDLY0uyR9m6~ZL`JgC2 zokFcpM}SVJ^Jooi#f%`nLUcYws0)1;QPfmn3j~zaw?j$UbOz0*JLo6m5}{LSy_D{R zlHeLxbr;5k5FNgt)y{3!6Awt#b^n_$*qau(!s;F15}np3C!8kFxP>$6JmA& z=U)fnE}$xSXuoeXq?FTOVu{VSeNbY57FMpLZt8(@_M=xd6(>Ch&?9QdrmQ10U7>?h z28h^84<|%?2|5%eYD%A`s-lt}DzC7Yir>t-k>&zYvp3|-QA|mS8=LItnA_OoC~a(V zdh8-ug<~(x6GYCp@23TOQm`p9v3vkOx@ZY(3o&w)l2EVC)hM!z% zdXp1z~9sKj1{J{hGU~_^dAQ7PDKpb(@S|x z#W_oR=(Kun=%r;%&PS-S$(FMm2Ff(WI7D^xv<+BdY)c@ zu`B3IdeQW%D=_zE`ZfBlhgn~yS4=n`P66OBFev~SgPnh4!Z{az{QNcr=NfXk`mnDn zX?gswRA`w(uPL-rp?abtGzEQql9$sb5iM7!@eGC54KD=Q*XfN!25-Zcc+G^IE&EB^ zOU>Qnt1Hg&caxrVCpql9ZM#z*oMW>4Bv^ln#sOmE0WeXbp)h?T}8F`Q~vwx(7mTLYj?&yC@mv(+!|Y1$P;$x64urYyj8@ zmT^Nhqo4|Z50o*T-iGqtp;IC0GI|e`-UqD@kh(tvr4NvmK14?P2=qQiEdK=5K8E5x zLG|+wQ`u{vm+5pi{e}Jtjcr0<@E-jQ79WMY_CEa`J40tFWnTk|RtCEUbOrQRE zP#-Mk7_<^wBr`=L*!U;?E0HN~MxVenf3zKCS3_|r%B`ja_M2!#NvT2*B(@ zsM^+_@vL0_-)R32@%~d(d;dnoi{wk6r$7m!DNW>K?mea^^67t|G0Ejq&7#Hz$mY@i znuX4P{ics0ha>*)JwmzM&-5r4cKS5IbPZOCrj?>%vwl^(0uFC(84#65H4Rn%86N+c0z#vKz0e2( z%4H+bR(O+m%yxmJE*!XguSDA;P;?6?+8Ln`?T+AHbKb$Cond+uPwFx16w63Z=1erk zVu=r|XE?}uRfg5Ep3z}gSMg-R8uM+siqQ=USAS_do78r6Fm9NPCOmx*?A`}oJ^*&` z%-ZLy8?2DH@|xd7e*jQR0|W{H00;;G002P%9ZJ~Z76$+TTMhsKCIFLh)fJOJS`~k3 zV;ff$J!4B6SsurZVkfm@7sWBHEZG(bG(g-2yfsm4*}+?J($*bY6L}JOq>e_34P_~i zmVGHuD3r28*B*CUi}$dH#|Lxm;V1z8kTJRN^Q1UcEUMJk2i$Xt#<#ZB41CBvqQtq6|c6A^q; z{)^+8Fg_K*r}3ExbbMB%XH|So=FdlP5?_$vwu9X34S5)v|wM7Ayr? z+OiCLBCnT9MoGbmi*sX>(^D&p^HXyxmu53lEAtC;>6wcPqSM#)n|dm*Te;Lc4OqER z1#J@rtK{gGv!v(ChJquP=Vl+7npmivI+C;XY~ENb8TO^ZhG=+Z%tGp6GjGsD=t0vm zoeK(@$>jg1(wJ1YgK6>9#3re>32$n`GTTU9fX04=Q!b z){8~MPF>cW^)Y(2K~0-LN8|gU1+6`2IQ!$V5^rSdF>j`~*UVhm)us+WuzT>=@-(yS-8+Jyq$u)UQke{khXSInY<+4z53v-d9iY>;`i zZ09fOrFBY-p(owf0HxvKwhg0H(sRb7nKMd`f<8~FWUQ5K)7eU8_Wn)%;Odqm)!B4) zT!BI#yY^U}+FUb=etbeD7lH`$j=pvyqZj=`X}67y!cAjp(=n`)8}@+ZMoVFIlr&@L zSArMAe%}+za8iqN=|g`)AmLrK^R=Sh)u!>K7s)Ip)Fn zLfKw3WRu0eudGJogoaT(sNusnui}RqCh)R`$MJ-Qk7HIt8q>Vndo64D5nj=-iZ$Ny zgDl3&Wqxc)kRVw3rjMW!2OR=(b!z$b&-;TO7v#ZyQ zHD}+}ykFw?zr*{>!|}m`1$yj2;~RHtt~1`S&<`q$|0FL^R#w6AJG%CMiAfW43cEg> zKG2gJ7+Uh~5Zjo?(O-BR#u|3({hhxN!rnJP+Z!4MC;xv>EArYz+I{lY$mPu8o*&xF z!qO1Db{2>aN<#~ki&@>FxnTV2xG)N3eY8+K?d^2M(+x9|Xw=v1I}7V};g&Q&*U?r! z@+6-%HfOJi$p+l%e@m&ny4yvM$J32*rRV!qU_4#c^Q8m!ys{k~yt2P?w@Qw&;RW%s zU0|x5twVo^Ea4QtlFssrtQp;S0Oz3KgIqOXkn0caStt2p6QmsG9(y9khq!t_XN7Yx zQHAoFt9pTBgfq~G0Pe*{C~2M&K8i8UVqn}i@Gvz+HzEcS$vbGOTRB2n;CEGkG+WT` zS~~7&`<6r!T0&w1lfKRW5=rHJJCUrQxr#t0F;ss=a3(RFtRi$iumg2j{t8#ovV+KS z6|G!p6|_ZIiSA%`sEW?*nmauRag5WI zL9`=*6O8HvhOmiY*R@L?>6&Y|F~#t(R`3iiG8aueb(31>7?u;T`1+htJN#btbq_^pi39OilUH01>> zy55Y`*pFbzW&arE5R_GwI8E}T`>e0?q?BG~GJ3j#froluMliXZZ0@b#z1!|>5l&Ip zvqzb=X`*Bp{aKew%sX2{>%_8)rc&byt`f<|{TJH!wI$yZKJK$TDK>i;r~5KPlA3>k z3w;D1+8*i)JXOK{b@b!(81ykn|1^5oL7$@Zp`NXt8iO7@i4|f5(S@hnO44|_giEu_ zr3K2r5mliJ9e%s`bY7qt3EX5dI#@yCC4>{NqiH)CO}eWNxf{`;yBMxwWLvW5msK>y za&l|yeY=<9%$o;@KTgmmNa9JRYK0<2r0==ilQrU#$kq}?E=Rifzu^|?HKtt3lb?SYQhw@y|JPX6Afz*_qk%^Uv3B0MeM3 z(11i8ElCNDNJvN_9Y8PcarANA7m@)99D^JWIEEzzFd{+1BaX)$8HQTxwN{KIe;L}d zhM7;~O?joDCX|Af7&F$_Wql>9>FS(p7FBbIw1+iavql&uI^EU()v(zsWqLzhiwwRo zV?||X6pY!;^<~w3E-x2|6V4inTv(J%O`JSN?69Evlb9B3Yqf11ij80rmu!IDiYw_$09&N0T&vJL%gyIwC-_qO8rx z8}_H*c*3xDE>++jYs#(^&)cL}QesInM5?*RAT1c1rlO8(qI_B^bb3Ute}V|(LJ%P| zaXbxT91|RqK}_KpLz`P_7zSM(d7-cA#+H6WJ+vMt3gRlR3CCurkX;Q-9|PZVoS?hP z0&@z8TC4mh+?o|jj-l^NJyuOjj>XKDY^sN2I!=&2ebZ3wyI0YPMc^n=oym%#7K@RA zBvol|6^+s5wCSd$6%y1{f1<+RSzJ~493tEyt{-7RNv%+cIB6xzF^X3aUY zWBJgjwt1(kntRov{W`a`fbu_ zlFnY*gVES0c%rfR4!j@e>_IcF4MN5yP{Sq>U{h!zUJJ=cAD3_if3PWy!Qhv(AVC0}Z6d$KU}3005f{ z002CbAEhLcj2?ed+eQ@r))uTIi^RB?gtnv(H359V+>&6MBn6sVad28Ev?jgDLU9#r zIU~zWUZIcBw@7E&At}?O|2osR=-<9WJ3T8oU}A$zCNuq`-97v1oNqs!Jvx8>`|Aq; zb9f+Q2#Y7^k&zL>B1cY!ge4hSTn^$2u5x@N7Rwwf0``Bg3>nurt_N^~W6owHmsWBlMDC z8uk^28sva*DPdS|*2=ndS1nh`63*8(wYs5NhFG_ZlAy~F zSQcJgh2qH`80ybqJlD~ED^>;7lpLxG`-tWxJ znddyuG?=3BgJGe&qw*>npLO)vUEjM@#{7*ee&K16WP?7H*q=zoIz4me9!1ft zYw@snjD_1wJznQ^->R^*ds}MrSGCS^FsSvE4B?Czw>RB$n|b@hxF3ZDCa+^6kn8OR z&^5N~j+lG4+3y+#6VYjfgw-Hg`Awxh4qE+5hnT>RC5vjU4ln(+aZa9DKl&WgU#WOc zrrq;~vy`{m>LR&sOqI&I;asi<{q?azMRDQ|C&pt{w^YBOI4kVU{jJ_^Sxx7&meAE` zoTGPenfiH4tueS{0JqCpA{o8k0xYz|;#zPGVFb#ju=3R&Kg!6AcDG;Osn3zj@WXLu zC`!iIRusjKeJ)5gH+;+WV3I&*{p=U_`nMFWG8ZnqEE|~#oB>{3YVMP@6s&BhaLJ}+ z2ID#Hl*mNa8)RG6e=d-cv3O5Y!F*ohql?sJiz^~9hbGlqe<)MG+5xxOjCo-iRG>V% zYR$B*^0F@)4c9R%l6z zZZ+zAMIR<=gL4-g?g-gIVasLt53rUK!33QMKfZM47j(Tel`3;R>LS6WyYxl+hh|%x z8p`nC#<<&h%}IzP8@`2rPe}a{Rj84VjFw!SNm>`&N+a1?`=NEgJFlLnZHvq^n7m4R z0MxR2Rp|Uq6P6Vtpr@vzm&;mMa@SCq>c>GiGP;`yPK(vb_CVFETin-P|IoMn<1@#@ zscaU-b&YMn+cm{l8LRXTMbYDaf+JhX=gpQE4bMn}hAV?feQ=ui8APAZ8$+k0Cxrpp z4YU-zxR2&BHcD|b5pg3sB`aN5Xk|ks`j1FQqri%JM2%eHQ-Fr@gES2}aT?nJE+lJV z<}CL7Sn;T%SqE^+ost?$&cdo~s9PPtyot4&esqsq9x4w_=(Ty>iXxLR(7&=o^gX?GV!39 zhgA*5v_N61v$2J%N=a>Ba$rz`l1e#ZE5_5g$!u`E95=P^2Tch?kb5>Vl=W$jtv(l* zW{fN2SBp!s(0A9lD@$_=R_~;7R)Bn(b_N}nYlt!jMOts3UkO8())gUDr?}sEM86)` z{SomLEfPmQF{C{IWeqG%a{h_gnCl^A^UXc`+;BLg3Vjq<RwWIqRIWM{6_ zmk&KkH7@GBBlf-hR)dcOGZFKZmQDBry-qXjSC2B07bS9js!6xcGZ)X>KC+K;!e={s zin^{F!~Gvy$V&|63~H^}r}*VJArwL!!n^#)oqv-Yi&YCt!=Q(zW&L+QW4wjC3gb)ar0p{D0XG{-GV z`||TIlm8`c#4oz!2h?-;1U&YfNiny1HEPs@nuRXM3R~&yyQDRAzb7MI^ z{_J9LJmcom__KEeal58^Iz@r6V(L=Q42`mj?~5M_E)NIqCEWIWIMLFXG?msCwrr+L*h4d8hM|m{Zktx8~8jzVXL5a#&+e9IaVS zO{VPamJfA{&Ruit5ifSS(-6qujjq=Vlg*#r-{wt?+WRfZV*m2pUuCa7QEx3IEdw!? z=bb6>SfJ&)eH2E>8`f>-()G@{aP(6pN8O7y$|ob0Ij0XYMb8T*DBcqd7-+nX@L5lH z%-JhYqQ*8+OLoq&v8kw7zvj;^@cF7ajnY128ezYi?x;jACJZOnMgg%v&?R9(W+q*66aB! z1R7v7)+-wB0nee&*G_QQeZKG#SJ5zBza{8myX)*vyQ)*Q%fHewAcP&XKwBUW$xV+a z#Iv+}7P5+}R6?$01R30R`9^n{)s~UwYQRH5_NMycn~X7+61!ch4@1gXoJNGy)GK#J zTF%uLsd|TFgzKKByU!TihMaesfHjjbElh_*uzasL71AMMX80sZZurU78^8rgJ3MdG zuP9=qB8!2CFdinnk}$#k%JVNYU)gT?xkPH{2EN>xMt>aCI(L0$%D`Qp(>S*J-n~}d zj$z7#>%}Wp+k0%=Yvc&Wj896{Co2U8{V^wMbI0*a379qQKx@OLlN^&AiaEX=nLZcC z-!Tr*S;IplWEwK?mzi$IwHGzWP0ykuaWV`06D*g`Y9{rM&LtMQ#Z;fun)ZK}bp(SC zpld--1}_@1?wbRB#v-MUmrS;ldb>Hkn;lV|>`qrac^G+tu&|>M9Eph)d)C&u0@jN_ z{YJm??96Q0O_M+UeZKkV{jxXtO@{u7!U{Qvc#Ynf1Z4-5fw=!ju$~5 zkE8KN0)gaXn`nq4LjVUSY3K0jKq)5?vVpI8dBOf!80avL0G{)bsLgRoFl$^5xGV6F zc@A)pAVJ*;9^}8bmLL%Re~TcNVI)Zs4XaZT?=iuV$Ins!tIWr4$^9dw2QN;F0@w6O zW|cV|m@^4O9^Vf6uOGD`N%;5Xh%oZ_s``J0tj7NcSx9YjnnD1cmq`@P7Db|p9AR{S zJo2%jR^ZZ2zMok34uPB3vs3s7()LRBzv1qKStB7hIKK;8l*Xf=Bd2=yYtY+puF?i4Y1 z{tk(%T}FZua|l2%fM^PUp%GNz%eOG(|JOcfAQ0taHDC-R30)!);Ov|zP!~cn>F+ax zs`D`9u}R%Azml-u!sK`^q8kjXpGN@XktEmcc{$|&hj>g7i0U!7+GvuFp=z)pSgAU|kJL=^4GgOVVM*iQD>|Lt&*E^uwx5jf}ucZQXTJs}E=^n%SR7Xbb~ Z5H)%VJiSWIAOn$sbP+#;Q{V4m{s)AkOUM8K diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a4b44297..4c5803d1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 83f2acfd..2fe81a7d 100755 --- a/gradlew +++ b/gradlew @@ -154,19 +154,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then else eval `echo args$i`="\"$arg\"" fi - i=$((i+1)) + i=`expr $i + 1` done case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi @@ -175,14 +175,9 @@ save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } -APP_ARGS=$(save "$@") +APP_ARGS=`save "$@"` # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 24467a14..9109989e 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" From b44d4fe4216c1fcaa8c218ea5c4f9df454c13daf Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Wed, 27 May 2020 11:23:23 -0700 Subject: [PATCH 074/273] add blacklist for allowing XFF headers --- .../StripUntrustedProxyHeadersHandler.java | 25 +++- ...StripUntrustedProxyHeadersHandlerTest.java | 123 ++++++++++++++++++ 2 files changed, 145 insertions(+), 3 deletions(-) create mode 100644 zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java diff --git a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandler.java index 6f6b9421..facdfc97 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandler.java @@ -16,19 +16,23 @@ package com.netflix.netty.common.proxyprotocol; +import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Sets; +import com.netflix.config.DynamicStringListProperty; import com.netflix.netty.common.ssl.SslHandshakeInfo; import com.netflix.zuul.netty.server.ssl.SslHandshakeInfoHandler; import io.netty.channel.Channel; import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; +import io.netty.handler.codec.http.HttpHeaderNames; import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.HttpRequest; import io.netty.handler.ssl.ClientAuth; import io.netty.util.AsciiString; import java.util.Collection; +import java.util.List; /** * Strip out any X-Forwarded-* headers from inbound http requests if connection is not trusted. @@ -36,6 +40,9 @@ @ChannelHandler.Sharable public class StripUntrustedProxyHeadersHandler extends ChannelInboundHandlerAdapter { + private static final DynamicStringListProperty XFF_BLACKLIST = + new DynamicStringListProperty("zuul.proxy.headers.host.blacklist", ""); + public enum AllowWhen { ALWAYS, MUTUAL_SSL_AUTH, @@ -70,10 +77,12 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception case MUTUAL_SSL_AUTH: if (! connectionIsUsingMutualSSLWithAuthEnforced(ctx.channel())) { stripXFFHeaders(req); + } else { + checkBlacklist(req, XFF_BLACKLIST.get()); } break; case ALWAYS: - // Do nothing. + checkBlacklist(req, XFF_BLACKLIST.get()); break; default: // default to not allow. @@ -84,7 +93,8 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception super.channelRead(ctx, msg); } - private boolean connectionIsUsingMutualSSLWithAuthEnforced(Channel ch) + @VisibleForTesting + boolean connectionIsUsingMutualSSLWithAuthEnforced(Channel ch) { boolean is = false; SslHandshakeInfo sslHandshakeInfo = ch.attr(SslHandshakeInfoHandler.ATTR_SSL_INFO).get(); @@ -96,11 +106,20 @@ private boolean connectionIsUsingMutualSSLWithAuthEnforced(Channel ch) return is; } - private void stripXFFHeaders(HttpRequest req) + @VisibleForTesting + void stripXFFHeaders(HttpRequest req) { HttpHeaders headers = req.headers(); for (AsciiString headerName : HEADERS_TO_STRIP) { headers.remove(headerName); } } + + @VisibleForTesting + void checkBlacklist(HttpRequest req, List blacklist) { + // blacklist headers from + if (blacklist.contains(req.headers().get(HttpHeaderNames.HOST).toLowerCase())) { + stripXFFHeaders(req); + } + } } diff --git a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java new file mode 100644 index 00000000..be9adefe --- /dev/null +++ b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java @@ -0,0 +1,123 @@ +package com.netflix.netty.common.proxyprotocol; + +import static com.netflix.zuul.netty.server.ssl.SslHandshakeInfoHandler.ATTR_SSL_INFO; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import com.google.common.collect.ImmutableList; +import com.netflix.netty.common.proxyprotocol.StripUntrustedProxyHeadersHandler.AllowWhen; +import com.netflix.netty.common.ssl.SslHandshakeInfo; +import com.netflix.zuul.netty.server.ssl.SslHandshakeInfoHandler; +import io.netty.channel.Channel; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.HttpHeaderNames; +import io.netty.handler.codec.http.HttpHeaders; +import io.netty.handler.codec.http.HttpRequest; +import io.netty.handler.ssl.ClientAuth; +import io.netty.util.Attribute; +import io.netty.util.AttributeKey; +import io.netty.util.DefaultAttributeMap; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; + +/** + * Strip Untrusted Proxy Headers Handler Test + * + * @author Arthur Gonigberg + * @since May 27, 2020 + */ +@RunWith(MockitoJUnitRunner.class) +public class StripUntrustedProxyHeadersHandlerTest { + + @Mock + private ChannelHandlerContext channelHandlerContext; + @Mock + private HttpRequest msg; + @Mock + private HttpHeaders headers; + @Mock + private Channel channel; + @Mock + private SslHandshakeInfo sslHandshakeInfo; + + + @Before + public void before() { + when(channelHandlerContext.channel()).thenReturn(channel); + + DefaultAttributeMap attributeMap = new DefaultAttributeMap(); + attributeMap.attr(ATTR_SSL_INFO).set(sslHandshakeInfo); + when(channel.attr(any())).thenAnswer(arg -> attributeMap.attr((AttributeKey) arg.getArguments()[0])); + + when(msg.headers()).thenReturn(headers); + when(headers.get(eq(HttpHeaderNames.HOST))).thenReturn("netflix.com"); + } + + @Test + public void allow_never() throws Exception { + StripUntrustedProxyHeadersHandler stripHandler = getHandler(AllowWhen.NEVER); + + stripHandler.channelRead(channelHandlerContext, msg); + + verify(stripHandler).stripXFFHeaders(any()); + } + + @Test + public void allow_always() throws Exception { + StripUntrustedProxyHeadersHandler stripHandler = getHandler(AllowWhen.ALWAYS); + + stripHandler.channelRead(channelHandlerContext, msg); + + verify(stripHandler, never()).stripXFFHeaders(any()); + verify(stripHandler).checkBlacklist(any(), any()); + } + + @Test + public void allow_mtls_noCert() throws Exception { + StripUntrustedProxyHeadersHandler stripHandler = getHandler(AllowWhen.MUTUAL_SSL_AUTH); + + stripHandler.channelRead(channelHandlerContext, msg); + + verify(stripHandler).stripXFFHeaders(any()); + } + + @Test + public void allow_mtls_cert() throws Exception { + StripUntrustedProxyHeadersHandler stripHandler = getHandler(AllowWhen.MUTUAL_SSL_AUTH); + when(sslHandshakeInfo.getClientAuthRequirement()).thenReturn(ClientAuth.REQUIRE); + + stripHandler.channelRead(channelHandlerContext, msg); + + verify(stripHandler, never()).stripXFFHeaders(any()); + verify(stripHandler).checkBlacklist(any(), any()); + } + + @Test + public void blacklist_noMatch() throws Exception { + StripUntrustedProxyHeadersHandler stripHandler = getHandler(AllowWhen.MUTUAL_SSL_AUTH); + + stripHandler.checkBlacklist(msg, ImmutableList.of("netflix.net")); + + verify(stripHandler, never()).stripXFFHeaders(any()); + } + + @Test + public void blacklist_match() throws Exception { + StripUntrustedProxyHeadersHandler stripHandler = getHandler(AllowWhen.MUTUAL_SSL_AUTH); + + stripHandler.checkBlacklist(msg, ImmutableList.of("netflix.com")); + + verify(stripHandler).stripXFFHeaders(any()); + } + + private StripUntrustedProxyHeadersHandler getHandler(AllowWhen allowWhen) { + return spy(new StripUntrustedProxyHeadersHandler(allowWhen)); + } + +} \ No newline at end of file From ab6a7a6beacaac38b18eef59f0720fa2d85a22e7 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Wed, 27 May 2020 13:45:52 -0700 Subject: [PATCH 075/273] update license --- .../common/proxyprotocol/StripUntrustedProxyHeadersHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandler.java index facdfc97..3aadb036 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 Netflix, Inc. + * Copyright 2020 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 4eee88df40c638912bf6535dc84d8c39fd8ea004 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Wed, 27 May 2020 13:59:13 -0700 Subject: [PATCH 076/273] fixed the wrong file... --- .../StripUntrustedProxyHeadersHandlerTest.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java index be9adefe..858aa6c7 100644 --- a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java @@ -1,3 +1,19 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.netflix.netty.common.proxyprotocol; import static com.netflix.zuul.netty.server.ssl.SslHandshakeInfoHandler.ATTR_SSL_INFO; @@ -10,14 +26,12 @@ import com.google.common.collect.ImmutableList; import com.netflix.netty.common.proxyprotocol.StripUntrustedProxyHeadersHandler.AllowWhen; import com.netflix.netty.common.ssl.SslHandshakeInfo; -import com.netflix.zuul.netty.server.ssl.SslHandshakeInfoHandler; import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.http.HttpHeaderNames; import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.HttpRequest; import io.netty.handler.ssl.ClientAuth; -import io.netty.util.Attribute; import io.netty.util.AttributeKey; import io.netty.util.DefaultAttributeMap; import org.junit.Before; From 76eaef53e162a97e195364e963f68e2b6690ccd9 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Wed, 27 May 2020 16:24:25 -0700 Subject: [PATCH 077/273] add test for strip --- ...StripUntrustedProxyHeadersHandlerTest.java | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java index 858aa6c7..a379243f 100644 --- a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java @@ -17,8 +17,8 @@ package com.netflix.netty.common.proxyprotocol; import static com.netflix.zuul.netty.server.ssl.SslHandshakeInfoHandler.ATTR_SSL_INFO; +import static org.junit.Assert.assertFalse; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.never; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; @@ -28,6 +28,7 @@ import com.netflix.netty.common.ssl.SslHandshakeInfo; import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.DefaultHttpHeaders; import io.netty.handler.codec.http.HttpHeaderNames; import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.HttpRequest; @@ -53,7 +54,6 @@ public class StripUntrustedProxyHeadersHandlerTest { private ChannelHandlerContext channelHandlerContext; @Mock private HttpRequest msg; - @Mock private HttpHeaders headers; @Mock private Channel channel; @@ -69,8 +69,9 @@ public void before() { attributeMap.attr(ATTR_SSL_INFO).set(sslHandshakeInfo); when(channel.attr(any())).thenAnswer(arg -> attributeMap.attr((AttributeKey) arg.getArguments()[0])); + headers = new DefaultHttpHeaders(); when(msg.headers()).thenReturn(headers); - when(headers.get(eq(HttpHeaderNames.HOST))).thenReturn("netflix.com"); + headers.add(HttpHeaderNames.HOST, "netflix.com"); } @Test @@ -113,7 +114,7 @@ public void allow_mtls_cert() throws Exception { } @Test - public void blacklist_noMatch() throws Exception { + public void blacklist_noMatch() { StripUntrustedProxyHeadersHandler stripHandler = getHandler(AllowWhen.MUTUAL_SSL_AUTH); stripHandler.checkBlacklist(msg, ImmutableList.of("netflix.net")); @@ -122,7 +123,7 @@ public void blacklist_noMatch() throws Exception { } @Test - public void blacklist_match() throws Exception { + public void blacklist_match() { StripUntrustedProxyHeadersHandler stripHandler = getHandler(AllowWhen.MUTUAL_SSL_AUTH); stripHandler.checkBlacklist(msg, ImmutableList.of("netflix.com")); @@ -130,6 +131,16 @@ public void blacklist_match() throws Exception { verify(stripHandler).stripXFFHeaders(any()); } + @Test + public void strip_match() { + StripUntrustedProxyHeadersHandler stripHandler = getHandler(AllowWhen.MUTUAL_SSL_AUTH); + + headers.add("x-forwarded-for", "abcd"); + stripHandler.stripXFFHeaders(msg); + + assertFalse(headers.contains("x-forwarded-for")); + } + private StripUntrustedProxyHeadersHandler getHandler(AllowWhen allowWhen) { return spy(new StripUntrustedProxyHeadersHandler(allowWhen)); } From b33e5e20663f23aafdd4e71ba88dfb8d3ddea66e Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Thu, 28 May 2020 12:10:04 -0700 Subject: [PATCH 078/273] replace lowercase with equalsIgnoreCase --- .../common/proxyprotocol/StripUntrustedProxyHeadersHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandler.java index 3aadb036..c76eb606 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandler.java @@ -118,7 +118,7 @@ void stripXFFHeaders(HttpRequest req) @VisibleForTesting void checkBlacklist(HttpRequest req, List blacklist) { // blacklist headers from - if (blacklist.contains(req.headers().get(HttpHeaderNames.HOST).toLowerCase())) { + if (blacklist.stream().anyMatch(h -> h.equalsIgnoreCase(req.headers().get(HttpHeaderNames.HOST)))) { stripXFFHeaders(req); } } From 53e4ab07e0116fbb383a1388d26d7fb49701488c Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Thu, 28 May 2020 13:11:16 -0700 Subject: [PATCH 079/273] casing test --- .../StripUntrustedProxyHeadersHandlerTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java index a379243f..79a1ec6a 100644 --- a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/StripUntrustedProxyHeadersHandlerTest.java @@ -131,6 +131,15 @@ public void blacklist_match() { verify(stripHandler).stripXFFHeaders(any()); } + @Test + public void blacklist_match_casing() { + StripUntrustedProxyHeadersHandler stripHandler = getHandler(AllowWhen.MUTUAL_SSL_AUTH); + + stripHandler.checkBlacklist(msg, ImmutableList.of("NeTfLiX.cOm")); + + verify(stripHandler).stripXFFHeaders(any()); + } + @Test public void strip_match() { StripUntrustedProxyHeadersHandler stripHandler = getHandler(AllowWhen.MUTUAL_SSL_AUTH); From d9a45a0a8dc468c5c156fdb49338203006583f74 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Wed, 10 Jun 2020 09:38:12 -0700 Subject: [PATCH 080/273] Add counter to track HAPM decode failures when proxy protocol is enabled --- .../ElbProxyProtocolChannelHandler.java | 14 ++++- .../server/BaseZuulChannelInitializer.java | 2 +- .../ElbProxyProtocolChannelHandlerTest.java | 52 +++++++++++++++---- 3 files changed, 56 insertions(+), 12 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java index 81699e1a..59ec25e1 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java @@ -16,12 +16,16 @@ package com.netflix.netty.common.proxyprotocol; +import static com.google.common.base.Preconditions.checkNotNull; +import com.netflix.spectator.api.Counter; +import com.netflix.spectator.api.Registry; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.channel.ChannelPipeline; import io.netty.handler.codec.ProtocolDetectionState; import io.netty.handler.codec.haproxy.HAProxyMessageDecoder; +import javax.annotation.Nullable; /** * Decides if we need to decode a HAProxyMessage. If so, adds the decoder followed by the handler. @@ -31,9 +35,13 @@ public final class ElbProxyProtocolChannelHandler extends ChannelInboundHandlerA public static final String NAME = ElbProxyProtocolChannelHandler.class.getSimpleName(); private final boolean withProxyProtocol; + private final Registry spectatorRegistry; + private final Counter hapmDecodeFailure; - public ElbProxyProtocolChannelHandler(boolean withProxyProtocol) { + public ElbProxyProtocolChannelHandler(@Nullable Registry registry, boolean withProxyProtocol) { this.withProxyProtocol = withProxyProtocol; + this.spectatorRegistry = checkNotNull(registry); + this.hapmDecodeFailure = spectatorRegistry.counter("zuul.hapm.failure"); } public void addProxyProtocol(ChannelPipeline pipeline) { @@ -46,6 +54,10 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception ctx.pipeline().addAfter(NAME, null, new HAProxyMessageChannelHandler()) .replace(this, null, new HAProxyMessageDecoder()); } else { + if (withProxyProtocol) { + // This likely means initialization was requested with proxy protocol, but we failed to decode the message + hapmDecodeFailure.increment(); + } ctx.pipeline().remove(this); } super.channelRead(ctx, msg); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java index 70b5b732..29da4e34 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java @@ -235,7 +235,7 @@ protected void addTcpRelatedHandlers(ChannelPipeline pipeline) pipeline.addLast("channelMetrics", channelMetrics); pipeline.addLast(perEventLoopConnectionMetricsHandler); - new ElbProxyProtocolChannelHandler(withProxyProtocol).addProxyProtocol(pipeline); + new ElbProxyProtocolChannelHandler(registry, withProxyProtocol).addProxyProtocol(pipeline); pipeline.addLast(maxConnectionsHandler); } diff --git a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java index 9ad0a168..1f121e53 100644 --- a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java @@ -20,9 +20,13 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; import com.google.common.net.InetAddresses; import com.netflix.netty.common.SourceAddressChannelHandler; +import com.netflix.spectator.api.Counter; +import com.netflix.spectator.api.Registry; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufUtil; import io.netty.buffer.Unpooled; @@ -31,18 +35,30 @@ import io.netty.handler.codec.haproxy.HAProxyProtocolVersion; import java.net.InetSocketAddress; import java.nio.charset.StandardCharsets; +import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; -@RunWith(JUnit4.class) +@RunWith(MockitoJUnitRunner.class) public class ElbProxyProtocolChannelHandlerTest { + + @Mock + private Registry registry; + @Mock + private Counter counter; + + @Before + public void setup() { + when(registry.counter("zuul.hapm.failure")).thenReturn(counter); + } @Test public void noProxy() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(false)); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, false)); ByteBuf buf = Unpooled.wrappedBuffer( "PROXY TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf); @@ -66,7 +82,7 @@ public void noProxy() { @Test public void extraDataForwarded() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(true)); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); ByteBuf buf = Unpooled.wrappedBuffer( "PROXY TCP4 192.168.0.1 124.123.111.111 10008 443\r\nPOTATO".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf); @@ -82,7 +98,7 @@ public void extraDataForwarded() { @Test public void passThrough_ProxyProtocolEnabled_nonProxyBytes() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(true)); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); //Note that the bytes aren't prefixed by PROXY, as required by the spec ByteBuf buf = Unpooled.wrappedBuffer( "TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); @@ -104,11 +120,27 @@ public void passThrough_ProxyProtocolEnabled_nonProxyBytes() { assertNull(channel.attr(SourceAddressChannelHandler.ATTR_REMOTE_ADDR).get()); } + @Test + public void incrementCounterWhenPPEnabledButNonHAPMMessage() { + EmbeddedChannel channel = new EmbeddedChannel(); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); + //Note that the bytes aren't prefixed by PROXY, as required by the spec + ByteBuf buf = Unpooled.wrappedBuffer( + "TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); + channel.writeInbound(buf); + + Object dropped = channel.readInbound(); + assertEquals(dropped, buf); + buf.release(); + + verify(counter, times(1)).increment(); + } + @Ignore @Test public void detectsSplitPpv1Message() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(true)); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); ByteBuf buf1 = Unpooled.wrappedBuffer( "PROXY TCP4".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf1); @@ -129,7 +161,7 @@ public void detectsSplitPpv1Message() { @Test public void negotiateProxy_ppv1_ipv4() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(true)); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); ByteBuf buf = Unpooled.wrappedBuffer( "PROXY TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf); @@ -159,7 +191,7 @@ public void negotiateProxy_ppv1_ipv4() { @Test public void negotiateProxy_ppv1_ipv6() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(true)); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); ByteBuf buf = Unpooled.wrappedBuffer( "PROXY TCP6 ::1 ::2 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf); @@ -189,7 +221,7 @@ public void negotiateProxy_ppv1_ipv6() { @Test public void negotiateProxy_ppv2_ipv4() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(true)); + channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); ByteBuf buf = Unpooled.wrappedBuffer( new byte[]{0x0D, 0x0A, 0x0D, 0x0A, 0x00, 0x0D, 0x0A, 0x51, 0x55, 0x49, 0x54, 0x0A, 0x21, 0x11, 0x00, 0x0C, (byte) 0xC0, (byte) 0xA8, 0x00, 0x01, 0x7C, 0x7B, 0x6F, 0x6F, 0x27, 0x18, 0x01, From 1023d4f817f5e2475b95530e015400ae420f1f3e Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 11 Jun 2020 11:35:09 -0700 Subject: [PATCH 081/273] zuul-core: minor clean up of SSL metrics --- .../zuul/netty/ssl/BaseSslContextFactory.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java b/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java index e08309ef..f4ff4445 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java @@ -20,6 +20,7 @@ import com.netflix.netty.common.ssl.ServerSslConfig; import com.netflix.spectator.api.Id; import com.netflix.spectator.api.Registry; +import com.netflix.spectator.api.patterns.PolledMeter; import io.netty.handler.ssl.CipherSuiteFilter; import io.netty.handler.ssl.ClientAuth; import io.netty.handler.ssl.OpenSsl; @@ -42,6 +43,7 @@ import java.util.Base64; import java.util.Enumeration; import java.util.List; +import java.util.Objects; import java.util.function.ToDoubleFunction; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -54,7 +56,8 @@ public class BaseSslContextFactory implements SslContextFactory { private static final Logger LOG = LoggerFactory.getLogger(BaseSslContextFactory.class); - private static final DynamicBooleanProperty ALLOW_USE_OPENSSL = new DynamicBooleanProperty("zuul.ssl.openssl.allow", true); + private static final DynamicBooleanProperty ALLOW_USE_OPENSSL = + new DynamicBooleanProperty("zuul.ssl.openssl.allow", true); static { // Install BouncyCastle provider. @@ -65,8 +68,8 @@ public class BaseSslContextFactory implements SslContextFactory { protected final ServerSslConfig serverSslConfig; public BaseSslContextFactory(Registry spectatorRegistry, ServerSslConfig serverSslConfig) { - this.spectatorRegistry = spectatorRegistry; - this.serverSslConfig = serverSslConfig; + this.spectatorRegistry = Objects.requireNonNull(spectatorRegistry); + this.serverSslConfig = Objects.requireNonNull(serverSslConfig); } @Override @@ -76,7 +79,7 @@ public SslContextBuilder createBuilderForServer() { SslProvider sslProvider = chooseSslProvider(); LOG.debug( - "Using SslProvider of type {} for certChainFile {}", + "Using SslProvider of type {} for certChainFile {}", sslProvider.name(), serverSslConfig.getCertChainFile()); @@ -130,9 +133,11 @@ public void configureOpenSslStatsMetrics(SslContext sslContext, String sslContex } } - private void openSslStatGauge(OpenSslSessionStats stats, String sslContextId, String statName, ToDoubleFunction value) { + private void openSslStatGauge( + OpenSslSessionStats stats, String sslContextId, String statName, + ToDoubleFunction value) { Id id = spectatorRegistry.createId("server.ssl.stats", "id", sslContextId, "stat", statName); - spectatorRegistry.gauge(id, stats, value); + PolledMeter.using(spectatorRegistry).withId(id).monitorValue(stats, value); LOG.debug("Registered spectator gauge - " + id.name()); } From ce79b07e6bfa5a41c92e7edd8be4739eb12bcc72 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 11 Jun 2020 15:20:36 -0700 Subject: [PATCH 082/273] zuul-core: use async mapping for SNI handling --- .../channel/config/CommonChannelConfigKeys.java | 4 ++-- .../netflix/zuul/netty/server/BaseServerStartup.java | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/channel/config/CommonChannelConfigKeys.java b/zuul-core/src/main/java/com/netflix/netty/common/channel/config/CommonChannelConfigKeys.java index 81d6bc24..9a2be27c 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/channel/config/CommonChannelConfigKeys.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/channel/config/CommonChannelConfigKeys.java @@ -21,7 +21,7 @@ import com.netflix.zuul.netty.server.ServerTimeout; import com.netflix.zuul.netty.ssl.SslContextFactory; import io.netty.handler.ssl.SslContext; -import io.netty.util.DomainNameMapping; +import io.netty.util.AsyncMapping; /** * User: michaels@netflix.com @@ -51,7 +51,7 @@ public class CommonChannelConfigKeys public static final ChannelConfigKey isSSlFromIntermediary = new ChannelConfigKey<>("isSSlFromIntermediary", false); public static final ChannelConfigKey serverSslConfig = new ChannelConfigKey<>("serverSslConfig"); public static final ChannelConfigKey sslContextFactory = new ChannelConfigKey<>("sslContextFactory"); - public static final ChannelConfigKey> sniMapping = new ChannelConfigKey<>("sniMapping"); + public static final ChannelConfigKey> sniMapping = new ChannelConfigKey<>("sniMapping"); // HTTP/2 specific: public static final ChannelConfigKey maxConcurrentStreams = new ChannelConfigKey<>("maxConcurrentStreams", 100); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java index acdef6f1..9e2303ee 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java @@ -41,7 +41,7 @@ import io.netty.channel.group.ChannelGroup; import io.netty.channel.group.DefaultChannelGroup; import io.netty.handler.ssl.SslContext; -import io.netty.util.DomainNameMapping; +import io.netty.util.AsyncMapping; import io.netty.util.concurrent.GlobalEventExecutor; import java.net.InetSocketAddress; import java.net.SocketAddress; @@ -291,10 +291,10 @@ protected void logPortConfigured(int port, ServerSslConfig serverSslConfig) { // TODO(carl-mastrangelo): remove this after 2.1.7 /** - * Use {@link #logAddrConfigured(SocketAddress, DomainNameMapping)} instead. + * Use {@link #logAddrConfigured(SocketAddress, AsyncMapping)} instead. */ @Deprecated - protected void logPortConfigured(int port, DomainNameMapping sniMapping) { + protected void logPortConfigured(int port, AsyncMapping sniMapping) { logAddrConfigured(new InetSocketAddress(port), sniMapping); } @@ -310,10 +310,11 @@ protected final void logAddrConfigured(SocketAddress socketAddress, @Nullable Se LOG.info(msg); } - protected final void logAddrConfigured(SocketAddress socketAddress, @Nullable DomainNameMapping sniMapping) { + protected final void logAddrConfigured( + SocketAddress socketAddress, @Nullable AsyncMapping sniMapping) { String msg = "Configured address: " + socketAddress; if (sniMapping != null) { - msg = msg + " with SNI config: " + sniMapping.asMap(); + msg = msg + " with SNI config: " + sniMapping; } LOG.info(msg); } From c68f98c90ef75a16baa8609495940c5143b90fd7 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 15 Jun 2020 10:36:31 -0700 Subject: [PATCH 083/273] zuul-core: allow overriding the keymaterial setup of BaseSslContextBuilder --- .../zuul/netty/ssl/BaseSslContextFactory.java | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java b/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java index f4ff4445..af5dea87 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/ssl/BaseSslContextFactory.java @@ -16,6 +16,7 @@ package com.netflix.zuul.netty.ssl; +import com.google.errorprone.annotations.ForOverride; import com.netflix.config.DynamicBooleanProperty; import com.netflix.netty.common.ssl.ServerSslConfig; import com.netflix.spectator.api.Id; @@ -31,6 +32,7 @@ import io.netty.handler.ssl.SslProvider; import io.netty.handler.ssl.SupportedCipherSuiteFilter; import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; @@ -78,15 +80,9 @@ public SslContextBuilder createBuilderForServer() { ArrayList trustedCerts = getTrustedX509Certificates(); SslProvider sslProvider = chooseSslProvider(); - LOG.debug( - "Using SslProvider of type {} for certChainFile {}", - sslProvider.name(), - serverSslConfig.getCertChainFile()); + LOG.debug("Using SslProvider of type {}", sslProvider.name()); - InputStream certChainInput = new FileInputStream(serverSslConfig.getCertChainFile()); - InputStream keyInput = getKeyInputStream(); - - SslContextBuilder builder = SslContextBuilder.forServer(certChainInput, keyInput) + SslContextBuilder builder = newBuilderForServer() .ciphers(getCiphers(), getCiphersFilter()) .sessionTimeout(serverSslConfig.getSessionTimeout()) .sslProvider(sslProvider); @@ -104,6 +100,19 @@ public SslContextBuilder createBuilderForServer() { } } + /** + * This function is meant to call the correct overload of {@code SslContextBuilder.forServer()}. It should not + * apply any other customization. + */ + @ForOverride + protected SslContextBuilder newBuilderForServer() throws IOException { + LOG.debug("Using certChainFile {}", serverSslConfig.getCertChainFile()); + try (InputStream keyInput = getKeyInputStream(); + InputStream certChainInput = new FileInputStream(serverSslConfig.getCertChainFile())) { + return SslContextBuilder.forServer(certChainInput, keyInput); + } + } + @Override public void enableSessionTickets(SslContext sslContext) { // TODO @@ -173,7 +182,7 @@ protected CipherSuiteFilter getCiphersFilter() { protected ArrayList getTrustedX509Certificates() throws CertificateException, IOException, KeyStoreException, NoSuchAlgorithmException { ArrayList trustedCerts = new ArrayList<>(); - // Add the certifcates from the JKS truststore - ie. the CA's of the client cert that peer Zuul's will use. + // Add the certificates from the JKS truststore - ie. the CA's of the client cert that peer Zuul's will use. if (serverSslConfig.getClientAuth() == ClientAuth.REQUIRE || serverSslConfig.getClientAuth() == ClientAuth.OPTIONAL) { // Get the encrypted bytes of the truststore password. byte[] trustStorePwdBytes; From e6da17e79a02df673236cbdc528a832bc1f56e81 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 16 Jun 2020 09:19:31 -0700 Subject: [PATCH 084/273] zuul-core: remove references to metatron in ssl config --- .../netty/common/ssl/ServerSslConfig.java | 82 ++++--------------- .../zuul/netty/server/BaseServerStartup.java | 4 + .../zuul/sample/SampleServerStartup.java | 1 - 3 files changed, 18 insertions(+), 69 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/ssl/ServerSslConfig.java b/zuul-core/src/main/java/com/netflix/netty/common/ssl/ServerSslConfig.java index 3a1b63b1..093c22ef 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/ssl/ServerSslConfig.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/ssl/ServerSslConfig.java @@ -18,21 +18,19 @@ import com.netflix.config.DynamicLongProperty; import io.netty.handler.ssl.ClientAuth; - -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSocketFactory; import java.io.File; import java.security.NoSuchAlgorithmException; import java.util.Arrays; import java.util.List; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSocketFactory; /** * User: michaels@netflix.com * Date: 8/16/16 * Time: 2:40 PM */ -public class ServerSslConfig -{ +public class ServerSslConfig { private static final DynamicLongProperty DEFAULT_SESSION_TIMEOUT = new DynamicLongProperty("server.ssl.session.timeout", (18 * 60)); // 18 hours @@ -58,35 +56,25 @@ public class ServerSslConfig private final String clientAuthTrustStorePassword; private final File clientAuthTrustStorePasswordFile; - private final boolean decryptKeyUsingMetatronPolicy; - private final boolean decryptKeyUsingMetatronBundle; - private final byte[] metatronPolicy; - private final long sessionTimeout; private final boolean sessionTicketsEnabled; - public ServerSslConfig(String[] protocols, String[] ciphers, File certChainFile, File keyFile) - { - this(protocols, ciphers, certChainFile, keyFile, null, ClientAuth.NONE, null, (File) null, false); + public ServerSslConfig(String[] protocols, String[] ciphers, File certChainFile, File keyFile) { + this(protocols, ciphers, certChainFile, keyFile, ClientAuth.NONE, null, (File) null, false); } - public ServerSslConfig(String[] protocols, String[] ciphers, File certChainFile, File keyFile, byte[] metatronPolicy, ClientAuth clientAuth) - { - this(protocols, ciphers, certChainFile, keyFile, metatronPolicy, clientAuth, null, (File) null, true); + public ServerSslConfig( + String[] protocols, String[] ciphers, File certChainFile, File keyFile, ClientAuth clientAuth) { + this(protocols, ciphers, certChainFile, keyFile, clientAuth, null, (File) null, true); } - public ServerSslConfig(String[] protocols, String[] ciphers, File certChainFile, File keyFile, - byte[] metatronPolicy, - ClientAuth clientAuth, File clientAuthTrustStoreFile, File clientAuthTrustStorePasswordFile, - boolean sessionTicketsEnabled) - { + public ServerSslConfig( + String[] protocols, String[] ciphers, File certChainFile, File keyFile, ClientAuth clientAuth, + File clientAuthTrustStoreFile, File clientAuthTrustStorePasswordFile, boolean sessionTicketsEnabled) { this.protocols = protocols; this.ciphers = ciphers != null ? Arrays.asList(ciphers) : null; this.certChainFile = certChainFile; this.keyFile = keyFile; - this.decryptKeyUsingMetatronPolicy = (metatronPolicy != null); - this.decryptKeyUsingMetatronBundle = false; - this.metatronPolicy = metatronPolicy; this.clientAuth = clientAuth; this.clientAuthTrustStoreFile = clientAuthTrustStoreFile; this.clientAuthTrustStorePassword = null; @@ -95,38 +83,13 @@ public ServerSslConfig(String[] protocols, String[] ciphers, File certChainFile, this.sessionTicketsEnabled = sessionTicketsEnabled; } - public ServerSslConfig(String[] protocols, String[] ciphers, File certChainFile, File keyFile, - byte[] metatronPolicy, - ClientAuth clientAuth, File clientAuthTrustStoreFile, String clientAuthTrustStorePassword, - boolean sessionTicketsEnabled) - { - this.protocols = protocols; - this.ciphers = Arrays.asList(ciphers); - this.certChainFile = certChainFile; - this.keyFile = keyFile; - this.decryptKeyUsingMetatronPolicy = (metatronPolicy != null); - this.decryptKeyUsingMetatronBundle = false; - this.metatronPolicy = metatronPolicy; - this.clientAuth = clientAuth; - this.clientAuthTrustStoreFile = clientAuthTrustStoreFile; - this.clientAuthTrustStorePassword = clientAuthTrustStorePassword; - this.clientAuthTrustStorePasswordFile = null; - this.sessionTimeout = DEFAULT_SESSION_TIMEOUT.get(); - this.sessionTicketsEnabled = sessionTicketsEnabled; - } - - public ServerSslConfig(String[] protocols, String[] ciphers, File certChainFile, File keyFile, - boolean metatronBundle, - ClientAuth clientAuth, File clientAuthTrustStoreFile, String clientAuthTrustStorePassword, - boolean sessionTicketsEnabled) - { + public ServerSslConfig( + String[] protocols, String[] ciphers, File certChainFile, File keyFile, ClientAuth clientAuth, + File clientAuthTrustStoreFile, String clientAuthTrustStorePassword, boolean sessionTicketsEnabled) { this.protocols = protocols; this.ciphers = Arrays.asList(ciphers); this.certChainFile = certChainFile; this.keyFile = keyFile; - this.decryptKeyUsingMetatronBundle = metatronBundle; - this.decryptKeyUsingMetatronPolicy = false; - this.metatronPolicy = null; this.clientAuth = clientAuth; this.clientAuthTrustStoreFile = clientAuthTrustStoreFile; this.clientAuthTrustStorePassword = clientAuthTrustStorePassword; @@ -165,21 +128,6 @@ public File getKeyFile() return keyFile; } - public boolean shouldDecryptKeyUsingMetatronPolicy() - { - return decryptKeyUsingMetatronPolicy; - } - - public boolean shouldDecryptKeyUsingMetatronBundle() - { - return decryptKeyUsingMetatronBundle; - } - - public byte[] getMetatronPolicyFile() - { - return metatronPolicy; - } - public ClientAuth getClientAuth() { return clientAuth; @@ -220,8 +168,6 @@ public String toString() ", keyFile=" + keyFile + ", clientAuth=" + clientAuth + ", clientAuthTrustStoreFile=" + clientAuthTrustStoreFile + - ", decryptKeyUsingMetatronPolicy=" + decryptKeyUsingMetatronPolicy + - ", decryptKeyUsingMetatronBundle=" + decryptKeyUsingMetatronBundle + ", sessionTimeout=" + sessionTimeout + ", sessionTicketsEnabled=" + sessionTicketsEnabled + '}'; diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java index 9e2303ee..14899a7a 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java @@ -318,4 +318,8 @@ protected final void logAddrConfigured( } LOG.info(msg); } + + protected final void logSecureAddrConfigured(SocketAddress socketAddress, @Nullable Object securityConfig) { + LOG.info("Configured address: {} with security config {}", socketAddress, securityConfig); + } } diff --git a/zuul-sample/src/main/java/com/netflix/zuul/sample/SampleServerStartup.java b/zuul-sample/src/main/java/com/netflix/zuul/sample/SampleServerStartup.java index 7a13284a..cb894ec9 100644 --- a/zuul-sample/src/main/java/com/netflix/zuul/sample/SampleServerStartup.java +++ b/zuul-sample/src/main/java/com/netflix/zuul/sample/SampleServerStartup.java @@ -173,7 +173,6 @@ protected Map> chooseAddrsAndChannels(Chann ServerSslConfig.getDefaultCiphers(), loadFromResources("server.cert"), loadFromResources("server.key"), - null, ClientAuth.REQUIRE, loadFromResources("truststore.jks"), loadFromResources("truststore.key"), From 4bfdd88229346914aba97300ce679932f9a5730c Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 16 Jun 2020 10:09:27 -0700 Subject: [PATCH 085/273] zuul-core: avoid servo in RouteStatusCodeMonitor --- .../zuul/stats/RouteStatusCodeMonitor.java | 55 +++++++++---------- .../zuul/stats/monitoring/NamedCount.java | 6 +- .../stats/RouteStatusCodeMonitorTest.java | 8 +-- 3 files changed, 33 insertions(+), 36 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/stats/RouteStatusCodeMonitor.java b/zuul-core/src/main/java/com/netflix/zuul/stats/RouteStatusCodeMonitor.java index ae559ee5..55543ef2 100755 --- a/zuul-core/src/main/java/com/netflix/zuul/stats/RouteStatusCodeMonitor.java +++ b/zuul-core/src/main/java/com/netflix/zuul/stats/RouteStatusCodeMonitor.java @@ -16,15 +16,13 @@ package com.netflix.zuul.stats; import com.google.common.annotations.VisibleForTesting; -import com.netflix.servo.annotations.DataSourceType; -import com.netflix.servo.annotations.Monitor; -import com.netflix.servo.annotations.MonitorTags; -import com.netflix.servo.tag.BasicTag; -import com.netflix.servo.tag.BasicTagList; -import com.netflix.servo.tag.TagList; +import com.netflix.spectator.api.Registry; +import com.netflix.spectator.api.Spectator; +import com.netflix.spectator.api.patterns.PolledMeter; import com.netflix.zuul.stats.monitoring.NamedCount; - +import java.util.Objects; import java.util.concurrent.atomic.AtomicLong; +import javax.annotation.Nullable; /** * counter for per route/status code counting @@ -33,27 +31,24 @@ * Time: 3:04 PM */ public class RouteStatusCodeMonitor implements NamedCount { - - @MonitorTags - TagList tagList; - - - String route_code; - - String route; - int status_code; - - @Monitor(name = "count", type = DataSourceType.COUNTER) + private final String routeCode; @VisibleForTesting - final AtomicLong count = new AtomicLong(); + final String route; + private final int statusCode; + private final AtomicLong count = new AtomicLong(); - public RouteStatusCodeMonitor(String route, int status_code) { - if(route == null) route = ""; + public RouteStatusCodeMonitor(@Nullable String route, int statusCode) { + if (route == null) { + route = ""; + } this.route = route; - this.status_code = status_code; - route_code = route + "_" + status_code; - tagList = BasicTagList.of(new BasicTag("ID", route_code)); + this.statusCode = statusCode; + this.routeCode = route + "_" + statusCode; + Registry registry = Spectator.globalRegistry(); + PolledMeter.using(registry) + .withId(registry.createId("zuul.RouteStatusCodeMonitor", "ID", routeCode)) + .monitorValue(this, RouteStatusCodeMonitor::getCount); } @Override @@ -63,8 +58,12 @@ public boolean equals(Object o) { RouteStatusCodeMonitor statsData = (RouteStatusCodeMonitor) o; - if (status_code != statsData.status_code) return false; - if (route != null ? !route.equals(statsData.route) : statsData.route != null) return false; + if (statusCode != statsData.statusCode) { + return false; + } + if (!Objects.equals(route, statsData.route)) { + return false; + } return true; } @@ -72,13 +71,13 @@ public boolean equals(Object o) { @Override public int hashCode() { int result = route != null ? route.hashCode() : 0; - result = 31 * result + status_code; + result = 31 * result + statusCode; return result; } @Override public String getName() { - return route_code; + return routeCode; } public long getCount() { diff --git a/zuul-core/src/main/java/com/netflix/zuul/stats/monitoring/NamedCount.java b/zuul-core/src/main/java/com/netflix/zuul/stats/monitoring/NamedCount.java index 3cc87c8c..c389971a 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/stats/monitoring/NamedCount.java +++ b/zuul-core/src/main/java/com/netflix/zuul/stats/monitoring/NamedCount.java @@ -22,8 +22,6 @@ * Time: 4:33 PM */ public interface NamedCount { - - public String getName(); - public long getCount(); - + String getName(); + long getCount(); } diff --git a/zuul-core/src/test/java/com/netflix/zuul/stats/RouteStatusCodeMonitorTest.java b/zuul-core/src/test/java/com/netflix/zuul/stats/RouteStatusCodeMonitorTest.java index 4a2fc537..48d28076 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/stats/RouteStatusCodeMonitorTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/stats/RouteStatusCodeMonitorTest.java @@ -22,21 +22,21 @@ import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; +import org.junit.runners.JUnit4; /** * Unit tests for {@link RouteStatusCodeMonitor}. */ -@RunWith(MockitoJUnitRunner.class) +@RunWith(JUnit4.class) public class RouteStatusCodeMonitorTest { @Test public void testUpdateStats() { RouteStatusCodeMonitor sd = new RouteStatusCodeMonitor("test", 200); assertEquals(sd.route, "test"); sd.update(); - assertEquals(sd.count.get(), 1); + assertEquals(sd.getCount(), 1); sd.update(); - assertEquals(sd.count.get(), 2); + assertEquals(sd.getCount(), 2); } @Test From adf59214b1a41e69e9dd91b92aee637596ac3ce9 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 19 Jun 2020 12:44:44 -0700 Subject: [PATCH 086/273] all: remove references to Servo --- zuul-core/build.gradle | 1 - zuul-core/dependencies.lock | 36 ++-------- .../netflix/zuul/plugins/MetricPoller.java | 67 ------------------- .../java/com/netflix/zuul/plugins/Tracer.java | 51 +++++++------- .../stats/BasicRequestMetricsPublisher.java | 6 +- .../netflix/zuul/stats/ErrorStatsData.java | 41 +++++------- .../zuul/stats/NamedCountingMonitor.java | 17 ++--- .../zuul/stats/ErrorStatsDataTest.java | 5 +- .../zuul/stats/ErrorStatsManagerTest.java | 4 +- zuul-groovy/build.gradle | 1 + zuul-groovy/dependencies.lock | 63 ++++++----------- .../zuul/scriptManager/FilterInfo.java | 2 +- zuul-guice/dependencies.lock | 42 +----------- zuul-processor/dependencies.lock | 50 ++------------ zuul-sample/dependencies.lock | 59 +++------------- 15 files changed, 103 insertions(+), 342 deletions(-) delete mode 100644 zuul-core/src/main/java/com/netflix/zuul/plugins/MetricPoller.java diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index a80b0896..54a59c2c 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -11,7 +11,6 @@ dependencies { api 'com.fasterxml.jackson.core:jackson-databind:2.9.8' api "com.netflix.archaius:archaius-core:0.7.5" - api "com.netflix.servo:servo-core:0.7.2" api "com.netflix.spectator:spectator-api:0.103.0" api "com.netflix.netflix-commons:netflix-commons-util:0.3.0" diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 2d994b39..2fdf746b 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -44,10 +44,6 @@ "locked": "2.7.17", "requested": "2.7.17" }, - "com.netflix.servo:servo-core": { - "locked": "0.7.2", - "requested": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "locked": "0.103.0", "requested": "0.103.0" @@ -101,7 +97,7 @@ "requested": "1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.65", + "locked": "1.65.01", "requested": "1.+" }, "org.slf4j:slf4j-api": { @@ -167,10 +163,6 @@ "locked": "2.7.17", "requested": "2.7.17" }, - "com.netflix.servo:servo-core": { - "locked": "0.7.2", - "requested": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "locked": "0.103.0", "requested": "0.103.0" @@ -224,7 +216,7 @@ "requested": "1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.65", + "locked": "1.65.01", "requested": "1.+" }, "org.openjdk.jmh:jmh-core": { @@ -293,10 +285,6 @@ "locked": "2.7.17", "requested": "2.7.17" }, - "com.netflix.servo:servo-core": { - "locked": "0.12.21", - "requested": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "locked": "0.103.0", "requested": "0.103.0" @@ -358,7 +346,7 @@ "requested": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.65", + "locked": "1.65.01", "requested": "1.+" }, "org.mockito:mockito-core": { @@ -431,10 +419,6 @@ "locked": "2.7.17", "requested": "2.7.17" }, - "com.netflix.servo:servo-core": { - "locked": "0.12.21", - "requested": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "locked": "0.103.0", "requested": "0.103.0" @@ -492,7 +476,7 @@ "requested": "1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.65", + "locked": "1.65.01", "requested": "1.+" }, "org.slf4j:slf4j-api": { @@ -549,10 +533,6 @@ "locked": "2.7.17", "requested": "2.7.17" }, - "com.netflix.servo:servo-core": { - "locked": "0.7.2", - "requested": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "locked": "0.103.0", "requested": "0.103.0" @@ -610,7 +590,7 @@ "requested": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.65", + "locked": "1.65.01", "requested": "1.+" }, "org.mockito:mockito-core": { @@ -671,10 +651,6 @@ "locked": "2.7.17", "requested": "2.7.17" }, - "com.netflix.servo:servo-core": { - "locked": "0.12.21", - "requested": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "locked": "0.103.0", "requested": "0.103.0" @@ -736,7 +712,7 @@ "requested": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.65", + "locked": "1.65.01", "requested": "1.+" }, "org.mockito:mockito-core": { diff --git a/zuul-core/src/main/java/com/netflix/zuul/plugins/MetricPoller.java b/zuul-core/src/main/java/com/netflix/zuul/plugins/MetricPoller.java deleted file mode 100644 index 4efc5e44..00000000 --- a/zuul-core/src/main/java/com/netflix/zuul/plugins/MetricPoller.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2018 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.netflix.zuul.plugins; - -import com.netflix.servo.publish.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.io.IOException; -import java.util.concurrent.TimeUnit; - -/** - * Sample poller to poll metrics using Servo's metric publication - * @author Mikey Cohen - * Date: 4/18/13 - * Time: 9:20 AM - */ -public class MetricPoller { - - private static Logger LOG = LoggerFactory.getLogger(MetricPoller.class); - - final static PollScheduler scheduler = PollScheduler.getInstance(); - - public static void startPoller(){ - scheduler.start(); - final int heartbeatInterval = 1200; - - final File metricsDir; - try { - metricsDir = File.createTempFile("zuul-servo-metrics-", ""); - metricsDir.delete(); - metricsDir.mkdir(); - } catch (IOException e) { - throw new RuntimeException(e); - } - - LOG.debug("created metrics dir " + metricsDir.getAbsolutePath()); - - MetricObserver transform = new CounterToRateMetricTransform( - new FileMetricObserver("ZuulMetrics", metricsDir), - heartbeatInterval, TimeUnit.SECONDS); - - PollRunnable task = new PollRunnable( - new MonitorRegistryMetricPoller(), - BasicMetricFilter.MATCH_ALL, - transform); - - final int samplingInterval = 10; - scheduler.addPoller(task, samplingInterval, TimeUnit.SECONDS); - - } - -} diff --git a/zuul-core/src/main/java/com/netflix/zuul/plugins/Tracer.java b/zuul-core/src/main/java/com/netflix/zuul/plugins/Tracer.java index 13b37581..bb50cfbe 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/plugins/Tracer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/plugins/Tracer.java @@ -15,15 +15,10 @@ */ package com.netflix.zuul.plugins; -import com.netflix.servo.monitor.DynamicTimer; -import com.netflix.servo.monitor.MonitorConfig; -import com.netflix.servo.monitor.Stopwatch; -import com.netflix.servo.tag.InjectableTag; -import com.netflix.servo.tag.Tag; +import com.netflix.spectator.api.Spectator; import com.netflix.zuul.monitoring.TracerFactory; - -import java.util.ArrayList; -import java.util.List; +import java.net.InetAddress; +import java.net.UnknownHostException; import java.util.concurrent.TimeUnit; /** @@ -35,37 +30,47 @@ */ public class Tracer extends TracerFactory { - static List tags = new ArrayList(2); - - static { - tags.add(InjectableTag.HOSTNAME); - tags.add(InjectableTag.IP); - } - @Override public com.netflix.zuul.monitoring.Tracer startMicroTracer(String name) { - return new ServoTracer(name); + return new SpectatorTracer(name); } - class ServoTracer implements com.netflix.zuul.monitoring.Tracer { + class SpectatorTracer implements com.netflix.zuul.monitoring.Tracer { - final MonitorConfig config; - final Stopwatch stopwatch; + private String name; + private final long start; - private ServoTracer(String name) { - config = MonitorConfig.builder(name).withTags(tags).build(); - stopwatch = DynamicTimer.start(config, TimeUnit.MICROSECONDS); + private SpectatorTracer(String name) { + this.name = name; + start = System.nanoTime(); } @Override public void stopAndLog() { - DynamicTimer.record(config, stopwatch.getDuration()); + Spectator.globalRegistry().timer(name, "hostname", getHostName(), "ip", getIp()) + .record(System.nanoTime() - start, TimeUnit.NANOSECONDS); } @Override public void setName(String name) { + this.name = name; + } + } + + private static String getHostName() { + return (loadAddress() != null) ? loadAddress().getHostName() : "unkownHost"; + } + + private static String getIp() { + return (loadAddress() != null) ? loadAddress().getHostAddress() : "unknownHost"; + } + private static InetAddress loadAddress() { + try { + return InetAddress.getLocalHost(); + } catch (UnknownHostException e) { + return null; } } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/stats/BasicRequestMetricsPublisher.java b/zuul-core/src/main/java/com/netflix/zuul/stats/BasicRequestMetricsPublisher.java index 2b8cef18..8a1cc8cf 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/stats/BasicRequestMetricsPublisher.java +++ b/zuul-core/src/main/java/com/netflix/zuul/stats/BasicRequestMetricsPublisher.java @@ -16,9 +16,9 @@ package com.netflix.zuul.stats; -import com.netflix.servo.monitor.DynamicTimer; -import com.netflix.servo.monitor.MonitorConfig; +import com.netflix.spectator.api.Spectator; import com.netflix.zuul.context.SessionContext; +import java.util.concurrent.TimeUnit; /** * User: michaels@netflix.com @@ -58,7 +58,7 @@ private void recordRequestTiming(String name, long timeNs) { long timeMs = timeNs / 1000000; if(timeMs > -1) { - DynamicTimer.record(MonitorConfig.builder(name).build(), timeMs); + Spectator.globalRegistry().timer(name).record(timeMs, TimeUnit.MILLISECONDS); } } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/stats/ErrorStatsData.java b/zuul-core/src/main/java/com/netflix/zuul/stats/ErrorStatsData.java index 99c06c83..167a0621 100755 --- a/zuul-core/src/main/java/com/netflix/zuul/stats/ErrorStatsData.java +++ b/zuul-core/src/main/java/com/netflix/zuul/stats/ErrorStatsData.java @@ -15,12 +15,9 @@ */ package com.netflix.zuul.stats; -import com.netflix.servo.annotations.DataSourceType; -import com.netflix.servo.annotations.Monitor; -import com.netflix.servo.annotations.MonitorTags; -import com.netflix.servo.tag.BasicTag; -import com.netflix.servo.tag.BasicTagList; -import com.netflix.servo.tag.TagList; +import com.netflix.spectator.api.Registry; +import com.netflix.spectator.api.Spectator; +import com.netflix.spectator.api.patterns.PolledMeter; import com.netflix.zuul.stats.monitoring.NamedCount; import java.util.concurrent.atomic.AtomicLong; @@ -32,19 +29,11 @@ * Date: 2/23/12 * Time: 4:16 PM */ -public class ErrorStatsData implements NamedCount -{ +public class ErrorStatsData implements NamedCount { + private final String id; - - String id; - - @MonitorTags - TagList tagList; - - String error_cause; - - @Monitor(name = "count", type = DataSourceType.COUNTER) - AtomicLong count = new AtomicLong(); + private final String errorCause; + private final AtomicLong count = new AtomicLong(); /** * create a counter by route and cause of error @@ -57,11 +46,11 @@ public ErrorStatsData(String route, String cause) { } id = route + "_" + cause; - this.error_cause = cause; - tagList = BasicTagList.of(new BasicTag("ID", id)); - - - + this.errorCause = cause; + Registry registry = Spectator.globalRegistry(); + PolledMeter.using(registry) + .withId(registry.createId("zuul.ErrorStatsData", "ID", id)) + .monitorValue(this, ErrorStatsData::getCount); } @Override @@ -71,13 +60,13 @@ public boolean equals(Object o) { ErrorStatsData that = (ErrorStatsData) o; - return !(error_cause != null ? !error_cause.equals(that.error_cause) : that.error_cause != null); + return !(errorCause != null ? !errorCause.equals(that.errorCause) : that.errorCause != null); } @Override public int hashCode() { - return error_cause != null ? error_cause.hashCode() : 0; + return errorCause != null ? errorCause.hashCode() : 0; } /** @@ -93,7 +82,7 @@ public String getName() { } @Override - public long getCount() { + public long getCount() { return count.get(); } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/stats/NamedCountingMonitor.java b/zuul-core/src/main/java/com/netflix/zuul/stats/NamedCountingMonitor.java index 7a6fe628..fa18374b 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/stats/NamedCountingMonitor.java +++ b/zuul-core/src/main/java/com/netflix/zuul/stats/NamedCountingMonitor.java @@ -15,11 +15,9 @@ */ package com.netflix.zuul.stats; -import com.netflix.servo.annotations.DataSourceType; -import com.netflix.servo.annotations.Monitor; -import com.netflix.servo.annotations.MonitorTags; -import com.netflix.servo.tag.BasicTagList; -import com.netflix.servo.tag.TagList; +import com.netflix.spectator.api.Registry; +import com.netflix.spectator.api.Spectator; +import com.netflix.spectator.api.patterns.PolledMeter; import com.netflix.zuul.stats.monitoring.MonitorRegistry; import com.netflix.zuul.stats.monitoring.NamedCount; @@ -35,15 +33,14 @@ public class NamedCountingMonitor implements NamedCount { private final String name; - @MonitorTags - TagList tagList; - - @Monitor(name = "count", type = DataSourceType.COUNTER) private final AtomicLong count = new AtomicLong(); public NamedCountingMonitor(String name) { this.name = name; - tagList = BasicTagList.of("ID", name); + Registry registry = Spectator.globalRegistry(); + PolledMeter.using(registry) + .withId(registry.createId("zuul.ErrorStatsData", "ID", name)) + .monitorValue(this, NamedCountingMonitor::getCount); } /** diff --git a/zuul-core/src/test/java/com/netflix/zuul/stats/ErrorStatsDataTest.java b/zuul-core/src/test/java/com/netflix/zuul/stats/ErrorStatsDataTest.java index fc1fc10f..5cdfe987 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/stats/ErrorStatsDataTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/stats/ErrorStatsDataTest.java @@ -33,11 +33,10 @@ public class ErrorStatsDataTest { @Test public void testUpdateStats() { ErrorStatsData sd = new ErrorStatsData("route", "test"); - assertEquals(sd.error_cause, "test"); sd.update(); - assertEquals(sd.count.get(), 1); + assertEquals(sd.getCount(), 1); sd.update(); - assertEquals(sd.count.get(), 2); + assertEquals(sd.getCount(), 2); } diff --git a/zuul-core/src/test/java/com/netflix/zuul/stats/ErrorStatsManagerTest.java b/zuul-core/src/test/java/com/netflix/zuul/stats/ErrorStatsManagerTest.java index 5be42b76..423d1876 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/stats/ErrorStatsManagerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/stats/ErrorStatsManagerTest.java @@ -38,9 +38,9 @@ public void testPutStats() { assertNotNull(sm.routeMap.get("test")); ConcurrentHashMap map = sm.routeMap.get("test"); ErrorStatsData sd = map.get("cause"); - assertEquals(sd.count.get(), 1); + assertEquals(sd.getCount(), 1); sm.putStats("test", "cause"); - assertEquals(sd.count.get(), 2); + assertEquals(sd.getCount(), 2); } @Test diff --git a/zuul-groovy/build.gradle b/zuul-groovy/build.gradle index 553d3cb5..beb3203e 100644 --- a/zuul-groovy/build.gradle +++ b/zuul-groovy/build.gradle @@ -1,6 +1,7 @@ apply plugin: "java-library" dependencies { + implementation libraries.guava implementation project(":zuul-core") api "org.codehaus.groovy:groovy-all:${versions_groovy}" diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index d765bc5e..de0d4f90 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -6,6 +6,10 @@ ], "locked": "2.9.8" }, + "com.google.guava:guava": { + "locked": "29.0-jre", + "requested": "29.0-jre" + }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -54,12 +58,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -137,6 +135,10 @@ ], "locked": "2.9.8" }, + "com.google.guava:guava": { + "locked": "29.0-jre", + "requested": "29.0-jre" + }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -185,12 +187,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -278,7 +274,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "29.0-jre" + "locked": "29.0-jre", + "requested": "29.0-jre" }, "com.google.truth:truth": { "locked": "1.0.1", @@ -332,12 +329,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.12.21" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -433,7 +424,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65" + "locked": "1.65.01" }, "org.codehaus.groovy:groovy-all": { "locked": "3.0.3", @@ -475,7 +466,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "29.0-jre" + "locked": "29.0-jre", + "requested": "29.0-jre" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -525,12 +517,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.12.21" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -622,7 +608,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65" + "locked": "1.65.01" }, "org.codehaus.groovy:groovy-all": { "locked": "3.0.3", @@ -642,6 +628,10 @@ ], "locked": "2.9.8" }, + "com.google.guava:guava": { + "locked": "29.0-jre", + "requested": "29.0-jre" + }, "com.google.truth:truth": { "locked": "1.0.1", "requested": "1.0.1" @@ -694,12 +684,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -787,7 +771,8 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "29.0-jre" + "locked": "29.0-jre", + "requested": "29.0-jre" }, "com.google.truth:truth": { "locked": "1.0.1", @@ -841,12 +826,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.12.21" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -942,7 +921,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65" + "locked": "1.65.01" }, "org.codehaus.groovy:groovy-all": { "locked": "3.0.3", diff --git a/zuul-groovy/src/main/java/com/netflix/zuul/scriptManager/FilterInfo.java b/zuul-groovy/src/main/java/com/netflix/zuul/scriptManager/FilterInfo.java index 67f09194..90009f31 100644 --- a/zuul-groovy/src/main/java/com/netflix/zuul/scriptManager/FilterInfo.java +++ b/zuul-groovy/src/main/java/com/netflix/zuul/scriptManager/FilterInfo.java @@ -16,10 +16,10 @@ package com.netflix.zuul.scriptManager; import com.netflix.zuul.filters.FilterType; -import net.jcip.annotations.ThreadSafe; import java.util.Date; import java.util.concurrent.atomic.AtomicBoolean; +import javax.annotation.concurrent.ThreadSafe; /** * Representation of a ZuulFilter for representing and storing in a database diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 32492c3b..c0326c67 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -58,12 +58,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -193,12 +187,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -348,12 +336,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.12.21" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -453,7 +435,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65" + "locked": "1.65.01" }, "org.mockito:mockito-core": { "locked": "3.3.3", @@ -545,12 +527,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.12.21" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -646,7 +622,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65" + "locked": "1.65.01" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -722,12 +698,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -877,12 +847,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.12.21" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -982,7 +946,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65" + "locked": "1.65.01" }, "org.mockito:mockito-core": { "locked": "3.3.3", diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 23a726c2..127ce472 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -58,12 +58,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -189,12 +183,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -333,12 +321,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.12.21" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -434,7 +416,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65" + "locked": "1.65.01" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -519,12 +501,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.12.21" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -616,7 +592,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65" + "locked": "1.65.01" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -693,12 +669,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.12.21" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -796,7 +766,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65" + "locked": "1.65.01" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -868,12 +838,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1008,12 +972,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.12.21" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1109,7 +1067,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65" + "locked": "1.65.01" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 0bb7d540..b00b4b6a 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -67,12 +67,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.12.21" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -170,7 +164,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65" + "locked": "1.65.01" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -245,12 +239,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -399,12 +387,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -502,7 +484,8 @@ }, "com.google.guava:guava": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-groovy" ], "locked": "29.0-jre" }, @@ -565,12 +548,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.12.21" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -687,7 +664,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65" + "locked": "1.65.01" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -725,7 +702,8 @@ }, "com.google.guava:guava": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-groovy" ], "locked": "29.0-jre" }, @@ -788,12 +766,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.12.21" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -910,7 +882,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65" + "locked": "1.65.01" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -991,12 +963,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.7.2" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1086,7 +1052,8 @@ }, "com.google.guava:guava": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-groovy" ], "locked": "29.0-jre" }, @@ -1149,12 +1116,6 @@ ], "locked": "2.7.17" }, - "com.netflix.servo:servo-core": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "0.12.21" - }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1271,7 +1232,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65" + "locked": "1.65.01" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ From 05dfa7342a1d3acc74d63303152c248bfca1ca88 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Thu, 25 Jun 2020 09:40:10 -0700 Subject: [PATCH 087/273] zuul-core: Add utility for case insensitive lookup of a query param --- .../zuul/message/http/HttpQueryParams.java | 9 +++++++ .../message/http/HttpQueryParamsTest.java | 24 +++++++++++++++---- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java index 1b684144..0f087708 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java @@ -26,6 +26,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.StringTokenizer; @@ -129,6 +130,14 @@ public boolean contains(String name) return delegate.containsKey(name); } + /** + * Per https://tools.ietf.org/html/rfc3986#page-11, query params are to be treated as case sensitive. + * However, as an utility, this exists to allow us to do a case insensitive match on demand. + */ + public boolean containsIgnoreCase(String name) { + return delegate.containsKey(name) || delegate.containsKey(name.toLowerCase(Locale.ROOT)); + } + public boolean contains(String name, String value) { return delegate.containsEntry(name, value); diff --git a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpQueryParamsTest.java b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpQueryParamsTest.java index cb79037b..304dadd5 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpQueryParamsTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpQueryParamsTest.java @@ -17,8 +17,12 @@ package com.netflix.zuul.message.http; +import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import com.google.common.truth.Truth; +import java.util.Locale; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; @@ -72,7 +76,7 @@ public void testEquals() { } @Test - public void testParseKeysWithoutValues() { + public void parseKeysWithoutValues() { HttpQueryParams expected = new HttpQueryParams(); expected.add("k1", ""); expected.add("k2", "v2"); @@ -86,7 +90,7 @@ public void testParseKeysWithoutValues() { } @Test - public void testParseKeyWithoutValueEquals() { + public void parseKeyWithoutValueEquals() { HttpQueryParams expected = new HttpQueryParams(); expected.add("k1", ""); @@ -98,7 +102,7 @@ public void testParseKeyWithoutValueEquals() { } @Test - public void testParseKeyWithoutValue() { + public void parseKeyWithoutValue() { HttpQueryParams expected = new HttpQueryParams(); expected.add("k1", ""); @@ -110,7 +114,7 @@ public void testParseKeyWithoutValue() { } @Test - public void testParseKeyWithoutValueShort() { + public void parseKeyWithoutValueShort() { HttpQueryParams expected = new HttpQueryParams(); expected.add("=", ""); @@ -122,7 +126,7 @@ public void testParseKeyWithoutValueShort() { } @Test - public void testParseKeysWithoutValuesMixedTrailers() { + public void parseKeysWithoutValuesMixedTrailers() { HttpQueryParams expected = new HttpQueryParams(); expected.add("k1", ""); expected.add("k2", "v2"); @@ -135,4 +139,14 @@ public void testParseKeysWithoutValuesMixedTrailers() { assertEquals("k1=&k2=v2&k3&k4=v4", actual.toEncodedString()); } + + @Test + public void parseKeysIgnoreCase() { + String camelCaseKey = "keyName"; + HttpQueryParams queryParams = new HttpQueryParams(); + queryParams.add("foo", "bar"); + queryParams.add(camelCaseKey.toLowerCase(Locale.ROOT), "value"); + + assertTrue(queryParams.containsIgnoreCase(camelCaseKey)); + } } From fe690b4bb85e29fec0144d28d43905f96635176f Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Thu, 25 Jun 2020 09:48:52 -0700 Subject: [PATCH 088/273] Update link to correct page --- .../java/com/netflix/zuul/message/http/HttpQueryParams.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java index 0f087708..d14522f2 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpQueryParams.java @@ -131,7 +131,7 @@ public boolean contains(String name) } /** - * Per https://tools.ietf.org/html/rfc3986#page-11, query params are to be treated as case sensitive. + * Per https://tools.ietf.org/html/rfc7230#page-19, query params are to be treated as case sensitive. * However, as an utility, this exists to allow us to do a case insensitive match on demand. */ public boolean containsIgnoreCase(String name) { From 44b292bdcdd96845cbc4f0a7212b83ec8fc33817 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Thu, 25 Jun 2020 11:08:16 -0700 Subject: [PATCH 089/273] Cleanup unused imports --- .../com/netflix/zuul/message/http/HttpQueryParamsTest.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpQueryParamsTest.java b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpQueryParamsTest.java index 304dadd5..5766b942 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpQueryParamsTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpQueryParamsTest.java @@ -17,13 +17,9 @@ package com.netflix.zuul.message.http; -import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; - -import com.google.common.truth.Truth; import java.util.Locale; -import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.junit.MockitoJUnitRunner; From 5f58a3863f03208add534a0d12a240aed4ae8e8c Mon Sep 17 00:00:00 2001 From: sullis Date: Sat, 27 Jun 2020 15:53:23 -0700 Subject: [PATCH 090/273] enable Dependabot v2 (#832) https://github.blog/2020-06-01-keep-all-your-packages-up-to-date-with-dependabot/ --- .github/dependabot.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..1ef0730a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "gradle" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" From 43c031939f08e6bd60b3690cb059619cd6f24d1e Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 6 Jul 2020 09:38:01 -0700 Subject: [PATCH 091/273] all: bump spectator and jackson --- zuul-core/build.gradle | 6 ++-- zuul-core/dependencies.lock | 48 ++++++++++++++++---------------- zuul-groovy/dependencies.lock | 18 ++++++------ zuul-guice/dependencies.lock | 18 ++++++------ zuul-processor/dependencies.lock | 22 +++++++-------- zuul-sample/dependencies.lock | 22 +++++++-------- 6 files changed, 67 insertions(+), 67 deletions(-) diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index 54a59c2c..56f20d62 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -7,11 +7,11 @@ dependencies { // TODO(carl-mastrangelo): this can be implementation; remove Logger from public api points. api libraries.slf4j implementation 'org.bouncycastle:bcprov-jdk15on:1.+' - implementation 'com.fasterxml.jackson.core:jackson-core:2.9.8' + implementation 'com.fasterxml.jackson.core:jackson-core:2.11.0' api 'com.fasterxml.jackson.core:jackson-databind:2.9.8' api "com.netflix.archaius:archaius-core:0.7.5" - api "com.netflix.spectator:spectator-api:0.103.0" + api "com.netflix.spectator:spectator-api:0.110.0" api "com.netflix.netflix-commons:netflix-commons-util:0.3.0" api "com.netflix.ribbon:ribbon-core:${versions_ribbon}" @@ -65,4 +65,4 @@ jmh { iterations 5 // Not sure why duplicate classes are aon the path. Something Nebula related I think. duplicateClassesStrategy = 'EXCLUDE' -} \ No newline at end of file +} diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 2fdf746b..befea329 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -1,8 +1,8 @@ { "compileClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.9.8", - "requested": "2.9.8" + "locked": "2.11.0", + "requested": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "locked": "2.9.8", @@ -45,8 +45,8 @@ "requested": "2.7.17" }, "com.netflix.spectator:spectator-api": { - "locked": "0.103.0", - "requested": "0.103.0" + "locked": "0.110.0", + "requested": "0.110.0" }, "io.netty:netty-buffer": { "locked": "4.1.50.Final", @@ -120,8 +120,8 @@ }, "jmhCompileClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.9.8", - "requested": "2.9.8" + "locked": "2.11.0", + "requested": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "locked": "2.9.8", @@ -164,8 +164,8 @@ "requested": "2.7.17" }, "com.netflix.spectator:spectator-api": { - "locked": "0.103.0", - "requested": "0.103.0" + "locked": "0.110.0", + "requested": "0.110.0" }, "io.netty:netty-buffer": { "locked": "4.1.50.Final", @@ -238,8 +238,8 @@ }, "jmhRuntimeClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.9.8", - "requested": "2.9.8" + "locked": "2.11.0", + "requested": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "locked": "2.9.8", @@ -286,8 +286,8 @@ "requested": "2.7.17" }, "com.netflix.spectator:spectator-api": { - "locked": "0.103.0", - "requested": "0.103.0" + "locked": "0.110.0", + "requested": "0.110.0" }, "io.netty:netty-buffer": { "locked": "4.1.50.Final", @@ -376,8 +376,8 @@ }, "runtimeClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.9.8", - "requested": "2.9.8" + "locked": "2.11.0", + "requested": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "locked": "2.9.8", @@ -420,8 +420,8 @@ "requested": "2.7.17" }, "com.netflix.spectator:spectator-api": { - "locked": "0.103.0", - "requested": "0.103.0" + "locked": "0.110.0", + "requested": "0.110.0" }, "io.netty:netty-buffer": { "locked": "4.1.50.Final", @@ -486,8 +486,8 @@ }, "testCompileClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.9.8", - "requested": "2.9.8" + "locked": "2.11.0", + "requested": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "locked": "2.9.8", @@ -534,8 +534,8 @@ "requested": "2.7.17" }, "com.netflix.spectator:spectator-api": { - "locked": "0.103.0", - "requested": "0.103.0" + "locked": "0.110.0", + "requested": "0.110.0" }, "io.netty:netty-buffer": { "locked": "4.1.50.Final", @@ -604,8 +604,8 @@ }, "testRuntimeClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.9.8", - "requested": "2.9.8" + "locked": "2.11.0", + "requested": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "locked": "2.9.8", @@ -652,8 +652,8 @@ "requested": "2.7.17" }, "com.netflix.spectator:spectator-api": { - "locked": "0.103.0", - "requested": "0.103.0" + "locked": "0.110.0", + "requested": "0.110.0" }, "io.netty:netty-buffer": { "locked": "4.1.50.Final", diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index de0d4f90..a557c567 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -62,7 +62,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -191,7 +191,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -262,7 +262,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ @@ -333,7 +333,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -454,7 +454,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ @@ -521,7 +521,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -688,7 +688,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -759,7 +759,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ @@ -830,7 +830,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index c0326c67..656e6655 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -62,7 +62,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -191,7 +191,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -262,7 +262,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ @@ -340,7 +340,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -461,7 +461,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ @@ -531,7 +531,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -702,7 +702,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -773,7 +773,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ @@ -851,7 +851,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 127ce472..07cacfc6 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -62,7 +62,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -187,7 +187,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -254,7 +254,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ @@ -325,7 +325,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -438,7 +438,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ @@ -505,7 +505,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -606,7 +606,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ @@ -673,7 +673,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "firstLevelTransitive": [ @@ -842,7 +842,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -905,7 +905,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ @@ -976,7 +976,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index b00b4b6a..b478c0eb 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -4,7 +4,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ @@ -71,7 +71,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "firstLevelTransitive": [ @@ -243,7 +243,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -391,7 +391,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -474,7 +474,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ @@ -552,7 +552,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "firstLevelTransitive": [ @@ -692,7 +692,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ @@ -770,7 +770,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "firstLevelTransitive": [ @@ -967,7 +967,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "project": true @@ -1042,7 +1042,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ @@ -1120,7 +1120,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.103.0" + "locked": "0.110.0" }, "com.netflix.zuul:zuul-core": { "firstLevelTransitive": [ From 40dfc1802e70631fac041eb77c94a227a96fe719 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 9 Jul 2020 08:44:33 -0700 Subject: [PATCH 092/273] all: bump perfmark to 0.22.0 --- zuul-core/build.gradle | 2 +- zuul-core/dependencies.lock | 24 ++++++++++++------------ zuul-groovy/dependencies.lock | 6 +++--- zuul-guice/dependencies.lock | 6 +++--- zuul-processor/dependencies.lock | 8 ++++---- zuul-sample/dependencies.lock | 8 ++++---- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index 56f20d62..fd9b8962 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -36,7 +36,7 @@ dependencies { implementation "io.netty:netty-transport-native-kqueue:${versions_netty}:osx-x86_64" runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.30.Final" - implementation 'io.perfmark:perfmark-api:0.21.0' + implementation 'io.perfmark:perfmark-api:0.22.0' implementation 'javax.inject:javax.inject:1' testImplementation libraries.junit, diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index befea329..263059d9 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -85,8 +85,8 @@ "requested": "4.1.50.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.21.0", - "requested": "0.21.0" + "locked": "0.22.0", + "requested": "0.22.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -204,8 +204,8 @@ "requested": "4.1.50.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.21.0", - "requested": "0.21.0" + "locked": "0.22.0", + "requested": "0.22.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -330,8 +330,8 @@ "requested": "4.1.50.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.21.0", - "requested": "0.21.0" + "locked": "0.22.0", + "requested": "0.22.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -464,8 +464,8 @@ "requested": "4.1.50.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.21.0", - "requested": "0.21.0" + "locked": "0.22.0", + "requested": "0.22.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -574,8 +574,8 @@ "requested": "4.1.50.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.21.0", - "requested": "0.21.0" + "locked": "0.22.0", + "requested": "0.22.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -696,8 +696,8 @@ "requested": "4.1.50.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.21.0", - "requested": "0.21.0" + "locked": "0.22.0", + "requested": "0.22.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index a557c567..0a1854a5 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -402,7 +402,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.21.0" + "locked": "0.22.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -590,7 +590,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.21.0" + "locked": "0.22.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -899,7 +899,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.21.0" + "locked": "0.22.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 656e6655..d2ddacb4 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -413,7 +413,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.21.0" + "locked": "0.22.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -604,7 +604,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.21.0" + "locked": "0.22.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -924,7 +924,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.21.0" + "locked": "0.22.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 07cacfc6..d1f782bc 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -394,7 +394,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.21.0" + "locked": "0.22.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -574,7 +574,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.21.0" + "locked": "0.22.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -748,7 +748,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.21.0" + "locked": "0.22.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1045,7 +1045,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.21.0" + "locked": "0.22.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index b478c0eb..23531071 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -146,7 +146,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.21.0" + "locked": "0.22.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -638,7 +638,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.21.0" + "locked": "0.22.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -856,7 +856,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.21.0" + "locked": "0.22.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1206,7 +1206,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.21.0" + "locked": "0.22.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ From 6deec506e249b58893c665566a625aef3c77ce3d Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 9 Jul 2020 09:30:54 -0700 Subject: [PATCH 093/273] zuul-core: use lighter weight perfmark tracing calls --- .../netty/filter/BaseZuulFilterRunner.java | 76 ++++++++++--------- .../zuul/netty/filter/ZuulEndPointRunner.java | 12 +-- .../netty/filter/ZuulFilterChainRunner.java | 12 +-- 3 files changed, 52 insertions(+), 48 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java index 56e9d547..20a38943 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java @@ -117,42 +117,42 @@ protected final void setFilterAwaitingBody(I zuulMesg, boolean flag) { protected final void invokeNextStage(final O zuulMesg, final HttpContent chunk) { if (nextStage != null) { - PerfMark.startTask(getClass().getName(), "invokeNextStageChunk"); + PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".invokeNextStageChunk"); try { addPerfMarkTags(zuulMesg); nextStage.filter(zuulMesg, chunk); } finally { - PerfMark.stopTask(getClass().getName(), "invokeNextStageChunk"); + PerfMark.stopTask(); } } else { //Next stage is Netty channel handler - PerfMark.startTask(getClass().getName(), "fireChannelReadChunk"); + PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".fireChannelReadChunk"); try { addPerfMarkTags(zuulMesg); getChannelHandlerContext(zuulMesg).fireChannelRead(chunk); } finally { - PerfMark.stopTask(getClass().getName(), "fireChannelReadChunk"); + PerfMark.stopTask(); } } } protected final void invokeNextStage(final O zuulMesg) { if (nextStage != null) { - PerfMark.startTask(getClass().getName(), "invokeNextStage"); + PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".invokeNextStage"); try { addPerfMarkTags(zuulMesg); nextStage.filter(zuulMesg); } finally { - PerfMark.stopTask(getClass().getName(), "invokeNextStage"); + PerfMark.stopTask(); } } else { //Next stage is Netty channel handler - PerfMark.startTask(getClass().getName(), "fireChannelRead"); + PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".fireChannelRead"); try { addPerfMarkTags(zuulMesg); getChannelHandlerContext(zuulMesg).fireChannelRead(zuulMesg); } finally { - PerfMark.stopTask(getClass().getName(), "fireChannelRead"); + PerfMark.stopTask(); } } } @@ -163,14 +163,15 @@ protected final void addPerfMarkTags(ZuulMessage inMesg) { req = (HttpRequestInfo) inMesg; } if (inMesg instanceof HttpResponseMessage) { - req = ((HttpResponseMessage) inMesg).getOutboundRequest(); - PerfMark.attachTag("statuscode", ((HttpResponseMessage) inMesg).getStatus()); + HttpResponseMessage msg = (HttpResponseMessage) inMesg; + req = msg.getOutboundRequest(); + PerfMark.attachTag("statuscode", msg.getStatus()); } if (req != null) { - PerfMark.attachTag("path", req.getPath()); - PerfMark.attachTag("originalhost", req.getOriginalHost()); + PerfMark.attachTag("path", req, HttpRequestInfo::getPath); + PerfMark.attachTag("originalhost", req, HttpRequestInfo::getOriginalHost); } - PerfMark.attachTag("uuid", inMesg.getContext().getUUID()); + PerfMark.attachTag("uuid", inMesg, m -> m.getContext().getUUID()); } protected final O filter(final ZuulFilter filter, final I inMesg) { @@ -178,7 +179,7 @@ protected final O filter(final ZuulFilter filter, final I inMesg) { final ZuulMessage snapshot = inMesg.getContext().debugRouting() ? inMesg.clone() : null; FilterChainResumer resumer = null; - PerfMark.startTask(filter.filterName(), "filter"); + PerfMark.startTask(filter, f -> f.filterName() + ".filter"); try { addPerfMarkTags(inMesg); ExecutionStatus filterRunStatus = null; @@ -187,13 +188,13 @@ protected final O filter(final ZuulFilter filter, final I inMesg) { filterRunStatus = SKIPPED; } - PerfMark.startTask(filter.filterName(), "shouldSkipFilter"); + PerfMark.startTask(filter, f -> f.filterName() + ".shouldSkipFilter"); try { if (shouldSkipFilter(inMesg, filter)) { filterRunStatus = SKIPPED; } } finally { - PerfMark.stopTask(filter.filterName(), "shouldSkipFilter"); + PerfMark.stopTask(); } if (filter.isDisabled()) { @@ -222,30 +223,30 @@ protected final O filter(final ZuulFilter filter, final I inMesg) { if (filter.getSyncType() == FilterSyncType.SYNC) { final SyncZuulFilter syncFilter = (SyncZuulFilter) filter; final O outMesg; - PerfMark.startTask(filter.filterName(), "apply"); + PerfMark.startTask(filter, f -> f.filterName() + ".apply"); try { addPerfMarkTags(inMesg); outMesg = syncFilter.apply(inMesg); } finally { - PerfMark.stopTask(filter.filterName(), "apply"); + PerfMark.stopTask(); } recordFilterCompletion(SUCCESS, filter, startTime, inMesg, snapshot); return (outMesg != null) ? outMesg : filter.getDefaultOutput(inMesg); } // async filter - PerfMark.startTask(filter.filterName(), "applyAsync"); + PerfMark.startTask(filter, f -> f.filterName() + ".applyAsync"); try { final Link nettyToSchedulerLink = PerfMark.linkOut(); filter.incrementConcurrency(); resumer = new FilterChainResumer(inMesg, filter, snapshot, startTime); filter.applyAsync(inMesg) .doOnSubscribe(() -> { - PerfMark.startTask(filter.filterName(), "onSubscribeAsync"); + PerfMark.startTask(filter, f -> f.filterName() + ".onSubscribeAsync"); try { PerfMark.linkIn(nettyToSchedulerLink); } finally { - PerfMark.stopTask(filter.filterName(), "onSubscribeAsync"); + PerfMark.stopTask(); } }) .doOnNext(resumer.onNextStarted(nettyToSchedulerLink)) @@ -255,7 +256,7 @@ protected final O filter(final ZuulFilter filter, final I inMesg) { .doOnUnsubscribe(resumer::decrementConcurrency) .subscribe(resumer); } finally { - PerfMark.stopTask(filter.filterName(), "applyAsync"); + PerfMark.stopTask(); } return null; //wait for the async filter to finish @@ -269,7 +270,7 @@ protected final O filter(final ZuulFilter filter, final I inMesg) { recordFilterCompletion(FAILED, filter, startTime, inMesg, snapshot); return outMesg; } finally { - PerfMark.stopTask(filter.filterName(), "filter"); + PerfMark.stopTask(); } } @@ -425,7 +426,7 @@ void decrementConcurrency() { @Override public void onNext(O outMesg) { boolean stopped = false; - PerfMark.startTask(filter.filterName(), "onNextAsync"); + PerfMark.startTask(filter, f -> f.filterName() + ".onNextAsync"); try { PerfMark.linkIn(onNextLinkOut.get()); addPerfMarkTags(inMesg); @@ -434,7 +435,7 @@ public void onNext(O outMesg) { outMesg = filter.getDefaultOutput(inMesg); } stopped = true; - PerfMark.stopTask(filter.filterName(), "onNextAsync"); + PerfMark.stopTask(); resumeInBindingContext(outMesg, filter.filterName()); } catch (Exception e) { @@ -442,14 +443,14 @@ public void onNext(O outMesg) { handleException(inMesg, filter.filterName(), e); } finally { if (!stopped) { - PerfMark.stopTask(filter.filterName(), "onNextAsync"); + PerfMark.stopTask(); } } } @Override public void onError(Throwable ex) { - PerfMark.startTask(filter.filterName(), "onErrorAsync"); + PerfMark.startTask(filter, f -> f.filterName() + ".onErrorAsync"); try { PerfMark.linkIn(onErrorLinkOut.get()); decrementConcurrency(); @@ -460,50 +461,53 @@ public void onError(Throwable ex) { catch (Exception e) { handleException(inMesg, filter.filterName(), e); } finally { - PerfMark.stopTask(filter.filterName(), "onErrorAsync"); } + PerfMark.stopTask(); } } @Override public void onCompleted() { - PerfMark.startTask(filter.filterName(), "onCompletedAsync"); + PerfMark.startTask(filter, f -> f.filterName() + ".onCompletedAsync"); try { PerfMark.linkIn(onCompletedLinkOut.get( )); decrementConcurrency(); } finally { - PerfMark.stopTask(filter.filterName(), "onCompletedAsync"); + PerfMark.stopTask(); } } private Action1 onNextStarted(Link onNextLinkIn) { return o -> { - PerfMark.startTask(filter.filterName(), "onNext"); + PerfMark.startTask(filter, f -> f.filterName() + ".onNext"); try { PerfMark.linkIn(onNextLinkIn); onNextLinkOut.compareAndSet(null, PerfMark.linkOut()); } finally { - PerfMark.stopTask(filter.filterName(), "onNext"); } + PerfMark.stopTask(); + } }; } private Action1 onErrorStarted(Link onErrorLinkIn) { return t -> { - PerfMark.startTask(filter.filterName(), "onError"); + PerfMark.startTask(filter, f -> f.filterName() + ".onError"); try { PerfMark.linkIn(onErrorLinkIn); onErrorLinkOut.compareAndSet(null, PerfMark.linkOut()); } finally { - PerfMark.stopTask(filter.filterName(), "onError"); } + PerfMark.stopTask(); + } }; } private Action0 onCompletedStarted(Link onCompletedLinkIn) { return () -> { - PerfMark.startTask(filter.filterName(), "onCompleted"); + PerfMark.startTask(filter, f -> f.filterName() + ".onCompleted"); try { PerfMark.linkIn(onCompletedLinkIn); onCompletedLinkOut.compareAndSet(null, PerfMark.linkOut()); } finally { - PerfMark.stopTask(filter.filterName(), "onCompleted"); } + PerfMark.stopTask(); + } }; } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulEndPointRunner.java b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulEndPointRunner.java index 28e3148f..8a54eb24 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulEndPointRunner.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulEndPointRunner.java @@ -84,7 +84,7 @@ public void filter(final HttpRequestMessage zuulReq) { } final String endpointName = getEndPointName(zuulReq.getContext()); - PerfMark.startTask(getClass().getName(), "filter"); + PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".filter"); try { Preconditions.checkNotNull(zuulReq, "input message"); addPerfMarkTags(zuulReq); @@ -103,20 +103,20 @@ public void filter(final HttpRequestMessage zuulReq) { catch (Exception ex) { handleException(zuulReq, endpointName, ex); } finally { - PerfMark.stopTask(getClass().getName(), "filter"); + PerfMark.stopTask(); } } @Override protected void resume(final HttpResponseMessage zuulMesg) { - PerfMark.startTask(getClass().getSimpleName(), "resume"); + PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".resume"); try { if (zuulMesg.getContext().isCancelled()) { return; } invokeNextStage(zuulMesg); } finally { - PerfMark.stopTask(getClass().getSimpleName(), "resume"); + PerfMark.stopTask(); } } @@ -128,7 +128,7 @@ public void filter(final HttpRequestMessage zuulReq, final HttpContent chunk) { } String endpointName = "-"; - PerfMark.startTask(getClass().getName(), "filterChunk"); + PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".filterChunk"); try { addPerfMarkTags(zuulReq); ZuulFilter endpoint = Preconditions.checkNotNull( @@ -154,7 +154,7 @@ public void filter(final HttpRequestMessage zuulReq, final HttpContent chunk) { catch (Exception ex) { handleException(zuulReq, endpointName, ex); } finally { - PerfMark.stopTask(getClass().getName(), "filterChunk"); + PerfMark.stopTask(); } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulFilterChainRunner.java b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulFilterChainRunner.java index 88cee8ff..010e958a 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulFilterChainRunner.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulFilterChainRunner.java @@ -50,24 +50,24 @@ public ZuulFilterChainRunner(ZuulFilter[] zuulFilters, FilterUsageNotifier @Override public void filter(final T inMesg) { - PerfMark.startTask(getClass().getSimpleName(), "filter"); + PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".filter"); try { addPerfMarkTags(inMesg); runFilters(inMesg, initRunningFilterIndex(inMesg)); } finally { - PerfMark.stopTask(getClass().getSimpleName(), "filter"); + PerfMark.stopTask(); } } @Override protected void resume(final T inMesg) { - PerfMark.startTask(getClass().getSimpleName(), "resume"); + PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".resume"); try { final AtomicInteger runningFilterIdx = getRunningFilterIndex(inMesg); runningFilterIdx.incrementAndGet(); runFilters(inMesg, runningFilterIdx); } finally { - PerfMark.stopTask(getClass().getSimpleName(), "resume"); + PerfMark.stopTask(); } } @@ -100,7 +100,7 @@ private final void runFilters(final T mesg, final AtomicInteger runningFilterIdx @Override public void filter(T inMesg, HttpContent chunk) { String filterName = "-"; - PerfMark.startTask(getClass().getName(), "filterChunk"); + PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".filterChunk"); try { addPerfMarkTags(inMesg); Preconditions.checkNotNull(inMesg, "input message"); @@ -160,7 +160,7 @@ public void filter(T inMesg, HttpContent chunk) { catch (Exception ex) { handleException(inMesg, filterName, ex); } finally { - PerfMark.stopTask(getClass().getName(), "filterChunk"); + PerfMark.stopTask(); } } From ab6680d644ca71c6f61c8a2298df3dfce6b83136 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 9 Jul 2020 09:40:39 -0700 Subject: [PATCH 094/273] all: bump to netty 4.1.51 --- gradle.properties | 2 +- zuul-core/dependencies.lock | 216 +++++++++++++++---------------- zuul-groovy/dependencies.lock | 90 ++++++------- zuul-guice/dependencies.lock | 90 ++++++------- zuul-processor/dependencies.lock | 108 ++++++++-------- zuul-sample/dependencies.lock | 108 ++++++++-------- 6 files changed, 307 insertions(+), 307 deletions(-) diff --git a/gradle.properties b/gradle.properties index 56c47dcc..efd9e05f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ versions_groovy=3.0.3 versions_ribbon=2.7.17 -versions_netty=4.1.50.Final +versions_netty=4.1.51.Final release.scope=patch release.version=2.1.8-SNAPSHOT diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 263059d9..6b276c0a 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -49,40 +49,40 @@ "requested": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-common": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-handler": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-transport": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "locked": "0.22.0", @@ -168,40 +168,40 @@ "requested": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-common": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-handler": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-transport": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "locked": "0.22.0", @@ -290,44 +290,44 @@ "requested": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-common": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-handler": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.30.Final", "requested": "2.0.30.Final" }, "io.netty:netty-transport": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "locked": "0.22.0", @@ -424,44 +424,44 @@ "requested": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-common": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-handler": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.30.Final", "requested": "2.0.30.Final" }, "io.netty:netty-transport": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "locked": "0.22.0", @@ -538,40 +538,40 @@ "requested": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-common": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-handler": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-transport": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "locked": "0.22.0", @@ -656,44 +656,44 @@ "requested": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-common": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-handler": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.30.Final", "requested": "2.0.30.Final" }, "io.netty:netty-transport": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.50.Final", - "requested": "4.1.50.Final" + "locked": "4.1.51.Final", + "requested": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "locked": "0.22.0", diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index 0a1854a5..185e3d9e 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -71,37 +71,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -200,37 +200,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -342,37 +342,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -384,19 +384,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -530,37 +530,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -572,19 +572,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -697,37 +697,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -839,37 +839,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -881,19 +881,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index d2ddacb4..4e44a8e8 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -75,37 +75,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -204,37 +204,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -353,37 +353,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -395,19 +395,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -544,37 +544,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -586,19 +586,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -715,37 +715,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -864,37 +864,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -906,19 +906,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index d1f782bc..7480a65c 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -71,37 +71,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -196,37 +196,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -334,37 +334,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -376,19 +376,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -514,37 +514,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -556,19 +556,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -688,37 +688,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -730,19 +730,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -851,37 +851,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -985,37 +985,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1027,19 +1027,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 23531071..c636df82 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -86,37 +86,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -128,19 +128,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -262,37 +262,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -410,37 +410,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -578,37 +578,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -620,19 +620,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -796,37 +796,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -838,19 +838,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -986,37 +986,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1146,37 +1146,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1188,19 +1188,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.50.Final" + "locked": "4.1.51.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ From d1cc4cd76d6fab42958aad64cfd715576cb73fa2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Jul 2020 07:50:35 -0700 Subject: [PATCH 095/273] build(deps): bump nebula.dependency-lock from 9.0.0 to 9.3.0 (#850) Bumps nebula.dependency-lock from 9.0.0 to 9.3.0. Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 60d522e8..12eedbf9 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id 'nebula.netflixoss' version '8.8.1' - id 'nebula.dependency-lock' version '9.0.0' + id 'nebula.dependency-lock' version '9.3.0' id "com.google.osdetector" version "1.6.2" id "me.champeau.gradle.jmh" version "0.5.0" } From 433db6c248a959005a12b299e4a3997e5e1ae6c1 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Tue, 14 Jul 2020 17:30:58 -0700 Subject: [PATCH 096/273] sanitize header fields and values --- .../com/netflix/zuul/message/Headers.java | 28 ++++++++++--- .../com/netflix/zuul/message/HeadersTest.java | 40 +++++++++++++++++++ 2 files changed, 62 insertions(+), 6 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java index 500836cb..1b7f75bf 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java @@ -464,7 +464,7 @@ private String originalName(int i) { } private void originalName(int i, String originalName) { - originalNames.set(i, originalName); + originalNames.set(i, sanitizeField(originalName)); } private String name(int i) { @@ -472,7 +472,7 @@ private String name(int i) { } private void name(int i, String name) { - names.set(i, name); + names.set(i, sanitizeField(name)); } private String value(int i) { @@ -480,13 +480,13 @@ private String value(int i) { } private void value(int i, String val) { - values.set(i, val); + values.set(i, sanitizeField(val)); } private void addNormal(String originalName, String normalName, String value) { - originalNames.add(originalName); - names.add(normalName); - values.add(value); + originalNames.add(sanitizeField(originalName)); + names.add(sanitizeField(normalName)); + values.add(sanitizeField(value)); } /** @@ -499,4 +499,20 @@ private void truncate(int i) { values.remove(k); } } + + private String sanitizeField(String value) { + if (value != null) { + int l = value.length(); + StringBuilder clean = new StringBuilder(); + for (int i = 0; i < l; i++) { + char c = value.charAt(i); + // ASCII non-control characters, per RFC 7230 + if (c > 31 && c < 127) { + clean.append(c); + } + } + return clean.toString(); + } + return value; + } } diff --git a/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java b/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java index 88005c3b..a96317a8 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java @@ -487,4 +487,44 @@ public void testCaseInsensitiveKeys_PutAll() { assertTrue(values.contains("5")); assertEquals(2, values.size()); } + + @Test + public void testSanitizeValues_CRLF() { + Headers headers = new Headers(); + headers.add("x-test-break1", "a\r\nb\r\nc"); + headers.set("x-test-break2", "a\r\nb\r\nc"); + + assertEquals(headers.getFirst("x-test-break1"), "abc"); + assertEquals(headers.getFirst("x-test-break2"), "abc"); + } + + @Test + public void testSanitizeValues_LF() { + Headers headers = new Headers(); + headers.add("x-test-break1", "a\nb\nc"); + headers.set("x-test-break2", "a\nb\nc"); + + assertEquals(headers.getFirst("x-test-break1"), "abc"); + assertEquals(headers.getFirst("x-test-break2"), "abc"); + } + + @Test + public void testSanitizeValues_addSetHeaderName() { + Headers headers = new Headers(); + headers.set(new HeaderName("x-test-break1"), "a\nb\nc"); + headers.add(new HeaderName("x-test-break2"), "a\r\nb\r\nc"); + + assertEquals(headers.getFirst("x-test-break1"), "abc"); + assertEquals(headers.getFirst("x-test-break2"), "abc"); + } + + @Test + public void testSanitizeValues_nameCRLF() { + Headers headers = new Headers(); + headers.add("x-test-br\r\neak1", "a\r\nb\r\nc"); + headers.set("x-test-br\r\neak2", "a\r\nb\r\nc"); + + assertEquals(headers.getFirst("x-test-break1"), "abc"); + assertEquals(headers.getFirst("x-test-break2"), "abc"); + } } From e2884a6434e4abd0417e6193b3ed1e4b72b4392e Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Tue, 14 Jul 2020 17:58:20 -0700 Subject: [PATCH 097/273] set default size of StringBuilder --- zuul-core/src/main/java/com/netflix/zuul/message/Headers.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java index 1b7f75bf..635ef7dd 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java @@ -503,7 +503,7 @@ private void truncate(int i) { private String sanitizeField(String value) { if (value != null) { int l = value.length(); - StringBuilder clean = new StringBuilder(); + StringBuilder clean = new StringBuilder(l); for (int i = 0; i < l; i++) { char c = value.charAt(i); // ASCII non-control characters, per RFC 7230 From 8544768e2ea83efa40f6f18530acfeb1fa1512e3 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 15 Jul 2020 06:10:23 -0700 Subject: [PATCH 098/273] all: update to tcnative 2.0.31 --- zuul-core/build.gradle | 2 +- zuul-core/dependencies.lock | 30 +++++++++++++++--------------- zuul-groovy/dependencies.lock | 18 +++++++++--------- zuul-guice/dependencies.lock | 18 +++++++++--------- zuul-processor/dependencies.lock | 16 ++++++++-------- zuul-sample/dependencies.lock | 16 ++++++++-------- 6 files changed, 50 insertions(+), 50 deletions(-) diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index fd9b8962..a25b3c69 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -34,7 +34,7 @@ dependencies { implementation "io.netty:netty-codec-haproxy:${versions_netty}" implementation "io.netty:netty-transport-native-epoll:${versions_netty}:linux-x86_64" implementation "io.netty:netty-transport-native-kqueue:${versions_netty}:osx-x86_64" - runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.30.Final" + runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.31.Final" implementation 'io.perfmark:perfmark-api:0.22.0' implementation 'javax.inject:javax.inject:1' diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 6b276c0a..93aa082b 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -97,7 +97,7 @@ "requested": "1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.65.01", + "locked": "1.66", "requested": "1.+" }, "org.slf4j:slf4j-api": { @@ -216,7 +216,7 @@ "requested": "1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.65.01", + "locked": "1.66", "requested": "1.+" }, "org.openjdk.jmh:jmh-core": { @@ -314,8 +314,8 @@ "requested": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.30.Final", - "requested": "2.0.30.Final" + "locked": "2.0.31.Final", + "requested": "2.0.31.Final" }, "io.netty:netty-transport": { "locked": "4.1.51.Final", @@ -346,11 +346,11 @@ "requested": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.65.01", + "locked": "1.66", "requested": "1.+" }, "org.mockito:mockito-core": { - "locked": "3.3.3", + "locked": "3.4.0", "requested": "3.+" }, "org.openjdk.jmh:jmh-core": { @@ -448,8 +448,8 @@ "requested": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.30.Final", - "requested": "2.0.30.Final" + "locked": "2.0.31.Final", + "requested": "2.0.31.Final" }, "io.netty:netty-transport": { "locked": "4.1.51.Final", @@ -476,7 +476,7 @@ "requested": "1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.65.01", + "locked": "1.66", "requested": "1.+" }, "org.slf4j:slf4j-api": { @@ -590,11 +590,11 @@ "requested": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.65.01", + "locked": "1.66", "requested": "1.+" }, "org.mockito:mockito-core": { - "locked": "3.3.3", + "locked": "3.4.0", "requested": "3.+" }, "org.slf4j:slf4j-api": { @@ -680,8 +680,8 @@ "requested": "4.1.51.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.30.Final", - "requested": "2.0.30.Final" + "locked": "2.0.31.Final", + "requested": "2.0.31.Final" }, "io.netty:netty-transport": { "locked": "4.1.51.Final", @@ -712,11 +712,11 @@ "requested": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.65.01", + "locked": "1.66", "requested": "1.+" }, "org.mockito:mockito-core": { - "locked": "3.3.3", + "locked": "3.4.0", "requested": "3.+" }, "org.slf4j:slf4j-api": { diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index 185e3d9e..74aaedf3 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -378,7 +378,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.30.Final" + "locked": "2.0.31.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -424,14 +424,14 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65.01" + "locked": "1.66" }, "org.codehaus.groovy:groovy-all": { "locked": "3.0.3", "requested": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.3.3", + "locked": "3.4.0", "requested": "3.+" }, "org.openjdk.jmh:jmh-core": { @@ -566,7 +566,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.30.Final" + "locked": "2.0.31.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -608,7 +608,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65.01" + "locked": "1.66" }, "org.codehaus.groovy:groovy-all": { "locked": "3.0.3", @@ -744,7 +744,7 @@ "requested": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.3.3", + "locked": "3.4.0", "requested": "3.+" }, "org.slf4j:slf4j-api": { @@ -875,7 +875,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.30.Final" + "locked": "2.0.31.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -921,14 +921,14 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65.01" + "locked": "1.66" }, "org.codehaus.groovy:groovy-all": { "locked": "3.0.3", "requested": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.3.3", + "locked": "3.4.0", "requested": "3.+" }, "org.slf4j:slf4j-api": { diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 4e44a8e8..d929267e 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -389,7 +389,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.30.Final" + "locked": "2.0.31.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -435,10 +435,10 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65.01" + "locked": "1.66" }, "org.mockito:mockito-core": { - "locked": "3.3.3", + "locked": "3.4.0", "requested": "3.+" }, "org.openjdk.jmh:jmh-core": { @@ -580,7 +580,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.30.Final" + "locked": "2.0.31.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -622,7 +622,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65.01" + "locked": "1.66" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -758,7 +758,7 @@ "requested": "4.13" }, "org.mockito:mockito-core": { - "locked": "3.3.3", + "locked": "3.4.0", "requested": "3.+" }, "org.slf4j:slf4j-api": { @@ -900,7 +900,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.30.Final" + "locked": "2.0.31.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -946,10 +946,10 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65.01" + "locked": "1.66" }, "org.mockito:mockito-core": { - "locked": "3.3.3", + "locked": "3.4.0", "requested": "3.+" }, "org.slf4j:slf4j-api": { diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 7480a65c..4a84b74f 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -370,7 +370,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.30.Final" + "locked": "2.0.31.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -416,7 +416,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65.01" + "locked": "1.66" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21", @@ -550,7 +550,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.30.Final" + "locked": "2.0.31.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -592,7 +592,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65.01" + "locked": "1.66" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -724,7 +724,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.30.Final" + "locked": "2.0.31.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -766,7 +766,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65.01" + "locked": "1.66" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -1021,7 +1021,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.30.Final" + "locked": "2.0.31.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -1067,7 +1067,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65.01" + "locked": "1.66" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index c636df82..2d836237 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -122,7 +122,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.30.Final" + "locked": "2.0.31.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -164,7 +164,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65.01" + "locked": "1.66" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -614,7 +614,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.30.Final" + "locked": "2.0.31.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -664,7 +664,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65.01" + "locked": "1.66" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -832,7 +832,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.30.Final" + "locked": "2.0.31.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -882,7 +882,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65.01" + "locked": "1.66" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -1182,7 +1182,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.30.Final" + "locked": "2.0.31.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -1232,7 +1232,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.65.01" + "locked": "1.66" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ From 6901735e71c3d0f2a34e6b362925ba82c3ce5248 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Wed, 15 Jul 2020 09:43:29 -0700 Subject: [PATCH 099/273] modify to validate instead of sanitize --- .../com/netflix/zuul/message/Headers.java | 22 ++++++++-------- .../com/netflix/zuul/message/HeadersTest.java | 25 +++++++------------ 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java index 635ef7dd..251932d8 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java @@ -18,6 +18,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.VisibleForTesting; +import com.netflix.zuul.exception.ZuulException; import java.util.AbstractMap.SimpleImmutableEntry; import java.util.ArrayList; import java.util.Collection; @@ -464,7 +465,7 @@ private String originalName(int i) { } private void originalName(int i, String originalName) { - originalNames.set(i, sanitizeField(originalName)); + originalNames.set(i, validateField(originalName)); } private String name(int i) { @@ -472,7 +473,7 @@ private String name(int i) { } private void name(int i, String name) { - names.set(i, sanitizeField(name)); + names.set(i, validateField(name)); } private String value(int i) { @@ -480,13 +481,13 @@ private String value(int i) { } private void value(int i, String val) { - values.set(i, sanitizeField(val)); + values.set(i, validateField(val)); } private void addNormal(String originalName, String normalName, String value) { - originalNames.add(sanitizeField(originalName)); - names.add(sanitizeField(normalName)); - values.add(sanitizeField(value)); + originalNames.add(validateField(originalName)); + names.add(validateField(normalName)); + values.add(validateField(value)); } /** @@ -500,18 +501,17 @@ private void truncate(int i) { } } - private String sanitizeField(String value) { + private String validateField(String value) { if (value != null) { int l = value.length(); - StringBuilder clean = new StringBuilder(l); for (int i = 0; i < l; i++) { char c = value.charAt(i); // ASCII non-control characters, per RFC 7230 - if (c > 31 && c < 127) { - clean.append(c); + if (c < 31 || c >= 127) { + throw new ZuulException("Invalid header field: char " + (int) c + " in string " + value + + " does not comply with RFC 7230", true); } } - return clean.toString(); } return value; } diff --git a/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java b/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java index a96317a8..9c7dc8ba 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java @@ -22,6 +22,7 @@ import static org.junit.Assert.assertTrue; import com.google.common.truth.Truth; +import com.netflix.zuul.exception.ZuulException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -491,40 +492,32 @@ public void testCaseInsensitiveKeys_PutAll() { @Test public void testSanitizeValues_CRLF() { Headers headers = new Headers(); - headers.add("x-test-break1", "a\r\nb\r\nc"); - headers.set("x-test-break2", "a\r\nb\r\nc"); - assertEquals(headers.getFirst("x-test-break1"), "abc"); - assertEquals(headers.getFirst("x-test-break2"), "abc"); + assertThrows(ZuulException.class, () -> headers.add("x-test-break1", "a\r\nb\r\nc")); + assertThrows(ZuulException.class, () -> headers.set("x-test-break1", "a\r\nb\r\nc")); } @Test public void testSanitizeValues_LF() { Headers headers = new Headers(); - headers.add("x-test-break1", "a\nb\nc"); - headers.set("x-test-break2", "a\nb\nc"); - assertEquals(headers.getFirst("x-test-break1"), "abc"); - assertEquals(headers.getFirst("x-test-break2"), "abc"); + assertThrows(ZuulException.class, () -> headers.add("x-test-break1", "a\nb\nc")); + assertThrows(ZuulException.class, () -> headers.set("x-test-break1", "a\nb\nc")); } @Test public void testSanitizeValues_addSetHeaderName() { Headers headers = new Headers(); - headers.set(new HeaderName("x-test-break1"), "a\nb\nc"); - headers.add(new HeaderName("x-test-break2"), "a\r\nb\r\nc"); - assertEquals(headers.getFirst("x-test-break1"), "abc"); - assertEquals(headers.getFirst("x-test-break2"), "abc"); + assertThrows(ZuulException.class, () -> headers.set(new HeaderName("x-test-break1"), "a\nb\nc")); + assertThrows(ZuulException.class, () -> headers.add(new HeaderName("x-test-break2"), "a\r\nb\r\nc")); } @Test public void testSanitizeValues_nameCRLF() { Headers headers = new Headers(); - headers.add("x-test-br\r\neak1", "a\r\nb\r\nc"); - headers.set("x-test-br\r\neak2", "a\r\nb\r\nc"); - assertEquals(headers.getFirst("x-test-break1"), "abc"); - assertEquals(headers.getFirst("x-test-break2"), "abc"); + assertThrows(ZuulException.class, () -> headers.add("x-test-br\r\neak1", "a\r\nb\r\nc")); + assertThrows(ZuulException.class, () -> headers.set("x-test-br\r\neak2", "a\r\nb\r\nc")); } } From 6aeec00bb8ec3f1b41b9479327ae5063bdcdb886 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Wed, 15 Jul 2020 10:29:36 -0700 Subject: [PATCH 100/273] add metric --- zuul-core/src/main/java/com/netflix/zuul/message/Headers.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java index 251932d8..f973331e 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java @@ -18,6 +18,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.VisibleForTesting; +import com.netflix.spectator.api.Spectator; import com.netflix.zuul.exception.ZuulException; import java.util.AbstractMap.SimpleImmutableEntry; import java.util.ArrayList; @@ -506,8 +507,9 @@ private String validateField(String value) { int l = value.length(); for (int i = 0; i < l; i++) { char c = value.charAt(i); - // ASCII non-control characters, per RFC 7230 + // ASCII non-control characters, per RFC 7230 but slightly more lenient if (c < 31 || c >= 127) { + Spectator.globalRegistry().counter("zuul.header.invalid.char").increment(); throw new ZuulException("Invalid header field: char " + (int) c + " in string " + value + " does not comply with RFC 7230", true); } From 2c8afd2f01939bf79c5c543b1e36f9dbc65e2b91 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Wed, 15 Jul 2020 13:44:19 -0700 Subject: [PATCH 101/273] enable stacktrace for invalid headers --- zuul-core/src/main/java/com/netflix/zuul/message/Headers.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java index f973331e..048f7125 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java @@ -511,7 +511,7 @@ private String validateField(String value) { if (c < 31 || c >= 127) { Spectator.globalRegistry().counter("zuul.header.invalid.char").increment(); throw new ZuulException("Invalid header field: char " + (int) c + " in string " + value - + " does not comply with RFC 7230", true); + + " does not comply with RFC 7230"); } } } From 97fb5af2068ea37a391ee6613694d8c2bf7315de Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Wed, 15 Jul 2020 15:24:24 -0700 Subject: [PATCH 102/273] use separate API for validation not to break existing functionality --- .../com/netflix/zuul/message/Headers.java | 50 ++++++++++++++++--- .../com/netflix/zuul/message/HeadersTest.java | 16 +++--- 2 files changed, 52 insertions(+), 14 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java index 048f7125..d1fda19a 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java @@ -183,6 +183,26 @@ public void set(HeaderName headerName, String value) { setNormal(headerName.getName(), normalName, value); } + /** + * Replace any/all entries with this key, with this single entry and validate. + * + * If value is {@code null}, then not added, but any existing header of same name is removed. + */ + public void setAndValidate(String headerName, @Nullable String value) { + String normalName = HeaderName.normalize(requireNonNull(headerName, "headerName")); + setNormal(validateField(headerName), validateField(normalName), validateField(value)); + } + + /** + * Replace any/all entries with this key, with this single entry and validate. + * + * If value is {@code null}, then not added, but any existing header of same name is removed. + */ + public void setAndValidate(HeaderName headerName, String value) { + String normalName = requireNonNull(headerName, "headerName").getNormalised(); + setNormal(validateField(headerName.getName()), validateField(normalName), validateField(value)); + } + private void setNormal(String originalName, String normalName, @Nullable String value) { int i = findNormal(normalName); if (i == ABSENT) { @@ -283,6 +303,24 @@ public void add(HeaderName headerName, String value) { addNormal(headerName.getName(), normalName, value); } + /** + * Adds the name and value to the headers and validate. + */ + public void addAndValidate(String headerName, String value) { + String normalName = HeaderName.normalize(requireNonNull(headerName, "headerName")); + requireNonNull(value, "value"); + addNormal(validateField(headerName), validateField(normalName), validateField(value)); + } + + /** + * Adds the name and value to the headers and validate + */ + public void addAndValidate(HeaderName headerName, String value) { + String normalName = requireNonNull(headerName, "headerName").getNormalised(); + requireNonNull(value, "value"); + addNormal(validateField(headerName.getName()), validateField(normalName), validateField(value)); + } + /** * Adds all the headers into this headers object. */ @@ -466,7 +504,7 @@ private String originalName(int i) { } private void originalName(int i, String originalName) { - originalNames.set(i, validateField(originalName)); + originalNames.set(i, originalName); } private String name(int i) { @@ -474,7 +512,7 @@ private String name(int i) { } private void name(int i, String name) { - names.set(i, validateField(name)); + names.set(i, name); } private String value(int i) { @@ -482,13 +520,13 @@ private String value(int i) { } private void value(int i, String val) { - values.set(i, validateField(val)); + values.set(i, val); } private void addNormal(String originalName, String normalName, String value) { - originalNames.add(validateField(originalName)); - names.add(validateField(normalName)); - values.add(validateField(value)); + originalNames.add(originalName); + names.add(normalName); + values.add(value); } /** diff --git a/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java b/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java index 9c7dc8ba..2e7e1b55 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java @@ -493,31 +493,31 @@ public void testCaseInsensitiveKeys_PutAll() { public void testSanitizeValues_CRLF() { Headers headers = new Headers(); - assertThrows(ZuulException.class, () -> headers.add("x-test-break1", "a\r\nb\r\nc")); - assertThrows(ZuulException.class, () -> headers.set("x-test-break1", "a\r\nb\r\nc")); + assertThrows(ZuulException.class, () -> headers.addAndValidate("x-test-break1", "a\r\nb\r\nc")); + assertThrows(ZuulException.class, () -> headers.setAndValidate("x-test-break1", "a\r\nb\r\nc")); } @Test public void testSanitizeValues_LF() { Headers headers = new Headers(); - assertThrows(ZuulException.class, () -> headers.add("x-test-break1", "a\nb\nc")); - assertThrows(ZuulException.class, () -> headers.set("x-test-break1", "a\nb\nc")); + assertThrows(ZuulException.class, () -> headers.addAndValidate("x-test-break1", "a\nb\nc")); + assertThrows(ZuulException.class, () -> headers.setAndValidate("x-test-break1", "a\nb\nc")); } @Test public void testSanitizeValues_addSetHeaderName() { Headers headers = new Headers(); - assertThrows(ZuulException.class, () -> headers.set(new HeaderName("x-test-break1"), "a\nb\nc")); - assertThrows(ZuulException.class, () -> headers.add(new HeaderName("x-test-break2"), "a\r\nb\r\nc")); + assertThrows(ZuulException.class, () -> headers.setAndValidate(new HeaderName("x-test-break1"), "a\nb\nc")); + assertThrows(ZuulException.class, () -> headers.addAndValidate(new HeaderName("x-test-break2"), "a\r\nb\r\nc")); } @Test public void testSanitizeValues_nameCRLF() { Headers headers = new Headers(); - assertThrows(ZuulException.class, () -> headers.add("x-test-br\r\neak1", "a\r\nb\r\nc")); - assertThrows(ZuulException.class, () -> headers.set("x-test-br\r\neak2", "a\r\nb\r\nc")); + assertThrows(ZuulException.class, () -> headers.addAndValidate("x-test-br\r\neak1", "a\r\nb\r\nc")); + assertThrows(ZuulException.class, () -> headers.setAndValidate("x-test-br\r\neak2", "a\r\nb\r\nc")); } } From 60ce35082307ef08068c3023cc8d5e7d38f79f35 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Wed, 15 Jul 2020 16:28:42 -0700 Subject: [PATCH 103/273] add javadoc for exception throwing --- .../src/main/java/com/netflix/zuul/message/Headers.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java index d1fda19a..9d70bf15 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java @@ -187,6 +187,8 @@ public void set(HeaderName headerName, String value) { * Replace any/all entries with this key, with this single entry and validate. * * If value is {@code null}, then not added, but any existing header of same name is removed. + * + * @throws ZuulException on invalid name or value */ public void setAndValidate(String headerName, @Nullable String value) { String normalName = HeaderName.normalize(requireNonNull(headerName, "headerName")); @@ -197,6 +199,8 @@ public void setAndValidate(String headerName, @Nullable String value) { * Replace any/all entries with this key, with this single entry and validate. * * If value is {@code null}, then not added, but any existing header of same name is removed. + * + * @throws ZuulException on invalid name or value */ public void setAndValidate(HeaderName headerName, String value) { String normalName = requireNonNull(headerName, "headerName").getNormalised(); @@ -305,6 +309,8 @@ public void add(HeaderName headerName, String value) { /** * Adds the name and value to the headers and validate. + * + * @throws ZuulException on invalid name or value */ public void addAndValidate(String headerName, String value) { String normalName = HeaderName.normalize(requireNonNull(headerName, "headerName")); @@ -314,6 +320,8 @@ public void addAndValidate(String headerName, String value) { /** * Adds the name and value to the headers and validate + * + * @throws ZuulException on invalid name or value */ public void addAndValidate(HeaderName headerName, String value) { String normalName = requireNonNull(headerName, "headerName").getNormalised(); From 9a35563e31e3cd35401eb8cfc98f671d72d90bf8 Mon Sep 17 00:00:00 2001 From: xingrufei Date: Mon, 29 Jun 2020 10:44:41 +0800 Subject: [PATCH 104/273] zuul-core:fix 802,Null pointer Exception in PassportLoggingHandler add testLargeHttpHeaderDecodeResult test case add PassportLoggingHandler test Remove extra blank lines --- .../netty/server/ClientRequestReceiver.java | 3 + .../server/ClientRequestReceiverTest.java | 70 ++++++++++++++++++- 2 files changed, 70 insertions(+), 3 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java index 436c45d8..1b9feb02 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java @@ -126,6 +126,9 @@ public void channelRead(final ChannelHandlerContext ctx, Object msg) throws Exce clientRequest.uri(), ChannelUtils.channelInfoForLogging(ctx.channel()), clientRequest.decoderResult().cause()); + StatusCategoryUtils.setStatusCategory( + zuulRequest.getContext(), + ZuulStatusCategory.FAILURE_CLIENT_BAD_REQUEST); RejectionUtils.rejectByClosingConnection( ctx, ZuulStatusCategory.FAILURE_CLIENT_BAD_REQUEST, diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java index 74eba353..139f50f2 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java @@ -20,24 +20,52 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.mock; +import com.google.common.base.Charsets; +import com.netflix.appinfo.ApplicationInfoManager; +import com.netflix.config.DynamicIntProperty; import com.netflix.netty.common.SourceAddressChannelHandler; +import com.netflix.netty.common.channel.config.ChannelConfig; +import com.netflix.netty.common.channel.config.CommonChannelConfigKeys; +import com.netflix.netty.common.metrics.EventLoopGroupMetrics; +import com.netflix.netty.common.proxyprotocol.StripUntrustedProxyHeadersHandler; +import com.netflix.netty.common.status.ServerStatusManager; +import com.netflix.spectator.api.DefaultRegistry; +import com.netflix.spectator.api.NoopRegistry; +import com.netflix.spectator.api.Spectator; import com.netflix.zuul.message.http.HttpRequestMessageImpl; +import com.netflix.zuul.netty.insights.PassportLoggingHandler; +import com.netflix.zuul.netty.ratelimiting.NullChannelHandlerProvider; +import io.netty.bootstrap.Bootstrap; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; +import io.netty.channel.*; import io.netty.channel.embedded.EmbeddedChannel; -import io.netty.handler.codec.http.DefaultFullHttpRequest; -import io.netty.handler.codec.http.HttpMethod; -import io.netty.handler.codec.http.HttpVersion; +import io.netty.channel.group.ChannelGroup; +import io.netty.channel.group.DefaultChannelGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.SocketChannel; +import io.netty.channel.socket.nio.NioSocketChannel; +import io.netty.handler.codec.http.*; +import io.netty.util.concurrent.GlobalEventExecutor; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; +import java.net.InetSocketAddress; +import java.net.SocketAddress; +import java.nio.charset.Charset; +import java.util.HashMap; +import java.util.Map; + /** * Unit tests for {@link ClientRequestReceiver}. */ @RunWith(JUnit4.class) public class ClientRequestReceiverTest { + + @Test public void largeResponse_atLimit() { ClientRequestReceiver receiver = new ClientRequestReceiver(null); @@ -100,4 +128,40 @@ public void largeResponse_aboveLimit() { assertTrue(result.getContext().shouldSendErrorResponse()); channel.close(); } + + @Test + public void testLargeHttpHeaderDecodeResult(){ + + int maxInitialLineLength = BaseZuulChannelInitializer.MAX_INITIAL_LINE_LENGTH.get(); + int maxHeaderSize = 10; + int maxChunkSize = BaseZuulChannelInitializer.MAX_CHUNK_SIZE.get(); + ClientRequestReceiver receiver = new ClientRequestReceiver(null); + EmbeddedChannel channel = new EmbeddedChannel(new HttpRequestEncoder()); + PassportLoggingHandler loggingHandler = new PassportLoggingHandler(new DefaultRegistry()); + + // Required for messages + channel.attr(SourceAddressChannelHandler.ATTR_SERVER_LOCAL_PORT).set(1234); + channel.pipeline().addLast(new HttpServerCodec( + maxInitialLineLength, + maxHeaderSize, + maxChunkSize, + false + )); + channel.pipeline().addLast(receiver); + channel.pipeline().addLast(loggingHandler); + + String str = "test-header-value"; + ByteBuf buf = Unpooled.buffer(1); + HttpRequest httpRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "/post", buf); + for(int i = 0;i< 100;i++) { + httpRequest.headers().add("test-header" + i, str); + } + + channel.writeOutbound(httpRequest); + ByteBuf byteBuf = channel.readOutbound(); + channel.writeInbound(byteBuf); + channel.readInbound(); + channel.close(); + } } + From faabeb322c6a9c4049c70d5234acd6d066cbf8ef Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Thu, 23 Jul 2020 10:13:31 -0700 Subject: [PATCH 105/273] Assert status category set on TooLongFrameException --- .../zuul/netty/server/ClientRequestReceiverTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java index 139f50f2..8ec61915 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java @@ -16,6 +16,7 @@ package com.netflix.zuul.netty.server; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; @@ -34,9 +35,12 @@ import com.netflix.spectator.api.DefaultRegistry; import com.netflix.spectator.api.NoopRegistry; import com.netflix.spectator.api.Spectator; +import com.netflix.zuul.message.http.HttpRequestMessage; import com.netflix.zuul.message.http.HttpRequestMessageImpl; import com.netflix.zuul.netty.insights.PassportLoggingHandler; import com.netflix.zuul.netty.ratelimiting.NullChannelHandlerProvider; +import com.netflix.zuul.stats.status.StatusCategoryUtils; +import com.netflix.zuul.stats.status.ZuulStatusCategory; import io.netty.bootstrap.Bootstrap; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; @@ -162,6 +166,9 @@ public void testLargeHttpHeaderDecodeResult(){ channel.writeInbound(byteBuf); channel.readInbound(); channel.close(); + + HttpRequestMessage request = ClientRequestReceiver.getRequestFromChannel(channel); + assertEquals(StatusCategoryUtils.getStatusCategory(request.getContext()), ZuulStatusCategory.FAILURE_CLIENT_BAD_REQUEST); } } From 7aa64adfe51b9b8eb5935f47a512c1f66d7c753e Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Thu, 23 Jul 2020 10:25:19 -0700 Subject: [PATCH 106/273] Fix test naming --- .../netflix/zuul/netty/server/ClientRequestReceiverTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java index 8ec61915..4e81dca3 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java @@ -134,7 +134,7 @@ public void largeResponse_aboveLimit() { } @Test - public void testLargeHttpHeaderDecodeResult(){ + public void maxHeaderSizeExceeded_setBadRequestStatus(){ int maxInitialLineLength = BaseZuulChannelInitializer.MAX_INITIAL_LINE_LENGTH.get(); int maxHeaderSize = 10; From e0d3fcf841bb897a338376bc4eca1d6c9acbb236 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Thu, 23 Jul 2020 15:51:01 -0700 Subject: [PATCH 107/273] Fix variable typo. Remove unused code --- .../zuul/context/CommonContextKeys.java | 2 +- .../zuul/filters/endpoint/ProxyEndpoint.java | 4 +-- .../zuul/origins/BasicNettyOrigin.java | 2 +- .../stats/status/StatusCategoryUtils.java | 25 +++---------------- 4 files changed, 8 insertions(+), 25 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java b/zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java index 711b6579..7a7b8f8d 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java +++ b/zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java @@ -24,7 +24,7 @@ */ public class CommonContextKeys { - public static final String STATUS_CATGEORY = "status_category"; + public static final String STATUS_CATEGORY = "status_category"; public static final String ORIGIN_STATUS_CATEGORY = "origin_status_category"; public static final String ORIGIN_STATUS = "origin_status"; public static final String REQUEST_ATTEMPTS = "request_attempts"; diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 38a9b7ab..475070bf 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -852,7 +852,7 @@ private HttpResponseMessage buildZuulHttpResponse(final HttpResponse httpRespons origin.recordFinalResponse(zuulResponse); origin.recordFinalError(zuulRequest, ex); origin.getProxyTiming(zuulRequest).end(); - zuulCtx.set(CommonContextKeys.STATUS_CATGEORY, statusCategory); + zuulCtx.set(CommonContextKeys.STATUS_CATEGORY, statusCategory); zuulCtx.setError(ex); zuulCtx.put("origin_http_status", Integer.toString(respStatus)); @@ -1111,7 +1111,7 @@ private NettyOrigin getOrCreateOrigin(OriginManager originManager, private void verifyOrigin(SessionContext context, HttpRequestMessage request, String restClientName, Origin primaryOrigin) { if (primaryOrigin == null) { // If no origin found then add specific error-cause metric tag, and throw an exception with 404 status. - context.set(CommonContextKeys.STATUS_CATGEORY, SUCCESS_LOCAL_NO_ROUTE); + context.set(CommonContextKeys.STATUS_CATEGORY, SUCCESS_LOCAL_NO_ROUTE); String causeName = "RESTCLIENT_NOTFOUND"; originNotFound(context, causeName); ZuulException ze = new ZuulException("No origin found for request. name=" + restClientName diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java index 17fe07fa..7158447a 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java @@ -192,7 +192,7 @@ public void recordFinalError(HttpRequestMessage requestMsg, Throwable throwable) // Choose StatusCategory based on the ErrorType. final ErrorType et = requestAttemptFactory.mapNettyToOutboundErrorType(throwable); final StatusCategory nfs = et.getStatusCategory(); - zuulCtx.set(CommonContextKeys.STATUS_CATGEORY, nfs); + zuulCtx.set(CommonContextKeys.STATUS_CATEGORY, nfs); zuulCtx.set(CommonContextKeys.ORIGIN_STATUS_CATEGORY, nfs); zuulCtx.setError(throwable); diff --git a/zuul-core/src/main/java/com/netflix/zuul/stats/status/StatusCategoryUtils.java b/zuul-core/src/main/java/com/netflix/zuul/stats/status/StatusCategoryUtils.java index 13898b26..1e06f00a 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/stats/status/StatusCategoryUtils.java +++ b/zuul-core/src/main/java/com/netflix/zuul/stats/status/StatusCategoryUtils.java @@ -19,9 +19,6 @@ import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.context.SessionContext; import com.netflix.zuul.message.ZuulMessage; -import com.netflix.zuul.message.http.HttpResponseMessage; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * User: michaels@netflix.com @@ -29,31 +26,17 @@ * Time: 2:48 PM */ public class StatusCategoryUtils { - private static final Logger LOG = LoggerFactory.getLogger(StatusCategoryUtils.class); public static StatusCategory getStatusCategory(ZuulMessage msg) { return getStatusCategory(msg.getContext()); } public static StatusCategory getStatusCategory(SessionContext ctx) { - return (StatusCategory) ctx.get(CommonContextKeys.STATUS_CATGEORY); + return (StatusCategory) ctx.get(CommonContextKeys.STATUS_CATEGORY); } public static void setStatusCategory(SessionContext ctx, StatusCategory statusCategory) { - ctx.set(CommonContextKeys.STATUS_CATGEORY, statusCategory); - } - - public static StatusCategory getOriginStatusCategory(SessionContext ctx) { - return (StatusCategory) ctx.get(CommonContextKeys.ORIGIN_STATUS_CATEGORY); - } - - public static boolean isResponseHttpErrorStatus(HttpResponseMessage response) { - boolean isHttpError = false; - if (response != null) { - int status = response.getStatus(); - isHttpError = isResponseHttpErrorStatus(status); - } - return isHttpError; + ctx.set(CommonContextKeys.STATUS_CATEGORY, statusCategory); } public static boolean isResponseHttpErrorStatus(int status) { @@ -62,9 +45,9 @@ public static boolean isResponseHttpErrorStatus(int status) { public static void storeStatusCategoryIfNotAlreadyFailure(final SessionContext context, final StatusCategory statusCategory) { if (statusCategory != null) { - final StatusCategory nfs = (StatusCategory) context.get(CommonContextKeys.STATUS_CATGEORY); + final StatusCategory nfs = (StatusCategory) context.get(CommonContextKeys.STATUS_CATEGORY); if (nfs == null || nfs.getGroup().getId() == ZuulStatusCategoryGroup.SUCCESS.getId()) { - context.set(CommonContextKeys.STATUS_CATGEORY, statusCategory); + context.set(CommonContextKeys.STATUS_CATEGORY, statusCategory); } } } From dac408ff0fe5ce48fafd36e23b98ade4f6b7254e Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Fri, 24 Jul 2020 12:14:51 -0700 Subject: [PATCH 108/273] Revert "Fix variable typo. Remove unused code" This reverts commit 9868c38d2f1f29b841573f16c4793c2c3a96e7b3. --- .../zuul/context/CommonContextKeys.java | 2 +- .../zuul/filters/endpoint/ProxyEndpoint.java | 4 +-- .../zuul/origins/BasicNettyOrigin.java | 2 +- .../stats/status/StatusCategoryUtils.java | 25 ++++++++++++++++--- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java b/zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java index 7a7b8f8d..711b6579 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java +++ b/zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java @@ -24,7 +24,7 @@ */ public class CommonContextKeys { - public static final String STATUS_CATEGORY = "status_category"; + public static final String STATUS_CATGEORY = "status_category"; public static final String ORIGIN_STATUS_CATEGORY = "origin_status_category"; public static final String ORIGIN_STATUS = "origin_status"; public static final String REQUEST_ATTEMPTS = "request_attempts"; diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 475070bf..38a9b7ab 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -852,7 +852,7 @@ private HttpResponseMessage buildZuulHttpResponse(final HttpResponse httpRespons origin.recordFinalResponse(zuulResponse); origin.recordFinalError(zuulRequest, ex); origin.getProxyTiming(zuulRequest).end(); - zuulCtx.set(CommonContextKeys.STATUS_CATEGORY, statusCategory); + zuulCtx.set(CommonContextKeys.STATUS_CATGEORY, statusCategory); zuulCtx.setError(ex); zuulCtx.put("origin_http_status", Integer.toString(respStatus)); @@ -1111,7 +1111,7 @@ private NettyOrigin getOrCreateOrigin(OriginManager originManager, private void verifyOrigin(SessionContext context, HttpRequestMessage request, String restClientName, Origin primaryOrigin) { if (primaryOrigin == null) { // If no origin found then add specific error-cause metric tag, and throw an exception with 404 status. - context.set(CommonContextKeys.STATUS_CATEGORY, SUCCESS_LOCAL_NO_ROUTE); + context.set(CommonContextKeys.STATUS_CATGEORY, SUCCESS_LOCAL_NO_ROUTE); String causeName = "RESTCLIENT_NOTFOUND"; originNotFound(context, causeName); ZuulException ze = new ZuulException("No origin found for request. name=" + restClientName diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java index 7158447a..17fe07fa 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java @@ -192,7 +192,7 @@ public void recordFinalError(HttpRequestMessage requestMsg, Throwable throwable) // Choose StatusCategory based on the ErrorType. final ErrorType et = requestAttemptFactory.mapNettyToOutboundErrorType(throwable); final StatusCategory nfs = et.getStatusCategory(); - zuulCtx.set(CommonContextKeys.STATUS_CATEGORY, nfs); + zuulCtx.set(CommonContextKeys.STATUS_CATGEORY, nfs); zuulCtx.set(CommonContextKeys.ORIGIN_STATUS_CATEGORY, nfs); zuulCtx.setError(throwable); diff --git a/zuul-core/src/main/java/com/netflix/zuul/stats/status/StatusCategoryUtils.java b/zuul-core/src/main/java/com/netflix/zuul/stats/status/StatusCategoryUtils.java index 1e06f00a..13898b26 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/stats/status/StatusCategoryUtils.java +++ b/zuul-core/src/main/java/com/netflix/zuul/stats/status/StatusCategoryUtils.java @@ -19,6 +19,9 @@ import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.context.SessionContext; import com.netflix.zuul.message.ZuulMessage; +import com.netflix.zuul.message.http.HttpResponseMessage; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * User: michaels@netflix.com @@ -26,17 +29,31 @@ * Time: 2:48 PM */ public class StatusCategoryUtils { + private static final Logger LOG = LoggerFactory.getLogger(StatusCategoryUtils.class); public static StatusCategory getStatusCategory(ZuulMessage msg) { return getStatusCategory(msg.getContext()); } public static StatusCategory getStatusCategory(SessionContext ctx) { - return (StatusCategory) ctx.get(CommonContextKeys.STATUS_CATEGORY); + return (StatusCategory) ctx.get(CommonContextKeys.STATUS_CATGEORY); } public static void setStatusCategory(SessionContext ctx, StatusCategory statusCategory) { - ctx.set(CommonContextKeys.STATUS_CATEGORY, statusCategory); + ctx.set(CommonContextKeys.STATUS_CATGEORY, statusCategory); + } + + public static StatusCategory getOriginStatusCategory(SessionContext ctx) { + return (StatusCategory) ctx.get(CommonContextKeys.ORIGIN_STATUS_CATEGORY); + } + + public static boolean isResponseHttpErrorStatus(HttpResponseMessage response) { + boolean isHttpError = false; + if (response != null) { + int status = response.getStatus(); + isHttpError = isResponseHttpErrorStatus(status); + } + return isHttpError; } public static boolean isResponseHttpErrorStatus(int status) { @@ -45,9 +62,9 @@ public static boolean isResponseHttpErrorStatus(int status) { public static void storeStatusCategoryIfNotAlreadyFailure(final SessionContext context, final StatusCategory statusCategory) { if (statusCategory != null) { - final StatusCategory nfs = (StatusCategory) context.get(CommonContextKeys.STATUS_CATEGORY); + final StatusCategory nfs = (StatusCategory) context.get(CommonContextKeys.STATUS_CATGEORY); if (nfs == null || nfs.getGroup().getId() == ZuulStatusCategoryGroup.SUCCESS.getId()) { - context.set(CommonContextKeys.STATUS_CATEGORY, statusCategory); + context.set(CommonContextKeys.STATUS_CATGEORY, statusCategory); } } } From ec77b9ed1366a899c681c9d63feb063a0e3a7650 Mon Sep 17 00:00:00 2001 From: kyagna Date: Wed, 29 Jul 2020 16:51:48 -0700 Subject: [PATCH 109/273] restrict header validation to control characters --- .../com/netflix/zuul/message/Headers.java | 2 +- .../com/netflix/zuul/message/HeadersTest.java | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java index 9d70bf15..2087c94c 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java @@ -554,7 +554,7 @@ private String validateField(String value) { for (int i = 0; i < l; i++) { char c = value.charAt(i); // ASCII non-control characters, per RFC 7230 but slightly more lenient - if (c < 31 || c >= 127) { + if (c < 31 || c == 127) { Spectator.globalRegistry().counter("zuul.header.invalid.char").increment(); throw new ZuulException("Invalid header field: char " + (int) c + " in string " + value + " does not comply with RFC 7230"); diff --git a/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java b/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java index 2e7e1b55..fb3f5907 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java @@ -23,6 +23,8 @@ import com.google.common.truth.Truth; import com.netflix.zuul.exception.ZuulException; + +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -505,6 +507,39 @@ public void testSanitizeValues_LF() { assertThrows(ZuulException.class, () -> headers.setAndValidate("x-test-break1", "a\nb\nc")); } + @Test + public void testSanitizeValues_ISO88591Value() { + Headers headers = new Headers(); + + headers.addAndValidate("x-test-ISO-8859-1", "P Venkmän"); + Truth.assertThat(headers.getAll("x-test-ISO-8859-1")).containsExactly("P Venkmän"); + Truth.assertThat(headers.size()).isEqualTo(1); + + headers.setAndValidate("x-test-ISO-8859-1", "Venkmän"); + Truth.assertThat(headers.getAll("x-test-ISO-8859-1")).containsExactly("Venkmän"); + Truth.assertThat(headers.size()).isEqualTo(1); + } + + @Test + public void testSanitizeValues_UTF8Value() { + // Ideally Unicode characters should not appear in the Header values. + Headers headers = new Headers(); + + String rawHeaderValue = "\u017d" + "\u0172" + "\u016e" + "\u013F"; //ŽŲŮĽ + byte[] bytes = rawHeaderValue.getBytes(StandardCharsets.UTF_8); + String utf8HeaderValue = new String(bytes, StandardCharsets.UTF_8); + headers.addAndValidate("x-test-UTF8", utf8HeaderValue); + Truth.assertThat(headers.getAll("x-test-UTF8")).containsExactly(utf8HeaderValue); + Truth.assertThat(headers.size()).isEqualTo(1); + + rawHeaderValue = "\u017d" + "\u0172" + "uuu" + "\u016e" + "\u013F"; //ŽŲuuuŮĽ + bytes = rawHeaderValue.getBytes(StandardCharsets.UTF_8); + utf8HeaderValue = new String(bytes, StandardCharsets.UTF_8); + headers.setAndValidate("x-test-UTF8", utf8HeaderValue); + Truth.assertThat(headers.getAll("x-test-UTF8")).containsExactly(utf8HeaderValue); + Truth.assertThat(headers.size()).isEqualTo(1); + } + @Test public void testSanitizeValues_addSetHeaderName() { Headers headers = new Headers(); From d8838c5131bf1ea58cd141bd2a8cd0ff8ea1ab95 Mon Sep 17 00:00:00 2001 From: ldayton <43729618+ldayton@users.noreply.github.com> Date: Mon, 3 Aug 2020 14:44:27 -0700 Subject: [PATCH 110/273] remove erroneous @Nullable annotations --- .../common/proxyprotocol/ElbProxyProtocolChannelHandler.java | 3 +-- .../netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java index 59ec25e1..3c83c927 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandler.java @@ -25,7 +25,6 @@ import io.netty.channel.ChannelPipeline; import io.netty.handler.codec.ProtocolDetectionState; import io.netty.handler.codec.haproxy.HAProxyMessageDecoder; -import javax.annotation.Nullable; /** * Decides if we need to decode a HAProxyMessage. If so, adds the decoder followed by the handler. @@ -38,7 +37,7 @@ public final class ElbProxyProtocolChannelHandler extends ChannelInboundHandlerA private final Registry spectatorRegistry; private final Counter hapmDecodeFailure; - public ElbProxyProtocolChannelHandler(@Nullable Registry registry, boolean withProxyProtocol) { + public ElbProxyProtocolChannelHandler(Registry registry, boolean withProxyProtocol) { this.withProxyProtocol = withProxyProtocol; this.spectatorRegistry = checkNotNull(registry); this.hapmDecodeFailure = spectatorRegistry.counter("zuul.hapm.failure"); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java index 472fbfdf..9b4942da 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java @@ -33,7 +33,6 @@ import io.netty.util.AttributeKey; import com.netflix.netty.common.SourceAddressChannelHandler; import com.netflix.netty.common.ssl.SslHandshakeInfo; -import javax.annotation.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,7 +57,7 @@ public class SslHandshakeInfoHandler extends ChannelInboundHandlerAdapter private final Registry spectatorRegistry; private final boolean isSSlFromIntermediary; - public SslHandshakeInfoHandler(@Nullable Registry spectatorRegistry, boolean isSSlFromIntermediary) + public SslHandshakeInfoHandler(Registry spectatorRegistry, boolean isSSlFromIntermediary) { this.spectatorRegistry = checkNotNull(spectatorRegistry); this.isSSlFromIntermediary = isSSlFromIntermediary; From 97bca852c8fb121ab22554c2e689bda797030050 Mon Sep 17 00:00:00 2001 From: ldayton <43729618+ldayton@users.noreply.github.com> Date: Mon, 3 Aug 2020 16:42:48 -0700 Subject: [PATCH 111/273] Respect Proxy Protocol value of original client IP address (#865) use proxy protocol port for Zuul HttpRequestMessage.getOriginalPort(), if available --- .../zuul/context/CommonContextKeys.java | 6 ++ .../message/http/HttpRequestMessageImpl.java | 7 +- .../netty/server/ClientRequestReceiver.java | 6 ++ .../http/HttpRequestMessageImplTest.java | 12 +++- .../server/ClientRequestReceiverTest.java | 64 +++++++++---------- 5 files changed, 59 insertions(+), 36 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java b/zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java index 711b6579..5ba154c4 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java +++ b/zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java @@ -44,6 +44,12 @@ public class CommonContextKeys { public static final String ACTUAL_VIP = "origin_vip_actual"; public static final String ORIGIN_VIP_SECURE = "origin_vip_secure"; + /** + * The original client port reported to Zuul by a proxy running Proxy Protocol. + * Will only be set if both Zuul and the connected proxy are both using set to use Proxy Protocol. + */ + public static final String PROXY_PROTOCOL_PORT = "proxy_protocol_port"; + public static final String SSL_HANDSHAKE_INFO = "ssl_handshake_info"; public static final String GZIPPER = "gzipper"; diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java index 0ee4bfee..57c712f9 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java @@ -522,14 +522,17 @@ public String getOriginalProtocol() @Override public int getOriginalPort() { try { - return getOriginalPort(getHeaders(), getPort()); + return getOriginalPort(getContext(), getHeaders(), getPort()); } catch (URISyntaxException e) { throw new IllegalArgumentException(e); } } @VisibleForTesting - static int getOriginalPort(Headers headers, int serverPort) throws URISyntaxException { + static int getOriginalPort(SessionContext context, Headers headers, int serverPort) throws URISyntaxException { + if (context.containsKey(CommonContextKeys.PROXY_PROTOCOL_PORT)) { + return (int) context.get(CommonContextKeys.PROXY_PROTOCOL_PORT); + } String portStr = headers.getFirst(HttpHeaderNames.X_FORWARDED_PORT); if (portStr != null) { return Integer.parseInt(portStr); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java index 1b9feb02..8a74bf5e 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java @@ -22,6 +22,7 @@ import static com.netflix.zuul.netty.server.http2.Http2OrHttpHandler.PROTOCOL_NAME; import com.netflix.netty.common.SourceAddressChannelHandler; +import com.netflix.netty.common.proxyprotocol.HAProxyMessageChannelHandler; import com.netflix.netty.common.ssl.SslHandshakeInfo; import com.netflix.netty.common.throttle.RejectionUtils; import com.netflix.zuul.context.CommonContextKeys; @@ -62,6 +63,7 @@ import io.netty.handler.codec.http.LastHttpContent; import io.netty.util.AttributeKey; import io.netty.util.ReferenceCountUtil; + import java.net.SocketAddress; import java.util.List; import java.util.Map; @@ -267,6 +269,10 @@ private HttpRequestMessage buildZuulHttpRequest( // This is the only way I found to get the port of the request with netty... final int port = channel.attr(SourceAddressChannelHandler.ATTR_SERVER_LOCAL_PORT).get(); + final HAProxyMessage haProxyMessage = channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_MESSAGE).get(); + if (haProxyMessage != null) { + context.set(CommonContextKeys.PROXY_PROTOCOL_PORT, haProxyMessage.sourcePort()); + } final String serverName = channel.attr(SourceAddressChannelHandler.ATTR_SERVER_LOCAL_ADDRESS).get(); final SocketAddress clientDestinationAddress = channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDR).get(); diff --git a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java index 4edc37ab..33c88368 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java @@ -25,6 +25,7 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.context.SessionContext; import com.netflix.zuul.message.Headers; import io.netty.channel.local.LocalAddress; @@ -334,7 +335,16 @@ public void getOriginalPort_fallsBackOnUnbracketedIpv6Address() throws URISyntax Headers headers = new Headers(); headers.add("Host", "ba::33"); - assertEquals(9999, HttpRequestMessageImpl.getOriginalPort(headers, 9999)); + assertEquals(9999, HttpRequestMessageImpl.getOriginalPort(new SessionContext(), headers, 9999)); + } + + @Test + public void getOriginalPort_respectsProxyProtocol() throws URISyntaxException { + SessionContext context = new SessionContext(); + context.set(CommonContextKeys.PROXY_PROTOCOL_PORT, 443); + Headers headers = new Headers(); + headers.add("X-Forwarded-Port", "6000"); + assertEquals(443, HttpRequestMessageImpl.getOriginalPort(context, headers, 9999)); } @Test diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java index 4e81dca3..7f61bbc0 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java @@ -16,59 +16,57 @@ package com.netflix.zuul.netty.server; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.mock; - -import com.google.common.base.Charsets; -import com.netflix.appinfo.ApplicationInfoManager; -import com.netflix.config.DynamicIntProperty; import com.netflix.netty.common.SourceAddressChannelHandler; -import com.netflix.netty.common.channel.config.ChannelConfig; -import com.netflix.netty.common.channel.config.CommonChannelConfigKeys; -import com.netflix.netty.common.metrics.EventLoopGroupMetrics; -import com.netflix.netty.common.proxyprotocol.StripUntrustedProxyHeadersHandler; -import com.netflix.netty.common.status.ServerStatusManager; +import com.netflix.netty.common.proxyprotocol.HAProxyMessageChannelHandler; import com.netflix.spectator.api.DefaultRegistry; -import com.netflix.spectator.api.NoopRegistry; -import com.netflix.spectator.api.Spectator; +import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.message.http.HttpRequestMessage; import com.netflix.zuul.message.http.HttpRequestMessageImpl; import com.netflix.zuul.netty.insights.PassportLoggingHandler; -import com.netflix.zuul.netty.ratelimiting.NullChannelHandlerProvider; import com.netflix.zuul.stats.status.StatusCategoryUtils; import com.netflix.zuul.stats.status.ZuulStatusCategory; -import io.netty.bootstrap.Bootstrap; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; -import io.netty.channel.*; import io.netty.channel.embedded.EmbeddedChannel; -import io.netty.channel.group.ChannelGroup; -import io.netty.channel.group.DefaultChannelGroup; -import io.netty.channel.nio.NioEventLoopGroup; -import io.netty.channel.socket.SocketChannel; -import io.netty.channel.socket.nio.NioSocketChannel; +import io.netty.handler.codec.haproxy.HAProxyCommand; +import io.netty.handler.codec.haproxy.HAProxyMessage; +import io.netty.handler.codec.haproxy.HAProxyProtocolVersion; +import io.netty.handler.codec.haproxy.HAProxyProxiedProtocol; import io.netty.handler.codec.http.*; -import io.netty.util.concurrent.GlobalEventExecutor; import org.junit.Test; import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.mockito.junit.MockitoJUnitRunner; -import java.net.InetSocketAddress; -import java.net.SocketAddress; -import java.nio.charset.Charset; -import java.util.HashMap; -import java.util.Map; +import static org.junit.Assert.*; /** * Unit tests for {@link ClientRequestReceiver}. */ -@RunWith(JUnit4.class) +@RunWith(MockitoJUnitRunner.class) public class ClientRequestReceiverTest { + @Test + public void proxyProtocol_portSetInContext() { + HAProxyMessage hapm = new HAProxyMessage( + HAProxyProtocolVersion.V2, + HAProxyCommand.PROXY, + HAProxyProxiedProtocol.TCP4, + "1.1.1.1", "2.2.2.2", 444, 9000); + ClientRequestReceiver receiver = new ClientRequestReceiver(null); + EmbeddedChannel channel = new EmbeddedChannel(receiver); + channel.attr(SourceAddressChannelHandler.ATTR_SERVER_LOCAL_PORT).set(1234); + channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_MESSAGE).set(hapm); + HttpRequestMessageImpl result; + { + channel.writeInbound(new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "/post", Unpooled.buffer())); + result = channel.readInbound(); + result.disposeBufferedBody(); + } + assertEquals(result.getContext().get(CommonContextKeys.PROXY_PROTOCOL_PORT), 444); + assertEquals(result.getOriginalPort(), 444); + channel.close(); + } + @Test public void largeResponse_atLimit() { From fd6a5e4d980145a88a9dcd8492fa297e5f977864 Mon Sep 17 00:00:00 2001 From: ldayton <43729618+ldayton@users.noreply.github.com> Date: Tue, 4 Aug 2020 17:47:23 -0700 Subject: [PATCH 112/273] fix bug where x-forwarded-for was using ppv2 source address instead of destination (#869) --- .../com/netflix/zuul/netty/server/ClientRequestReceiver.java | 2 +- .../netflix/zuul/netty/server/ClientRequestReceiverTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java index 8a74bf5e..12c5a206 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java @@ -271,7 +271,7 @@ private HttpRequestMessage buildZuulHttpRequest( final int port = channel.attr(SourceAddressChannelHandler.ATTR_SERVER_LOCAL_PORT).get(); final HAProxyMessage haProxyMessage = channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_MESSAGE).get(); if (haProxyMessage != null) { - context.set(CommonContextKeys.PROXY_PROTOCOL_PORT, haProxyMessage.sourcePort()); + context.set(CommonContextKeys.PROXY_PROTOCOL_PORT, haProxyMessage.destinationPort()); } final String serverName = channel.attr(SourceAddressChannelHandler.ATTR_SERVER_LOCAL_ADDRESS).get(); final SocketAddress clientDestinationAddress = channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDR).get(); diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java index 7f61bbc0..6658605a 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java @@ -51,7 +51,7 @@ public void proxyProtocol_portSetInContext() { HAProxyProtocolVersion.V2, HAProxyCommand.PROXY, HAProxyProxiedProtocol.TCP4, - "1.1.1.1", "2.2.2.2", 444, 9000); + "1.1.1.1", "2.2.2.2", 9000, 444); ClientRequestReceiver receiver = new ClientRequestReceiver(null); EmbeddedChannel channel = new EmbeddedChannel(receiver); channel.attr(SourceAddressChannelHandler.ATTR_SERVER_LOCAL_PORT).set(1234); From b04693dd41d6ad68d3570b8807b5f7ed8c221861 Mon Sep 17 00:00:00 2001 From: ldayton <43729618+ldayton@users.noreply.github.com> Date: Thu, 6 Aug 2020 13:18:48 -0700 Subject: [PATCH 113/273] refactor how PPv2 original client destination addr is set (#870) - refactor how PPv2 original client destination addr is set - add test for HttpRequestImpl.getClientDestinationPort() --- .../common/SourceAddressChannelHandler.java | 6 +++++ .../HAProxyMessageChannelHandler.java | 6 +++-- .../zuul/context/CommonContextKeys.java | 4 +-- .../message/http/HttpRequestMessageImpl.java | 4 +-- .../netty/server/ClientRequestReceiver.java | 13 +++++----- .../http/HttpRequestMessageImplTest.java | 6 ++++- .../server/ClientRequestReceiverTest.java | 26 ++++++++----------- 7 files changed, 36 insertions(+), 29 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/SourceAddressChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/SourceAddressChannelHandler.java index 78450876..8071962e 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/SourceAddressChannelHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/SourceAddressChannelHandler.java @@ -48,6 +48,12 @@ public final class SourceAddressChannelHandler extends ChannelInboundHandlerAdap */ public static final AttributeKey ATTR_REMOTE_ADDR = AttributeKey.newInstance("_remote_addr"); + /** + * Indicates the destination address received from Proxy Protocol. Not set otherwise + */ + public static final AttributeKey ATTR_PROXY_PROTOCOL_DESTINATION_ADDRESS = + AttributeKey.newInstance("_proxy_protocol_destination_address"); + /** Use {@link #ATTR_REMOTE_ADDR} instead. */ @Deprecated public static final AttributeKey ATTR_SOURCE_INET_ADDR = diff --git a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java index 860702da..6f6e53ed 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java @@ -54,7 +54,6 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception if (destinationAddress != null) { channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDRESS).set(destinationAddress); channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_PORT).set(hapm.destinationPort()); - SocketAddress addr; out: { @@ -63,8 +62,11 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception throw new IllegalArgumentException("unknown proxy protocl" + destinationAddress); case TCP4: case TCP6: - addr = new InetSocketAddress( + InetSocketAddress inetAddr = new InetSocketAddress( InetAddresses.forString(destinationAddress), hapm.destinationPort()); + addr = inetAddr; + // setting PPv2 explicitly because SourceAddressChannelHandler.ATTR_LOCAL_ADDR could be PPv2 or not + channel.attr(SourceAddressChannelHandler.ATTR_PROXY_PROTOCOL_DESTINATION_ADDRESS).set(inetAddr); break out; case UNIX_STREAM: // TODO: implement case UDP4: diff --git a/zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java b/zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java index 5ba154c4..d4d40c77 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java +++ b/zuul-core/src/main/java/com/netflix/zuul/context/CommonContextKeys.java @@ -45,10 +45,10 @@ public class CommonContextKeys { public static final String ORIGIN_VIP_SECURE = "origin_vip_secure"; /** - * The original client port reported to Zuul by a proxy running Proxy Protocol. + * The original client destination address Zuul by a proxy running Proxy Protocol. * Will only be set if both Zuul and the connected proxy are both using set to use Proxy Protocol. */ - public static final String PROXY_PROTOCOL_PORT = "proxy_protocol_port"; + public static final String PROXY_PROTOCOL_DESTINATION_ADDRESS = "proxy_protocol_destination_address"; public static final String SSL_HANDSHAKE_INFO = "ssl_handshake_info"; diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java index 57c712f9..490eb77a 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java @@ -530,8 +530,8 @@ public int getOriginalPort() { @VisibleForTesting static int getOriginalPort(SessionContext context, Headers headers, int serverPort) throws URISyntaxException { - if (context.containsKey(CommonContextKeys.PROXY_PROTOCOL_PORT)) { - return (int) context.get(CommonContextKeys.PROXY_PROTOCOL_PORT); + if (context.containsKey(CommonContextKeys.PROXY_PROTOCOL_DESTINATION_ADDRESS)) { + return ((InetSocketAddress) context.get(CommonContextKeys.PROXY_PROTOCOL_DESTINATION_ADDRESS)).getPort(); } String portStr = headers.getFirst(HttpHeaderNames.X_FORWARDED_PORT); if (portStr != null) { diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java index 12c5a206..9b23d442 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java @@ -20,9 +20,7 @@ import static com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteReason; import static com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteReason.SESSION_COMPLETE; import static com.netflix.zuul.netty.server.http2.Http2OrHttpHandler.PROTOCOL_NAME; - import com.netflix.netty.common.SourceAddressChannelHandler; -import com.netflix.netty.common.proxyprotocol.HAProxyMessageChannelHandler; import com.netflix.netty.common.ssl.SslHandshakeInfo; import com.netflix.netty.common.throttle.RejectionUtils; import com.netflix.zuul.context.CommonContextKeys; @@ -63,7 +61,7 @@ import io.netty.handler.codec.http.LastHttpContent; import io.netty.util.AttributeKey; import io.netty.util.ReferenceCountUtil; - +import java.net.InetSocketAddress; import java.net.SocketAddress; import java.util.List; import java.util.Map; @@ -269,12 +267,13 @@ private HttpRequestMessage buildZuulHttpRequest( // This is the only way I found to get the port of the request with netty... final int port = channel.attr(SourceAddressChannelHandler.ATTR_SERVER_LOCAL_PORT).get(); - final HAProxyMessage haProxyMessage = channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_MESSAGE).get(); - if (haProxyMessage != null) { - context.set(CommonContextKeys.PROXY_PROTOCOL_PORT, haProxyMessage.destinationPort()); - } final String serverName = channel.attr(SourceAddressChannelHandler.ATTR_SERVER_LOCAL_ADDRESS).get(); final SocketAddress clientDestinationAddress = channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDR).get(); + final InetSocketAddress proxyProtocolDestinationAddress = + channel.attr(SourceAddressChannelHandler.ATTR_PROXY_PROTOCOL_DESTINATION_ADDRESS).get(); + if (proxyProtocolDestinationAddress != null) { + context.set(CommonContextKeys.PROXY_PROTOCOL_DESTINATION_ADDRESS, proxyProtocolDestinationAddress); + } // Store info about the SSL handshake if applicable, and choose the http scheme. String scheme = SCHEME_HTTP; diff --git a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java index 33c88368..d4b3f432 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java @@ -25,10 +25,13 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import com.google.common.net.InetAddresses; import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.context.SessionContext; import com.netflix.zuul.message.Headers; import io.netty.channel.local.LocalAddress; + +import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.net.URISyntaxException; @@ -341,7 +344,8 @@ public void getOriginalPort_fallsBackOnUnbracketedIpv6Address() throws URISyntax @Test public void getOriginalPort_respectsProxyProtocol() throws URISyntaxException { SessionContext context = new SessionContext(); - context.set(CommonContextKeys.PROXY_PROTOCOL_PORT, 443); + context.set(CommonContextKeys.PROXY_PROTOCOL_DESTINATION_ADDRESS, + new InetSocketAddress(InetAddresses.forString("1.1.1.1"), 443)); Headers headers = new Headers(); headers.add("X-Forwarded-Port", "6000"); assertEquals(443, HttpRequestMessageImpl.getOriginalPort(context, headers, 9999)); diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java index 6658605a..e63bdc83 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java @@ -16,8 +16,8 @@ package com.netflix.zuul.netty.server; +import com.google.common.net.InetAddresses; import com.netflix.netty.common.SourceAddressChannelHandler; -import com.netflix.netty.common.proxyprotocol.HAProxyMessageChannelHandler; import com.netflix.spectator.api.DefaultRegistry; import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.message.http.HttpRequestMessage; @@ -28,15 +28,13 @@ import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.embedded.EmbeddedChannel; -import io.netty.handler.codec.haproxy.HAProxyCommand; -import io.netty.handler.codec.haproxy.HAProxyMessage; -import io.netty.handler.codec.haproxy.HAProxyProtocolVersion; -import io.netty.handler.codec.haproxy.HAProxyProxiedProtocol; import io.netty.handler.codec.http.*; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.junit.MockitoJUnitRunner; +import java.net.InetSocketAddress; + import static org.junit.Assert.*; /** @@ -46,23 +44,21 @@ public class ClientRequestReceiverTest { @Test - public void proxyProtocol_portSetInContext() { - HAProxyMessage hapm = new HAProxyMessage( - HAProxyProtocolVersion.V2, - HAProxyCommand.PROXY, - HAProxyProxiedProtocol.TCP4, - "1.1.1.1", "2.2.2.2", 9000, 444); - ClientRequestReceiver receiver = new ClientRequestReceiver(null); - EmbeddedChannel channel = new EmbeddedChannel(receiver); + public void proxyProtocol_portSetInSessionContextAndInHttpRequestMessageImpl() { + EmbeddedChannel channel = new EmbeddedChannel(new ClientRequestReceiver(null)); channel.attr(SourceAddressChannelHandler.ATTR_SERVER_LOCAL_PORT).set(1234); - channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_MESSAGE).set(hapm); + InetSocketAddress hapmDestinationAddress = new InetSocketAddress(InetAddresses.forString("2.2.2.2"), 444); + channel.attr(SourceAddressChannelHandler.ATTR_PROXY_PROTOCOL_DESTINATION_ADDRESS).set(hapmDestinationAddress); + channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDR).set(hapmDestinationAddress); HttpRequestMessageImpl result; { channel.writeInbound(new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "/post", Unpooled.buffer())); result = channel.readInbound(); result.disposeBufferedBody(); } - assertEquals(result.getContext().get(CommonContextKeys.PROXY_PROTOCOL_PORT), 444); + assertEquals((int) result.getClientDestinationPort().get(), hapmDestinationAddress.getPort()); + int destinationPort = ((InetSocketAddress) result.getContext().get(CommonContextKeys.PROXY_PROTOCOL_DESTINATION_ADDRESS)).getPort(); + assertEquals(destinationPort, 444); assertEquals(result.getOriginalPort(), 444); channel.close(); } From 06767fd62313e47f491f840ce8c6d3389371df38 Mon Sep 17 00:00:00 2001 From: Karthik Yagna Date: Mon, 10 Aug 2020 13:50:14 -0700 Subject: [PATCH 114/273] core: add a new API to modify header values only if valid --- .../com/netflix/zuul/message/Headers.java | 133 ++++++++++++-- .../com/netflix/zuul/message/HeadersTest.java | 163 ++++++++++++++++++ 2 files changed, 286 insertions(+), 10 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java index 2087c94c..cb919649 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java @@ -18,6 +18,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.annotations.VisibleForTesting; +import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Spectator; import com.netflix.zuul.exception.ZuulException; import java.util.AbstractMap.SimpleImmutableEntry; @@ -47,6 +48,8 @@ public final class Headers { private final List names; private final List values; + private static final Counter invalidHeaderCounter = Spectator.globalRegistry().counter("zuul.header.invalid.char"); + public static Headers copyOf(Headers original) { return new Headers(requireNonNull(original, "original")); } @@ -195,6 +198,32 @@ public void setAndValidate(String headerName, @Nullable String value) { setNormal(validateField(headerName), validateField(normalName), validateField(value)); } + /** + * Replace any/all entries with this key, with this single entry if the key and entry are valid. + * + * If value is {@code null}, then not added, but any existing header of same name is removed. + */ + public void setIfValid(HeaderName headerName, String value) { + requireNonNull(headerName, "headerName"); + if (isValid(headerName.getName()) && isValid(value)) { + String normalName = headerName.getNormalised(); + setNormal(headerName.getName(), normalName, value); + } + } + + /** + * Replace any/all entries with this key, with this single entry if the key and entry are valid. + * + * If value is {@code null}, then not added, but any existing header of same name is removed. + */ + public void setIfValid(String headerName, @Nullable String value) { + requireNonNull(headerName, "headerName"); + if (isValid(headerName) && isValid(value)) { + String normalName = HeaderName.normalize(headerName); + setNormal(headerName, normalName, value); + } + } + /** * Replace any/all entries with this key, with this single entry and validate. * @@ -289,6 +318,38 @@ private boolean setIfAbsentNormal(String originalName, String normalName, String return true; } + /** + * Validates and adds the name and value to the headers, except if the name is already present. Unlike + * {@link #set(String, String)}, this method does not accept a {@code null} value. + * + * @return if the value was successfully added. + */ + public boolean setIfAbsentAndValid(String headerName, String value) { + requireNonNull(value, "value"); + requireNonNull(headerName, "headerName"); + if (isValid(headerName) && isValid(value)) { + String normalName = HeaderName.normalize(headerName); + return setIfAbsentNormal(headerName, normalName, value); + } + return false; + } + + /** + * Validates and adds the name and value to the headers, except if the name is already present. Unlike + * {@link #set(HeaderName, String)}, this method does not accept a {@code null} value. + * + * @return if the value was successfully added. + */ + public boolean setIfAbsentAndValid(HeaderName headerName, String value) { + requireNonNull(value, "value"); + requireNonNull(headerName, "headerName"); + if (isValid(headerName.getName()) && isValid((value))) { + String normalName = headerName.getNormalised(); + return setIfAbsentNormal(headerName.getName(), normalName, value); + } + return false; + } + /** * Adds the name and value to the headers. */ @@ -329,6 +390,30 @@ public void addAndValidate(HeaderName headerName, String value) { addNormal(validateField(headerName.getName()), validateField(normalName), validateField(value)); } + /** + * Adds the name and value to the headers if valid + */ + public void addIfValid(String headerName, String value) { + requireNonNull(headerName, "headerName"); + requireNonNull(value, "value"); + if (isValid(headerName) && isValid(value)) { + String normalName = HeaderName.normalize(headerName); + addNormal(headerName, normalName, value); + } + } + + /** + * Adds the name and value to the headers if valid + */ + public void addIfValid(HeaderName headerName, String value) { + requireNonNull(headerName, "headerName"); + requireNonNull(value, "value"); + if (isValid(headerName.getName()) && isValid(value)) { + String normalName = headerName.getNormalised(); + addNormal(headerName.getName(), normalName, value); + } + } + /** * Adds all the headers into this headers object. */ @@ -548,19 +633,47 @@ private void truncate(int i) { } } - private String validateField(String value) { + /** + * Checks if the given value is compliant with our RFC 7230 based check + */ + private static boolean isValid(@Nullable String value) { + if (value == null || findInvalid(value) == ABSENT) { + return true; + } + invalidHeaderCounter.increment(); + return false; + } + + /** + * Checks if the input value is compliant with our RFC 7230 based check + * Returns input value if valid, raises ZuulException otherwise + */ + private static String validateField(@Nullable String value) { if (value != null) { - int l = value.length(); - for (int i = 0; i < l; i++) { - char c = value.charAt(i); - // ASCII non-control characters, per RFC 7230 but slightly more lenient - if (c < 31 || c == 127) { - Spectator.globalRegistry().counter("zuul.header.invalid.char").increment(); - throw new ZuulException("Invalid header field: char " + (int) c + " in string " + value - + " does not comply with RFC 7230"); - } + int pos = findInvalid(value); + if (pos != ABSENT) { + invalidHeaderCounter.increment(); + throw new ZuulException("Invalid header field: char " + (int) value.charAt(pos) + " in string " + value + + " does not comply with RFC 7230"); } } return value; } + + /** + * Validated the input value based on RFC 7230 but more lenient. + * Currently, only ASCII control characters are considered invalid. + * + * Returns the index of first invalid character. Returns {@link #ABSENT} if absent. + */ + private static int findInvalid(String value) { + for (int i = 0; i < value.length(); i++) { + char c = value.charAt(i); + // ASCII non-control characters, per RFC 7230 but slightly more lenient + if (c < 31 || c == 127) { + return i; + } + } + return ABSENT; + } } diff --git a/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java b/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java index fb3f5907..cd655a52 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/message/HeadersTest.java @@ -202,6 +202,98 @@ public void setNullIsEmtpy_headerName() { Truth.assertThat(headers.size()).isEqualTo(1); } + @Test + public void setIfValidNullIsEmtpy() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + headers.setIfValid("cookIe", null); + + Truth.assertThat(headers.getAll("CookiE")).isEmpty(); + Truth.assertThat(headers.size()).isEqualTo(1); + } + + @Test + public void setIfValidNullIsEmtpy_headerName() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + headers.setIfValid(new HeaderName("cookIe"), null); + + Truth.assertThat(headers.getAll("CookiE")).isEmpty(); + Truth.assertThat(headers.size()).isEqualTo(1); + } + + @Test + public void setIfValidIgnoresInvalidValues() { + Headers headers = new Headers(); + headers.add("X-Valid-K1", "abc-xyz"); + headers.add("X-Valid-K2", "def-xyz"); + headers.add("X-Valid-K3", "xyz-xyz"); + + headers.setIfValid("X-Valid-K1", "abc\r\n-xy\r\nz"); + headers.setIfValid("X-Valid-K2", "abc\r-xy\rz"); + headers.setIfValid("X-Valid-K3", "abc\n-xy\nz"); + + Truth.assertThat(headers.getAll("X-Valid-K1")).containsExactly("abc-xyz"); + Truth.assertThat(headers.getAll("X-Valid-K2")).containsExactly("def-xyz"); + Truth.assertThat(headers.getAll("X-Valid-K3")).containsExactly("xyz-xyz"); + Truth.assertThat(headers.size()).isEqualTo(3); + } + + @Test + public void setIfValidIgnoresInvalidValues_headerName() { + Headers headers = new Headers(); + headers.add("X-Valid-K1", "abc-xyz"); + headers.add("X-Valid-K2", "def-xyz"); + headers.add("X-Valid-K3", "xyz-xyz"); + + headers.setIfValid(new HeaderName("X-Valid-K1"), "abc\r\n-xy\r\nz"); + headers.setIfValid(new HeaderName("X-Valid-K2"), "abc\r-xy\rz"); + headers.setIfValid(new HeaderName("X-Valid-K3"), "abc\n-xy\nz"); + + Truth.assertThat(headers.getAll("X-Valid-K1")).containsExactly("abc-xyz"); + Truth.assertThat(headers.getAll("X-Valid-K2")).containsExactly("def-xyz"); + Truth.assertThat(headers.getAll("X-Valid-K3")).containsExactly("xyz-xyz"); + Truth.assertThat(headers.size()).isEqualTo(3); + } + + @Test + public void setIfValidIgnoresInvalidKey() { + Headers headers = new Headers(); + headers.add("X-Valid-K1", "abc-xyz"); + + headers.setIfValid("X-K\r\ney-1", "abc-def"); + headers.setIfValid("X-K\ney-2", "def-xyz"); + headers.setIfValid("X-K\rey-3", "xyz-xyz"); + + Truth.assertThat(headers.getAll("X-Valid-K1")).containsExactly("abc-xyz"); + Truth.assertThat(headers.getAll("X-K\r\ney-1")).isEmpty(); + Truth.assertThat(headers.getAll("X-K\ney-2")).isEmpty(); + Truth.assertThat(headers.getAll("X-K\rey-3")).isEmpty(); + Truth.assertThat(headers.size()).isEqualTo(1); + } + + @Test + public void setIfValidIgnoresInvalidKey_headerName() { + Headers headers = new Headers(); + headers.add("X-Valid-K1", "abc-xyz"); + + headers.setIfValid(new HeaderName("X-K\r\ney-1"), "abc-def"); + headers.setIfValid(new HeaderName("X-K\ney-2"), "def-xyz"); + headers.setIfValid(new HeaderName("X-K\rey-3"), "xyz-xyz"); + + Truth.assertThat(headers.getAll("X-Valid-K1")).containsExactly("abc-xyz"); + Truth.assertThat(headers.getAll("X-K\r\ney-1")).isEmpty(); + Truth.assertThat(headers.getAll("X-K\ney-2")).isEmpty(); + Truth.assertThat(headers.getAll("X-K\rey-3")).isEmpty(); + Truth.assertThat(headers.size()).isEqualTo(1); + } + @Test public void setIfAbsentKeepsExisting() { Headers headers = new Headers(); @@ -270,6 +362,36 @@ public void setIfAbsent_headerName() { Truth.assertThat(headers.getAll("X-netflix-Awesome")).containsExactly("true"); } + @Test + public void setIfAbsentAndValid() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + headers.add("Cookie", "this=that"); + headers.add("Cookie", "frizzle=frazzle"); + + headers.setIfAbsentAndValid("X-Netflix-Awesome", "true"); + headers.setIfAbsentAndValid("X-Netflix-Awesome", "True"); + + Truth.assertThat(headers.getAll("X-netflix-Awesome")).containsExactly("true"); + Truth.assertThat(headers.size()).isEqualTo(4); + } + + @Test + public void setIfAbsentAndValidIgnoresInvalidValues() { + Headers headers = new Headers(); + headers.add("Via", "duct"); + + headers.setIfAbsentAndValid("X-Invalid-K1", "abc\r\nxy\r\nz"); + headers.setIfAbsentAndValid("X-Invalid-K2", "abc\rxy\rz"); + headers.setIfAbsentAndValid("X-Invalid-K3", "abc\nxy\nz"); + + Truth.assertThat(headers.getAll("Via")).containsExactly("duct"); + Truth.assertThat(headers.getAll("X-Invalid-K1")).isEmpty(); + Truth.assertThat(headers.getAll("X-Invalid-K2")).isEmpty(); + Truth.assertThat(headers.getAll("X-Invalid-K3")).isEmpty(); + Truth.assertThat(headers.size()).isEqualTo(1); + } + @Test public void add() { Headers headers = new Headers(); @@ -294,6 +416,47 @@ public void add_headerName() { Truth.assertThat(headers.getAll("Via")).containsExactly("duct", "con Dios").inOrder(); } + @Test + public void addIfValid() { + Headers headers = new Headers(); + headers.addIfValid("Via", "duct"); + headers.addIfValid("Cookie", "abc=def"); + headers.addIfValid("cookie", "uvw=xyz"); + + Truth.assertThat(headers.getAll("Via")).containsExactly("duct"); + Truth.assertThat(headers.getAll("Cookie")).containsExactly("abc=def", "uvw=xyz").inOrder(); + Truth.assertThat(headers.size()).isEqualTo(3); + } + + @Test + public void addIfValid_headerName() { + Headers headers = new Headers(); + headers.addIfValid("Via", "duct"); + headers.addIfValid("Cookie", "abc=def"); + headers.addIfValid(new HeaderName("cookie"), "uvw=xyz"); + + Truth.assertThat(headers.getAll("Via")).containsExactly("duct"); + Truth.assertThat(headers.getAll("Cookie")).containsExactly("abc=def", "uvw=xyz").inOrder(); + Truth.assertThat(headers.size()).isEqualTo(3); + } + + @Test + public void addIfValidIgnoresInvalidValues() { + Headers headers = new Headers(); + headers.addIfValid("Via", "duct"); + headers.addIfValid("Cookie", "abc=def"); + headers.addIfValid("X-Invalid-K1", "abc\r\nxy\r\nz"); + headers.addIfValid("X-Invalid-K2", "abc\rxy\rz"); + headers.addIfValid("X-Invalid-K3", "abc\nxy\nz"); + + Truth.assertThat(headers.getAll("Via")).containsExactly("duct"); + Truth.assertThat(headers.getAll("Cookie")).containsExactly("abc=def"); + Truth.assertThat(headers.getAll("X-Invalid-K1")).isEmpty(); + Truth.assertThat(headers.getAll("X-Invalid-K2")).isEmpty(); + Truth.assertThat(headers.getAll("X-Invalid-K3")).isEmpty(); + Truth.assertThat(headers.size()).isEqualTo(2); + } + @Test public void putAll() { Headers headers = new Headers(); From d24d972e61413813f189fe92944f17a5a260655d Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Tue, 11 Aug 2020 09:52:54 -0700 Subject: [PATCH 115/273] make ATTR public --- .../netty/common/throttle/MaxInboundConnectionsHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandler.java index d455fd94..ccfa1d6c 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandler.java @@ -39,9 +39,9 @@ public class MaxInboundConnectionsHandler extends ChannelInboundHandlerAdapter { public static final String CONNECTION_THROTTLED_EVENT = "connection_throttled"; + public static final AttributeKey ATTR_CH_THROTTLED = AttributeKey.newInstance("_channel_throttled"); private static final Logger LOG = LoggerFactory.getLogger(MaxInboundConnectionsHandler.class); - private static final AttributeKey ATTR_CH_THROTTLED = AttributeKey.newInstance("_channel_throttled"); private final static AtomicInteger connections = new AtomicInteger(0); private final int maxConnections; From 892e6a4d954fb53acae5d7a64c27435caabb1c73 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Thu, 6 Aug 2020 13:45:07 -0700 Subject: [PATCH 116/273] Add a basic test for HAPM channel handler --- .../HAProxyMessageChannelHandlerTest.java | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandlerTest.java diff --git a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandlerTest.java new file mode 100644 index 00000000..221025c1 --- /dev/null +++ b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandlerTest.java @@ -0,0 +1,39 @@ +package com.netflix.netty.common.proxyprotocol; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import com.netflix.netty.common.SourceAddressChannelHandler; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; +import io.netty.channel.embedded.EmbeddedChannel; +import io.netty.handler.codec.haproxy.HAProxyMessageDecoder; +import java.net.InetSocketAddress; +import java.nio.charset.StandardCharsets; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class HAProxyMessageChannelHandlerTest { + + @Test + public void setClientDestPortForHAPM() { + EmbeddedChannel channel = new EmbeddedChannel(); + // This is to emulate `ElbProxyProtocolChannelHandler` + channel.pipeline() + .addLast(HAProxyMessageDecoder.class.getSimpleName(), new HAProxyMessageDecoder()) + .addLast(HAProxyMessageChannelHandler.class.getSimpleName(), new HAProxyMessageChannelHandler()); + + ByteBuf buf = Unpooled.wrappedBuffer( + "PROXY TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); + channel.writeInbound(buf); + + Object result = channel.readInbound(); + assertNull(result); + + InetSocketAddress destAddress = channel + .attr(SourceAddressChannelHandler.ATTR_PROXY_PROTOCOL_DESTINATION_ADDRESS).get(); + assertEquals("124.123.111.111", destAddress.getHostString()); + assertEquals(443, destAddress.getPort()); + } +} \ No newline at end of file From 708118da2385efec958edf8df42056d18603e3ae Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Thu, 6 Aug 2020 14:13:08 -0700 Subject: [PATCH 117/273] Add license --- .../HAProxyMessageChannelHandlerTest.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandlerTest.java index 221025c1..ed45283e 100644 --- a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandlerTest.java @@ -1,3 +1,19 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.netflix.netty.common.proxyprotocol; import static org.junit.Assert.assertEquals; From b67d383b48427f8ccbc116f4d11253920d9870eb Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Thu, 6 Aug 2020 15:01:42 -0700 Subject: [PATCH 118/273] add assertions for source address --- .../proxyprotocol/HAProxyMessageChannelHandlerTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandlerTest.java index ed45283e..6f2dfe37 100644 --- a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandlerTest.java @@ -49,7 +49,14 @@ public void setClientDestPortForHAPM() { InetSocketAddress destAddress = channel .attr(SourceAddressChannelHandler.ATTR_PROXY_PROTOCOL_DESTINATION_ADDRESS).get(); + + InetSocketAddress srcAddress = (InetSocketAddress) channel.attr(SourceAddressChannelHandler.ATTR_REMOTE_ADDR) + .get(); + assertEquals("124.123.111.111", destAddress.getHostString()); assertEquals(443, destAddress.getPort()); + + assertEquals("192.168.0.1", srcAddress.getHostString()); + assertEquals(10008, srcAddress.getPort()); } } \ No newline at end of file From edf4194fe0806cf30082d1f68fdfbb728e028d97 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 12 Aug 2020 10:23:28 -0700 Subject: [PATCH 119/273] core: record initial channel accept time for use with child initializers --- .../com/netflix/zuul/netty/server/Server.java | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java index 9b435c64..c76b7437 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java @@ -26,6 +26,9 @@ import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.Channel; import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelHandler.Sharable; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; import io.netty.channel.DefaultSelectStrategyFactory; @@ -43,12 +46,14 @@ import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.nio.NioServerSocketChannel; import io.netty.channel.socket.nio.NioSocketChannel; +import io.netty.util.AttributeKey; import io.netty.util.concurrent.DefaultEventExecutorChooserFactory; import io.netty.util.concurrent.EventExecutor; import io.netty.util.concurrent.EventExecutorChooserFactory; import io.netty.util.concurrent.ThreadPerTaskExecutor; import java.util.LinkedHashMap; import java.util.LinkedHashSet; +import java.util.Objects; import java.util.Set; import java.util.concurrent.atomic.AtomicReference; import org.slf4j.Logger; @@ -155,8 +160,7 @@ public Server(ServerStatusManager serverStatusManager, this.eventLoopGroupMetrics = checkNotNull(eventLoopGroupMetrics, "eventLoopGroupMetrics"); } - public void stop() - { + public void stop() { LOG.info("Shutting down Zuul."); serverGroup.stop(); @@ -248,6 +252,7 @@ private ChannelFuture setupServerBootstrap( serverBootstrap = serverBootstrap.option(optionEntry.getKey(), optionEntry.getValue()); } + serverBootstrap.handler(new NewConnHandler()); serverBootstrap.childHandler(channelInitializer); serverBootstrap.validate(); @@ -437,6 +442,22 @@ synchronized private void stop() } } + public static final AttributeKey> CONN_TIMING = AttributeKey.newInstance("zuulconntiming"); + public static final String CONN_ACCEPT = "ACCEPT"; + + private static final class NewConnHandler extends ChannelInboundHandlerAdapter { + + @Override + public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { + Long now = System.nanoTime(); + Map timings = new LinkedHashMap<>(); + timings.put(CONN_ACCEPT, now); + final Channel child = (Channel) msg; + child.attr(CONN_TIMING).set(timings); + super.channelRead(ctx, msg); + } + } + static Map> convertPortMap( Map> portsToChannelInitializers) { Map> addrsToInitializers = From 48370bd59007e73ece6a7b02f1eb24f5c9ac64c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Aug 2020 09:59:31 -0700 Subject: [PATCH 120/273] build(deps): bump log4j-core from 2.13.1 to 2.13.3 (#856) Bumps log4j-core from 2.13.1 to 2.13.3. Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- zuul-sample/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-sample/build.gradle b/zuul-sample/build.gradle index 5c58e844..e730bcb6 100644 --- a/zuul-sample/build.gradle +++ b/zuul-sample/build.gradle @@ -11,7 +11,7 @@ dependencies { implementation "com.netflix.governator:governator-core:1.+" annotationProcessor project(":zuul-processor") - runtimeOnly 'org.apache.logging.log4j:log4j-core:2.13.1' + runtimeOnly 'org.apache.logging.log4j:log4j-core:2.13.3' runtimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl:2.13.1' } From 9730da24eb21377df573261bafd7d06b16ca7e91 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 18 Aug 2020 10:18:11 -0700 Subject: [PATCH 121/273] release 2.1.8 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index efd9e05f..a3ecafcc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,4 +2,4 @@ versions_groovy=3.0.3 versions_ribbon=2.7.17 versions_netty=4.1.51.Final release.scope=patch -release.version=2.1.8-SNAPSHOT +release.version=2.1.8 From 3e461fd08b829f06f67f6cb219ba9d61fec6209f Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 18 Aug 2020 10:18:39 -0700 Subject: [PATCH 122/273] Being 2.1.9-SNAPSHOT --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index a3ecafcc..64796d53 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,4 +2,4 @@ versions_groovy=3.0.3 versions_ribbon=2.7.17 versions_netty=4.1.51.Final release.scope=patch -release.version=2.1.8 +release.version=2.1.9-SNAPSHOT From 52c8d049d0294888a0033fd48ae732d0dcf92ea3 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 20 Aug 2020 16:57:00 -0700 Subject: [PATCH 123/273] zuul-core: add a connection timer class (#878) I picked to make a new Attrs class because the channel one doesn't really allow grouping. It also forces thread safety when we dont need it, and makes keys identical based on name. These have proved problematic in the past, so I made a new one. The idea of the conn timer is to store it on the channel itself, along with the set of dimensions to break down stats by. The attrs map is dynamic, and allows updating it as new metrics come in. I plan on using these dimensions for other connection stats in the future. --- .../src/main/java/com/netflix/zuul/Attrs.java | 118 ++++++++++++++++++ .../netflix/zuul/monitoring/ConnTimer.java | 106 ++++++++++++++++ .../zuul/netty/server/BaseServerStartup.java | 1 + .../com/netflix/zuul/netty/server/Server.java | 30 +++-- .../test/java/com/netflix/zuul/AttrsTest.java | 90 +++++++++++++ .../zuul/monitoring/ConnTimerTest.java | 62 +++++++++ .../netflix/zuul/netty/server/ServerTest.java | 3 +- 7 files changed, 399 insertions(+), 11 deletions(-) create mode 100644 zuul-core/src/main/java/com/netflix/zuul/Attrs.java create mode 100644 zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java create mode 100644 zuul-core/src/test/java/com/netflix/zuul/AttrsTest.java create mode 100644 zuul-core/src/test/java/com/netflix/zuul/monitoring/ConnTimerTest.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/Attrs.java b/zuul-core/src/main/java/com/netflix/zuul/Attrs.java new file mode 100644 index 00000000..e8384945 --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/zuul/Attrs.java @@ -0,0 +1,118 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul; + +import com.google.common.annotations.VisibleForTesting; +import java.util.Collections; +import java.util.IdentityHashMap; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import javax.annotation.Nullable; + +/** + * A heterogeneous map of attributes. + */ +public final class Attrs { + + final Map, Object> storage = new IdentityHashMap<>(); + + public static Key newKey(String keyName) { + return new Key<>(keyName); + } + + public static final class Key { + + private final String name; + + /** + * Returns the value in the attributes, or {@code null} if absent. + */ + @Nullable + @SuppressWarnings("unchecked") + public T get(Attrs attrs) { + Objects.requireNonNull(attrs, "attrs"); + return (T) attrs.storage.get(this); + } + + /** + * Returns the value in the attributes or {@code defaultValue} if absent. + * @throws NullPointerException if defaultValue is null. + */ + @SuppressWarnings("unchecked") + public T getOrDefault(Attrs attrs, T defaultValue) { + Objects.requireNonNull(attrs, "attrs"); + Objects.requireNonNull(defaultValue, "defaultValue"); + T result = (T) attrs.storage.get(this); + if (result != null) { + return result; + } + return defaultValue; + } + + public void put(Attrs attrs, T value) { + Objects.requireNonNull(attrs, "attrs"); + Objects.requireNonNull(value); + attrs.storage.put(this, value); + } + + public String name() { + return name; + } + + private Key(String name) { + this.name = Objects.requireNonNull(name); + } + + @Override + public String toString() { + return "Key{" + name + '}'; + } + } + + private Attrs() {} + + public static Attrs newInstance() { + return new Attrs(); + } + + public Set> keySet() { + return Collections.unmodifiableSet(new LinkedHashSet<>(storage.keySet())); + } + + @Override + public String toString() { + return "Attrs{" + storage + '}'; + } + + @Override + @VisibleForTesting + public boolean equals(Object other) { + if (!(other instanceof Attrs)) { + return false; + } + Attrs that = (Attrs) other; + return Objects.equals(this.storage, that.storage); + } + + @Override + @VisibleForTesting + public int hashCode() { + return Objects.hash(storage); + } +} diff --git a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java new file mode 100644 index 00000000..49ce1174 --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java @@ -0,0 +1,106 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.monitoring; + +import com.netflix.spectator.api.Id; +import com.netflix.spectator.api.Registry; +import com.netflix.spectator.api.histogram.PercentileTimer; +import com.netflix.zuul.Attrs; +import com.netflix.zuul.Attrs.Key; +import com.netflix.zuul.netty.server.Server; +import io.netty.channel.Channel; +import io.netty.util.AttributeKey; +import java.time.Duration; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.concurrent.TimeUnit; + +/** + * A timer for connection stats. Not thread-safe. + */ +public final class ConnTimer { + + private static final AttributeKey CONN_TIMER = AttributeKey.newInstance("zuul.conntimer"); + + private static final Duration MIN_CONN_TIMING = Duration.ofNanos(512); + private static final Duration MAX_CONN_TIMING = Duration.ofDays(366); + + private final Registry registry; + private final Channel chan; + // TODO(carl-mastrangelo): make this changable. + private final Id metricBase; + + private final Map timings = new LinkedHashMap<>(); + + private ConnTimer(Registry registry, Channel chan, Id metricBase) { + this.registry = Objects.requireNonNull(registry); + this.chan = Objects.requireNonNull(chan); + this.metricBase = Objects.requireNonNull(metricBase); + } + + public static ConnTimer install(Channel chan, Registry registry, Id metricBase) { + ConnTimer timer = new ConnTimer(registry, chan, metricBase); + if (!chan.attr(CONN_TIMER).compareAndSet(null, timer)) { + throw new IllegalStateException("pre-existing timer already present"); + } + return timer; + } + + public static ConnTimer from(Channel chan) { + Objects.requireNonNull(chan); + ConnTimer timer = chan.attr(CONN_TIMER).get(); + if (timer != null) { + return timer; + } + if (chan.parent() != null && (timer = chan.parent().attr(CONN_TIMER).get()) != null) { + return timer; + } + throw new IllegalStateException("no timer on channel"); + } + + public void record(Long now, String event) { + if (timings.containsKey(event)) { + return; + } + Attrs dims = chan.attr(Server.CONN_DIMENSIONS).get(); + Set> dimKeys = dims.keySet(); + Map dimTags = new HashMap<>(dimKeys.size()); + for (Key key : dims.keySet()) { + dimTags.put(key.name(), String.valueOf(key.get(dims))); + } + + // Note: this is effectively O(n^2) because it will be called for each event in the connection + // setup. It should be bounded to at most 10 or so. + timings.forEach((k, v) -> { + long durationNanos = now - v; + if (durationNanos == 0) { + // This may happen if an event is double listed, or if the timer is not accurate enough to record + // it. + return; + } + PercentileTimer.builder(registry) + .withId(metricBase.withTags(dimTags).withTags("from", k, "to", event)) + .withRange(MIN_CONN_TIMING, MAX_CONN_TIMING) + .build() + .record(durationNanos, TimeUnit.NANOSECONDS); + }); + timings.put(event, now); + } +} diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java index 14899a7a..c2fe3160 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java @@ -109,6 +109,7 @@ public void init() throws Exception addrsToChannelInitializers = chooseAddrsAndChannels(clientChannels); server = new Server( + registry, serverStatusManager, addrsToChannelInitializers, clientConnectionsShutdown, diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java index c76b7437..e0205c3f 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java @@ -23,6 +23,10 @@ import com.netflix.netty.common.LeastConnsEventLoopChooserFactory; import com.netflix.netty.common.metrics.EventLoopGroupMetrics; import com.netflix.netty.common.status.ServerStatusManager; +import com.netflix.spectator.api.Registry; +import com.netflix.spectator.api.Spectator; +import com.netflix.zuul.Attrs; +import com.netflix.zuul.monitoring.ConnTimer; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.Channel; import io.netty.channel.ChannelFuture; @@ -110,6 +114,7 @@ public class Server private final EventLoopGroupMetrics eventLoopGroupMetrics; private final Thread jvmShutdownHook = new Thread(this::stop, "Zuul-JVM-shutdown-hook"); + private final Registry registry; private ServerGroup serverGroup; private final ClientConnectionsShutdown clientConnectionsShutdown; private final ServerStatusManager serverStatusManager; @@ -124,7 +129,8 @@ public class Server public static final AtomicReference> defaultOutboundChannelType = new AtomicReference<>(); /** - * Use {@link #Server(ServerStatusManager, Map, ClientConnectionsShutdown, EventLoopGroupMetrics, EventLoopConfig)} + * Use {@link #Server(Registry, ServerStatusManager, Map, ClientConnectionsShutdown, EventLoopGroupMetrics, + * EventLoopConfig)} * instead. */ @Deprecated @@ -136,7 +142,8 @@ public Server(Map portsToChannelInitializers, Serve } /** - * Use {@link #Server(ServerStatusManager, Map, ClientConnectionsShutdown, EventLoopGroupMetrics, EventLoopConfig)} + * Use {@link #Server(Registry, ServerStatusManager, Map, ClientConnectionsShutdown, EventLoopGroupMetrics, + * EventLoopConfig)} * instead. */ @SuppressWarnings("unchecked") // Channel init map has the wrong generics and we can't fix without api breakage. @@ -144,15 +151,16 @@ public Server(Map portsToChannelInitializers, Serve public Server(Map portsToChannelInitializers, ServerStatusManager serverStatusManager, ClientConnectionsShutdown clientConnectionsShutdown, EventLoopGroupMetrics eventLoopGroupMetrics, EventLoopConfig eventLoopConfig) { - this(serverStatusManager, + this(Spectator.globalRegistry(), serverStatusManager, convertPortMap((Map>) (Map) portsToChannelInitializers), clientConnectionsShutdown, eventLoopGroupMetrics, eventLoopConfig); } - public Server(ServerStatusManager serverStatusManager, + public Server(Registry registry, ServerStatusManager serverStatusManager, Map> addressesToInitializers, ClientConnectionsShutdown clientConnectionsShutdown, EventLoopGroupMetrics eventLoopGroupMetrics, EventLoopConfig eventLoopConfig) { + this.registry = Objects.requireNonNull(registry); this.addressesToInitializers = Collections.unmodifiableMap(new LinkedHashMap<>(addressesToInitializers)); this.serverStatusManager = checkNotNull(serverStatusManager, "serverStatusManager"); this.clientConnectionsShutdown = checkNotNull(clientConnectionsShutdown, "clientConnectionsShutdown"); @@ -442,18 +450,20 @@ synchronized private void stop() } } - public static final AttributeKey> CONN_TIMING = AttributeKey.newInstance("zuulconntiming"); - public static final String CONN_ACCEPT = "ACCEPT"; + /** + * Keys should be a short string usable in metrics. + */ + public static final AttributeKey CONN_DIMENSIONS = AttributeKey.newInstance("zuulconndimensions"); - private static final class NewConnHandler extends ChannelInboundHandlerAdapter { + private final class NewConnHandler extends ChannelInboundHandlerAdapter { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { Long now = System.nanoTime(); - Map timings = new LinkedHashMap<>(); - timings.put(CONN_ACCEPT, now); final Channel child = (Channel) msg; - child.attr(CONN_TIMING).set(timings); + child.attr(CONN_DIMENSIONS).set(Attrs.newInstance()); + ConnTimer timer = ConnTimer.install(child, registry, registry.createId("zuul.conn.client.timing")); + timer.record(now, "ACCEPT"); super.channelRead(ctx, msg); } } diff --git a/zuul-core/src/test/java/com/netflix/zuul/AttrsTest.java b/zuul-core/src/test/java/com/netflix/zuul/AttrsTest.java new file mode 100644 index 00000000..12078982 --- /dev/null +++ b/zuul-core/src/test/java/com/netflix/zuul/AttrsTest.java @@ -0,0 +1,90 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertThrows; + +import com.google.common.truth.Truth; +import com.netflix.zuul.Attrs.Key; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class AttrsTest { + @Test + public void keysAreUnique() { + Attrs attrs = Attrs.newInstance(); + Key key1 = Attrs.newKey("foo"); + key1.put(attrs, "bar"); + Key key2 = Attrs.newKey("foo"); + key2.put(attrs, "baz"); + + Truth.assertThat(attrs.keySet()).containsExactly(key1, key2); + } + + @Test + public void newKeyFailsOnNull() { + assertThrows(NullPointerException.class, () -> Attrs.newKey(null)); + } + + @Test + public void attrsPutFailsOnNull() { + Attrs attrs = Attrs.newInstance(); + Key key = Attrs.newKey("foo"); + + assertThrows(NullPointerException.class, () -> key.put(attrs, null)); + } + + @Test + public void attrsPutReplacesOld() { + Attrs attrs = Attrs.newInstance(); + Key key = Attrs.newKey("foo"); + key.put(attrs, "bar"); + key.put(attrs, "baz"); + + assertEquals("baz", key.get(attrs)); + Truth.assertThat(attrs.keySet()).containsExactly(key); + } + + @Test + public void getReturnsNull() { + Attrs attrs = Attrs.newInstance(); + Key key = Attrs.newKey("foo"); + + assertNull(key.get(attrs)); + } + + @Test + public void getOrDefault_picksDefault() { + Attrs attrs = Attrs.newInstance(); + Key key = Attrs.newKey("foo"); + + assertEquals("bar", key.getOrDefault(attrs, "bar")); + } + + @Test + public void getOrDefault_failsOnNullDefault() { + Attrs attrs = Attrs.newInstance(); + Key key = Attrs.newKey("foo"); + key.put(attrs, "bar"); + + assertThrows(NullPointerException.class, () -> key.getOrDefault(attrs, null)); + } +} diff --git a/zuul-core/src/test/java/com/netflix/zuul/monitoring/ConnTimerTest.java b/zuul-core/src/test/java/com/netflix/zuul/monitoring/ConnTimerTest.java new file mode 100644 index 00000000..3c5a9525 --- /dev/null +++ b/zuul-core/src/test/java/com/netflix/zuul/monitoring/ConnTimerTest.java @@ -0,0 +1,62 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.monitoring; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +import com.netflix.spectator.api.DefaultRegistry; +import com.netflix.spectator.api.Registry; +import com.netflix.spectator.api.histogram.PercentileTimer; +import com.netflix.zuul.Attrs; +import com.netflix.zuul.netty.server.Server; +import io.netty.channel.embedded.EmbeddedChannel; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ConnTimerTest { + @Test + public void record() { + EmbeddedChannel chan = new EmbeddedChannel(); + Attrs attrs = Attrs.newInstance(); + chan.attr(Server.CONN_DIMENSIONS).set(attrs); + Registry registry = new DefaultRegistry(); + ConnTimer timer = ConnTimer.install(chan, registry, registry.createId("foo")); + + timer.record(1000L, "start"); + timer.record(2000L, "middle"); + Attrs.newKey("bar").put(attrs, "baz"); + timer.record(4000L, "end"); + + PercentileTimer meter1 = + PercentileTimer.get(registry, registry.createId("foo", "from", "start", "to", "middle")); + assertNotNull(meter1); + assertEquals(1000L, meter1.totalTime()); + + PercentileTimer meter2 = + PercentileTimer.get(registry, registry.createId("foo", "from", "middle", "to", "end", "bar", "baz")); + assertNotNull(meter2); + assertEquals(2000L, meter2.totalTime()); + + PercentileTimer meter3 = + PercentileTimer.get(registry, registry.createId("foo", "from", "start", "to", "end", "bar", "baz")); + assertNotNull(meter3); + assertEquals(3000L, meter3.totalTime()); + } +} diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java index f43fb5eb..57263fa4 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java @@ -22,6 +22,7 @@ import static org.mockito.Mockito.mock; import com.netflix.netty.common.metrics.EventLoopGroupMetrics; import com.netflix.netty.common.status.ServerStatusManager; +import com.netflix.spectator.api.NoopRegistry; import com.netflix.spectator.api.Spectator; import io.netty.channel.Channel; import io.netty.channel.ChannelInitializer; @@ -73,7 +74,7 @@ public int acceptorCount() { return 1; } }; - Server s = new Server(ssm, initializers, ccs, elgm, elc); + Server s = new Server(new NoopRegistry(), ssm, initializers, ccs, elgm, elc); s.start(/* sync= */ false); List addrs = s.getListeningAddresses(); From ffe0b7cae210a4d3d23b61fedcb2cd5776db9ef9 Mon Sep 17 00:00:00 2001 From: Jose Fernandez Date: Thu, 20 Aug 2020 23:42:25 -0700 Subject: [PATCH 124/273] Fix NPE when zuulRequest is null --- .../com/netflix/zuul/netty/server/ClientRequestReceiver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java index 9b23d442..7d728508 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java @@ -189,7 +189,7 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc } } - if (reason == CompleteReason.INACTIVE) { + if (reason == CompleteReason.INACTIVE && zuulRequest != null) { // Client closed connection prematurely. StatusCategoryUtils.setStatusCategory(zuulRequest.getContext(), ZuulStatusCategory.FAILURE_CLIENT_CANCELLED); } From d8b8572625739f6c3edd88b0ce8a5dc193c045fb Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 21 Aug 2020 12:22:07 -0700 Subject: [PATCH 125/273] zuul-core: use less sensitive timer --- .../src/main/java/com/netflix/zuul/monitoring/ConnTimer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java index 49ce1174..1a6e9471 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java @@ -39,7 +39,7 @@ public final class ConnTimer { private static final AttributeKey CONN_TIMER = AttributeKey.newInstance("zuul.conntimer"); - private static final Duration MIN_CONN_TIMING = Duration.ofNanos(512); + private static final Duration MIN_CONN_TIMING = Duration.ofNanos(1024); private static final Duration MAX_CONN_TIMING = Duration.ofDays(366); private final Registry registry; From 696177df8436d7fbc476443f45c1bfed89ab51c3 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Sun, 23 Aug 2020 11:05:41 -0700 Subject: [PATCH 126/273] add counter for null completions --- .../netflix/zuul/netty/server/ClientRequestReceiver.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java index 7d728508..f9391625 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java @@ -23,6 +23,8 @@ import com.netflix.netty.common.SourceAddressChannelHandler; import com.netflix.netty.common.ssl.SslHandshakeInfo; import com.netflix.netty.common.throttle.RejectionUtils; +import com.netflix.spectator.api.Counter; +import com.netflix.spectator.api.Spectator; import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.context.Debug; import com.netflix.zuul.context.SessionContext; @@ -202,7 +204,7 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc // of response to the channel, which causes this CompleteEvent to fire before we have cleaned up state. But // thats ok, so don't log in that case. if (! "HTTP/2".equals(zuulRequest.getProtocol())) { - LOG.info("Client {} request UUID {} to {} completed with reason = {}, {}", clientRequest.method(), + LOG.debug("Client {} request UUID {} to {} completed with reason = {}, {}", clientRequest.method(), zuulCtx.getUUID(), clientRequest.uri(), reason.name(), ChannelUtils.channelInfoForLogging(ctx.channel())); } } @@ -214,6 +216,10 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc } } + if (zuulRequest == null) { + Spectator.globalRegistry().counter("zuul.client.complete.null", "reason", reason.name()); + } + clientRequest = null; zuulRequest = null; } From 4ed35c4368e98c5fff64ace97cb6ded6030e58af Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Sun, 23 Aug 2020 11:08:34 -0700 Subject: [PATCH 127/273] remove NPE risk --- .../com/netflix/zuul/netty/server/ClientRequestReceiver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java index f9391625..02f0014c 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java @@ -217,7 +217,7 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc } if (zuulRequest == null) { - Spectator.globalRegistry().counter("zuul.client.complete.null", "reason", reason.name()); + Spectator.globalRegistry().counter("zuul.client.complete.null", "reason", String.valueOf(reason)); } clientRequest = null; From cde5724c15af66d9c428087c82af1fe4ba028793 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Sun, 23 Aug 2020 13:24:17 -0700 Subject: [PATCH 128/273] increment counter --- .../com/netflix/zuul/netty/server/ClientRequestReceiver.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java index 02f0014c..7a6a836a 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java @@ -217,7 +217,9 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc } if (zuulRequest == null) { - Spectator.globalRegistry().counter("zuul.client.complete.null", "reason", String.valueOf(reason)); + Spectator.globalRegistry() + .counter("zuul.client.complete.null", "reason", String.valueOf(reason)) + .increment(); } clientRequest = null; From 2d8b82003750e5e7d2b457c9388ec9cd63eaf1b3 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 2 Sep 2020 10:01:47 -0700 Subject: [PATCH 129/273] core: work around http2 flow controller bug --- .../zuul/netty/server/http2/Http2OrHttpHandler.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2OrHttpHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2OrHttpHandler.java index 833d6e57..ad055f46 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2OrHttpHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2OrHttpHandler.java @@ -22,10 +22,13 @@ import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelPipeline; +import io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController; +import io.netty.handler.codec.http2.Http2Connection; import io.netty.handler.codec.http2.Http2FrameCodec; import io.netty.handler.codec.http2.Http2FrameCodecBuilder; import io.netty.handler.codec.http2.Http2MultiplexHandler; import io.netty.handler.codec.http2.Http2Settings; +import io.netty.handler.codec.http2.UniformStreamByteDistributor; import io.netty.handler.logging.LogLevel; import io.netty.handler.ssl.ApplicationProtocolNames; import io.netty.handler.ssl.ApplicationProtocolNegotiationHandler; @@ -95,6 +98,10 @@ private void configureHttp2(ChannelPipeline pipeline) { .initialSettings(settings) .validateHeaders(true) .build(); + Http2Connection conn = frameCodec.connection(); + // Use the uniform byte distributor until https://github.com/netty/netty/issues/10525 is fixed. + conn.remote().flowController( + new DefaultHttp2RemoteFlowController(conn, new UniformStreamByteDistributor(conn))); Http2MultiplexHandler multiplexHandler = new Http2MultiplexHandler(http2StreamHandler); From 7465d895c450526bb42f964896eb233dbe4436fb Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 8 Sep 2020 11:04:16 -0700 Subject: [PATCH 130/273] all: update to netty 4.1.52 --- gradle.properties | 2 +- zuul-core/build.gradle | 2 +- zuul-core/dependencies.lock | 114 +++++++++++++++++----------------- zuul-sample/dependencies.lock | 6 +- 4 files changed, 62 insertions(+), 62 deletions(-) diff --git a/gradle.properties b/gradle.properties index 64796d53..d5ec7830 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ versions_groovy=3.0.3 versions_ribbon=2.7.17 -versions_netty=4.1.51.Final +versions_netty=4.1.52.Final release.scope=patch release.version=2.1.9-SNAPSHOT diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index a25b3c69..fae2821a 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -34,7 +34,7 @@ dependencies { implementation "io.netty:netty-codec-haproxy:${versions_netty}" implementation "io.netty:netty-transport-native-epoll:${versions_netty}:linux-x86_64" implementation "io.netty:netty-transport-native-kqueue:${versions_netty}:osx-x86_64" - runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.31.Final" + runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.34.Final" implementation 'io.perfmark:perfmark-api:0.22.0' implementation 'javax.inject:javax.inject:1' diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 93aa082b..d7d5cb1a 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -50,39 +50,39 @@ }, "io.netty:netty-buffer": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-http": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-common": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-handler": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-transport": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "locked": "0.22.0", @@ -169,39 +169,39 @@ }, "io.netty:netty-buffer": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-http": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-common": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-handler": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-transport": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "locked": "0.22.0", @@ -291,43 +291,43 @@ }, "io.netty:netty-buffer": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-http": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-common": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-handler": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.31.Final", - "requested": "2.0.31.Final" + "requested": "2.0.34.Final" }, "io.netty:netty-transport": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "locked": "0.22.0", @@ -425,43 +425,43 @@ }, "io.netty:netty-buffer": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-http": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-common": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-handler": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.31.Final", - "requested": "2.0.31.Final" + "requested": "2.0.34.Final" }, "io.netty:netty-transport": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "locked": "0.22.0", @@ -539,39 +539,39 @@ }, "io.netty:netty-buffer": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-http": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-common": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-handler": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-transport": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "locked": "0.22.0", @@ -657,43 +657,43 @@ }, "io.netty:netty-buffer": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-http": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-common": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-handler": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.31.Final", - "requested": "2.0.31.Final" + "requested": "2.0.34.Final" }, "io.netty:netty-transport": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "locked": "4.1.51.Final", - "requested": "4.1.51.Final" + "requested": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "locked": "0.22.0", diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 2d836237..59a7cc53 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -654,7 +654,7 @@ }, "org.apache.logging.log4j:log4j-core": { "locked": "2.13.1", - "requested": "2.13.1" + "requested": "2.13.3" }, "org.apache.logging.log4j:log4j-slf4j-impl": { "locked": "2.13.1", @@ -872,7 +872,7 @@ }, "org.apache.logging.log4j:log4j-core": { "locked": "2.13.1", - "requested": "2.13.1" + "requested": "2.13.3" }, "org.apache.logging.log4j:log4j-slf4j-impl": { "locked": "2.13.1", @@ -1222,7 +1222,7 @@ }, "org.apache.logging.log4j:log4j-core": { "locked": "2.13.1", - "requested": "2.13.1" + "requested": "2.13.3" }, "org.apache.logging.log4j:log4j-slf4j-impl": { "locked": "2.13.1", From a3beb9909c9922b85e61ca2ba535c53bbea45531 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 10 Sep 2020 11:11:38 -0700 Subject: [PATCH 131/273] all: bump to perfmark 0.23.0 --- zuul-core/build.gradle | 2 +- zuul-core/dependencies.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index fae2821a..4a795a80 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -36,7 +36,7 @@ dependencies { implementation "io.netty:netty-transport-native-kqueue:${versions_netty}:osx-x86_64" runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.34.Final" - implementation 'io.perfmark:perfmark-api:0.22.0' + implementation 'io.perfmark:perfmark-api:0.23.0' implementation 'javax.inject:javax.inject:1' testImplementation libraries.junit, diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index d7d5cb1a..92f3b26c 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -86,7 +86,7 @@ }, "io.perfmark:perfmark-api": { "locked": "0.22.0", - "requested": "0.22.0" + "requested": "0.23.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -205,7 +205,7 @@ }, "io.perfmark:perfmark-api": { "locked": "0.22.0", - "requested": "0.22.0" + "requested": "0.23.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -331,7 +331,7 @@ }, "io.perfmark:perfmark-api": { "locked": "0.22.0", - "requested": "0.22.0" + "requested": "0.23.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -465,7 +465,7 @@ }, "io.perfmark:perfmark-api": { "locked": "0.22.0", - "requested": "0.22.0" + "requested": "0.23.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -575,7 +575,7 @@ }, "io.perfmark:perfmark-api": { "locked": "0.22.0", - "requested": "0.22.0" + "requested": "0.23.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", @@ -697,7 +697,7 @@ }, "io.perfmark:perfmark-api": { "locked": "0.22.0", - "requested": "0.22.0" + "requested": "0.23.0" }, "io.reactivex:rxjava": { "locked": "1.2.1", From 551a514845de94382cce559cb16fa71f337d7add Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 10 Sep 2020 12:20:27 -0700 Subject: [PATCH 132/273] all: use correct lock update generator --- zuul-core/dependencies.lock | 144 +++++++++++++++---------------- zuul-groovy/dependencies.lock | 108 +++++++++++------------ zuul-guice/dependencies.lock | 108 +++++++++++------------ zuul-processor/dependencies.lock | 124 +++++++++++++------------- zuul-sample/dependencies.lock | 130 ++++++++++++++-------------- 5 files changed, 307 insertions(+), 307 deletions(-) diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 92f3b26c..0e1c5f4f 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -49,43 +49,43 @@ "requested": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-common": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-handler": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-transport": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.22.0", + "locked": "0.23.0", "requested": "0.23.0" }, "io.reactivex:rxjava": { @@ -107,11 +107,11 @@ }, "jmh": { "org.openjdk.jmh:jmh-core": { - "locked": "1.23", + "locked": "1.25.1", "requested": "1.+" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.23", + "locked": "1.25.1", "requested": "1.+" }, "org.openjdk.jmh:jmh-generator-bytecode": { @@ -168,43 +168,43 @@ "requested": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-common": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-handler": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-transport": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.22.0", + "locked": "0.23.0", "requested": "0.23.0" }, "io.reactivex:rxjava": { @@ -220,11 +220,11 @@ "requested": "1.+" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.23", + "locked": "1.25.1", "requested": "1.21" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.23", + "locked": "1.25.1", "requested": "1.+" }, "org.openjdk.jmh:jmh-generator-bytecode": { @@ -290,47 +290,47 @@ "requested": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-common": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-handler": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.31.Final", + "locked": "2.0.34.Final", "requested": "2.0.34.Final" }, "io.netty:netty-transport": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.22.0", + "locked": "0.23.0", "requested": "0.23.0" }, "io.reactivex:rxjava": { @@ -350,15 +350,15 @@ "requested": "1.+" }, "org.mockito:mockito-core": { - "locked": "3.4.0", + "locked": "3.5.10", "requested": "3.+" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.23", + "locked": "1.25.1", "requested": "1.21" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.23", + "locked": "1.25.1", "requested": "1.+" }, "org.openjdk.jmh:jmh-generator-bytecode": { @@ -424,47 +424,47 @@ "requested": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-common": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-handler": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.31.Final", + "locked": "2.0.34.Final", "requested": "2.0.34.Final" }, "io.netty:netty-transport": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.22.0", + "locked": "0.23.0", "requested": "0.23.0" }, "io.reactivex:rxjava": { @@ -538,43 +538,43 @@ "requested": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-common": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-handler": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-transport": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.22.0", + "locked": "0.23.0", "requested": "0.23.0" }, "io.reactivex:rxjava": { @@ -594,7 +594,7 @@ "requested": "1.+" }, "org.mockito:mockito-core": { - "locked": "3.4.0", + "locked": "3.5.10", "requested": "3.+" }, "org.slf4j:slf4j-api": { @@ -656,47 +656,47 @@ "requested": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-common": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-handler": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.31.Final", + "locked": "2.0.34.Final", "requested": "2.0.34.Final" }, "io.netty:netty-transport": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.51.Final", + "locked": "4.1.52.Final", "requested": "4.1.52.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.22.0", + "locked": "0.23.0", "requested": "0.23.0" }, "io.reactivex:rxjava": { @@ -716,7 +716,7 @@ "requested": "1.+" }, "org.mockito:mockito-core": { - "locked": "3.4.0", + "locked": "3.5.10", "requested": "3.+" }, "org.slf4j:slf4j-api": { diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index 74aaedf3..52cc329a 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -71,37 +71,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -200,37 +200,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -342,67 +342,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.31.Final" + "locked": "2.0.34.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.22.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -431,7 +431,7 @@ "requested": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.4.0", + "locked": "3.5.10", "requested": "3.+" }, "org.openjdk.jmh:jmh-core": { @@ -530,67 +530,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.31.Final" + "locked": "2.0.34.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.22.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -697,37 +697,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -744,7 +744,7 @@ "requested": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.4.0", + "locked": "3.5.10", "requested": "3.+" }, "org.slf4j:slf4j-api": { @@ -839,67 +839,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.31.Final" + "locked": "2.0.34.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.22.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -928,7 +928,7 @@ "requested": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.4.0", + "locked": "3.5.10", "requested": "3.+" }, "org.slf4j:slf4j-api": { diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index d929267e..6ab6f39b 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -75,37 +75,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -204,37 +204,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -353,67 +353,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.31.Final" + "locked": "2.0.34.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.22.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -438,7 +438,7 @@ "locked": "1.66" }, "org.mockito:mockito-core": { - "locked": "3.4.0", + "locked": "3.5.10", "requested": "3.+" }, "org.openjdk.jmh:jmh-core": { @@ -544,67 +544,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.31.Final" + "locked": "2.0.34.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.22.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -715,37 +715,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -758,7 +758,7 @@ "requested": "4.13" }, "org.mockito:mockito-core": { - "locked": "3.4.0", + "locked": "3.5.10", "requested": "3.+" }, "org.slf4j:slf4j-api": { @@ -864,67 +864,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.31.Final" + "locked": "2.0.34.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.22.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -949,7 +949,7 @@ "locked": "1.66" }, "org.mockito:mockito-core": { - "locked": "3.4.0", + "locked": "3.5.10", "requested": "3.+" }, "org.slf4j:slf4j-api": { diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 4a84b74f..ab548d5d 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -71,37 +71,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -196,37 +196,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -334,67 +334,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.31.Final" + "locked": "2.0.34.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.22.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -514,67 +514,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.31.Final" + "locked": "2.0.34.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.22.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -688,67 +688,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.31.Final" + "locked": "2.0.34.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.22.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -851,37 +851,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -985,67 +985,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.31.Final" + "locked": "2.0.34.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.22.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 59a7cc53..79613f42 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -86,67 +86,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.31.Final" + "locked": "2.0.34.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.22.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -262,37 +262,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -410,37 +410,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -578,67 +578,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.31.Final" + "locked": "2.0.34.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.22.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -653,7 +653,7 @@ "locked": "1" }, "org.apache.logging.log4j:log4j-core": { - "locked": "2.13.1", + "locked": "2.13.3", "requested": "2.13.3" }, "org.apache.logging.log4j:log4j-slf4j-impl": { @@ -796,67 +796,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.31.Final" + "locked": "2.0.34.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.22.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -871,7 +871,7 @@ "locked": "1" }, "org.apache.logging.log4j:log4j-core": { - "locked": "2.13.1", + "locked": "2.13.3", "requested": "2.13.3" }, "org.apache.logging.log4j:log4j-slf4j-impl": { @@ -986,37 +986,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1146,67 +1146,67 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.31.Final" + "locked": "2.0.34.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.51.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.22.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1221,7 +1221,7 @@ "locked": "1" }, "org.apache.logging.log4j:log4j-core": { - "locked": "2.13.1", + "locked": "2.13.3", "requested": "2.13.3" }, "org.apache.logging.log4j:log4j-slf4j-impl": { From cd119fb6b099f775b0731c6a4764d4915de73902 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 10 Sep 2020 13:36:39 -0700 Subject: [PATCH 133/273] zuul-core: use new trace task method --- .../netty/filter/BaseZuulFilterRunner.java | 123 ++++++------------ .../zuul/netty/filter/ZuulEndPointRunner.java | 16 +-- .../netty/filter/ZuulFilterChainRunner.java | 17 +-- 3 files changed, 50 insertions(+), 106 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java index 20a38943..96ac421b 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/BaseZuulFilterRunner.java @@ -36,7 +36,7 @@ import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.http.HttpContent; import io.perfmark.Link; -import io.perfmark.PerfMark; +import io.perfmark.TaskCloseable; import java.util.concurrent.atomic.AtomicReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -57,6 +57,10 @@ import static com.netflix.zuul.context.CommonContextKeys.NETTY_SERVER_CHANNEL_HANDLER_CONTEXT; import static com.netflix.zuul.filters.FilterType.ENDPOINT; import static com.netflix.zuul.filters.FilterType.INBOUND; +import static io.perfmark.PerfMark.attachTag; +import static io.perfmark.PerfMark.linkIn; +import static io.perfmark.PerfMark.linkOut; +import static io.perfmark.PerfMark.traceTask; /** * Subclasses of this class are supposed to be thread safe and hence should not have any non final member variables @@ -117,42 +121,34 @@ protected final void setFilterAwaitingBody(I zuulMesg, boolean flag) { protected final void invokeNextStage(final O zuulMesg, final HttpContent chunk) { if (nextStage != null) { - PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".invokeNextStageChunk"); - try { + try (TaskCloseable ignored = + traceTask(this, s -> s.getClass().getSimpleName() + ".invokeNextStageChunk")){ addPerfMarkTags(zuulMesg); nextStage.filter(zuulMesg, chunk); - } finally { - PerfMark.stopTask(); } } else { //Next stage is Netty channel handler - PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".fireChannelReadChunk"); - try { + try (TaskCloseable ignored = + traceTask(this, s -> s.getClass().getSimpleName() + ".fireChannelReadChunk")) { addPerfMarkTags(zuulMesg); getChannelHandlerContext(zuulMesg).fireChannelRead(chunk); - } finally { - PerfMark.stopTask(); } } } protected final void invokeNextStage(final O zuulMesg) { if (nextStage != null) { - PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".invokeNextStage"); - try { + try (TaskCloseable ignored = + traceTask(this, s -> s.getClass().getSimpleName() + ".invokeNextStage")) { addPerfMarkTags(zuulMesg); nextStage.filter(zuulMesg); - } finally { - PerfMark.stopTask(); } } else { //Next stage is Netty channel handler - PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".fireChannelRead"); - try { + try (TaskCloseable ignored = + traceTask(this, s -> s.getClass().getSimpleName() + ".fireChannelRead")) { addPerfMarkTags(zuulMesg); getChannelHandlerContext(zuulMesg).fireChannelRead(zuulMesg); - } finally { - PerfMark.stopTask(); } } } @@ -165,13 +161,13 @@ protected final void addPerfMarkTags(ZuulMessage inMesg) { if (inMesg instanceof HttpResponseMessage) { HttpResponseMessage msg = (HttpResponseMessage) inMesg; req = msg.getOutboundRequest(); - PerfMark.attachTag("statuscode", msg.getStatus()); + attachTag("statuscode", msg.getStatus()); } if (req != null) { - PerfMark.attachTag("path", req, HttpRequestInfo::getPath); - PerfMark.attachTag("originalhost", req, HttpRequestInfo::getOriginalHost); + attachTag("path", req, HttpRequestInfo::getPath); + attachTag("originalhost", req, HttpRequestInfo::getOriginalHost); } - PerfMark.attachTag("uuid", inMesg, m -> m.getContext().getUUID()); + attachTag("uuid", inMesg, m -> m.getContext().getUUID()); } protected final O filter(final ZuulFilter filter, final I inMesg) { @@ -179,8 +175,7 @@ protected final O filter(final ZuulFilter filter, final I inMesg) { final ZuulMessage snapshot = inMesg.getContext().debugRouting() ? inMesg.clone() : null; FilterChainResumer resumer = null; - PerfMark.startTask(filter, f -> f.filterName() + ".filter"); - try { + try (TaskCloseable ignored = traceTask(filter, f -> f.filterName() + ".filter")) { addPerfMarkTags(inMesg); ExecutionStatus filterRunStatus = null; if (filter.filterType() == INBOUND && inMesg.getContext().shouldSendErrorResponse()) { @@ -188,13 +183,11 @@ protected final O filter(final ZuulFilter filter, final I inMesg) { filterRunStatus = SKIPPED; } - PerfMark.startTask(filter, f -> f.filterName() + ".shouldSkipFilter"); - try { + ; + try (TaskCloseable ignored2 = traceTask(filter, f -> f.filterName() + ".shouldSkipFilter")){ if (shouldSkipFilter(inMesg, filter)) { filterRunStatus = SKIPPED; } - } finally { - PerfMark.stopTask(); } if (filter.isDisabled()) { @@ -223,30 +216,24 @@ protected final O filter(final ZuulFilter filter, final I inMesg) { if (filter.getSyncType() == FilterSyncType.SYNC) { final SyncZuulFilter syncFilter = (SyncZuulFilter) filter; final O outMesg; - PerfMark.startTask(filter, f -> f.filterName() + ".apply"); - try { + try (TaskCloseable ignored2 = traceTask(filter, f -> f.filterName() + ".apply")) { addPerfMarkTags(inMesg); outMesg = syncFilter.apply(inMesg); - } finally { - PerfMark.stopTask(); } recordFilterCompletion(SUCCESS, filter, startTime, inMesg, snapshot); return (outMesg != null) ? outMesg : filter.getDefaultOutput(inMesg); } // async filter - PerfMark.startTask(filter, f -> f.filterName() + ".applyAsync"); - try { - final Link nettyToSchedulerLink = PerfMark.linkOut(); + try (TaskCloseable ignored2 = traceTask(filter, f -> f.filterName() + ".applyAsync")){ + final Link nettyToSchedulerLink = linkOut(); filter.incrementConcurrency(); resumer = new FilterChainResumer(inMesg, filter, snapshot, startTime); filter.applyAsync(inMesg) .doOnSubscribe(() -> { - PerfMark.startTask(filter, f -> f.filterName() + ".onSubscribeAsync"); - try { - PerfMark.linkIn(nettyToSchedulerLink); - } finally { - PerfMark.stopTask(); + try (TaskCloseable ignored3 = + traceTask(filter, f -> f.filterName() + ".onSubscribeAsync")) { + linkIn(nettyToSchedulerLink); } }) .doOnNext(resumer.onNextStarted(nettyToSchedulerLink)) @@ -255,8 +242,6 @@ protected final O filter(final ZuulFilter filter, final I inMesg) { .observeOn(Schedulers.from(getChannelHandlerContext(inMesg).executor())) .doOnUnsubscribe(resumer::decrementConcurrency) .subscribe(resumer); - } finally { - PerfMark.stopTask(); } return null; //wait for the async filter to finish @@ -269,8 +254,6 @@ protected final O filter(final ZuulFilter filter, final I inMesg) { outMesg.finishBufferedBodyIfIncomplete(); recordFilterCompletion(FAILED, filter, startTime, inMesg, snapshot); return outMesg; - } finally { - PerfMark.stopTask(); } } @@ -425,34 +408,25 @@ void decrementConcurrency() { @Override public void onNext(O outMesg) { - boolean stopped = false; - PerfMark.startTask(filter, f -> f.filterName() + ".onNextAsync"); - try { - PerfMark.linkIn(onNextLinkOut.get()); + try (TaskCloseable ignored = traceTask(filter, f -> f.filterName() + ".onNextAsync")) { + linkIn(onNextLinkOut.get()); addPerfMarkTags(inMesg); recordFilterCompletion(SUCCESS, filter, startTime, inMesg, snapshot); if (outMesg == null) { outMesg = filter.getDefaultOutput(inMesg); } - stopped = true; - PerfMark.stopTask(); resumeInBindingContext(outMesg, filter.filterName()); } catch (Exception e) { decrementConcurrency(); handleException(inMesg, filter.filterName(), e); - } finally { - if (!stopped) { - PerfMark.stopTask(); - } } } @Override public void onError(Throwable ex) { - PerfMark.startTask(filter, f -> f.filterName() + ".onErrorAsync"); - try { - PerfMark.linkIn(onErrorLinkOut.get()); + try (TaskCloseable ignored = traceTask(filter, f -> f.filterName() + ".onErrorAsync")) { + linkIn(onErrorLinkOut.get()); decrementConcurrency(); recordFilterCompletion(FAILED, filter, startTime, inMesg, snapshot); final O outMesg = handleFilterException(inMesg, filter, ex); @@ -460,53 +434,40 @@ public void onError(Throwable ex) { } catch (Exception e) { handleException(inMesg, filter.filterName(), e); - } finally { - PerfMark.stopTask(); } + } } @Override public void onCompleted() { - PerfMark.startTask(filter, f -> f.filterName() + ".onCompletedAsync"); - try { - PerfMark.linkIn(onCompletedLinkOut.get( )); + try (TaskCloseable ignored = traceTask(filter, f -> f.filterName() + ".onCompletedAsync")) { + linkIn(onCompletedLinkOut.get()); decrementConcurrency(); - } finally { - PerfMark.stopTask(); } } private Action1 onNextStarted(Link onNextLinkIn) { return o -> { - PerfMark.startTask(filter, f -> f.filterName() + ".onNext"); - try { - PerfMark.linkIn(onNextLinkIn); - onNextLinkOut.compareAndSet(null, PerfMark.linkOut()); - } finally { - PerfMark.stopTask(); + try (TaskCloseable ignored = traceTask(filter, f -> f.filterName() + ".onNext")) { + linkIn(onNextLinkIn); + onNextLinkOut.compareAndSet(null, linkOut()); } }; } private Action1 onErrorStarted(Link onErrorLinkIn) { return t -> { - PerfMark.startTask(filter, f -> f.filterName() + ".onError"); - try { - PerfMark.linkIn(onErrorLinkIn); - onErrorLinkOut.compareAndSet(null, PerfMark.linkOut()); - } finally { - PerfMark.stopTask(); + try (TaskCloseable ignored = traceTask(filter, f -> f.filterName() + ".onError")) { + linkIn(onErrorLinkIn); + onErrorLinkOut.compareAndSet(null, linkOut()); } }; } private Action0 onCompletedStarted(Link onCompletedLinkIn) { return () -> { - PerfMark.startTask(filter, f -> f.filterName() + ".onCompleted"); - try { - PerfMark.linkIn(onCompletedLinkIn); - onCompletedLinkOut.compareAndSet(null, PerfMark.linkOut()); - } finally { - PerfMark.stopTask(); + try (TaskCloseable ignored = traceTask(filter, f -> f.filterName() + ".onCompleted")) { + linkIn(onCompletedLinkIn); + onCompletedLinkOut.compareAndSet(null, linkOut()); } }; } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulEndPointRunner.java b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulEndPointRunner.java index 8a54eb24..2eb3fdbe 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulEndPointRunner.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulEndPointRunner.java @@ -35,6 +35,7 @@ import com.netflix.zuul.netty.server.MethodBinding; import io.netty.handler.codec.http.HttpContent; import io.perfmark.PerfMark; +import io.perfmark.TaskCloseable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -84,8 +85,7 @@ public void filter(final HttpRequestMessage zuulReq) { } final String endpointName = getEndPointName(zuulReq.getContext()); - PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".filter"); - try { + try (TaskCloseable ignored = PerfMark.traceTask(this, s -> s.getClass().getSimpleName() + ".filter")) { Preconditions.checkNotNull(zuulReq, "input message"); addPerfMarkTags(zuulReq); @@ -102,21 +102,16 @@ public void filter(final HttpRequestMessage zuulReq) { } catch (Exception ex) { handleException(zuulReq, endpointName, ex); - } finally { - PerfMark.stopTask(); } } @Override protected void resume(final HttpResponseMessage zuulMesg) { - PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".resume"); - try { + try (TaskCloseable ignored = PerfMark.traceTask(this, s -> s.getClass().getSimpleName() + ".resume")) { if (zuulMesg.getContext().isCancelled()) { return; } invokeNextStage(zuulMesg); - } finally { - PerfMark.stopTask(); } } @@ -128,8 +123,7 @@ public void filter(final HttpRequestMessage zuulReq, final HttpContent chunk) { } String endpointName = "-"; - PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".filterChunk"); - try { + try (TaskCloseable ignored = PerfMark.traceTask(this, s -> s.getClass().getSimpleName() + ".filterChunk")) { addPerfMarkTags(zuulReq); ZuulFilter endpoint = Preconditions.checkNotNull( getEndpoint(zuulReq), "endpoint"); @@ -153,8 +147,6 @@ public void filter(final HttpRequestMessage zuulReq, final HttpContent chunk) { } catch (Exception ex) { handleException(zuulReq, endpointName, ex); - } finally { - PerfMark.stopTask(); } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulFilterChainRunner.java b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulFilterChainRunner.java index 010e958a..29833fff 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulFilterChainRunner.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulFilterChainRunner.java @@ -27,6 +27,7 @@ import io.netty.handler.codec.http.HttpContent; import io.perfmark.PerfMark; +import io.perfmark.TaskCloseable; import javax.annotation.concurrent.ThreadSafe; import java.util.concurrent.atomic.AtomicInteger; @@ -50,24 +51,18 @@ public ZuulFilterChainRunner(ZuulFilter[] zuulFilters, FilterUsageNotifier @Override public void filter(final T inMesg) { - PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".filter"); - try { + try (TaskCloseable ignored = PerfMark.traceTask(this, s -> s.getClass().getSimpleName() + ".filter")) { addPerfMarkTags(inMesg); runFilters(inMesg, initRunningFilterIndex(inMesg)); - } finally { - PerfMark.stopTask(); } } @Override protected void resume(final T inMesg) { - PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".resume"); - try { + try (TaskCloseable ignored = PerfMark.traceTask(this, s -> s.getClass().getSimpleName() + ".resume")) { final AtomicInteger runningFilterIdx = getRunningFilterIndex(inMesg); runningFilterIdx.incrementAndGet(); runFilters(inMesg, runningFilterIdx); - } finally { - PerfMark.stopTask(); } } @@ -100,8 +95,7 @@ private final void runFilters(final T mesg, final AtomicInteger runningFilterIdx @Override public void filter(T inMesg, HttpContent chunk) { String filterName = "-"; - PerfMark.startTask(this, s -> s.getClass().getSimpleName() + ".filterChunk"); - try { + try (TaskCloseable ignored = PerfMark.traceTask(this, s -> s.getClass().getSimpleName() + ".filterChunk")) { addPerfMarkTags(inMesg); Preconditions.checkNotNull(inMesg, "input message"); @@ -159,9 +153,6 @@ public void filter(T inMesg, HttpContent chunk) { } catch (Exception ex) { handleException(inMesg, filterName, ex); - } finally { - PerfMark.stopTask(); } } - } From d14dda8f8f4b9743ea15eb84d16c93bc6493aec6 Mon Sep 17 00:00:00 2001 From: ldayton <43729618+ldayton@users.noreply.github.com> Date: Thu, 10 Sep 2020 14:32:20 -0700 Subject: [PATCH 134/273] copy SourceAddressChannelHandler.ATTR_PROXY_PROTOCOL_DESTINATION_ADDRESS to H2 channel (#890) --- .../netflix/zuul/netty/server/http2/Http2StreamInitializer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java index 66ed3a8d..db2ef7e8 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java @@ -98,6 +98,7 @@ protected void copyAttrsFromParentChannel(Channel parent, Channel child) SourceAddressChannelHandler.ATTR_SOURCE_PORT, SourceAddressChannelHandler.ATTR_SERVER_LOCAL_ADDRESS, SourceAddressChannelHandler.ATTR_SERVER_LOCAL_PORT, + SourceAddressChannelHandler.ATTR_PROXY_PROTOCOL_DESTINATION_ADDRESS, PROTOCOL_NAME, SslHandshakeInfoHandler.ATTR_SSL_INFO, From 9d9c38d6300a3477c128b92e8d78e80ab96367b2 Mon Sep 17 00:00:00 2001 From: sullis Date: Thu, 10 Sep 2020 16:45:39 -0700 Subject: [PATCH 135/273] Gradle wrapper validation --- .github/workflows/gradle-wrapper-validation.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/workflows/gradle-wrapper-validation.yml diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml new file mode 100644 index 00000000..0bde8aec --- /dev/null +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -0,0 +1,10 @@ +name: "Validate Gradle Wrapper" +on: [push, pull_request] + +jobs: + validation: + name: "Gradle wrapper validation" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: gradle/wrapper-validation-action@v1 From 7e3b5cabdde50087b44e0ac5bada3579ad95a5b7 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 11 Sep 2020 16:56:38 -0700 Subject: [PATCH 136/273] core: rename app name extractor and make it allocate less memory --- .../java/com/netflix/zuul/util/VipUtils.java | 37 +++++++++++++++---- .../com/netflix/zuul/util/VipUtilsTest.java | 10 ++--- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/util/VipUtils.java b/zuul-core/src/main/java/com/netflix/zuul/util/VipUtils.java index 2ff6f646..1caab2b3 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/util/VipUtils.java +++ b/zuul-core/src/main/java/com/netflix/zuul/util/VipUtils.java @@ -16,17 +16,40 @@ package com.netflix.zuul.util; -public class VipUtils +public final class VipUtils { - public static String getVIPPrefix(String vipAddress) - { - String vipHost = vipAddress.split(":")[0]; - return vipHost.split("\\.")[0]; + public static String getVIPPrefix(String vipAddress) { + for (int i = 0; i < vipAddress.length(); i++) { + char c = vipAddress.charAt(i); + if (c == '.' || c == ':') { + return vipAddress.substring(0, i); + } + } + return vipAddress; } - public static String extractAppNameFromVIP(String vipAddress) - { + /** + * Use {@link #extractUntrustedAppNameFromVIP} instead. + */ + @Deprecated + public static String extractAppNameFromVIP(String vipAddress) { String vipPrefix = getVIPPrefix(vipAddress); return vipPrefix.split("-")[0]; } + + /** + * Attempts to derive an app name from the VIP. Because the VIP is an arbitrary collection of characters, the + * value is just a best guess and not suitable for security purposes. + */ + public static String extractUntrustedAppNameFromVIP(String vipAddress) { + for (int i = 0; i < vipAddress.length(); i++) { + char c = vipAddress.charAt(i); + if (c == '-' || c == '.' || c == ':') { + return vipAddress.substring(0, i); + } + } + return vipAddress; + } + + private VipUtils() {} } diff --git a/zuul-core/src/test/java/com/netflix/zuul/util/VipUtilsTest.java b/zuul-core/src/test/java/com/netflix/zuul/util/VipUtilsTest.java index 823c1239..4eddbe7e 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/util/VipUtilsTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/util/VipUtilsTest.java @@ -39,10 +39,10 @@ public void testGetVIPPrefix() { @Test(expected = NullPointerException.class) public void testExtractAppNameFromVIP() { - assertEquals("api", VipUtils.extractAppNameFromVIP("api-test.netflix.net:7001")); - assertEquals("api", VipUtils.extractAppNameFromVIP("api-test-blah.netflix.net:7001")); - assertEquals("api", VipUtils.extractAppNameFromVIP("api")); - assertEquals("", VipUtils.extractAppNameFromVIP("")); - VipUtils.extractAppNameFromVIP(null); + assertEquals("api", VipUtils.extractUntrustedAppNameFromVIP("api-test.netflix.net:7001")); + assertEquals("api", VipUtils.extractUntrustedAppNameFromVIP("api-test-blah.netflix.net:7001")); + assertEquals("api", VipUtils.extractUntrustedAppNameFromVIP("api")); + assertEquals("", VipUtils.extractUntrustedAppNameFromVIP("")); + VipUtils.extractUntrustedAppNameFromVIP(null); } } From f50ea05e4a5b988dd91ae1aa3311cf1c72607a46 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 16 Sep 2020 14:21:28 -0700 Subject: [PATCH 137/273] all: bump dependency plugin --- build.gradle | 2 +- dependencies.lock | 12 +- zuul-core/dependencies.lock | 534 +++++++++++-------------------- zuul-groovy/dependencies.lock | 75 ++--- zuul-guice/dependencies.lock | 84 ++--- zuul-processor/dependencies.lock | 48 +-- zuul-sample/dependencies.lock | 84 ++--- 7 files changed, 280 insertions(+), 559 deletions(-) diff --git a/build.gradle b/build.gradle index 12eedbf9..0e5d42c4 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id 'nebula.netflixoss' version '8.8.1' - id 'nebula.dependency-lock' version '9.3.0' + id 'nebula.dependency-lock' version '10.1.0' id "com.google.osdetector" version "1.6.2" id "me.champeau.gradle.jmh" version "0.5.0" } diff --git a/dependencies.lock b/dependencies.lock index c2280d49..1ad8d353 100644 --- a/dependencies.lock +++ b/dependencies.lock @@ -9,22 +9,18 @@ }, "jmhCompileClasspath": { "org.openjdk.jmh:jmh-core": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.openjdk.jmh:jmh-generator-bytecode": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" } }, "jmhRuntimeClasspath": { "org.openjdk.jmh:jmh-core": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.openjdk.jmh:jmh-generator-bytecode": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" } } } \ No newline at end of file diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 0e1c5f4f..a1d693a2 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -1,118 +1,90 @@ { "compileClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.11.0", - "requested": "2.11.0" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.9.8", - "requested": "2.9.8" + "locked": "2.9.8" }, "com.google.guava:guava": { - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.netflix.archaius:archaius-core": { - "locked": "0.7.5", - "requested": "0.7.5" + "locked": "0.7.5" }, "com.netflix.eureka:eureka-client": { - "locked": "1.9.18", - "requested": "1.9.18" + "locked": "1.9.18" }, "com.netflix.netflix-commons:netflix-commons-util": { - "locked": "0.3.0", - "requested": "0.3.0" + "locked": "0.3.0" }, "com.netflix.ribbon:ribbon-archaius": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.spectator:spectator-api": { - "locked": "0.110.0", - "requested": "0.110.0" + "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.23.0", - "requested": "0.23.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { - "locked": "1.2.1", - "requested": "1.2.1" + "locked": "1.2.1" }, "javax.inject:javax.inject": { - "locked": "1", - "requested": "1" + "locked": "1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.66", - "requested": "1.+" + "locked": "1.66" }, "org.slf4j:slf4j-api": { - "locked": "1.7.25", - "requested": "1.7.25" + "locked": "1.7.25" } }, "jmh": { "org.openjdk.jmh:jmh-core": { - "locked": "1.25.1", - "requested": "1.+" + "locked": "1.25.1" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.25.1", - "requested": "1.+" + "locked": "1.25.1" }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21" @@ -120,612 +92,462 @@ }, "jmhCompileClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.11.0", - "requested": "2.11.0" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.9.8", - "requested": "2.9.8" + "locked": "2.9.8" }, "com.google.guava:guava": { - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.netflix.archaius:archaius-core": { - "locked": "0.7.5", - "requested": "0.7.5" + "locked": "0.7.5" }, "com.netflix.eureka:eureka-client": { - "locked": "1.9.18", - "requested": "1.9.18" + "locked": "1.9.18" }, "com.netflix.netflix-commons:netflix-commons-util": { - "locked": "0.3.0", - "requested": "0.3.0" + "locked": "0.3.0" }, "com.netflix.ribbon:ribbon-archaius": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.spectator:spectator-api": { - "locked": "0.110.0", - "requested": "0.110.0" + "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.23.0", - "requested": "0.23.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { - "locked": "1.2.1", - "requested": "1.2.1" + "locked": "1.2.1" }, "javax.inject:javax.inject": { - "locked": "1", - "requested": "1" + "locked": "1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.66", - "requested": "1.+" + "locked": "1.66" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.25.1", - "requested": "1.21" + "locked": "1.25.1" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.25.1", - "requested": "1.+" + "locked": "1.25.1" }, "org.openjdk.jmh:jmh-generator-bytecode": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.slf4j:slf4j-api": { - "locked": "1.7.25", - "requested": "1.7.25" + "locked": "1.7.25" } }, "jmhRuntimeClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.11.0", - "requested": "2.11.0" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.9.8", - "requested": "2.9.8" + "locked": "2.9.8" }, "com.google.guava:guava": { - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.google.truth:truth": { - "locked": "1.0.1", - "requested": "1.0.1" + "locked": "1.0.1" }, "com.netflix.archaius:archaius-core": { - "locked": "0.7.6", - "requested": "0.7.5" + "locked": "0.7.6" }, "com.netflix.eureka:eureka-client": { - "locked": "1.9.18", - "requested": "1.9.18" + "locked": "1.9.18" }, "com.netflix.netflix-commons:netflix-commons-util": { - "locked": "0.3.0", - "requested": "0.3.0" + "locked": "0.3.0" }, "com.netflix.ribbon:ribbon-archaius": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.spectator:spectator-api": { - "locked": "0.110.0", - "requested": "0.110.0" + "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.34.Final", - "requested": "2.0.34.Final" + "locked": "2.0.34.Final" }, "io.netty:netty-transport": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.23.0", - "requested": "0.23.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { - "locked": "1.2.1", - "requested": "1.2.1" + "locked": "1.2.1" }, "javax.inject:javax.inject": { - "locked": "1", - "requested": "1" + "locked": "1" }, "junit:junit": { - "locked": "4.13", - "requested": "4.13" + "locked": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.66", - "requested": "1.+" + "locked": "1.66" }, "org.mockito:mockito-core": { - "locked": "3.5.10", - "requested": "3.+" + "locked": "3.5.10" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.25.1", - "requested": "1.21" + "locked": "1.25.1" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.25.1", - "requested": "1.+" + "locked": "1.25.1" }, "org.openjdk.jmh:jmh-generator-bytecode": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.slf4j:slf4j-api": { - "locked": "1.7.30", - "requested": "1.7.25" + "locked": "1.7.30" }, "org.slf4j:slf4j-simple": { - "locked": "1.7.29", - "requested": "1.7.29" + "locked": "1.7.29" } }, "runtimeClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.11.0", - "requested": "2.11.0" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.9.8", - "requested": "2.9.8" + "locked": "2.9.8" }, "com.google.guava:guava": { - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.netflix.archaius:archaius-core": { - "locked": "0.7.6", - "requested": "0.7.5" + "locked": "0.7.6" }, "com.netflix.eureka:eureka-client": { - "locked": "1.9.18", - "requested": "1.9.18" + "locked": "1.9.18" }, "com.netflix.netflix-commons:netflix-commons-util": { - "locked": "0.3.0", - "requested": "0.3.0" + "locked": "0.3.0" }, "com.netflix.ribbon:ribbon-archaius": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.spectator:spectator-api": { - "locked": "0.110.0", - "requested": "0.110.0" + "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.34.Final", - "requested": "2.0.34.Final" + "locked": "2.0.34.Final" }, "io.netty:netty-transport": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.23.0", - "requested": "0.23.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { - "locked": "1.2.1", - "requested": "1.2.1" + "locked": "1.2.1" }, "javax.inject:javax.inject": { - "locked": "1", - "requested": "1" + "locked": "1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.66", - "requested": "1.+" + "locked": "1.66" }, "org.slf4j:slf4j-api": { - "locked": "1.7.30", - "requested": "1.7.25" + "locked": "1.7.30" } }, "testCompileClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.11.0", - "requested": "2.11.0" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.9.8", - "requested": "2.9.8" + "locked": "2.9.8" }, "com.google.guava:guava": { - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.google.truth:truth": { - "locked": "1.0.1", - "requested": "1.0.1" + "locked": "1.0.1" }, "com.netflix.archaius:archaius-core": { - "locked": "0.7.5", - "requested": "0.7.5" + "locked": "0.7.5" }, "com.netflix.eureka:eureka-client": { - "locked": "1.9.18", - "requested": "1.9.18" + "locked": "1.9.18" }, "com.netflix.netflix-commons:netflix-commons-util": { - "locked": "0.3.0", - "requested": "0.3.0" + "locked": "0.3.0" }, "com.netflix.ribbon:ribbon-archaius": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.spectator:spectator-api": { - "locked": "0.110.0", - "requested": "0.110.0" + "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.23.0", - "requested": "0.23.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { - "locked": "1.2.1", - "requested": "1.2.1" + "locked": "1.2.1" }, "javax.inject:javax.inject": { - "locked": "1", - "requested": "1" + "locked": "1" }, "junit:junit": { - "locked": "4.13", - "requested": "4.13" + "locked": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.66", - "requested": "1.+" + "locked": "1.66" }, "org.mockito:mockito-core": { - "locked": "3.5.10", - "requested": "3.+" + "locked": "3.5.10" }, "org.slf4j:slf4j-api": { - "locked": "1.7.25", - "requested": "1.7.25" + "locked": "1.7.25" } }, "testRuntimeClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.11.0", - "requested": "2.11.0" + "locked": "2.11.0" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.9.8", - "requested": "2.9.8" + "locked": "2.9.8" }, "com.google.guava:guava": { - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.google.truth:truth": { - "locked": "1.0.1", - "requested": "1.0.1" + "locked": "1.0.1" }, "com.netflix.archaius:archaius-core": { - "locked": "0.7.6", - "requested": "0.7.5" + "locked": "0.7.6" }, "com.netflix.eureka:eureka-client": { - "locked": "1.9.18", - "requested": "1.9.18" + "locked": "1.9.18" }, "com.netflix.netflix-commons:netflix-commons-util": { - "locked": "0.3.0", - "requested": "0.3.0" + "locked": "0.3.0" }, "com.netflix.ribbon:ribbon-archaius": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.7.17", - "requested": "2.7.17" + "locked": "2.7.17" }, "com.netflix.spectator:spectator-api": { - "locked": "0.110.0", - "requested": "0.110.0" + "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-common": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-handler": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.34.Final", - "requested": "2.0.34.Final" + "locked": "2.0.34.Final" }, "io.netty:netty-transport": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.52.Final", - "requested": "4.1.52.Final" + "locked": "4.1.52.Final" }, "io.perfmark:perfmark-api": { - "locked": "0.23.0", - "requested": "0.23.0" + "locked": "0.23.0" }, "io.reactivex:rxjava": { - "locked": "1.2.1", - "requested": "1.2.1" + "locked": "1.2.1" }, "javax.inject:javax.inject": { - "locked": "1", - "requested": "1" + "locked": "1" }, "junit:junit": { - "locked": "4.13", - "requested": "4.13" + "locked": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.66", - "requested": "1.+" + "locked": "1.66" }, "org.mockito:mockito-core": { - "locked": "3.5.10", - "requested": "3.+" + "locked": "3.5.10" }, "org.slf4j:slf4j-api": { - "locked": "1.7.30", - "requested": "1.7.25" + "locked": "1.7.30" }, "org.slf4j:slf4j-simple": { - "locked": "1.7.29", - "requested": "1.7.29" + "locked": "1.7.29" } } } \ No newline at end of file diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index 52cc329a..bb96d374 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -7,8 +7,7 @@ "locked": "2.9.8" }, "com.google.guava:guava": { - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -110,8 +109,7 @@ "locked": "1.2.1" }, "org.codehaus.groovy:groovy-all": { - "locked": "3.0.3", - "requested": "3.0.3" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -136,8 +134,7 @@ "locked": "2.9.8" }, "com.google.guava:guava": { - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -239,16 +236,13 @@ "locked": "1.2.1" }, "org.codehaus.groovy:groovy-all": { - "locked": "3.0.3", - "requested": "3.0.3" + "locked": "3.0.3" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.openjdk.jmh:jmh-generator-bytecode": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -274,12 +268,10 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.google.truth:truth": { - "locked": "1.0.1", - "requested": "1.0.1" + "locked": "1.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -417,8 +409,7 @@ "locked": "1" }, "junit:junit": { - "locked": "4.13", - "requested": "4.13" + "locked": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ @@ -427,20 +418,16 @@ "locked": "1.66" }, "org.codehaus.groovy:groovy-all": { - "locked": "3.0.3", - "requested": "3.0.3" + "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.5.10", - "requested": "3.+" + "locked": "3.5.10" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.openjdk.jmh:jmh-generator-bytecode": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -466,8 +453,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -611,8 +597,7 @@ "locked": "1.66" }, "org.codehaus.groovy:groovy-all": { - "locked": "3.0.3", - "requested": "3.0.3" + "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -629,12 +614,10 @@ "locked": "2.9.8" }, "com.google.guava:guava": { - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.google.truth:truth": { - "locked": "1.0.1", - "requested": "1.0.1" + "locked": "1.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -736,16 +719,13 @@ "locked": "1.2.1" }, "junit:junit": { - "locked": "4.13", - "requested": "4.13" + "locked": "4.13" }, "org.codehaus.groovy:groovy-all": { - "locked": "3.0.3", - "requested": "3.0.3" + "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.5.10", - "requested": "3.+" + "locked": "3.5.10" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -771,12 +751,10 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.google.truth:truth": { - "locked": "1.0.1", - "requested": "1.0.1" + "locked": "1.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -914,8 +892,7 @@ "locked": "1" }, "junit:junit": { - "locked": "4.13", - "requested": "4.13" + "locked": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ @@ -924,12 +901,10 @@ "locked": "1.66" }, "org.codehaus.groovy:groovy-all": { - "locked": "3.0.3", - "requested": "3.0.3" + "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.5.10", - "requested": "3.+" + "locked": "3.5.10" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 6ab6f39b..f779fd1c 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -7,8 +7,7 @@ "locked": "2.9.8" }, "com.google.inject:guice": { - "locked": "4.2.3", - "requested": "4.2.3" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -68,8 +67,7 @@ "project": true }, "commons-configuration:commons-configuration": { - "locked": "1.8", - "requested": "1.8" + "locked": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ @@ -136,8 +134,7 @@ "locked": "2.9.8" }, "com.google.inject:guice": { - "locked": "4.2.3", - "requested": "4.2.3" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -197,8 +194,7 @@ "project": true }, "commons-configuration:commons-configuration": { - "locked": "1.8", - "requested": "1.8" + "locked": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ @@ -243,12 +239,10 @@ "locked": "1.2.1" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.openjdk.jmh:jmh-generator-bytecode": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -277,12 +271,10 @@ "locked": "29.0-jre" }, "com.google.inject:guice": { - "locked": "4.2.3", - "requested": "4.2.3" + "locked": "4.2.3" }, "com.google.truth:truth": { - "locked": "1.0.1", - "requested": "1.0.1" + "locked": "1.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -297,8 +289,7 @@ "locked": "1.9.18" }, "com.netflix.governator:governator-test-junit": { - "locked": "1.17.10", - "requested": "1.+" + "locked": "1.17.10" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -346,8 +337,7 @@ "project": true }, "commons-configuration:commons-configuration": { - "locked": "1.8", - "requested": "1.8" + "locked": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ @@ -428,8 +418,7 @@ "locked": "1" }, "junit:junit": { - "locked": "4.13", - "requested": "4.13" + "locked": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ @@ -438,16 +427,13 @@ "locked": "1.66" }, "org.mockito:mockito-core": { - "locked": "3.5.10", - "requested": "3.+" + "locked": "3.5.10" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.openjdk.jmh:jmh-generator-bytecode": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -476,8 +462,7 @@ "locked": "29.0-jre" }, "com.google.inject:guice": { - "locked": "4.2.3", - "requested": "4.2.3" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -537,8 +522,7 @@ "project": true }, "commons-configuration:commons-configuration": { - "locked": "1.8", - "requested": "1.8" + "locked": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ @@ -639,12 +623,10 @@ "locked": "2.9.8" }, "com.google.inject:guice": { - "locked": "4.2.3", - "requested": "4.2.3" + "locked": "4.2.3" }, "com.google.truth:truth": { - "locked": "1.0.1", - "requested": "1.0.1" + "locked": "1.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -659,8 +641,7 @@ "locked": "1.9.18" }, "com.netflix.governator:governator-test-junit": { - "locked": "1.17.10", - "requested": "1.+" + "locked": "1.17.10" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -708,8 +689,7 @@ "project": true }, "commons-configuration:commons-configuration": { - "locked": "1.8", - "requested": "1.8" + "locked": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ @@ -754,12 +734,10 @@ "locked": "1.2.1" }, "junit:junit": { - "locked": "4.13", - "requested": "4.13" + "locked": "4.13" }, "org.mockito:mockito-core": { - "locked": "3.5.10", - "requested": "3.+" + "locked": "3.5.10" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -788,12 +766,10 @@ "locked": "29.0-jre" }, "com.google.inject:guice": { - "locked": "4.2.3", - "requested": "4.2.3" + "locked": "4.2.3" }, "com.google.truth:truth": { - "locked": "1.0.1", - "requested": "1.0.1" + "locked": "1.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -808,8 +784,7 @@ "locked": "1.9.18" }, "com.netflix.governator:governator-test-junit": { - "locked": "1.17.10", - "requested": "1.+" + "locked": "1.17.10" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -857,8 +832,7 @@ "project": true }, "commons-configuration:commons-configuration": { - "locked": "1.8", - "requested": "1.8" + "locked": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ @@ -939,8 +913,7 @@ "locked": "1" }, "junit:junit": { - "locked": "4.13", - "requested": "4.13" + "locked": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ @@ -949,8 +922,7 @@ "locked": "1.66" }, "org.mockito:mockito-core": { - "locked": "3.5.10", - "requested": "3.+" + "locked": "3.5.10" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index ab548d5d..b4ea0ea3 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -7,8 +7,7 @@ "locked": "2.9.8" }, "com.google.guava:guava": { - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -132,8 +131,7 @@ "locked": "2.9.8" }, "com.google.guava:guava": { - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -235,12 +233,10 @@ "locked": "1.2.1" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.openjdk.jmh:jmh-generator-bytecode": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -266,12 +262,10 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.google.truth:truth": { - "locked": "1.0.1", - "requested": "1.0.1" + "locked": "1.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -409,8 +403,7 @@ "locked": "1" }, "junit:junit": { - "locked": "4.13", - "requested": "4.13" + "locked": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ @@ -419,12 +412,10 @@ "locked": "1.66" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.openjdk.jmh:jmh-generator-bytecode": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -450,8 +441,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -783,12 +773,10 @@ "locked": "2.9.8" }, "com.google.guava:guava": { - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.google.truth:truth": { - "locked": "1.0.1", - "requested": "1.0.1" + "locked": "1.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -890,8 +878,7 @@ "locked": "1.2.1" }, "junit:junit": { - "locked": "4.13", - "requested": "4.13" + "locked": "4.13" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -917,12 +904,10 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "29.0-jre", - "requested": "29.0-jre" + "locked": "29.0-jre" }, "com.google.truth:truth": { - "locked": "1.0.1", - "requested": "1.0.1" + "locked": "1.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -1060,8 +1045,7 @@ "locked": "1" }, "junit:junit": { - "locked": "4.13", - "requested": "4.13" + "locked": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 79613f42..85ffc80a 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -196,12 +196,10 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.18", - "requested": "1.9.18" + "locked": "1.9.18" }, "com.netflix.governator:governator-core": { - "locked": "1.17.10", - "requested": "1.+" + "locked": "1.17.10" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -255,8 +253,7 @@ "project": true }, "commons-configuration:commons-configuration": { - "locked": "1.8", - "requested": "1.8" + "locked": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ @@ -344,12 +341,10 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.18", - "requested": "1.9.18" + "locked": "1.9.18" }, "com.netflix.governator:governator-core": { - "locked": "1.17.10", - "requested": "1.+" + "locked": "1.17.10" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -403,8 +398,7 @@ "project": true }, "commons-configuration:commons-configuration": { - "locked": "1.8", - "requested": "1.8" + "locked": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ @@ -455,12 +449,10 @@ "locked": "3.0.3" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.openjdk.jmh:jmh-generator-bytecode": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -505,12 +497,10 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.18", - "requested": "1.9.18" + "locked": "1.9.18" }, "com.netflix.governator:governator-core": { - "locked": "1.17.10", - "requested": "1.+" + "locked": "1.17.10" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -571,8 +561,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "1.8", - "requested": "1.8" + "locked": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ @@ -653,12 +642,10 @@ "locked": "1" }, "org.apache.logging.log4j:log4j-core": { - "locked": "2.13.3", - "requested": "2.13.3" + "locked": "2.13.3" }, "org.apache.logging.log4j:log4j-slf4j-impl": { - "locked": "2.13.1", - "requested": "2.13.1" + "locked": "2.13.1" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ @@ -673,12 +660,10 @@ "locked": "3.0.3" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.openjdk.jmh:jmh-generator-bytecode": { - "locked": "1.21", - "requested": "1.21" + "locked": "1.21" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -723,12 +708,10 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.18", - "requested": "1.9.18" + "locked": "1.9.18" }, "com.netflix.governator:governator-core": { - "locked": "1.17.10", - "requested": "1.+" + "locked": "1.17.10" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -789,8 +772,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "1.8", - "requested": "1.8" + "locked": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ @@ -871,12 +853,10 @@ "locked": "1" }, "org.apache.logging.log4j:log4j-core": { - "locked": "2.13.3", - "requested": "2.13.3" + "locked": "2.13.3" }, "org.apache.logging.log4j:log4j-slf4j-impl": { - "locked": "2.13.1", - "requested": "2.13.1" + "locked": "2.13.1" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ @@ -920,12 +900,10 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.18", - "requested": "1.9.18" + "locked": "1.9.18" }, "com.netflix.governator:governator-core": { - "locked": "1.17.10", - "requested": "1.+" + "locked": "1.17.10" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -979,8 +957,7 @@ "project": true }, "commons-configuration:commons-configuration": { - "locked": "1.8", - "requested": "1.8" + "locked": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ @@ -1073,12 +1050,10 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.9.18", - "requested": "1.9.18" + "locked": "1.9.18" }, "com.netflix.governator:governator-core": { - "locked": "1.17.10", - "requested": "1.+" + "locked": "1.17.10" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -1139,8 +1114,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "1.8", - "requested": "1.8" + "locked": "1.8" }, "io.netty:netty-buffer": { "firstLevelTransitive": [ @@ -1221,12 +1195,10 @@ "locked": "1" }, "org.apache.logging.log4j:log4j-core": { - "locked": "2.13.3", - "requested": "2.13.3" + "locked": "2.13.3" }, "org.apache.logging.log4j:log4j-slf4j-impl": { - "locked": "2.13.1", - "requested": "2.13.1" + "locked": "2.13.1" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ From 9c7def3b24568eea4fee124c797f5b7dcf6e2422 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 16 Sep 2020 14:27:51 -0700 Subject: [PATCH 138/273] test with jdk15 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e813f681..1446d424 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ matrix: env: GRADLE_PUBLISH=true - jdk: openjdk11 env: GRADLE_PUBLISH=false - - jdk: openjdk14 + - jdk: openjdk15 env: GRADLE_PUBLISH=false install: "./installViaTravis.sh" script: "./buildViaTravis.sh" From a0d835617cda9bef333fc882f9ab60d58bff5f05 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 25 Sep 2020 10:31:26 -0700 Subject: [PATCH 139/273] zuul-core: Modify the type of the Chosen Host address to be an InetAddress. (#896) This will allow clearer understanding of what this type can be used as in other parts of the Zuul Code base. The long term vision is to modify this to not be an InetAddress, but a `ExtendedSocketAddress` which includes the other metaa information about the addr. The change as is is more to make sure the type is consitent with the current semantics, rather than changing the semantics. `ZUUL_ORIGIN_ATTEMPT_IPADDR_MAP_KEY` will eventually be deleted, as it only seems to be used for event context logging. That too will occur in a followup change. --- .../zuul/filters/endpoint/ProxyEndpoint.java | 33 +++++++++++-------- .../connectionpool/ClientChannelManager.java | 3 +- .../DefaultClientChannelManager.java | 2 +- .../netty/connectionpool/IConnectionPool.java | 3 +- .../PerServerConnectionPool.java | 16 ++++----- .../zuul/origins/BasicNettyOrigin.java | 3 +- .../com/netflix/zuul/origins/NettyOrigin.java | 3 +- 7 files changed, 37 insertions(+), 26 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 38a9b7ab..78b9ad6d 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -94,6 +94,7 @@ import io.netty.util.concurrent.GenericFutureListener; import io.netty.util.concurrent.Promise; import java.io.UnsupportedEncodingException; +import java.net.InetAddress; import java.net.URLDecoder; import java.util.ArrayList; import java.util.HashMap; @@ -118,7 +119,7 @@ public class ProxyEndpoint extends SyncZuulFilterAdapter responseFilters; protected final AtomicReference chosenServer; - protected final AtomicReference chosenHostAddr; + protected final AtomicReference chosenHostAddr; /* Individual request related state */ protected final HttpRequestMessage zuulRequest; @@ -353,24 +354,30 @@ private void filterResponseChunk(final HttpContent chunk) { private void storeAndLogOriginRequestInfo() { final Map eventProps = context.getEventProperties(); - Map attempToIpAddressMap = (Map) eventProps.get(CommonContextKeys.ZUUL_ORIGIN_ATTEMPT_IPADDR_MAP_KEY); - Map attempToChosenHostMap = (Map) eventProps.get(CommonContextKeys.ZUUL_ORIGIN_CHOSEN_HOST_ADDR_MAP_KEY); - if (attempToIpAddressMap == null) { - attempToIpAddressMap = new HashMap<>(); + // These two maps appear to be almost the same but are slightly different. Also, the types in the map don't + // match exactly what needs to happen, so this is more of a To-Do. ZUUL_ORIGIN_ATTEMPT_IPADDR_MAP_KEY is + // supposed to be the mapping of IP addresses of the server. This is (AFAICT) only used for logging. It is + // an IP address semantically, but a String here. The two should be swapped. + // ZUUL_ORIGIN_CHOSEN_HOST_ADDR_MAP_KEY is almost always an IP address, but may some times be a hostname in + // case the discovery info is not an IP. + Map attemptToIpAddressMap = (Map) eventProps.get(CommonContextKeys.ZUUL_ORIGIN_ATTEMPT_IPADDR_MAP_KEY); + Map attemptToChosenHostMap = (Map) eventProps.get(CommonContextKeys.ZUUL_ORIGIN_CHOSEN_HOST_ADDR_MAP_KEY); + if (attemptToIpAddressMap == null) { + attemptToIpAddressMap = new HashMap<>(); } - if (attempToChosenHostMap == null) { - attempToChosenHostMap = new HashMap<>(); + if (attemptToChosenHostMap == null) { + attemptToChosenHostMap = new HashMap<>(); } String ipAddr = origin.getIpAddrFromServer(chosenServer.get()); if (ipAddr != null) { - attempToIpAddressMap.put(attemptNum, ipAddr); - eventProps.put(CommonContextKeys.ZUUL_ORIGIN_ATTEMPT_IPADDR_MAP_KEY, attempToIpAddressMap); - context.put(CommonContextKeys.ZUUL_ORIGIN_ATTEMPT_IPADDR_MAP_KEY, attempToIpAddressMap); + attemptToIpAddressMap.put(attemptNum, ipAddr); + eventProps.put(CommonContextKeys.ZUUL_ORIGIN_ATTEMPT_IPADDR_MAP_KEY, attemptToIpAddressMap); + context.put(CommonContextKeys.ZUUL_ORIGIN_ATTEMPT_IPADDR_MAP_KEY, attemptToIpAddressMap); } if (chosenHostAddr.get() != null) { - attempToChosenHostMap.put(attemptNum, chosenHostAddr.get()); - eventProps.put(CommonContextKeys.ZUUL_ORIGIN_CHOSEN_HOST_ADDR_MAP_KEY, attempToChosenHostMap); - context.put(CommonContextKeys.ZUUL_ORIGIN_CHOSEN_HOST_ADDR_MAP_KEY, attempToChosenHostMap); + attemptToChosenHostMap.put(attemptNum, chosenHostAddr.get()); + eventProps.put(CommonContextKeys.ZUUL_ORIGIN_CHOSEN_HOST_ADDR_MAP_KEY, attemptToChosenHostMap); + context.put(CommonContextKeys.ZUUL_ORIGIN_CHOSEN_HOST_ADDR_MAP_KEY, attemptToChosenHostMap); } eventProps.put(CommonContextKeys.ZUUL_ORIGIN_REQUEST_URI, zuulRequest.getPathAndQuery()); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java index b7941aed..39be1560 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java @@ -22,6 +22,7 @@ import io.netty.channel.EventLoop; import io.netty.util.concurrent.Promise; +import java.net.InetAddress; import java.util.concurrent.atomic.AtomicReference; /** @@ -48,7 +49,7 @@ Promise acquire( Object key, CurrentPassport passport, AtomicReference selectedServer, - AtomicReference selectedHostAddr); + AtomicReference selectedHostAddr); boolean isCold(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java index d63d99d8..ac7cd602 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java @@ -326,7 +326,7 @@ public Promise acquire( @Nullable Object key, CurrentPassport passport, AtomicReference selectedServer, - AtomicReference selectedHostAddr) { + AtomicReference selectedHostAddr) { if (shuttingDown) { Promise promise = eventLoop.newPromise(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/IConnectionPool.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/IConnectionPool.java index 94809f42..3980a9b7 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/IConnectionPool.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/IConnectionPool.java @@ -20,6 +20,7 @@ import io.netty.channel.EventLoop; import io.netty.util.concurrent.Promise; +import java.net.InetAddress; import java.util.concurrent.atomic.AtomicReference; /** @@ -30,7 +31,7 @@ public interface IConnectionPool { Promise acquire( - EventLoop eventLoop, CurrentPassport passport, AtomicReference selectedHostAddr); + EventLoop eventLoop, CurrentPassport passport, AtomicReference selectedHostAddr); boolean release(PooledConnection conn); boolean remove(PooledConnection conn); void shutdown(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java index f93370c2..22487bd6 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java @@ -29,6 +29,7 @@ import io.netty.channel.ChannelFuture; import io.netty.channel.EventLoop; import io.netty.util.concurrent.Promise; +import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.util.Deque; @@ -156,7 +157,7 @@ protected void removeIdleStateHandler(PooledConnection conn) { @Override public Promise acquire( - EventLoop eventLoop, CurrentPassport passport, AtomicReference selectedHostAddr) { + EventLoop eventLoop, CurrentPassport passport, AtomicReference selectedHostAddr) { requestConnCounter.increment(); stats.incrementActiveRequestsCount(); @@ -229,7 +230,7 @@ protected Deque getPoolForEventLoop(EventLoop eventLoop) protected void tryMakingNewConnection( EventLoop eventLoop, Promise promise, CurrentPassport passport, - AtomicReference selectedHostAddr) { + AtomicReference selectedHostAddr) { // Enforce MaxConnectionsPerHost config. int maxConnectionsPerHost = config.maxConnectionsPerHost(); int openAndOpeningConnectionCount = stats.getOpenConnectionsCount() + connCreationsInProgress.get(); @@ -419,14 +420,13 @@ public int getConnsInUse() { return connsInUse.get(); } - private static String getSelectedHostString(SocketAddress addr) { + @Nullable + private static InetAddress getSelectedHostString(SocketAddress addr) { if (addr instanceof InetSocketAddress) { - // This is used for logging mainly. TODO(carl-mastrangelo): consider passing the whole address back - // rather than the string form. - return ((InetSocketAddress) addr).getAddress().getHostAddress(); + return ((InetSocketAddress) addr).getAddress(); } else { - // If it's some other kind of address, just set it to the string form as a best effort guess. - return addr.toString(); + // If it's some other kind of address, just set it to empty + return null; } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java index 17fe07fa..26e3eccd 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java @@ -48,6 +48,7 @@ import com.netflix.zuul.stats.status.StatusCategoryUtils; import io.netty.channel.EventLoop; import io.netty.util.concurrent.Promise; +import java.net.InetAddress; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; @@ -118,7 +119,7 @@ public boolean isCold() { @Override public Promise connectToOrigin( HttpRequestMessage zuulReq, EventLoop eventLoop, int attemptNumber, CurrentPassport passport, - AtomicReference chosenServer, AtomicReference chosenHostAddr) { + AtomicReference chosenServer, AtomicReference chosenHostAddr) { return clientChannelManager.acquire(eventLoop, null, passport, chosenServer, chosenHostAddr); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java index aa1e8510..9fd6425d 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java @@ -30,6 +30,7 @@ import io.netty.channel.EventLoop; import io.netty.util.concurrent.Promise; +import java.net.InetAddress; import java.util.concurrent.atomic.AtomicReference; /** @@ -43,7 +44,7 @@ public interface NettyOrigin extends InstrumentedOrigin { Promise connectToOrigin(final HttpRequestMessage zuulReq, EventLoop eventLoop, int attemptNumber, CurrentPassport passport, AtomicReference chosenServer, - AtomicReference chosenHostAddr); + AtomicReference chosenHostAddr); Timing getProxyTiming(HttpRequestMessage zuulReq); From 17142395d9c7a5b725f591c27fb65b39b05f8dff Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Tue, 29 Sep 2020 10:10:44 -0700 Subject: [PATCH 140/273] downgrade ribbon to fix proxying --- gradle.properties | 2 +- zuul-core/dependencies.lock | 78 ++++++++++++++++---------------- zuul-groovy/dependencies.lock | 66 +++++++++++++-------------- zuul-guice/dependencies.lock | 66 +++++++++++++-------------- zuul-processor/dependencies.lock | 70 ++++++++++++++-------------- zuul-sample/dependencies.lock | 70 ++++++++++++++-------------- 6 files changed, 176 insertions(+), 176 deletions(-) diff --git a/gradle.properties b/gradle.properties index d5ec7830..3ce9a1a8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ versions_groovy=3.0.3 -versions_ribbon=2.7.17 +versions_ribbon=2.4.4 versions_netty=4.1.52.Final release.scope=patch release.version=2.1.9-SNAPSHOT diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index a1d693a2..66d007cf 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -19,19 +19,19 @@ "locked": "0.3.0" }, "com.netflix.ribbon:ribbon-archaius": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "locked": "0.110.0" @@ -81,10 +81,10 @@ }, "jmh": { "org.openjdk.jmh:jmh-core": { - "locked": "1.25.1" + "locked": "1.25.2" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.25.1" + "locked": "1.25.2" }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21" @@ -110,19 +110,19 @@ "locked": "0.3.0" }, "com.netflix.ribbon:ribbon-archaius": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "locked": "0.110.0" @@ -167,10 +167,10 @@ "locked": "1.66" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.25.1" + "locked": "1.25.2" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.25.1" + "locked": "1.25.2" }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21" @@ -202,19 +202,19 @@ "locked": "0.3.0" }, "com.netflix.ribbon:ribbon-archaius": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "locked": "0.110.0" @@ -265,13 +265,13 @@ "locked": "1.66" }, "org.mockito:mockito-core": { - "locked": "3.5.10" + "locked": "3.5.13" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.25.1" + "locked": "1.25.2" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.25.1" + "locked": "1.25.2" }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21" @@ -303,19 +303,19 @@ "locked": "0.3.0" }, "com.netflix.ribbon:ribbon-archaius": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "locked": "0.110.0" @@ -389,19 +389,19 @@ "locked": "0.3.0" }, "com.netflix.ribbon:ribbon-archaius": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "locked": "0.110.0" @@ -449,7 +449,7 @@ "locked": "1.66" }, "org.mockito:mockito-core": { - "locked": "3.5.10" + "locked": "3.5.13" }, "org.slf4j:slf4j-api": { "locked": "1.7.25" @@ -478,19 +478,19 @@ "locked": "0.3.0" }, "com.netflix.ribbon:ribbon-archaius": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "locked": "0.110.0" @@ -541,7 +541,7 @@ "locked": "1.66" }, "org.mockito:mockito-core": { - "locked": "3.5.10" + "locked": "3.5.13" }, "org.slf4j:slf4j-api": { "locked": "1.7.30" diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index bb96d374..57b34321 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -31,31 +31,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -158,31 +158,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -295,31 +295,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -421,7 +421,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.5.10" + "locked": "3.5.13" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -477,31 +477,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -641,31 +641,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -725,7 +725,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.5.10" + "locked": "3.5.13" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -778,31 +778,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -904,7 +904,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.5.10" + "locked": "3.5.13" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index f779fd1c..362cc81d 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -31,31 +31,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -158,31 +158,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -301,31 +301,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -427,7 +427,7 @@ "locked": "1.66" }, "org.mockito:mockito-core": { - "locked": "3.5.10" + "locked": "3.5.13" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -486,31 +486,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -653,31 +653,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -737,7 +737,7 @@ "locked": "4.13" }, "org.mockito:mockito-core": { - "locked": "3.5.10" + "locked": "3.5.13" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -796,31 +796,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -922,7 +922,7 @@ "locked": "1.66" }, "org.mockito:mockito-core": { - "locked": "3.5.10" + "locked": "3.5.13" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index b4ea0ea3..8bb80a75 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -31,31 +31,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -155,31 +155,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -289,31 +289,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -465,31 +465,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -633,31 +633,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -800,31 +800,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -931,31 +931,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 85ffc80a..c995c3e7 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -41,31 +41,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -211,31 +211,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -356,31 +356,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -512,31 +512,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -723,31 +723,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -915,31 +915,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ @@ -1065,31 +1065,31 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-httpclient": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.7.17" + "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ From c9d60f9c39c0edc5e5847b9221d122374d43529f Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Tue, 29 Sep 2020 10:42:09 -0700 Subject: [PATCH 141/273] Add tests to verify uri encoding w/ query params --- .../server/ClientRequestReceiverTest.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java index e63bdc83..098fb4fe 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java @@ -63,6 +63,24 @@ public void proxyProtocol_portSetInSessionContextAndInHttpRequestMessageImpl() { channel.close(); } + @Test + public void parseQueryParamsWithEncodedCharsInURI() { + + EmbeddedChannel channel = new EmbeddedChannel(new ClientRequestReceiver(null)); + channel.attr(SourceAddressChannelHandler.ATTR_SERVER_LOCAL_PORT).set(1234); + HttpRequestMessageImpl result; + { + channel.writeInbound(new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "foo/bar/somePath/%5E1.0.0?param1=foo¶m2=bar¶m3=baz", Unpooled.buffer())); + result = channel.readInbound(); + result.disposeBufferedBody(); + } + + assertEquals("foo", result.getQueryParams().getFirst("param1")); + assertEquals("bar", result.getQueryParams().getFirst("param2")); + assertEquals("baz", result.getQueryParams().getFirst("param3")); + + channel.close(); + } @Test public void largeResponse_atLimit() { From be48a05641c2d5a5aa507539150f42d46c7120cc Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 7 Oct 2020 14:15:17 -0700 Subject: [PATCH 142/273] core: remove some refs to the eureka client --- .../common/status/ServerStatusManager.java | 39 +------------------ 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/status/ServerStatusManager.java b/zuul-core/src/main/java/com/netflix/netty/common/status/ServerStatusManager.java index 1fba2a6c..bba8acd3 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/status/ServerStatusManager.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/status/ServerStatusManager.java @@ -18,13 +18,10 @@ import com.netflix.appinfo.ApplicationInfoManager; import com.netflix.appinfo.InstanceInfo; -import com.netflix.discovery.DiscoveryClient; import javax.inject.Inject; import javax.inject.Singleton; -import static com.netflix.appinfo.InstanceInfo.InstanceStatus.UNKNOWN; -import static com.netflix.appinfo.InstanceInfo.InstanceStatus.UP; /** * User: michaels@netflix.com @@ -35,47 +32,13 @@ public class ServerStatusManager { private final ApplicationInfoManager applicationInfoManager; - private final DiscoveryClient discoveryClient; @Inject - public ServerStatusManager(ApplicationInfoManager applicationInfoManager, DiscoveryClient discoveryClient) - { + public ServerStatusManager(ApplicationInfoManager applicationInfoManager) { this.applicationInfoManager = applicationInfoManager; - this.discoveryClient = discoveryClient; - } - - public InstanceInfo.InstanceStatus status() { - - // NOTE: when debugging this locally, found to my surprise that when the instance is maked OUT_OF_SERVICE remotely - // in Discovery, although the StatusChangeEvent does get fired, the _local_ InstanceStatus (ie. - // applicationInfoManager.getInfo().getStatus()) does not get changed to reflect that. - // So that's why I'm doing this little dance here of looking at both remote and local statuses. - - InstanceInfo.InstanceStatus local = localStatus(); - InstanceInfo.InstanceStatus remote = remoteStatus(); - - if (local == UP && remote != UNKNOWN) { - return remote; - } - else { - return local; - } - } - - public InstanceInfo.InstanceStatus localStatus() { - return applicationInfoManager.getInfo().getStatus(); - } - - public InstanceInfo.InstanceStatus remoteStatus() { - return discoveryClient.getInstanceRemoteStatus(); } public void localStatus(InstanceInfo.InstanceStatus status) { applicationInfoManager.setInstanceStatus(status); } - - public int health() { - // TODO - throw new UnsupportedOperationException(); - } } From d4922e3667c9a9e5d071a815c53339763ce06ef3 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 8 Oct 2020 14:28:45 -0700 Subject: [PATCH 143/273] core: remove unused methods from request attempts --- .../netflix/zuul/niws/RequestAttempts.java | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempts.java b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempts.java index 1107f492..67d0f5b0 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempts.java +++ b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempts.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.context.SessionContext; +import javax.annotation.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -35,7 +36,6 @@ public class RequestAttempts extends ArrayList { private static final Logger LOG = LoggerFactory.getLogger(RequestAttempts.class); - private static ThreadLocal threadLocal = new ThreadLocal<>().withInitial(() -> new RequestAttempts()); private static final ObjectMapper JACKSON_MAPPER = new ObjectMapper(); public RequestAttempts() @@ -43,6 +43,7 @@ public RequestAttempts() super(); } + @Nullable public RequestAttempt getFinalAttempt() { if (size() > 0) { @@ -58,24 +59,6 @@ public static RequestAttempts getFromSessionContext(SessionContext ctx) return (RequestAttempts) ctx.get(CommonContextKeys.REQUEST_ATTEMPTS); } - /** - * This is only intended for use when running on a blocking server (ie. tomcat). - */ - public static RequestAttempts getThreadLocalInstance() - { - return threadLocal.get(); - } - - public static void setThreadLocalInstance(RequestAttempts instance) - { - threadLocal.set(instance); - } - - public static void removeThreadLocalInstance() - { - threadLocal.remove(); - } - public static RequestAttempts parse(String attemptsJson) throws IOException { return JACKSON_MAPPER.readValue(attemptsJson, RequestAttempts.class); From 06d34a05ccb6ab57ce774010374d313d29979a71 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 8 Oct 2020 14:38:28 -0700 Subject: [PATCH 144/273] core: remove some refs to server key --- .../netty/connectionpool/ConnectionPoolHandler.java | 6 ++---- .../connectionpool/DefaultClientChannelManager.java | 12 ++++-------- .../connectionpool/PerServerConnectionPool.java | 3 --- .../zuul/netty/connectionpool/PooledConnection.java | 8 -------- 4 files changed, 6 insertions(+), 23 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolHandler.java index a675d858..83d2df75 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolHandler.java @@ -122,10 +122,8 @@ private void closeConnection(ChannelHandlerContext ctx, String msg) { PooledConnection conn = PooledConnection.getFromChannel(ctx.channel()); if (conn != null) { if (LOG.isDebugEnabled()) { - msg = msg + " Closing the PooledConnection and releasing." - + " ASG: " + String.valueOf(conn.getServerKey().getASGName() - + ", host=" + String.valueOf(conn.getServerKey().getHostName())); - LOG.debug(msg); + msg = msg + " Closing the PooledConnection and releasing. conn={}"; + LOG.debug(msg, conn); } flagCloseAndReleaseConnection(conn); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java index ac7cd602..9e0ebdd2 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java @@ -343,7 +343,7 @@ public Promise acquire( } SocketAddress finalServerAddr = pickAddress(chosenServer); - InstanceInfo instanceInfo = deriveInstanceInfo(chosenServer); + InstanceInfo instanceInfo = deriveInstanceInfoInternal(chosenServer); selectedServer.set(chosenServer); @@ -354,7 +354,7 @@ public Promise acquire( ServerStats stats = lbStats.getSingleServerStat(chosenServer); final ClientChannelManager clientChannelMgr = this; - PooledConnectionFactory pcf = createPooledConnectionFactory(chosenServer, instanceInfo, stats, clientChannelMgr, closeConnCounter, closeWrtBusyConnCounter); + PooledConnectionFactory pcf = createPooledConnectionFactory(chosenServer, stats, clientChannelMgr, closeConnCounter, closeWrtBusyConnCounter); // Create a new pool for this server. return createConnectionPool(chosenServer, stats, instanceInfo, finalServerAddr, clientConnFactory, pcf, connPoolConfig, @@ -366,9 +366,9 @@ public Promise acquire( return pool.acquire(eventLoop, passport, selectedHostAddr); } - protected PooledConnectionFactory createPooledConnectionFactory(Server chosenServer, InstanceInfo instanceInfo, ServerStats stats, ClientChannelManager clientChannelMgr, + protected PooledConnectionFactory createPooledConnectionFactory(Server chosenServer, ServerStats stats, ClientChannelManager clientChannelMgr, Counter closeConnCounter, Counter closeWrtBusyConnCounter) { - return ch -> new PooledConnection(ch, chosenServer, clientChannelMgr, instanceInfo, stats, closeConnCounter, closeWrtBusyConnCounter); + return ch -> new PooledConnection(ch, chosenServer, clientChannelMgr, stats, closeConnCounter, closeWrtBusyConnCounter); } protected IConnectionPool createConnectionPool( @@ -423,10 +423,6 @@ protected ConcurrentHashMap getPerServerPools() { return perServerPools; } - protected InstanceInfo deriveInstanceInfo(Server chosenServer) { - return deriveInstanceInfoInternal(chosenServer); - } - @VisibleForTesting static InstanceInfo deriveInstanceInfoInternal(Server chosenServer) { if (chosenServer instanceof DiscoveryEnabledServer) { diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java index 22487bd6..3ee13853 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java @@ -39,7 +39,6 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Function; import javax.annotation.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -56,7 +55,6 @@ public class PerServerConnectionPool implements IConnectionPool private final ConcurrentHashMap> connectionsPerEventLoop = new ConcurrentHashMap<>(); - private final Server server; private final ServerStats stats; private final InstanceInfo instanceInfo; private final SocketAddress serverAddr; @@ -101,7 +99,6 @@ public PerServerConnectionPool( Timer connEstablishTimer, AtomicInteger connsInPool, AtomicInteger connsInUse) { - this.server = server; this.stats = stats; this.instanceInfo = instanceInfo; // Note: child classes can sometimes connect to different addresses than diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java index ab610d39..875f69e4 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java @@ -42,7 +42,6 @@ public class PooledConnection { private final Server server; private final Channel channel; private final ClientChannelManager channelManager; - private final InstanceInfo serverKey; private final ServerStats serverStats; private final long creationTS; private final Counter closeConnCounter; @@ -73,7 +72,6 @@ public enum ConnectionState { private boolean released = false; public PooledConnection(final Channel channel, final Server server, final ClientChannelManager channelManager, - final InstanceInfo serverKey, final ServerStats serverStats, final Counter closeConnCounter, final Counter closeWrtBusyConnCounter) @@ -81,7 +79,6 @@ public PooledConnection(final Channel channel, final Server server, final Client this.channel = channel; this.server = server; this.channelManager = channelManager; - this.serverKey = serverKey; this.serverStats = serverStats; this.creationTS = System.currentTimeMillis(); this.closeConnCounter = closeConnCounter; @@ -122,10 +119,6 @@ public Channel getChannel() { return channel; } - public InstanceInfo getServerKey() { - return serverKey; - } - public long getUsageCount() { return usageCount; @@ -252,7 +245,6 @@ public String toString() { return "PooledConnection{" + "channel=" + channel + - ", serverKey=" + serverKey + ", usageCount=" + usageCount + '}'; } From 3f91dfa5e699b59775eb65c529108a0190b49d8f Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 8 Oct 2020 15:43:02 -0700 Subject: [PATCH 145/273] core: remove server from conn pool --- .../connectionpool/DefaultClientChannelManager.java | 10 +++++----- .../netty/connectionpool/PerServerConnectionPool.java | 2 -- .../zuul/netty/connectionpool/PooledConnection.java | 1 - 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java index 9e0ebdd2..8cdbc988 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java @@ -357,7 +357,7 @@ public Promise acquire( PooledConnectionFactory pcf = createPooledConnectionFactory(chosenServer, stats, clientChannelMgr, closeConnCounter, closeWrtBusyConnCounter); // Create a new pool for this server. - return createConnectionPool(chosenServer, stats, instanceInfo, finalServerAddr, clientConnFactory, pcf, connPoolConfig, + return createConnectionPool(stats, instanceInfo, finalServerAddr, clientConnFactory, pcf, connPoolConfig, clientConfig, createNewConnCounter, createConnSucceededCounter, createConnFailedCounter, requestConnCounter, reuseConnCounter, connTakenFromPoolIsNotOpen, maxConnsPerHostExceededCounter, connEstablishTimer, connsInPool, connsInUse); @@ -366,20 +366,20 @@ public Promise acquire( return pool.acquire(eventLoop, passport, selectedHostAddr); } - protected PooledConnectionFactory createPooledConnectionFactory(Server chosenServer, ServerStats stats, ClientChannelManager clientChannelMgr, - Counter closeConnCounter, Counter closeWrtBusyConnCounter) { + protected PooledConnectionFactory createPooledConnectionFactory( + Server chosenServer, ServerStats stats, ClientChannelManager clientChannelMgr, Counter closeConnCounter, + Counter closeWrtBusyConnCounter) { return ch -> new PooledConnection(ch, chosenServer, clientChannelMgr, stats, closeConnCounter, closeWrtBusyConnCounter); } protected IConnectionPool createConnectionPool( - Server chosenServer, ServerStats stats, InstanceInfo instanceInfo, SocketAddress serverAddr, + ServerStats stats, InstanceInfo instanceInfo, SocketAddress serverAddr, NettyClientConnectionFactory clientConnFactory, PooledConnectionFactory pcf, ConnectionPoolConfig connPoolConfig, IClientConfig clientConfig, Counter createNewConnCounter, Counter createConnSucceededCounter, Counter createConnFailedCounter, Counter requestConnCounter, Counter reuseConnCounter, Counter connTakenFromPoolIsNotOpen, Counter maxConnsPerHostExceededCounter, PercentileTimer connEstablishTimer, AtomicInteger connsInPool, AtomicInteger connsInUse) { return new PerServerConnectionPool( - chosenServer, stats, instanceInfo, serverAddr, diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java index 3ee13853..d97de4f2 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java @@ -18,7 +18,6 @@ import com.netflix.appinfo.InstanceInfo; import com.netflix.client.config.IClientConfig; -import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.ServerStats; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Timer; @@ -82,7 +81,6 @@ public class PerServerConnectionPool implements IConnectionPool private final AtomicInteger connCreationsInProgress; public PerServerConnectionPool( - Server server, ServerStats stats, InstanceInfo instanceInfo, SocketAddress serverAddr, diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java index 875f69e4..cd0397ae 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java @@ -16,7 +16,6 @@ package com.netflix.zuul.netty.connectionpool; -import com.netflix.appinfo.InstanceInfo; import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.ServerStats; import com.netflix.spectator.api.Counter; From 96a9891e4ba00824cf461b2e2a956fc6cc24aa06 Mon Sep 17 00:00:00 2001 From: Jose Fernandez Date: Fri, 9 Oct 2020 06:25:16 -0700 Subject: [PATCH 146/273] Log client connection close errors as DEBUG instead of INFO --- .../com/netflix/zuul/netty/server/ClientRequestReceiver.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java index 7a6a836a..3d9f0865 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java @@ -20,10 +20,10 @@ import static com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteReason; import static com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteReason.SESSION_COMPLETE; import static com.netflix.zuul.netty.server.http2.Http2OrHttpHandler.PROTOCOL_NAME; + import com.netflix.netty.common.SourceAddressChannelHandler; import com.netflix.netty.common.ssl.SslHandshakeInfo; import com.netflix.netty.common.throttle.RejectionUtils; -import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Spectator; import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.context.Debug; @@ -392,7 +392,7 @@ private void fireWriteError(String requestPart, Throwable cause, ChannelHandlerC if (cause instanceof java.nio.channels.ClosedChannelException || cause instanceof Errors.NativeIoException) { - LOG.info(errMesg + " - client connection is closed."); + LOG.debug(errMesg + " - client connection is closed."); if (zuulRequest != null) { zuulRequest.getContext().cancel(); StatusCategoryUtils.storeStatusCategoryIfNotAlreadyFailure(zuulRequest.getContext(), ZuulStatusCategory.FAILURE_CLIENT_CANCELLED); From bf0b6fef06de8b165db3beaf340727b401464e6d Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 13 Oct 2020 14:31:09 -0700 Subject: [PATCH 147/273] core: remove Timings class This timings class is not actually used, and the metrics it exports are not actually recorded anywhere (the values are always zero). This class poses problems for a separate refactor of the Timing class. --- .../netflix/zuul/context/SessionContext.java | 10 --- .../stats/BasicRequestMetricsPublisher.java | 35 +--------- .../java/com/netflix/zuul/stats/Timings.java | 68 ------------------- 3 files changed, 2 insertions(+), 111 deletions(-) delete mode 100644 zuul-core/src/main/java/com/netflix/zuul/stats/Timings.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/context/SessionContext.java b/zuul-core/src/main/java/com/netflix/zuul/context/SessionContext.java index 9f5072a7..2b6e6d49 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/context/SessionContext.java +++ b/zuul-core/src/main/java/com/netflix/zuul/context/SessionContext.java @@ -24,7 +24,6 @@ import com.netflix.config.DynamicPropertyFactory; import com.netflix.zuul.filters.FilterError; import com.netflix.zuul.message.http.HttpResponseMessage; -import com.netflix.zuul.stats.Timings; import com.netflix.zuul.util.DeepCopy; import java.io.NotSerializableException; @@ -51,9 +50,6 @@ public class SessionContext extends HashMap implements Cloneable private boolean debugRequestHeadersOnly = false; private boolean cancelled = false; - private Timings timings = new Timings(); - - private static final String KEY_UUID = "_uuid"; private static final String KEY_VIP = "routeVIP"; private static final String KEY_ENDPOINT = "_endpoint"; @@ -141,7 +137,6 @@ public SessionContext copy() copy.debugRouting = debugRouting; copy.debugRequest = debugRequest; copy.debugRequestHeadersOnly = debugRequestHeadersOnly; - copy.timings = timings; Iterator it = keySet().iterator(); String key = it.next(); @@ -378,11 +373,6 @@ public List getFilterErrors() { return (List) get(KEY_FILTER_ERRORS); } - public Timings getTimings() - { - return timings; - } - public void setOriginReportedDuration(int duration) { put("_originReportedDuration", duration); diff --git a/zuul-core/src/main/java/com/netflix/zuul/stats/BasicRequestMetricsPublisher.java b/zuul-core/src/main/java/com/netflix/zuul/stats/BasicRequestMetricsPublisher.java index 8a1cc8cf..d05ac1d1 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/stats/BasicRequestMetricsPublisher.java +++ b/zuul-core/src/main/java/com/netflix/zuul/stats/BasicRequestMetricsPublisher.java @@ -16,9 +16,7 @@ package com.netflix.zuul.stats; -import com.netflix.spectator.api.Spectator; import com.netflix.zuul.context.SessionContext; -import java.util.concurrent.TimeUnit; /** * User: michaels@netflix.com @@ -28,37 +26,8 @@ public class BasicRequestMetricsPublisher implements RequestMetricsPublisher { @Override - public void collectAndPublish(SessionContext context) - { - // Request timings. - long totalRequestTime = context.getTimings().getRequest().getDuration(); - long requestProxyTime = context.getTimings().getRequestProxy().getDuration(); - int originReportedDuration = context.getOriginReportedDuration(); + public void collectAndPublish(SessionContext context) { + // Record metrics here. - // Approximation of time spent just within Zuul's own processing of the request. - long totalInternalTime = totalRequestTime - requestProxyTime; - - // Approximation of time added to request by addition of Zuul+NIWS - // (ie. the time added compared to if ELB sent request direct to Origin). - // if -1, means we don't have that metric. - long totalTimeAddedToOrigin = -1; - if (originReportedDuration > -1) { - totalTimeAddedToOrigin = totalRequestTime - originReportedDuration; - } - - // Publish - final String METRIC_TIMINGS_REQ_PREFIX = "zuul.timings.request."; - recordRequestTiming(METRIC_TIMINGS_REQ_PREFIX + "total", totalRequestTime); - recordRequestTiming(METRIC_TIMINGS_REQ_PREFIX + "proxy", requestProxyTime); - recordRequestTiming(METRIC_TIMINGS_REQ_PREFIX + "internal", totalInternalTime); - recordRequestTiming(METRIC_TIMINGS_REQ_PREFIX + "added", totalTimeAddedToOrigin); - } - - private void recordRequestTiming(String name, long timeNs) - { - long timeMs = timeNs / 1000000; - if(timeMs > -1) { - Spectator.globalRegistry().timer(name).record(timeMs, TimeUnit.MILLISECONDS); - } } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/stats/Timings.java b/zuul-core/src/main/java/com/netflix/zuul/stats/Timings.java deleted file mode 100644 index 21c571a7..00000000 --- a/zuul-core/src/main/java/com/netflix/zuul/stats/Timings.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2018 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.zuul.stats; - -import java.util.concurrent.ConcurrentHashMap; - -/** - * User: michaels@netflix.com - * Date: 6/15/15 - * Time: 4:16 PM - */ -public class Timings -{ - private final Timing request = new Timing("_requestTiming"); - private final Timing requestProxy = new Timing("_requestProxyTiming"); - private final Timing requestBodyRead = new Timing("_requestBodyReadTiming"); - private final Timing responseBodyRead = new Timing("_responseBodyReadTiming"); - private final Timing requestBodyWrite = new Timing("_requestBodyWriteTiming"); - private final Timing responseBodyWrite = new Timing("_responseBodyWriteTiming"); - - protected final ConcurrentHashMap additionalTimings = new ConcurrentHashMap<>(); - - public Timing get(String name) - { - return additionalTimings.computeIfAbsent(name, (newName) -> new Timing(newName)); - } - - /* Following are some standard Zuul timings: */ - - public Timing getRequest() - { - return request; - } - public Timing getRequestProxy() - { - return requestProxy; - } - public Timing getRequestBodyRead() - { - return requestBodyRead; - } - public Timing getResponseBodyRead() - { - return responseBodyRead; - } - public Timing getRequestBodyWrite() - { - return requestBodyWrite; - } - public Timing getResponseBodyWrite() - { - return responseBodyWrite; - } -} From 878756bd1816a6b39e5ecdcc4cb548fd3fc799aa Mon Sep 17 00:00:00 2001 From: sullis Date: Wed, 14 Oct 2020 10:39:31 -0700 Subject: [PATCH 148/273] upgrade to Netty 4.1.53.Final https://netty.io/news/2020/10/13/4-1-53-Final.html --- gradle.properties | 2 +- zuul-core/dependencies.lock | 108 +++++++++++++++---------------- zuul-groovy/dependencies.lock | 90 +++++++++++++------------- zuul-guice/dependencies.lock | 90 +++++++++++++------------- zuul-processor/dependencies.lock | 108 +++++++++++++++---------------- zuul-sample/dependencies.lock | 108 +++++++++++++++---------------- 6 files changed, 253 insertions(+), 253 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3ce9a1a8..efa17b22 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ versions_groovy=3.0.3 versions_ribbon=2.4.4 -versions_netty=4.1.52.Final +versions_netty=4.1.53.Final release.scope=patch release.version=2.1.9-SNAPSHOT diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 66d007cf..3a7864a5 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -37,31 +37,31 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -128,31 +128,31 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -220,34 +220,34 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.34.Final" }, "io.netty:netty-transport": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -321,34 +321,34 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.34.Final" }, "io.netty:netty-transport": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -407,31 +407,31 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -496,34 +496,34 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.34.Final" }, "io.netty:netty-transport": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index 57b34321..dfe0ba86 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -70,37 +70,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -197,37 +197,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -334,37 +334,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -376,19 +376,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -516,37 +516,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -558,19 +558,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -680,37 +680,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -817,37 +817,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -859,19 +859,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 362cc81d..56749d38 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -73,37 +73,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -200,37 +200,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -343,37 +343,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -385,19 +385,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -528,37 +528,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -570,19 +570,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -695,37 +695,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -838,37 +838,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -880,19 +880,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 8bb80a75..a0b95eaa 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -70,37 +70,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -194,37 +194,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -328,37 +328,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -370,19 +370,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -504,37 +504,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -546,19 +546,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -678,37 +678,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -720,19 +720,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -839,37 +839,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -970,37 +970,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1012,19 +1012,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index c995c3e7..1c57e29a 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -86,37 +86,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -128,19 +128,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -259,37 +259,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -404,37 +404,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -567,37 +567,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -609,19 +609,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -778,37 +778,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -820,19 +820,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -963,37 +963,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1120,37 +1120,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1162,19 +1162,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.52.Final" + "locked": "4.1.53.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ From 95519f53e85b277e572d361be3b7e38f9732ffd8 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 14 Oct 2020 15:53:20 -0700 Subject: [PATCH 149/273] core: remove unused Timing class --- .../zuul/filters/endpoint/ProxyEndpoint.java | 4 - .../PerServerConnectionPool.java | 18 ----- .../zuul/origins/BasicNettyOrigin.java | 6 -- .../com/netflix/zuul/origins/NettyOrigin.java | 3 - .../java/com/netflix/zuul/stats/Timing.java | 75 ------------------- 5 files changed, 106 deletions(-) delete mode 100644 zuul-core/src/main/java/com/netflix/zuul/stats/Timing.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 78b9ad6d..f2aa66c1 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -276,8 +276,6 @@ public HttpResponseMessage apply(final HttpRequestMessage input) { return null; } - origin.getProxyTiming(zuulRequest).start(); - // To act the same as Ribbon, we must do this before starting execution (as well as before each attempt). IClientConfig requestConfig = origin.getExecutionContext(zuulRequest).getRequestConfig(); originalReadTimeout = requestConfig.getProperty(ReadTimeout, null); @@ -709,7 +707,6 @@ private void processErrorFromOrigin(final Throwable ex, final Channel origCh) { zuulCtx.setShouldSendErrorResponse(true); StatusCategoryUtils.storeStatusCategoryIfNotAlreadyFailure(zuulCtx, err.getStatusCategory()); - origin.getProxyTiming(zuulRequest).end(); origin.recordFinalError(zuulRequest, ex); origin.onRequestExecutionFailed(zuulRequest, chosenServer.get(), attemptNum - 1, niwsEx); @@ -858,7 +855,6 @@ private HttpResponseMessage buildZuulHttpResponse(final HttpResponse httpRespons // Collect some info about the received response. origin.recordFinalResponse(zuulResponse); origin.recordFinalError(zuulRequest, ex); - origin.getProxyTiming(zuulRequest).end(); zuulCtx.set(CommonContextKeys.STATUS_CATGEORY, statusCategory); zuulCtx.setError(ex); zuulCtx.put("origin_http_status", Integer.toString(respStatus)); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java index d97de4f2..2d8fdf55 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java @@ -24,7 +24,6 @@ import com.netflix.zuul.exception.OutboundErrorType; import com.netflix.zuul.passport.CurrentPassport; import com.netflix.zuul.passport.PassportState; -import com.netflix.zuul.stats.Timing; import io.netty.channel.ChannelFuture; import io.netty.channel.EventLoop; import io.netty.util.concurrent.Promise; @@ -243,7 +242,6 @@ protected void tryMakingNewConnection( return; } - Timing timing = startConnEstablishTimer(); try { createNewConnCounter.increment(); connCreationsInProgress.incrementAndGet(); @@ -254,13 +252,11 @@ protected void tryMakingNewConnection( final ChannelFuture cf = connectToServer(eventLoop, passport, serverAddr); if (cf.isDone()) { - endConnEstablishTimer(timing); handleConnectCompletion(cf, promise, passport); } else { cf.addListener(future -> { try { - endConnEstablishTimer(timing); handleConnectCompletion((ChannelFuture) future, promise, passport); } catch (Throwable e) { @@ -276,7 +272,6 @@ protected void tryMakingNewConnection( } } catch (Throwable e) { - endConnEstablishTimer(timing); promise.setFailure(e); } } @@ -285,19 +280,6 @@ protected ChannelFuture connectToServer(EventLoop eventLoop, CurrentPassport pas return connectionFactory.connect(eventLoop, serverAddr, passport); } - private Timing startConnEstablishTimer() - { - Timing timing = new Timing("connection_establish"); - timing.start(); - return timing; - } - - private void endConnEstablishTimer(Timing timing) - { - timing.end(); - connEstablishTimer.record(timing.getDuration(), TimeUnit.NANOSECONDS); - } - protected void handleConnectCompletion( ChannelFuture cf, Promise callerPromise, CurrentPassport passport) { connCreationsInProgress.decrementAndGet(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java index 26e3eccd..c8ace6b9 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java @@ -43,7 +43,6 @@ import com.netflix.zuul.netty.connectionpool.PooledConnection; import com.netflix.zuul.niws.RequestAttempt; import com.netflix.zuul.passport.CurrentPassport; -import com.netflix.zuul.stats.Timing; import com.netflix.zuul.stats.status.StatusCategory; import com.netflix.zuul.stats.status.StatusCategoryUtils; import io.netty.channel.EventLoop; @@ -123,11 +122,6 @@ public Promise connectToOrigin( return clientChannelManager.acquire(eventLoop, null, passport, chosenServer, chosenHostAddr); } - @Override - public Timing getProxyTiming(HttpRequestMessage zuulReq) { - return new Timing(name); - } - @Override public int getMaxRetriesForRequest(SessionContext context) { return config.get(CommonClientConfigKey.MaxAutoRetriesNextServer, 0); diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java index 9fd6425d..b401c0dc 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java @@ -26,7 +26,6 @@ import com.netflix.zuul.netty.connectionpool.PooledConnection; import com.netflix.zuul.niws.RequestAttempt; import com.netflix.zuul.passport.CurrentPassport; -import com.netflix.zuul.stats.Timing; import io.netty.channel.EventLoop; import io.netty.util.concurrent.Promise; @@ -46,8 +45,6 @@ Promise connectToOrigin(final HttpRequestMessage zuulReq, Even AtomicReference chosenServer, AtomicReference chosenHostAddr); - Timing getProxyTiming(HttpRequestMessage zuulReq); - int getMaxRetriesForRequest(SessionContext context); void onRequestExecutionStart(final HttpRequestMessage zuulReq); diff --git a/zuul-core/src/main/java/com/netflix/zuul/stats/Timing.java b/zuul-core/src/main/java/com/netflix/zuul/stats/Timing.java deleted file mode 100644 index 6c421622..00000000 --- a/zuul-core/src/main/java/com/netflix/zuul/stats/Timing.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2018 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.netflix.zuul.stats; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Generic timing helper, in nanoseconds. - * - * User: michaels@netflix.com - * Date: 12/13/13 - * Time: 5:05 PM - */ -public class Timing -{ - private static final Logger LOG = LoggerFactory.getLogger(Timing.class); - - private String name; - private long startTime = 0; - private long endTime = 0; - private long duration = 0; - - public Timing(String name) { - this.name = name; - } - - public void start() { - this.startTime = System.nanoTime(); - } - - public void end() { - this.endTime = System.nanoTime(); - this.duration = endTime - startTime; - - if (LOG.isDebugEnabled()) { - LOG.debug(String.format("Timing: name=%s, duration=%s", name, duration)); - } - } - - public String getName() { - return name; - } - - public long getStartTime() { - return startTime; - } - - public long getEndTime() { - return endTime; - } - - public long getDuration() { - return duration; - } - - @Override - public String toString() - { - return Long.toString(duration); - } -} From 15179f47bc4ac0b41703a15710998661b4a900ce Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 4 Nov 2020 15:46:44 -0800 Subject: [PATCH 150/273] zuul-core: only pick a new server address after deciding to create a new connection --- .../netty/connectionpool/DefaultClientChannelManager.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java index 8cdbc988..ae4d18c2 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java @@ -342,13 +342,12 @@ public Promise acquire( return promise; } - SocketAddress finalServerAddr = pickAddress(chosenServer); - InstanceInfo instanceInfo = deriveInstanceInfoInternal(chosenServer); - selectedServer.set(chosenServer); // Now get the connection-pool for this server. IConnectionPool pool = perServerPools.computeIfAbsent(chosenServer, s -> { + SocketAddress finalServerAddr = pickAddress(chosenServer); + InstanceInfo instanceInfo = deriveInstanceInfoInternal(chosenServer); // Get the stats from LB for this server. LoadBalancerStats lbStats = loadBalancer.getLoadBalancerStats(); ServerStats stats = lbStats.getSingleServerStat(chosenServer); From 0ec80df44e8e8e105fbacda6aec294c379320676 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Tue, 10 Nov 2020 10:10:36 -0800 Subject: [PATCH 151/273] Always allow h2 for ALPN for h2 config --- .../netty/server/http2/Http2Configuration.java | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java index 74d97b56..c9833cb1 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java @@ -42,30 +42,21 @@ public static SslContext configureSSL(SslContextFactory sslContextFactory, int p public static SslContext configureSSL(SslContextFactory sslContextFactory, String metricId) { SslContextBuilder builder = sslContextFactory.createBuilderForServer(); - String[] supportedProtocol; - if (HTTP2_DISABLED.get()) { - supportedProtocol = new String[]{ApplicationProtocolNames.HTTP_1_1}; - } - else { - supportedProtocol = new String[]{ApplicationProtocolNames.HTTP_2, - ApplicationProtocolNames.HTTP_1_1}; - } - + String[] supportedProtocols = new String[]{ApplicationProtocolNames.HTTP_2, ApplicationProtocolNames.HTTP_1_1}; ApplicationProtocolConfig apn = new ApplicationProtocolConfig( ApplicationProtocolConfig.Protocol.ALPN, // NO_ADVERTISE is currently the only mode supported by both OpenSsl and JDK providers. ApplicationProtocolConfig.SelectorFailureBehavior.NO_ADVERTISE, // ACCEPT is currently the only mode supported by both OpenSsl and JDK providers. ApplicationProtocolConfig.SelectedListenerFailureBehavior.ACCEPT, - supportedProtocol); + supportedProtocols); final SslContext sslContext; try { sslContext = builder .applicationProtocolConfig(apn) .build(); - } - catch (SSLException e) { + } catch (SSLException e) { throw new RuntimeException("Error configuring SslContext with ALPN!", e); } From 4508b4311714db0d50ca56efc4893bf1fdf1c15c Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Tue, 10 Nov 2020 16:38:33 -0800 Subject: [PATCH 152/273] Revert "Always allow h2 for ALPN for h2 config" This reverts commit 0ec80df44e8e8e105fbacda6aec294c379320676. --- .../netty/server/http2/Http2Configuration.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java index c9833cb1..74d97b56 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java @@ -42,21 +42,30 @@ public static SslContext configureSSL(SslContextFactory sslContextFactory, int p public static SslContext configureSSL(SslContextFactory sslContextFactory, String metricId) { SslContextBuilder builder = sslContextFactory.createBuilderForServer(); - String[] supportedProtocols = new String[]{ApplicationProtocolNames.HTTP_2, ApplicationProtocolNames.HTTP_1_1}; + String[] supportedProtocol; + if (HTTP2_DISABLED.get()) { + supportedProtocol = new String[]{ApplicationProtocolNames.HTTP_1_1}; + } + else { + supportedProtocol = new String[]{ApplicationProtocolNames.HTTP_2, + ApplicationProtocolNames.HTTP_1_1}; + } + ApplicationProtocolConfig apn = new ApplicationProtocolConfig( ApplicationProtocolConfig.Protocol.ALPN, // NO_ADVERTISE is currently the only mode supported by both OpenSsl and JDK providers. ApplicationProtocolConfig.SelectorFailureBehavior.NO_ADVERTISE, // ACCEPT is currently the only mode supported by both OpenSsl and JDK providers. ApplicationProtocolConfig.SelectedListenerFailureBehavior.ACCEPT, - supportedProtocols); + supportedProtocol); final SslContext sslContext; try { sslContext = builder .applicationProtocolConfig(apn) .build(); - } catch (SSLException e) { + } + catch (SSLException e) { throw new RuntimeException("Error configuring SslContext with ALPN!", e); } From 81993350d9f35cd3d204c17103fa7a4342778324 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 11 Nov 2020 12:58:44 -0800 Subject: [PATCH 153/273] all: update netty 4.1.54 --- gradle.properties | 2 +- zuul-core/dependencies.lock | 138 +++++++++++++++---------------- zuul-groovy/dependencies.lock | 102 +++++++++++------------ zuul-guice/dependencies.lock | 102 +++++++++++------------ zuul-processor/dependencies.lock | 116 +++++++++++++------------- zuul-sample/dependencies.lock | 116 +++++++++++++------------- 6 files changed, 288 insertions(+), 288 deletions(-) diff --git a/gradle.properties b/gradle.properties index efa17b22..f69bb53e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ versions_groovy=3.0.3 versions_ribbon=2.4.4 -versions_netty=4.1.53.Final +versions_netty=4.1.54.Final release.scope=patch release.version=2.1.9-SNAPSHOT diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 3a7864a5..52999651 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -37,31 +37,31 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -73,7 +73,7 @@ "locked": "1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.66" + "locked": "1.67" }, "org.slf4j:slf4j-api": { "locked": "1.7.25" @@ -81,10 +81,10 @@ }, "jmh": { "org.openjdk.jmh:jmh-core": { - "locked": "1.25.2" + "locked": "1.26" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.25.2" + "locked": "1.26" }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21" @@ -128,31 +128,31 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -164,13 +164,13 @@ "locked": "1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.66" + "locked": "1.67" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.25.2" + "locked": "1.26" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.25.2" + "locked": "1.26" }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21" @@ -220,34 +220,34 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.34.Final" }, "io.netty:netty-transport": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -262,16 +262,16 @@ "locked": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.66" + "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.5.13" + "locked": "3.6.0" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.25.2" + "locked": "1.26" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.25.2" + "locked": "1.26" }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21" @@ -321,34 +321,34 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.34.Final" }, "io.netty:netty-transport": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -360,7 +360,7 @@ "locked": "1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.66" + "locked": "1.67" }, "org.slf4j:slf4j-api": { "locked": "1.7.30" @@ -407,31 +407,31 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -446,10 +446,10 @@ "locked": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.66" + "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.5.13" + "locked": "3.6.0" }, "org.slf4j:slf4j-api": { "locked": "1.7.25" @@ -496,34 +496,34 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.34.Final" }, "io.netty:netty-transport": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -538,10 +538,10 @@ "locked": "4.13" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.66" + "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.5.13" + "locked": "3.6.0" }, "org.slf4j:slf4j-api": { "locked": "1.7.30" diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index dfe0ba86..251fe066 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -70,37 +70,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -197,37 +197,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -334,37 +334,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -376,19 +376,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -415,13 +415,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.66" + "locked": "1.67" }, "org.codehaus.groovy:groovy-all": { "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.5.13" + "locked": "3.6.0" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -516,37 +516,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -558,19 +558,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -594,7 +594,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.66" + "locked": "1.67" }, "org.codehaus.groovy:groovy-all": { "locked": "3.0.3" @@ -680,37 +680,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -725,7 +725,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.5.13" + "locked": "3.6.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -817,37 +817,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -859,19 +859,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -898,13 +898,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.66" + "locked": "1.67" }, "org.codehaus.groovy:groovy-all": { "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.5.13" + "locked": "3.6.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 56749d38..323d2306 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -73,37 +73,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -200,37 +200,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -343,37 +343,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -385,19 +385,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -424,10 +424,10 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.66" + "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.5.13" + "locked": "3.6.0" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -528,37 +528,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -570,19 +570,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -606,7 +606,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.66" + "locked": "1.67" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -695,37 +695,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -737,7 +737,7 @@ "locked": "4.13" }, "org.mockito:mockito-core": { - "locked": "3.5.13" + "locked": "3.6.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -838,37 +838,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -880,19 +880,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -919,10 +919,10 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.66" + "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.5.13" + "locked": "3.6.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index a0b95eaa..fc158cab 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -70,37 +70,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -194,37 +194,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -328,37 +328,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -370,19 +370,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -409,7 +409,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.66" + "locked": "1.67" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -504,37 +504,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -546,19 +546,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -582,7 +582,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.66" + "locked": "1.67" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -678,37 +678,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -720,19 +720,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -756,7 +756,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.66" + "locked": "1.67" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -839,37 +839,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -970,37 +970,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1012,19 +1012,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -1051,7 +1051,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.66" + "locked": "1.67" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 1c57e29a..69764e31 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -86,37 +86,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -128,19 +128,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -164,7 +164,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.66" + "locked": "1.67" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -259,37 +259,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -404,37 +404,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -567,37 +567,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -609,19 +609,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -651,7 +651,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.66" + "locked": "1.67" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -778,37 +778,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -820,19 +820,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -862,7 +862,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.66" + "locked": "1.67" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -963,37 +963,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1120,37 +1120,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1162,19 +1162,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.53.Final" + "locked": "4.1.54.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -1204,7 +1204,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.66" + "locked": "1.67" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ From af3d244e941911f1c3a72d39c1040038628b5af4 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Thu, 12 Nov 2020 13:57:28 -0800 Subject: [PATCH 154/273] add SslContext builder with h2 disabled --- .../server/http2/Http2Configuration.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java index 74d97b56..2067e97e 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java @@ -77,4 +77,28 @@ public static SslContext configureSSL(SslContextFactory sslContextFactory, Strin return sslContext; } + + /** + * This is meant to be use in cases where the server wishes not to advertise h2 as part of ALPN. + */ + private SslContext configureSSLWithH2Disabled(SslContextFactory sslContextFactory, String host) { + + ApplicationProtocolConfig apn = new ApplicationProtocolConfig( + ApplicationProtocolConfig.Protocol.ALPN, + // NO_ADVERTISE is currently the only mode supported by both OpenSsl and JDK providers. + ApplicationProtocolConfig.SelectorFailureBehavior.NO_ADVERTISE, + // ACCEPT is currently the only mode supported by both OpenSsl and JDK providers. + ApplicationProtocolConfig.SelectedListenerFailureBehavior.ACCEPT, + ApplicationProtocolNames.HTTP_1_1); + final SslContext sslContext; + try { + sslContext = sslContextFactory.createBuilderForServer().applicationProtocolConfig(apn).build(); + } catch (SSLException e) { + throw new RuntimeException("Error configuring SslContext with ALPN!", e); + } + + sslContextFactory.enableSessionTickets(sslContext); + sslContextFactory.configureOpenSslStatsMetrics(sslContext, host); + return sslContext; + } } From 4373bb576f8d546fb484452115fba6e152c73d4b Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Thu, 12 Nov 2020 16:42:05 -0800 Subject: [PATCH 155/273] Make builder public --- .../com/netflix/zuul/netty/server/http2/Http2Configuration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java index 2067e97e..c8c0c666 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java @@ -81,7 +81,7 @@ public static SslContext configureSSL(SslContextFactory sslContextFactory, Strin /** * This is meant to be use in cases where the server wishes not to advertise h2 as part of ALPN. */ - private SslContext configureSSLWithH2Disabled(SslContextFactory sslContextFactory, String host) { + public static SslContext configureSSLWithH2Disabled(SslContextFactory sslContextFactory, String host) { ApplicationProtocolConfig apn = new ApplicationProtocolConfig( ApplicationProtocolConfig.Protocol.ALPN, From d70d769e36574ee30a4524573d3b351381c8972c Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Tue, 10 Nov 2020 10:10:36 -0800 Subject: [PATCH 156/273] Always allow h2 for ALPN for h2 config --- .../netty/server/http2/Http2Configuration.java | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java index c8c0c666..febf1558 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java @@ -42,30 +42,21 @@ public static SslContext configureSSL(SslContextFactory sslContextFactory, int p public static SslContext configureSSL(SslContextFactory sslContextFactory, String metricId) { SslContextBuilder builder = sslContextFactory.createBuilderForServer(); - String[] supportedProtocol; - if (HTTP2_DISABLED.get()) { - supportedProtocol = new String[]{ApplicationProtocolNames.HTTP_1_1}; - } - else { - supportedProtocol = new String[]{ApplicationProtocolNames.HTTP_2, - ApplicationProtocolNames.HTTP_1_1}; - } - + String[] supportedProtocols = new String[]{ApplicationProtocolNames.HTTP_2, ApplicationProtocolNames.HTTP_1_1}; ApplicationProtocolConfig apn = new ApplicationProtocolConfig( ApplicationProtocolConfig.Protocol.ALPN, // NO_ADVERTISE is currently the only mode supported by both OpenSsl and JDK providers. ApplicationProtocolConfig.SelectorFailureBehavior.NO_ADVERTISE, // ACCEPT is currently the only mode supported by both OpenSsl and JDK providers. ApplicationProtocolConfig.SelectedListenerFailureBehavior.ACCEPT, - supportedProtocol); + supportedProtocols); final SslContext sslContext; try { sslContext = builder .applicationProtocolConfig(apn) .build(); - } - catch (SSLException e) { + } catch (SSLException e) { throw new RuntimeException("Error configuring SslContext with ALPN!", e); } From d8d26defb0ef1859d1f859d21f0eb25f51e66d4b Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Tue, 17 Nov 2020 16:46:14 -0800 Subject: [PATCH 157/273] Delete unused code.Remove redundant casts --- .../netty/common/ssl/SslHandshakeInfo.java | 42 ++---- .../server/ssl/SslHandshakeInfoHandler.java | 133 +++++++----------- 2 files changed, 62 insertions(+), 113 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/ssl/SslHandshakeInfo.java b/zuul-core/src/main/java/com/netflix/netty/common/ssl/SslHandshakeInfo.java index 76b117ff..17ac722d 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/ssl/SslHandshakeInfo.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/ssl/SslHandshakeInfo.java @@ -22,12 +22,10 @@ import java.security.cert.Certificate; /** - * User: michaels@netflix.com - * Date: 3/29/16 - * Time: 11:06 AM + * User: michaels@netflix.com Date: 3/29/16 Time: 11:06 AM */ -public class SslHandshakeInfo -{ +public class SslHandshakeInfo { + private final String protocol; private final String cipherSuite; private final ClientAuth clientAuthRequirement; @@ -35,19 +33,9 @@ public class SslHandshakeInfo private final X509Certificate clientCertificate; private final boolean isOfIntermediary; - public SslHandshakeInfo(boolean isOfIntermediary, String protocol, String cipherSuite, Certificate serverCertificate) - { - this.protocol = protocol; - this.cipherSuite = cipherSuite; - this.isOfIntermediary = isOfIntermediary; - this.serverCertificate = serverCertificate; - this.clientAuthRequirement = ClientAuth.NONE; - this.clientCertificate = null; - } - - public SslHandshakeInfo(boolean isOfIntermediary, String protocol, String cipherSuite, ClientAuth clientAuthRequirement, - Certificate serverCertificate, X509Certificate clientCertificate) - { + public SslHandshakeInfo(boolean isOfIntermediary, String protocol, String cipherSuite, + ClientAuth clientAuthRequirement, + Certificate serverCertificate, X509Certificate clientCertificate) { this.protocol = protocol; this.cipherSuite = cipherSuite; this.clientAuthRequirement = clientAuthRequirement; @@ -56,23 +44,19 @@ public SslHandshakeInfo(boolean isOfIntermediary, String protocol, String cipher this.isOfIntermediary = isOfIntermediary; } - public boolean isOfIntermediary() - { + public boolean isOfIntermediary() { return isOfIntermediary; } - public String getProtocol() - { + public String getProtocol() { return protocol; } - public String getCipherSuite() - { + public String getCipherSuite() { return cipherSuite; } - public ClientAuth getClientAuthRequirement() - { + public ClientAuth getClientAuthRequirement() { return clientAuthRequirement; } @@ -81,14 +65,12 @@ public Certificate getServerCertificate() return serverCertificate; } - public X509Certificate getClientCertificate() - { + public X509Certificate getClientCertificate() { return clientCertificate; } @Override - public String toString() - { + public String toString() { return "SslHandshakeInfo{" + "protocol='" + protocol + '\'' + ", cipherSuite='" + cipherSuite + '\'' + diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java index 9b4942da..a8b87988 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java @@ -44,21 +44,18 @@ /** * Stores info about the client and server's SSL certificates in the context, after a successful handshake. - * - * User: michaels@netflix.com - * Date: 3/29/16 - * Time: 10:48 AM + *

+ * User: michaels@netflix.com Date: 3/29/16 Time: 10:48 AM */ -public class SslHandshakeInfoHandler extends ChannelInboundHandlerAdapter -{ +public class SslHandshakeInfoHandler extends ChannelInboundHandlerAdapter { + public static final AttributeKey ATTR_SSL_INFO = AttributeKey.newInstance("_ssl_handshake_info"); - private static final Logger LOG = LoggerFactory.getLogger(SslHandshakeInfoHandler.class); + private static final Logger logger = LoggerFactory.getLogger(SslHandshakeInfoHandler.class); private final Registry spectatorRegistry; private final boolean isSSlFromIntermediary; - public SslHandshakeInfoHandler(Registry spectatorRegistry, boolean isSSlFromIntermediary) - { + public SslHandshakeInfoHandler(Registry spectatorRegistry, boolean isSSlFromIntermediary) { this.spectatorRegistry = checkNotNull(spectatorRegistry); this.isSSlFromIntermediary = isSSlFromIntermediary; } @@ -70,8 +67,7 @@ public SslHandshakeInfoHandler(Registry spectatorRegistry, boolean isSSlFromInte } @Override - public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception - { + public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { if (evt instanceof SslHandshakeCompletionEvent) { try { SslHandshakeCompletionEvent sslEvent = (SslHandshakeCompletionEvent) evt; @@ -88,124 +84,96 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc X509Certificate peerCert = null; if ((clientAuth == ClientAuth.REQUIRE || clientAuth == ClientAuth.OPTIONAL) - && session.getPeerCertificateChain() != null && session.getPeerCertificateChain().length > 0) { + && session.getPeerCertificateChain() != null + && session.getPeerCertificateChain().length > 0) { peerCert = session.getPeerCertificateChain()[0]; } if (session.getLocalCertificates() != null && session.getLocalCertificates().length > 0) { serverCert = session.getLocalCertificates()[0]; } - SslHandshakeInfo info = new SslHandshakeInfo(isSSlFromIntermediary, session.getProtocol(), session.getCipherSuite(), clientAuth, serverCert, peerCert); + SslHandshakeInfo info = new SslHandshakeInfo(isSSlFromIntermediary, session.getProtocol(), + session.getCipherSuite(), clientAuth, serverCert, peerCert); ctx.channel().attr(ATTR_SSL_INFO).set(info); // Metrics. incrementCounters(sslEvent, info); - if (LOG.isDebugEnabled()) { - LOG.debug("Successful SSL Handshake: " + String.valueOf(info)); - } - else if (LOG.isInfoEnabled()) { - LOG.info("Successful SSL Handshake: protocol={}, ciphersuite={}, has_client_cert={}", info.getProtocol(), info.getCipherSuite(), info.getClientCertificate() != null); + if (logger.isDebugEnabled()) { + logger.debug("Successful SSL Handshake: " + info); + } else if (logger.isInfoEnabled()) { + logger.info("Successful SSL Handshake: protocol={}, ciphersuite={}, has_client_cert={}", + info.getProtocol(), info.getCipherSuite(), info.getClientCertificate() != null); } - } - else { + } else { String clientIP = ctx.channel().attr(SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS).get(); Throwable cause = sslEvent.cause(); PassportState passportState = CurrentPassport.fromChannel(ctx.channel()).getState(); if (cause instanceof ClosedChannelException && - (PassportState.SERVER_CH_INACTIVE.equals(passportState) || PassportState.SERVER_CH_IDLE_TIMEOUT.equals(passportState))) { + (PassportState.SERVER_CH_INACTIVE.equals(passportState) + || PassportState.SERVER_CH_IDLE_TIMEOUT.equals(passportState))) { // Either client closed the connection without/before having completed a handshake, or // the connection idle timed-out before handshake. // NOTE: we were seeing a lot of these in prod and can repro by just telnetting to port and then closing terminal // without sending anything. // So don't treat these as SSL handshake failures. - LOG.info("Client closed connection or it idle timed-out without doing an ssl handshake. " - + ", client_ip = " + String.valueOf(clientIP) + logger.info("Client closed connection or it idle timed-out without doing an ssl handshake. " + + ", client_ip = " + clientIP + ", channel_info = " + ChannelUtils.channelInfoForLogging(ctx.channel())); - } - else if (cause instanceof SSLException && cause.getMessage().contains("handshake timed out")) { - LOG.info("Client timed-out doing the ssl handshake. " - + ", client_ip = " + String.valueOf(clientIP) + } else if (cause instanceof SSLException && cause.getMessage().contains("handshake timed out")) { + logger.info("Client timed-out doing the ssl handshake. " + + ", client_ip = " + clientIP + ", channel_info = " + ChannelUtils.channelInfoForLogging(ctx.channel())); - } - else if (cause instanceof SSLException + } else if (cause instanceof SSLException && cause.getMessage().contains("failure when writing TLS control frames")) { // This can happen if the ClientHello is sent followed by a RST packet, before we can respond. - LOG.info("Client terminated handshake early." + logger.info("Client terminated handshake early." + ", client_ip = " + clientIP + ", channel_info = " + ChannelUtils.channelInfoForLogging(ctx.channel())); - } - else { - String msg = "Unsuccessful SSL Handshake: " + String.valueOf(sslEvent) - + ", client_ip = " + String.valueOf(clientIP) + } else { + String msg = "Unsuccessful SSL Handshake: " + sslEvent + + ", client_ip = " + clientIP + ", channel_info = " + ChannelUtils.channelInfoForLogging(ctx.channel()) - + ", error = " + String.valueOf(cause); - if (cause != null && cause instanceof ClosedChannelException) { - LOG.warn(msg); - } - else { - LOG.warn(msg, cause); + + ", error = " + cause; + if (cause instanceof ClosedChannelException) { + logger.warn(msg); + } else { + logger.warn(msg, cause); } incrementCounters(sslEvent, null); } - - // ### TESTING - -// SslHandler sslhandler = null; -// try { -// sslhandler = (SslHandler) ctx.channel().pipeline().get("ssl"); -// if (sslhandler != null) { -// SSLSession session = sslhandler.engine().getSession(); -// -// LOG.warn("SSL Handshake failure. id = " + String.valueOf(session.getId()) -// + ", protocol = " + String.valueOf(session.getProtocol()) -// + ", ciphersuite = " + String.valueOf(session.getCipherSuite())); -// } -// } -// catch (Exception e) { -// e.printStackTrace(); -// } - } - } - catch (Throwable e) { - LOG.warn("Error getting the SSL handshake info.", e); - } - finally { + } catch (Throwable e) { + logger.warn("Error getting the SSL handshake info.", e); + } finally { // Now remove this handler from the pipeline as no longer needed once the ssl handshake has completed. ctx.pipeline().remove(this); } - } - else if (evt instanceof SslCloseCompletionEvent) { + } else if (evt instanceof SslCloseCompletionEvent) { // TODO - increment a separate metric for this event? - } - else if (evt instanceof SniCompletionEvent) { - LOG.debug("SNI Parsing Complete: " + evt.toString()); + } else if (evt instanceof SniCompletionEvent) { + logger.debug("SNI Parsing Complete: " + evt.toString()); SniCompletionEvent sniCompletionEvent = (SniCompletionEvent) evt; if (sniCompletionEvent.isSuccess()) { spectatorRegistry.counter("zuul.sni.parse.success").increment(); - } - else { + } else { Throwable cause = sniCompletionEvent.cause(); - spectatorRegistry.counter("zuul.sni.parse.failure", cause != null ? cause.getMessage() : "UNKNOWN").increment(); + spectatorRegistry.counter("zuul.sni.parse.failure", cause != null ? cause.getMessage() : "UNKNOWN") + .increment(); } } - super.userEventTriggered(ctx, evt); } - private ClientAuth whichClientAuthEnum(SslHandler sslhandler) - { + private ClientAuth whichClientAuthEnum(SslHandler sslhandler) { ClientAuth clientAuth; if (sslhandler.engine().getNeedClientAuth()) { clientAuth = ClientAuth.REQUIRE; - } - else if (sslhandler.engine().getWantClientAuth()) { + } else if (sslhandler.engine().getWantClientAuth()) { clientAuth = ClientAuth.OPTIONAL; - } - else { + } else { clientAuth = ClientAuth.NONE; } return clientAuth; @@ -227,18 +195,17 @@ private void incrementCounters( "protocol", String.valueOf(proto), "ciphersuite", String.valueOf(ciphsuite), "clientauth", String.valueOf(handshakeInfo.getClientAuthRequirement()) - ) + ) .increment(); - } - else { + } else { spectatorRegistry.counter("server.ssl.handshake", "success", String.valueOf(sslHandshakeCompletionEvent.isSuccess()), "failure_cause", String.valueOf(sslHandshakeCompletionEvent.cause()) - ) + ) .increment(); } } catch (Exception e) { - LOG.error("Error incrememting counters for SSL handshake!", e); + logger.error("Error incrememting counters for SSL handshake!", e); } } } From 1ec3a08c1e9844026a9f2641169ad2b48347a391 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 18 Nov 2020 12:31:44 -0800 Subject: [PATCH 158/273] zuul-core: add debugging and locking around CurrentPassport. This is needed to help debug a seemingly impossible ConcurrentModificationException. The passport should live entirely on a single thread, and not be re-entrant. This code checks not only if the passport is locked, but also if it accidentally owns it already. The lock will keep access safe, but it does not stop the sharing of the object. Once we know where the object is being accessed, we can disable this code. --- .../zuul/passport/CurrentPassport.java | 226 +++++++++++------- 1 file changed, 143 insertions(+), 83 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/passport/CurrentPassport.java b/zuul-core/src/main/java/com/netflix/zuul/passport/CurrentPassport.java index 804e063e..cc92b55b 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/passport/CurrentPassport.java +++ b/zuul-core/src/main/java/com/netflix/zuul/passport/CurrentPassport.java @@ -28,17 +28,24 @@ import io.netty.util.AttributeKey; import java.util.ArrayList; +import java.util.ConcurrentModificationException; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Set; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class CurrentPassport { + private static final Logger logger = LoggerFactory.getLogger(CurrentPassport.class); + private static final CachedDynamicBooleanProperty COUNT_STATES = new CachedDynamicBooleanProperty( "zuul.passport.count.enabled", false); @@ -60,6 +67,29 @@ public class CurrentPassport private final HashSet statesAdded; private final long creationTimeSinceEpochMs; + private final ReentrantLock historyLock = new ReentrantLock(); + private final Unlocker unlocker = new Unlocker(); + private final class Unlocker implements AutoCloseable { + + @Override + public void close() { + historyLock.unlock(); + } + } + + private Unlocker lock() { + boolean locked = false; + if (historyLock.isHeldByCurrentThread() || historyLock.isLocked() || !(locked = historyLock.tryLock())) { + logger.warn( + "CurrentPassport already locked!, lock={}, self={}", + historyLock, Thread.currentThread(), new ConcurrentModificationException()); + } + if (!locked) { + historyLock.lock(); + } + return unlocker; + } + CurrentPassport() { this(SYSTEM_TICKER); @@ -118,14 +148,19 @@ public static void clearFromChannel(Channel ch) { ch.attr(CHANNEL_ATTR).set(null); } - public PassportState getState() - { - return history.peekLast().getState(); + public PassportState getState() { + try (Unlocker ignored = lock()){ + return history.peekLast().getState(); + } } + @VisibleForTesting public LinkedList getHistory() { - return history; + try (Unlocker ignored = lock()) { + // best effort, but doesn't actually protect anything + return history; + } } public void add(PassportState state) @@ -136,8 +171,10 @@ public void add(PassportState state) return; } } - - history.addLast(new PassportItem(state, now())); + + try (Unlocker ignored = lock()) { + history.addLast(new PassportItem(state, now())); + } statesAdded.add(state); } @@ -151,9 +188,11 @@ public void addIfNotAlready(PassportState state) public long calculateTimeBetweenFirstAnd(PassportState endState) { long startTime = firstTime(); - for (PassportItem item : history) { - if (item.getState() == endState) { - return item.getTime() - startTime; + try (Unlocker ignored = lock()) { + for (PassportItem item : history) { + if (item.getState() == endState) { + return item.getTime() - startTime; + } } } return now() - startTime; @@ -164,7 +203,9 @@ public long calculateTimeBetweenFirstAnd(PassportState endState) */ public long firstTime() { - return history.getFirst().getTime(); + try (Unlocker ignored = lock()) { + return history.getFirst().getTime(); + } } public long creationTimeSinceEpochMs() @@ -197,26 +238,31 @@ public long calculateTimeBetweenButIfNoEndThenUseNow(StartAndEnd sae) public StartAndEnd findStartAndEndStates(PassportState startState, PassportState endState) { StartAndEnd sae = new StartAndEnd(); - for (PassportItem item : history) { - if (item.getState() == startState) { - sae.startTime = item.getTime(); - } - else if (item.getState() == endState) { - sae.endTime = item.getTime(); + try (Unlocker ignored = lock()) { + for (PassportItem item : history) { + if (item.getState() == startState) { + sae.startTime = item.getTime(); + } + else if (item.getState() == endState) { + sae.endTime = item.getTime(); + } } } + return sae; } public StartAndEnd findFirstStartAndLastEndStates(PassportState startState, PassportState endState) { StartAndEnd sae = new StartAndEnd(); - for (PassportItem item : history) { - if (sae.startNotFound() && item.getState() == startState) { - sae.startTime = item.getTime(); - } - else if (item.getState() == endState) { - sae.endTime = item.getTime(); + try (Unlocker ignored = lock()) { + for (PassportItem item : history) { + if (sae.startNotFound() && item.getState() == startState) { + sae.startTime = item.getTime(); + } + else if (item.getState() == endState) { + sae.endTime = item.getTime(); + } } } return sae; @@ -225,12 +271,13 @@ else if (item.getState() == endState) { public StartAndEnd findLastStartAndFirstEndStates(PassportState startState, PassportState endState) { StartAndEnd sae = new StartAndEnd(); - for (PassportItem item : history) { - if (item.getState() == startState) { - sae.startTime = item.getTime(); - } - else if (sae.endNotFound() && item.getState() == endState) { - sae.endTime = item.getTime(); + try (Unlocker ignored = lock()) { + for (PassportItem item : history) { + if (item.getState() == startState) { + sae.startTime = item.getTime(); + } else if (sae.endNotFound() && item.getState() == endState) { + sae.endTime = item.getTime(); + } } } return sae; @@ -242,19 +289,20 @@ public List findEachPairOf(PassportState startState, PassportState StartAndEnd currentPair = null; - for (PassportItem item : history) { + try (Unlocker ignored = lock()) { + for (PassportItem item : history) { - if (item.getState() == startState) { - if (currentPair == null) { - currentPair = new StartAndEnd(); - currentPair.startTime = item.getTime(); - } - } - else if (item.getState() == endState) { - if (currentPair != null) { - currentPair.endTime = item.getTime(); - items.add(currentPair); - currentPair = null; + if (item.getState() == startState) { + if (currentPair == null) { + currentPair = new StartAndEnd(); + currentPair.startTime = item.getTime(); + } + } else if (item.getState() == endState) { + if (currentPair != null) { + currentPair.endTime = item.getTime(); + items.add(currentPair); + currentPair = null; + } } } } @@ -264,9 +312,11 @@ else if (item.getState() == endState) { public PassportItem findState(PassportState state) { - for (PassportItem item : history) { - if (item.getState() == state) { - return item; + try (Unlocker ignored = lock()) { + for (PassportItem item : history) { + if (item.getState() == state) { + return item; + } } } return null; @@ -274,11 +324,13 @@ public PassportItem findState(PassportState state) public PassportItem findStateBackwards(PassportState state) { - Iterator itr = history.descendingIterator(); - while (itr.hasNext()) { - PassportItem item = (PassportItem) itr.next(); - if (item.getState() == state) { - return item; + try (Unlocker ignored = lock()) { + Iterator itr = history.descendingIterator(); + while (itr.hasNext()) { + PassportItem item = (PassportItem) itr.next(); + if (item.getState() == state) { + return item; + } } } return null; @@ -287,9 +339,11 @@ public PassportItem findStateBackwards(PassportState state) public List findStates(PassportState state) { ArrayList items = new ArrayList<>(); - for (PassportItem item : history) { - if (item.getState() == state) { - items.add(item); + try (Unlocker ignored = lock()) { + for (PassportItem item : history) { + if (item.getState() == state) { + items.add(item); + } } } return items; @@ -299,9 +353,11 @@ public List findTimes(PassportState state) { long startTick = firstTime(); ArrayList items = new ArrayList<>(); - for (PassportItem item : history) { - if (item.getState() == state) { - items.add(item.getTime() - startTick); + try (Unlocker ignored = lock()) { + for (PassportItem item : history) { + if (item.getState() == state) { + items.add(item.getTime() - startTick); + } } } return items; @@ -322,23 +378,26 @@ private long now() @Override public String toString() { - long startTime = history.size() > 0 ? firstTime() : 0; - long now = now(); - - StringBuilder sb = new StringBuilder(); - sb.append("CurrentPassport {"); - sb.append("start_ms=").append(creationTimeSinceEpochMs()).append(", "); - - sb.append('['); - for (PassportItem item : history) { - sb.append('+').append(item.getTime() - startTime).append('=').append(item.getState().name()).append(", "); + try (Unlocker ignored = lock()) { + long startTime = history.size() > 0 ? firstTime() : 0; + long now = now(); + + StringBuilder sb = new StringBuilder(); + sb.append("CurrentPassport {"); + sb.append("start_ms=").append(creationTimeSinceEpochMs()).append(", "); + + sb.append('['); + for (PassportItem item : history) { + sb.append('+').append(item.getTime() - startTime).append('=').append(item.getState().name()) + .append(", "); + } + sb.append('+').append(now - startTime).append('=').append("NOW"); + sb.append(']'); + + sb.append('}'); + + return sb.toString(); } - sb.append('+').append(now - startTime).append('=').append("NOW"); - sb.append(']'); - - sb.append('}'); - - return sb.toString(); } @VisibleForTesting @@ -352,19 +411,20 @@ public static CurrentPassport parseFromToString(String text) String[] stateStrs = m.group(1).split(", "); MockTicker ticker = new MockTicker(); passport = new CurrentPassport(ticker); - for (String stateStr : stateStrs) { - Matcher stateMatch = ptnState.matcher(stateStr); - if (stateMatch.matches()) { - String stateName = stateMatch.group(2); - if (stateName.equals("NOW")) { - long startTime = passport.getHistory().size() > 0 ? passport.firstTime() : 0; - long now = Long.valueOf(stateMatch.group(1)) + startTime; - ticker.setNow(now); - } - else { - PassportState state = PassportState.valueOf(stateName); - PassportItem item = new PassportItem(state, Long.valueOf(stateMatch.group(1))); - passport.getHistory().add(item); + try (Unlocker ignored = passport.lock()) { + for (String stateStr : stateStrs) { + Matcher stateMatch = ptnState.matcher(stateStr); + if (stateMatch.matches()) { + String stateName = stateMatch.group(2); + if (stateName.equals("NOW")) { + long startTime = passport.history.size() > 0 ? passport.firstTime() : 0; + long now = Long.valueOf(stateMatch.group(1)) + startTime; + ticker.setNow(now); + } else { + PassportState state = PassportState.valueOf(stateName); + PassportItem item = new PassportItem(state, Long.valueOf(stateMatch.group(1))); + passport.history.add(item); + } } } } From 6bc3f53a0696e30fc4a99a211a851f81c649b7b8 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Wed, 18 Nov 2020 13:54:28 -0800 Subject: [PATCH 159/273] Basic tests for h2 codec swapping --- .../server/http2/Http2OrHttpHandlerTest.java | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 zuul-core/src/test/java/com/netflix/zuul/netty/server/http2/Http2OrHttpHandlerTest.java diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/server/http2/Http2OrHttpHandlerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/server/http2/Http2OrHttpHandlerTest.java new file mode 100644 index 00000000..d57005a0 --- /dev/null +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/server/http2/Http2OrHttpHandlerTest.java @@ -0,0 +1,76 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.netty.server.http2; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertEquals; +import com.netflix.netty.common.Http2ConnectionCloseHandler; +import com.netflix.netty.common.Http2ConnectionExpiryHandler; +import com.netflix.netty.common.channel.config.ChannelConfig; +import com.netflix.netty.common.channel.config.ChannelConfigValue; +import com.netflix.netty.common.channel.config.CommonChannelConfigKeys; +import com.netflix.netty.common.metrics.Http2MetricsChannelHandlers; +import com.netflix.spectator.api.NoopRegistry; +import com.netflix.zuul.netty.server.BaseZuulChannelInitializer; +import io.netty.channel.embedded.EmbeddedChannel; +import io.netty.handler.codec.http2.Http2FrameCodec; +import io.netty.handler.codec.http2.Http2MultiplexHandler; +import io.netty.handler.ssl.ApplicationProtocolNames; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** + * @author Argha C + * @since November 18, 2020 + */ + +@RunWith(JUnit4.class) +public class Http2OrHttpHandlerTest { + + @Test + public void swapInHttp2HandlerBasedOnALPN() throws Exception { + EmbeddedChannel channel = new EmbeddedChannel(); + final NoopRegistry registry = new NoopRegistry(); + final ChannelConfig channelConfig = new ChannelConfig(); + channelConfig.add(new ChannelConfigValue<>(CommonChannelConfigKeys.maxHttp2HeaderListSize, 32768)); + + Http2ConnectionCloseHandler connectionCloseHandler = new Http2ConnectionCloseHandler(registry); + Http2ConnectionExpiryHandler connectionExpiryHandler = new Http2ConnectionExpiryHandler(100, 100, + 20 * 60 * 1000); + Http2MetricsChannelHandlers http2MetricsChannelHandlers = new Http2MetricsChannelHandlers(registry, "server", + "http2-443"); + final Http2OrHttpHandler http2OrHttpHandler = new Http2OrHttpHandler( + new Http2StreamInitializer(channel, (x) -> { + }, http2MetricsChannelHandlers, connectionCloseHandler, connectionExpiryHandler), + channelConfig, + cp -> { + }); + + channel.pipeline().addLast("codec_placeholder", new DummyChannelHandler()); + channel.pipeline().addLast(Http2OrHttpHandler.class.getSimpleName(), http2OrHttpHandler); + + http2OrHttpHandler.configurePipeline(channel.pipeline().lastContext(), ApplicationProtocolNames.HTTP_2); + + assertThat(channel.pipeline().get(Http2FrameCodec.class.getSimpleName() + "#0")) + .isInstanceOf(Http2FrameCodec.class); + assertThat(channel.pipeline().get(BaseZuulChannelInitializer.HTTP_CODEC_HANDLER_NAME)) + .isInstanceOf(Http2MultiplexHandler.class); + assertEquals("HTTP/2", channel.attr(Http2OrHttpHandler.PROTOCOL_NAME).get()); + } + +} \ No newline at end of file From 17195fa86cdf124ceb1b1dc3173cc7ded43d1da7 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 18 Nov 2020 16:10:36 -0800 Subject: [PATCH 160/273] zuul-core: don't complain in Passport if held by the current thread. * zuul-core: don't complain in Passport if held by the current thread. * expose remote stack --- .../netflix/zuul/passport/CurrentPassport.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/passport/CurrentPassport.java b/zuul-core/src/main/java/com/netflix/zuul/passport/CurrentPassport.java index cc92b55b..9083fa32 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/passport/CurrentPassport.java +++ b/zuul-core/src/main/java/com/netflix/zuul/passport/CurrentPassport.java @@ -28,6 +28,7 @@ import io.netty.util.AttributeKey; import java.util.ArrayList; +import java.util.Arrays; import java.util.ConcurrentModificationException; import java.util.HashSet; import java.util.Iterator; @@ -67,7 +68,7 @@ public class CurrentPassport private final HashSet statesAdded; private final long creationTimeSinceEpochMs; - private final ReentrantLock historyLock = new ReentrantLock(); + private final IntrospectiveReentrantLock historyLock = new IntrospectiveReentrantLock(); private final Unlocker unlocker = new Unlocker(); private final class Unlocker implements AutoCloseable { @@ -76,13 +77,22 @@ public void close() { historyLock.unlock(); } } + private final static class IntrospectiveReentrantLock extends ReentrantLock { + + @Override + protected Thread getOwner() { + return super.getOwner(); + } + } private Unlocker lock() { boolean locked = false; - if (historyLock.isHeldByCurrentThread() || historyLock.isLocked() || !(locked = historyLock.tryLock())) { + if ((historyLock.isLocked() && !historyLock.isHeldByCurrentThread()) || !(locked = historyLock.tryLock())) { logger.warn( - "CurrentPassport already locked!, lock={}, self={}", - historyLock, Thread.currentThread(), new ConcurrentModificationException()); + "CurrentPassport already locked!, other={}, self={}", + Arrays.asList(historyLock.getOwner().getStackTrace()), + Thread.currentThread(), + new ConcurrentModificationException()); } if (!locked) { historyLock.lock(); From f2f3ae93c8e6b83e33bef874774ae6e9f0164ba5 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 18 Nov 2020 18:01:57 -0800 Subject: [PATCH 161/273] zuul-core: fix NPE in CurrentPassport debugging --- .../main/java/com/netflix/zuul/passport/CurrentPassport.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/passport/CurrentPassport.java b/zuul-core/src/main/java/com/netflix/zuul/passport/CurrentPassport.java index 9083fa32..8334266c 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/passport/CurrentPassport.java +++ b/zuul-core/src/main/java/com/netflix/zuul/passport/CurrentPassport.java @@ -88,9 +88,11 @@ protected Thread getOwner() { private Unlocker lock() { boolean locked = false; if ((historyLock.isLocked() && !historyLock.isHeldByCurrentThread()) || !(locked = historyLock.tryLock())) { + Thread owner = historyLock.getOwner(); + String ownerStack = String.valueOf(owner != null ? Arrays.asList(owner.getStackTrace()) : historyLock); logger.warn( "CurrentPassport already locked!, other={}, self={}", - Arrays.asList(historyLock.getOwner().getStackTrace()), + ownerStack, Thread.currentThread(), new ConcurrentModificationException()); } From 6aa44ba1d16240431f9a3afd13c41268fb0cc6cb Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 19 Nov 2020 16:27:37 -0800 Subject: [PATCH 162/273] zuul-core: remove unused debugging util deepcopy --- .../netflix/zuul/context/SessionContext.java | 56 +++--------------- .../java/com/netflix/zuul/util/DeepCopy.java | 58 ------------------- 2 files changed, 8 insertions(+), 106 deletions(-) delete mode 100755 zuul-core/src/main/java/com/netflix/zuul/util/DeepCopy.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/context/SessionContext.java b/zuul-core/src/main/java/com/netflix/zuul/context/SessionContext.java index 2b6e6d49..3b6a7d23 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/context/SessionContext.java +++ b/zuul-core/src/main/java/com/netflix/zuul/context/SessionContext.java @@ -15,26 +15,25 @@ */ package com.netflix.zuul.context; -/** - * User: Mike Smith - * Date: 4/28/15 - * Time: 6:45 PM - */ import com.netflix.config.DynamicPropertyFactory; import com.netflix.zuul.filters.FilterError; import com.netflix.zuul.message.http.HttpResponseMessage; -import com.netflix.zuul.util.DeepCopy; - -import java.io.NotSerializableException; import java.net.URL; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * Represents the context between client and origin server for the duration of the dedicated connection/session * between them. But we're currently still only modelling single request/response pair per session. * * NOTE: Not threadsafe, and not intended to be used concurrently. + * + * User: Mike Smith + * Date: 4/28/15 + * Time: 6:45 PM */ public class SessionContext extends HashMap implements Cloneable { @@ -122,45 +121,6 @@ public void set(String key, Object value) { else remove(key); } - /** - * Makes a copy of the SessionContext. This is used for debugging. - * - */ - public SessionContext copy() - { - SessionContext copy = new SessionContext(); - copy.brownoutMode = brownoutMode; - copy.cancelled = cancelled; - copy.shouldStopFilterProcessing = shouldStopFilterProcessing; - copy.shouldSendErrorResponse = shouldSendErrorResponse; - copy.errorResponseSent = errorResponseSent; - copy.debugRouting = debugRouting; - copy.debugRequest = debugRequest; - copy.debugRequestHeadersOnly = debugRequestHeadersOnly; - - Iterator it = keySet().iterator(); - String key = it.next(); - while (key != null) { - Object orig = get(key); - try { - Object copyValue = DeepCopy.copy(orig); - if (copyValue != null) { - copy.set(key, copyValue); - } else { - copy.set(key, orig); - } - } catch (NotSerializableException e) { - copy.set(key, orig); - } - if (it.hasNext()) { - key = it.next(); - } else { - key = null; - } - } - return copy; - } - public String getUUID() { return getString(KEY_UUID); diff --git a/zuul-core/src/main/java/com/netflix/zuul/util/DeepCopy.java b/zuul-core/src/main/java/com/netflix/zuul/util/DeepCopy.java deleted file mode 100755 index d86abd1d..00000000 --- a/zuul-core/src/main/java/com/netflix/zuul/util/DeepCopy.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2018 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.netflix.zuul.util; - -import java.io.*; - -/** - * Deep copy of an Object. The Object must be Serializable - * @author Mikey Cohen - * Date: 1/31/12 - * Time: 11:54 AM - */ -public class DeepCopy { - /** - * Returns a copy of the object, or null if the object cannot - * be serialized. - * @param orig an Object value - * @return a deep copy of that Object - * @exception NotSerializableException if an error occurs - */ - public static Object copy(Object orig) throws NotSerializableException { - Object obj = null; - try { - // Write the object out to a byte array - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - ObjectOutputStream out = new ObjectOutputStream(bos); - out.writeObject(orig); - out.flush(); - out.close(); - - // Make an input stream from the byte array and read - // a copy of the object back in. - ObjectInputStream in = new ObjectInputStream( - new ByteArrayInputStream(bos.toByteArray())); - obj = in.readObject(); - } catch (NotSerializableException e) { - throw e; - } catch (IOException e) { - e.printStackTrace(); - } catch (ClassNotFoundException cnfe) { - cnfe.printStackTrace(); - } - return obj; - } -} From 47071dcf44a9bca3e6e0a2e1c408de44924bb0fe Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Fri, 20 Nov 2020 11:11:54 -0800 Subject: [PATCH 163/273] Begin 2.2.0-snapshot, in prep for 2.2.0-release --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index f69bb53e..fb364a6d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,4 +2,4 @@ versions_groovy=3.0.3 versions_ribbon=2.4.4 versions_netty=4.1.54.Final release.scope=patch -release.version=2.1.9-SNAPSHOT +release.version=2.2.0-SNAPSHOT From 97b86d453b612e5f119abecadd239409f88a9793 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Mon, 16 Nov 2020 13:41:37 -0800 Subject: [PATCH 164/273] [zuul-core] Remove deprecated port attrs. Use `_ADDRESS` instead. --- .../common/SourceAddressChannelHandler.java | 78 +++++++------------ .../HAProxyMessageChannelHandler.java | 2 - .../server/http2/Http2StreamInitializer.java | 2 - .../ElbProxyProtocolChannelHandlerTest.java | 42 +++++----- 4 files changed, 47 insertions(+), 77 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/SourceAddressChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/SourceAddressChannelHandler.java index 8071962e..45485432 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/SourceAddressChannelHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/SourceAddressChannelHandler.java @@ -32,19 +32,17 @@ import javax.annotation.Nullable; /** - * Stores the source IP address as an attribute of the channel. This has the advantage of allowing - * us to overwrite it if we have more info (eg. ELB sends a HAProxyMessage with info of REAL source - * host + port). - * - * User: michaels@netflix.com - * Date: 4/14/16 - * Time: 4:29 PM + * Stores the source IP address as an attribute of the channel. This has the advantage of allowing us to overwrite it if + * we have more info (eg. ELB sends a HAProxyMessage with info of REAL source host + port). + *

+ * User: michaels@netflix.com Date: 4/14/16 Time: 4:29 PM */ @ChannelHandler.Sharable public final class SourceAddressChannelHandler extends ChannelInboundHandlerAdapter { + /** - * Indicates the actual source (remote) address of the channel. This can be different than the - * one {@link Channel} returns if the connection is being proxied. (e.g. over HAProxy) + * Indicates the actual source (remote) address of the channel. This can be different than the one {@link Channel} + * returns if the connection is being proxied. (e.g. over HAProxy) */ public static final AttributeKey ATTR_REMOTE_ADDR = AttributeKey.newInstance("_remote_addr"); @@ -54,30 +52,22 @@ public final class SourceAddressChannelHandler extends ChannelInboundHandlerAdap public static final AttributeKey ATTR_PROXY_PROTOCOL_DESTINATION_ADDRESS = AttributeKey.newInstance("_proxy_protocol_destination_address"); - /** Use {@link #ATTR_REMOTE_ADDR} instead. */ + /** + * Use {@link #ATTR_REMOTE_ADDR} instead. + */ @Deprecated public static final AttributeKey ATTR_SOURCE_INET_ADDR = AttributeKey.newInstance("_source_inet_addr"); /** - * The host address of the source. This is derived from {@link #ATTR_REMOTE_ADDR}. If the - * address is an IPv6 address, the scope identifier is absent. + * The host address of the source. This is derived from {@link #ATTR_REMOTE_ADDR}. If the address is an IPv6 + * address, the scope identifier is absent. */ public static final AttributeKey ATTR_SOURCE_ADDRESS = AttributeKey.newInstance("_source_address"); /** - * Indicates the actual source (remote) port of the channel, if present. This can be different - * than the one {@link Channel} returns if the connection is being proxies. (e.g. over - * HAProxy). - * @deprecated use {@link #ATTR_REMOTE_ADDR} instead, and check if it is an {@code - * InetSocketAddress}. - */ - @Deprecated - public static final AttributeKey ATTR_SOURCE_PORT = AttributeKey.newInstance("_source_port"); - - /** - * Indicates the local address of the channel. This can be different than the - * one {@link Channel} returns if the connection is being proxied. (e.g. over HAProxy) + * Indicates the local address of the channel. This can be different than the one {@link Channel} returns if the + * connection is being proxied. (e.g. over HAProxy) */ public static final AttributeKey ATTR_LOCAL_ADDR = AttributeKey.newInstance("_local_addr"); @@ -89,33 +79,27 @@ public final class SourceAddressChannelHandler extends ChannelInboundHandlerAdap AttributeKey.newInstance("_local_inet_addr"); /** - * The local address of this channel. This is derived from {@code channel.localAddress()}, or from the - * Proxy Protocol preface if provided. If the address is an IPv6 address, the scope identifier is absent. - * Unlike {@link #ATTR_SERVER_LOCAL_ADDRESS}, this value is overwritten with the Proxy Protocol local address - * (e.g. the LB's local address), if enabled. + * The local address of this channel. This is derived from {@code channel.localAddress()}, or from the Proxy + * Protocol preface if provided. If the address is an IPv6 address, the scope identifier is absent. Unlike {@link + * #ATTR_SERVER_LOCAL_ADDRESS}, this value is overwritten with the Proxy Protocol local address (e.g. the LB's local + * address), if enabled. */ public static final AttributeKey ATTR_LOCAL_ADDRESS = AttributeKey.newInstance("_local_address"); /** - * The port number of the local socket, or {@code -1} if not appropriate. Use {@link #ATTR_LOCAL_ADDR} instead. - */ - @Deprecated - public static final AttributeKey ATTR_LOCAL_PORT = AttributeKey.newInstance("_local_port"); - - - /** - * The actual local address of the channel, in string form. If the address is an IPv6 address, the scope - * identifier is absent. Unlike {@link #ATTR_LOCAL_ADDRESS}, this is not overwritten by the Proxy Protocol message - * if present. + * The actual local address of the channel, in string form. If the address is an IPv6 address, the scope identifier + * is absent. Unlike {@link #ATTR_LOCAL_ADDRESS}, this is not overwritten by the Proxy Protocol message if + * present. * * @deprecated Use {@code channel.localAddress()} instead. */ @Deprecated - public static final AttributeKey ATTR_SERVER_LOCAL_ADDRESS = AttributeKey.newInstance("_server_local_address"); + public static final AttributeKey ATTR_SERVER_LOCAL_ADDRESS = + AttributeKey.newInstance("_server_local_address"); /** - * The port number of the local socket, or {@code -1} if not appropriate. Unlike {@link #ATTR_LOCAL_PORT}, this - * is not overwritten by the Proxy Protocol message if present. + * The port number of the local socket, or {@code -1} if not appropriate. This is not overwritten by the Proxy + * Protocol message if present. * * @deprecated Use {@code channel.localAddress()} instead. */ @@ -123,19 +107,15 @@ public final class SourceAddressChannelHandler extends ChannelInboundHandlerAdap public static final AttributeKey ATTR_SERVER_LOCAL_PORT = AttributeKey.newInstance("_server_local_port"); @Override - public void channelActive(ChannelHandlerContext ctx) throws Exception - { + public void channelActive(ChannelHandlerContext ctx) throws Exception { ctx.channel().attr(ATTR_REMOTE_ADDR).set(ctx.channel().remoteAddress()); InetSocketAddress sourceAddress = sourceAddress(ctx.channel()); ctx.channel().attr(ATTR_SOURCE_INET_ADDR).setIfAbsent(sourceAddress); ctx.channel().attr(ATTR_SOURCE_ADDRESS).setIfAbsent(getHostAddress(sourceAddress)); - ctx.channel().attr(ATTR_SOURCE_PORT).setIfAbsent(sourceAddress.getPort()); - ctx.channel().attr(ATTR_LOCAL_ADDR).set(ctx.channel().localAddress()); InetSocketAddress localAddress = localAddress(ctx.channel()); ctx.channel().attr(ATTR_LOCAL_INET_ADDR).setIfAbsent(localAddress); ctx.channel().attr(ATTR_LOCAL_ADDRESS).setIfAbsent(getHostAddress(localAddress)); - ctx.channel().attr(ATTR_LOCAL_PORT).setIfAbsent(localAddress.getPort()); // ATTR_LOCAL_ADDRESS and ATTR_LOCAL_PORT get overwritten with what is received in // Proxy Protocol (via the LB), so set local server's address, port explicitly ctx.channel().attr(ATTR_SERVER_LOCAL_ADDRESS).setIfAbsent(localAddress.getAddress().getHostAddress()); @@ -168,8 +148,7 @@ static String getHostAddress(InetSocketAddress socketAddress) { } } - private InetSocketAddress sourceAddress(Channel channel) - { + private InetSocketAddress sourceAddress(Channel channel) { SocketAddress remoteSocketAddr = channel.remoteAddress(); if (null != remoteSocketAddr && InetSocketAddress.class.isAssignableFrom(remoteSocketAddr.getClass())) { InetSocketAddress inetSocketAddress = (InetSocketAddress) remoteSocketAddr; @@ -180,8 +159,7 @@ private InetSocketAddress sourceAddress(Channel channel) return null; } - private InetSocketAddress localAddress(Channel channel) - { + private InetSocketAddress localAddress(Channel channel) { SocketAddress localSocketAddress = channel.localAddress(); if (null != localSocketAddress && InetSocketAddress.class.isAssignableFrom(localSocketAddress.getClass())) { InetSocketAddress inetSocketAddress = (InetSocketAddress) localSocketAddress; diff --git a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java index 6f6e53ed..a0a1190a 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java @@ -53,7 +53,6 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception String destinationAddress = hapm.destinationAddress(); if (destinationAddress != null) { channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDRESS).set(destinationAddress); - channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_PORT).set(hapm.destinationPort()); SocketAddress addr; out: { @@ -84,7 +83,6 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception String sourceAddress = hapm.sourceAddress(); if (sourceAddress != null) { channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS).set(sourceAddress); - channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_PORT).set(hapm.sourcePort()); SocketAddress addr; out: diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java index db2ef7e8..815d7798 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java @@ -92,10 +92,8 @@ protected void copyAttrsFromParentChannel(Channel parent, Channel child) AttributeKey[] attributesToCopy = { SourceAddressChannelHandler.ATTR_LOCAL_ADDRESS, SourceAddressChannelHandler.ATTR_LOCAL_INET_ADDR, - SourceAddressChannelHandler.ATTR_LOCAL_PORT, SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS, SourceAddressChannelHandler.ATTR_SOURCE_INET_ADDR, - SourceAddressChannelHandler.ATTR_SOURCE_PORT, SourceAddressChannelHandler.ATTR_SERVER_LOCAL_ADDRESS, SourceAddressChannelHandler.ATTR_SERVER_LOCAL_PORT, SourceAddressChannelHandler.ATTR_PROXY_PROTOCOL_DESTINATION_ADDRESS, diff --git a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java index 1f121e53..45a5aa83 100644 --- a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java @@ -44,7 +44,7 @@ @RunWith(MockitoJUnitRunner.class) public class ElbProxyProtocolChannelHandlerTest { - + @Mock private Registry registry; @Mock @@ -58,7 +58,8 @@ public void setup() { @Test public void noProxy() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, false)); + channel.pipeline() + .addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, false)); ByteBuf buf = Unpooled.wrappedBuffer( "PROXY TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf); @@ -73,16 +74,15 @@ public void noProxy() { assertNull(channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_MESSAGE).get()); assertNull(channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDRESS).get()); assertNull(channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDR).get()); - assertNull(channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_PORT).get()); assertNull(channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS).get()); - assertNull(channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_PORT).get()); assertNull(channel.attr(SourceAddressChannelHandler.ATTR_REMOTE_ADDR).get()); } @Test public void extraDataForwarded() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); + channel.pipeline() + .addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); ByteBuf buf = Unpooled.wrappedBuffer( "PROXY TCP4 192.168.0.1 124.123.111.111 10008 443\r\nPOTATO".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf); @@ -98,7 +98,8 @@ public void extraDataForwarded() { @Test public void passThrough_ProxyProtocolEnabled_nonProxyBytes() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); + channel.pipeline() + .addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); //Note that the bytes aren't prefixed by PROXY, as required by the spec ByteBuf buf = Unpooled.wrappedBuffer( "TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); @@ -114,16 +115,15 @@ public void passThrough_ProxyProtocolEnabled_nonProxyBytes() { assertNull(channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_MESSAGE).get()); assertNull(channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDRESS).get()); assertNull(channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDR).get()); - assertNull(channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_PORT).get()); assertNull(channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS).get()); - assertNull(channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_PORT).get()); assertNull(channel.attr(SourceAddressChannelHandler.ATTR_REMOTE_ADDR).get()); } @Test public void incrementCounterWhenPPEnabledButNonHAPMMessage() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); + channel.pipeline() + .addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); //Note that the bytes aren't prefixed by PROXY, as required by the spec ByteBuf buf = Unpooled.wrappedBuffer( "TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); @@ -140,7 +140,8 @@ public void incrementCounterWhenPPEnabledButNonHAPMMessage() { @Test public void detectsSplitPpv1Message() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); + channel.pipeline() + .addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); ByteBuf buf1 = Unpooled.wrappedBuffer( "PROXY TCP4".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf1); @@ -161,7 +162,8 @@ public void detectsSplitPpv1Message() { @Test public void negotiateProxy_ppv1_ipv4() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); + channel.pipeline() + .addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); ByteBuf buf = Unpooled.wrappedBuffer( "PROXY TCP4 192.168.0.1 124.123.111.111 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf); @@ -177,21 +179,18 @@ public void negotiateProxy_ppv1_ipv4() { // in later versions of netty. assertNotNull(channel.attr(HAProxyMessageChannelHandler.ATTR_HAPROXY_MESSAGE).get()); assertEquals("124.123.111.111", channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDRESS).get()); - assertEquals( - new InetSocketAddress(InetAddresses.forString("124.123.111.111"), 443), + assertEquals(new InetSocketAddress(InetAddresses.forString("124.123.111.111"), 443), channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDR).get()); - assertEquals(Integer.valueOf(443), channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_PORT).get()); assertEquals("192.168.0.1", channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS).get()); - assertEquals(Integer.valueOf(10008), channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_PORT).get()); - assertEquals( - new InetSocketAddress(InetAddresses.forString("192.168.0.1"), 10008), + assertEquals(new InetSocketAddress(InetAddresses.forString("192.168.0.1"), 10008), channel.attr(SourceAddressChannelHandler.ATTR_REMOTE_ADDR).get()); } @Test public void negotiateProxy_ppv1_ipv6() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); + channel.pipeline() + .addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); ByteBuf buf = Unpooled.wrappedBuffer( "PROXY TCP6 ::1 ::2 10008 443\r\n".getBytes(StandardCharsets.US_ASCII)); channel.writeInbound(buf); @@ -210,9 +209,7 @@ public void negotiateProxy_ppv1_ipv6() { assertEquals( new InetSocketAddress(InetAddresses.forString("::2"), 443), channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDR).get()); - assertEquals(Integer.valueOf(443), channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_PORT).get()); assertEquals("::1", channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS).get()); - assertEquals(Integer.valueOf(10008), channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_PORT).get()); assertEquals( new InetSocketAddress(InetAddresses.forString("::1"), 10008), channel.attr(SourceAddressChannelHandler.ATTR_REMOTE_ADDR).get()); @@ -221,7 +218,8 @@ public void negotiateProxy_ppv1_ipv6() { @Test public void negotiateProxy_ppv2_ipv4() { EmbeddedChannel channel = new EmbeddedChannel(); - channel.pipeline().addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); + channel.pipeline() + .addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); ByteBuf buf = Unpooled.wrappedBuffer( new byte[]{0x0D, 0x0A, 0x0D, 0x0A, 0x00, 0x0D, 0x0A, 0x51, 0x55, 0x49, 0x54, 0x0A, 0x21, 0x11, 0x00, 0x0C, (byte) 0xC0, (byte) 0xA8, 0x00, 0x01, 0x7C, 0x7B, 0x6F, 0x6F, 0x27, 0x18, 0x01, @@ -242,9 +240,7 @@ public void negotiateProxy_ppv2_ipv4() { assertEquals( new InetSocketAddress(InetAddresses.forString("124.123.111.111"), 443), channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDR).get()); - assertEquals(Integer.valueOf(443), channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_PORT).get()); assertEquals("192.168.0.1", channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS).get()); - assertEquals(Integer.valueOf(10008), channel.attr(SourceAddressChannelHandler.ATTR_SOURCE_PORT).get()); assertEquals( new InetSocketAddress(InetAddresses.forString("192.168.0.1"), 10008), channel.attr(SourceAddressChannelHandler.ATTR_REMOTE_ADDR).get()); From 232d7a8c968073edddae8b1cb5ae37fd2dcd0e69 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Fri, 20 Nov 2020 13:56:58 -0800 Subject: [PATCH 165/273] With 2.20 released, move to 2.3.0-snapshot --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index fb364a6d..dbbb24ff 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,4 +2,4 @@ versions_groovy=3.0.3 versions_ribbon=2.4.4 versions_netty=4.1.54.Final release.scope=patch -release.version=2.2.0-SNAPSHOT +release.version=2.3.0-SNAPSHOT From 16d644ce1209b446338f6e03fd16f0def8f3c75d Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 2 Dec 2020 10:38:32 -0800 Subject: [PATCH 166/273] zuul-core: replace VIP, origin name, and clientName with a composite object. The top level idea here is to make the VIP, Origin Name, NIWS Client name, and app name a single struct, which is passed around throughout or pooling code. Additionally, we need to get away from verbiage and idioms that come from dependencies such as NIWS, Eureka, and Ribbon. High level changes: * Replace String forms of origin name, client name, and vip with a composite OriginName class. This class is the primary key of an origin. * VIP is renamed to Target. A Target is something to be used for looking up servers to connect to. * the VIP Prefix, origin name, and client name are now renamed to niwsClientName. It is used to define IClientConfig values, as well as for use in Fast properties. * The niwsClientName is also normalized into a metric ID, usable for Atlas metrics. * useFullVip (and variants) have been un-wired through out code, and only have an effect when building the OriginName. --- .../zuul/filters/endpoint/ProxyEndpoint.java | 47 ++++--- .../connectionpool/BasicRequestStat.java | 2 +- .../connectionpool/ConnectionPoolConfig.java | 4 +- .../ConnectionPoolConfigImpl.java | 31 +++-- .../connectionpool/ConnectionPoolHandler.java | 15 ++- .../DefaultClientChannelManager.java | 55 +++++---- .../DefaultOriginChannelInitializer.java | 8 +- .../zuul/origins/BasicNettyOrigin.java | 50 ++++---- .../zuul/origins/BasicNettyOriginManager.java | 11 +- .../java/com/netflix/zuul/origins/Origin.java | 3 +- .../OriginConcurrencyExceededException.java | 2 +- .../netflix/zuul/origins/OriginManager.java | 4 +- .../com/netflix/zuul/origins/OriginName.java | 115 ++++++++++++++++++ .../origins/OriginThrottledException.java | 10 +- .../DefaultClientChannelManagerTest.java | 9 +- 15 files changed, 250 insertions(+), 116 deletions(-) create mode 100644 zuul-core/src/main/java/com/netflix/zuul/origins/OriginName.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index f2aa66c1..973ad1fb 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -31,6 +31,7 @@ import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import com.google.common.collect.Sets; +import com.google.errorprone.annotations.ForOverride; import com.netflix.client.ClientException; import com.netflix.client.config.IClientConfig; import com.netflix.client.config.IClientConfigKey; @@ -73,6 +74,7 @@ import com.netflix.zuul.origins.NettyOrigin; import com.netflix.zuul.origins.Origin; import com.netflix.zuul.origins.OriginManager; +import com.netflix.zuul.origins.OriginName; import com.netflix.zuul.passport.CurrentPassport; import com.netflix.zuul.passport.PassportState; import com.netflix.zuul.stats.status.StatusCategory; @@ -179,7 +181,8 @@ public ProxyEndpoint(final HttpRequestMessage inMesg, final ChannelHandlerContex chosenHostAddr = new AtomicReference<>(); this.sslRetryBodyCache = preCacheBodyForRetryingSslRequests(); - this.populatedSslRetryBody = SpectatorUtils.newCounter("zuul.populated.ssl.retry.body", origin == null ? "null" : origin.getVip()); + this.populatedSslRetryBody = SpectatorUtils.newCounter( + "zuul.populated.ssl.retry.body", origin == null ? "null" : origin.getName().getTarget()); this.methodBinding = methodBinding; this.requestAttemptFactory = requestAttemptFactory; @@ -430,7 +433,7 @@ private void proxyRequestToOrigin() { * Override to track your own request stats. */ protected RequestStat createRequestStat() { - BasicRequestStat basicRequestStat = new BasicRequestStat(origin.getName()); + BasicRequestStat basicRequestStat = new BasicRequestStat(); requestStats.add(basicRequestStat); RequestStat.putInSessionContext(basicRequestStat, context); return basicRequestStat; @@ -1054,18 +1057,18 @@ protected NettyOrigin getOrigin(HttpRequestMessage request) { boolean useFullName = context.getBoolean(CommonContextKeys.USE_FULL_VIP_NAME); String restClientName = useFullName ? restClientVIP : VipUtils.getVIPPrefix(restClientVIP); + NettyOrigin origin = null; if (restClientName != null) { + OriginName originName = OriginName.fromVip(restClientVIP, restClientName); // This is the normal flow - that a RoutingFilter has assigned a route - origin = getOrCreateOrigin(originManager, restClientName, restClientVIP, request.reconstructURI(), useFullName, context); + origin = getOrCreateOrigin(originManager, originName, request.reconstructURI(), context); } // Use the custom vip instead if one has been provided. - VipPair customVip = injectCustomVip(request); - if (customVip != null) { - restClientVIP = customVip.restClientVip; - restClientName = customVip.restClientName; - origin = getOrCreateOrigin(originManager, restClientName, restClientVIP, request.reconstructURI(), useFullName, context); + OriginName overrideOriginName = injectCustomOriginName(request); + if (overrideOriginName != null) { + origin = getOrCreateOrigin(originManager, overrideOriginName, request.reconstructURI(), context); } verifyOrigin(context, request, restClientName, origin); @@ -1084,29 +1087,24 @@ protected NettyOrigin getOrigin(HttpRequestMessage request) { * * Note: this method gets called in the constructor so if overloading it or any methods called within, you cannot * rely on your own constructor parameters. + * + * @return {@code null} if unused. */ @Nullable - protected VipPair injectCustomVip(HttpRequestMessage request) { + protected OriginName injectCustomOriginName(HttpRequestMessage request) { // override for custom vip injection return null; } - protected static final class VipPair { - final String restClientVip; - final String restClientName; - - public VipPair(String restClientVip, String restClientName) { - this.restClientVip = Objects.requireNonNull(restClientVip, "restClientVip"); - this.restClientName = Objects.requireNonNull(restClientName, "restClientName"); - } - } - - private NettyOrigin getOrCreateOrigin(OriginManager originManager, String name, String vip, String uri, boolean useFullVipName, SessionContext ctx) { - NettyOrigin origin = originManager.getOrigin(name, vip, uri, ctx); + private NettyOrigin getOrCreateOrigin( + OriginManager originManager, OriginName originName, String uri, SessionContext ctx) { + NettyOrigin origin = originManager.getOrigin(originName, uri, ctx); if (origin == null) { - // If no pre-registered and configured RestClient found for this VIP, then register one using default NIWS properties. - LOG.warn("Attempting to register RestClient for client that has not been configured. restClientName={}, vip={}, uri={}", name, vip, uri); - origin = originManager.createOrigin(name, vip, uri, useFullVipName, ctx); + // If no pre-registered and configured RestClient found for this VIP, then register one using default NIWS + // properties. + LOG.warn("Attempting to register RestClient for client that has not been configured. originName={}, uri={}", + originName, uri); + origin = originManager.createOrigin(originName, uri, ctx); } return origin; } @@ -1124,6 +1122,7 @@ private void verifyOrigin(SessionContext context, HttpRequestMessage request, St } } + @ForOverride protected void originNotFound(SessionContext context, String causeName) { // override for metrics or custom processing } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/BasicRequestStat.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/BasicRequestStat.java index 872656df..cf49fe1d 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/BasicRequestStat.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/BasicRequestStat.java @@ -32,7 +32,7 @@ public class BasicRequestStat implements RequestStat { private volatile boolean isFinished; private volatile Stopwatch stopwatch; - public BasicRequestStat(String clientName) { + public BasicRequestStat() { this.isFinished = false; this.stopwatch = Stopwatch.createStarted(); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolConfig.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolConfig.java index 8df0c499..ea466ab2 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolConfig.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolConfig.java @@ -16,13 +16,15 @@ package com.netflix.zuul.netty.connectionpool; +import com.netflix.zuul.origins.OriginName; + /** * Created by saroskar on 3/24/16. */ public interface ConnectionPoolConfig { /* Origin name from connection pool */ - String getOriginName(); + OriginName getOriginName(); /* Max number of requests per connection before it needs to be recycled */ int getMaxRequestsPerConnection(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolConfigImpl.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolConfigImpl.java index 0b597ac0..fa31db5b 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolConfigImpl.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolConfigImpl.java @@ -20,6 +20,8 @@ import com.netflix.client.config.IClientConfigKey; import com.netflix.config.CachedDynamicBooleanProperty; import com.netflix.config.CachedDynamicIntProperty; +import com.netflix.zuul.origins.OriginName; +import java.util.Objects; /** * Created by saroskar on 3/24/16. @@ -31,7 +33,7 @@ public class ConnectionPoolConfigImpl implements ConnectionPoolConfig { private static final int DEFAULT_IDLE_TIMEOUT = 60000; private static final int DEFAULT_MAX_CONNS_PER_HOST = 50; - private final String originName; + private final OriginName originName; private final IClientConfig clientConfig; private final CachedDynamicIntProperty MAX_REQUESTS_PER_CONNECTION; @@ -44,24 +46,31 @@ public class ConnectionPoolConfigImpl implements ConnectionPoolConfig { private final CachedDynamicBooleanProperty AUTO_READ; - public ConnectionPoolConfigImpl(final String originName, IClientConfig clientConfig) { - this.originName = originName; + public ConnectionPoolConfigImpl(final OriginName originName, IClientConfig clientConfig) { + this.originName = Objects.requireNonNull(originName, "originName"); + String niwsClientName = originName.getNiwsClientName(); this.clientConfig = clientConfig; - this.MAX_REQUESTS_PER_CONNECTION = new CachedDynamicIntProperty(originName+".netty.client.maxRequestsPerConnection", 1000); + this.MAX_REQUESTS_PER_CONNECTION = + new CachedDynamicIntProperty(niwsClientName + ".netty.client.maxRequestsPerConnection", 1000); // NOTE that the each eventloop has it's own connection pool per host, and this is applied per event-loop. - this.PER_SERVER_WATERLINE = new CachedDynamicIntProperty(originName+".netty.client.perServerWaterline", 4); + this.PER_SERVER_WATERLINE = + new CachedDynamicIntProperty(niwsClientName + ".netty.client.perServerWaterline", 4); - this.SOCKET_KEEP_ALIVE = new CachedDynamicBooleanProperty(originName+".netty.client.TcpKeepAlive", false); - this.TCP_NO_DELAY = new CachedDynamicBooleanProperty(originName+".netty.client.TcpNoDelay", false); - this.WRITE_BUFFER_HIGH_WATER_MARK = new CachedDynamicIntProperty(originName+".netty.client.WriteBufferHighWaterMark", 32 * 1024); - this.WRITE_BUFFER_LOW_WATER_MARK = new CachedDynamicIntProperty(originName+".netty.client.WriteBufferLowWaterMark", 8 * 1024); - this.AUTO_READ = new CachedDynamicBooleanProperty(originName+".netty.client.AutoRead", false); + this.SOCKET_KEEP_ALIVE = + new CachedDynamicBooleanProperty(niwsClientName + ".netty.client.TcpKeepAlive", false); + this.TCP_NO_DELAY = + new CachedDynamicBooleanProperty(niwsClientName + ".netty.client.TcpNoDelay", false); + this.WRITE_BUFFER_HIGH_WATER_MARK = + new CachedDynamicIntProperty(niwsClientName + ".netty.client.WriteBufferHighWaterMark", 32 * 1024); + this.WRITE_BUFFER_LOW_WATER_MARK = + new CachedDynamicIntProperty(niwsClientName + ".netty.client.WriteBufferLowWaterMark", 8 * 1024); + this.AUTO_READ = new CachedDynamicBooleanProperty(niwsClientName + ".netty.client.AutoRead", false); } @Override - public String getOriginName() { + public OriginName getOriginName() { return originName; } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolHandler.java index 83d2df75..922e3886 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolHandler.java @@ -19,6 +19,7 @@ import com.netflix.spectator.api.Counter; import com.netflix.zuul.netty.ChannelUtils; import com.netflix.zuul.netty.SpectatorUtils; +import com.netflix.zuul.origins.OriginName; import io.netty.channel.ChannelDuplexHandler; import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; @@ -45,17 +46,19 @@ public class ConnectionPoolHandler extends ChannelDuplexHandler public static final String METRIC_PREFIX = "connectionpool"; - private final String originName; + private final OriginName originName; private final Counter idleCounter; private final Counter inactiveCounter; private final Counter errorCounter; - public ConnectionPoolHandler(String originName) { - if (originName == null) throw new IllegalArgumentException("Null originName passed to constructor!"); + public ConnectionPoolHandler(OriginName originName) { + if (originName == null) { + throw new IllegalArgumentException("Null originName passed to constructor!"); + } this.originName = originName; - this.idleCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_idle", originName); - this.inactiveCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_inactive", originName); - this.errorCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_error", originName); + this.idleCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_idle", originName.getMetricId()); + this.inactiveCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_inactive", originName.getMetricId()); + this.errorCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_error", originName.getMetricId()); } @Override diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java index ae4d18c2..cd98b260 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java @@ -28,7 +28,6 @@ import com.netflix.loadbalancer.LoadBalancerStats; import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.ServerStats; -import com.netflix.loadbalancer.ZoneAwareLoadBalancer; import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Registry; @@ -37,6 +36,7 @@ import com.netflix.zuul.netty.SpectatorUtils; import com.netflix.zuul.netty.insights.PassportStateHttpClientHandler; import com.netflix.zuul.netty.server.OriginResponseReceiver; +import com.netflix.zuul.origins.OriginName; import com.netflix.zuul.passport.CurrentPassport; import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; @@ -50,6 +50,7 @@ import java.net.SocketAddress; import java.util.HashSet; import java.util.List; +import java.util.Objects; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; @@ -74,8 +75,7 @@ public class DefaultClientChannelManager implements ClientChannelManager { private final IClientConfig clientConfig; private final Registry spectatorRegistry; - /* DeploymentContextBasedVIP for which to maintain this connection pool */ - private final String vip; + private final OriginName originName; private static final Throwable SHUTTING_DOWN_ERR = new IllegalStateException("ConnectionPool is shutting down now."); private volatile boolean shuttingDown = false; @@ -103,10 +103,13 @@ public class DefaultClientChannelManager implements ClientChannelManager { public static final String IDLE_STATE_HANDLER_NAME = "idleStateHandler"; - public DefaultClientChannelManager(String originName, String vip, IClientConfig clientConfig, Registry spectatorRegistry) { + public DefaultClientChannelManager( + OriginName originName, IClientConfig clientConfig, Registry spectatorRegistry) { + this.originName = Objects.requireNonNull(originName, "originName"); this.loadBalancer = createLoadBalancer(clientConfig); - this.vip = vip; + String metricId = originName.getMetricId(); + this.clientConfig = clientConfig; this.spectatorRegistry = spectatorRegistry; this.perServerPools = new ConcurrentHashMap<>(200); @@ -116,21 +119,21 @@ public DefaultClientChannelManager(String originName, String vip, IClientConfig this.connPoolConfig = new ConnectionPoolConfigImpl(originName, this.clientConfig); - this.createNewConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_create", originName); - this.createConnSucceededCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_create_success", originName); - this.createConnFailedCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_create_fail", originName); - - this.closeConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_close", originName); - this.requestConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_request", originName); - this.reuseConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_reuse", originName); - this.releaseConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_release", originName); - this.alreadyClosedCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_alreadyClosed", originName); - this.connTakenFromPoolIsNotOpen = SpectatorUtils.newCounter(METRIC_PREFIX + "_fromPoolIsClosed", originName); - this.maxConnsPerHostExceededCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_maxConnsPerHostExceeded", originName); - this.closeWrtBusyConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_closeWrtBusyConnCounter", originName); - this.connEstablishTimer = PercentileTimer.get(spectatorRegistry, spectatorRegistry.createId(METRIC_PREFIX + "_createTiming", "id", originName)); - this.connsInPool = SpectatorUtils.newGauge(METRIC_PREFIX + "_inPool", originName, new AtomicInteger()); - this.connsInUse = SpectatorUtils.newGauge(METRIC_PREFIX + "_inUse", originName, new AtomicInteger()); + this.createNewConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_create", metricId); + this.createConnSucceededCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_create_success", metricId); + this.createConnFailedCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_create_fail", metricId); + + this.closeConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_close", metricId); + this.requestConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_request", metricId); + this.reuseConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_reuse", metricId); + this.releaseConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_release", metricId); + this.alreadyClosedCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_alreadyClosed", metricId); + this.connTakenFromPoolIsNotOpen = SpectatorUtils.newCounter(METRIC_PREFIX + "_fromPoolIsClosed", metricId); + this.maxConnsPerHostExceededCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_maxConnsPerHostExceeded", metricId); + this.closeWrtBusyConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_closeWrtBusyConnCounter", metricId); + this.connEstablishTimer = PercentileTimer.get(spectatorRegistry, spectatorRegistry.createId(METRIC_PREFIX + "_createTiming", "id", metricId)); + this.connsInPool = SpectatorUtils.newGauge(METRIC_PREFIX + "_inPool", metricId, new AtomicInteger()); + this.connsInUse = SpectatorUtils.newGauge(METRIC_PREFIX + "_inUse", metricId, new AtomicInteger()); } @Override @@ -152,8 +155,10 @@ protected NettyClientConnectionFactory createNettyClientConnectionFactory(Connec } protected DynamicServerListLoadBalancer createLoadBalancer(IClientConfig clientConfig) { - // Create and configure a loadbalancer for this vip. - String loadBalancerClassName = clientConfig.get(NFLoadBalancerClassName, ZoneAwareLoadBalancer.class.getName()); + // Create and configure a loadbalancer for this vip. Use a hard coded string for the LB default name to avoid + // a dependency on Ribbon classes. + String loadBalancerClassName = + clientConfig.get(NFLoadBalancerClassName, "com.netflix.loadbalancer.ZoneAwareLoadBalancer"); DynamicServerListLoadBalancer lb; try { @@ -174,7 +179,7 @@ protected void removeMissingServerConnectionPools(List oldList, List removedSet = Sets.difference(oldSet, newSet); if (!removedSet.isEmpty()) { - LOG.debug("Removing connection pools for missing servers. vip = " + this.vip + LOG.debug("Removing connection pools for missing servers. name = " + originName + ". " + removedSet.size() + " servers gone."); for (Server s : removedSet) { @@ -459,7 +464,7 @@ static InstanceInfo deriveInstanceInfoInternal(Server chosenServer) { } @VisibleForTesting - static SocketAddress pickAddressInternal(Server chosenServer, @Nullable String connPoolConfigOriginName) { + static SocketAddress pickAddressInternal(Server chosenServer, @Nullable OriginName originName) { String rawHost; int port; if (chosenServer instanceof DiscoveryEnabledServer) { @@ -482,7 +487,7 @@ static SocketAddress pickAddressInternal(Server chosenServer, @Nullable String c LOG.warn("NettyClientConnectionFactory got an unresolved address, addr: {}", rawHost); Counter unresolvedDiscoveryHost = SpectatorUtils.newCounter( "unresolvedDiscoveryHost", - connPoolConfigOriginName == null ? "unknownOrigin" : connPoolConfigOriginName); + originName == null ? "unknownOrigin" : originName.getTarget()); unresolvedDiscoveryHost.increment(); try { serverAddr = new InetSocketAddress(rawHost, port); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultOriginChannelInitializer.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultOriginChannelInitializer.java index 71610dc3..b16b69ef 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultOriginChannelInitializer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultOriginChannelInitializer.java @@ -47,10 +47,10 @@ public class DefaultOriginChannelInitializer extends OriginChannelInitializer { public DefaultOriginChannelInitializer(ConnectionPoolConfig connPoolConfig, Registry spectatorRegistry) { this.connectionPoolConfig = connPoolConfig; - final String originName = connectionPoolConfig.getOriginName(); - this.connectionPoolHandler = new ConnectionPoolHandler(originName); - this.httpMetricsHandler = new HttpMetricsChannelHandler(spectatorRegistry, "client", originName); - this.nettyLogger = new LoggingHandler("zuul.origin.nettylog." + originName, LogLevel.INFO); + String niwsClientName = connectionPoolConfig.getOriginName().getNiwsClientName(); + this.connectionPoolHandler = new ConnectionPoolHandler(connectionPoolConfig.getOriginName()); + this.httpMetricsHandler = new HttpMetricsChannelHandler(spectatorRegistry, "client", niwsClientName); + this.nettyLogger = new LoggingHandler("zuul.origin.nettylog." + niwsClientName, LogLevel.INFO); this.sslContext = getClientSslContext(spectatorRegistry); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java index c8ace6b9..fc2baadd 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java @@ -48,6 +48,7 @@ import io.netty.channel.EventLoop; import io.netty.util.concurrent.Promise; import java.net.InetAddress; +import java.util.Objects; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; @@ -60,8 +61,7 @@ */ public class BasicNettyOrigin implements NettyOrigin { - private final String name; - private final String vip; + private final OriginName originName; private final Registry registry; private final IClientConfig config; private final ClientChannelManager clientChannelManager; @@ -72,37 +72,38 @@ public class BasicNettyOrigin implements NettyOrigin { private final CachedDynamicIntProperty concurrencyMax; private final CachedDynamicBooleanProperty concurrencyProtectionEnabled; - public BasicNettyOrigin(String name, String vip, Registry registry) { - this.name = name; - this.vip = vip; + public BasicNettyOrigin(OriginName originName, Registry registry) { + this.originName = Objects.requireNonNull(originName, "originName"); this.registry = registry; - this.config = setupClientConfig(name); - this.clientChannelManager = new DefaultClientChannelManager(name, vip, config, registry); + this.config = setupClientConfig(originName); + this.clientChannelManager = new DefaultClientChannelManager(originName, config, registry); this.clientChannelManager.init(); this.requestAttemptFactory = new NettyRequestAttemptFactory(); - this.concurrentRequests = SpectatorUtils.newGauge("zuul.origin.concurrent.requests", name, new AtomicInteger(0)); - this.rejectedRequests = SpectatorUtils.newCounter("zuul.origin.rejected.requests", name); - this.concurrencyMax = new CachedDynamicIntProperty("zuul.origin." + name + ".concurrency.max.requests", 200); - this.concurrencyProtectionEnabled = new CachedDynamicBooleanProperty("zuul.origin." + name + ".concurrency.protect.enabled", true); + String niwsClientName = getName().getNiwsClientName(); + this.concurrentRequests = + SpectatorUtils.newGauge( + "zuul.origin.concurrent.requests", niwsClientName, new AtomicInteger(0)); + this.rejectedRequests = + SpectatorUtils.newCounter("zuul.origin.rejected.requests", niwsClientName); + this.concurrencyMax = + new CachedDynamicIntProperty("zuul.origin." + niwsClientName + ".concurrency.max.requests", 200); + this.concurrencyProtectionEnabled = + new CachedDynamicBooleanProperty("zuul.origin." + niwsClientName + ".concurrency.protect.enabled", true); } - protected IClientConfig setupClientConfig(String name) { + protected IClientConfig setupClientConfig(OriginName originName) { // Get the NIWS properties for this Origin. - IClientConfig niwsClientConfig = DefaultClientConfigImpl.getClientConfigWithDefaultValues(name); - niwsClientConfig.set(CommonClientConfigKey.ClientClassName, name); - niwsClientConfig.loadProperties(name); + IClientConfig niwsClientConfig = + DefaultClientConfigImpl.getClientConfigWithDefaultValues(originName.getNiwsClientName()); + niwsClientConfig.set(CommonClientConfigKey.ClientClassName, originName.getNiwsClientName()); + niwsClientConfig.loadProperties(originName.getNiwsClientName()); return niwsClientConfig; } @Override - public String getName() { - return name; - } - - @Override - public String getVip() { - return vip; + public OriginName getName() { + return originName; } @Override @@ -122,7 +123,6 @@ public Promise connectToOrigin( return clientChannelManager.acquire(eventLoop, null, passport, chosenServer, chosenHostAddr); } - @Override public int getMaxRetriesForRequest(SessionContext context) { return config.get(CommonClientConfigKey.MaxAutoRetriesNextServer, 0); } @@ -167,8 +167,8 @@ public ExecutionContext getExecutionContext(HttpRequestMessage zuulRequest) { } final ExecutionContext context = new ExecutionContext<>(zuulRequest, overriddenClientConfig, this.config, null); - context.put("vip", getVip()); - context.put("clientName", getName()); + context.put("vip", getName().getTarget()); + context.put("clientName", getName().getNiwsClientName()); zuulRequest.getContext().set(CommonContextKeys.REST_EXECUTION_CONTEXT, context); execCtx = context; diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOriginManager.java b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOriginManager.java index b231d6f6..2ababc88 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOriginManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOriginManager.java @@ -34,7 +34,7 @@ public class BasicNettyOriginManager implements OriginManager { private final Registry registry; - private final ConcurrentHashMap originMappings; + private final ConcurrentHashMap originMappings; @Inject public BasicNettyOriginManager(Registry registry) { @@ -43,12 +43,13 @@ public BasicNettyOriginManager(Registry registry) { } @Override - public BasicNettyOrigin getOrigin(String name, String vip, String uri, SessionContext ctx) { - return originMappings.computeIfAbsent(name, n -> createOrigin(name, vip, uri, false, ctx)); + public BasicNettyOrigin getOrigin(OriginName originName, String uri, SessionContext ctx) { + return originMappings.computeIfAbsent(originName, n -> createOrigin(originName, uri, ctx)); } @Override - public BasicNettyOrigin createOrigin(String name, String vip, String uri, boolean useFullVipName, SessionContext ctx) { - return new BasicNettyOrigin(name, vip, registry); + public BasicNettyOrigin createOrigin( + OriginName originName, String uri, SessionContext ctx) { + return new BasicNettyOrigin(originName, registry); } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/Origin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/Origin.java index 2e73c9ac..6927978f 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/Origin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/Origin.java @@ -21,8 +21,7 @@ * Time: 3:14 PM */ public interface Origin { - String getName(); - String getVip(); + OriginName getName(); boolean isAvailable(); boolean isCold(); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/OriginConcurrencyExceededException.java b/zuul-core/src/main/java/com/netflix/zuul/origins/OriginConcurrencyExceededException.java index 33e6f655..1c9c2a73 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/OriginConcurrencyExceededException.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/OriginConcurrencyExceededException.java @@ -21,7 +21,7 @@ public class OriginConcurrencyExceededException extends OriginThrottledException { - public OriginConcurrencyExceededException(String originName) + public OriginConcurrencyExceededException(OriginName originName) { super(originName, "Max concurrent requests on origin exceeded", ZuulStatusCategory.FAILURE_LOCAL_THROTTLED_ORIGIN_CONCURRENCY); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/OriginManager.java b/zuul-core/src/main/java/com/netflix/zuul/origins/OriginManager.java index c50e5d41..f3b0817b 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/OriginManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/OriginManager.java @@ -24,7 +24,7 @@ */ public interface OriginManager { - T getOrigin(String name, String vip, String uri, SessionContext ctx); + T getOrigin(OriginName originName, String uri, SessionContext ctx); - T createOrigin(String name, String vip, String uri, boolean useFullVipName, SessionContext ctx); + T createOrigin(OriginName originName, String uri, SessionContext ctx); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/OriginName.java b/zuul-core/src/main/java/com/netflix/zuul/origins/OriginName.java new file mode 100644 index 00000000..49591483 --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/OriginName.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.origins; + +import com.netflix.zuul.util.VipUtils; +import java.util.Locale; +import java.util.Objects; + +public final class OriginName { + /** + * The NIWS client name of the origin. This is typically used in metrics and for configuration of NIWS + * {@link com.netflix.client.config.IClientConfig} objects. + */ + private final String niwsClientName; + + /** + * This should not be used in {@link #equals} or {@link #hashCode} as it is already covered by + * {@link #niwsClientName}. + */ + private final String metricId; + + /** + * The target to connect to, used for name resolution. This is typically the VIP. + */ + private final String target; + /** + * The authority of this origin. Usually this is the Application name of origin. It is primarily + * used for establishing a secure connection, as well as logging. + */ + private final String authority; + /** + * Indicates if the authority comes from a trusted source. + */ + private final boolean authorityTrusted; + + public static OriginName fromVip(String vip) { + return fromVip(vip, vip); + } + + public static OriginName fromVip(String vip, String niwsClientName) { + return new OriginName(niwsClientName, vip, VipUtils.extractUntrustedAppNameFromVIP(vip), false); + } + + private OriginName(String niwsClientName, String target, String authority, boolean authorityTrusted) { + this.niwsClientName = Objects.requireNonNull(niwsClientName, "niwsClientName"); + this.metricId = niwsClientName.toLowerCase(Locale.ROOT); + this.target = Objects.requireNonNull(target, "target"); + this.authority = Objects.requireNonNull(authority, "authority"); + this.authorityTrusted = authorityTrusted; + } + + /** + * This is typically the VIP for the given Origin. + */ + public String getTarget() { + return target; + } + + /** + * Returns the niwsClientName. This is normally used for interaction with NIWS, and should be used without prior + * knowledge that the value will be used in NIWS libraries. + */ + public String getNiwsClientName() { + return niwsClientName; + } + + /** + * Returns the identifier for this this metric name. This may be different than any of the other + * fields; currently it is equivalent to the lowercased {@link #getNiwsClientName()}. + */ + public String getMetricId() { + return metricId; + } + + @Override + public boolean equals(Object o) { + if (!(o instanceof OriginName)) { + return false; + } + OriginName that = (OriginName) o; + return authorityTrusted == that.authorityTrusted + && Objects.equals(niwsClientName, that.niwsClientName) + && Objects.equals(target, that.target) + && Objects.equals(authority, that.authority); + } + + @Override + public int hashCode() { + return Objects.hash(niwsClientName, target, authority, authorityTrusted); + } + + @Override + public String toString() { + return "OriginName{" + + "niwsClientName='" + niwsClientName + '\'' + + ", target='" + target + '\'' + + ", authority='" + authority + '\'' + + ", authorityTrusted=" + authorityTrusted + + '}'; + } +} diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/OriginThrottledException.java b/zuul-core/src/main/java/com/netflix/zuul/origins/OriginThrottledException.java index 2a33eba4..8b24a5d4 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/OriginThrottledException.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/OriginThrottledException.java @@ -18,23 +18,23 @@ import com.netflix.zuul.exception.ZuulException; import com.netflix.zuul.stats.status.StatusCategory; +import java.util.Objects; public abstract class OriginThrottledException extends ZuulException { - private final String originName; + private final OriginName originName; private final StatusCategory statusCategory; - public OriginThrottledException(String originName, String msg, StatusCategory statusCategory) + public OriginThrottledException(OriginName originName, String msg, StatusCategory statusCategory) { // Ensure this exception does not fill its stacktrace as causes too much load. super(msg + ", origin=" + originName, true); - this.originName = originName; + this.originName = Objects.requireNonNull(originName, "originName"); this.statusCategory = statusCategory; this.setStatusCode(503); } - public String getOriginName() - { + public OriginName getOriginName() { return originName; } diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java index 51dfbf22..90fdc1f9 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java @@ -26,6 +26,7 @@ import com.netflix.appinfo.InstanceInfo.Builder; import com.netflix.loadbalancer.Server; import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; +import com.netflix.zuul.origins.OriginName; import java.net.InetSocketAddress; import java.net.SocketAddress; import org.junit.Test; @@ -70,7 +71,7 @@ public void pickAddressInternal_discovery() { Builder.newBuilder().setAppName("app").setHostName("192.168.0.1").setPort(443).build(); Server s = new DiscoveryEnabledServer(instanceInfo, true); - SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, "originname"); + SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); InetSocketAddress socketAddress = (InetSocketAddress) addr; @@ -84,7 +85,7 @@ public void pickAddressInternal_discovery_unresolved() { Builder.newBuilder().setAppName("app").setHostName("localhost").setPort(443).build(); Server s = new DiscoveryEnabledServer(instanceInfo, true); - SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, "originname"); + SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); InetSocketAddress socketAddress = (InetSocketAddress) addr; @@ -97,7 +98,7 @@ public void pickAddressInternal_discovery_unresolved() { public void pickAddressInternal_nonDiscovery() { Server s = new Server("192.168.0.1", 443); - SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, "originname"); + SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); InetSocketAddress socketAddress = (InetSocketAddress) addr; @@ -109,7 +110,7 @@ public void pickAddressInternal_nonDiscovery() { public void pickAddressInternal_nonDiscovery_unresolved() { Server s = new Server("localhost", 443); - SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, "originname"); + SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); InetSocketAddress socketAddress = (InetSocketAddress) addr; From 6f4d9ceb9c01864e3298bdbb27959f3e102f5cea Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 3 Dec 2020 14:47:38 -0800 Subject: [PATCH 167/273] zuul-core: record the live netty buffer usage, rather than Java's --- .../com/netflix/zuul/netty/server/Server.java | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java index e0205c3f..dec677e4 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java @@ -16,6 +16,8 @@ package com.netflix.zuul.netty.server; +import static com.google.common.base.Preconditions.checkNotNull; + import com.google.common.annotations.VisibleForTesting; import com.netflix.appinfo.InstanceInfo; import com.netflix.config.DynamicBooleanProperty; @@ -25,12 +27,15 @@ import com.netflix.netty.common.status.ServerStatusManager; import com.netflix.spectator.api.Registry; import com.netflix.spectator.api.Spectator; +import com.netflix.spectator.api.patterns.PolledMeter; import com.netflix.zuul.Attrs; import com.netflix.zuul.monitoring.ConnTimer; import io.netty.bootstrap.ServerBootstrap; +import io.netty.buffer.ByteBufAllocator; +import io.netty.buffer.ByteBufAllocatorMetric; +import io.netty.buffer.ByteBufAllocatorMetricProvider; import io.netty.channel.Channel; import io.netty.channel.ChannelFuture; -import io.netty.channel.ChannelHandler.Sharable; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.channel.ChannelInitializer; @@ -55,28 +60,25 @@ import io.netty.util.concurrent.EventExecutor; import io.netty.util.concurrent.EventExecutorChooserFactory; import io.netty.util.concurrent.ThreadPerTaskExecutor; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.Objects; -import java.util.Set; -import java.util.concurrent.atomic.AtomicReference; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.net.InetSocketAddress; import java.net.SocketAddress; import java.nio.channels.spi.SelectorProvider; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.Objects; +import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; - -import static com.google.common.base.Preconditions.checkNotNull; +import java.util.concurrent.atomic.AtomicReference; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @@ -273,6 +275,16 @@ private ChannelFuture setupServerBootstrap( // Bind and start to accept incoming connections. ChannelFuture bindFuture = serverBootstrap.bind(listenAddress); + + ByteBufAllocator alloc = bindFuture.channel().alloc(); + if (alloc instanceof ByteBufAllocatorMetricProvider) { + ByteBufAllocatorMetric metrics = ((ByteBufAllocatorMetricProvider) alloc).metric(); + PolledMeter.using(registry).withId(registry.createId("zuul.nettybuffermem.live", "type", "heap")) + .monitorValue(metrics, ByteBufAllocatorMetric::usedHeapMemory); + PolledMeter.using(registry).withId(registry.createId("zuul.nettybuffermem.live", "type", "direct")) + .monitorValue(metrics, ByteBufAllocatorMetric::usedDirectMemory); + } + try { return bindFuture.sync(); } catch (Exception e) { From edfc6f98c5fa20db2b8930b6be20a5587c5bddfe Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Tue, 8 Dec 2020 10:45:13 -0800 Subject: [PATCH 168/273] Fix exception when XFF port is present, but empty --- .../zuul/message/http/HttpRequestMessageImpl.java | 2 +- .../zuul/message/http/HttpRequestMessageImplTest.java | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java index 490eb77a..89451936 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java @@ -534,7 +534,7 @@ static int getOriginalPort(SessionContext context, Headers headers, int serverPo return ((InetSocketAddress) context.get(CommonContextKeys.PROXY_PROTOCOL_DESTINATION_ADDRESS)).getPort(); } String portStr = headers.getFirst(HttpHeaderNames.X_FORWARDED_PORT); - if (portStr != null) { + if (portStr != null && !portStr.isEmpty()) { return Integer.parseInt(portStr); } // Check if port was specified on a Host header. diff --git a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java index d4b3f432..79ed9c64 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/message/http/HttpRequestMessageImplTest.java @@ -341,6 +341,15 @@ public void getOriginalPort_fallsBackOnUnbracketedIpv6Address() throws URISyntax assertEquals(9999, HttpRequestMessageImpl.getOriginalPort(new SessionContext(), headers, 9999)); } + @Test + public void getOriginalPort_EmptyXFFPort() throws URISyntaxException { + Headers headers = new Headers(); + headers.add(HttpHeaderNames.X_FORWARDED_PORT, ""); + + // Default to using server port + assertEquals(9999, HttpRequestMessageImpl.getOriginalPort(new SessionContext(), headers, 9999)); + } + @Test public void getOriginalPort_respectsProxyProtocol() throws URISyntaxException { SessionContext context = new SessionContext(); From f94164b786f98b3e3c0ceeabffcc0d42b536c93b Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 8 Dec 2020 11:03:09 -0800 Subject: [PATCH 169/273] all: bump to netty 4.1.55 --- gradle.properties | 2 +- zuul-core/build.gradle | 2 +- zuul-core/dependencies.lock | 120 +++++++++++++++---------------- zuul-groovy/dependencies.lock | 102 +++++++++++++------------- zuul-guice/dependencies.lock | 102 +++++++++++++------------- zuul-processor/dependencies.lock | 116 +++++++++++++++--------------- zuul-sample/dependencies.lock | 116 +++++++++++++++--------------- 7 files changed, 280 insertions(+), 280 deletions(-) diff --git a/gradle.properties b/gradle.properties index dbbb24ff..b93f7ecf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ versions_groovy=3.0.3 versions_ribbon=2.4.4 -versions_netty=4.1.54.Final +versions_netty=4.1.55.Final release.scope=patch release.version=2.3.0-SNAPSHOT diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index 4a795a80..adb5e5ba 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -34,7 +34,7 @@ dependencies { implementation "io.netty:netty-codec-haproxy:${versions_netty}" implementation "io.netty:netty-transport-native-epoll:${versions_netty}:linux-x86_64" implementation "io.netty:netty-transport-native-kqueue:${versions_netty}:osx-x86_64" - runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.34.Final" + runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.35.Final" implementation 'io.perfmark:perfmark-api:0.23.0' implementation 'javax.inject:javax.inject:1' diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 52999651..8c3c4db3 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -37,31 +37,31 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -128,31 +128,31 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -220,34 +220,34 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.34.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -265,7 +265,7 @@ "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.6.0" + "locked": "3.6.28" }, "org.openjdk.jmh:jmh-core": { "locked": "1.26" @@ -321,34 +321,34 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.34.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -407,31 +407,31 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -449,7 +449,7 @@ "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.6.0" + "locked": "3.6.28" }, "org.slf4j:slf4j-api": { "locked": "1.7.25" @@ -496,34 +496,34 @@ "locked": "0.110.0" }, "io.netty:netty-buffer": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.34.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -541,7 +541,7 @@ "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.6.0" + "locked": "3.6.28" }, "org.slf4j:slf4j-api": { "locked": "1.7.30" diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index 251fe066..ceae19e0 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -70,37 +70,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -197,37 +197,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -334,61 +334,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.34.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -421,7 +421,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.6.0" + "locked": "3.6.28" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -516,61 +516,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.34.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -680,37 +680,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -725,7 +725,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.6.0" + "locked": "3.6.28" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -817,61 +817,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.34.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -904,7 +904,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.6.0" + "locked": "3.6.28" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 323d2306..827fe642 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -73,37 +73,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -200,37 +200,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -343,61 +343,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.34.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -427,7 +427,7 @@ "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.6.0" + "locked": "3.6.28" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -528,61 +528,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.34.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -695,37 +695,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -737,7 +737,7 @@ "locked": "4.13" }, "org.mockito:mockito-core": { - "locked": "3.6.0" + "locked": "3.6.28" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -838,61 +838,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.34.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -922,7 +922,7 @@ "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.6.0" + "locked": "3.6.28" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index fc158cab..dcd681e9 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -70,37 +70,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -194,37 +194,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -328,61 +328,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.34.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -504,61 +504,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.34.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -678,61 +678,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.34.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -839,37 +839,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -970,61 +970,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.34.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 69764e31..3e8dd57c 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -86,61 +86,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.34.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -259,37 +259,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -404,37 +404,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -567,61 +567,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.34.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -778,61 +778,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.34.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -963,37 +963,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1120,61 +1120,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.34.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.54.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ From 517e0c136187ba5105f4c9b989314efbea54d696 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 9 Dec 2020 14:09:21 -0800 Subject: [PATCH 170/273] zuul-core: always cache full bodies, regardless of SSL In the scope of Retrying POST bodies in response to 503's Zuul keeps a copy of the body to send again in certain circumstances. Normally, if the body has not been sent to the origin, and Zuul has not sent anything to the client, Zuul will compromise the HTTP spec and consider POSTs retryable. (Too many things depend on this wrong behavior; it would risky to change.) In the current code, Netty's SSL handler will mutate the body when sending it, so the ProxyEndpoint will keep a pristine copy of the body assuming the full body is present. In the case SSL was not requested, Zuul depends on Netty not clearing the buffers as it sends, and thus doesn't keep the copy around. Internally at Netflix, we want to automatically upgrade to SSL if possible, but that is only after the ProxyEndpoint code has decided to cache or not. An Origin may not explicit ask for SSL, but eventually use it, so it is too late to set the NIWS `IsSecure` bit and cache the body. (Requesting SSL is per Origin, using SSL is per Server). To ensure that 503's are retryable, and that we don't depend on Netty's HTTP subtleties, this change unconditionally caches the body, and pessimistically assumes that the body could be mutated. This allows for auto SSL upgrades later down the call chain as well. Sorry, no tests. This code definitely warrants a test, but it is ridiculously difficult to add one. I'm taking out a loan on our tech debt, which I hope to one day pay back. --- .../zuul/filters/endpoint/ProxyEndpoint.java | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 973ad1fb..5fcc65ee 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -145,11 +145,11 @@ public class ProxyEndpoint extends SyncZuulFilterAdapter requestStats = new ArrayList<>(); protected RequestStat currentRequestStat; - private final byte[] sslRetryBodyCache; + private final byte[] retryBodyCache; public static final Set IDEMPOTENT_HTTP_METHODS = Sets.newHashSet("GET", "HEAD", "OPTIONS"); private static final DynamicIntegerSetProperty RETRIABLE_STATUSES_FOR_IDEMPOTENT_METHODS = new DynamicIntegerSetProperty("zuul.retry.allowed.statuses.idempotent", "500"); - private static final DynamicBooleanProperty ENABLE_CACHING_SSL_BODIES = new DynamicBooleanProperty("zuul.cache.ssl.bodies", true); + private static final DynamicBooleanProperty ENABLE_CACHING_BODIES = new DynamicBooleanProperty("zuul.cache.bodies", true); private static final CachedDynamicIntProperty MAX_OUTBOUND_READ_TIMEOUT = new CachedDynamicIntProperty("zuul.origin.readtimeout.max", 90 * 1000); @@ -159,7 +159,7 @@ public class ProxyEndpoint extends SyncZuulFilterAdapter(); chosenHostAddr = new AtomicReference<>(); - this.sslRetryBodyCache = preCacheBodyForRetryingSslRequests(); - this.populatedSslRetryBody = SpectatorUtils.newCounter( - "zuul.populated.ssl.retry.body", origin == null ? "null" : origin.getName().getTarget()); + this.retryBodyCache = preCacheBodyForRetryingRequests(); + this.populatedRetryBody = SpectatorUtils.newCounter( + "zuul.populated.retry.body", origin == null ? "null" : origin.getName().getTarget()); this.methodBinding = methodBinding; this.requestAttemptFactory = requestAttemptFactory; @@ -565,22 +565,24 @@ private void onOriginConnectFailed(Throwable cause) { } } - private byte[] preCacheBodyForRetryingSslRequests() { + private byte[] preCacheBodyForRetryingRequests() { // Netty SSL handler clears body ByteBufs, so we need to cache the body if we want to retry POSTs - if (ENABLE_CACHING_SSL_BODIES.get() && origin != null && - // only cache requests if already buffered - origin.getClientConfig().get(IClientConfigKey.Keys.IsSecure, false) && zuulRequest.hasCompleteBody()) { + // Followup: We expect most origin connections to be secure, so it's okay to unconditionally cache here. + // Additionally, it's risky to assume the plaintext handlers won't clear the body (they do), so just pay the + // cost caching regardless. + if (ENABLE_CACHING_BODIES.get() && origin != null && zuulRequest.hasCompleteBody()) { + // only cache requests if already buffered return zuulRequest.getBody(); } return null; } private void repopulateRetryBody() { - // if SSL origin request body is cached and has been cleared by Netty SslHandler, set it from cache // note: it's not null but is empty because the content chunks exist but the actual readable bytes are 0 - if (sslRetryBodyCache != null && attemptNum > 1 && zuulRequest.getBody() != null && zuulRequest.getBody().length == 0) { - zuulRequest.setBody(sslRetryBodyCache); - populatedSslRetryBody.increment(); + if (retryBodyCache != null && attemptNum > 1 + && zuulRequest.getBodyLength() == 0 && zuulRequest.getBody() != null) { + zuulRequest.setBody(retryBodyCache); + populatedRetryBody.increment(); } } From 203d851240ba1371224f09e4cfba370164330a15 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 10 Dec 2020 15:19:30 -0800 Subject: [PATCH 171/273] zuul-core: add back in the plaintext cache avoidance for retries --- .../zuul/filters/endpoint/ProxyEndpoint.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 5fcc65ee..f0dfbea4 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -35,6 +35,7 @@ import com.netflix.client.ClientException; import com.netflix.client.config.IClientConfig; import com.netflix.client.config.IClientConfigKey; +import com.netflix.client.config.IClientConfigKey.Keys; import com.netflix.config.CachedDynamicIntProperty; import com.netflix.config.DynamicBooleanProperty; import com.netflix.config.DynamicIntegerSetProperty; @@ -102,7 +103,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; import java.util.StringTokenizer; import java.util.concurrent.atomic.AtomicReference; @@ -150,6 +150,8 @@ public class ProxyEndpoint extends SyncZuulFilterAdapter IDEMPOTENT_HTTP_METHODS = Sets.newHashSet("GET", "HEAD", "OPTIONS"); private static final DynamicIntegerSetProperty RETRIABLE_STATUSES_FOR_IDEMPOTENT_METHODS = new DynamicIntegerSetProperty("zuul.retry.allowed.statuses.idempotent", "500"); private static final DynamicBooleanProperty ENABLE_CACHING_BODIES = new DynamicBooleanProperty("zuul.cache.bodies", true); + private static final DynamicBooleanProperty ENABLE_CACHING_PLAINTEXT_BODIES = + new DynamicBooleanProperty("zuul.cache.bodies.plaintext", false); private static final CachedDynamicIntProperty MAX_OUTBOUND_READ_TIMEOUT = new CachedDynamicIntProperty("zuul.origin.readtimeout.max", 90 * 1000); @@ -571,8 +573,13 @@ private byte[] preCacheBodyForRetryingRequests() { // Additionally, it's risky to assume the plaintext handlers won't clear the body (they do), so just pay the // cost caching regardless. if (ENABLE_CACHING_BODIES.get() && origin != null && zuulRequest.hasCompleteBody()) { - // only cache requests if already buffered - return zuulRequest.getBody(); + // This second check to see if the origin is secure is a kludge to avoid spending too much CPU on + // plaintext requests. Unfortunately, the cost of cahcing the body is non trivial, and as of the + // current implementation, it's only technically required for SSL. See comment above. + if (origin.getClientConfig().get(Keys.IsSecure, false) || ENABLE_CACHING_PLAINTEXT_BODIES.get()) { + // only cache requests if already buffered + return zuulRequest.getBody(); + } } return null; } From b95759670ec802d88c40778025c852572d1225c4 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 11 Dec 2020 16:51:47 -0800 Subject: [PATCH 172/273] zuul-core: selectively increase precision on conn timer --- .../netflix/zuul/monitoring/ConnTimer.java | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java index 1a6e9471..bec7c7c9 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java @@ -16,6 +16,7 @@ package com.netflix.zuul.monitoring; +import com.netflix.config.DynamicBooleanProperty; import com.netflix.spectator.api.Id; import com.netflix.spectator.api.Registry; import com.netflix.spectator.api.histogram.PercentileTimer; @@ -31,12 +32,16 @@ import java.util.Objects; import java.util.Set; import java.util.concurrent.TimeUnit; +import javax.annotation.Nullable; /** * A timer for connection stats. Not thread-safe. */ public final class ConnTimer { + private static final DynamicBooleanProperty PRECISE_TIMING = + new DynamicBooleanProperty("zuul.conn.precise_timing", false); + private static final AttributeKey CONN_TIMER = AttributeKey.newInstance("zuul.conntimer"); private static final Duration MIN_CONN_TIMING = Duration.ofNanos(1024); @@ -46,6 +51,8 @@ public final class ConnTimer { private final Channel chan; // TODO(carl-mastrangelo): make this changable. private final Id metricBase; + @Nullable + private final Id preciseMetricBase; private final Map timings = new LinkedHashMap<>(); @@ -53,6 +60,11 @@ private ConnTimer(Registry registry, Channel chan, Id metricBase) { this.registry = Objects.requireNonNull(registry); this.chan = Objects.requireNonNull(chan); this.metricBase = Objects.requireNonNull(metricBase); + if (PRECISE_TIMING.get()) { + preciseMetricBase = registry.createId(metricBase.name() + ".pct").withTags(metricBase.tags()); + } else { + preciseMetricBase = null; + } } public static ConnTimer install(Channel chan, Registry registry, Id metricBase) { @@ -85,6 +97,7 @@ public void record(Long now, String event) { for (Key key : dims.keySet()) { dimTags.put(key.name(), String.valueOf(key.get(dims))); } + dimTags.put("to", event); // Note: this is effectively O(n^2) because it will be called for each event in the connection // setup. It should be bounded to at most 10 or so. @@ -95,11 +108,15 @@ public void record(Long now, String event) { // it. return; } - PercentileTimer.builder(registry) - .withId(metricBase.withTags(dimTags).withTags("from", k, "to", event)) - .withRange(MIN_CONN_TIMING, MAX_CONN_TIMING) - .build() + registry.timer(metricBase.withTags(dimTags).withTags("from", k)) .record(durationNanos, TimeUnit.NANOSECONDS); + if (preciseMetricBase != null) { + PercentileTimer.builder(registry) + .withId(preciseMetricBase.withTags(dimTags).withTags("from", k)) + .withRange(MIN_CONN_TIMING, MAX_CONN_TIMING) + .build() + .record(durationNanos, TimeUnit.NANOSECONDS); + } }); timings.put(event, now); } From f234c84d76b7e25020ae55e9458eed91a600d63b Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Mon, 14 Dec 2020 14:12:39 -0800 Subject: [PATCH 173/273] combine injection condition so only one origin is ever created and/or fetched --- .../zuul/filters/endpoint/ProxyEndpoint.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index f0dfbea4..57ca4664 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -1066,18 +1066,16 @@ protected NettyOrigin getOrigin(HttpRequestMessage request) { boolean useFullName = context.getBoolean(CommonContextKeys.USE_FULL_VIP_NAME); String restClientName = useFullName ? restClientVIP : VipUtils.getVIPPrefix(restClientVIP); - NettyOrigin origin = null; - if (restClientName != null) { - OriginName originName = OriginName.fromVip(restClientVIP, restClientName); - // This is the normal flow - that a RoutingFilter has assigned a route - origin = getOrCreateOrigin(originManager, originName, request.reconstructURI(), context); - } - - // Use the custom vip instead if one has been provided. + // allow implementors to override the origin with custom injection logic OriginName overrideOriginName = injectCustomOriginName(request); if (overrideOriginName != null) { + // Use the custom vip instead if one has been provided. origin = getOrCreateOrigin(originManager, overrideOriginName, request.reconstructURI(), context); + } else if (restClientName != null) { + // This is the normal flow - that a RoutingFilter has assigned a route + OriginName originName = OriginName.fromVip(restClientVIP, restClientName); + origin = getOrCreateOrigin(originManager, originName, request.reconstructURI(), context); } verifyOrigin(context, request, restClientName, origin); From 4dca895301357811743a53159b1965ee1ef2738f Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 15 Dec 2020 10:43:55 -0800 Subject: [PATCH 174/273] zuul-core: add an active connection counter for Zuul --- .../netflix/zuul/monitoring/ConnCounter.java | 114 ++++++++++++++++++ .../com/netflix/zuul/netty/server/Server.java | 2 + .../zuul/monitoring/ConnCounterTest.java | 60 +++++++++ 3 files changed, 176 insertions(+) create mode 100644 zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java create mode 100644 zuul-core/src/test/java/com/netflix/zuul/monitoring/ConnCounterTest.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java new file mode 100644 index 00000000..a031b3ee --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java @@ -0,0 +1,114 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.monitoring; + +import com.netflix.spectator.api.Gauge; +import com.netflix.spectator.api.Id; +import com.netflix.spectator.api.Registry; +import com.netflix.zuul.Attrs; +import com.netflix.zuul.Attrs.Key; +import com.netflix.zuul.netty.server.Server; +import io.netty.channel.Channel; +import io.netty.util.AttributeKey; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * A counter for connection stats. Not thread-safe. + */ +public final class ConnCounter { + + private static final Logger logger = LoggerFactory.getLogger(ConnCounter.class); + + private static final AttributeKey CONN_COUNTER = AttributeKey.newInstance("zuul.conncounter"); + + private final Registry registry; + private final Channel chan; + private final Id metricBase; + + private String lastCountKey; + + private final Map counts = new HashMap<>(); + + private ConnCounter(Registry registry, Channel chan, Id metricBase) { + this.registry = Objects.requireNonNull(registry); + this.chan = Objects.requireNonNull(chan); + this.metricBase = Objects.requireNonNull(metricBase); + } + + public static ConnCounter install(Channel chan, Registry registry, Id metricBase) { + ConnCounter counter = new ConnCounter(registry, chan, metricBase); + if (!chan.attr(CONN_COUNTER).compareAndSet(null, counter)) { + throw new IllegalStateException("pre-existing counter already present"); + } + return counter; + } + + public static ConnCounter from(Channel chan) { + Objects.requireNonNull(chan); + ConnCounter counter = chan.attr(CONN_COUNTER).get(); + if (counter != null) { + return counter; + } + if (chan.parent() != null && (counter = chan.parent().attr(CONN_COUNTER).get()) != null) { + return counter; + } + throw new IllegalStateException("no counter on channel"); + } + + public void increment(String event) { + Objects.requireNonNull(event); + if (counts.containsKey(event)) { + // TODO(carl-mastrangelo): make this throw IllegalStateException after verifying this doesn't happen. + logger.warn("Duplicate conn counter increment {}", event); + return; + } + Attrs dims = chan.attr(Server.CONN_DIMENSIONS).get(); + Set> dimKeys = dims.keySet(); + Map dimTags = new HashMap<>(dimKeys.size()); + for (Key key : dims.keySet()) { + dimTags.put(key.name(), String.valueOf(key.get(dims))); + } + dimTags.put("from", lastCountKey != null ? lastCountKey : "nascent"); + lastCountKey = event; + Id id = registry.createId(metricBase.name() + '.' + event).withTags(metricBase.tags()).withTags(dimTags); + Gauge gauge = registry.gauge(id); + synchronized (gauge) { + double current = gauge.value(); + gauge.set(Double.isNaN(current) ? 1 : current + 1); + } + counts.put(event, gauge); + } + + public void decrement(String event) { + Objects.requireNonNull(event); + Gauge gauge = counts.remove(event); + if (gauge == null) { + // TODO(carl-mastrangelo): make this throw IllegalStateException after verifying this doesn't happen. + logger.warn("Missing conn counter increment {}", event); + return; + } + synchronized (gauge) { + assert !Double.isNaN(gauge.value()); + gauge.set(gauge.value() - 1); + } + } +} diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java index dec677e4..4d112bad 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java @@ -29,6 +29,7 @@ import com.netflix.spectator.api.Spectator; import com.netflix.spectator.api.patterns.PolledMeter; import com.netflix.zuul.Attrs; +import com.netflix.zuul.monitoring.ConnCounter; import com.netflix.zuul.monitoring.ConnTimer; import io.netty.bootstrap.ServerBootstrap; import io.netty.buffer.ByteBufAllocator; @@ -476,6 +477,7 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception child.attr(CONN_DIMENSIONS).set(Attrs.newInstance()); ConnTimer timer = ConnTimer.install(child, registry, registry.createId("zuul.conn.client.timing")); timer.record(now, "ACCEPT"); + ConnCounter.install(child, registry, registry.createId("zuul.conn.client.active")); super.channelRead(ctx, msg); } } diff --git a/zuul-core/src/test/java/com/netflix/zuul/monitoring/ConnCounterTest.java b/zuul-core/src/test/java/com/netflix/zuul/monitoring/ConnCounterTest.java new file mode 100644 index 00000000..09e07b18 --- /dev/null +++ b/zuul-core/src/test/java/com/netflix/zuul/monitoring/ConnCounterTest.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.monitoring; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +import com.netflix.spectator.api.DefaultRegistry; +import com.netflix.spectator.api.Gauge; +import com.netflix.spectator.api.Registry; +import com.netflix.spectator.api.histogram.PercentileTimer; +import com.netflix.zuul.Attrs; +import com.netflix.zuul.netty.server.Server; +import io.netty.channel.embedded.EmbeddedChannel; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ConnCounterTest { + @Test + public void record() { + EmbeddedChannel chan = new EmbeddedChannel(); + Attrs attrs = Attrs.newInstance(); + chan.attr(Server.CONN_DIMENSIONS).set(attrs); + Registry registry = new DefaultRegistry(); + ConnCounter counter = ConnCounter.install(chan, registry, registry.createId("foo")); + + counter.increment("start"); + counter.increment("middle"); + Attrs.newKey("bar").put(attrs, "baz"); + counter.increment("end"); + + Gauge meter1 = registry.gauge(registry.createId("foo.start", "from", "nascent")); + assertNotNull(meter1); + assertEquals(1, meter1.value(), 0); + + Gauge meter2 = registry.gauge(registry.createId("foo.middle", "from", "start")); + assertNotNull(meter2); + assertEquals(1, meter2.value(), 0); + + Gauge meter3 = registry.gauge(registry.createId("foo.end", "from", "middle", "bar", "baz")); + assertNotNull(meter3); + assertEquals(1, meter3.value(), 0); + } +} From bae0b467c2e9d1d4b8e586d75f8067956dd59655 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 16 Dec 2020 11:33:44 -0800 Subject: [PATCH 175/273] zuul-core: include HAPM port in server conn dimensions --- .../HAProxyMessageChannelHandler.java | 7 +++++++ .../ElbProxyProtocolChannelHandlerTest.java | 18 ++++++++++++++++++ .../HAProxyMessageChannelHandlerTest.java | 8 ++++++++ 3 files changed, 33 insertions(+) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java index a0a1190a..5739c4a2 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandler.java @@ -16,8 +16,11 @@ package com.netflix.netty.common.proxyprotocol; +import com.google.common.annotations.VisibleForTesting; import com.google.common.net.InetAddresses; import com.netflix.netty.common.SourceAddressChannelHandler; +import com.netflix.zuul.Attrs; +import com.netflix.zuul.netty.server.Server; import io.netty.channel.Channel; import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelHandlerContext; @@ -40,6 +43,8 @@ public final class HAProxyMessageChannelHandler extends ChannelInboundHandlerAda public static final AttributeKey ATTR_HAPROXY_VERSION = AttributeKey.newInstance("_haproxy_version"); + @VisibleForTesting + static final Attrs.Key HAPM_DEST_PORT = Attrs.newKey("hapm_port"); @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { @@ -66,6 +71,8 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception addr = inetAddr; // setting PPv2 explicitly because SourceAddressChannelHandler.ATTR_LOCAL_ADDR could be PPv2 or not channel.attr(SourceAddressChannelHandler.ATTR_PROXY_PROTOCOL_DESTINATION_ADDRESS).set(inetAddr); + Attrs attrs = ctx.channel().attr(Server.CONN_DIMENSIONS).get(); + HAPM_DEST_PORT.put(attrs, hapm.destinationPort()); break out; case UNIX_STREAM: // TODO: implement case UDP4: diff --git a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java index 45a5aa83..dbfbc692 100644 --- a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/ElbProxyProtocolChannelHandlerTest.java @@ -27,6 +27,8 @@ import com.netflix.netty.common.SourceAddressChannelHandler; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Registry; +import com.netflix.zuul.Attrs; +import com.netflix.zuul.netty.server.Server; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufUtil; import io.netty.buffer.Unpooled; @@ -58,6 +60,8 @@ public void setup() { @Test public void noProxy() { EmbeddedChannel channel = new EmbeddedChannel(); + // This is normally done by Server. + channel.attr(Server.CONN_DIMENSIONS).set(Attrs.newInstance()); channel.pipeline() .addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, false)); ByteBuf buf = Unpooled.wrappedBuffer( @@ -81,6 +85,8 @@ public void noProxy() { @Test public void extraDataForwarded() { EmbeddedChannel channel = new EmbeddedChannel(); + // This is normally done by Server. + channel.attr(Server.CONN_DIMENSIONS).set(Attrs.newInstance()); channel.pipeline() .addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); ByteBuf buf = Unpooled.wrappedBuffer( @@ -98,6 +104,8 @@ public void extraDataForwarded() { @Test public void passThrough_ProxyProtocolEnabled_nonProxyBytes() { EmbeddedChannel channel = new EmbeddedChannel(); + // This is normally done by Server. + channel.attr(Server.CONN_DIMENSIONS).set(Attrs.newInstance()); channel.pipeline() .addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); //Note that the bytes aren't prefixed by PROXY, as required by the spec @@ -122,6 +130,8 @@ public void passThrough_ProxyProtocolEnabled_nonProxyBytes() { @Test public void incrementCounterWhenPPEnabledButNonHAPMMessage() { EmbeddedChannel channel = new EmbeddedChannel(); + // This is normally done by Server. + channel.attr(Server.CONN_DIMENSIONS).set(Attrs.newInstance()); channel.pipeline() .addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); //Note that the bytes aren't prefixed by PROXY, as required by the spec @@ -140,6 +150,8 @@ public void incrementCounterWhenPPEnabledButNonHAPMMessage() { @Test public void detectsSplitPpv1Message() { EmbeddedChannel channel = new EmbeddedChannel(); + // This is normally done by Server. + channel.attr(Server.CONN_DIMENSIONS).set(Attrs.newInstance()); channel.pipeline() .addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); ByteBuf buf1 = Unpooled.wrappedBuffer( @@ -162,6 +174,8 @@ public void detectsSplitPpv1Message() { @Test public void negotiateProxy_ppv1_ipv4() { EmbeddedChannel channel = new EmbeddedChannel(); + // This is normally done by Server. + channel.attr(Server.CONN_DIMENSIONS).set(Attrs.newInstance()); channel.pipeline() .addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); ByteBuf buf = Unpooled.wrappedBuffer( @@ -189,6 +203,8 @@ public void negotiateProxy_ppv1_ipv4() { @Test public void negotiateProxy_ppv1_ipv6() { EmbeddedChannel channel = new EmbeddedChannel(); + // This is normally done by Server. + channel.attr(Server.CONN_DIMENSIONS).set(Attrs.newInstance()); channel.pipeline() .addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); ByteBuf buf = Unpooled.wrappedBuffer( @@ -218,6 +234,8 @@ public void negotiateProxy_ppv1_ipv6() { @Test public void negotiateProxy_ppv2_ipv4() { EmbeddedChannel channel = new EmbeddedChannel(); + // This is normally done by Server. + channel.attr(Server.CONN_DIMENSIONS).set(Attrs.newInstance()); channel.pipeline() .addLast(ElbProxyProtocolChannelHandler.NAME, new ElbProxyProtocolChannelHandler(registry, true)); ByteBuf buf = Unpooled.wrappedBuffer( diff --git a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandlerTest.java index 6f2dfe37..ee2409f7 100644 --- a/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/netty/common/proxyprotocol/HAProxyMessageChannelHandlerTest.java @@ -19,6 +19,8 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import com.netflix.netty.common.SourceAddressChannelHandler; +import com.netflix.zuul.Attrs; +import com.netflix.zuul.netty.server.Server; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.embedded.EmbeddedChannel; @@ -35,6 +37,8 @@ public class HAProxyMessageChannelHandlerTest { @Test public void setClientDestPortForHAPM() { EmbeddedChannel channel = new EmbeddedChannel(); + // This is normally done by Server. + channel.attr(Server.CONN_DIMENSIONS).set(Attrs.newInstance()); // This is to emulate `ElbProxyProtocolChannelHandler` channel.pipeline() .addLast(HAProxyMessageDecoder.class.getSimpleName(), new HAProxyMessageDecoder()) @@ -58,5 +62,9 @@ public void setClientDestPortForHAPM() { assertEquals("192.168.0.1", srcAddress.getHostString()); assertEquals(10008, srcAddress.getPort()); + + Attrs attrs = channel.attr(Server.CONN_DIMENSIONS).get(); + Integer port = HAProxyMessageChannelHandler.HAPM_DEST_PORT.get(attrs); + assertEquals(443, port.intValue()); } } \ No newline at end of file From f0e5a0fc600a8dd453f573da26b61c73cf832f70 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 16 Dec 2020 16:38:09 -0800 Subject: [PATCH 176/273] zuul-core: make sure to lock conn counters properly --- .../netflix/zuul/monitoring/ConnCounter.java | 29 +++++++++++++++++-- .../com/netflix/zuul/netty/server/Server.java | 2 +- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java index a031b3ee..afa1afe4 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java @@ -40,6 +40,23 @@ public final class ConnCounter { private static final AttributeKey CONN_COUNTER = AttributeKey.newInstance("zuul.conncounter"); + private static final int LOCK_COUNT = 256; + private static final int LOCK_MASK = LOCK_COUNT - 1; + + /** + * An array of locks to guard the gauges. This is the same as Guava's Striped, but avoids the dep. + * + * This can be removed after https://github.com/Netflix/spectator/issues/862 is fixed. + */ + private static final Object[] locks = new Object[LOCK_COUNT]; + + static { + assert (LOCK_COUNT & LOCK_MASK) == 0; + for (int i = 0; i < locks.length; i++) { + locks[i] = new Object(); + } + } + private final Registry registry; private final Channel chan; private final Id metricBase; @@ -91,7 +108,8 @@ public void increment(String event) { lastCountKey = event; Id id = registry.createId(metricBase.name() + '.' + event).withTags(metricBase.tags()).withTags(dimTags); Gauge gauge = registry.gauge(id); - synchronized (gauge) { + + synchronized (getLock(id)) { double current = gauge.value(); gauge.set(Double.isNaN(current) ? 1 : current + 1); } @@ -106,9 +124,16 @@ public void decrement(String event) { logger.warn("Missing conn counter increment {}", event); return; } - synchronized (gauge) { + synchronized (getLock(gauge.id())) { assert !Double.isNaN(gauge.value()); gauge.set(gauge.value() - 1); } } + + // This is here to pick the correct lock stripe. This avoids multiple threads synchronizing on the + // same lock in the common case. This can go away once there is an atomic gauge update implemented + // in spectator. + private static Object getLock(Id id) { + return locks[id.hashCode() & LOCK_MASK]; + } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java index 4d112bad..be617b2a 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java @@ -477,7 +477,7 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception child.attr(CONN_DIMENSIONS).set(Attrs.newInstance()); ConnTimer timer = ConnTimer.install(child, registry, registry.createId("zuul.conn.client.timing")); timer.record(now, "ACCEPT"); - ConnCounter.install(child, registry, registry.createId("zuul.conn.client.active")); + ConnCounter.install(child, registry, registry.createId("zuul.conn.client.current")); super.channelRead(ctx, msg); } } From 1e576dc5fa1064d3980abb1e1118e61c2c622398 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 16 Dec 2020 16:55:10 -0800 Subject: [PATCH 177/273] zuul-core: make conn time split metrics by name rather than tag --- .../com/netflix/zuul/monitoring/ConnTimer.java | 14 +++++++++----- .../com/netflix/zuul/monitoring/ConnTimerTest.java | 6 +++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java index bec7c7c9..79206dd7 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java @@ -19,6 +19,7 @@ import com.netflix.config.DynamicBooleanProperty; import com.netflix.spectator.api.Id; import com.netflix.spectator.api.Registry; +import com.netflix.spectator.api.Tag; import com.netflix.spectator.api.histogram.PercentileTimer; import com.netflix.zuul.Attrs; import com.netflix.zuul.Attrs.Key; @@ -97,22 +98,21 @@ public void record(Long now, String event) { for (Key key : dims.keySet()) { dimTags.put(key.name(), String.valueOf(key.get(dims))); } - dimTags.put("to", event); // Note: this is effectively O(n^2) because it will be called for each event in the connection // setup. It should be bounded to at most 10 or so. - timings.forEach((k, v) -> { - long durationNanos = now - v; + timings.forEach((from, stamp) -> { + long durationNanos = now - stamp; if (durationNanos == 0) { // This may happen if an event is double listed, or if the timer is not accurate enough to record // it. return; } - registry.timer(metricBase.withTags(dimTags).withTags("from", k)) + registry.timer(buildId(metricBase, from, event, dimTags)) .record(durationNanos, TimeUnit.NANOSECONDS); if (preciseMetricBase != null) { PercentileTimer.builder(registry) - .withId(preciseMetricBase.withTags(dimTags).withTags("from", k)) + .withId(buildId(preciseMetricBase, from, event, dimTags)) .withRange(MIN_CONN_TIMING, MAX_CONN_TIMING) .build() .record(durationNanos, TimeUnit.NANOSECONDS); @@ -120,4 +120,8 @@ public void record(Long now, String event) { }); timings.put(event, now); } + + private Id buildId(Id base, String from, String to, Map tags) { + return registry.createId(metricBase.name() + '.' + from + '-' + to).withTags(base.tags()).withTags(tags); + } } diff --git a/zuul-core/src/test/java/com/netflix/zuul/monitoring/ConnTimerTest.java b/zuul-core/src/test/java/com/netflix/zuul/monitoring/ConnTimerTest.java index 3c5a9525..cc07c028 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/monitoring/ConnTimerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/monitoring/ConnTimerTest.java @@ -45,17 +45,17 @@ public void record() { timer.record(4000L, "end"); PercentileTimer meter1 = - PercentileTimer.get(registry, registry.createId("foo", "from", "start", "to", "middle")); + PercentileTimer.get(registry, registry.createId("foo.start-middle")); assertNotNull(meter1); assertEquals(1000L, meter1.totalTime()); PercentileTimer meter2 = - PercentileTimer.get(registry, registry.createId("foo", "from", "middle", "to", "end", "bar", "baz")); + PercentileTimer.get(registry, registry.createId("foo.middle-end", "bar", "baz")); assertNotNull(meter2); assertEquals(2000L, meter2.totalTime()); PercentileTimer meter3 = - PercentileTimer.get(registry, registry.createId("foo", "from", "start", "to", "end", "bar", "baz")); + PercentileTimer.get(registry, registry.createId("foo.start-end", "bar", "baz")); assertNotNull(meter3); assertEquals(3000L, meter3.totalTime()); } From 5261ea9c2d0a8cd6765fd2d801c752ac03adad16 Mon Sep 17 00:00:00 2001 From: sullis Date: Sun, 20 Dec 2020 12:56:48 -0800 Subject: [PATCH 178/273] all: bump to jackson 2.12.0 --- zuul-core/build.gradle | 4 ++-- zuul-core/dependencies.lock | 24 ++++++++++++------------ zuul-groovy/dependencies.lock | 18 +++++++++--------- zuul-guice/dependencies.lock | 18 +++++++++--------- zuul-processor/dependencies.lock | 22 +++++++++++----------- zuul-sample/dependencies.lock | 22 +++++++++++----------- 6 files changed, 54 insertions(+), 54 deletions(-) diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index adb5e5ba..328b3460 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -7,8 +7,8 @@ dependencies { // TODO(carl-mastrangelo): this can be implementation; remove Logger from public api points. api libraries.slf4j implementation 'org.bouncycastle:bcprov-jdk15on:1.+' - implementation 'com.fasterxml.jackson.core:jackson-core:2.11.0' - api 'com.fasterxml.jackson.core:jackson-databind:2.9.8' + implementation 'com.fasterxml.jackson.core:jackson-core:2.12.0' + api 'com.fasterxml.jackson.core:jackson-databind:2.12.0' api "com.netflix.archaius:archaius-core:0.7.5" api "com.netflix.spectator:spectator-api:0.110.0" diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 8c3c4db3..7e618406 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -1,10 +1,10 @@ { "compileClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -92,10 +92,10 @@ }, "jmhCompileClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -181,10 +181,10 @@ }, "jmhRuntimeClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -285,10 +285,10 @@ }, "runtimeClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -368,10 +368,10 @@ }, "testCompileClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -457,10 +457,10 @@ }, "testRuntimeClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "locked": "29.0-jre" diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index ceae19e0..acd3b902 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -4,7 +4,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -131,7 +131,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -256,13 +256,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -441,13 +441,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -611,7 +611,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -739,13 +739,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "firstLevelTransitive": [ diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 827fe642..4725abdf 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -4,7 +4,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.inject:guice": { "locked": "4.2.3" @@ -131,7 +131,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.inject:guice": { "locked": "4.2.3" @@ -256,13 +256,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -447,13 +447,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -620,7 +620,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.inject:guice": { "locked": "4.2.3" @@ -751,13 +751,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "firstLevelTransitive": [ diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index dcd681e9..d8815e67 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -4,7 +4,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -128,7 +128,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -250,13 +250,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -429,13 +429,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -596,13 +596,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -770,7 +770,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -892,13 +892,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 3e8dd57c..f7ced7de 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -4,13 +4,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -178,7 +178,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.inject:guice": { "firstLevelTransitive": [ @@ -323,7 +323,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.inject:guice": { "firstLevelTransitive": [ @@ -466,13 +466,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -677,13 +677,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -882,7 +882,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.inject:guice": { "firstLevelTransitive": [ @@ -1019,13 +1019,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.11.0" + "locked": "2.12.0" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.9.8" + "locked": "2.12.0" }, "com.google.guava:guava": { "firstLevelTransitive": [ From e0485e83a03658f8559bc4d09a3043b66e6eaf21 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 5 Jan 2021 13:12:51 -0800 Subject: [PATCH 179/273] core: avoid using deprecated X509Certificates --- .../com/netflix/netty/common/ssl/SslHandshakeInfo.java | 2 +- .../zuul/netty/server/ssl/SslHandshakeInfoHandler.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/ssl/SslHandshakeInfo.java b/zuul-core/src/main/java/com/netflix/netty/common/ssl/SslHandshakeInfo.java index 17ac722d..bc342bd4 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/ssl/SslHandshakeInfo.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/ssl/SslHandshakeInfo.java @@ -18,7 +18,7 @@ import io.netty.handler.ssl.ClientAuth; -import javax.security.cert.X509Certificate; +import java.security.cert.X509Certificate; import java.security.cert.Certificate; /** diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java index a8b87988..7055680d 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java @@ -38,7 +38,7 @@ import javax.net.ssl.SSLException; import javax.net.ssl.SSLSession; -import javax.security.cert.X509Certificate; +import java.security.cert.X509Certificate; import java.nio.channels.ClosedChannelException; import java.security.cert.Certificate; @@ -84,9 +84,9 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc X509Certificate peerCert = null; if ((clientAuth == ClientAuth.REQUIRE || clientAuth == ClientAuth.OPTIONAL) - && session.getPeerCertificateChain() != null - && session.getPeerCertificateChain().length > 0) { - peerCert = session.getPeerCertificateChain()[0]; + && session.getPeerCertificates() != null + && session.getPeerCertificates().length > 0) { + peerCert = (X509Certificate) session.getPeerCertificates()[0]; } if (session.getLocalCertificates() != null && session.getLocalCertificates().length > 0) { serverCert = session.getLocalCertificates()[0]; From 5d8c899516dcf37964a59a007bf7ccdf40e3e52e Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 6 Jan 2021 10:41:55 -0800 Subject: [PATCH 180/273] zuul-core: add overload for connection counters for extra dimensions --- .../src/main/java/com/netflix/zuul/Attrs.java | 14 +++++++++++ .../netflix/zuul/monitoring/ConnCounter.java | 21 +++++++++------- .../netflix/zuul/monitoring/ConnTimer.java | 24 ++++++++++++------- 3 files changed, 42 insertions(+), 17 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/Attrs.java b/zuul-core/src/main/java/com/netflix/zuul/Attrs.java index e8384945..ab66ea89 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/Attrs.java +++ b/zuul-core/src/main/java/com/netflix/zuul/Attrs.java @@ -23,10 +23,16 @@ import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.function.BiConsumer; import javax.annotation.Nullable; /** * A heterogeneous map of attributes. + * + *

Implementation Note: this class is not a proper Map or Collection, in order to encourage callers + * to refer to the keys by their literal name. In the past, finding where a Key was used was difficult, + * so this class is somewhat of an experiment to try to make tracking down usage easier. If it becomes + * too onerous to use this, consider making this class extend AbstractMap. */ public final class Attrs { @@ -95,6 +101,14 @@ public Set> keySet() { return Collections.unmodifiableSet(new LinkedHashSet<>(storage.keySet())); } + public void forEach(BiConsumer, Object> consumer) { + storage.forEach(consumer); + } + + public int size() { + return storage.size(); + } + @Override public String toString() { return "Attrs{" + storage + '}'; diff --git a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java index afa1afe4..7aa2035b 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java @@ -20,14 +20,12 @@ import com.netflix.spectator.api.Id; import com.netflix.spectator.api.Registry; import com.netflix.zuul.Attrs; -import com.netflix.zuul.Attrs.Key; import com.netflix.zuul.netty.server.Server; import io.netty.channel.Channel; import io.netty.util.AttributeKey; import java.util.HashMap; import java.util.Map; import java.util.Objects; -import java.util.Set; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -43,6 +41,8 @@ public final class ConnCounter { private static final int LOCK_COUNT = 256; private static final int LOCK_MASK = LOCK_COUNT - 1; + private static final Attrs EMPTY = Attrs.newInstance(); + /** * An array of locks to guard the gauges. This is the same as Guava's Striped, but avoids the dep. * @@ -92,18 +92,23 @@ public static ConnCounter from(Channel chan) { } public void increment(String event) { + increment(event, EMPTY); + } + + public void increment(String event, Attrs extraDimensions) { Objects.requireNonNull(event); + Objects.requireNonNull(extraDimensions); if (counts.containsKey(event)) { // TODO(carl-mastrangelo): make this throw IllegalStateException after verifying this doesn't happen. logger.warn("Duplicate conn counter increment {}", event); return; } - Attrs dims = chan.attr(Server.CONN_DIMENSIONS).get(); - Set> dimKeys = dims.keySet(); - Map dimTags = new HashMap<>(dimKeys.size()); - for (Key key : dims.keySet()) { - dimTags.put(key.name(), String.valueOf(key.get(dims))); - } + Attrs connDims = chan.attr(Server.CONN_DIMENSIONS).get(); + Map dimTags = new HashMap<>(connDims.size() + extraDimensions.size()); + + connDims.forEach((k, v) -> dimTags.put(k.name(), String.valueOf(v))); + extraDimensions.forEach((k, v) -> dimTags.put(k.name(), String.valueOf(v))); + dimTags.put("from", lastCountKey != null ? lastCountKey : "nascent"); lastCountKey = event; Id id = registry.createId(metricBase.name() + '.' + event).withTags(metricBase.tags()).withTags(dimTags); diff --git a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java index 79206dd7..d9fd739f 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnTimer.java @@ -19,10 +19,8 @@ import com.netflix.config.DynamicBooleanProperty; import com.netflix.spectator.api.Id; import com.netflix.spectator.api.Registry; -import com.netflix.spectator.api.Tag; import com.netflix.spectator.api.histogram.PercentileTimer; import com.netflix.zuul.Attrs; -import com.netflix.zuul.Attrs.Key; import com.netflix.zuul.netty.server.Server; import io.netty.channel.Channel; import io.netty.util.AttributeKey; @@ -31,7 +29,6 @@ import java.util.LinkedHashMap; import java.util.Map; import java.util.Objects; -import java.util.Set; import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; @@ -48,6 +45,8 @@ public final class ConnTimer { private static final Duration MIN_CONN_TIMING = Duration.ofNanos(1024); private static final Duration MAX_CONN_TIMING = Duration.ofDays(366); + private static final Attrs EMPTY = Attrs.newInstance(); + private final Registry registry; private final Channel chan; // TODO(carl-mastrangelo): make this changable. @@ -89,15 +88,22 @@ public static ConnTimer from(Channel chan) { } public void record(Long now, String event) { + record(now, event, EMPTY); + } + + public void record(Long now, String event, Attrs extraDimensions) { if (timings.containsKey(event)) { return; } - Attrs dims = chan.attr(Server.CONN_DIMENSIONS).get(); - Set> dimKeys = dims.keySet(); - Map dimTags = new HashMap<>(dimKeys.size()); - for (Key key : dims.keySet()) { - dimTags.put(key.name(), String.valueOf(key.get(dims))); - } + Objects.requireNonNull(now); + Objects.requireNonNull(event); + Objects.requireNonNull(extraDimensions); + + Attrs connDims = chan.attr(Server.CONN_DIMENSIONS).get(); + Map dimTags = new HashMap<>(connDims.size() + extraDimensions.size()); + + connDims.forEach((k, v) -> dimTags.put(k.name(), String.valueOf(v))); + extraDimensions.forEach((k, v) -> dimTags.put(k.name(), String.valueOf(v))); // Note: this is effectively O(n^2) because it will be called for each event in the connection // setup. It should be bounded to at most 10 or so. From 06a8f2bc4b66cd938a80ddc227135a17411f4991 Mon Sep 17 00:00:00 2001 From: sullis Date: Mon, 11 Jan 2021 11:58:52 -0800 Subject: [PATCH 181/273] all: upgrade to jackson 2.12.1 (#968) https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.12 --- zuul-core/build.gradle | 4 ++-- zuul-core/dependencies.lock | 24 ++++++++++++------------ zuul-groovy/dependencies.lock | 18 +++++++++--------- zuul-guice/dependencies.lock | 18 +++++++++--------- zuul-processor/dependencies.lock | 22 +++++++++++----------- zuul-sample/dependencies.lock | 22 +++++++++++----------- 6 files changed, 54 insertions(+), 54 deletions(-) diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index 328b3460..1a32d0b5 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -7,8 +7,8 @@ dependencies { // TODO(carl-mastrangelo): this can be implementation; remove Logger from public api points. api libraries.slf4j implementation 'org.bouncycastle:bcprov-jdk15on:1.+' - implementation 'com.fasterxml.jackson.core:jackson-core:2.12.0' - api 'com.fasterxml.jackson.core:jackson-databind:2.12.0' + implementation 'com.fasterxml.jackson.core:jackson-core:2.12.1' + api 'com.fasterxml.jackson.core:jackson-databind:2.12.1' api "com.netflix.archaius:archaius-core:0.7.5" api "com.netflix.spectator:spectator-api:0.110.0" diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 7e618406..3f675f6a 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -1,10 +1,10 @@ { "compileClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -92,10 +92,10 @@ }, "jmhCompileClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -181,10 +181,10 @@ }, "jmhRuntimeClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -285,10 +285,10 @@ }, "runtimeClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -368,10 +368,10 @@ }, "testCompileClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -457,10 +457,10 @@ }, "testRuntimeClasspath": { "com.fasterxml.jackson.core:jackson-core": { - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "locked": "29.0-jre" diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index acd3b902..fb1a217a 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -4,7 +4,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -131,7 +131,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -256,13 +256,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -441,13 +441,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -611,7 +611,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -739,13 +739,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "firstLevelTransitive": [ diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 4725abdf..7c75a84a 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -4,7 +4,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.inject:guice": { "locked": "4.2.3" @@ -131,7 +131,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.inject:guice": { "locked": "4.2.3" @@ -256,13 +256,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -447,13 +447,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -620,7 +620,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.inject:guice": { "locked": "4.2.3" @@ -751,13 +751,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "firstLevelTransitive": [ diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index d8815e67..3ef37be2 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -4,7 +4,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -128,7 +128,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -250,13 +250,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -429,13 +429,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -596,13 +596,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -770,7 +770,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "locked": "29.0-jre" @@ -892,13 +892,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index f7ced7de..0692075b 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -4,13 +4,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -178,7 +178,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.inject:guice": { "firstLevelTransitive": [ @@ -323,7 +323,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.inject:guice": { "firstLevelTransitive": [ @@ -466,13 +466,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -677,13 +677,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "firstLevelTransitive": [ @@ -882,7 +882,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.inject:guice": { "firstLevelTransitive": [ @@ -1019,13 +1019,13 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.fasterxml.jackson.core:jackson-databind": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.12.0" + "locked": "2.12.1" }, "com.google.guava:guava": { "firstLevelTransitive": [ From 6215bf99b5bf0ed50aca7a33228471984af0cb80 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Mon, 11 Jan 2021 15:37:20 -0800 Subject: [PATCH 182/273] zuul-core: use Duration for ReadTimeouts --- .../zuul/filters/endpoint/ProxyEndpoint.java | 64 ++++++++++++------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 57ca4664..83fb7506 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -36,7 +36,7 @@ import com.netflix.client.config.IClientConfig; import com.netflix.client.config.IClientConfigKey; import com.netflix.client.config.IClientConfigKey.Keys; -import com.netflix.config.CachedDynamicIntProperty; +import com.netflix.config.CachedDynamicLongProperty; import com.netflix.config.DynamicBooleanProperty; import com.netflix.config.DynamicIntegerSetProperty; import com.netflix.loadbalancer.Server; @@ -99,6 +99,7 @@ import java.io.UnsupportedEncodingException; import java.net.InetAddress; import java.net.URLDecoder; +import java.time.Duration; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -153,7 +154,8 @@ public class ProxyEndpoint extends SyncZuulFilterAdapter REQUEST_HEADERS_TO_REMOVE = Sets.newHashSet(HttpHeaderNames.CONNECTION, HttpHeaderNames.KEEP_ALIVE); private static final Set RESPONSE_HEADERS_TO_REMOVE = Sets.newHashSet(HttpHeaderNames.CONNECTION, HttpHeaderNames.KEEP_ALIVE); @@ -441,11 +443,9 @@ protected RequestStat createRequestStat() { return basicRequestStat; } - private Integer setReadTimeoutOnContext(IClientConfig requestConfig, int attempt) - { - Integer readTimeout = getReadTimeout(requestConfig, attempt); - requestConfig.set(ReadTimeout, readTimeout); - return readTimeout; + private void setReadTimeoutOnContext(IClientConfig requestConfig, int attempt) { + Duration readTimeout = getReadTimeout(requestConfig, attempt); + requestConfig.set(ReadTimeout, Math.toIntExact(readTimeout.toMillis())); } @Override @@ -532,30 +532,46 @@ private void onOriginConnectSucceeded(PooledConnection conn, int readTimeout) { } } - protected Integer getReadTimeout(IClientConfig requestConfig, int attemptNum) { - Integer originTimeout = parseReadTimeout(origin.getClientConfig().getProperty(IClientConfigKey.Keys.ReadTimeout, null)); - Integer requestTimeout = parseReadTimeout(requestConfig.getProperty(IClientConfigKey.Keys.ReadTimeout, null)); + /** + * Derives the read timeout from the configuration. This implementation prefers the longer of either the origin + * timeout or the request timeout. + * + * @param requestConfig the config for the request. + * @param attemptNum the attempt number, starting at 1. + */ + protected Duration getReadTimeout(IClientConfig requestConfig, int attemptNum) { + Long noTimeout = null; + // TODO(carl-mastrangelo): getProperty is deprecated, and suggests using the typed overload `get`. However, + // the value is parsed using parseReadTimeoutMs, which supports String, implying not all timeouts are Integer. + // Figure out where a string ReadTimeout is coming from and replace it. + Long originTimeout = + parseReadTimeoutMs(origin.getClientConfig().getProperty(IClientConfigKey.Keys.ReadTimeout, noTimeout)); + Long requestTimeout = + parseReadTimeoutMs(requestConfig.getProperty(IClientConfigKey.Keys.ReadTimeout, noTimeout)); if (originTimeout == null && requestTimeout == null) { - return MAX_OUTBOUND_READ_TIMEOUT.get(); - } - else if (originTimeout == null || requestTimeout == null) { - return originTimeout == null ? requestTimeout : originTimeout; - } - else { + return Duration.ofMillis(MAX_OUTBOUND_READ_TIMEOUT_MS.get()); + } else if (originTimeout == null || requestTimeout == null) { + return Duration.ofMillis(originTimeout == null ? requestTimeout : originTimeout); + } else { // return the greater of two timeouts - return originTimeout > requestTimeout ? originTimeout : requestTimeout; + return Duration.ofMillis(originTimeout > requestTimeout ? originTimeout : requestTimeout); } } - private Integer parseReadTimeout(Object p) { + /** + * An Integer is expected as an input, but supports parsing Long and String. Returns {@code null} if no type is + * acceptable. + */ + @Nullable + private Long parseReadTimeoutMs(Object p) { if (p instanceof String && !Strings.isNullOrEmpty((String) p)) { - return Integer.valueOf((String)p); - } - else if (p instanceof Integer) { - return (Integer) p; - } - else { + return Long.valueOf((String)p); + } else if (p instanceof Long) { + return (Long) p; + } else if (p instanceof Integer) { + return Long.valueOf((Integer) p); + } else { return null; } } From 08ac94aebad9e3c6c9759a5b618aef621e6ccf8c Mon Sep 17 00:00:00 2001 From: sullis Date: Tue, 12 Jan 2021 18:09:15 -0800 Subject: [PATCH 183/273] spectator 0.123.1 (#970) https://github.com/Netflix/spectator/releases --- zuul-core/build.gradle | 2 +- zuul-core/dependencies.lock | 12 ++++++------ zuul-groovy/dependencies.lock | 12 ++++++------ zuul-guice/dependencies.lock | 12 ++++++------ zuul-processor/dependencies.lock | 14 +++++++------- zuul-sample/dependencies.lock | 14 +++++++------- 6 files changed, 33 insertions(+), 33 deletions(-) diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index 1a32d0b5..c1d17f14 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -11,7 +11,7 @@ dependencies { api 'com.fasterxml.jackson.core:jackson-databind:2.12.1' api "com.netflix.archaius:archaius-core:0.7.5" - api "com.netflix.spectator:spectator-api:0.110.0" + api "com.netflix.spectator:spectator-api:0.123.1" api "com.netflix.netflix-commons:netflix-commons-util:0.3.0" api "com.netflix.ribbon:ribbon-core:${versions_ribbon}" diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 3f675f6a..cfe327b3 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -34,7 +34,7 @@ "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { - "locked": "0.110.0" + "locked": "0.123.1" }, "io.netty:netty-buffer": { "locked": "4.1.55.Final" @@ -125,7 +125,7 @@ "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { - "locked": "0.110.0" + "locked": "0.123.1" }, "io.netty:netty-buffer": { "locked": "4.1.55.Final" @@ -217,7 +217,7 @@ "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { - "locked": "0.110.0" + "locked": "0.123.1" }, "io.netty:netty-buffer": { "locked": "4.1.55.Final" @@ -318,7 +318,7 @@ "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { - "locked": "0.110.0" + "locked": "0.123.1" }, "io.netty:netty-buffer": { "locked": "4.1.55.Final" @@ -404,7 +404,7 @@ "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { - "locked": "0.110.0" + "locked": "0.123.1" }, "io.netty:netty-buffer": { "locked": "4.1.55.Final" @@ -493,7 +493,7 @@ "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { - "locked": "0.110.0" + "locked": "0.123.1" }, "io.netty:netty-buffer": { "locked": "4.1.55.Final" diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index fb1a217a..d55526db 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -61,7 +61,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -188,7 +188,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -325,7 +325,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -507,7 +507,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -671,7 +671,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -808,7 +808,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 7c75a84a..68a7e4bf 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -61,7 +61,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -188,7 +188,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -331,7 +331,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -516,7 +516,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -683,7 +683,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -826,7 +826,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 3ef37be2..f89ee8aa 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -61,7 +61,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -185,7 +185,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -319,7 +319,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -495,7 +495,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -663,7 +663,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "firstLevelTransitive": [ @@ -830,7 +830,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -961,7 +961,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 0692075b..0fbeaf9b 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -71,7 +71,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "firstLevelTransitive": [ @@ -241,7 +241,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -386,7 +386,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -542,7 +542,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "firstLevelTransitive": [ @@ -753,7 +753,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "firstLevelTransitive": [ @@ -945,7 +945,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "project": true @@ -1095,7 +1095,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.110.0" + "locked": "0.123.1" }, "com.netflix.zuul:zuul-core": { "firstLevelTransitive": [ From 73ecf3a3d3dfc33a3f5b0986d908286ffd2a9123 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 14 Jan 2021 11:42:37 -0800 Subject: [PATCH 184/273] zuul-core: Selectively enable body caching on retries This change modifies the proxy logic to cache request bodies only if there have recently been throttling events. This means that if we get back a 503, we more agressively cache request bodies to be able to retry the request. Previously, Zuul would cache the body if the origin was secure, or manually request to cache. This found to be expensive, since it results in caching all the time, even if the origin is healthy. This change makes Zuul look to see if there have been any failures in the past 5 minutes. If there have, Zuul will cache the body for retry, under the expectation the origin will recover. This means the very first request that fails due to throttling cannot be retried, but subsequent failures can. After enough time has past from the last throttle, Zuul will stop caching again. Zuul can be configured to unconditionally cache by setting this value to -1. --- .../zuul/filters/endpoint/ProxyEndpoint.java | 27 ++++++++- .../zuul/origins/BasicNettyOrigin.java | 7 +++ .../zuul/origins/InstrumentedOrigin.java | 10 ++++ .../com/netflix/zuul/origins/OriginStats.java | 60 +++++++++++++++++++ 4 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 zuul-core/src/main/java/com/netflix/zuul/origins/OriginStats.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 83fb7506..f5e64773 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -100,10 +100,12 @@ import java.net.InetAddress; import java.net.URLDecoder; import java.time.Duration; +import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import java.util.StringTokenizer; import java.util.concurrent.atomic.AtomicReference; @@ -127,6 +129,7 @@ public class ProxyEndpoint extends SyncZuulFilterAdapter REQUEST_HEADERS_TO_REMOVE = Sets.newHashSet(HttpHeaderNames.CONNECTION, HttpHeaderNames.KEEP_ALIVE); private static final Set RESPONSE_HEADERS_TO_REMOVE = Sets.newHashSet(HttpHeaderNames.CONNECTION, HttpHeaderNames.KEEP_ALIVE); @@ -165,7 +175,6 @@ public class ProxyEndpoint extends SyncZuulFilterAdapter filters, MethodBinding methodBinding) { this(inMesg, ctx, filters, methodBinding, new NettyRequestAttemptFactory()); @@ -184,6 +193,7 @@ public ProxyEndpoint(final HttpRequestMessage inMesg, final ChannelHandlerContex chosenServer = new AtomicReference<>(); chosenHostAddr = new AtomicReference<>(); + // This must happen after origin is set, since it depends on it. this.retryBodyCache = preCacheBodyForRetryingRequests(); this.populatedRetryBody = SpectatorUtils.newCounter( "zuul.populated.retry.body", origin == null ? "null" : origin.getName().getTarget()); @@ -583,6 +593,7 @@ private void onOriginConnectFailed(Throwable cause) { } } + @Nullable private byte[] preCacheBodyForRetryingRequests() { // Netty SSL handler clears body ByteBufs, so we need to cache the body if we want to retry POSTs // Followup: We expect most origin connections to be secure, so it's okay to unconditionally cache here. @@ -593,8 +604,15 @@ private byte[] preCacheBodyForRetryingRequests() { // plaintext requests. Unfortunately, the cost of cahcing the body is non trivial, and as of the // current implementation, it's only technically required for SSL. See comment above. if (origin.getClientConfig().get(Keys.IsSecure, false) || ENABLE_CACHING_PLAINTEXT_BODIES.get()) { - // only cache requests if already buffered - return zuulRequest.getBody(); + ZonedDateTime lastThrottleEvent = origin.stats().lastThrottleEvent(); + if (lastThrottleEvent != null) { + // This is technically the wrong method to call, but the toSeconds() method is only present in JDK9. + long timeSinceLastThrottle = Duration.between(lastThrottleEvent, ZonedDateTime.now()).getSeconds(); + if (timeSinceLastThrottle <= THROTTLE_MEMORY_SECONDS.get()) { + // only cache requests if already buffered + return zuulRequest.getBody(); + } + } } } return null; @@ -906,6 +924,8 @@ protected void handleOriginNonSuccessResponse(final HttpResponse originResponse, statusCategory = FAILURE_ORIGIN_THROTTLED; niwsErrorType = ClientException.ErrorType.SERVER_THROTTLED; obe = new OutboundException(OutboundErrorType.SERVICE_UNAVAILABLE, requestAttempts); + // TODO(carl-mastrangelo): pass in the clock for testing. + origin.stats().lastThrottleEvent(ZonedDateTime.now()); if (originConn != null) { originConn.getServerStats().incrementSuccessiveConnectionFailureCount(); originConn.getServerStats().addToFailureCount(); @@ -1058,6 +1078,7 @@ private static HttpRequestMessage massageRequestURI(HttpRequestMessage request) * Note: this method gets called in the constructor so if overloading it or any methods called within, you cannot * rely on your own constructor parameters. */ + @Nullable protected NettyOrigin getOrigin(HttpRequestMessage request) { SessionContext context = request.getContext(); OriginManager originManager = (OriginManager) context.get(CommonContextKeys.ORIGIN_MANAGER); diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java index fc2baadd..a708ef76 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java @@ -51,6 +51,7 @@ import java.util.Objects; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; +import javax.annotation.Nullable; /** * Netty Origin basic implementation that can be used for most apps, with the more complex methods having no-op @@ -66,6 +67,7 @@ public class BasicNettyOrigin implements NettyOrigin { private final IClientConfig config; private final ClientChannelManager clientChannelManager; private final NettyRequestAttemptFactory requestAttemptFactory; + private final OriginStats stats = new OriginStats(); private final AtomicInteger concurrentRequests; private final Counter rejectedRequests; @@ -232,6 +234,11 @@ public void recordProxyRequestEnd() { concurrentRequests.decrementAndGet(); } + @Override + public final OriginStats stats() { + return stats; + } + /* Not required for basic operation */ @Override diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/InstrumentedOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/InstrumentedOrigin.java index e2ad4ab0..f87bd274 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/InstrumentedOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/InstrumentedOrigin.java @@ -17,6 +17,7 @@ package com.netflix.zuul.origins; import com.netflix.zuul.message.http.HttpRequestMessage; +import javax.annotation.Nullable; /** * User: michaels@netflix.com @@ -36,4 +37,13 @@ public interface InstrumentedOrigin extends Origin { void recordSuccessResponse(); void recordProxyRequestEnd(); + + /** + * Returns the mutable origin stats for this origin. Unlike the other methods in this interface, + * External callers are expected to update these numbers, rather than this object itself. + * @return + */ + default OriginStats stats() { + throw new UnsupportedOperationException(); + } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/OriginStats.java b/zuul-core/src/main/java/com/netflix/zuul/origins/OriginStats.java new file mode 100644 index 00000000..3a331480 --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/OriginStats.java @@ -0,0 +1,60 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.origins; + +import java.time.ZonedDateTime; +import java.util.Objects; +import java.util.concurrent.atomic.AtomicReference; +import javax.annotation.Nullable; +import javax.annotation.concurrent.ThreadSafe; + +/** + * Information about an {@link Origin} to be used for proxying. + */ +@ThreadSafe +public final class OriginStats { + + /** + * Represents the last time a Server in this Origin was throttled. + */ + private final AtomicReference lastThrottleEvent = new AtomicReference<>(); + + + /** + * Gets the last time a Server in this Origin was throttled. Returns {@code null} if there was + * no throttling. This class does not define what throttling is; see + * {@link com.netflix.zuul.filters.endpoint.ProxyEndpoint}. + */ + @Nullable + public ZonedDateTime lastThrottleEvent() { + return lastThrottleEvent.get(); + } + + /** + * Sets the last throttle event, if it is after the existing last throttle event. + */ + public void lastThrottleEvent(ZonedDateTime lastThrottleEvent) { + Objects.requireNonNull(lastThrottleEvent); + ZonedDateTime existing; + do { + existing = this.lastThrottleEvent.get(); + if (existing != null && lastThrottleEvent.compareTo(existing) <= 0) { + break; + } + } while (!this.lastThrottleEvent.compareAndSet(existing, lastThrottleEvent)); + } +} From 41beba15417a093da893f81265a07e087e5a08b7 Mon Sep 17 00:00:00 2001 From: sullis Date: Wed, 20 Jan 2021 14:09:11 -0800 Subject: [PATCH 185/273] Netty 4.1.58.Final (#972) release notes: https://netty.io/news/index.html --- gradle.properties | 2 +- zuul-core/dependencies.lock | 108 +++++++++++++++---------------- zuul-groovy/dependencies.lock | 90 +++++++++++++------------- zuul-guice/dependencies.lock | 90 +++++++++++++------------- zuul-processor/dependencies.lock | 108 +++++++++++++++---------------- zuul-sample/dependencies.lock | 108 +++++++++++++++---------------- 6 files changed, 253 insertions(+), 253 deletions(-) diff --git a/gradle.properties b/gradle.properties index b93f7ecf..3d8ed57d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ versions_groovy=3.0.3 versions_ribbon=2.4.4 -versions_netty=4.1.55.Final +versions_netty=4.1.58.Final release.scope=patch release.version=2.3.0-SNAPSHOT diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index cfe327b3..22aec893 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -37,31 +37,31 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -128,31 +128,31 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -220,34 +220,34 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.35.Final" }, "io.netty:netty-transport": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -321,34 +321,34 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.35.Final" }, "io.netty:netty-transport": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -407,31 +407,31 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -496,34 +496,34 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.35.Final" }, "io.netty:netty-transport": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index d55526db..9d8fda4b 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -70,37 +70,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -197,37 +197,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -334,37 +334,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -376,19 +376,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -516,37 +516,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -558,19 +558,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -680,37 +680,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -817,37 +817,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -859,19 +859,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 68a7e4bf..aa19b3f7 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -73,37 +73,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -200,37 +200,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -343,37 +343,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -385,19 +385,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -528,37 +528,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -570,19 +570,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -695,37 +695,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -838,37 +838,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -880,19 +880,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index f89ee8aa..f124870c 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -70,37 +70,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -194,37 +194,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -328,37 +328,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -370,19 +370,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -504,37 +504,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -546,19 +546,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -678,37 +678,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -720,19 +720,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -839,37 +839,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -970,37 +970,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1012,19 +1012,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 0fbeaf9b..a79153c7 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -86,37 +86,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -128,19 +128,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -259,37 +259,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -404,37 +404,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -567,37 +567,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -609,19 +609,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -778,37 +778,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -820,19 +820,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -963,37 +963,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1120,37 +1120,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1162,19 +1162,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.58.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ From dd64a3b3017382220c80219587f178002e8a984c Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 20 Jan 2021 14:16:49 -0800 Subject: [PATCH 186/273] all: update to netty tcnative 2.0.36 (#979) --- zuul-core/build.gradle | 2 +- zuul-core/dependencies.lock | 30 +++++++++++++++--------------- zuul-groovy/dependencies.lock | 18 +++++++++--------- zuul-guice/dependencies.lock | 24 ++++++++++++------------ zuul-processor/dependencies.lock | 14 +++++++------- zuul-sample/dependencies.lock | 20 ++++++++++---------- 6 files changed, 54 insertions(+), 54 deletions(-) diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index c1d17f14..459829e5 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -34,7 +34,7 @@ dependencies { implementation "io.netty:netty-codec-haproxy:${versions_netty}" implementation "io.netty:netty-transport-native-epoll:${versions_netty}:linux-x86_64" implementation "io.netty:netty-transport-native-kqueue:${versions_netty}:osx-x86_64" - runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.35.Final" + runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.36.Final" implementation 'io.perfmark:perfmark-api:0.23.0' implementation 'javax.inject:javax.inject:1' diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 22aec893..57d51198 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -81,10 +81,10 @@ }, "jmh": { "org.openjdk.jmh:jmh-core": { - "locked": "1.26" + "locked": "1.27" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.26" + "locked": "1.27" }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21" @@ -167,10 +167,10 @@ "locked": "1.67" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.26" + "locked": "1.27" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.26" + "locked": "1.27" }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21" @@ -238,7 +238,7 @@ "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.35.Final" + "locked": "2.0.36.Final" }, "io.netty:netty-transport": { "locked": "4.1.58.Final" @@ -259,19 +259,19 @@ "locked": "1" }, "junit:junit": { - "locked": "4.13" + "locked": "4.13.1" }, "org.bouncycastle:bcprov-jdk15on": { "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.6.28" + "locked": "3.7.7" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.26" + "locked": "1.27" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.26" + "locked": "1.27" }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21" @@ -339,7 +339,7 @@ "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.35.Final" + "locked": "2.0.36.Final" }, "io.netty:netty-transport": { "locked": "4.1.58.Final" @@ -443,13 +443,13 @@ "locked": "1" }, "junit:junit": { - "locked": "4.13" + "locked": "4.13.1" }, "org.bouncycastle:bcprov-jdk15on": { "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.6.28" + "locked": "3.7.7" }, "org.slf4j:slf4j-api": { "locked": "1.7.25" @@ -514,7 +514,7 @@ "locked": "4.1.58.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.35.Final" + "locked": "2.0.36.Final" }, "io.netty:netty-transport": { "locked": "4.1.58.Final" @@ -535,13 +535,13 @@ "locked": "1" }, "junit:junit": { - "locked": "4.13" + "locked": "4.13.1" }, "org.bouncycastle:bcprov-jdk15on": { "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.6.28" + "locked": "3.7.7" }, "org.slf4j:slf4j-api": { "locked": "1.7.30" diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index 9d8fda4b..3cfe8d90 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -370,7 +370,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.36.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -409,7 +409,7 @@ "locked": "1" }, "junit:junit": { - "locked": "4.13" + "locked": "4.13.1" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ @@ -421,7 +421,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.6.28" + "locked": "3.7.7" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -552,7 +552,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.36.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -719,13 +719,13 @@ "locked": "1.2.1" }, "junit:junit": { - "locked": "4.13" + "locked": "4.13.1" }, "org.codehaus.groovy:groovy-all": { "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.6.28" + "locked": "3.7.7" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -853,7 +853,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.36.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -892,7 +892,7 @@ "locked": "1" }, "junit:junit": { - "locked": "4.13" + "locked": "4.13.1" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ @@ -904,7 +904,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.6.28" + "locked": "3.7.7" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index aa19b3f7..5369decd 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -289,7 +289,7 @@ "locked": "1.9.18" }, "com.netflix.governator:governator-test-junit": { - "locked": "1.17.10" + "locked": "1.17.11" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -379,7 +379,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.36.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -418,7 +418,7 @@ "locked": "1" }, "junit:junit": { - "locked": "4.13" + "locked": "4.13.1" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ @@ -427,7 +427,7 @@ "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.6.28" + "locked": "3.7.7" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -564,7 +564,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.36.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -641,7 +641,7 @@ "locked": "1.9.18" }, "com.netflix.governator:governator-test-junit": { - "locked": "1.17.10" + "locked": "1.17.11" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -734,10 +734,10 @@ "locked": "1.2.1" }, "junit:junit": { - "locked": "4.13" + "locked": "4.13.1" }, "org.mockito:mockito-core": { - "locked": "3.6.28" + "locked": "3.7.7" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -784,7 +784,7 @@ "locked": "1.9.18" }, "com.netflix.governator:governator-test-junit": { - "locked": "1.17.10" + "locked": "1.17.11" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -874,7 +874,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.36.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -913,7 +913,7 @@ "locked": "1" }, "junit:junit": { - "locked": "4.13" + "locked": "4.13.1" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ @@ -922,7 +922,7 @@ "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.6.28" + "locked": "3.7.7" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index f124870c..5c840d84 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -364,7 +364,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.36.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -403,7 +403,7 @@ "locked": "1" }, "junit:junit": { - "locked": "4.13" + "locked": "4.13.1" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ @@ -540,7 +540,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.36.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -714,7 +714,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.36.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -878,7 +878,7 @@ "locked": "1.2.1" }, "junit:junit": { - "locked": "4.13" + "locked": "4.13.1" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -1006,7 +1006,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.36.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -1045,7 +1045,7 @@ "locked": "1" }, "junit:junit": { - "locked": "4.13" + "locked": "4.13.1" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index a79153c7..92f0dec5 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -122,7 +122,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.36.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -199,7 +199,7 @@ "locked": "1.9.18" }, "com.netflix.governator:governator-core": { - "locked": "1.17.10" + "locked": "1.17.11" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -344,7 +344,7 @@ "locked": "1.9.18" }, "com.netflix.governator:governator-core": { - "locked": "1.17.10" + "locked": "1.17.11" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -500,7 +500,7 @@ "locked": "1.9.18" }, "com.netflix.governator:governator-core": { - "locked": "1.17.10" + "locked": "1.17.11" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -603,7 +603,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.36.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -711,7 +711,7 @@ "locked": "1.9.18" }, "com.netflix.governator:governator-core": { - "locked": "1.17.10" + "locked": "1.17.11" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -814,7 +814,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.36.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ @@ -903,7 +903,7 @@ "locked": "1.9.18" }, "com.netflix.governator:governator-core": { - "locked": "1.17.10" + "locked": "1.17.11" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -1053,7 +1053,7 @@ "locked": "1.9.18" }, "com.netflix.governator:governator-core": { - "locked": "1.17.10" + "locked": "1.17.11" }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ @@ -1156,7 +1156,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.36.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ From 12b62a9e9299718a087a82b3f77fbe415730fc50 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 20 Jan 2021 15:04:25 -0800 Subject: [PATCH 187/273] core: add checks to chunked encoding for http/2 --- .../Http2ContentLengthEnforcingHandler.java | 100 ++++++++++++++ .../server/http2/Http2OrHttpHandler.java | 5 +- .../server/http2/Http2StreamInitializer.java | 1 + ...ttp2ContentLengthEnforcingHandlerTest.java | 126 ++++++++++++++++++ 4 files changed, 229 insertions(+), 3 deletions(-) create mode 100644 zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2ContentLengthEnforcingHandler.java create mode 100644 zuul-core/src/test/java/com/netflix/zuul/netty/server/http2/Http2ContentLengthEnforcingHandlerTest.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2ContentLengthEnforcingHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2ContentLengthEnforcingHandler.java new file mode 100644 index 00000000..4e37d87e --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2ContentLengthEnforcingHandler.java @@ -0,0 +1,100 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.netty.server.http2; + +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelInboundHandlerAdapter; +import io.netty.handler.codec.http.HttpContent; +import io.netty.handler.codec.http.HttpHeaderNames; +import io.netty.handler.codec.http.HttpRequest; +import io.netty.handler.codec.http.HttpUtil; +import io.netty.handler.codec.http.LastHttpContent; +import io.netty.handler.codec.http2.DefaultHttp2ResetFrame; +import io.netty.handler.codec.http2.Http2Error; +import java.util.List; + +/** + * This class is only suitable for use on HTTP/2 child channels. + */ +public final class Http2ContentLengthEnforcingHandler extends ChannelInboundHandlerAdapter { + private static final long UNSET_CONTENT_LENGTH = -1; + + private long expectedContentLength = UNSET_CONTENT_LENGTH; + + private long seenContentLength; + + /** + * This checks that the content length does what it says, preventing a client from causing Zuul to misinterpret the + * request. Because this class is meant to work in an HTTP/2 setting, the content length and transfer encoding + * checks are more semantics. In particular, this checks: + *

    + *
  • No duplicate Content length
  • + *
  • Content Length (if present) must always be greater than or equal to how much content has been seen
  • + *
  • Content Length (if present) must always be equal to how much content has been seen by the end
  • + *
  • Content Length cannot be present along with chunked transfer encoding.
  • + *
+ */ + @Override + public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { + if (msg instanceof HttpRequest) { + HttpRequest req = (HttpRequest) msg; + List lengthHeaders = req.headers().getAll(HttpHeaderNames.CONTENT_LENGTH); + if (lengthHeaders.size() > 1) { + ctx.writeAndFlush(new DefaultHttp2ResetFrame(Http2Error.PROTOCOL_ERROR)); + return; + } else if (lengthHeaders.size() == 1) { + expectedContentLength = Long.parseLong(lengthHeaders.get(0)); + if (expectedContentLength < 0) { + // TODO(carl-mastrangelo): this is not right, but meh. Fix this to return a proper 400. + ctx.writeAndFlush(new DefaultHttp2ResetFrame(Http2Error.PROTOCOL_ERROR)); + return; + } + } + if (hasContentLength() && HttpUtil.isTransferEncodingChunked(req)) { + // TODO(carl-mastrangelo): this is not right, but meh. Fix this to return a proper 400. + ctx.writeAndFlush(new DefaultHttp2ResetFrame(Http2Error.PROTOCOL_ERROR)); + return; + } + } + if (msg instanceof HttpContent) { + ByteBuf content = ((HttpContent) msg).content(); + incrementSeenContent(content.readableBytes()); + if (hasContentLength() && seenContentLength > expectedContentLength) { + // TODO(carl-mastrangelo): this is not right, but meh. Fix this to return a proper 400. + ctx.writeAndFlush(new DefaultHttp2ResetFrame(Http2Error.PROTOCOL_ERROR)); + return; + } + } + if (msg instanceof LastHttpContent) { + if (hasContentLength() && seenContentLength != expectedContentLength) { + // TODO(carl-mastrangelo): this is not right, but meh. Fix this to return a proper 400. + ctx.writeAndFlush(new DefaultHttp2ResetFrame(Http2Error.PROTOCOL_ERROR)); + return; + } + } + super.channelRead(ctx, msg); + } + + private boolean hasContentLength() { + return expectedContentLength != UNSET_CONTENT_LENGTH; + } + + private void incrementSeenContent(int length) { + seenContentLength = Math.addExact(seenContentLength, length); + } +} diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2OrHttpHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2OrHttpHandler.java index ad055f46..7208da52 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2OrHttpHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2OrHttpHandler.java @@ -16,6 +16,8 @@ package com.netflix.zuul.netty.server.http2; +import static com.netflix.zuul.netty.server.BaseZuulChannelInitializer.HTTP_CODEC_HANDLER_NAME; + import com.netflix.netty.common.channel.config.ChannelConfig; import com.netflix.netty.common.channel.config.CommonChannelConfigKeys; import com.netflix.netty.common.http2.DynamicHttp2FrameLogger; @@ -33,11 +35,8 @@ import io.netty.handler.ssl.ApplicationProtocolNames; import io.netty.handler.ssl.ApplicationProtocolNegotiationHandler; import io.netty.util.AttributeKey; - import java.util.function.Consumer; -import static com.netflix.zuul.netty.server.BaseZuulChannelInitializer.HTTP_CODEC_HANDLER_NAME; - /** * Http2 Or Http Handler * diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java index 815d7798..85c72930 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java @@ -85,6 +85,7 @@ protected void addHttp2StreamSpecificHandlers(ChannelPipeline pipeline) pipeline.addLast("h2_downgrader", new Http2StreamFrameToHttpObjectCodec(true)); pipeline.addLast(http2StreamErrorHandler); pipeline.addLast(http2StreamHeaderCleaner); + pipeline.addLast(new Http2ContentLengthEnforcingHandler()); } protected void copyAttrsFromParentChannel(Channel parent, Channel child) diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/server/http2/Http2ContentLengthEnforcingHandlerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/server/http2/Http2ContentLengthEnforcingHandlerTest.java new file mode 100644 index 00000000..fae34081 --- /dev/null +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/server/http2/Http2ContentLengthEnforcingHandlerTest.java @@ -0,0 +1,126 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.netflix.zuul.netty.server.http2; + +import static com.google.common.truth.Truth.assertThat; + +import io.netty.buffer.ByteBufUtil; +import io.netty.buffer.UnpooledByteBufAllocator; +import io.netty.channel.embedded.EmbeddedChannel; +import io.netty.handler.codec.http.DefaultHttpContent; +import io.netty.handler.codec.http.DefaultHttpRequest; +import io.netty.handler.codec.http.DefaultLastHttpContent; +import io.netty.handler.codec.http.HttpHeaderNames; +import io.netty.handler.codec.http.HttpMethod; +import io.netty.handler.codec.http.HttpRequest; +import io.netty.handler.codec.http.HttpVersion; +import io.netty.handler.codec.http2.Http2ResetFrame; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class Http2ContentLengthEnforcingHandlerTest { + + @Test + public void failsOnMultipleContentLength() { + EmbeddedChannel chan = new EmbeddedChannel(); + chan.pipeline().addLast(new Http2ContentLengthEnforcingHandler()); + + HttpRequest req = new DefaultHttpRequest( + HttpVersion.HTTP_1_1, HttpMethod.GET, ""); + req.headers().add(HttpHeaderNames.CONTENT_LENGTH, 1); + req.headers().add(HttpHeaderNames.CONTENT_LENGTH, 2); + chan.writeInbound(req); + + Object out = chan.readOutbound(); + assertThat(out).isInstanceOf(Http2ResetFrame.class); + } + + @Test + public void failsOnMixedContentLengthAndChunked() { + EmbeddedChannel chan = new EmbeddedChannel(); + chan.pipeline().addLast(new Http2ContentLengthEnforcingHandler()); + + HttpRequest req = new DefaultHttpRequest( + HttpVersion.HTTP_1_1, HttpMethod.GET, ""); + req.headers().add(HttpHeaderNames.CONTENT_LENGTH, 1); + req.headers().add(HttpHeaderNames.TRANSFER_ENCODING, "identity, chunked"); + req.headers().add(HttpHeaderNames.TRANSFER_ENCODING, "fzip"); + chan.writeInbound(req); + + Object out = chan.readOutbound(); + assertThat(out).isInstanceOf(Http2ResetFrame.class); + } + + @Test + public void failsOnShortContentLength() { + EmbeddedChannel chan = new EmbeddedChannel(); + chan.pipeline().addLast(new Http2ContentLengthEnforcingHandler()); + + DefaultHttpRequest req = new DefaultHttpRequest( + HttpVersion.HTTP_1_1, HttpMethod.GET, ""); + req.headers().add(HttpHeaderNames.CONTENT_LENGTH, 1); + chan.writeInbound(req); + + Object out = chan.readOutbound(); + assertThat(out).isNull(); + + DefaultHttpContent content = + new DefaultHttpContent(ByteBufUtil.writeUtf8(UnpooledByteBufAllocator.DEFAULT, "a")); + chan.writeInbound(content); + + out = chan.readOutbound(); + assertThat(out).isNull(); + + DefaultHttpContent content2 = + new DefaultHttpContent(ByteBufUtil.writeUtf8(UnpooledByteBufAllocator.DEFAULT, "a")); + chan.writeInbound(content2); + + out = chan.readOutbound(); + assertThat(out).isInstanceOf(Http2ResetFrame.class); + } + + @Test + public void failsOnShortContent() { + EmbeddedChannel chan = new EmbeddedChannel(); + chan.pipeline().addLast(new Http2ContentLengthEnforcingHandler()); + + DefaultHttpRequest req = new DefaultHttpRequest( + HttpVersion.HTTP_1_1, HttpMethod.GET, ""); + req.headers().add(HttpHeaderNames.CONTENT_LENGTH, 2); + chan.writeInbound(req); + + Object out = chan.readOutbound(); + assertThat(out).isNull(); + + DefaultHttpContent content = + new DefaultHttpContent(ByteBufUtil.writeUtf8(UnpooledByteBufAllocator.DEFAULT, "a")); + chan.writeInbound(content); + + out = chan.readOutbound(); + assertThat(out).isNull(); + + DefaultHttpContent content2 = new DefaultLastHttpContent(); + chan.writeInbound(content2); + + out = chan.readOutbound(); + assertThat(out).isInstanceOf(Http2ResetFrame.class); + } + +} From a93cbf615d7efcd129122868fc398a1fda1a9d53 Mon Sep 17 00:00:00 2001 From: Brian Tarricone Date: Wed, 20 Jan 2021 15:49:28 -0800 Subject: [PATCH 188/273] Ensure SessionContext isn't modified when iterating over it (#978) When routing debugging is enabled, Zuul will record changes in the session context after each filter is run. If the context already has a "routingDebug" property on it, all will be fine. If not, the comparison code will (as a side effect) add that property. However, it's added while there is an active iterator over the context. Once the code tries to fetch the next element from the iterator, a ConcurrentModificationException is thrown. --- .../src/main/java/com/netflix/zuul/context/Debug.java | 4 ++++ .../test/java/com/netflix/zuul/context/DebugTest.java | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/zuul-core/src/main/java/com/netflix/zuul/context/Debug.java b/zuul-core/src/main/java/com/netflix/zuul/context/Debug.java index 3f7724c8..a44dab61 100755 --- a/zuul-core/src/main/java/com/netflix/zuul/context/Debug.java +++ b/zuul-core/src/main/java/com/netflix/zuul/context/Debug.java @@ -121,6 +121,10 @@ public static List getRequestDebug(SessionContext ctx) { */ public static void compareContextState(String filterName, SessionContext context, SessionContext copy) { // TODO - only comparing Attributes. Need to compare the messages too. + + // Ensure that the routingDebug property already exists, otherwise we'll have a ConcurrentModificationException below + getRoutingDebug(context); + Iterator it = context.keySet().iterator(); String key = it.next(); while (key != null) { diff --git a/zuul-core/src/test/java/com/netflix/zuul/context/DebugTest.java b/zuul-core/src/test/java/com/netflix/zuul/context/DebugTest.java index b95e499d..b3131fd1 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/context/DebugTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/context/DebugTest.java @@ -163,4 +163,14 @@ public void testWriteResponseDebug_WithBody() { "RESPONSE_INBOUND:: < HDR: lah:deda", "RESPONSE_INBOUND:: < BODY: response text"); } + + @Test + public void testNoCMEWhenComparingContexts() { + final SessionContext context = new SessionContext(); + final SessionContext copy = new SessionContext(); + + context.set("foo", "bar"); + + Debug.compareContextState("testfilter", context, copy); + } } From 21c534c376bfb9cc840f73b2503a889acc53c1b0 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 21 Jan 2021 17:44:31 -0800 Subject: [PATCH 189/273] core: add a named socket class for use with Server startup --- .../zuul/netty/server/BaseServerStartup.java | 4 +- .../zuul/netty/server/NamedSocketAddress.java | 64 +++++++++++++++++++ .../com/netflix/zuul/netty/server/Server.java | 21 +++--- .../netflix/zuul/netty/server/ServerTest.java | 6 +- .../zuul/sample/SampleServerStartup.java | 18 +++--- 5 files changed, 90 insertions(+), 23 deletions(-) create mode 100644 zuul-core/src/main/java/com/netflix/zuul/netty/server/NamedSocketAddress.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java index c2fe3160..51dbba3c 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java @@ -68,7 +68,7 @@ public abstract class BaseServerStartup protected final FilterLoader filterLoader; protected final FilterUsageNotifier usageNotifier; - private Map> addrsToChannelInitializers; + private Map> addrsToChannelInitializers; private ClientConnectionsShutdown clientConnectionsShutdown; private Server server; @@ -127,7 +127,7 @@ protected Map choosePortsAndChannels(ChannelGroup c } @ForOverride - protected Map> chooseAddrsAndChannels(ChannelGroup clientChannels) { + protected Map> chooseAddrsAndChannels(ChannelGroup clientChannels) { @SuppressWarnings("unchecked") // Channel init map has the wrong generics and we can't fix without api breakage. Map> portMap = (Map>) (Map) choosePortsAndChannels(clientChannels); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/NamedSocketAddress.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/NamedSocketAddress.java new file mode 100644 index 00000000..18173786 --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/NamedSocketAddress.java @@ -0,0 +1,64 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.netty.server; + +import java.net.SocketAddress; +import java.util.Objects; + +public final class NamedSocketAddress extends SocketAddress { + + private final String name; + private final SocketAddress delegate; + + public NamedSocketAddress(String name, SocketAddress delegate) { + this.name = Objects.requireNonNull(name); + this.delegate = Objects.requireNonNull(delegate); + } + + public String name() { + return name; + } + + public SocketAddress unwrap() { + return delegate; + } + + @Override + public String toString() { + return "NamedSocketAddress{" + + "name='" + name + '\'' + + ", delegate=" + delegate + + '}'; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NamedSocketAddress that = (NamedSocketAddress) o; + return Objects.equals(name, that.name) && Objects.equals(delegate, that.delegate); + } + + @Override + public int hashCode() { + return Objects.hash(name, delegate); + } +} diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java index be617b2a..1167c45f 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java @@ -121,7 +121,7 @@ public class Server private ServerGroup serverGroup; private final ClientConnectionsShutdown clientConnectionsShutdown; private final ServerStatusManager serverStatusManager; - private final Map> addressesToInitializers; + private final Map> addressesToInitializers; private final EventLoopConfig eventLoopConfig; /** @@ -160,7 +160,7 @@ public Server(Map portsToChannelInitializers, Serve } public Server(Registry registry, ServerStatusManager serverStatusManager, - Map> addressesToInitializers, + Map> addressesToInitializers, ClientConnectionsShutdown clientConnectionsShutdown, EventLoopGroupMetrics eventLoopGroupMetrics, EventLoopConfig eventLoopConfig) { this.registry = Objects.requireNonNull(registry); @@ -194,7 +194,7 @@ public void start(boolean sync) List allBindFutures = new ArrayList<>(addressesToInitializers.size()); // Setup each of the channel initializers on requested ports. - for (Map.Entry> entry + for (Map.Entry> entry : addressesToInitializers.entrySet()) { ChannelFuture nettyServerFuture = setupServerBootstrap(entry.getKey(), entry.getValue()); serverGroup.addListeningServer(nettyServerFuture.channel()); @@ -240,7 +240,7 @@ public void gracefullyShutdownConnections() } private ChannelFuture setupServerBootstrap( - SocketAddress listenAddress, ChannelInitializer channelInitializer) throws InterruptedException { + NamedSocketAddress listenAddress, ChannelInitializer channelInitializer) throws InterruptedException { ServerBootstrap serverBootstrap = new ServerBootstrap().group(serverGroup.clientToProxyBossPool, serverGroup.clientToProxyWorkerPool); @@ -275,7 +275,7 @@ private ChannelFuture setupServerBootstrap( } // Bind and start to accept incoming connections. - ChannelFuture bindFuture = serverBootstrap.bind(listenAddress); + ChannelFuture bindFuture = serverBootstrap.bind(listenAddress.unwrap()); ByteBufAllocator alloc = bindFuture.channel().alloc(); if (alloc instanceof ByteBufAllocatorMetricProvider) { @@ -482,12 +482,15 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception } } - static Map> convertPortMap( + static Map> convertPortMap( Map> portsToChannelInitializers) { - Map> addrsToInitializers = + Map> addrsToInitializers = new LinkedHashMap<>(portsToChannelInitializers.size()); - for (Map.Entry> portToInitializer : portsToChannelInitializers.entrySet()){ - addrsToInitializers.put(new InetSocketAddress(portToInitializer.getKey()), portToInitializer.getValue()); + for (Map.Entry> portToInitializer : portsToChannelInitializers.entrySet()) { + int portNumber = portToInitializer.getKey(); + addrsToInitializers.put( + new NamedSocketAddress("port" + portNumber, new InetSocketAddress(portNumber)), + portToInitializer.getValue()); } return Collections.unmodifiableMap(addrsToInitializers); } diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java index 57263fa4..07fc5628 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java @@ -48,15 +48,15 @@ public class ServerTest { @Test public void getListeningSockets() throws Exception { ServerStatusManager ssm = mock(ServerStatusManager.class); - Map> initializers = new HashMap<>(); + Map> initializers = new HashMap<>(); ChannelInitializer init = new ChannelInitializer() { @Override protected void initChannel(Channel ch) {} }; - initializers.put(new InetSocketAddress(0), init); + initializers.put(new NamedSocketAddress("test", new InetSocketAddress(0)), init); // Pick an InetAddress likely different than the above. The port to channel map has a unique Key; this // prevents the key being a duplicate. - initializers.put(new InetSocketAddress(InetAddress.getLocalHost(), 0), init); + initializers.put(new NamedSocketAddress("test2", new InetSocketAddress(InetAddress.getLocalHost(), 0)), init); ClientConnectionsShutdown ccs = new ClientConnectionsShutdown( new DefaultChannelGroup(GlobalEventExecutor.INSTANCE), diff --git a/zuul-sample/src/main/java/com/netflix/zuul/sample/SampleServerStartup.java b/zuul-sample/src/main/java/com/netflix/zuul/sample/SampleServerStartup.java index cb894ec9..51fd4783 100644 --- a/zuul-sample/src/main/java/com/netflix/zuul/sample/SampleServerStartup.java +++ b/zuul-sample/src/main/java/com/netflix/zuul/sample/SampleServerStartup.java @@ -89,8 +89,8 @@ public SampleServerStartup(ServerStatusManager serverStatusManager, FilterLoader } @Override - protected Map> chooseAddrsAndChannels(ChannelGroup clientChannels) { - Map> addrsToChannels = new HashMap<>(); + protected Map> chooseAddrsAndChannels(ChannelGroup clientChannels) { + Map> addrsToChannels = new HashMap<>(); SocketAddress sockAddr; String metricId; { @@ -131,7 +131,7 @@ protected Map> chooseAddrsAndChannels(Chann channelConfig.set(CommonChannelConfigKeys.withProxyProtocol, false); addrsToChannels.put( - sockAddr, + new NamedSocketAddress("http", sockAddr), new ZuulServerChannelInitializer( metricId, channelConfig, channelDependencies, clientChannels)); logAddrConfigured(sockAddr); @@ -155,7 +155,7 @@ protected Map> chooseAddrsAndChannels(Chann addHttp2DefaultConfig(channelConfig, mainListenAddressName); addrsToChannels.put( - sockAddr, + new NamedSocketAddress("http2", sockAddr), new Http2SslChannelInitializer( metricId, channelConfig, channelDependencies, clientChannels)); logAddrConfigured(sockAddr, sslConfig); @@ -186,7 +186,7 @@ protected Map> chooseAddrsAndChannels(Chann channelConfig.set(CommonChannelConfigKeys.sslContextFactory, new BaseSslContextFactory(registry, sslConfig)); addrsToChannels.put( - sockAddr, + new NamedSocketAddress("http_mtls", sockAddr), new Http1MutualSslChannelInitializer( metricId, channelConfig, channelDependencies, clientChannels)); logAddrConfigured(sockAddr, sslConfig); @@ -203,13 +203,13 @@ protected Map> chooseAddrsAndChannels(Chann channelDependencies.set(ZuulDependencyKeys.pushConnectionRegistry, pushConnectionRegistry); addrsToChannels.put( - sockAddr, + new NamedSocketAddress("websocket", sockAddr), new SampleWebSocketPushChannelInitializer( metricId, channelConfig, channelDependencies, clientChannels)); logAddrConfigured(sockAddr); // port to accept push message from the backend, should be accessible on internal network only. - addrsToChannels.put(pushSockAddr, pushSenderInitializer); + addrsToChannels.put(new NamedSocketAddress("http.push", pushSockAddr), pushSenderInitializer); logAddrConfigured(pushSockAddr); break; @@ -224,12 +224,12 @@ protected Map> chooseAddrsAndChannels(Chann channelDependencies.set(ZuulDependencyKeys.pushConnectionRegistry, pushConnectionRegistry); addrsToChannels.put( - sockAddr, + new NamedSocketAddress("sse", sockAddr), new SampleSSEPushChannelInitializer( metricId, channelConfig, channelDependencies, clientChannels)); logAddrConfigured(sockAddr); // port to accept push message from the backend, should be accessible on internal network only. - addrsToChannels.put(pushSockAddr, pushSenderInitializer); + addrsToChannels.put(new NamedSocketAddress("http.push", pushSockAddr), pushSenderInitializer); logAddrConfigured(pushSockAddr); break; } From 4752fcf3d3eed0e177224cf9d81fc4a688233521 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 22 Jan 2021 14:06:33 -0800 Subject: [PATCH 190/273] core: separate Server starting and waiting, and expose listening sockets --- .../zuul/netty/server/NamedSocketAddress.java | 6 ++ .../com/netflix/zuul/netty/server/Server.java | 68 +++++++------------ .../netflix/zuul/netty/server/ServerTest.java | 12 ++-- .../com/netflix/zuul/sample/Bootstrap.java | 3 +- 4 files changed, 38 insertions(+), 51 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/NamedSocketAddress.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/NamedSocketAddress.java index 18173786..8b9e8835 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/NamedSocketAddress.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/NamedSocketAddress.java @@ -18,6 +18,7 @@ import java.net.SocketAddress; import java.util.Objects; +import javax.annotation.CheckReturnValue; public final class NamedSocketAddress extends SocketAddress { @@ -37,6 +38,11 @@ public SocketAddress unwrap() { return delegate; } + @CheckReturnValue + public NamedSocketAddress withNewSocket(SocketAddress delegate) { + return new NamedSocketAddress(this.name, delegate); + } + @Override public String toString() { return "NamedSocketAddress{" + diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java index 1167c45f..f00cf6ce 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java @@ -62,17 +62,14 @@ import io.netty.util.concurrent.EventExecutorChooserFactory; import io.netty.util.concurrent.ThreadPerTaskExecutor; import java.net.InetSocketAddress; -import java.net.SocketAddress; import java.nio.channels.spi.SelectorProvider; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashMap; -import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Objects; -import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; import java.util.concurrent.ThreadFactory; @@ -122,6 +119,10 @@ public class Server private final ClientConnectionsShutdown clientConnectionsShutdown; private final ServerStatusManager serverStatusManager; private final Map> addressesToInitializers; + /** + * Unlike the above, the socket addresses in this map are the *bound* addresses, rather than the requested ones. + */ + private final Map addressesToChannels = new LinkedHashMap<>(); private final EventLoopConfig eventLoopConfig; /** @@ -185,7 +186,7 @@ public void stop() { LOG.info("Completed zuul shutdown."); } - public void start(boolean sync) + public void start() { serverGroup = new ServerGroup( "Salamander", eventLoopConfig.acceptorCount(), eventLoopConfig.eventLoopCount(), eventLoopGroupMetrics); @@ -196,30 +197,29 @@ public void start(boolean sync) // Setup each of the channel initializers on requested ports. for (Map.Entry> entry : addressesToInitializers.entrySet()) { - ChannelFuture nettyServerFuture = setupServerBootstrap(entry.getKey(), entry.getValue()); - serverGroup.addListeningServer(nettyServerFuture.channel()); + NamedSocketAddress requestedNamedAddr = entry.getKey(); + ChannelFuture nettyServerFuture = setupServerBootstrap(requestedNamedAddr, entry.getValue()); + Channel chan = nettyServerFuture.channel(); + addressesToChannels.put(requestedNamedAddr.withNewSocket(chan.localAddress()), chan); allBindFutures.add(nettyServerFuture); } - - // Once all server bootstraps are successfully initialized, then bind to each port. - for (ChannelFuture f : allBindFutures) { - // Wait until the server socket is closed. - ChannelFuture cf = f.channel().closeFuture(); - if (sync) { - cf.sync(); - } - } } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } - public final List getListeningAddresses() { + public final void awaitTermination() throws InterruptedException { + for (Channel chan : addressesToChannels.values()) { + chan.closeFuture().sync(); + } + } + + public final List getListeningAddresses() { if (serverGroup == null) { throw new IllegalStateException("Server has not been started"); } - return serverGroup.getListeningAddresses(); + return Collections.unmodifiableList(new ArrayList<>(addressesToChannels.keySet())); } @VisibleForTesting @@ -245,7 +245,7 @@ private ChannelFuture setupServerBootstrap( new ServerBootstrap().group(serverGroup.clientToProxyBossPool, serverGroup.clientToProxyWorkerPool); // Choose socket options. - Map channelOptions = new HashMap<>(); + Map, Object> channelOptions = new HashMap<>(); channelOptions.put(ChannelOption.SO_BACKLOG, 128); channelOptions.put(ChannelOption.SO_LINGER, -1); channelOptions.put(ChannelOption.TCP_NODELAY, true); @@ -255,12 +255,12 @@ private ChannelFuture setupServerBootstrap( serverBootstrap.channel(serverGroup.channelType); // Apply socket options. - for (Map.Entry optionEntry : channelOptions.entrySet()) { - serverBootstrap = serverBootstrap.option(optionEntry.getKey(), optionEntry.getValue()); + for (Map.Entry, ?> optionEntry : channelOptions.entrySet()) { + serverBootstrap = serverBootstrap.option((ChannelOption) optionEntry.getKey(), optionEntry.getValue()); } // Apply transport specific socket options. - for (Map.Entry optionEntry : serverGroup.transportChannelOptions.entrySet()) { - serverBootstrap = serverBootstrap.option(optionEntry.getKey(), optionEntry.getValue()); + for (Map.Entry, ?> optionEntry : serverGroup.transportChannelOptions.entrySet()) { + serverBootstrap = serverBootstrap.option((ChannelOption) optionEntry.getKey(), optionEntry.getValue()); } serverBootstrap.handler(new NewConnHandler()); @@ -317,16 +317,10 @@ private final class ServerGroup private EventLoopGroup clientToProxyBossPool; private EventLoopGroup clientToProxyWorkerPool; private Class channelType; - private Map transportChannelOptions; + private Map, ?> transportChannelOptions; private volatile boolean stopped = false; - private final Set nettyServers = new LinkedHashSet<>(); - - void addListeningServer(Channel channel) { - nettyServers.add(channel); - } - private ServerGroup(String name, int acceptorThreads, int workerThreads, EventLoopGroupMetrics eventLoopGroupMetrics) { this.name = name; this.acceptorThreads = acceptorThreads; @@ -342,17 +336,6 @@ public void uncaughtException(final Thread t, final Throwable e) { Runtime.getRuntime().addShutdownHook(jvmShutdownHook); } - synchronized List getListeningAddresses() { - if (stopped) { - return Collections.emptyList(); - } - List listeningAddresses = new ArrayList<>(nettyServers.size()); - for (Channel nettyServer : nettyServers) { - listeningAddresses.add(nettyServer.localAddress()); - } - return Collections.unmodifiableList(listeningAddresses); - } - private void initializeTransport() { // TODO - try our own impl of ChooserFactory that load-balances across the eventloops using leastconns algo? @@ -366,7 +349,7 @@ private void initializeTransport() ThreadFactory workerThreadFactory = new CategorizedThreadFactory(name + "-ClientToZuulWorker"); Executor workerExecutor = new ThreadPerTaskExecutor(workerThreadFactory); - Map extraOptions = new HashMap<>(); + Map, Object> extraOptions = new HashMap<>(); boolean useNio = FORCE_NIO.get(); if (!useNio && epollIsAvailable()) { channelType = EpollServerSocketChannel.class; @@ -421,9 +404,6 @@ synchronized private void stop() return; } - // TODO(carl-mastrangelo): shutdown the netty servers accepting new connections. - nettyServers.clear(); - if (MANUAL_DISCOVERY_STATUS.get()) { // Flag status as down. // that we can flag to return DOWN here (would that then update Discovery? or still be a delay?) diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java index 07fc5628..75493694 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java @@ -75,14 +75,14 @@ public int acceptorCount() { } }; Server s = new Server(new NoopRegistry(), ssm, initializers, ccs, elgm, elc); - s.start(/* sync= */ false); + s.start(); - List addrs = s.getListeningAddresses(); + List addrs = s.getListeningAddresses(); assertEquals(2, addrs.size()); - assertTrue(addrs.get(0) instanceof InetSocketAddress); - assertNotEquals(((InetSocketAddress) addrs.get(0)).getPort(), 0); - assertTrue(addrs.get(1) instanceof InetSocketAddress); - assertNotEquals(((InetSocketAddress) addrs.get(1)).getPort(), 0); + assertTrue(addrs.get(0).unwrap() instanceof InetSocketAddress); + assertNotEquals(((InetSocketAddress) addrs.get(0).unwrap()).getPort(), 0); + assertTrue(addrs.get(1).unwrap() instanceof InetSocketAddress); + assertNotEquals(((InetSocketAddress) addrs.get(1).unwrap()).getPort(), 0); s.stop(); } diff --git a/zuul-sample/src/main/java/com/netflix/zuul/sample/Bootstrap.java b/zuul-sample/src/main/java/com/netflix/zuul/sample/Bootstrap.java index e4085064..153e0087 100644 --- a/zuul-sample/src/main/java/com/netflix/zuul/sample/Bootstrap.java +++ b/zuul-sample/src/main/java/com/netflix/zuul/sample/Bootstrap.java @@ -48,7 +48,8 @@ public void start() { long startupDuration = System.currentTimeMillis() - startTime; System.out.println("Zuul Sample: finished startup. Duration = " + startupDuration + " ms"); - server.start(true); + server.start(); + server.awaitTermination(); } catch (Throwable t) { t.printStackTrace(); From feeade8ca42ebf4241671bdb41db03146099458a Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 28 Jan 2021 14:34:23 -0800 Subject: [PATCH 191/273] core: silence uri exception spam in logs --- .../netflix/zuul/message/http/HttpRequestMessageImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java index 89451936..28bff583 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java +++ b/zuul-core/src/main/java/com/netflix/zuul/message/http/HttpRequestMessageImpl.java @@ -585,7 +585,7 @@ protected String _reconstructURI() String scheme = getOriginalScheme().toLowerCase(); uri.append(scheme); - uri.append(URI_SCHEME_SEP).append(getOriginalHost()); + uri.append(URI_SCHEME_SEP).append(getOriginalHost(getHeaders(), getServerName())); int port = getOriginalPort(); if ((URI_SCHEME_HTTP.equals(scheme) && 80 == port) @@ -599,6 +599,11 @@ protected String _reconstructURI() return uri.toString(); } + catch (URISyntaxException e) { + // This is not really so bad, just debug log it and move on. + LOG.debug("Error reconstructing request URI!", e); + return ""; + } catch (Exception e) { LOG.error("Error reconstructing request URI!", e); return ""; From 2b86803f0005486b1924187faa629c16e434a1b3 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 29 Jan 2021 10:02:38 -0800 Subject: [PATCH 192/273] zuul-core: silence SSL related failures that are normal --- .../server/ssl/SslHandshakeInfoHandler.java | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java index 7055680d..b2ab429c 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java @@ -99,12 +99,7 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc // Metrics. incrementCounters(sslEvent, info); - if (logger.isDebugEnabled()) { - logger.debug("Successful SSL Handshake: " + info); - } else if (logger.isInfoEnabled()) { - logger.info("Successful SSL Handshake: protocol={}, ciphersuite={}, has_client_cert={}", - info.getProtocol(), info.getCipherSuite(), info.getClientCertificate() != null); - } + logger.debug("Successful SSL Handshake: {}", info); } else { String clientIP = ctx.channel().attr(SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS).get(); Throwable cause = sslEvent.cause(); @@ -118,17 +113,17 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc // NOTE: we were seeing a lot of these in prod and can repro by just telnetting to port and then closing terminal // without sending anything. // So don't treat these as SSL handshake failures. - logger.info("Client closed connection or it idle timed-out without doing an ssl handshake. " + logger.debug("Client closed connection or it idle timed-out without doing an ssl handshake. " + ", client_ip = " + clientIP + ", channel_info = " + ChannelUtils.channelInfoForLogging(ctx.channel())); } else if (cause instanceof SSLException && cause.getMessage().contains("handshake timed out")) { - logger.info("Client timed-out doing the ssl handshake. " + logger.debug("Client timed-out doing the ssl handshake. " + ", client_ip = " + clientIP + ", channel_info = " + ChannelUtils.channelInfoForLogging(ctx.channel())); } else if (cause instanceof SSLException && cause.getMessage().contains("failure when writing TLS control frames")) { // This can happen if the ClientHello is sent followed by a RST packet, before we can respond. - logger.info("Client terminated handshake early." + logger.debug("Client terminated handshake early." + ", client_ip = " + clientIP + ", channel_info = " + ChannelUtils.channelInfoForLogging(ctx.channel())); } else { @@ -137,9 +132,9 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc + ", channel_info = " + ChannelUtils.channelInfoForLogging(ctx.channel()) + ", error = " + cause; if (cause instanceof ClosedChannelException) { - logger.warn(msg); + logger.debug(msg); } else { - logger.warn(msg, cause); + logger.debug(msg, cause); } incrementCounters(sslEvent, null); } @@ -153,7 +148,7 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc } else if (evt instanceof SslCloseCompletionEvent) { // TODO - increment a separate metric for this event? } else if (evt instanceof SniCompletionEvent) { - logger.debug("SNI Parsing Complete: " + evt.toString()); + logger.debug("SNI Parsing Complete: {}", evt); SniCompletionEvent sniCompletionEvent = (SniCompletionEvent) evt; if (sniCompletionEvent.isSuccess()) { From cf528fef06432f34eac7437d992ccb668adb18e4 Mon Sep 17 00:00:00 2001 From: sullis Date: Mon, 1 Feb 2021 10:30:14 -0800 Subject: [PATCH 193/273] all: upgrade to Gradle 6.8.1 (#987) https://docs.gradle.org/6.8.1/release-notes.html --- gradle/wrapper/gradle-wrapper.jar | Bin 58694 -> 59203 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 2 ++ gradlew.bat | 22 ++++------------------ 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 490fda8577df6c95960ba7077c43220e5bb2c0d9..e708b1c023ec8b20f512888fe07c5bd3ff77bb8f 100644 GIT binary patch delta 6763 zcmY*d1yoeux`&}Vq&vkKkdST|x*Texk(LmoVTd`>NXyV2GNg!rf(VL8i*$EN2vQ>@ z;N#D`_q}`1+H37!e0#5N@4e1G>wMk)I9~^G>X1a_WjI_~vbb1S(*#&p%2+6`3073w z_+8Wx5fspSazTIgyF^r`bS;8?ttUY=Y16txqx|`pNOoTEXlylV?ZsN$4tQ-aeaKtq;EDcj#ufS~X5l)PmBL0VS*h=y3Li+qdct?J z?FcClysNWmO;%pTGK&0{S_(f?(9-*~A4I!CEfl8GR%`}qg?-86`CE5zW!0SOyaivY zkiRhoaHaER6Q_#*#;TWTrMbR`wnw-+IwyT}G_Z5l`tjySt-xO`<&)UUZwX2Ld8F2m zJ}lBiid@DLwV|>iW$We*nVYK+pYM|g16_-dViOg5hU z12mN~ZOI~wq~?bH6`?&%QPx%Oem!8RCQF5u9v+db?p1llbB#50c|OX|hdmiW_zca5{dg}^%gRxH=Km$u-rHFt@BQoXyPF};v=|*+6LX_Q1Y@ANn^PO4 z8{Xd0jfmXY$+tS+ht-;FSvu*NayB}Le*;qjG0~GLdCcZt9hQ=Dcqm541h&P^*D7i2 zjQ1ZvD?d3pgWVZdWc#a84*b5Ug{Xb{ik?j8PLoKC_(~YEpM62*aJ zZB#?v!EsJzb+SY~8IZPc8i~QVIN*M`%-1ETmPh0svA|IPHGIpgN@1qrI#oURd&D}1 zF8N(b&f*)U4Fd80nXK%cU2Emg0pB0^m`EgvMy#1s@#h$vR3GT$D6K~OnEevY$Zcb2 zIb>0NtmvAkM0D?hm}!5>U>Qes7^o^c#NE-n)>XTTVmjteT9K^(tHp=Zzz1w_flA|~ zJ0H}!3el>5^;y10E)!Y1>Op4dG)A)7Y3S6d2no-@=MzeZ5i)~sZsGN*i-)FKKR=Bi zzQ&hs&&pO$H^lv*kT7RA7`a|7p6GFN_L3_fhIU#8DJ1hvC<<9A^cqF~VEnAFgM&+q zg+)k+_0Qcf((-Uu00#@J9UsL(E(^dHjHnH0{#vQhPpQ4oH#+7P$1&FbGb&~z(hud; zAKP_|Vx8}>GS3(XDxUnr&d=K}MhgXRQMjVF=V=*LH4d2CwoPHm%98k(anO zghFb8!+a$LLTnfl?&lm+_^PCKn(ca2pi`pejdpjz{n+MsTLN{K=AH=yY`~uDm%U{q z2}NKP5w;NsN(#5HLg%cJ(poQ3N65e8qm6EftpfXeNEGifO_>^X@Y29U=2@qbrSFrd zfBaDE)JHFldA-+{_o3Dqos*)sV3Xn`rY8b*k>Rbi-eC| zpfe^n98UXiOG)*>T?vL~0NR5`C#0%Y#1|3z(&WfOx&rKU;7jS~=@hugEh*Fyr}fPo z!XQZo*P-fF<}iY7xkS5?e9nT$eirrUe=*hI-CYH57gH%e9pJ*(KoGcF;E?WZVlj3$ z7l=}8n{I^qvV8#M6-MHVX$Qt?fY@}hzT6>#QBeu=+mauXCT_q1-HmZyLlGX;!vsTu zI7iJ`TWclD4iFuqD~=->b^zt}iBAxC`9q{*ji;*+Ph+V{J49vq?^9q*yp;rjY*{I-{Gt0%d zTiy!pm_VGzoU5|)XV~n>5_ST@HTu;v_e0E`OyRud=!bFM_S9CdL^>`;^l}nK?;Cq9 zRK;E?&*SarbtgiVxp~~9JnF_ij(8H@TVKh^e7J0jBw31ol={81U4^ukdX0_TM|x|i zl5OP$8u;(Gi3h6>xkiD7Wy*nt#re;7mm7F(P87)8wU3z&;Kc(S036U_ohj`%p*)wo6}D2 zeZ3&DO?9d{htW)K)Pqg6rPlo=rQ=Y7Hjcfyh@8ome6|>ToCG+T1g&Y9JmxOB4_wy7 zJQ~|aY%zpZv$Qp-9{(vh$BDWgR`Iyt7CC#rd|{t{-Khd-FBxnP(OmdYz(*ekZV7FF zWV--er8{4n*Igw#Ur(xh+zuwb%7+5`#WEKJ6!(kwgSWn6lI<=ERgZ@tSMf2{uK@Vg zQs=Sz$mK`pMXK*W;Fb=iknKVUxOg^l36nPdt5n7ww51_dDqK0hHrvVT$a6hT3HJnl zl*6bA8qMt4M!_|gy_LZx)1{tKG4Ds3j3*D)wMUFAE$#Z`1r~q)BD#tO_3@u^*ZK%nC&H3J&@pURa>!uFIF8%q&HQ!s%+$UbX!4#tNYy{ zOXwqy^wWxvkNp7^ttJ9bO`26!LUqlB*(7U{vI=yWw9w*z5~$>98&0$D9A;H&TnPA# zKS=GXbsm*y?_I~+o?l-C(&U{w_nb|e^eC$dg2_)YY2ppYUJ4s>FVT1%cfHzY7T3VU`AT)B(R0KLNc3xCgz4?5q1U$Lt zTeZgFkQo>Ir6p;xpkOcw+gVDSa`)FRD~r?w>+TM5w2VlDP-GV~;Fc9~l^=Xc>uBTM zGcaQCHksB6Ek66eb^B%3$OGH$7m>E_eEYOat8C^=lbLndFwvy^jN)s$;x7=_&VqM0 z)qh1eoVt$$jxT;4xBmPb@3>8}u-+xMZ^BmH#=*}-%meeP8^%2O94X^O_&3*9UgDL7 zfrx*sV6Z?O#~brr2O!H?(0L}gVd1nTG2K>Fftpp%tb2Yp)kEkty>2?E1x4ZZAa2yEy%$ZPAr)QDu$9QNE zEC5TT>PtPN=7AdP?u7SLC*5EkRJ zl#Upm0R!}e4+v;*sXaEKrG%oqEEG*_e6(XLRWP%^9mM1$MI~s-E<^ZU&>Tei*z+XE znhPt~fk3dITK0b?2LnwfN24#eq|HgcyQ-7PHuUaD?26psv@Ym*!pJS+?AA9B_E?n1 zC&Q$V^fk0*S3Z=2F6^WB@cZB9`7N~Z#I?K#%X7BW1XV)mtBf<(IHY8s*fI;!F4e)Lb_W~@ABb8s?okINXd+#3WRE!S1KPcc zcXQU5mb&=FT6A3!7mFlUOl&t2e8RbXTQGa(n6>?qWb58052^*dSN^MX{Lg3PFO?u^ZWO>iX2n z&_0*yk>OcQ_no}qv%J`WoB(XK@!t8%r!Y19`XJYa9A!+h>5t~eYg(URV*4tGe>8lh zL`QdkCea7tNX0hr(-!vhg2!r10M?z$=gtcET91mh(=Z3u2qE^_-V#4wy}=MSWM6 zN)$Ti$%`C%{86x}1cLJs$La2TQbEW8{ER5Ea6S1e5P|b2H^B9hM$xK0)2gL{kV_Oe z$NO!$JRd0FDZ`YEd$RrB19q2`MdP4GZp`ftrOgvvx1NcwISw)}3!kZ7=3ro|dvEbp z>GUqv(0ed6HPIbcF68iC?4)ZIm4$Mr z3sqf?cNLlWlH51kB9XP`**K5TZa*;(R(Zrv8Idfik`#zD`;E+Ka$Rb zYPb5B>s{JedE{N{cd18Q0I8#6?kFHVxNAinWuW+X=U255(w^1_KJ6i===p84SD^V` z@Y`zS+9J)bKMhHS@LiJ}kd4IlSX(P4<_vV)&Jix8y@xeTu zT<`r)^stb`(D%Gc%>6sbP4TvXo^nfHrS@{eL5RO);7Y%KS8#wBW1hV9vCw%aD8@TO z00NCh5{6hs=oJyL6z{e0~+gkQ2=~-gz{xZU{b5)(@Hu z_{tSNci^2YzLJ$qvu|tnfPCcp{QgPMG613G^)|FK_+`xkQ$)Cdj?qCt?@5?jxqIq zsNk^RD_~!vsz5a!@>$Ey0xdyYG$L8}9RUwRsn$xZPJY(mXdsTXZ+K%CKx5_;vX~PB zKDM6ESa2pEjO`xEc|r+%wo=RU3Rw~BZ`&b?c?X+a{bOPEmNjmOkpHJFowo8z+J=3v zUsPjEQ+v{nXlE|TP#+ULN+x_0vUDMQ>@#W5zXDY0!?^d$eZ;bvmtqe89Ch#aoL#pb z5(p!UY<6ki*lz`QF=vM;?8+S)MwJt^CJ)DqAaP5TA>8x@8)S*V{J5N2h*liJ_(4XI zJ7>B_anG<@ukh#^#^5}^$r55WbEit%0d|i+9U>?NDTpLKbPQDaN|P=oW{n<={_$8QSXw4705QhFIzu(+d3!#shwBQWjhmS~@>&~sTvNjg@Yv;aq;@NyU zo6_JCG4JtWSDwcmpq97ICoyg{mzi7uzveaH{%u(tH&xkDy@JTELRWfcl~?Q#!%1?r z%kRp84ag<`BYk(Eu^7y#3tC>DT7Z2JtVlB zSqFb90fjWXLjry7wK)aoC$H*VFK|Pt`4xH7Me?D4XKLz!(T4SmLSKsyF&5vL-VB$B z-S_Z=jis)*R53@dmKinH^lUyvy_uL8-ty5K@jgSURj>LWOfJ&IULSpMmFyT69~|5F zDceR**3Sk7sky_uocH`;=Sgu#tm&T~6y~6FW12EEvgv|eTprAC8?&Yu*NZlpTxRy;j}R3;Wpz*}{( zCB^@YkMeG~xFT$Sxag(_J<}Ryu z?BUxXtHno{(eWQf=&ko|uP3^q?m=VUT+H$Yeu`TJN}3#J+qx9a&fTp!3$s*|n)hZU^_cb&f5L6l@oe=8nO8xnx zg^}S6%?8fdcbjB9)Vl6ls0BB%RUY>HaT*sjiNhJ{6tcZz-~voBVa1uS{66^fwZxDf_)^1+yAwZZu%|& zvLyK8_V(uxrz0*P8cK`ZXOog^YEsvt8shJ*zoka7dn%@+QCEKM=WTVw<{GKzB6G>& zQh%>SpGI%-*HgUTMIKC^!WgF=f??tKXvRn+O$%E@FnbIyy)(FOf`Y^!=gJ9|C@)Pp zhr)R)FBXLh{<4$rtHy;v9pQq{vEcwmeZ0^0JT5wO+qJupCBjhBNwD2L)J0}=VSNu~ z)GMoh0U<-XRFwAx8z=1h+R9n(u#$&O@3=Y*u6B)gr zfT1ar6|0emj&_^Zb58p)OdIz&&j*HJ^tX&!y=3E4eP;l?=JK8|0YMkdI`Rmy`lDT(7NIh$Fu}1}~dm zmVS);Fd@a$`4`WWOc>|%QmElI`&1*|ZA~8aV%(MG|7&hoSYkI-xPL#d!idRlYxM#X zV3z+bCHy-C3+q)_EY(er9;k}*Hg;h`36#Ti18Gr%92}^=c}kSSBon9@d@CJH;-hjW z6+n&x|DwtuV~Ja+IVBBJki3OMN(89FsRy8O#s8!GQ}UqPn}3#@S%;L!Q2NslP>9Jb zt%H-I@^9!p^INKDPKNq94F!={{)^tZP2tH56DZpLR%)?jy_L$HC`tdlj8|b9&Zw0c zGtf)7n~nuF;6jcfn4(1a&oY5_eNiMnyr_kB7E18H<8S&`VY+@OHy?f!`5Xk4?uU|@ zlLdA9p*;KfD2_4~l*POa&>K&s*Nk#oam$ONKEy$v{7gn_!!ZlUXvI_Mzx7EUawf%Xe-AQ&Z?Plx)vN{Mn?W&&Y~ zZ>73r8I=ACKT5Zh>eiB2VFF>7-&o?Pm=y@!%JQSHl=DA4N7Ue(-4+$h27 z{~cg=BPqSPmBL@M-OK?21=ZhBE)?0CFlf9p^&1z;_6DsCq<#}bvEF1%H~61x#T!QL otvP{aMo?!%vNyX00o9D5TGw?z*JCKwQ9hLL1|`1A_&!*0g52tF~2P!f~PV(V$TtZL60C#cgWnoi?=OEkswem1mI#|2FOA;$mq|Kx7smHc9 z+0UN1&?PJ*0|oJENg}~7m@18Fo+&6T91d*OjHpJx;y?2ooYwS$ z(^a=)yLhPO$lygDEAAVzxtjL(3Q{X5_Op%XQ&-*_#?u+aot620E;6Ca=Z9d0^74c@ zf|68(@Dx^7Y!G&1u3UDpwC^R7^U%>k$=e;)-JGoVE29pAje3btKTI5N@ke}2T8+=n zH12}&>G@~zYMiJ^R(8yqN{T&m`Nl~Dnsp6RWYqm?;10J_$#l|oE}16{q;;~*uz3e8 zH=}vIbbq5};;h|d)Y}N^s#s|G>MSaQMeCqHL&)wbjcJshlOoN{LAUOPICtlst|{UJ zG*8XZ?R9lXW$Sr_XxFm>_u`|?uu{gKhZbF&l(r;DYm9^O*L||5j9y8shqBG;%8tuX zBc{}frEv860D+yqz@L9KWc}({OHxjJ(t^m^iD8cw`kSO>Or3V z9lu$=i6uUlBJSSG*Xux2MfBU-{amdk0?WxvGn7RRJoPAvMW_~GiqT4;dE`LO=-QdP zghEq#I;+D%;aB$^EwI~|1KsU|V1$i?pxYmj0eDW12-`YhQegUY1rHT;B&_NaHR%Pr z#rvZr@^z^ry^#v^B`*5+7TYv&1~v(Mfp_c``qEGF)f=h@8%396Q3_klQ9Q4kn*xX zOF|vX5ayS9?+40a9JQ`%S;M$#t*fQ>%StO%rIc)@T>@VZe^pWJ1z#l*TE(Z&lD*>M zc=@a1(a*eHo87GE;x zf3~VxMC8OKd}x^cC{O@nV>DIx?eh@%1zV9AyO37QNJv>(X?mX%JSh5U=82D3-0|mh zmS7T|_c`Y&aEvKuyx0RB(Sum?=?nv}yz&;fD48lrL=ql-c}DT$w-y6a-)z;j6@PWT zBn0O>hjAcM3biUMR8KFe`SQb*M8o$t?p;4oZz35*#f6ck6<)lc^@c6eD;!)u1z0_8 zc8o0oEG9^%lj-)WFu#swRG0+RwwwAxV@vz0*7TGfs+^nW88^~dcnK2XV!rR3(WShG zYZjnZ3**z(*ycM;gIQ$@yG<1}yxz;F8RY6)D!_^8d}6a{pL4|MrT$Ymc_Gj`*84p1 zszm%}pUB2pH=cN-^4oh7*buDe{U1%2g7>o0v6O}B@s=To5c9U^o zlX*AC=6uz0@h$isZ|djX@QKO~yDfWjt|I|gzFD|VPg8%=c0F%&j5|&QE_;4(#y#Ac zjd-Kqlp_oF6b)qgUZE~FzMjW|pW*7C| z<^Sp0UZCdI?exwCnD&(5%xG0Is;tby35YjM%3!AMER zm#bHe4I%I5;YGh{J$whFV;Yp^tc0JnYQL`Kpwwvcm}9Q9wC{_r__#G3=zr0CuA$i3 z*Ftdb3jqUb@vrT@`Nc)*u=E+%4>dfxJ_M}>7JkO`)nBDPGdZ$o%;X6c`AgbsKqOEn z@4vkgAzbv`Q4UGLyc<<6%nfVI4uE|ISFB=@DSPodEpRc0nC2FOj3`xus-MR_@k2qN zk<4z+sPgUT-i*v6Y!x64BkyCPMs|lXGu8o`$C;0P=E69^ZiiY=Cc3-h68-siTXn_W zGbnfW<*sbz*H#I;{p4Y!)`oP~D-AP!Epk~%&XcGwZ|W_dYh3wCeiY(rlpA*9KbD*) zLU*!J3>S)W*F>Yw>D{&73ujK~LYtFrjk>?@PSJ{(GtQc#k8V*Hdf#VfEJ+W2Sf4fv zo8aPT@|{EJa#P8sKVa0R)^^SXPP!+6KhZVcW+06o<+EWiEmVrc>0{E$WI`QhowL9z zo}oc@g_o}SNgLL#-5HeDJbcA!`6hA-9a#%?aH#|jdiTCetczm&tUiri*TI>h!mhAY z8mlLL&3r5~Vh$3deUc20jU=AryK}M@{13I#4+B9#muI^(>%@U`C3!D3Ne5MmGQy*I z2XSjPL?$~0Di!ej{o&l#=Hz{S_qq$rrB>f9PExas$<&lotNls{N7|OpH*;8C0)ABN4U~JIa^zlV1@2#o@%*0&&mi*Z67Q|y3WuW6+!Mn^I9cweE z*}XAg-GM62WoGbbIR;I5#F){~2Cy;Ln%HJjgdMMf^|ro78yj0@N+{+`gt2`iiVvMQ z<~0~I(EIpij4%UN+>8G{jGB2XB4BeYaXSOh?e!)8&)yUJTnfic(306)GDe z;Ghy6+_zuHuwc#_RZCMSXpdofa!V@ddC_d^K*x))adV9HgZh1cuiIb&OtZFwHu2~9 zL&Q!U))dKU2UQtZ?t&1tj>MWI&he8Q)IcTqrXTzA8FxzYT{1nhQcl`=OuXh>4cC4g z3^tmpes^qP#%-$g`?L)6f!$of4zqrsdAAZHnO98W_`|*y8|wyjG4QJUV$%7Ks!zd4 z+~aY_SKV=WLT0G!nv)tPOQSsEfVfSrDS8pCLm~;vx#Kq|{D?-yfMPI$1TtIldaPH} zddFEo-Qah2dL5Qkg8c(4In-jn8Lo=ZJ*rratG6PU;-l9M${S?Vu5}hsbIKOaMa{53 z43Uw3Q~jrVbR%E8uF)@RC_5T4_reaXUYH&`u3S>YhYU9i)K8E{$ARU`+q~X+!ZjLg z;dT#uI?0*Eed_r0HF_k03qIL?2mkcaFcP)l zWOPs$d~QJ|sOF%mIE~41lQYkcGRgVQ9yg}sn%x95*YGIJ6O5v3E%#1TQ<>}R+s|bu zqHf{x?vBeZ4ubr0$eS^M79k+2#>%xH);eN~MnQAc*mAXX;##jghhXMs;&p-D*{%5twXN9r@uBI`+&R`MKt9i}`+G$f?i z==}Y4o~GsEiM=)AAV0@?ccA2KxIG%z!k_!PfO5Y<0l}zGRT(pOIcf7p4QH zsr{3l5bHpi_g1WMMyyaiicwqYxNS<lHx_@F_#cjA8-W2%SgX|9NoE?}_ylxebwK zL7PZy1e_@#>7Fes?)2b|n#5h@QK7osPVP0<>}Ya|A6aoz8Vw-1#LE`xuFdD{r5s%^dn zS5I$0al0f=KlJ==9TmZk?&$qZ`?6k7)pMmM3|jl#2K5L0yz)FlX&h-Xa(nAUsG;ij zB0>F8UH$_->Lw#U=+MH?;?y&j!z7#Y2W#vSC6zxHdZ{wD;PtKfpN_OhoedSi*QP%8 zD6Jp1w!+kzvTfmeL;l22;zVA4g~9;R=X1Kd#47q}Z6QAS@s~{-oE zlv2^@;Nrpd3(je!8&%D3AEU8Vw)`E6KDAK6U4Mm~P1V(*L0)z?EO)<07tmmzctZ7m zt!V!f4n|fuZeFl@VoNXTpyEe5Zo-l!Y!0SgzKbap$M6 zK?$hK+h~02lXQc+A_H`;M&=L4uf1N1E4Ea&1_Gz?aH5ScA;G7opYuVJ-V3^I>M+jr zob!*ZCC(#S7=3H;>swexRW=R>&p=)4bbd?S=(`OT%;&6hA%PDqlCjcc*&w3wj{6U| zkQ`^3+&-R^uUWX$Z+~wH56B#lIcw@D%0k9qelfAE&*CBX_YHr1=jE#a$CeolQl(aZ zw7jcU2VVx+LJVI@hZP;|JuItxGzKmxl^=<(QK?woOb=(tBR+->Kp@~^J6HgH0;Gb! zYvTS9lEiU>*H2-H4=iAcP)3w`|JmM<9#yaKe7#Ha-GWDNNuAJ^QFQsK!^GEe>_UEObpXw*8TQ%M+wJx5TyMNMUvsV!{ zP~vAlFt_)EjP#iU?#K>i$aXe`#9OAnLGzTAhiF_cj}44`A#*$wArLZHz@+tr=NOhV z!E=`p^yOPb=RyYa7<(9*j}3)Y|CAe@oQ9dhX#Y}SHb+pJ6mo#!fUCAk$Fbqvss69x zFEg4{M}$Kp@(QzM+?gS+qzyJzSBB+&M2w&Y>ndlOGz6$&B>TWe;TT;SaT2|SVE9vR zUu+mS1n7<+X=#!!X|tLlMN-#xitW$gY=buA45e@6YRN0)YF(^#3HkU3zlEqK1WuC7 zd|Y4@2wEVSfjVY~#Y>sCBchvsZzGJzCr#SW* zB)-W79R~!%fj_iI7$1(hriPDzXeV_3JnVxe`=QoJ3D2_+OxRV zuuLyH#5N#1*nK6wF!b9ixn;5IS!J$_ZPV4AS#am@HPIzosr}gffbd!dA7^ISC|ljK zaIrV?>8mQCweN^@U$H-3v3<=|3XiRkLR#Srkx81GJ(q^KbA%PTNJl`{fErZfEeM;X8U5+N{i}5s;n5xzfVF9@_Si?6!`}L`3Jn+lSZa=X_1X z%tDu3HHg^M02i`tB2n%b()-BF_W^YLc2|0SpPWZN29aAZ&Y9!{*v55*#H@~b>QlMT zO--Cjczq%C5Sb_>*=-|HoxZ29}yRAoV=$h8go{XRB7 z70A~Zk1MJUH>1tHbxN58Uo-d9|HssWddZshEzXcy4K&XW>qi!|ep{X`w&B*lzuXk2 zc3Csht8JmPwSs0x{CZA^>Ea6vqGuv@(+^+>0dH*D6CIVFJ|kZY;l@{b#OC2;6ukY1 z{)Hq`PGfYS=PC!i);>l;*iUgrLRjgvKKp$*XFNkLCVpjif5VL#uHV?}rz^1OUp{8J zv&gY=R&5-aN=IK6q;@g@^MEjxT|YSY|MX{cx43QNhyNcTD9YxuQ}DbE2k%G{C2A% z^2{wqtCZC-TX9yZzh}xx#&%u5_yzSEs-4T|C$pCU^exX@IDQwClyo5F@jl_pA6>Lg zTaXO1$uN>mB4<BU%PB~yHzBhvIW`e)@;ix=~7`*mAwDeF|-t()O2fS80a{h!&( z-)YQ$p8UW&WI!M<_080ldy13ke}1s>@L2zo`n%=_x={QZyaPl`34khC{wrsuo`W(T z-pGMR4}sJf3c&m)11O*4uf+%?|9l3rF}VDyYAh{xatrHx5}jTw0mnbE(J3ZTPK09LaMpfK|r ztHF}_#>%&&AoE5Hz?lzUrQFW=K{pcX@E3bfu%WJP_io^ zHZKM0`>Wi+0L20Y&@j&c((?E#>4BYjbr8NUfQe@U3>M@-DSkIN96){(oLpc4o%!Eb zWQ(F8*-wA*F<`$a2;vUD!M4R0pyAMe@fJWHK?+DNaf3P{Zmd61jKK6F1yHxd0HTe( zu@09sK>cxlQ5Mj^QUCyk0d$yhQ{hi%1b$(-LBG>)4VCp}iW`JiKDgO5h-Coz zSN*jf0mQ2Ups7w^znc>NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -54,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -64,28 +64,14 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell From 001e4fc0e7109dc77651ed5d18b421612ea90858 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Mon, 1 Feb 2021 14:00:06 -0800 Subject: [PATCH 194/273] downgrade to netty 4.1.57 --- gradle.properties | 2 +- zuul-core/dependencies.lock | 108 +++++++++++++++---------------- zuul-groovy/dependencies.lock | 90 +++++++++++++------------- zuul-guice/dependencies.lock | 90 +++++++++++++------------- zuul-processor/dependencies.lock | 108 +++++++++++++++---------------- zuul-sample/dependencies.lock | 108 +++++++++++++++---------------- 6 files changed, 253 insertions(+), 253 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3d8ed57d..44c6c0c5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ versions_groovy=3.0.3 versions_ribbon=2.4.4 -versions_netty=4.1.58.Final +versions_netty=4.1.57.Final release.scope=patch release.version=2.3.0-SNAPSHOT diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 57d51198..b98192ea 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -37,31 +37,31 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -128,31 +128,31 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -220,34 +220,34 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.36.Final" }, "io.netty:netty-transport": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -321,34 +321,34 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.36.Final" }, "io.netty:netty-transport": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -407,31 +407,31 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -496,34 +496,34 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.36.Final" }, "io.netty:netty-transport": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index 3cfe8d90..a4c605b8 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -70,37 +70,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -197,37 +197,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -334,37 +334,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -376,19 +376,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -516,37 +516,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -558,19 +558,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -680,37 +680,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -817,37 +817,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -859,19 +859,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 5369decd..66267b36 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -73,37 +73,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -200,37 +200,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -343,37 +343,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -385,19 +385,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -528,37 +528,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -570,19 +570,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -695,37 +695,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -838,37 +838,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -880,19 +880,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 5c840d84..9cc47e71 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -70,37 +70,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -194,37 +194,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -328,37 +328,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -370,19 +370,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -504,37 +504,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -546,19 +546,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -678,37 +678,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -720,19 +720,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -839,37 +839,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -970,37 +970,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1012,19 +1012,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 92f0dec5..8c5937c6 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -86,37 +86,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -128,19 +128,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -259,37 +259,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -404,37 +404,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -567,37 +567,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -609,19 +609,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -778,37 +778,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -820,19 +820,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -963,37 +963,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1120,37 +1120,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1162,19 +1162,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.58.Final" + "locked": "4.1.57.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ From 2bffe73834735d818710b66da339965d2a6e8218 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Mon, 1 Feb 2021 14:45:18 -0800 Subject: [PATCH 195/273] downgrade further to 4.1.55 --- gradle.properties | 2 +- zuul-core/build.gradle | 2 +- zuul-core/dependencies.lock | 114 +++++++++++++++--------------- zuul-groovy/dependencies.lock | 96 ++++++++++++------------- zuul-guice/dependencies.lock | 96 ++++++++++++------------- zuul-processor/dependencies.lock | 116 +++++++++++++++---------------- zuul-sample/dependencies.lock | 116 +++++++++++++++---------------- 7 files changed, 271 insertions(+), 271 deletions(-) diff --git a/gradle.properties b/gradle.properties index 44c6c0c5..b93f7ecf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ versions_groovy=3.0.3 versions_ribbon=2.4.4 -versions_netty=4.1.57.Final +versions_netty=4.1.55.Final release.scope=patch release.version=2.3.0-SNAPSHOT diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index 459829e5..c1d17f14 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -34,7 +34,7 @@ dependencies { implementation "io.netty:netty-codec-haproxy:${versions_netty}" implementation "io.netty:netty-transport-native-epoll:${versions_netty}:linux-x86_64" implementation "io.netty:netty-transport-native-kqueue:${versions_netty}:osx-x86_64" - runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.36.Final" + runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.35.Final" implementation 'io.perfmark:perfmark-api:0.23.0' implementation 'javax.inject:javax.inject:1' diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index b98192ea..b55b4f41 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -37,31 +37,31 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -128,31 +128,31 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -220,34 +220,34 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.36.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -321,34 +321,34 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.36.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -407,31 +407,31 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -496,34 +496,34 @@ "locked": "0.123.1" }, "io.netty:netty-buffer": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.36.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index a4c605b8..aaae0fe9 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -70,37 +70,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -197,37 +197,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -334,61 +334,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.36.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -516,61 +516,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.36.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -680,37 +680,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -817,61 +817,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.36.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 66267b36..6f8e14d8 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -73,37 +73,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -200,37 +200,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -343,61 +343,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.36.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -528,61 +528,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.36.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -695,37 +695,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -838,61 +838,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.36.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 9cc47e71..7e15cd7a 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -70,37 +70,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -194,37 +194,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -328,61 +328,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.36.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -504,61 +504,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.36.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -678,61 +678,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.36.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -839,37 +839,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -970,61 +970,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.36.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 8c5937c6..1e22637f 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -86,61 +86,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.36.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -259,37 +259,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -404,37 +404,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -567,61 +567,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.36.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -778,61 +778,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.36.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -963,37 +963,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1120,61 +1120,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.36.Final" + "locked": "2.0.35.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.57.Final" + "locked": "4.1.55.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ From 411aeffb7473ccd36a5c8c40ae4ad1c2ce8081c2 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 2 Feb 2021 14:04:17 -0800 Subject: [PATCH 196/273] core: avoid noisy assert in tests when NoopGauge is being used. --- .../main/java/com/netflix/zuul/monitoring/ConnCounter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java index 7aa2035b..e96508d0 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java @@ -130,7 +130,10 @@ public void decrement(String event) { return; } synchronized (getLock(gauge.id())) { - assert !Double.isNaN(gauge.value()); + // Noop gauges break this assertion in tests, but the type is package private. Check to make sure + // the gauge has a value, or by implementation cannot have a value. + assert !Double.isNaN(gauge.value()) + || gauge.getClass().getName().equals("com.netflix.spectator.api.NoopGauge"); gauge.set(gauge.value() - 1); } } From 9ce0f9b983705791eff91d880a2db557b25f3a12 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Mon, 8 Feb 2021 12:21:25 -0800 Subject: [PATCH 197/273] [zuul-core] Counter for conn. close on idle state --- .../netty/common/CloseOnIdleStateHandler.java | 39 +++++++----- .../server/BaseZuulChannelInitializer.java | 4 +- .../common/CloseOnIdleStateHandlerTest.java | 59 +++++++++++++++++++ 3 files changed, 85 insertions(+), 17 deletions(-) create mode 100644 zuul-core/src/test/java/com/netflix/netty/common/CloseOnIdleStateHandlerTest.java diff --git a/zuul-core/src/main/java/com/netflix/netty/common/CloseOnIdleStateHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/CloseOnIdleStateHandler.java index c2a4f91d..55ff2822 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/CloseOnIdleStateHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/CloseOnIdleStateHandler.java @@ -1,20 +1,19 @@ /** * Copyright 2018 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. */ package com.netflix.netty.common; +import com.netflix.spectator.api.Counter; +import com.netflix.spectator.api.Registry; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.handler.timeout.IdleStateEvent; @@ -22,14 +21,22 @@ /** * Just listens for the IdleStateEvent and closes the channel if received. */ -public class CloseOnIdleStateHandler extends ChannelInboundHandlerAdapter -{ +public class CloseOnIdleStateHandler extends ChannelInboundHandlerAdapter { + + private final Registry registry; + private final Counter counter; + + public CloseOnIdleStateHandler(Registry registry, String metricId) { + this.registry = registry; + this.counter = registry.counter("zuul.conn.idle.timeout", "id", metricId); + } + @Override - public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception - { + public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { super.userEventTriggered(ctx, evt); if (evt instanceof IdleStateEvent) { + counter.increment(); ctx.close(); } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java index 29da4e34..b5ef5aeb 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java @@ -103,6 +103,7 @@ public abstract class BaseZuulChannelInitializer extends ChannelInitializer Date: Mon, 8 Feb 2021 12:36:51 -0800 Subject: [PATCH 198/273] Don't maintain reference to registry obj --- .../java/com/netflix/netty/common/CloseOnIdleStateHandler.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/CloseOnIdleStateHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/CloseOnIdleStateHandler.java index 55ff2822..1c8171bc 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/CloseOnIdleStateHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/CloseOnIdleStateHandler.java @@ -23,11 +23,9 @@ */ public class CloseOnIdleStateHandler extends ChannelInboundHandlerAdapter { - private final Registry registry; private final Counter counter; public CloseOnIdleStateHandler(Registry registry, String metricId) { - this.registry = registry; this.counter = registry.counter("zuul.conn.idle.timeout", "id", metricId); } From 9f10384490167aefc8a1cc55e99eb78a7155c4a0 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Mon, 8 Feb 2021 17:13:29 -0800 Subject: [PATCH 199/273] Remove duplicate counter. Fix eof weirdness --- .../com/netflix/netty/common/CloseOnIdleStateHandler.java | 2 +- .../netflix/netty/common/metrics/ServerChannelMetrics.java | 5 ----- .../netflix/netty/common/CloseOnIdleStateHandlerTest.java | 4 ++-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/CloseOnIdleStateHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/CloseOnIdleStateHandler.java index 1c8171bc..b3268d4c 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/CloseOnIdleStateHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/CloseOnIdleStateHandler.java @@ -26,7 +26,7 @@ public class CloseOnIdleStateHandler extends ChannelInboundHandlerAdapter { private final Counter counter; public CloseOnIdleStateHandler(Registry registry, String metricId) { - this.counter = registry.counter("zuul.conn.idle.timeout", "id", metricId); + this.counter = registry.counter("server.connections.idle.timeout", "id", metricId); } @Override diff --git a/zuul-core/src/main/java/com/netflix/netty/common/metrics/ServerChannelMetrics.java b/zuul-core/src/main/java/com/netflix/netty/common/metrics/ServerChannelMetrics.java index 31974c65..d5595f54 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/metrics/ServerChannelMetrics.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/metrics/ServerChannelMetrics.java @@ -46,7 +46,6 @@ public class ServerChannelMetrics extends ChannelInboundHandlerAdapter private final AtomicInteger currentConnections = new AtomicInteger(0); private final Counter totalConnections; private final Counter connectionClosed; - private final Counter connectionIdleTimeout; private final Counter connectionErrors; private final Counter connectionThrottled; @@ -56,7 +55,6 @@ public ServerChannelMetrics(String id, Registry registry) { totalConnections = registry.counter(metricNamePrefix + "connect", "id", id); connectionErrors = registry.counter(metricNamePrefix + "errors", "id", id); connectionClosed = registry.counter(metricNamePrefix + "close", "id", id); - connectionIdleTimeout = registry.counter(metricNamePrefix + "idle.timeout", "id", id); connectionThrottled = registry.counter(metricNamePrefix + "throttled", "id", id); } @@ -103,9 +101,6 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc if (evt == MaxInboundConnectionsHandler.CONNECTION_THROTTLED_EVENT) { connectionThrottled.increment(); } - else if (evt instanceof IdleStateEvent) { - connectionIdleTimeout.increment(); - } super.userEventTriggered(ctx, evt); } diff --git a/zuul-core/src/test/java/com/netflix/netty/common/CloseOnIdleStateHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/CloseOnIdleStateHandlerTest.java index 4bf3d36d..ea85bfed 100644 --- a/zuul-core/src/test/java/com/netflix/netty/common/CloseOnIdleStateHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/netty/common/CloseOnIdleStateHandlerTest.java @@ -42,7 +42,7 @@ public class CloseOnIdleStateHandlerTest { @Before public void setup() { - when(registry.counter("zuul.conn.idle.timeout", "id", listener)).thenReturn(counter); + when(registry.counter("server.connections.idle.timeout", "id", listener)).thenReturn(counter); } @@ -56,4 +56,4 @@ public void incrementCounterOnIdleStateEvent() { verify(counter, times(1)).increment(); } -}H \ No newline at end of file +} From 737e8474ac6f98f5506e9e8b0918ee6eaac7b97e Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Mon, 23 Nov 2020 11:30:22 -0800 Subject: [PATCH 200/273] [zuul-core] Cleanup unused toggle. Remove deprecated API --- .../netty/server/http2/Http2Configuration.java | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java index febf1558..072e3598 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2Configuration.java @@ -16,29 +16,15 @@ package com.netflix.zuul.netty.server.http2; -import com.netflix.config.DynamicBooleanProperty; import com.netflix.zuul.netty.ssl.SslContextFactory; import io.netty.handler.ssl.ApplicationProtocolConfig; import io.netty.handler.ssl.ApplicationProtocolNames; import io.netty.handler.ssl.SslContext; import io.netty.handler.ssl.SslContextBuilder; - import javax.net.ssl.SSLException; public class Http2Configuration { - - private static final DynamicBooleanProperty HTTP2_DISABLED = - new DynamicBooleanProperty("zuul.server.http2.disabled", false); - - - /** - * Use {@link #configureSSL(SslContextFactory, String)} instead. - */ - @Deprecated - public static SslContext configureSSL(SslContextFactory sslContextFactory, int port) { - return configureSSL(sslContextFactory, String.valueOf(port)); - } - + public static SslContext configureSSL(SslContextFactory sslContextFactory, String metricId) { SslContextBuilder builder = sslContextFactory.createBuilderForServer(); From 65d302ea75f57eff08a7a9e94ca9892663509727 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Tue, 9 Feb 2021 12:43:49 -0800 Subject: [PATCH 201/273] Move conn. throttled counter to its handler --- .../common/metrics/ServerChannelMetrics.java | 35 +++-------- .../MaxInboundConnectionsHandler.java | 14 ++++- .../server/BaseZuulChannelInitializer.java | 2 +- .../MaxInboundConnectionsHandlerTest.java | 58 +++++++++++++++++++ 4 files changed, 81 insertions(+), 28 deletions(-) create mode 100644 zuul-core/src/test/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandlerTest.java diff --git a/zuul-core/src/main/java/com/netflix/netty/common/metrics/ServerChannelMetrics.java b/zuul-core/src/main/java/com/netflix/netty/common/metrics/ServerChannelMetrics.java index d5595f54..d09abf4d 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/metrics/ServerChannelMetrics.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/metrics/ServerChannelMetrics.java @@ -32,22 +32,20 @@ import java.util.concurrent.atomic.AtomicInteger; /** - * User: Mike Smith - * Date: 3/5/16 - * Time: 5:47 PM + * User: Mike Smith Date: 3/5/16 Time: 5:47 PM */ @ChannelHandler.Sharable -public class ServerChannelMetrics extends ChannelInboundHandlerAdapter -{ +public class ServerChannelMetrics extends ChannelInboundHandlerAdapter { + private static final Logger LOG = LoggerFactory.getLogger(ServerChannelMetrics.class); - private static final AttributeKey ATTR_CURRENT_CONNS = AttributeKey.newInstance("_server_connections_count"); + private static final AttributeKey ATTR_CURRENT_CONNS = AttributeKey + .newInstance("_server_connections_count"); private final Gauge currentConnectionsGauge; private final AtomicInteger currentConnections = new AtomicInteger(0); private final Counter totalConnections; private final Counter connectionClosed; private final Counter connectionErrors; - private final Counter connectionThrottled; public ServerChannelMetrics(String id, Registry registry) { String metricNamePrefix = "server.connections."; @@ -55,11 +53,9 @@ public ServerChannelMetrics(String id, Registry registry) { totalConnections = registry.counter(metricNamePrefix + "connect", "id", id); connectionErrors = registry.counter(metricNamePrefix + "errors", "id", id); connectionClosed = registry.counter(metricNamePrefix + "close", "id", id); - connectionThrottled = registry.counter(metricNamePrefix + "throttled", "id", id); } - public static int currentConnectionCountFromChannel(Channel ch) - { + public static int currentConnectionCountFromChannel(Channel ch) { AtomicInteger count = ch.attr(ATTR_CURRENT_CONNS).get(); return count == null ? 0 : count.get(); } @@ -74,34 +70,21 @@ public void channelActive(ChannelHandlerContext ctx) throws Exception { } @Override - public void channelInactive(ChannelHandlerContext ctx) throws Exception - { + public void channelInactive(ChannelHandlerContext ctx) throws Exception { try { super.channelInactive(ctx); - } - finally { + } finally { currentConnectionsGauge.set(currentConnections.decrementAndGet()); connectionClosed.increment(); } } @Override - public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception - { + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { connectionErrors.increment(); if (LOG.isInfoEnabled()) { LOG.info("Connection error caught. " + String.valueOf(cause), cause); } super.exceptionCaught(ctx, cause); } - - @Override - public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception - { - if (evt == MaxInboundConnectionsHandler.CONNECTION_THROTTLED_EVENT) { - connectionThrottled.increment(); - } - - super.userEventTriggered(ctx, evt); - } } diff --git a/zuul-core/src/main/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandler.java index ccfa1d6c..e94eddf7 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandler.java @@ -16,6 +16,8 @@ package com.netflix.netty.common.throttle; +import com.netflix.spectator.api.Counter; +import com.netflix.spectator.api.Registry; import com.netflix.zuul.passport.CurrentPassport; import com.netflix.zuul.passport.PassportState; import io.netty.channel.Channel; @@ -44,11 +46,13 @@ public class MaxInboundConnectionsHandler extends ChannelInboundHandlerAdapter private static final Logger LOG = LoggerFactory.getLogger(MaxInboundConnectionsHandler.class); private final static AtomicInteger connections = new AtomicInteger(0); + private final Counter connectionThrottled; private final int maxConnections; - public MaxInboundConnectionsHandler(int maxConnections) + public MaxInboundConnectionsHandler(Registry registry, String metricId, int maxConnections) { this.maxConnections = maxConnections; + this.connectionThrottled = registry.counter("server.connections.throttled", "id", metricId); } @Override @@ -81,6 +85,14 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception } } + @Override + public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { + if (evt == MaxInboundConnectionsHandler.CONNECTION_THROTTLED_EVENT) { + connectionThrottled.increment(); + } + super.userEventTriggered(ctx, evt); + } + @Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java index b5ef5aeb..04ac475e 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java @@ -191,7 +191,7 @@ private BaseZuulChannelInitializer( this.perEventLoopRequestsMetricsHandler = perEventLoopMetricsHandler.new HttpRequests(); this.maxConnections = channelConfig.get(CommonChannelConfigKeys.maxConnections); - this.maxConnectionsHandler = new MaxInboundConnectionsHandler(maxConnections); + this.maxConnectionsHandler = new MaxInboundConnectionsHandler(registry, metricId, maxConnections); this.maxRequestsPerConnection = channelConfig.get(CommonChannelConfigKeys.maxRequestsPerConnection); this.maxRequestsPerConnectionInBrownout = channelConfig.get(CommonChannelConfigKeys.maxRequestsPerConnectionInBrownout); this.connectionExpiry = channelConfig.get(CommonChannelConfigKeys.connectionExpiry); diff --git a/zuul-core/src/test/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandlerTest.java new file mode 100644 index 00000000..5847d577 --- /dev/null +++ b/zuul-core/src/test/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandlerTest.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.netty.common.throttle; + +import static com.netflix.netty.common.throttle.MaxInboundConnectionsHandler.CONNECTION_THROTTLED_EVENT; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import com.netflix.spectator.api.Counter; +import com.netflix.spectator.api.Registry; +import com.netflix.zuul.netty.server.http2.DummyChannelHandler; +import io.netty.channel.embedded.EmbeddedChannel; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; + +@RunWith(MockitoJUnitRunner.class) +public class MaxInboundConnectionsHandlerTest { + + @Mock + private Registry registry; + @Mock + private Counter counter; + + private final String listener = "test-conn-throttled"; + + @Before + public void setup() { + when(registry.counter("server.connections.throttled", "id", listener)).thenReturn(counter); + } + + @Test + public void incrementCounterOnConnectionThrottledEvent() { + final EmbeddedChannel channel = new EmbeddedChannel(); + channel.pipeline().addLast(new DummyChannelHandler()); + channel.pipeline().addLast(new MaxInboundConnectionsHandler(registry, listener, 100)); + + channel.pipeline().context(DummyChannelHandler.class).fireUserEventTriggered(CONNECTION_THROTTLED_EVENT); + + verify(counter, times(1)).increment(); + } +} From 88edc8d9b068b60ca18fedc67a0f2dbf53837367 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Tue, 9 Feb 2021 13:12:55 -0800 Subject: [PATCH 202/273] Remove unnecessary event passing --- .../MaxInboundConnectionsHandler.java | 11 +---- .../MaxInboundConnectionsHandlerTest.java | 41 ++++++++++--------- 2 files changed, 23 insertions(+), 29 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandler.java index e94eddf7..73370f9f 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandler.java @@ -40,7 +40,6 @@ @ChannelHandler.Sharable public class MaxInboundConnectionsHandler extends ChannelInboundHandlerAdapter { - public static final String CONNECTION_THROTTLED_EVENT = "connection_throttled"; public static final AttributeKey ATTR_CH_THROTTLED = AttributeKey.newInstance("_channel_throttled"); private static final Logger LOG = LoggerFactory.getLogger(MaxInboundConnectionsHandler.class); @@ -67,7 +66,7 @@ public void channelActive(ChannelHandlerContext ctx) throws Exception channel.attr(ATTR_CH_THROTTLED).set(Boolean.TRUE); CurrentPassport.fromChannel(channel).add(PassportState.SERVER_CH_THROTTLING); channel.close(); - ctx.pipeline().fireUserEventTriggered(CONNECTION_THROTTLED_EVENT); + connectionThrottled.increment(); } } @@ -85,14 +84,6 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception } } - @Override - public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { - if (evt == MaxInboundConnectionsHandler.CONNECTION_THROTTLED_EVENT) { - connectionThrottled.increment(); - } - super.userEventTriggered(ctx, evt); - } - @Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { diff --git a/zuul-core/src/test/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandlerTest.java index 5847d577..a958e171 100644 --- a/zuul-core/src/test/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandlerTest.java @@ -16,43 +16,46 @@ package com.netflix.netty.common.throttle; -import static com.netflix.netty.common.throttle.MaxInboundConnectionsHandler.CONNECTION_THROTTLED_EVENT; +import static com.netflix.netty.common.throttle.MaxInboundConnectionsHandler.ATTR_CH_THROTTLED; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import com.netflix.spectator.api.Counter; +import com.netflix.spectator.api.DefaultRegistry; import com.netflix.spectator.api.Registry; import com.netflix.zuul.netty.server.http2.DummyChannelHandler; +import com.netflix.zuul.passport.CurrentPassport; +import com.netflix.zuul.passport.PassportState; import io.netty.channel.embedded.EmbeddedChannel; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.junit.runners.JUnit4; +import org.mockito.Mockito; -@RunWith(MockitoJUnitRunner.class) +@RunWith(JUnit4.class) public class MaxInboundConnectionsHandlerTest { - @Mock - private Registry registry; - @Mock - private Counter counter; - - private final String listener = "test-conn-throttled"; + @Test + public void verifyPassportStateAndAttrs() { + Registry registry = Mockito.mock(Registry.class); + Counter counter = Mockito.mock(Counter.class); - @Before - public void setup() { - when(registry.counter("server.connections.throttled", "id", listener)).thenReturn(counter); - } + when(registry.counter("server.connections.throttled", "id", "test-conn-throttled")).thenReturn(counter); - @Test - public void incrementCounterOnConnectionThrottledEvent() { final EmbeddedChannel channel = new EmbeddedChannel(); channel.pipeline().addLast(new DummyChannelHandler()); - channel.pipeline().addLast(new MaxInboundConnectionsHandler(registry, listener, 100)); + channel.pipeline().addLast(new MaxInboundConnectionsHandler(registry, "test-conn-throttled", 1)); - channel.pipeline().context(DummyChannelHandler.class).fireUserEventTriggered(CONNECTION_THROTTLED_EVENT); + // Fire twice to increment current conns. count + channel.pipeline().context(DummyChannelHandler.class).fireChannelActive(); + channel.pipeline().context(DummyChannelHandler.class).fireChannelActive(); verify(counter, times(1)).increment(); + assertEquals(PassportState.SERVER_CH_THROTTLING, CurrentPassport.fromChannel(channel).getState()); + assertTrue(channel.attr(ATTR_CH_THROTTLED).get()); + + } } From 235f1ddb2dec57a014049e77a004ad3630e92503 Mon Sep 17 00:00:00 2001 From: sullis Date: Tue, 9 Feb 2021 16:18:11 -0800 Subject: [PATCH 203/273] all: gradle 6.8.2 (#990) --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 28ff446a..2a563242 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From daad0d763b67aa2a9fbb928a548b3d96609afb4a Mon Sep 17 00:00:00 2001 From: sullis Date: Tue, 9 Feb 2021 16:25:12 -0800 Subject: [PATCH 204/273] zuul-sample: log4j 2.14.0 --- zuul-sample/build.gradle | 4 ++-- zuul-sample/dependencies.lock | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/zuul-sample/build.gradle b/zuul-sample/build.gradle index e730bcb6..b0581fec 100644 --- a/zuul-sample/build.gradle +++ b/zuul-sample/build.gradle @@ -11,8 +11,8 @@ dependencies { implementation "com.netflix.governator:governator-core:1.+" annotationProcessor project(":zuul-processor") - runtimeOnly 'org.apache.logging.log4j:log4j-core:2.13.3' - runtimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl:2.13.1' + runtimeOnly 'org.apache.logging.log4j:log4j-core:2.14.0' + runtimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl:2.14.0' } diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 1e22637f..60410377 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -642,10 +642,10 @@ "locked": "1" }, "org.apache.logging.log4j:log4j-core": { - "locked": "2.13.3" + "locked": "2.14.0" }, "org.apache.logging.log4j:log4j-slf4j-impl": { - "locked": "2.13.1" + "locked": "2.14.0" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ @@ -853,10 +853,10 @@ "locked": "1" }, "org.apache.logging.log4j:log4j-core": { - "locked": "2.13.3" + "locked": "2.14.0" }, "org.apache.logging.log4j:log4j-slf4j-impl": { - "locked": "2.13.1" + "locked": "2.14.0" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ @@ -1195,10 +1195,10 @@ "locked": "1" }, "org.apache.logging.log4j:log4j-core": { - "locked": "2.13.3" + "locked": "2.14.0" }, "org.apache.logging.log4j:log4j-slf4j-impl": { - "locked": "2.13.1" + "locked": "2.14.0" }, "org.bouncycastle:bcprov-jdk15on": { "firstLevelTransitive": [ From 4d9b53670328389fb8de9c7ca32d23718d986f73 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Tue, 9 Feb 2021 17:13:01 -0800 Subject: [PATCH 205/273] Merge passport state with server conn metrics --- .../common/metrics/ServerChannelMetrics.java | 90 ------------------ .../insights/PassportLoggingHandler.java | 7 +- ...erHandler.java => ServerStateHandler.java} | 94 ++++++++++++------- .../server/BaseZuulChannelInitializer.java | 24 ++--- .../BaseZuulChannelInitializerTest.java | 34 +++++-- 5 files changed, 99 insertions(+), 150 deletions(-) delete mode 100644 zuul-core/src/main/java/com/netflix/netty/common/metrics/ServerChannelMetrics.java rename zuul-core/src/main/java/com/netflix/zuul/netty/insights/{PassportStateServerHandler.java => ServerStateHandler.java} (59%) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/metrics/ServerChannelMetrics.java b/zuul-core/src/main/java/com/netflix/netty/common/metrics/ServerChannelMetrics.java deleted file mode 100644 index d09abf4d..00000000 --- a/zuul-core/src/main/java/com/netflix/netty/common/metrics/ServerChannelMetrics.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2018 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.netty.common.metrics; - -import com.netflix.netty.common.throttle.MaxInboundConnectionsHandler; -import com.netflix.spectator.api.Counter; -import com.netflix.spectator.api.Gauge; -import com.netflix.spectator.api.Registry; -import io.netty.channel.Channel; -import io.netty.channel.ChannelHandler; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInboundHandlerAdapter; -import io.netty.handler.timeout.IdleStateEvent; -import io.netty.util.AttributeKey; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.concurrent.atomic.AtomicInteger; - -/** - * User: Mike Smith Date: 3/5/16 Time: 5:47 PM - */ -@ChannelHandler.Sharable -public class ServerChannelMetrics extends ChannelInboundHandlerAdapter { - - private static final Logger LOG = LoggerFactory.getLogger(ServerChannelMetrics.class); - private static final AttributeKey ATTR_CURRENT_CONNS = AttributeKey - .newInstance("_server_connections_count"); - - private final Gauge currentConnectionsGauge; - private final AtomicInteger currentConnections = new AtomicInteger(0); - private final Counter totalConnections; - private final Counter connectionClosed; - private final Counter connectionErrors; - - public ServerChannelMetrics(String id, Registry registry) { - String metricNamePrefix = "server.connections."; - currentConnectionsGauge = registry.gauge(metricNamePrefix + "current", "id", id); - totalConnections = registry.counter(metricNamePrefix + "connect", "id", id); - connectionErrors = registry.counter(metricNamePrefix + "errors", "id", id); - connectionClosed = registry.counter(metricNamePrefix + "close", "id", id); - } - - public static int currentConnectionCountFromChannel(Channel ch) { - AtomicInteger count = ch.attr(ATTR_CURRENT_CONNS).get(); - return count == null ? 0 : count.get(); - } - - @Override - public void channelActive(ChannelHandlerContext ctx) throws Exception { - currentConnectionsGauge.set(currentConnections.incrementAndGet()); - totalConnections.increment(); - ctx.channel().attr(ATTR_CURRENT_CONNS).set(currentConnections); - - super.channelActive(ctx); - } - - @Override - public void channelInactive(ChannelHandlerContext ctx) throws Exception { - try { - super.channelInactive(ctx); - } finally { - currentConnectionsGauge.set(currentConnections.decrementAndGet()); - connectionClosed.increment(); - } - } - - @Override - public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { - connectionErrors.increment(); - if (LOG.isInfoEnabled()) { - LOG.info("Connection error caught. " + String.valueOf(cause), cause); - } - super.exceptionCaught(ctx, cause); - } -} diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportLoggingHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportLoggingHandler.java index 44ce15a4..f9d6f9db 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportLoggingHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportLoggingHandler.java @@ -17,6 +17,8 @@ package com.netflix.zuul.netty.insights; import com.netflix.config.CachedDynamicLongProperty; +import com.netflix.netty.common.HttpLifecycleChannelHandler; +import com.netflix.netty.common.metrics.HttpMetricsChannelHandler; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Registry; import com.netflix.zuul.context.SessionContext; @@ -33,9 +35,6 @@ import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; -import com.netflix.netty.common.HttpLifecycleChannelHandler; -import com.netflix.netty.common.metrics.HttpMetricsChannelHandler; -import com.netflix.netty.common.metrics.ServerChannelMetrics; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -92,7 +91,7 @@ private void logPassport(Channel channel) // Do some debug logging of the Passport. if (LOG.isDebugEnabled()) { LOG.debug("State after complete. " - + ", current-server-conns = " + ServerChannelMetrics.currentConnectionCountFromChannel(channel) + + ", current-server-conns = " + ServerStateHandler.InboundHandler.currentConnectionCountFromChannel(channel) + ", current-http-reqs = " + HttpMetricsChannelHandler.getInflightRequestCountFromChannel(channel) + ", status = " + (response == null ? getRequestId(channel, ctx) : response.getStatus()) + ", nfstatus = " + String.valueOf(StatusCategoryUtils.getStatusCategory(ctx)) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportStateServerHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/insights/ServerStateHandler.java similarity index 59% rename from zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportStateServerHandler.java rename to zuul-core/src/main/java/com/netflix/zuul/netty/insights/ServerStateHandler.java index 9185c963..6f184964 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportStateServerHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/insights/ServerStateHandler.java @@ -18,77 +18,98 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; - +import com.netflix.spectator.api.Counter; +import com.netflix.spectator.api.Gauge; +import com.netflix.spectator.api.Registry; import com.netflix.zuul.passport.CurrentPassport; import com.netflix.zuul.passport.PassportState; -import com.netflix.spectator.api.Registry; +import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.channel.ChannelOutboundHandlerAdapter; import io.netty.channel.ChannelPromise; import io.netty.channel.unix.Errors; import io.netty.handler.timeout.IdleStateEvent; +import io.netty.util.AttributeKey; +import java.util.concurrent.atomic.AtomicInteger; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * User: Mike Smith - * Date: 9/24/16 - * Time: 2:41 PM + * User: Mike Smith Date: 9/24/16 Time: 2:41 PM */ -public final class PassportStateServerHandler { - private static final Logger LOG = LoggerFactory.getLogger(PassportStateServerHandler.class); +public final class ServerStateHandler { + + private static final Logger logger = LoggerFactory.getLogger(ServerStateHandler.class); private static Registry registry; - private static CurrentPassport passport(ChannelHandlerContext ctx) - { + private static CurrentPassport passport(ChannelHandlerContext ctx) { return CurrentPassport.fromChannel(ctx.channel()); } public static void setRegistry(Registry registry) { checkNotNull(registry, "registry"); checkState( - PassportStateServerHandler.registry == null || PassportStateServerHandler.registry == registry, + ServerStateHandler.registry == null || ServerStateHandler.registry == registry, "registry already set"); - PassportStateServerHandler.registry = registry; + ServerStateHandler.registry = registry; } protected static void incrementExceptionCounter(Throwable throwable, String handler) { - checkState(PassportStateServerHandler.registry != null, "registry not set"); + checkState(ServerStateHandler.registry != null, "registry not set"); registry.counter("server.connection.exception", "handler", handler, "id", throwable.getClass().getSimpleName()) .increment(); } - public static final class InboundHandler extends ChannelInboundHandlerAdapter - { + public static final class InboundHandler extends ChannelInboundHandlerAdapter { + + private final Gauge currentConnectionsGauge; + private final AtomicInteger currentConnections = new AtomicInteger(0); + private final Counter totalConnections; + private final Counter connectionClosed; + private final Counter connectionErrors; + + private static final AttributeKey ATTR_CURRENT_CONNS = AttributeKey + .newInstance("_server_connections_count"); + + public InboundHandler(String metricId) { + this.currentConnectionsGauge = registry.gauge("server.connections.current", "id", metricId); + this.totalConnections = registry.counter("server.connections.connect", "id", metricId); + this.connectionClosed = registry.counter("server.connections.close", "id", metricId); + this.connectionErrors = registry.counter("server.connections.errors", "id", metricId); + } + @Override - public void channelActive(ChannelHandlerContext ctx) throws Exception - { + public void channelActive(ChannelHandlerContext ctx) throws Exception { + currentConnectionsGauge.set(currentConnections.incrementAndGet()); + totalConnections.increment(); + ctx.channel().attr(ATTR_CURRENT_CONNS).set(currentConnections); passport(ctx).add(PassportState.SERVER_CH_ACTIVE); + super.channelActive(ctx); } @Override - public void channelInactive(ChannelHandlerContext ctx) throws Exception - { + public void channelInactive(ChannelHandlerContext ctx) throws Exception { + currentConnectionsGauge.set(currentConnections.decrementAndGet()); + connectionClosed.increment(); passport(ctx).add(PassportState.SERVER_CH_INACTIVE); + super.channelInactive(ctx); } @Override - public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception - { + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { + connectionErrors.increment(); + incrementExceptionCounter(cause, "PassportStateServerHandler.Inbound"); passport(ctx).add(PassportState.SERVER_CH_EXCEPTION); - if (cause instanceof Errors.NativeIoException) { - LOG.debug("PassportStateServerHandler Inbound NativeIoException " + cause); - incrementExceptionCounter(cause, "PassportStateServerHandler.Inbound"); - } else { - super.exceptionCaught(ctx, cause); - } + logger.info("Connection error on Inbound: {} ", cause); + + super.exceptionCaught(ctx, cause); } @Override @@ -102,30 +123,33 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc super.userEventTriggered(ctx, evt); } + + public static int currentConnectionCountFromChannel(Channel ch) { + AtomicInteger count = ch.attr(ATTR_CURRENT_CONNS).get(); + return count == null ? 0 : count.get(); + } + } - public static final class OutboundHandler extends ChannelOutboundHandlerAdapter - { + public static final class OutboundHandler extends ChannelOutboundHandlerAdapter { + @Override - public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception - { + public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { passport(ctx).add(PassportState.SERVER_CH_CLOSE); super.close(ctx, promise); } @Override - public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception - { + public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { passport(ctx).add(PassportState.SERVER_CH_DISCONNECT); super.disconnect(ctx, promise); } @Override - public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception - { + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { passport(ctx).add(PassportState.SERVER_CH_EXCEPTION); if (cause instanceof Errors.NativeIoException) { - LOG.debug("PassportStateServerHandler Outbound NativeIoException " + cause); + logger.debug("PassportStateServerHandler Outbound NativeIoException " + cause); incrementExceptionCounter(cause, "PassportStateServerHandler.Outbound"); } else { super.exceptionCaught(ctx, cause); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java index 04ac475e..3e27192f 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java @@ -16,6 +16,11 @@ package com.netflix.zuul.netty.server; +import static com.google.common.base.Preconditions.checkNotNull; +import static com.netflix.zuul.passport.PassportState.FILTERS_INBOUND_END; +import static com.netflix.zuul.passport.PassportState.FILTERS_INBOUND_START; +import static com.netflix.zuul.passport.PassportState.FILTERS_OUTBOUND_END; +import static com.netflix.zuul.passport.PassportState.FILTERS_OUTBOUND_START; import com.netflix.config.CachedDynamicIntProperty; import com.netflix.netty.common.CloseOnIdleStateHandler; import com.netflix.netty.common.Http1ConnectionCloseHandler; @@ -31,13 +36,11 @@ import com.netflix.netty.common.metrics.HttpBodySizeRecordingChannelHandler; import com.netflix.netty.common.metrics.HttpMetricsChannelHandler; import com.netflix.netty.common.metrics.PerEventLoopMetricsChannelHandler; -import com.netflix.netty.common.metrics.ServerChannelMetrics; import com.netflix.netty.common.proxyprotocol.ElbProxyProtocolChannelHandler; import com.netflix.netty.common.proxyprotocol.StripUntrustedProxyHeadersHandler; import com.netflix.netty.common.throttle.MaxInboundConnectionsHandler; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Registry; -import com.netflix.spectator.api.Spectator; import com.netflix.zuul.FilterLoader; import com.netflix.zuul.FilterUsageNotifier; import com.netflix.zuul.RequestCompleteHandler; @@ -54,7 +57,7 @@ import com.netflix.zuul.netty.filter.ZuulFilterChainRunner; import com.netflix.zuul.netty.insights.PassportLoggingHandler; import com.netflix.zuul.netty.insights.PassportStateHttpServerHandler; -import com.netflix.zuul.netty.insights.PassportStateServerHandler; +import com.netflix.zuul.netty.insights.ServerStateHandler; import com.netflix.zuul.netty.server.ssl.SslHandshakeInfoHandler; import io.netty.channel.Channel; import io.netty.channel.ChannelHandler; @@ -66,14 +69,9 @@ import io.netty.handler.logging.LoggingHandler; import io.netty.handler.timeout.IdleStateHandler; import io.netty.util.AttributeKey; - -import java.util.List; import java.util.SortedSet; import java.util.concurrent.TimeUnit; -import static com.google.common.base.Preconditions.checkNotNull; -import static com.netflix.zuul.passport.PassportState.*; - /** * User: Mike Smith * Date: 3/5/16 @@ -115,7 +113,6 @@ public abstract class BaseZuulChannelInitializer extends ChannelInitializer Date: Thu, 11 Feb 2021 17:13:57 -0800 Subject: [PATCH 206/273] Remove registry mocks from tests --- .../common/CloseOnIdleStateHandlerTest.java | 24 +++++++---------- .../MaxInboundConnectionsHandlerTest.java | 26 +++++++++++-------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/zuul-core/src/test/java/com/netflix/netty/common/CloseOnIdleStateHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/CloseOnIdleStateHandlerTest.java index ea85bfed..92fb14c6 100644 --- a/zuul-core/src/test/java/com/netflix/netty/common/CloseOnIdleStateHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/netty/common/CloseOnIdleStateHandlerTest.java @@ -17,35 +17,30 @@ package com.netflix.netty.common; import static io.netty.handler.timeout.IdleStateEvent.ALL_IDLE_STATE_EVENT; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; +import static org.junit.Assert.assertEquals; import com.netflix.spectator.api.Counter; +import com.netflix.spectator.api.DefaultRegistry; +import com.netflix.spectator.api.Id; import com.netflix.spectator.api.Registry; import com.netflix.zuul.netty.server.http2.DummyChannelHandler; import io.netty.channel.embedded.EmbeddedChannel; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.junit.runners.JUnit4; -@RunWith(MockitoJUnitRunner.class) +@RunWith(JUnit4.class) public class CloseOnIdleStateHandlerTest { - @Mock - private Registry registry; - @Mock - private Counter counter; - + private Registry registry = new DefaultRegistry(); + private Id counterId; private final String listener = "test-idle-state"; @Before public void setup() { - when(registry.counter("server.connections.idle.timeout", "id", listener)).thenReturn(counter); + counterId = registry.createId("server.connections.idle.timeout").withTags("id", listener); } - @Test public void incrementCounterOnIdleStateEvent() { final EmbeddedChannel channel = new EmbeddedChannel(); @@ -54,6 +49,7 @@ public void incrementCounterOnIdleStateEvent() { channel.pipeline().context(DummyChannelHandler.class).fireUserEventTriggered(ALL_IDLE_STATE_EVENT); - verify(counter, times(1)).increment(); + final Counter idleTimeouts = (Counter) registry.get(counterId); + assertEquals(1, idleTimeouts.count()); } } diff --git a/zuul-core/src/test/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandlerTest.java index a958e171..d561d94f 100644 --- a/zuul-core/src/test/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/netty/common/throttle/MaxInboundConnectionsHandlerTest.java @@ -19,43 +19,47 @@ import static com.netflix.netty.common.throttle.MaxInboundConnectionsHandler.ATTR_CH_THROTTLED; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.DefaultRegistry; +import com.netflix.spectator.api.Id; import com.netflix.spectator.api.Registry; import com.netflix.zuul.netty.server.http2.DummyChannelHandler; import com.netflix.zuul.passport.CurrentPassport; import com.netflix.zuul.passport.PassportState; import io.netty.channel.embedded.EmbeddedChannel; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import org.mockito.Mockito; @RunWith(JUnit4.class) public class MaxInboundConnectionsHandlerTest { + private Registry registry = new DefaultRegistry(); + private String listener = "test-throttled"; + private Id counterId; + + @Before + public void setup() { + counterId = registry.createId("server.connections.throttled").withTags("id", listener); + } + @Test public void verifyPassportStateAndAttrs() { - Registry registry = Mockito.mock(Registry.class); - Counter counter = Mockito.mock(Counter.class); - - when(registry.counter("server.connections.throttled", "id", "test-conn-throttled")).thenReturn(counter); final EmbeddedChannel channel = new EmbeddedChannel(); channel.pipeline().addLast(new DummyChannelHandler()); - channel.pipeline().addLast(new MaxInboundConnectionsHandler(registry, "test-conn-throttled", 1)); + channel.pipeline().addLast(new MaxInboundConnectionsHandler(registry, listener, 1)); // Fire twice to increment current conns. count channel.pipeline().context(DummyChannelHandler.class).fireChannelActive(); channel.pipeline().context(DummyChannelHandler.class).fireChannelActive(); - verify(counter, times(1)).increment(); + final Counter throttledCount = (Counter) registry.get(counterId); + + assertEquals(1, throttledCount.count()); assertEquals(PassportState.SERVER_CH_THROTTLING, CurrentPassport.fromChannel(channel).getState()); assertTrue(channel.attr(ATTR_CH_THROTTLED).get()); - } } From 834a93e9b08f4e09898174f95187c04241555aac Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Thu, 11 Feb 2021 16:23:42 -0800 Subject: [PATCH 207/273] Basic tests for server conn counts --- .../insights/ServerStateHandlerTest.java | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 zuul-core/src/test/java/com/netflix/zuul/netty/insights/ServerStateHandlerTest.java diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/insights/ServerStateHandlerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/insights/ServerStateHandlerTest.java new file mode 100644 index 00000000..0efd49be --- /dev/null +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/insights/ServerStateHandlerTest.java @@ -0,0 +1,67 @@ +package com.netflix.zuul.netty.insights; + +import static org.junit.Assert.assertEquals; +import com.netflix.spectator.api.Counter; +import com.netflix.spectator.api.DefaultRegistry; +import com.netflix.spectator.api.Gauge; +import com.netflix.spectator.api.Id; +import com.netflix.spectator.api.Registry; +import com.netflix.zuul.netty.insights.ServerStateHandler.InboundHandler; +import com.netflix.zuul.netty.server.http2.DummyChannelHandler; +import io.netty.channel.embedded.EmbeddedChannel; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ServerStateHandlerTest { + + + private Registry registry = new DefaultRegistry(); + + private Id currentConnsId; + private Id connectsId; + private Id errorsId; + private Id closesId; + + final String listener = "test-conn-throttled"; + @Before + public void init() { + currentConnsId = registry.createId("server.connections.current").withTags("id", listener); + connectsId = registry.createId("server.connections.connect").withTags("id", listener); + closesId = registry.createId("server.connections.close").withTags("id", listener); + errorsId = registry.createId("server.connections.errors").withTags("id", listener); + + } + @Test + public void verifyConnMetrics() { + + ServerStateHandler.setRegistry(registry); + + final EmbeddedChannel channel = new EmbeddedChannel(); + channel.pipeline().addLast(new DummyChannelHandler()); + channel.pipeline().addLast(new InboundHandler(listener)); + + final Counter connects = (Counter) registry.get(connectsId); + final Gauge currentConns = (Gauge) registry.get(currentConnsId); + final Counter closes = (Counter) registry.get(closesId); + final Counter errors = (Counter) registry.get(errorsId); + + // Connects X 3 + channel.pipeline().context(DummyChannelHandler.class).fireChannelActive(); + channel.pipeline().context(DummyChannelHandler.class).fireChannelActive(); + channel.pipeline().context(DummyChannelHandler.class).fireChannelActive(); + + assertEquals(3.0, currentConns.value(), 0.0); + assertEquals(3, connects.count()); + + // Closes X 1 + channel.pipeline().context(DummyChannelHandler.class).fireChannelInactive(); + + assertEquals(2.0, currentConns.value(), 0.0); + assertEquals(3, connects.count()); + assertEquals(1, closes.count()); + assertEquals(0, errors.count()); + } +} From 0b85220dfabeed6aa93b5ac07c3e56f5ac758d12 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Thu, 11 Feb 2021 16:53:15 -0800 Subject: [PATCH 208/273] Separate exception counters.Inject registry cleanly. --- .../netty/insights/ServerStateHandler.java | 39 ++++++------- .../server/BaseZuulChannelInitializer.java | 5 +- .../insights/ServerStateHandlerTest.java | 56 ++++++++++++++++--- 3 files changed, 69 insertions(+), 31 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/insights/ServerStateHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/insights/ServerStateHandler.java index 6f184964..c47eb894 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/insights/ServerStateHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/insights/ServerStateHandler.java @@ -43,30 +43,13 @@ public final class ServerStateHandler { private static final Logger logger = LoggerFactory.getLogger(ServerStateHandler.class); - private static Registry registry; - private static CurrentPassport passport(ChannelHandlerContext ctx) { return CurrentPassport.fromChannel(ctx.channel()); } - public static void setRegistry(Registry registry) { - checkNotNull(registry, "registry"); - checkState( - ServerStateHandler.registry == null || ServerStateHandler.registry == registry, - "registry already set"); - ServerStateHandler.registry = registry; - } - - protected static void incrementExceptionCounter(Throwable throwable, String handler) { - checkState(ServerStateHandler.registry != null, "registry not set"); - registry.counter("server.connection.exception", - "handler", handler, - "id", throwable.getClass().getSimpleName()) - .increment(); - } - public static final class InboundHandler extends ChannelInboundHandlerAdapter { + private final Registry registry; private final Gauge currentConnectionsGauge; private final AtomicInteger currentConnections = new AtomicInteger(0); private final Counter totalConnections; @@ -76,7 +59,8 @@ public static final class InboundHandler extends ChannelInboundHandlerAdapter { private static final AttributeKey ATTR_CURRENT_CONNS = AttributeKey .newInstance("_server_connections_count"); - public InboundHandler(String metricId) { + public InboundHandler(Registry registry, String metricId) { + this.registry = registry; this.currentConnectionsGauge = registry.gauge("server.connections.current", "id", metricId); this.totalConnections = registry.counter("server.connections.connect", "id", metricId); this.connectionClosed = registry.counter("server.connections.close", "id", metricId); @@ -105,7 +89,10 @@ public void channelInactive(ChannelHandlerContext ctx) throws Exception { @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { connectionErrors.increment(); - incrementExceptionCounter(cause, "PassportStateServerHandler.Inbound"); + registry.counter("server.connection.exception.inbound", + "handler", "ServerStateHandler.InboundHandler", + "id", cause.getClass().getSimpleName()) + .increment(); passport(ctx).add(PassportState.SERVER_CH_EXCEPTION); logger.info("Connection error on Inbound: {} ", cause); @@ -133,6 +120,12 @@ public static int currentConnectionCountFromChannel(Channel ch) { public static final class OutboundHandler extends ChannelOutboundHandlerAdapter { + private final Registry registry; + + public OutboundHandler(Registry registry) { + this.registry = registry; + } + @Override public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { passport(ctx).add(PassportState.SERVER_CH_CLOSE); @@ -150,7 +143,11 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws E passport(ctx).add(PassportState.SERVER_CH_EXCEPTION); if (cause instanceof Errors.NativeIoException) { logger.debug("PassportStateServerHandler Outbound NativeIoException " + cause); - incrementExceptionCounter(cause, "PassportStateServerHandler.Outbound"); + registry.counter("server.connection.exception.outbound", + "handler", "ServerStateHandler.OutboundHandler", + "id", cause.getClass().getSimpleName()) + .increment(); + } else { super.exceptionCaught(ctx, cause); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java index 3e27192f..c6e4c8ed 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseZuulChannelInitializer.java @@ -222,9 +222,8 @@ protected void storeChannel(Channel ch) } protected void addPassportHandler(ChannelPipeline pipeline) { - ServerStateHandler.setRegistry(registry); - pipeline.addLast(new ServerStateHandler.InboundHandler("http-" + metricId)); - pipeline.addLast(new ServerStateHandler.OutboundHandler()); + pipeline.addLast(new ServerStateHandler.InboundHandler(registry,"http-" + metricId)); + pipeline.addLast(new ServerStateHandler.OutboundHandler(registry)); } protected void addTcpRelatedHandlers(ChannelPipeline pipeline) diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/insights/ServerStateHandlerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/insights/ServerStateHandlerTest.java index 0efd49be..76b71d75 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/insights/ServerStateHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/insights/ServerStateHandlerTest.java @@ -1,3 +1,19 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.netflix.zuul.netty.insights; import static org.junit.Assert.assertEquals; @@ -8,6 +24,8 @@ import com.netflix.spectator.api.Registry; import com.netflix.zuul.netty.insights.ServerStateHandler.InboundHandler; import com.netflix.zuul.netty.server.http2.DummyChannelHandler; +import com.netflix.zuul.passport.CurrentPassport; +import com.netflix.zuul.passport.PassportState; import io.netty.channel.embedded.EmbeddedChannel; import org.junit.Before; import org.junit.Test; @@ -17,31 +35,31 @@ @RunWith(JUnit4.class) public class ServerStateHandlerTest { - - private Registry registry = new DefaultRegistry(); - + private Registry registry; private Id currentConnsId; private Id connectsId; private Id errorsId; private Id closesId; + private Id exceptionsId; final String listener = "test-conn-throttled"; + @Before public void init() { + registry = new DefaultRegistry(); currentConnsId = registry.createId("server.connections.current").withTags("id", listener); connectsId = registry.createId("server.connections.connect").withTags("id", listener); closesId = registry.createId("server.connections.close").withTags("id", listener); errorsId = registry.createId("server.connections.errors").withTags("id", listener); - + exceptionsId = registry.createId("server.connection.exception").withTags("id", listener); } + @Test public void verifyConnMetrics() { - ServerStateHandler.setRegistry(registry); - final EmbeddedChannel channel = new EmbeddedChannel(); channel.pipeline().addLast(new DummyChannelHandler()); - channel.pipeline().addLast(new InboundHandler(listener)); + channel.pipeline().addLast(new InboundHandler(registry, listener)); final Counter connects = (Counter) registry.get(connectsId); final Gauge currentConns = (Gauge) registry.get(currentConnsId); @@ -64,4 +82,28 @@ public void verifyConnMetrics() { assertEquals(1, closes.count()); assertEquals(0, errors.count()); } + + @Test + public void setPassportStateOnConnect() { + + final EmbeddedChannel channel = new EmbeddedChannel(); + channel.pipeline().addLast(new DummyChannelHandler()); + channel.pipeline().addLast(new InboundHandler(registry, listener)); + + channel.pipeline().context(DummyChannelHandler.class).fireChannelActive(); + + assertEquals(PassportState.SERVER_CH_ACTIVE, CurrentPassport.fromChannel(channel).getState()); + } + + @Test + public void setPassportStateOnDisconnect() { + final EmbeddedChannel channel = new EmbeddedChannel(); + channel.pipeline().addLast(new DummyChannelHandler()); + channel.pipeline().addLast(new InboundHandler(registry, listener)); + + channel.pipeline().context(DummyChannelHandler.class).fireChannelInactive(); + + assertEquals(PassportState.SERVER_CH_INACTIVE, CurrentPassport.fromChannel(channel).getState()); + } + } From 055f9260550915326bb1494eea97634642788705 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Fri, 12 Feb 2021 13:04:03 -0800 Subject: [PATCH 209/273] Fix race condition with conns Gauge --- .../netty/insights/ServerStateHandler.java | 26 ++++++++++--------- .../insights/ServerStateHandlerTest.java | 2 -- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/insights/ServerStateHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/insights/ServerStateHandler.java index c47eb894..9e97b31e 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/insights/ServerStateHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/insights/ServerStateHandler.java @@ -16,8 +16,6 @@ package com.netflix.zuul.netty.insights; -import static com.google.common.base.Preconditions.checkNotNull; -import static com.google.common.base.Preconditions.checkState; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Gauge; import com.netflix.spectator.api.Registry; @@ -31,7 +29,6 @@ import io.netty.channel.unix.Errors; import io.netty.handler.timeout.IdleStateEvent; import io.netty.util.AttributeKey; -import java.util.concurrent.atomic.AtomicInteger; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -51,13 +48,11 @@ public static final class InboundHandler extends ChannelInboundHandlerAdapter { private final Registry registry; private final Gauge currentConnectionsGauge; - private final AtomicInteger currentConnections = new AtomicInteger(0); private final Counter totalConnections; private final Counter connectionClosed; private final Counter connectionErrors; - private static final AttributeKey ATTR_CURRENT_CONNS = AttributeKey - .newInstance("_server_connections_count"); + private static final AttributeKey ATTR_CURRENT_CONNS = AttributeKey.newInstance("_server_connections_count"); public InboundHandler(Registry registry, String metricId) { this.registry = registry; @@ -69,9 +64,13 @@ public InboundHandler(Registry registry, String metricId) { @Override public void channelActive(ChannelHandlerContext ctx) throws Exception { - currentConnectionsGauge.set(currentConnections.incrementAndGet()); + synchronized (currentConnectionsGauge) { + double currentVal = currentConnectionsGauge.value(); + currentConnectionsGauge.set(Double.isNaN(currentVal) ? 1.0 : currentVal + 1); + } + totalConnections.increment(); - ctx.channel().attr(ATTR_CURRENT_CONNS).set(currentConnections); + ctx.channel().attr(ATTR_CURRENT_CONNS).set(currentConnectionsGauge.value()); passport(ctx).add(PassportState.SERVER_CH_ACTIVE); super.channelActive(ctx); @@ -79,7 +78,10 @@ public void channelActive(ChannelHandlerContext ctx) throws Exception { @Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { - currentConnectionsGauge.set(currentConnections.decrementAndGet()); + synchronized (currentConnectionsGauge) { + double currentVal = currentConnectionsGauge.value(); + currentConnectionsGauge.set(Double.isNaN(currentVal) ? 1.0 : currentVal - 1); + } connectionClosed.increment(); passport(ctx).add(PassportState.SERVER_CH_INACTIVE); @@ -111,9 +113,9 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc super.userEventTriggered(ctx, evt); } - public static int currentConnectionCountFromChannel(Channel ch) { - AtomicInteger count = ch.attr(ATTR_CURRENT_CONNS).get(); - return count == null ? 0 : count.get(); + public static double currentConnectionCountFromChannel(Channel ch) { + Double count = ch.attr(ATTR_CURRENT_CONNS).get(); + return count == null ? 0.0 : count; } } diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/insights/ServerStateHandlerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/insights/ServerStateHandlerTest.java index 76b71d75..e31ae22f 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/insights/ServerStateHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/insights/ServerStateHandlerTest.java @@ -40,7 +40,6 @@ public class ServerStateHandlerTest { private Id connectsId; private Id errorsId; private Id closesId; - private Id exceptionsId; final String listener = "test-conn-throttled"; @@ -51,7 +50,6 @@ public void init() { connectsId = registry.createId("server.connections.connect").withTags("id", listener); closesId = registry.createId("server.connections.close").withTags("id", listener); errorsId = registry.createId("server.connections.errors").withTags("id", listener); - exceptionsId = registry.createId("server.connection.exception").withTags("id", listener); } @Test From bec2832f6d84ef70d8eaca2747090293d3c5c967 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Mon, 15 Feb 2021 11:25:10 -0800 Subject: [PATCH 210/273] Remove duplicate conns count. Reduce synchronization --- .../netflix/zuul/monitoring/ConnCounter.java | 6 ++++- .../insights/PassportLoggingHandler.java | 3 ++- .../netty/insights/ServerStateHandler.java | 23 ------------------- .../zuul/monitoring/ConnCounterTest.java | 18 ++++++++++++++- .../insights/ServerStateHandlerTest.java | 3 --- 5 files changed, 24 insertions(+), 29 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java index e96508d0..183ad89a 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/monitoring/ConnCounter.java @@ -45,7 +45,7 @@ public final class ConnCounter { /** * An array of locks to guard the gauges. This is the same as Guava's Striped, but avoids the dep. - * + *

* This can be removed after https://github.com/Netflix/spectator/issues/862 is fixed. */ private static final Object[] locks = new Object[LOCK_COUNT]; @@ -121,6 +121,10 @@ public void increment(String event, Attrs extraDimensions) { counts.put(event, gauge); } + public double getCurrentActiveConns() { + return counts.containsKey("active") ? counts.get("active").value() : 0.0; + } + public void decrement(String event) { Objects.requireNonNull(event); Gauge gauge = counts.remove(event); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportLoggingHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportLoggingHandler.java index f9d6f9db..6444cb9c 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportLoggingHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/insights/PassportLoggingHandler.java @@ -24,6 +24,7 @@ import com.netflix.zuul.context.SessionContext; import com.netflix.zuul.message.http.HttpRequestMessage; import com.netflix.zuul.message.http.HttpResponseMessage; +import com.netflix.zuul.monitoring.ConnCounter; import com.netflix.zuul.netty.ChannelUtils; import com.netflix.zuul.netty.server.ClientRequestReceiver; import com.netflix.zuul.niws.RequestAttempts; @@ -91,7 +92,7 @@ private void logPassport(Channel channel) // Do some debug logging of the Passport. if (LOG.isDebugEnabled()) { LOG.debug("State after complete. " - + ", current-server-conns = " + ServerStateHandler.InboundHandler.currentConnectionCountFromChannel(channel) + + ", current-server-conns = " + ConnCounter.from(channel).getCurrentActiveConns() + ", current-http-reqs = " + HttpMetricsChannelHandler.getInflightRequestCountFromChannel(channel) + ", status = " + (response == null ? getRequestId(channel, ctx) : response.getStatus()) + ", nfstatus = " + String.valueOf(StatusCategoryUtils.getStatusCategory(ctx)) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/insights/ServerStateHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/insights/ServerStateHandler.java index 9e97b31e..37cf164e 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/insights/ServerStateHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/insights/ServerStateHandler.java @@ -17,18 +17,15 @@ package com.netflix.zuul.netty.insights; import com.netflix.spectator.api.Counter; -import com.netflix.spectator.api.Gauge; import com.netflix.spectator.api.Registry; import com.netflix.zuul.passport.CurrentPassport; import com.netflix.zuul.passport.PassportState; -import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.channel.ChannelOutboundHandlerAdapter; import io.netty.channel.ChannelPromise; import io.netty.channel.unix.Errors; import io.netty.handler.timeout.IdleStateEvent; -import io.netty.util.AttributeKey; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -47,16 +44,12 @@ private static CurrentPassport passport(ChannelHandlerContext ctx) { public static final class InboundHandler extends ChannelInboundHandlerAdapter { private final Registry registry; - private final Gauge currentConnectionsGauge; private final Counter totalConnections; private final Counter connectionClosed; private final Counter connectionErrors; - private static final AttributeKey ATTR_CURRENT_CONNS = AttributeKey.newInstance("_server_connections_count"); - public InboundHandler(Registry registry, String metricId) { this.registry = registry; - this.currentConnectionsGauge = registry.gauge("server.connections.current", "id", metricId); this.totalConnections = registry.counter("server.connections.connect", "id", metricId); this.connectionClosed = registry.counter("server.connections.close", "id", metricId); this.connectionErrors = registry.counter("server.connections.errors", "id", metricId); @@ -64,13 +57,7 @@ public InboundHandler(Registry registry, String metricId) { @Override public void channelActive(ChannelHandlerContext ctx) throws Exception { - synchronized (currentConnectionsGauge) { - double currentVal = currentConnectionsGauge.value(); - currentConnectionsGauge.set(Double.isNaN(currentVal) ? 1.0 : currentVal + 1); - } - totalConnections.increment(); - ctx.channel().attr(ATTR_CURRENT_CONNS).set(currentConnectionsGauge.value()); passport(ctx).add(PassportState.SERVER_CH_ACTIVE); super.channelActive(ctx); @@ -78,10 +65,6 @@ public void channelActive(ChannelHandlerContext ctx) throws Exception { @Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { - synchronized (currentConnectionsGauge) { - double currentVal = currentConnectionsGauge.value(); - currentConnectionsGauge.set(Double.isNaN(currentVal) ? 1.0 : currentVal - 1); - } connectionClosed.increment(); passport(ctx).add(PassportState.SERVER_CH_INACTIVE); @@ -112,12 +95,6 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc super.userEventTriggered(ctx, evt); } - - public static double currentConnectionCountFromChannel(Channel ch) { - Double count = ch.attr(ATTR_CURRENT_CONNS).get(); - return count == null ? 0.0 : count; - } - } public static final class OutboundHandler extends ChannelOutboundHandlerAdapter { diff --git a/zuul-core/src/test/java/com/netflix/zuul/monitoring/ConnCounterTest.java b/zuul-core/src/test/java/com/netflix/zuul/monitoring/ConnCounterTest.java index 09e07b18..25b855f5 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/monitoring/ConnCounterTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/monitoring/ConnCounterTest.java @@ -22,7 +22,6 @@ import com.netflix.spectator.api.DefaultRegistry; import com.netflix.spectator.api.Gauge; import com.netflix.spectator.api.Registry; -import com.netflix.spectator.api.histogram.PercentileTimer; import com.netflix.zuul.Attrs; import com.netflix.zuul.netty.server.Server; import io.netty.channel.embedded.EmbeddedChannel; @@ -57,4 +56,21 @@ public void record() { assertNotNull(meter3); assertEquals(1, meter3.value(), 0); } + + @Test + public void activeConnsCount() { + EmbeddedChannel channel = new EmbeddedChannel(); + Attrs attrs = Attrs.newInstance(); + channel.attr(Server.CONN_DIMENSIONS).set(attrs); + Registry registry = new DefaultRegistry(); + + ConnCounter.install(channel, registry, registry.createId("foo")); + + // Dedup increments + ConnCounter.from(channel).increment("active"); + ConnCounter.from(channel).increment("active"); + + + assertEquals(1, ConnCounter.from(channel).getCurrentActiveConns(), 0); + } } diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/insights/ServerStateHandlerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/insights/ServerStateHandlerTest.java index e31ae22f..9bc4ed46 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/insights/ServerStateHandlerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/insights/ServerStateHandlerTest.java @@ -60,7 +60,6 @@ public void verifyConnMetrics() { channel.pipeline().addLast(new InboundHandler(registry, listener)); final Counter connects = (Counter) registry.get(connectsId); - final Gauge currentConns = (Gauge) registry.get(currentConnsId); final Counter closes = (Counter) registry.get(closesId); final Counter errors = (Counter) registry.get(errorsId); @@ -69,13 +68,11 @@ public void verifyConnMetrics() { channel.pipeline().context(DummyChannelHandler.class).fireChannelActive(); channel.pipeline().context(DummyChannelHandler.class).fireChannelActive(); - assertEquals(3.0, currentConns.value(), 0.0); assertEquals(3, connects.count()); // Closes X 1 channel.pipeline().context(DummyChannelHandler.class).fireChannelInactive(); - assertEquals(2.0, currentConns.value(), 0.0); assertEquals(3, connects.count()); assertEquals(1, closes.count()); assertEquals(0, errors.count()); From f91b8d3042be8dc7a5645be46074fff13a04b02d Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Mon, 22 Feb 2021 10:45:57 -0800 Subject: [PATCH 211/273] remove unnecessary Governator dependency --- zuul-guice/build.gradle | 1 - zuul-guice/dependencies.lock | 9 ----- .../netflix/zuul/guice/BaseInjectionTest.java | 34 +++++++++++++++++++ .../guice/GuiceFilterFactoryIntegTest.java | 14 ++++---- .../zuul/init/ZuulFiltersModuleIntegTest.java | 17 +++++----- zuul-sample/build.gradle | 1 - zuul-sample/dependencies.lock | 18 ---------- .../com/netflix/zuul/sample/Bootstrap.java | 4 +-- 8 files changed, 50 insertions(+), 48 deletions(-) create mode 100644 zuul-guice/src/test/java/com/netflix/zuul/guice/BaseInjectionTest.java diff --git a/zuul-guice/build.gradle b/zuul-guice/build.gradle index dc184d47..4db10851 100644 --- a/zuul-guice/build.gradle +++ b/zuul-guice/build.gradle @@ -5,7 +5,6 @@ dependencies { api(group: 'com.google.inject', name: 'guice', version: "4.2.3", classifier: "no_aop") implementation 'commons-configuration:commons-configuration:1.8' - testImplementation "com.netflix.governator:governator-test-junit:1.+" testImplementation libraries.junit, libraries.mockito, libraries.truth diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 6f8e14d8..b5abc4c0 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -288,9 +288,6 @@ ], "locked": "1.9.18" }, - "com.netflix.governator:governator-test-junit": { - "locked": "1.17.11" - }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -640,9 +637,6 @@ ], "locked": "1.9.18" }, - "com.netflix.governator:governator-test-junit": { - "locked": "1.17.11" - }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -783,9 +777,6 @@ ], "locked": "1.9.18" }, - "com.netflix.governator:governator-test-junit": { - "locked": "1.17.11" - }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" diff --git a/zuul-guice/src/test/java/com/netflix/zuul/guice/BaseInjectionTest.java b/zuul-guice/src/test/java/com/netflix/zuul/guice/BaseInjectionTest.java new file mode 100644 index 00000000..c823bfc3 --- /dev/null +++ b/zuul-guice/src/test/java/com/netflix/zuul/guice/BaseInjectionTest.java @@ -0,0 +1,34 @@ +package com.netflix.zuul.guice; + +import com.google.inject.AbstractModule; +import com.google.inject.Guice; +import com.google.inject.Injector; +import com.netflix.config.ConfigurationManager; +import com.netflix.spectator.api.NoopRegistry; +import com.netflix.spectator.api.Registry; +import com.netflix.zuul.DynamicCodeCompiler; +import com.netflix.zuul.DynamicFilterLoader; +import com.netflix.zuul.FilterFileManager; +import com.netflix.zuul.FilterLoader; +import com.netflix.zuul.filters.FilterRegistry; +import com.netflix.zuul.filters.MutableFilterRegistry; +import com.netflix.zuul.init.InitTestModule; +import com.netflix.zuul.init.ZuulFiltersModule; +import java.io.FilenameFilter; +import org.apache.commons.configuration.AbstractConfiguration; +import org.junit.Before; + +/** + * Base Injection Test + * + * @author Arthur Gonigberg + * @since February 22, 2021 + */ +public class BaseInjectionTest { + protected Injector injector = Guice.createInjector(new InitTestModule(), new ZuulFiltersModule()); + + @Before + public void setup () { + injector.injectMembers(this); + } +} diff --git a/zuul-guice/src/test/java/com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java b/zuul-guice/src/test/java/com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java index 98da85f6..865b56ca 100644 --- a/zuul-guice/src/test/java/com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java +++ b/zuul-guice/src/test/java/com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java @@ -16,20 +16,18 @@ package com.netflix.zuul.guice; -import static org.junit.Assert.*; +import static org.junit.Assert.assertNotNull; -import com.netflix.governator.guice.test.ModulesForTesting; -import com.netflix.governator.guice.test.junit4.GovernatorJunit4ClassRunner; -import javax.inject.Inject; +import com.google.inject.Inject; import org.junit.Test; import org.junit.runner.RunWith; +import org.junit.runners.BlockJUnit4ClassRunner; -@RunWith(GovernatorJunit4ClassRunner.class) -@ModulesForTesting() -public class GuiceFilterFactoryIntegTest { +@RunWith(BlockJUnit4ClassRunner.class) +public class GuiceFilterFactoryIntegTest extends BaseInjectionTest { @Inject - GuiceFilterFactory filterFactory; + private GuiceFilterFactory filterFactory; @Test public void ctorInjection() throws Exception { diff --git a/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java b/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java index efcd8cbe..6c293766 100644 --- a/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java +++ b/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java @@ -16,24 +16,23 @@ package com.netflix.zuul.init; +import static org.junit.Assert.assertEquals; + import com.netflix.config.ConfigurationManager; -import com.netflix.governator.guice.test.ModulesForTesting; -import com.netflix.governator.guice.test.junit4.GovernatorJunit4ClassRunner; import com.netflix.zuul.FilterFileManager.FilterFileManagerConfig; +import com.netflix.zuul.guice.BaseInjectionTest; +import javax.inject.Inject; import org.apache.commons.configuration.AbstractConfiguration; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; +import org.junit.runners.BlockJUnit4ClassRunner; -import javax.inject.Inject; - -import static org.junit.Assert.assertEquals; +@RunWith(BlockJUnit4ClassRunner.class) +public class ZuulFiltersModuleIntegTest extends BaseInjectionTest { -@RunWith(GovernatorJunit4ClassRunner.class) -@ModulesForTesting({InitTestModule.class, ZuulFiltersModule.class}) -public class ZuulFiltersModuleIntegTest { @Inject - FilterFileManagerConfig filterFileManagerConfig; + private FilterFileManagerConfig filterFileManagerConfig; @BeforeClass public static void before() { diff --git a/zuul-sample/build.gradle b/zuul-sample/build.gradle index b0581fec..b3753cb8 100644 --- a/zuul-sample/build.gradle +++ b/zuul-sample/build.gradle @@ -8,7 +8,6 @@ dependencies { project(":zuul-guice") implementation "com.netflix.eureka:eureka-client:1.9.18" implementation 'commons-configuration:commons-configuration:1.8' - implementation "com.netflix.governator:governator-core:1.+" annotationProcessor project(":zuul-processor") runtimeOnly 'org.apache.logging.log4j:log4j-core:2.14.0' diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 60410377..f7ce4576 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -198,9 +198,6 @@ ], "locked": "1.9.18" }, - "com.netflix.governator:governator-core": { - "locked": "1.17.11" - }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -343,9 +340,6 @@ ], "locked": "1.9.18" }, - "com.netflix.governator:governator-core": { - "locked": "1.17.11" - }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -499,9 +493,6 @@ ], "locked": "1.9.18" }, - "com.netflix.governator:governator-core": { - "locked": "1.17.11" - }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -710,9 +701,6 @@ ], "locked": "1.9.18" }, - "com.netflix.governator:governator-core": { - "locked": "1.17.11" - }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -902,9 +890,6 @@ ], "locked": "1.9.18" }, - "com.netflix.governator:governator-core": { - "locked": "1.17.11" - }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" @@ -1052,9 +1037,6 @@ ], "locked": "1.9.18" }, - "com.netflix.governator:governator-core": { - "locked": "1.17.11" - }, "com.netflix.netflix-commons:netflix-commons-util": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" diff --git a/zuul-sample/src/main/java/com/netflix/zuul/sample/Bootstrap.java b/zuul-sample/src/main/java/com/netflix/zuul/sample/Bootstrap.java index 153e0087..eaec2ec9 100644 --- a/zuul-sample/src/main/java/com/netflix/zuul/sample/Bootstrap.java +++ b/zuul-sample/src/main/java/com/netflix/zuul/sample/Bootstrap.java @@ -16,8 +16,8 @@ package com.netflix.zuul.sample; +import com.google.inject.Guice; import com.google.inject.Injector; -import com.netflix.governator.InjectorBuilder; import com.netflix.zuul.netty.server.BaseServerStartup; import com.netflix.zuul.netty.server.Server; @@ -41,7 +41,7 @@ public void start() { Server server = null; try { - Injector injector = InjectorBuilder.fromModule(new ZuulSampleModule()).createInjector(); + Injector injector = Guice.createInjector(new ZuulSampleModule()); BaseServerStartup serverStartup = injector.getInstance(BaseServerStartup.class); server = serverStartup.server(); From 7f94d9366d1383332b03292644807e778de6a195 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Mon, 22 Feb 2021 10:51:01 -0800 Subject: [PATCH 212/273] cleanup, add license --- .../com/netflix/zuul/BaseInjectionTest.java | 37 +++++++++++++++++++ .../netflix/zuul/guice/BaseInjectionTest.java | 34 ----------------- .../guice/GuiceFilterFactoryIntegTest.java | 1 + .../zuul/init/ZuulFiltersModuleIntegTest.java | 2 +- .../netflix/zuul/sample/ZuulSampleModule.java | 2 - 5 files changed, 39 insertions(+), 37 deletions(-) create mode 100644 zuul-guice/src/test/java/com/netflix/zuul/BaseInjectionTest.java delete mode 100644 zuul-guice/src/test/java/com/netflix/zuul/guice/BaseInjectionTest.java diff --git a/zuul-guice/src/test/java/com/netflix/zuul/BaseInjectionTest.java b/zuul-guice/src/test/java/com/netflix/zuul/BaseInjectionTest.java new file mode 100644 index 00000000..c8986180 --- /dev/null +++ b/zuul-guice/src/test/java/com/netflix/zuul/BaseInjectionTest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.netflix.zuul; + +import com.google.inject.Guice; +import com.google.inject.Injector; +import com.netflix.zuul.init.InitTestModule; +import com.netflix.zuul.init.ZuulFiltersModule; +import org.junit.Before; + +/** + * Base Injection Test + * + * @author Arthur Gonigberg + * @since February 22, 2021 + */ +public class BaseInjectionTest { + protected Injector injector = Guice.createInjector(new InitTestModule(), new ZuulFiltersModule()); + + @Before + public void setup () { + injector.injectMembers(this); + } +} diff --git a/zuul-guice/src/test/java/com/netflix/zuul/guice/BaseInjectionTest.java b/zuul-guice/src/test/java/com/netflix/zuul/guice/BaseInjectionTest.java deleted file mode 100644 index c823bfc3..00000000 --- a/zuul-guice/src/test/java/com/netflix/zuul/guice/BaseInjectionTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.netflix.zuul.guice; - -import com.google.inject.AbstractModule; -import com.google.inject.Guice; -import com.google.inject.Injector; -import com.netflix.config.ConfigurationManager; -import com.netflix.spectator.api.NoopRegistry; -import com.netflix.spectator.api.Registry; -import com.netflix.zuul.DynamicCodeCompiler; -import com.netflix.zuul.DynamicFilterLoader; -import com.netflix.zuul.FilterFileManager; -import com.netflix.zuul.FilterLoader; -import com.netflix.zuul.filters.FilterRegistry; -import com.netflix.zuul.filters.MutableFilterRegistry; -import com.netflix.zuul.init.InitTestModule; -import com.netflix.zuul.init.ZuulFiltersModule; -import java.io.FilenameFilter; -import org.apache.commons.configuration.AbstractConfiguration; -import org.junit.Before; - -/** - * Base Injection Test - * - * @author Arthur Gonigberg - * @since February 22, 2021 - */ -public class BaseInjectionTest { - protected Injector injector = Guice.createInjector(new InitTestModule(), new ZuulFiltersModule()); - - @Before - public void setup () { - injector.injectMembers(this); - } -} diff --git a/zuul-guice/src/test/java/com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java b/zuul-guice/src/test/java/com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java index 865b56ca..75f45bf6 100644 --- a/zuul-guice/src/test/java/com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java +++ b/zuul-guice/src/test/java/com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java @@ -19,6 +19,7 @@ import static org.junit.Assert.assertNotNull; import com.google.inject.Inject; +import com.netflix.zuul.BaseInjectionTest; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.BlockJUnit4ClassRunner; diff --git a/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java b/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java index 6c293766..9c28936e 100644 --- a/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java +++ b/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java @@ -20,7 +20,7 @@ import com.netflix.config.ConfigurationManager; import com.netflix.zuul.FilterFileManager.FilterFileManagerConfig; -import com.netflix.zuul.guice.BaseInjectionTest; +import com.netflix.zuul.BaseInjectionTest; import javax.inject.Inject; import org.apache.commons.configuration.AbstractConfiguration; import org.junit.BeforeClass; diff --git a/zuul-sample/src/main/java/com/netflix/zuul/sample/ZuulSampleModule.java b/zuul-sample/src/main/java/com/netflix/zuul/sample/ZuulSampleModule.java index d2099187..ef43a426 100644 --- a/zuul-sample/src/main/java/com/netflix/zuul/sample/ZuulSampleModule.java +++ b/zuul-sample/src/main/java/com/netflix/zuul/sample/ZuulSampleModule.java @@ -18,8 +18,6 @@ import com.google.inject.AbstractModule; import com.netflix.config.ConfigurationManager; -import com.netflix.discovery.AbstractDiscoveryClientOptionalArgs; -import com.netflix.discovery.DiscoveryClient; import com.netflix.discovery.guice.EurekaModule; import com.netflix.netty.common.accesslog.AccessLogPublisher; import com.netflix.netty.common.status.ServerStatusManager; From 8b6011fff051a48c1d94b631cba9ccca8daeee25 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Mon, 22 Feb 2021 13:17:53 -0800 Subject: [PATCH 213/273] rename base test for clarity --- .../{BaseInjectionTest.java => BaseInjectionIntegTest.java} | 6 ++++-- .../com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java | 4 ++-- .../com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) rename zuul-guice/src/test/java/com/netflix/zuul/{BaseInjectionTest.java => BaseInjectionIntegTest.java} (87%) diff --git a/zuul-guice/src/test/java/com/netflix/zuul/BaseInjectionTest.java b/zuul-guice/src/test/java/com/netflix/zuul/BaseInjectionIntegTest.java similarity index 87% rename from zuul-guice/src/test/java/com/netflix/zuul/BaseInjectionTest.java rename to zuul-guice/src/test/java/com/netflix/zuul/BaseInjectionIntegTest.java index c8986180..aa07663b 100644 --- a/zuul-guice/src/test/java/com/netflix/zuul/BaseInjectionTest.java +++ b/zuul-guice/src/test/java/com/netflix/zuul/BaseInjectionIntegTest.java @@ -22,12 +22,14 @@ import org.junit.Before; /** - * Base Injection Test + * Base Injection Integration Test + * + * This test should be extended for integration tests requiring Guice injection. * * @author Arthur Gonigberg * @since February 22, 2021 */ -public class BaseInjectionTest { +public abstract class BaseInjectionIntegTest { protected Injector injector = Guice.createInjector(new InitTestModule(), new ZuulFiltersModule()); @Before diff --git a/zuul-guice/src/test/java/com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java b/zuul-guice/src/test/java/com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java index 75f45bf6..6882e696 100644 --- a/zuul-guice/src/test/java/com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java +++ b/zuul-guice/src/test/java/com/netflix/zuul/guice/GuiceFilterFactoryIntegTest.java @@ -19,13 +19,13 @@ import static org.junit.Assert.assertNotNull; import com.google.inject.Inject; -import com.netflix.zuul.BaseInjectionTest; +import com.netflix.zuul.BaseInjectionIntegTest; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.BlockJUnit4ClassRunner; @RunWith(BlockJUnit4ClassRunner.class) -public class GuiceFilterFactoryIntegTest extends BaseInjectionTest { +public class GuiceFilterFactoryIntegTest extends BaseInjectionIntegTest { @Inject private GuiceFilterFactory filterFactory; diff --git a/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java b/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java index 9c28936e..8a2e7508 100644 --- a/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java +++ b/zuul-guice/src/test/java/com/netflix/zuul/init/ZuulFiltersModuleIntegTest.java @@ -19,8 +19,8 @@ import static org.junit.Assert.assertEquals; import com.netflix.config.ConfigurationManager; +import com.netflix.zuul.BaseInjectionIntegTest; import com.netflix.zuul.FilterFileManager.FilterFileManagerConfig; -import com.netflix.zuul.BaseInjectionTest; import javax.inject.Inject; import org.apache.commons.configuration.AbstractConfiguration; import org.junit.BeforeClass; @@ -29,7 +29,7 @@ import org.junit.runners.BlockJUnit4ClassRunner; @RunWith(BlockJUnit4ClassRunner.class) -public class ZuulFiltersModuleIntegTest extends BaseInjectionTest { +public class ZuulFiltersModuleIntegTest extends BaseInjectionIntegTest { @Inject private FilterFileManagerConfig filterFileManagerConfig; From c7a387cb6dc19a7247109763b16f033b12a21780 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 2 Mar 2021 18:36:41 -0800 Subject: [PATCH 214/273] zuul-core: include more netty handler tracing --- .../zuul/filters/endpoint/ProxyEndpoint.java | 7 ++- .../netty/server/ClientRequestReceiver.java | 54 ++++++++++++------- .../netty/server/OriginResponseReceiver.java | 19 ++++++- 3 files changed, 57 insertions(+), 23 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index f5e64773..442393d9 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -57,6 +57,7 @@ import com.netflix.zuul.message.ZuulMessage; import com.netflix.zuul.message.http.HttpHeaderNames; import com.netflix.zuul.message.http.HttpQueryParams; +import com.netflix.zuul.message.http.HttpRequestInfo; import com.netflix.zuul.message.http.HttpRequestMessage; import com.netflix.zuul.message.http.HttpResponseMessage; import com.netflix.zuul.message.http.HttpResponseMessageImpl; @@ -96,6 +97,8 @@ import io.netty.util.concurrent.Future; import io.netty.util.concurrent.GenericFutureListener; import io.netty.util.concurrent.Promise; +import io.perfmark.PerfMark; +import io.perfmark.TaskCloseable; import java.io.UnsupportedEncodingException; import java.net.InetAddress; import java.net.URLDecoder; @@ -819,7 +822,9 @@ protected boolean isRequestReplayable() { } public void responseFromOrigin(final HttpResponse originResponse) { - try { + try (TaskCloseable ignore = PerfMark.traceTask("ProxyEndpoint.responseFromOrigin")) { + PerfMark.attachTag("uuid", zuulRequest, r -> r.getContext().getUUID()); + PerfMark.attachTag("path", zuulRequest, HttpRequestInfo::getPath); methodBinding.bind(() -> processResponseFromOrigin(originResponse)); } catch (Exception ex) { unlinkFromOrigin(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java index 3d9f0865..bdf520d0 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java @@ -63,6 +63,8 @@ import io.netty.handler.codec.http.LastHttpContent; import io.netty.util.AttributeKey; import io.netty.util.ReferenceCountUtil; +import io.perfmark.PerfMark; +import io.perfmark.TaskCloseable; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.util.List; @@ -108,6 +110,12 @@ public static boolean isLastContentReceivedForChannel(Channel ch) { @Override public void channelRead(final ChannelHandlerContext ctx, Object msg) throws Exception { + try (TaskCloseable ignore = PerfMark.traceTask("CRR.channelRead")) { + channelReadInternal(ctx, msg); + } + } + + private void channelReadInternal(final ChannelHandlerContext ctx, Object msg) throws Exception { // Flag that we have now received the LastContent for this request from the client. // This is needed for ClientResponseReceiver to know whether it's yet safe to start writing // a response to the client channel. @@ -242,6 +250,7 @@ private static void dumpDebugInfo(final List debugInfo) { private void handleExpect100Continue(ChannelHandlerContext ctx, HttpRequest req) { if (HttpUtil.is100ContinueExpected(req)) { + PerfMark.event("CRR.handleExpect100Continue"); final ChannelFuture f = ctx.writeAndFlush(new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.CONTINUE)); f.addListener((s) -> { if (! s.isSuccess()) { @@ -257,6 +266,7 @@ private void handleExpect100Continue(ChannelHandlerContext ctx, HttpRequest req) // Build a ZuulMessage from the netty request. private HttpRequestMessage buildZuulHttpRequest( final HttpRequest nativeRequest, final ChannelHandlerContext clientCtx) { + PerfMark.attachTag("path", nativeRequest, HttpRequest::uri); // Setup the context for this request. final SessionContext context; if (decorator != null) { // Optionally decorate the context. @@ -264,6 +274,8 @@ private HttpRequestMessage buildZuulHttpRequest( // Store the netty channel in SessionContext. tempContext.set(CommonContextKeys.NETTY_SERVER_CHANNEL_HANDLER_CONTEXT, clientCtx); context = decorator.decorate(tempContext); + // We expect the UUID is present after decoration + PerfMark.attachTag("uuid", context, SessionContext::getUUID); } else { context = new SessionContext(); @@ -363,26 +375,28 @@ public static HttpQueryParams copyQueryParams(final HttpRequest nativeRequest) { @Override public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { - if (msg instanceof HttpResponse) { - promise.addListener((future) -> { - if (! future.isSuccess()) { - fireWriteError("response headers", future.cause(), ctx); - } - }); - super.write(ctx, msg, promise); - } - else if (msg instanceof HttpContent) { - promise.addListener((future) -> { - if (! future.isSuccess()) { - fireWriteError("response content", future.cause(), ctx); - } - }); - super.write(ctx, msg, promise); - } - else { - //should never happen - ReferenceCountUtil.release(msg); - throw new ZuulException("Attempt to write invalid content type to client: "+msg.getClass().getSimpleName(), true); + try (TaskCloseable ignored = PerfMark.traceTask("CRR.write")) { + if (msg instanceof HttpResponse) { + promise.addListener((future) -> { + if (! future.isSuccess()) { + fireWriteError("response headers", future.cause(), ctx); + } + }); + super.write(ctx, msg, promise); + } + else if (msg instanceof HttpContent) { + promise.addListener((future) -> { + if (! future.isSuccess()) { + fireWriteError("response content", future.cause(), ctx); + } + }); + super.write(ctx, msg, promise); + } + else { + //should never happen + ReferenceCountUtil.release(msg); + throw new ZuulException("Attempt to write invalid content type to client: "+msg.getClass().getSimpleName(), true); + } } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/OriginResponseReceiver.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/OriginResponseReceiver.java index 58560649..2d75f721 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/OriginResponseReceiver.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/OriginResponseReceiver.java @@ -39,6 +39,8 @@ import io.netty.handler.timeout.ReadTimeoutException; import io.netty.util.AttributeKey; import io.netty.util.ReferenceCountUtil; +import io.perfmark.PerfMark; +import io.perfmark.TaskCloseable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -69,8 +71,15 @@ public void unlinkFromClientRequest() { edgeProxy = null; } + @Override - public void channelRead(final ChannelHandlerContext ctx, Object msg) throws Exception { + public final void channelRead(final ChannelHandlerContext ctx, Object msg) throws Exception { + try (TaskCloseable a = PerfMark.traceTask("ORR.channelRead")) { + channelReadInternal(ctx, msg); + } + } + + private void channelReadInternal(final ChannelHandlerContext ctx, Object msg) throws Exception { if (msg instanceof HttpResponse) { if (edgeProxy != null) { edgeProxy.responseFromOrigin((HttpResponse) msg); @@ -180,7 +189,13 @@ private static String pathAndQueryString(HttpRequestMessage request) { } @Override - public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { + public final void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { + try (TaskCloseable ignore = PerfMark.traceTask("ORR.writeInternal")) { + writeInternal(ctx, msg, promise); + } + } + + private void writeInternal(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { if (!ctx.channel().isActive()) { ReferenceCountUtil.release(msg); return; From 279b20d9c21960c030ae045b092e8304128fc358 Mon Sep 17 00:00:00 2001 From: Roberto Perez Alcolea Date: Tue, 2 Mar 2021 18:41:34 -0800 Subject: [PATCH 215/273] Upgrade nebula.netflixoss to replace bintray publication and update TravisCI secrets (#1006) --- .gitignore | 3 +++ .travis.yml | 25 +++++++++++++++---------- build.gradle | 2 +- buildViaTravis.sh | 6 +++--- secrets/signing-key.enc | Bin 0 -> 6784 bytes zuul-core/dependencies.lock | 18 +++++++++--------- zuul-groovy/dependencies.lock | 6 +++--- zuul-guice/dependencies.lock | 6 +++--- 8 files changed, 37 insertions(+), 29 deletions(-) create mode 100644 secrets/signing-key.enc diff --git a/.gitignore b/.gitignore index 38fdd7c2..a169682b 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,6 @@ zuul-sample/src/main/generated/ # NetBeans specific files/directories .nbattrs + +# publishing secrets +secrets/signing-key diff --git a/.travis.yml b/.travis.yml index 1446d424..ebdc0d24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,12 @@ language: java matrix: include: - - jdk: openjdk8 - env: GRADLE_PUBLISH=true - - jdk: openjdk11 - env: GRADLE_PUBLISH=false - - jdk: openjdk15 - env: GRADLE_PUBLISH=false + - jdk: openjdk8 + env: GRADLE_PUBLISH=true + - jdk: openjdk11 + env: GRADLE_PUBLISH=false + - jdk: openjdk15 + env: GRADLE_PUBLISH=false install: "./installViaTravis.sh" script: "./buildViaTravis.sh" cache: @@ -14,7 +14,12 @@ cache: - "$HOME/.gradle" env: global: - - secure: Hrc3t9ev/oGkIkeHk+vSYeqvIN5kW6mhtSLovvhyR3KV2TRBqjHdWW3c5MDgvetZu2s/DgUnQNtkHWrDpK+tXpT8gbJda+c2MkjmkZZH6hoVF2ASSWauDjBt8lbXcANDi2JJI3pMYxgK+H3Y9MgP1Sn+1FPdYm1MiUSpCT7Sxzc= - - secure: PW/r0i02LqX8z/GAipforVN7Xj51F+H3oIzMxoJByM++CYp6Nx+EVym04+1rkHKVFbq7IXFdqe5pji3xrVsEilaB9jVDbmB2WdSmNxYvTHNTFtBmbmYMylc+hmV9pPh66JctyE9urq1q3x/e3stE1vVPHwqty8yDPCopsmlJRnc= - - secure: FyNZfd3ML1DEgEfvORzVgBS3w8T7MKhcJVCuWJeAk+7oO4oVZdW9Es+xM1ylbZxpSQEDJlXopsjUXHaICYXGU3LvMsWtbm5LEJLBfLTVs0vlwZev2Us9KVChUf3JhjDmQVGOJL0+P+spjacN31xt3CL1qDkwSShvX2rX2RiRInw= - - secure: Ak7IXZVWhEricCsiVH1Pbqjp8ywIvqB1FBxdQlZ+GkZzRekxa51BI9ZTLwuWfQvqJgmb+IXKWg7mvHu7DVFFCRRSb2C70C0CZICbIu2C9Xe5g15k4aFw/0vz+a7qVdvT+Q/ZlQ4vlxdcAt7Oh/MyUZ6f3+jO7w45v+8a04spmgY= + - secure: Br0TpGFVeojjo77l8kGqIQKir+8aWlu2A+a96xzkZnOkL5tEHG9tRfcJNwKQs2w5pepc3hGAHPC38tB4NQL7LwsZTyHI4l/6HJFpy1BXeTNfi46CcCdnFUYR0yYEY/sjU67pgFDW3tM02JxVq6QaNawrhmipcGBps+bNqQH0Rno= + - secure: Jt3PJOvR4KDwCkJdLD58ftA+ftc+6TQLd/orRphhVat3lDtZe6CwADBmuH+LW2ystiQdqAJEI7CFjfWzJuQJA/DJK4HzVfl65cpWGe0+eYxNia4xm4LeqoIK8HKUMRROZ2MDd1Eltv6t8H1WSbHVWwWY5xYsi1NdWnThQP+XcFQ= + - secure: ap3WBWV5qH/OIv9r2qeCIruIlWEx5/4Jie37ENeIOdlNkBvQosM2hEjQC6GVkrepmpeaWrNVAho46ApUSxxoDjzeMtxVewkCCVXQPKTlmBrj3P4y/2xkLBHJX4wWHT0cHY2rMZbAnTX5aUvdb+8kxZD65+YAZtK4KBL0VO+hUDc= + - secure: WO0otm45qt5Tg1tU5Y7kWBG+LPEjyekiigQe3yxKBprVDYu4c0XYw9qqwsqajdBTbUNIaVgngG73aincCHGmaZVoloSesBIpEZUwgmvgSf3P5GQKEN4+a/k/NZlB/8buPSM267a4Vvpug9IgKmqqa2XZYwT/uwF4A0KMLOEF76o= + - secure: REA+XXrIp56i3ydbzUUcxRQ5mT4Tl1aVZJt87Tim7UG+iOFV23tBlmpKwjFbbKMkVBP/c2y/hZsyKDrS9XcgkheteJZew+6kGIw0kiDnoh3mDhDxKE6oMn5XtIz+m6LoqJqB+XKeaunpLdbaExO8DFPyVPKAzSqyaIfsKvh0eQA= + - secure: J9/D9jjpU2OiWBGOIzmlf4MMHde5MF1u82CkF6qLkyLG+6WO5JOQpRlPx7LHyHRZteMsq2Wux5QNnUdr/2wAv8fNeB3QmZT5CKS0P4rK9wHx5ZRWbOMnysbYtnm3bm/jxM7tLiB3hbRNhyhEyeDu2GmpEwLhJbFnlZGPq4K3y6w= +before_install: +- openssl aes-256-cbc -K $encrypted_d34093053982_key -iv $encrypted_d34093053982_iv + -in secrets/signing-key.enc -out secrets/signing-key -d diff --git a/build.gradle b/build.gradle index 0e5d42c4..5c1f01b8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { - id 'nebula.netflixoss' version '8.8.1' + id 'nebula.netflixoss' version '9.1.0' id 'nebula.dependency-lock' version '10.1.0' id "com.google.osdetector" version "1.6.2" id "me.champeau.gradle.jmh" version "0.5.0" diff --git a/buildViaTravis.sh b/buildViaTravis.sh index 57aa2c3a..ee8ef4b2 100755 --- a/buildViaTravis.sh +++ b/buildViaTravis.sh @@ -6,15 +6,15 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ "$GRADLE_PUBLISH" == "false" ]; th ./gradlew build elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' - ./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" -Prelease.scope=patch build snapshot + ./gradlew -Prelease.travisci=true -PnetflixOss.username="$NETFLIX_OSS_REPO_USERNAME" -PnetflixOss.password="$NETFLIX_OSS_REPO_PASSWORD" -Psonatype.signingPassword="$NETFLIX_OSS_SIGNING_PASSWORD" -Prelease.scope=patch build snapshot elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' case "$TRAVIS_TAG" in *-rc\.*) - ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" candidate + ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PnetflixOss.username="$NETFLIX_OSS_REPO_USERNAME" -PnetflixOss.password="$NETFLIX_OSS_REPO_PASSWORD" -Psonatype.signingPassword="$NETFLIX_OSS_SIGNING_PASSWORD" candidate ;; *) - ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final + ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PnetflixOss.username="$NETFLIX_OSS_REPO_USERNAME" -PnetflixOss.password="$NETFLIX_OSS_REPO_PASSWORD" -Psonatype.username="$NETFLIX_OSS_SONATYPE_USERNAME" -Psonatype.password="$NETFLIX_OSS_SONATYPE_PASSWORD" -Psonatype.signingPassword="$NETFLIX_OSS_SIGNING_PASSWORD" final ;; esac else diff --git a/secrets/signing-key.enc b/secrets/signing-key.enc new file mode 100644 index 0000000000000000000000000000000000000000..63a5a7b9d1500ba600dd78de3736b4e457a727c2 GIT binary patch literal 6784 zcmV-`8h_=!c#Ei#zh|_oP-NA>YJ8A4J4_DDQAvHLdNwctItN~StnJ4tecjM^O?tez z(oBz3%`oze)gP&sHAI#bX1z*LVd-2`y>n~tvKx(bi|^fAlfy4a-EeqUXba{66WikB zqslg@6Mji$kQ>hI!Y_JGqE(a?{vqLV$MuL*&U0X$9(zSNdiys_ZW0NgIT&g@>o*C969=QGo*@K`Abe zu@*|GnlAY6d+^}%B@9IX&t9JK8@!O6xd+m>x{!40s6*Fk0-7W#@KyhK1cc=XJvngv%%x#3Y)o;_< zQSO~Js3dFkTJyZ{enwkUZrf54i{x*ObLG3dfr07Mo`4&etnLPC=-`X4+PRs%YRqp* zcuEw}J54cN=C|>scWCBKHnaayhYRmrT(0gLg3ty&3lw@LmL%C+sg0vi zoWMyQ3%mGCoVTst8%0*70R9$!kB?)9Iz7YVKbbl&nl=FDa4IH2H2{v1?R2h34Nr ztu9{$URdk2qO1D4Quf`5NkdG(n(al`V9{P~W?t~u*aR_Qq0(%azuvcCzxpL$eUGMt zx!%3BeSYxIW6;xQ!Tw3xsXu4_gRmi@o3|v&9p8%#;E>$ zeW)mRy;{2gTh4p@O;!>XSKWOe`1A7eCu!#-MCPRp@t*5ths-zwX~uZrDtAZ8yv)oL zwFHI!x(xvu2zc3$N}9OhO)BPP+2=q0WF&ES$YFg15#=KE95Uj_P|#r{5IJe#{jHFo zexugTtJ{UHFew*CKKsqV!0F7`LORxNX4y+eaGmOOeE#<~#U{LP5w#6VG&F?dKfa?3 zRls5nFQPCMBGN|78D@Nus_6yjQ79S|YICqD zIy6+{Y>NEr#e!Hyj}sK)MOKO>Zn`IZJB5rrKkPV0VC;Xcr;h;85usgQGEG#NV@=&p zrTYiW~v^^+RYvBDV{NF0@hJ?SXs_lm<^GsA!Qb?hPs z)g#+8H6_syaGpk(Vp?Z@`meUgBOGE=2zZp!X5|U4z#C8e+8>_p+JBMWz|KhX*652Z zt)QUl{_-`>p^&ZTQh6*Lcf%B@5VgkOvVyd(U;8XBEXT1gEVBBJrepbtc?)|se{Qg0 z?MC=px*u>HF<49JJK?&swpMn%<3z;o z%T(&_)hq3NIgmxDre9wk$R^2Ezk@#t#dEhu+R&xW%=LD>Ijs`P@(_hm4p?!#yXR}Xyur{d47#{I)O!1t2G7nBu&XePq!N})FSAHo41)K&rq-imxp#+2pNof*yGbq3~Cr6k_Vz$bbd-D_#1hWox<>VB02gYma-y zBc%ljWc@bt)z(z4gjNbP^TDb2|#O*}_T;839H}2Yn z=))>?QA*jFO~R|Qjo)hwbkthPNdy%Hcp zx1gYaGD=y7YvjK(Q}YCc16@zrY9t1xAFG{1<@Lx>LmZ3 zg}H%>P4|bFHp0S3EycYL8?JmXKJp4ZdTPVsfG352o-VEyV+OOtWn7^e=YgWXGX|ys zjvn&gxkH2n!hzT0Xl{r!QY_fa?!A4}-7bF1ybEbbWCKX>+e1;40v71dhc_l@z0-%7 zTPnIeYFtb%Bd($BAcT{yc<0TBmELbmq7C7VN`?zdkWm%X#2>EGmzydji}h&E6m#Nmuz0*`R?JQxPW1O*dT~uA;sZeblUo z2cd$(0s5IPGb{^9oL0WvG)mN};81=*nY zN&mDg!!mePe6I#V$CG19m7O-c$~yC#dhBU`CGeYbF$;BNUW6c0p@#GJ-5yG#nkMmd zb`>yLR^liC3lkCXlPaNH(#=P(IpqgOGA$Q?s1w_;OD(FYo4)@CgUZ2qI#z@{ zvaUoCf$^I?P(S~0!%Lh`m@p6>FY&q`;6i&EVJlKlu!xYWzWDw3a^d%!|94`uW6_Do z${+bA2Bwo41O^>h|H#_H;}}(oow*=bmS}kA{~a~5$4LVT(jkHe#{=vi5@buEDcwfT z4Jx>G`x}0o((5aYioWrw#OWca^TkS|H+6BvPH8lwrevw?vIcU!p$yG2?fOe>VE5-J z-xpg(T_Xo%|Jj~NJO{j~}Gl?)O zaF=Is`x#d6$&WxnHk%YLv#Ib*;8=F7+d<~(t|LM%zbCcCg|HGsbB*z_!^WfvZ8rm8 z({!qnom;l4yqPNegttc!(ThW*RR3ZzYm21z*e24joDp!lTXw&XnpUF2R6#v7=@Kv@ zu+sj|my9)Ck4*=$=1=!N$1A{QDTUTFQy9`CgrzJ2r8dkFTN_fGZoA5^AVaVc?}K$c z6;QsdZ2Eahu87tW7}fM(am>}d*NpU+q?^4@ib!8bwfGSUM-=~h1X{40S}q21`4XQz z7rTnl-0j5v4O1n_R~OCu1Ql$CXBS3xZ?%SGMpgG?y`w@v_W4R4oiF!Y6f5!PPS4oP zDVguzAei)Ln=K|JKrVPF#m)tgFRZNKmMg})WOdC=TSXEot5>kUW{fMJxrF0G@cWmY z;&o~M0hT3SkQW|jY7~0pY)x!pu|2J+i;E#|C36cBL`frKqfL%Wnz#I`aH7fCjG;q?LG^O3MFvn%jFK@M zz>9wB=~i%pik-sir&CX|&6xg6)LK*uA*(X)0gLBPq%`gS?hOGOemp~zzz~$Z7Wb}J zGAMItX!O5!QsVjo$7SaevX~Yh*1^~F%n?Tgs5i$;XN55LlAp=r>ap%ws^<-gK-iI( ze;{FPtA7LeQ8&k74Nb-VbBM>eq|W`WdelOb6)~WI&A7D6qPZE>Bw#(w!96J429NNT zVGePs(V{cIh77*AL(t)}QtJ7gJ2dpFu=(mrO~EP(0(%t!8vm*HR2BU=KY!EoS_ksD z$_Jw((yc3M=p5$|IQa)PJ&NhEWj?rQHd{dPJbbM|8}bMMM*d@0}!(3$s>+pMG+tv_${61%Vd68%aK+iqfEv0&@oq^ix5@g?Ug70~{BA`WDh(Fj} zPXTgbCF#;e$TA#%Tm84aM&3+(!$y;_fHh6k(ghX=tHHFpNqRfV)fmjKLHaQEdl3y- zBBGHc?jbEkIAJ_Zvuj{=^$By{hjxSyGfkG+!rH1+Afvrg2y0R2Ila@d7dDdGE{L6C z)B`-cxYZ}@$(qLFEg|zflw8aLiB%kj#MAr4F9?uDiPzdeHPwbY8tzf&DS6`<*bgnrjw!9iL=t_N15-M+Hk`WsSv}yC5Y=xS^&j_V#ehdP zx-?gIE_8Ym&0cR7{yuU`z3Z&*5QkTO%@W-Z zE)r#gSPYBpn(><&14`*u=XoZc<2U1w&)?1Ic|}`pVidOZ1HzDYi^mAQ{OHrZ!k_Ek zK2jBa4JLDbI?YYR_gq57sPeRktw;56-O@^}RvO(<0w;^?V<(PA_QD~WmtzbmWQ1>% zRbIl%9~H7sT$No0I$t@FF>u}2FGy%NzA8ygyZ?(3OH_cWn`0VbTQv61?F(VsO)uC9 zYvNX>obRK&G1}|t1wx`WIpi3IZu?6X%eZWKraA89m7t$<>=p{lVLin}+e2->Qu88w zdh*D|kOc+H=cJ5ih+>^3pBzQJ1I>$)?{;(+3a0;AFId=D5IpFRdz(bx95c zc~+5U%PFULJx&*UpL8+D(L7tyOEr_*E=z!YS?#&@l(lt4SJElPMUd2h6yX8RTeZDu zx~T9m%SbT{h!H5nWp8h4qXPP;ydl1BpH_d-0!tLtS*oanjt5%m^I>(I0YE6=`+$&< zlU+h^{?dGpQj`Tu`E9Vdf#ip)WCjv2o8H+dK8o`i?YRZw%l+=ayrY2npEtw!J_o<& zsi-`%vL{Hsjm;2^N_9nSWR%`9@VFr~7{L(s--(q^|5hC|mwhNjirUdnk^P{^^sOh^ zN>zF`5AN$!pRkQv?$|bG0O#+5HmL=gf_Q!3dvgoWlke~~xQHMaHbXYqpH@y<1sjN= zF5wK{diCibAb%oF&&ZEG#xJShUP@In z!Ad{=5a7YTMDyuB2Qj@gP-+NJ?Mu5Vi!^8AN2IDWc#S+$A%+yyo-1ctCuJygI9v-A zf$W!>Llz2qjxJX!GHJI1ffyA6?rY&Lg{4*WZF?nE|JR+&3@I}4Lr&xB?3*zrU9hllCPq;e;T}>%3fbqNONN3No@Q7Aw3L-l6T2^oAsc9`t$B zUla7S@Ih;ep7YMw#437S<>qv{DC+or&-9n0W&S1@i%me!LPyCUW<|}lxh|8{edl?5 z2zhC#fdR_k5Ons~=r2F~-DQ4}L1<-DIgO1ClSY`rE0Hm_$b?0lhh;2z2Po;k9z1?< z5DR62eRbC!Glqjnj8`t4^#F6Wn)XSX}U7BqF< zJS{X_j(MQ)s7TD)UHJ0|=#)DuYwW=Q8jad6@UvK>O{#+bTtD&a*ARu4lk!zr&MB;3 zev#BL+RPIobP;=q%lZr3V#xv(8m+(r3MJC^$1D+fPa&>aZ|i}>*koH=pORR~r0Q0F z^CYFHApniJ>fO>&?KhHyrOixi@l^N}*M7x2$fF&9jD8cTLBlbg1T_3K8gVhRH=}X- zjHDa`vdIi0noY+en+X{l*^?1xueifc=Z$}-o^%nQU8vs-);Nq`nJHq}iS}nZ6#e!W zLXMZ$!=xVX$_S#8D${Z>LE zJmAjvHx6LweqyH@zr(|)fu0b8o^~zcJOPFVslpIR$___TOJ<%?WYWVd(_F+)n8~f< z)xCw0%1G`cA~PyQ3EmV+6Y*Kob)PRBmxCg8(?xq-xkyM%aR{)W^tK8urmM;_E)^&V zb8&Pv168vdF(7w&#HmK;RGAXp4YD~KDPQ=Do*)rXD6L|`(S~;vHfky#OR`zQX6C}1 zv-^b)@|77GK$q(_xPZU4W%gG1>haV1_es*sI~sWi!_@uZ$CYkGL_G_@tY438_+Fh} z(*F(RR(y|1?6eJU%Wbe-X~2fs%v*_N4q+}z->j3-<{jtp9{!>OnW`om!Z{=V5=>vE zHZc%dJCUHigZZ0e^2+7Ycnzm!Q^ZSFpa=O2@colNy)*^=D?WT8xXQmffi5ZhUC|%d z7@Z3a^ZMg}*3N01Dr-3nt?{s0I8nA>|EUS~FF-1_c)M$Aet3vcF(|OYgrhBZjJBD` zolD**M^l{P3!j*{zeyJ8GQ01d+UvCQngB&xkC1&tQ-!cYwN14&v=UKEr#Xc+)$qE+ z*xf<hN{$A^Vd7F&<)shi{~rAX>!~2Fpw3W zJ!~5I@n)jACa=2-P~#>L*Q@qSW(g z^o9D(&yrJ&X23w4ElthW?IB4ik;6SB=ZS6-DlkWfEyqs?;LkJ#nyKHq<^XS4h3c>g z(0>#volJrL!Ifz{6zYBNY6cWayo0LT1m>2V@p)E#`TaX^9{oGdDI#JNlV_RkXx%Cy z_0*;d2QD9YgkS{fQN7Hm{+@n#V!1cv&*|n3-zhE$n$>_|zh(dt6l;&j?hS-}oD8~v z-xnRTkr~D0yEfbL;VU`03GZ9m z_dF-RWZM%*%_=S8+og60JMH?4I`#c!ii-Aza@-DRw^;+t(+nwFC)B0Oi(d9AyZlLh)} z@!RoG7B#AGJv$<@Td%LQQ9g?Fl3I*urdukLSelQcRNRwt z7|SNtCW!x`CAQ~#qlujL2Jv0UR}K+@0Qz3V47Pk2V8i99y%W_@M4Sg&QaDCK?+RzE*`7^Neh|`% zB{q-T{jl!LXaAJaGZ_3>(X+IH5G8ul(Vj~lsC819)^m$huw>z|c?dN(&FPJ7d#y=s! z#>6g6pf-K|^QIR{D&P?@w<@{eC9Pm)3BAtef_|@AK->QS=2qzlsZ<6fu;A<`F4%&K z&dobJP(q^41Y9fs%;gL-_D8gfysa#QTW!&Y;;}&Z(cx!2sHKmazaD97URt9sa$D;h zj?Lrbj6`b7*Mf{w=55~{Oy&z@2yKsxKAl4&q1?4=B*dwAC(Bmc^R0p2-t!EiI;DZ& i2eX!>0Hf9}Q)7xk4TYsEfqIcTeZff@;zO&O;V*w$n^;Kz literal 0 HcmV?d00001 diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index b55b4f41..5e7703cc 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -81,10 +81,10 @@ }, "jmh": { "org.openjdk.jmh:jmh-core": { - "locked": "1.27" + "locked": "1.28" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.27" + "locked": "1.28" }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21" @@ -167,10 +167,10 @@ "locked": "1.67" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.27" + "locked": "1.28" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.27" + "locked": "1.28" }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21" @@ -265,13 +265,13 @@ "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.7.7" + "locked": "3.8.0" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.27" + "locked": "1.28" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.27" + "locked": "1.28" }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21" @@ -449,7 +449,7 @@ "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.7.7" + "locked": "3.8.0" }, "org.slf4j:slf4j-api": { "locked": "1.7.25" @@ -541,7 +541,7 @@ "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.7.7" + "locked": "3.8.0" }, "org.slf4j:slf4j-api": { "locked": "1.7.30" diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index aaae0fe9..669add6b 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -421,7 +421,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.7.7" + "locked": "3.8.0" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -725,7 +725,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.7.7" + "locked": "3.8.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -904,7 +904,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.7.7" + "locked": "3.8.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index b5abc4c0..26b7a1d2 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -424,7 +424,7 @@ "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.7.7" + "locked": "3.8.0" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -731,7 +731,7 @@ "locked": "4.13.1" }, "org.mockito:mockito-core": { - "locked": "3.7.7" + "locked": "3.8.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -913,7 +913,7 @@ "locked": "1.67" }, "org.mockito:mockito-core": { - "locked": "3.7.7" + "locked": "3.8.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ From b2f43dc4606497ac6230079317809e2378a6a7f1 Mon Sep 17 00:00:00 2001 From: Roberto Perez Alcolea Date: Wed, 3 Mar 2021 10:27:36 -0800 Subject: [PATCH 216/273] Re-encrypt credentials file for publishing --- secrets/signing-key.enc | Bin 6784 -> 6784 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/secrets/signing-key.enc b/secrets/signing-key.enc index 63a5a7b9d1500ba600dd78de3736b4e457a727c2..2204dff18cc2e474f252fa7f54d4cfc537a1d203 100644 GIT binary patch literal 6784 zcmV-`8h_=KM$;w>-lXG@3)Ft$Q#&Xai71ZZW;b$o2wXKu4gDmw*B7U&{>2@tEDZ zXNT<@JH(^S&VqGY-apMizcYaMh)No9#pNmDWi%+5gi3>=fv#-=e^gkP83}-l3Qye2 z6t{n!V24ln1O~TAoT9zCeY;DP+x%yPltF8c7PzpPrq~ zHrMUv2ddsIQ$X$FBt;<=a^FDtChAHH|N8JY$u=1`t|9@iXGrRsUJQlw*J)YpR(^>a zAL@I{+5n5misBqTLT^tDhEGR*?I_^T%sy<6Vd@%+6J0-H&ytC-mxlB%)FC%sjHD$J zDV8mkao}*uL*kA12cwp|z8**{atJcdeGL;*kuL1u&;!x^_gnR!Hh-}L%$tS->w6Ft zV*EaR?y5d2z9L@CT-CWm`uajRO263M;2Kf) zflDgX(h-BQ#w7fIh2>y$jHIhL_i4IkKPhHd_<%8fPWETNZLC?(QNavGt48Ul6X7~6 z4Ho#}y-8t!n&%i}#N%6MSId--!i1C7M`Mkdu8gVuTWBnbf<#CkBfP+Mge3C>Q6S4w zQ7g@?C(uW~v-n;Z8DDs*@N4q+3mLIUE3;!&){jRwih-B;4e%*?q=QJVm3)^A{6Uwt zSt}OlWq!`XrvEcdA^yCCm_ycghb2u0(nC}sZxG1&Q(pV0yXIWc34&x*zBYSX!8ZOI zhKVG*e)qxz*x89FB-)0;&3-z&4Tt7_v7;oh#jRG*<1M*fGxm%PrY}ky9wz=+Y{zL| z-G*mNc^zA~IYC<9TWv5Eg1`@|wq(Q9PZBIL8^a&%?&aoEF^V{HHGJZ2y}}F1)5DED zcJ?!@Zc`pKnYy;DSxfJV`71a9 z1`Sl0DNeWk0|qLEXRdbD|Hs${&oun`7_~yom5Kp`Wc;;*e-BP=r+xCI`sMoznV19@ zlh5<*D?&dXnS_8gR~j!nWysOCdwLTLjf+qR=XAz{T;gPg;`eGmK!=rl zO5Mqzu!%~1!(lNUiJB?$ZpzRe!*%pB=Bq!j$fa7H!#KP7Xct$wY&TiQG5ECd0Ip(!6_kmU9>Nw# zaX-h7+}DSD6^OxD#58`l1Ab$<-bSaiLF!bgam+rGTr63WpZhV*OMzhBE{7dPlJ&g6 zLI+hTxGKU3KS-?nQx!RqiMy*$HzgsiK*GyO2)l1dvSpNX_ZIS~t8dAR*eIls6uXKU zU0r3x3F3E*gsZ*Vr4yf4 zEJiJ>y(MCFirQ;6okh#pvFAPUQAXjQ`aa9+Jm5Go-bAWl)R3LhvftS}`r*mIFF zG>{7~o&{BpexQ4lr8h|2AOm1)DFVi1I4vC-;%K^KIfB4;HzqQR+=}6Rm9)t!k~jqR zi6dB?!OuknI*Wb}rOql5%`hR>HVKh9GEajVA4Id9NI`JTMwGxWZ;{YE6iUE?@d%N( zAZoG17YHN@1N#umZD;r2cqh>{D=e3ro|q=pdN3o$C10(0((H&yZSsNq;FMP?yk`WQ zkx*&lCtjEQzn~U-X>A6639568_~7Vg8{t(B2h%2%NjAPs2_Tf;WQ{*2X`#*uti}=j z0Efj_jT2t=~ueFbrXU%@F^g6q}bT2c^5Le8OlMB5m>D|XwD z){Fq+lXfWWa@pR<10NrBN)6S>XBo31W#=mmVldb`?rk}5WGBJzLcKL9sqcR(>IjY^ zN|r(2Lbu{c#UE2PqzzV~gtHIkBc_iyqi}$xd{l3HJP|WJho@P}1EDuU=*8JSpNB=1_TZ zUJGny`1-&G(rXQya~)Yt^IywvIPw66F`MQi{~6Y+LEjbjT;N;8DfGYg>bKB zl?@-2N{-Rt8wn}(_P~{k5)LrZy?h=Ip?XVF^~AQ-IdIrRewI@`c@A^@p#A>2K)O; z0d>-|(zGAr9BsvpQ<-qGPCyLd-&^u%|As_m|&;Qz4YBB62d&__EVgY7H z*+0LdcB9PXhN2GWgd1>(VN3piXx(5Lx<}>U$iEguUD+Gp90JF%fw&Q}afSHler56; zaAtP{{hF<2wlzSqCMKV@s$EpionL1NMyM8R(1Lo%hU_32UC%x|D~;rV-o2Z+5jUex zNzn2N7+4?8S^Q-+fki#C*RSMrC*ELwO=@WD1p7YQX9D>!{%n{-y8TRuIoxkjAry~S*HO1osi-#iL( zbJVuryxL1LRFIPeCEJzzZ$`=l1B2ED1q?6~i7-F43OvHO3w1}c$Pt3BN~xC%;pK1+ zEMm0kkjes_SvpUOLA)%R2LmIhAdeH`9C64wEe(&qr5A{0_hcCU6<56QE$)Q7m7qrH z?X3aP9xe_6q3dNuM~1%dwSXxzGX0Nha#kFf&j&MZ zSH^vMF4?1^vBFz4V5b9vrcuXAWHEB9&BPi#R<*aqO5L^ldoeI8^tRF3iC#L?jg*ma z-Ee%NARE@m2PH8RM8oPL4sTu`zY04xfh02d$UCMIKt>~YX;HXk31-Z&2$66NLe;+_ z{i)Qkv4kbVdNl>itD~4W`}>A6$mu9R;ri(}GHBxHK5p=WHk2fclO_5ngN3*7$3 zqQbm)NKZv~iKchBGwbB;DPDT9G&J*ZfFd(DLOb;~i6zwzGp3eOVWF66u$zd}+In{Hh& z^LN28xgX9PZe9GjAxFJD$d_Jk0I`$Asvb>5ca*U7(1SBHHn+J`q|w+cW9!Dz=CYsv zRO6NT-v{@q)Z$Mlt94ENCMP#gmb#R?2DNI5J&h7g287%LGldNydL;OFggOOU&ep%j z;c{=QzP?l|c-ge%2H|iV6oz=*$C#ID5V8Zhp+<w%qMHWcLLkSXSPwPjzL$k6^TK{8$Za`)dIx#%(K6CS$9sLb0ksS>7ES?JT(Y} zPPOG)NHAlw(%W(ZKScww!3#>07qQ49Zhr(3EfAC#Yo(H+DWFfql4NC4N9eUbKyka- zY><0AhBRUc$!Qsq4&Qi#T}Ki(PO+Gx;3wK5DJl;^uGZ(rb`%~;AeR1_c;20*se1Zi zM=d)3Z_61^(Dg(h*KpZD#0FCK+2^Uyh_z67tc1qjBXrBD{jfd%`0}#w7+-#j+yw$# zUvyHqL7XIo_5K(9v4;LVTWSKaWu7(X)WxAcy=@?#mn7A; z$#8LL#CYB?zX1y1y|cb4#`&&o#C4cx^w)R0-3!j@kMg~>IQILZ9oLW6z9`v{MI}JJ zqH;H8Sl;WA>4>hxfjbO}>3f)mGlQ?sE3 z(B9LQE3FH*{sgv%Klr*A|$^)bomW4Z;xH~ycxyOlrzl;qTAFj1Be00j|V zn6Zb&+HBojGXzNS06Z0d~ z5c(8;td5okZB-j|Ffdjq*V0MuP=}{b)rtRcv7Y%cUdo2q(wl0T-|q2+H310H5oj8w zM--@QhnpibN!DshN#VB9%}BAp5ZKm}So%mAjjbASM4Q7!$_>Q%B;5qLycUWq~N)Fy^(>y{pz9 zR<$$u9-{f(~6YDb)R5XE_>1FI3;Ks$#3L;JOzZpyeXgc}C{FP!brci}#j z-o#V>f!Dnkb-ZbmdWB8oF1|+yPSljEN$%UbUVV?STmWERnIl&eseE0Iyim;YNsT>a z&Z;52!!4@oweEoVTw?FmZM0U=MBM-W9@H8$`Y|8Xnc}p+s%jv9oL;FsF3Ud3Gt

8)Kc!UpxAmSR4kdFr@U-^tKLQK46Um3p1 z^W_obzIU%yI;C-+ZPW2B;gi7}93y`D??J=>=}(~Nf3L?uQK?nVja>)mwkYpd5}0r1 zAx+n+&4&D zVtv|v=G3CDMu5`x;fZdkn9r>FJQML*c}QJXr_<-7IzW%a`=`{F^pCexm?q6}v2YSDVdZc&7{#@iOOWS;?FW&tNwh2`snwnKqrF<(T!zwD;4NJJ~nb>FVC z;hYUw-h(|2zsFb4eVJnzo_56W^w1G%!AEYx^HPaD;}^VmIA=0Kk5iEjI}PXYj_(vX zI!>V_Rt@b|J(+c&QV|<|sfr@&_Bc;2ah`p1$Zyo+bei!2B3UP&g|#i7JU*h-?uCe*^pb;co~>SFR8wsNvG|;Z@nS;g<1#m?Z>rDuA-5T> zDu$J|)tHeLdT@9<{$Bj=gHN94D6b_y`cq;Y=V{qiGZy(=X93+1pp#s4fWK?EZ|1LU z^68Yeq#VZ=G($Yeao=tJ455RvKp@_h^;wT6iRlqtoU=cmSD(6GuMT{YkgexCu)dhzdE z4uq{+Z+f$1oEmEp$*PW0OA;ftVHgBDPI}+U;iaXyoNoeUz7kkL-_Dd;;}eGg z{QokTGbQ+fsaumb4*zD3ly$>;o1e+NZ!>~xbt@nEv1Hw!qI2PvG;TMK6(z3S%o!{5 zStw`JW=1|_0?4u|u%M2JGVZl%tO&CxjcIGhw zl3g5woaSjHE~)m$>ey;2dPtSwz&-N5%wWUp%`lo|_@X;R&;EcxY3}^dSZI7@NfCV| z3mLB5A0WT(o>|U$8-ScmJmhQ$gD?j0@{Yf26e2RBgC}l4$J;^$p}BmELh?VhD?V8c zamV`$vWKM+OqxXrt#rYpaQ*RiqDq44_Q^Bd)-Ui1>{2tyPt=AsG~!hZ7u%{~p<*z@ zFOg-@h=ty&I|&z9y3A8Osh~C$Am%^M}O2d0) zluRR=QUb+e#Mb7S!k#o&jOuWDwy*vX`G6O^6D=P0biH@ijmT16XO=`Sm`eC= zW!S9eo@Vc(Q@axEh)?InhOb3F=j$l@ap`q`?#$czX!qkz^`78z$G-syP3rOk20g&@ zg_r91s&|e4ucjU=68A-qj)## zyAGcOJCKEtF-Aw{_}T3Y4CTIM9M>djULrN^IenA zsSO6>LB3-jBb&JE5KOFQM~k-(yKAulO(5GsS`wW&9LL(DWlHrYxqrH;k`E2L7Y8bZ z+Pifg6+mZt@S%gk#3?bHzI012w_{Q#57%mK2xdGy*JT5s*IW?Uu)a-D?B@EM*%jT0 zZ><R1?)ZbVLXYe`15fLBpHtk`|)s zuY8zUs=FN?ZePVZk(32_zRPFfkV#P6>Znt{_{ynuX;}))Bq8$xV0H?6$t_FnY#F^6 zJupkxw1(G@=(WEJyOpT~8CcJ$*n1-x`WgA?!~VUf(Do%XheJML%IjcWqSSt3*tFkL zERFtD+!ahKaDuuo+}%iz4Ex!Z;v`Uibe#B9YIlR#WOSDD{e&JPVtx3bK(}{`7oTY2_kE7xG i-6=mWRH0n}AL$OLeYJ8A4J4_DDQAvHLdNwctItN~StnJ4tecjM^O?tez z(oBz3%`oze)gP&sHAI#bX1z*LVd-2`y>n~tvKx(bi|^fAlfy4a-EeqUXba{66WikB zqslg@6Mji$kQ>hI!Y_JGqE(a?{vqLV$MuL*&U0X$9(zSNdiys_ZW0NgIT&g@>o*C969=QGo*@K`Abe zu@*|GnlAY6d+^}%B@9IX&t9JK8@!O6xd+m>x{!40s6*Fk0-7W#@KyhK1cc=XJvngv%%x#3Y)o;_< zQSO~Js3dFkTJyZ{enwkUZrf54i{x*ObLG3dfr07Mo`4&etnLPC=-`X4+PRs%YRqp* zcuEw}J54cN=C|>scWCBKHnaayhYRmrT(0gLg3ty&3lw@LmL%C+sg0vi zoWMyQ3%mGCoVTst8%0*70R9$!kB?)9Iz7YVKbbl&nl=FDa4IH2H2{v1?R2h34Nr ztu9{$URdk2qO1D4Quf`5NkdG(n(al`V9{P~W?t~u*aR_Qq0(%azuvcCzxpL$eUGMt zx!%3BeSYxIW6;xQ!Tw3xsXu4_gRmi@o3|v&9p8%#;E>$ zeW)mRy;{2gTh4p@O;!>XSKWOe`1A7eCu!#-MCPRp@t*5ths-zwX~uZrDtAZ8yv)oL zwFHI!x(xvu2zc3$N}9OhO)BPP+2=q0WF&ES$YFg15#=KE95Uj_P|#r{5IJe#{jHFo zexugTtJ{UHFew*CKKsqV!0F7`LORxNX4y+eaGmOOeE#<~#U{LP5w#6VG&F?dKfa?3 zRls5nFQPCMBGN|78D@Nus_6yjQ79S|YICqD zIy6+{Y>NEr#e!Hyj}sK)MOKO>Zn`IZJB5rrKkPV0VC;Xcr;h;85usgQGEG#NV@=&p zrTYiW~v^^+RYvBDV{NF0@hJ?SXs_lm<^GsA!Qb?hPs z)g#+8H6_syaGpk(Vp?Z@`meUgBOGE=2zZp!X5|U4z#C8e+8>_p+JBMWz|KhX*652Z zt)QUl{_-`>p^&ZTQh6*Lcf%B@5VgkOvVyd(U;8XBEXT1gEVBBJrepbtc?)|se{Qg0 z?MC=px*u>HF<49JJK?&swpMn%<3z;o z%T(&_)hq3NIgmxDre9wk$R^2Ezk@#t#dEhu+R&xW%=LD>Ijs`P@(_hm4p?!#yXR}Xyur{d47#{I)O!1t2G7nBu&XePq!N})FSAHo41)K&rq-imxp#+2pNof*yGbq3~Cr6k_Vz$bbd-D_#1hWox<>VB02gYma-y zBc%ljWc@bt)z(z4gjNbP^TDb2|#O*}_T;839H}2Yn z=))>?QA*jFO~R|Qjo)hwbkthPNdy%Hcp zx1gYaGD=y7YvjK(Q}YCc16@zrY9t1xAFG{1<@Lx>LmZ3 zg}H%>P4|bFHp0S3EycYL8?JmXKJp4ZdTPVsfG352o-VEyV+OOtWn7^e=YgWXGX|ys zjvn&gxkH2n!hzT0Xl{r!QY_fa?!A4}-7bF1ybEbbWCKX>+e1;40v71dhc_l@z0-%7 zTPnIeYFtb%Bd($BAcT{yc<0TBmELbmq7C7VN`?zdkWm%X#2>EGmzydji}h&E6m#Nmuz0*`R?JQxPW1O*dT~uA;sZeblUo z2cd$(0s5IPGb{^9oL0WvG)mN};81=*nY zN&mDg!!mePe6I#V$CG19m7O-c$~yC#dhBU`CGeYbF$;BNUW6c0p@#GJ-5yG#nkMmd zb`>yLR^liC3lkCXlPaNH(#=P(IpqgOGA$Q?s1w_;OD(FYo4)@CgUZ2qI#z@{ zvaUoCf$^I?P(S~0!%Lh`m@p6>FY&q`;6i&EVJlKlu!xYWzWDw3a^d%!|94`uW6_Do z${+bA2Bwo41O^>h|H#_H;}}(oow*=bmS}kA{~a~5$4LVT(jkHe#{=vi5@buEDcwfT z4Jx>G`x}0o((5aYioWrw#OWca^TkS|H+6BvPH8lwrevw?vIcU!p$yG2?fOe>VE5-J z-xpg(T_Xo%|Jj~NJO{j~}Gl?)O zaF=Is`x#d6$&WxnHk%YLv#Ib*;8=F7+d<~(t|LM%zbCcCg|HGsbB*z_!^WfvZ8rm8 z({!qnom;l4yqPNegttc!(ThW*RR3ZzYm21z*e24joDp!lTXw&XnpUF2R6#v7=@Kv@ zu+sj|my9)Ck4*=$=1=!N$1A{QDTUTFQy9`CgrzJ2r8dkFTN_fGZoA5^AVaVc?}K$c z6;QsdZ2Eahu87tW7}fM(am>}d*NpU+q?^4@ib!8bwfGSUM-=~h1X{40S}q21`4XQz z7rTnl-0j5v4O1n_R~OCu1Ql$CXBS3xZ?%SGMpgG?y`w@v_W4R4oiF!Y6f5!PPS4oP zDVguzAei)Ln=K|JKrVPF#m)tgFRZNKmMg})WOdC=TSXEot5>kUW{fMJxrF0G@cWmY z;&o~M0hT3SkQW|jY7~0pY)x!pu|2J+i;E#|C36cBL`frKqfL%Wnz#I`aH7fCjG;q?LG^O3MFvn%jFK@M zz>9wB=~i%pik-sir&CX|&6xg6)LK*uA*(X)0gLBPq%`gS?hOGOemp~zzz~$Z7Wb}J zGAMItX!O5!QsVjo$7SaevX~Yh*1^~F%n?Tgs5i$;XN55LlAp=r>ap%ws^<-gK-iI( ze;{FPtA7LeQ8&k74Nb-VbBM>eq|W`WdelOb6)~WI&A7D6qPZE>Bw#(w!96J429NNT zVGePs(V{cIh77*AL(t)}QtJ7gJ2dpFu=(mrO~EP(0(%t!8vm*HR2BU=KY!EoS_ksD z$_Jw((yc3M=p5$|IQa)PJ&NhEWj?rQHd{dPJbbM|8}bMMM*d@0}!(3$s>+pMG+tv_${61%Vd68%aK+iqfEv0&@oq^ix5@g?Ug70~{BA`WDh(Fj} zPXTgbCF#;e$TA#%Tm84aM&3+(!$y;_fHh6k(ghX=tHHFpNqRfV)fmjKLHaQEdl3y- zBBGHc?jbEkIAJ_Zvuj{=^$By{hjxSyGfkG+!rH1+Afvrg2y0R2Ila@d7dDdGE{L6C z)B`-cxYZ}@$(qLFEg|zflw8aLiB%kj#MAr4F9?uDiPzdeHPwbY8tzf&DS6`<*bgnrjw!9iL=t_N15-M+Hk`WsSv}yC5Y=xS^&j_V#ehdP zx-?gIE_8Ym&0cR7{yuU`z3Z&*5QkTO%@W-Z zE)r#gSPYBpn(><&14`*u=XoZc<2U1w&)?1Ic|}`pVidOZ1HzDYi^mAQ{OHrZ!k_Ek zK2jBa4JLDbI?YYR_gq57sPeRktw;56-O@^}RvO(<0w;^?V<(PA_QD~WmtzbmWQ1>% zRbIl%9~H7sT$No0I$t@FF>u}2FGy%NzA8ygyZ?(3OH_cWn`0VbTQv61?F(VsO)uC9 zYvNX>obRK&G1}|t1wx`WIpi3IZu?6X%eZWKraA89m7t$<>=p{lVLin}+e2->Qu88w zdh*D|kOc+H=cJ5ih+>^3pBzQJ1I>$)?{;(+3a0;AFId=D5IpFRdz(bx95c zc~+5U%PFULJx&*UpL8+D(L7tyOEr_*E=z!YS?#&@l(lt4SJElPMUd2h6yX8RTeZDu zx~T9m%SbT{h!H5nWp8h4qXPP;ydl1BpH_d-0!tLtS*oanjt5%m^I>(I0YE6=`+$&< zlU+h^{?dGpQj`Tu`E9Vdf#ip)WCjv2o8H+dK8o`i?YRZw%l+=ayrY2npEtw!J_o<& zsi-`%vL{Hsjm;2^N_9nSWR%`9@VFr~7{L(s--(q^|5hC|mwhNjirUdnk^P{^^sOh^ zN>zF`5AN$!pRkQv?$|bG0O#+5HmL=gf_Q!3dvgoWlke~~xQHMaHbXYqpH@y<1sjN= zF5wK{diCibAb%oF&&ZEG#xJShUP@In z!Ad{=5a7YTMDyuB2Qj@gP-+NJ?Mu5Vi!^8AN2IDWc#S+$A%+yyo-1ctCuJygI9v-A zf$W!>Llz2qjxJX!GHJI1ffyA6?rY&Lg{4*WZF?nE|JR+&3@I}4Lr&xB?3*zrU9hllCPq;e;T}>%3fbqNONN3No@Q7Aw3L-l6T2^oAsc9`t$B zUla7S@Ih;ep7YMw#437S<>qv{DC+or&-9n0W&S1@i%me!LPyCUW<|}lxh|8{edl?5 z2zhC#fdR_k5Ons~=r2F~-DQ4}L1<-DIgO1ClSY`rE0Hm_$b?0lhh;2z2Po;k9z1?< z5DR62eRbC!Glqjnj8`t4^#F6Wn)XSX}U7BqF< zJS{X_j(MQ)s7TD)UHJ0|=#)DuYwW=Q8jad6@UvK>O{#+bTtD&a*ARu4lk!zr&MB;3 zev#BL+RPIobP;=q%lZr3V#xv(8m+(r3MJC^$1D+fPa&>aZ|i}>*koH=pORR~r0Q0F z^CYFHApniJ>fO>&?KhHyrOixi@l^N}*M7x2$fF&9jD8cTLBlbg1T_3K8gVhRH=}X- zjHDa`vdIi0noY+en+X{l*^?1xueifc=Z$}-o^%nQU8vs-);Nq`nJHq}iS}nZ6#e!W zLXMZ$!=xVX$_S#8D${Z>LE zJmAjvHx6LweqyH@zr(|)fu0b8o^~zcJOPFVslpIR$___TOJ<%?WYWVd(_F+)n8~f< z)xCw0%1G`cA~PyQ3EmV+6Y*Kob)PRBmxCg8(?xq-xkyM%aR{)W^tK8urmM;_E)^&V zb8&Pv168vdF(7w&#HmK;RGAXp4YD~KDPQ=Do*)rXD6L|`(S~;vHfky#OR`zQX6C}1 zv-^b)@|77GK$q(_xPZU4W%gG1>haV1_es*sI~sWi!_@uZ$CYkGL_G_@tY438_+Fh} z(*F(RR(y|1?6eJU%Wbe-X~2fs%v*_N4q+}z->j3-<{jtp9{!>OnW`om!Z{=V5=>vE zHZc%dJCUHigZZ0e^2+7Ycnzm!Q^ZSFpa=O2@colNy)*^=D?WT8xXQmffi5ZhUC|%d z7@Z3a^ZMg}*3N01Dr-3nt?{s0I8nA>|EUS~FF-1_c)M$Aet3vcF(|OYgrhBZjJBD` zolD**M^l{P3!j*{zeyJ8GQ01d+UvCQngB&xkC1&tQ-!cYwN14&v=UKEr#Xc+)$qE+ z*xf<hN{$A^Vd7F&<)shi{~rAX>!~2Fpw3W zJ!~5I@n)jACa=2-P~#>L*Q@qSW(g z^o9D(&yrJ&X23w4ElthW?IB4ik;6SB=ZS6-DlkWfEyqs?;LkJ#nyKHq<^XS4h3c>g z(0>#volJrL!Ifz{6zYBNY6cWayo0LT1m>2V@p)E#`TaX^9{oGdDI#JNlV_RkXx%Cy z_0*;d2QD9YgkS{fQN7Hm{+@n#V!1cv&*|n3-zhE$n$>_|zh(dt6l;&j?hS-}oD8~v z-xnRTkr~D0yEfbL;VU`03GZ9m z_dF-RWZM%*%_=S8+og60JMH?4I`#c!ii-Aza@-DRw^;+t(+nwFC)B0Oi(d9AyZlLh)} z@!RoG7B#AGJv$<@Td%LQQ9g?Fl3I*urdukLSelQcRNRwt z7|SNtCW!x`CAQ~#qlujL2Jv0UR}K+@0Qz3V47Pk2V8i99y%W_@M4Sg&QaDCK?+RzE*`7^Neh|`% zB{q-T{jl!LXaAJaGZ_3>(X+IH5G8ul(Vj~lsC819)^m$huw>z|c?dN(&FPJ7d#y=s! z#>6g6pf-K|^QIR{D&P?@w<@{eC9Pm)3BAtef_|@AK->QS=2qzlsZ<6fu;A<`F4%&K z&dobJP(q^41Y9fs%;gL-_D8gfysa#QTW!&Y;;}&Z(cx!2sHKmazaD97URt9sa$D;h zj?Lrbj6`b7*Mf{w=55~{Oy&z@2yKsxKAl4&q1?4=B*dwAC(Bmc^R0p2-t!EiI;DZ& i2eX!>0Hf9}Q)7xk4TYsEfqIcTeZff@;zO&O;V*w$n^;Kz From dec7149aad4811c33562f6bbc3d0135d033124dc Mon Sep 17 00:00:00 2001 From: Roberto Perez Alcolea Date: Wed, 3 Mar 2021 11:23:59 -0800 Subject: [PATCH 217/273] Replace TravisCI with github actions (#1010) --- .github/workflows/pr.yml | 38 ++++++++++++++++++++++++++ .github/workflows/release.yml | 47 +++++++++++++++++++++++++++++++++ .github/workflows/snapshot.yml | 37 ++++++++++++++++++++++++++ .travis.yml | 25 ------------------ buildViaTravis.sh | 23 ---------------- installViaTravis.sh | 16 ----------- secrets/signing-key.enc | Bin 6784 -> 0 bytes 7 files changed, 122 insertions(+), 64 deletions(-) create mode 100644 .github/workflows/pr.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/snapshot.yml delete mode 100644 .travis.yml delete mode 100755 buildViaTravis.sh delete mode 100755 installViaTravis.sh delete mode 100644 secrets/signing-key.enc diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000..475fae8b --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,38 @@ +name: PR Build + +on: [pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + java: [8, 11, 15] + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - uses: actions/cache@v2 + id: gradle-cache + with: + path: | + ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + - uses: actions/cache@v2 + id: gradle-wrapper-cache + with: + path: | + ~/.gradle/wrapper + key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }} + - name: Build + run: ./gradlew build + validation: + name: "Gradle Validation" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: gradle/wrapper-validation-action@v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..fb341f35 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +name: Release + +on: + push: + tags: + - v[0-9]+.[0-9]+.[0-9]+ + - v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+ + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: 8 + - uses: actions/cache@v2 + id: gradle-cache + with: + path: | + ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + - uses: actions/cache@v2 + id: gradle-wrapper-cache + with: + path: | + ~/.gradle/wrapper + key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }} + - name: Build candidate + if: contains(github.ref, '-rc.') + run: ./gradlew --info --stacktrace -Prelease.useLastTag=true candidate + env: + NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }} + NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }} + NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }} + NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }} + - name: Build release + if: (!contains(github.ref, '-rc.')) + run: ./gradlew --info -Prelease.useLastTag=true final + env: + NETFLIX_OSS_SONATYPE_USERNAME: ${{ secrets.ORG_SONATYPE_USERNAME }} + NETFLIX_OSS_SONATYPE_PASSWORD: ${{ secrets.ORG_SONATYPE_PASSWORD }} + NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }} + NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }} + NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }} + NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }} diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml new file mode 100644 index 00000000..0e26f5f4 --- /dev/null +++ b/.github/workflows/snapshot.yml @@ -0,0 +1,37 @@ +name: Snapshot + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: 8 + - uses: actions/cache@v2 + id: gradle-cache + with: + path: | + ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + - uses: actions/cache@v2 + id: gradle-wrapper-cache + with: + path: | + ~/.gradle/wrapper + key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }} + - name: Build + run: ./gradlew build snapshot + env: + NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }} + NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }} + NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }} + NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ebdc0d24..00000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: java -matrix: - include: - - jdk: openjdk8 - env: GRADLE_PUBLISH=true - - jdk: openjdk11 - env: GRADLE_PUBLISH=false - - jdk: openjdk15 - env: GRADLE_PUBLISH=false -install: "./installViaTravis.sh" -script: "./buildViaTravis.sh" -cache: - directories: - - "$HOME/.gradle" -env: - global: - - secure: Br0TpGFVeojjo77l8kGqIQKir+8aWlu2A+a96xzkZnOkL5tEHG9tRfcJNwKQs2w5pepc3hGAHPC38tB4NQL7LwsZTyHI4l/6HJFpy1BXeTNfi46CcCdnFUYR0yYEY/sjU67pgFDW3tM02JxVq6QaNawrhmipcGBps+bNqQH0Rno= - - secure: Jt3PJOvR4KDwCkJdLD58ftA+ftc+6TQLd/orRphhVat3lDtZe6CwADBmuH+LW2ystiQdqAJEI7CFjfWzJuQJA/DJK4HzVfl65cpWGe0+eYxNia4xm4LeqoIK8HKUMRROZ2MDd1Eltv6t8H1WSbHVWwWY5xYsi1NdWnThQP+XcFQ= - - secure: ap3WBWV5qH/OIv9r2qeCIruIlWEx5/4Jie37ENeIOdlNkBvQosM2hEjQC6GVkrepmpeaWrNVAho46ApUSxxoDjzeMtxVewkCCVXQPKTlmBrj3P4y/2xkLBHJX4wWHT0cHY2rMZbAnTX5aUvdb+8kxZD65+YAZtK4KBL0VO+hUDc= - - secure: WO0otm45qt5Tg1tU5Y7kWBG+LPEjyekiigQe3yxKBprVDYu4c0XYw9qqwsqajdBTbUNIaVgngG73aincCHGmaZVoloSesBIpEZUwgmvgSf3P5GQKEN4+a/k/NZlB/8buPSM267a4Vvpug9IgKmqqa2XZYwT/uwF4A0KMLOEF76o= - - secure: REA+XXrIp56i3ydbzUUcxRQ5mT4Tl1aVZJt87Tim7UG+iOFV23tBlmpKwjFbbKMkVBP/c2y/hZsyKDrS9XcgkheteJZew+6kGIw0kiDnoh3mDhDxKE6oMn5XtIz+m6LoqJqB+XKeaunpLdbaExO8DFPyVPKAzSqyaIfsKvh0eQA= - - secure: J9/D9jjpU2OiWBGOIzmlf4MMHde5MF1u82CkF6qLkyLG+6WO5JOQpRlPx7LHyHRZteMsq2Wux5QNnUdr/2wAv8fNeB3QmZT5CKS0P4rK9wHx5ZRWbOMnysbYtnm3bm/jxM7tLiB3hbRNhyhEyeDu2GmpEwLhJbFnlZGPq4K3y6w= -before_install: -- openssl aes-256-cbc -K $encrypted_d34093053982_key -iv $encrypted_d34093053982_iv - -in secrets/signing-key.enc -out secrets/signing-key -d diff --git a/buildViaTravis.sh b/buildViaTravis.sh deleted file mode 100755 index ee8ef4b2..00000000 --- a/buildViaTravis.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# This script will build the project. - -if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ "$GRADLE_PUBLISH" == "false" ]; then - echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" - ./gradlew build -elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then - echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' - ./gradlew -Prelease.travisci=true -PnetflixOss.username="$NETFLIX_OSS_REPO_USERNAME" -PnetflixOss.password="$NETFLIX_OSS_REPO_PASSWORD" -Psonatype.signingPassword="$NETFLIX_OSS_SIGNING_PASSWORD" -Prelease.scope=patch build snapshot -elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then - echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' - case "$TRAVIS_TAG" in - *-rc\.*) - ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PnetflixOss.username="$NETFLIX_OSS_REPO_USERNAME" -PnetflixOss.password="$NETFLIX_OSS_REPO_PASSWORD" -Psonatype.signingPassword="$NETFLIX_OSS_SIGNING_PASSWORD" candidate - ;; - *) - ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PnetflixOss.username="$NETFLIX_OSS_REPO_USERNAME" -PnetflixOss.password="$NETFLIX_OSS_REPO_PASSWORD" -Psonatype.username="$NETFLIX_OSS_SONATYPE_USERNAME" -Psonatype.password="$NETFLIX_OSS_SONATYPE_PASSWORD" -Psonatype.signingPassword="$NETFLIX_OSS_SIGNING_PASSWORD" final - ;; - esac -else - echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' - ./gradlew build -fi diff --git a/installViaTravis.sh b/installViaTravis.sh deleted file mode 100755 index 68e45a05..00000000 --- a/installViaTravis.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# This script will build the project. - -if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then - echo -e "Assemble Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" - ./gradlew assemble -elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then - echo -e 'Assemble Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' - ./gradlew -Prelease.travisci=true assemble -elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then - echo -e 'Assemble Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' - ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true assemble -else - echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' - ./gradlew assemble -fi diff --git a/secrets/signing-key.enc b/secrets/signing-key.enc deleted file mode 100644 index 2204dff18cc2e474f252fa7f54d4cfc537a1d203..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6784 zcmV-`8h_=KM$;w>-lXG@3)Ft$Q#&Xai71ZZW;b$o2wXKu4gDmw*B7U&{>2@tEDZ zXNT<@JH(^S&VqGY-apMizcYaMh)No9#pNmDWi%+5gi3>=fv#-=e^gkP83}-l3Qye2 z6t{n!V24ln1O~TAoT9zCeY;DP+x%yPltF8c7PzpPrq~ zHrMUv2ddsIQ$X$FBt;<=a^FDtChAHH|N8JY$u=1`t|9@iXGrRsUJQlw*J)YpR(^>a zAL@I{+5n5misBqTLT^tDhEGR*?I_^T%sy<6Vd@%+6J0-H&ytC-mxlB%)FC%sjHD$J zDV8mkao}*uL*kA12cwp|z8**{atJcdeGL;*kuL1u&;!x^_gnR!Hh-}L%$tS->w6Ft zV*EaR?y5d2z9L@CT-CWm`uajRO263M;2Kf) zflDgX(h-BQ#w7fIh2>y$jHIhL_i4IkKPhHd_<%8fPWETNZLC?(QNavGt48Ul6X7~6 z4Ho#}y-8t!n&%i}#N%6MSId--!i1C7M`Mkdu8gVuTWBnbf<#CkBfP+Mge3C>Q6S4w zQ7g@?C(uW~v-n;Z8DDs*@N4q+3mLIUE3;!&){jRwih-B;4e%*?q=QJVm3)^A{6Uwt zSt}OlWq!`XrvEcdA^yCCm_ycghb2u0(nC}sZxG1&Q(pV0yXIWc34&x*zBYSX!8ZOI zhKVG*e)qxz*x89FB-)0;&3-z&4Tt7_v7;oh#jRG*<1M*fGxm%PrY}ky9wz=+Y{zL| z-G*mNc^zA~IYC<9TWv5Eg1`@|wq(Q9PZBIL8^a&%?&aoEF^V{HHGJZ2y}}F1)5DED zcJ?!@Zc`pKnYy;DSxfJV`71a9 z1`Sl0DNeWk0|qLEXRdbD|Hs${&oun`7_~yom5Kp`Wc;;*e-BP=r+xCI`sMoznV19@ zlh5<*D?&dXnS_8gR~j!nWysOCdwLTLjf+qR=XAz{T;gPg;`eGmK!=rl zO5Mqzu!%~1!(lNUiJB?$ZpzRe!*%pB=Bq!j$fa7H!#KP7Xct$wY&TiQG5ECd0Ip(!6_kmU9>Nw# zaX-h7+}DSD6^OxD#58`l1Ab$<-bSaiLF!bgam+rGTr63WpZhV*OMzhBE{7dPlJ&g6 zLI+hTxGKU3KS-?nQx!RqiMy*$HzgsiK*GyO2)l1dvSpNX_ZIS~t8dAR*eIls6uXKU zU0r3x3F3E*gsZ*Vr4yf4 zEJiJ>y(MCFirQ;6okh#pvFAPUQAXjQ`aa9+Jm5Go-bAWl)R3LhvftS}`r*mIFF zG>{7~o&{BpexQ4lr8h|2AOm1)DFVi1I4vC-;%K^KIfB4;HzqQR+=}6Rm9)t!k~jqR zi6dB?!OuknI*Wb}rOql5%`hR>HVKh9GEajVA4Id9NI`JTMwGxWZ;{YE6iUE?@d%N( zAZoG17YHN@1N#umZD;r2cqh>{D=e3ro|q=pdN3o$C10(0((H&yZSsNq;FMP?yk`WQ zkx*&lCtjEQzn~U-X>A6639568_~7Vg8{t(B2h%2%NjAPs2_Tf;WQ{*2X`#*uti}=j z0Efj_jT2t=~ueFbrXU%@F^g6q}bT2c^5Le8OlMB5m>D|XwD z){Fq+lXfWWa@pR<10NrBN)6S>XBo31W#=mmVldb`?rk}5WGBJzLcKL9sqcR(>IjY^ zN|r(2Lbu{c#UE2PqzzV~gtHIkBc_iyqi}$xd{l3HJP|WJho@P}1EDuU=*8JSpNB=1_TZ zUJGny`1-&G(rXQya~)Yt^IywvIPw66F`MQi{~6Y+LEjbjT;N;8DfGYg>bKB zl?@-2N{-Rt8wn}(_P~{k5)LrZy?h=Ip?XVF^~AQ-IdIrRewI@`c@A^@p#A>2K)O; z0d>-|(zGAr9BsvpQ<-qGPCyLd-&^u%|As_m|&;Qz4YBB62d&__EVgY7H z*+0LdcB9PXhN2GWgd1>(VN3piXx(5Lx<}>U$iEguUD+Gp90JF%fw&Q}afSHler56; zaAtP{{hF<2wlzSqCMKV@s$EpionL1NMyM8R(1Lo%hU_32UC%x|D~;rV-o2Z+5jUex zNzn2N7+4?8S^Q-+fki#C*RSMrC*ELwO=@WD1p7YQX9D>!{%n{-y8TRuIoxkjAry~S*HO1osi-#iL( zbJVuryxL1LRFIPeCEJzzZ$`=l1B2ED1q?6~i7-F43OvHO3w1}c$Pt3BN~xC%;pK1+ zEMm0kkjes_SvpUOLA)%R2LmIhAdeH`9C64wEe(&qr5A{0_hcCU6<56QE$)Q7m7qrH z?X3aP9xe_6q3dNuM~1%dwSXxzGX0Nha#kFf&j&MZ zSH^vMF4?1^vBFz4V5b9vrcuXAWHEB9&BPi#R<*aqO5L^ldoeI8^tRF3iC#L?jg*ma z-Ee%NARE@m2PH8RM8oPL4sTu`zY04xfh02d$UCMIKt>~YX;HXk31-Z&2$66NLe;+_ z{i)Qkv4kbVdNl>itD~4W`}>A6$mu9R;ri(}GHBxHK5p=WHk2fclO_5ngN3*7$3 zqQbm)NKZv~iKchBGwbB;DPDT9G&J*ZfFd(DLOb;~i6zwzGp3eOVWF66u$zd}+In{Hh& z^LN28xgX9PZe9GjAxFJD$d_Jk0I`$Asvb>5ca*U7(1SBHHn+J`q|w+cW9!Dz=CYsv zRO6NT-v{@q)Z$Mlt94ENCMP#gmb#R?2DNI5J&h7g287%LGldNydL;OFggOOU&ep%j z;c{=QzP?l|c-ge%2H|iV6oz=*$C#ID5V8Zhp+<w%qMHWcLLkSXSPwPjzL$k6^TK{8$Za`)dIx#%(K6CS$9sLb0ksS>7ES?JT(Y} zPPOG)NHAlw(%W(ZKScww!3#>07qQ49Zhr(3EfAC#Yo(H+DWFfql4NC4N9eUbKyka- zY><0AhBRUc$!Qsq4&Qi#T}Ki(PO+Gx;3wK5DJl;^uGZ(rb`%~;AeR1_c;20*se1Zi zM=d)3Z_61^(Dg(h*KpZD#0FCK+2^Uyh_z67tc1qjBXrBD{jfd%`0}#w7+-#j+yw$# zUvyHqL7XIo_5K(9v4;LVTWSKaWu7(X)WxAcy=@?#mn7A; z$#8LL#CYB?zX1y1y|cb4#`&&o#C4cx^w)R0-3!j@kMg~>IQILZ9oLW6z9`v{MI}JJ zqH;H8Sl;WA>4>hxfjbO}>3f)mGlQ?sE3 z(B9LQE3FH*{sgv%Klr*A|$^)bomW4Z;xH~ycxyOlrzl;qTAFj1Be00j|V zn6Zb&+HBojGXzNS06Z0d~ z5c(8;td5okZB-j|Ffdjq*V0MuP=}{b)rtRcv7Y%cUdo2q(wl0T-|q2+H310H5oj8w zM--@QhnpibN!DshN#VB9%}BAp5ZKm}So%mAjjbASM4Q7!$_>Q%B;5qLycUWq~N)Fy^(>y{pz9 zR<$$u9-{f(~6YDb)R5XE_>1FI3;Ks$#3L;JOzZpyeXgc}C{FP!brci}#j z-o#V>f!Dnkb-ZbmdWB8oF1|+yPSljEN$%UbUVV?STmWERnIl&eseE0Iyim;YNsT>a z&Z;52!!4@oweEoVTw?FmZM0U=MBM-W9@H8$`Y|8Xnc}p+s%jv9oL;FsF3Ud3Gt
8)Kc!UpxAmSR4kdFr@U-^tKLQK46Um3p1 z^W_obzIU%yI;C-+ZPW2B;gi7}93y`D??J=>=}(~Nf3L?uQK?nVja>)mwkYpd5}0r1 zAx+n+&4&D zVtv|v=G3CDMu5`x;fZdkn9r>FJQML*c}QJXr_<-7IzW%a`=`{F^pCexm?q6}v2YSDVdZc&7{#@iOOWS;?FW&tNwh2`snwnKqrF<(T!zwD;4NJJ~nb>FVC z;hYUw-h(|2zsFb4eVJnzo_56W^w1G%!AEYx^HPaD;}^VmIA=0Kk5iEjI}PXYj_(vX zI!>V_Rt@b|J(+c&QV|<|sfr@&_Bc;2ah`p1$Zyo+bei!2B3UP&g|#i7JU*h-?uCe*^pb;co~>SFR8wsNvG|;Z@nS;g<1#m?Z>rDuA-5T> zDu$J|)tHeLdT@9<{$Bj=gHN94D6b_y`cq;Y=V{qiGZy(=X93+1pp#s4fWK?EZ|1LU z^68Yeq#VZ=G($Yeao=tJ455RvKp@_h^;wT6iRlqtoU=cmSD(6GuMT{YkgexCu)dhzdE z4uq{+Z+f$1oEmEp$*PW0OA;ftVHgBDPI}+U;iaXyoNoeUz7kkL-_Dd;;}eGg z{QokTGbQ+fsaumb4*zD3ly$>;o1e+NZ!>~xbt@nEv1Hw!qI2PvG;TMK6(z3S%o!{5 zStw`JW=1|_0?4u|u%M2JGVZl%tO&CxjcIGhw zl3g5woaSjHE~)m$>ey;2dPtSwz&-N5%wWUp%`lo|_@X;R&;EcxY3}^dSZI7@NfCV| z3mLB5A0WT(o>|U$8-ScmJmhQ$gD?j0@{Yf26e2RBgC}l4$J;^$p}BmELh?VhD?V8c zamV`$vWKM+OqxXrt#rYpaQ*RiqDq44_Q^Bd)-Ui1>{2tyPt=AsG~!hZ7u%{~p<*z@ zFOg-@h=ty&I|&z9y3A8Osh~C$Am%^M}O2d0) zluRR=QUb+e#Mb7S!k#o&jOuWDwy*vX`G6O^6D=P0biH@ijmT16XO=`Sm`eC= zW!S9eo@Vc(Q@axEh)?InhOb3F=j$l@ap`q`?#$czX!qkz^`78z$G-syP3rOk20g&@ zg_r91s&|e4ucjU=68A-qj)## zyAGcOJCKEtF-Aw{_}T3Y4CTIM9M>djULrN^IenA zsSO6>LB3-jBb&JE5KOFQM~k-(yKAulO(5GsS`wW&9LL(DWlHrYxqrH;k`E2L7Y8bZ z+Pifg6+mZt@S%gk#3?bHzI012w_{Q#57%mK2xdGy*JT5s*IW?Uu)a-D?B@EM*%jT0 zZ><R1?)ZbVLXYe`15fLBpHtk`|)s zuY8zUs=FN?ZePVZk(32_zRPFfkV#P6>Znt{_{ynuX;}))Bq8$xV0H?6$t_FnY#F^6 zJupkxw1(G@=(WEJyOpT~8CcJ$*n1-x`WgA?!~VUf(Do%XheJML%IjcWqSSt3*tFkL zERFtD+!ahKaDuuo+}%iz4Ex!Z;v`Uibe#B9YIlR#WOSDD{e&JPVtx3bK(}{`7oTY2_kE7xG i-6=mWRH0n}AL$OLe Date: Wed, 3 Mar 2021 11:29:01 -0800 Subject: [PATCH 218/273] zuul-core: enable plaintext body caching (#1008) Despite the name, this is actuall for metatron body caching, when it is optimistically enabled. The caching needs to happen in ProxyEndpoint, because a server has not yet been decided, and we dont know if the cached copy is needed. In the case of retries, the cached copy only gets stored when there are multiple failures, indicating that the *second* attempt should be retried. This has been stable in one region for a few weeks, and is ready for being default on. --- .../java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 442393d9..2099fd55 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -158,7 +158,7 @@ public class ProxyEndpoint extends SyncZuulFilterAdapter Date: Wed, 10 Feb 2021 15:42:53 -0800 Subject: [PATCH 219/273] OriginServer wraps discovery enabled backend server --- settings.gradle | 2 + zuul-core/build.gradle | 6 +- .../zuul/filters/endpoint/ProxyEndpoint.java | 26 ++-- .../connectionpool/BasicRequestStat.java | 4 +- .../connectionpool/ClientChannelManager.java | 4 +- .../DefaultClientChannelManager.java | 25 ++-- .../PerServerConnectionPool.java | 20 +-- .../connectionpool/PooledConnection.java | 26 ++-- .../netty/connectionpool/RequestStat.java | 4 +- .../com/netflix/zuul/niws/RequestAttempt.java | 6 +- .../zuul/origins/BasicNettyOrigin.java | 32 ++--- .../com/netflix/zuul/origins/NettyOrigin.java | 16 +-- zuul-discovery/build.gradle | 23 ++++ .../com/netflix/zuul/domain/OriginServer.java | 129 ++++++++++++++++++ 14 files changed, 228 insertions(+), 95 deletions(-) create mode 100644 zuul-discovery/build.gradle create mode 100644 zuul-discovery/src/main/java/com/netflix/zuul/domain/OriginServer.java diff --git a/settings.gradle b/settings.gradle index 05cdefb3..7e8dcbc0 100644 --- a/settings.gradle +++ b/settings.gradle @@ -5,3 +5,5 @@ include 'zuul-groovy' include 'zuul-guice' include 'zuul-processor' include 'zuul-sample' +include 'zuul-discovery' + diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index c1d17f14..bd670ebf 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -14,12 +14,14 @@ dependencies { api "com.netflix.spectator:spectator-api:0.123.1" api "com.netflix.netflix-commons:netflix-commons-util:0.3.0" + api project(":zuul-discovery") + api "com.netflix.ribbon:ribbon-core:${versions_ribbon}" api "com.netflix.ribbon:ribbon-httpclient:${versions_ribbon}" - api "com.netflix.ribbon:ribbon-loadbalancer:${versions_ribbon}" +// api "com.netflix.ribbon:ribbon-loadbalancer:${versions_ribbon}" api "com.netflix.ribbon:ribbon-eureka:${versions_ribbon}" api "com.netflix.ribbon:ribbon-archaius:${versions_ribbon}" - // TODO(carl-mastrangelo): this is not actually needed, but it is pulling in API deps. Remove it. +// // TODO(carl-mastrangelo): this is not actually needed, but it is pulling in API deps. Remove it. api "com.netflix.eureka:eureka-client:1.9.18" api "io.reactivex:rxjava:1.2.1" diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 2099fd55..22a390d0 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -27,7 +27,6 @@ import static com.netflix.zuul.stats.status.ZuulStatusCategory.SUCCESS; import static com.netflix.zuul.stats.status.ZuulStatusCategory.SUCCESS_LOCAL_NO_ROUTE; import static com.netflix.zuul.stats.status.ZuulStatusCategory.SUCCESS_NOT_FOUND; - import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import com.google.common.collect.Sets; @@ -39,10 +38,10 @@ import com.netflix.config.CachedDynamicLongProperty; import com.netflix.config.DynamicBooleanProperty; import com.netflix.config.DynamicIntegerSetProperty; -import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.reactive.ExecutionContext; import com.netflix.spectator.api.Counter; import com.netflix.zuul.Filter; +import com.netflix.zuul.domain.OriginServer; import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.context.Debug; import com.netflix.zuul.context.SessionContext; @@ -108,7 +107,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; import java.util.StringTokenizer; import java.util.concurrent.atomic.AtomicReference; @@ -126,7 +124,7 @@ public class ProxyEndpoint extends SyncZuulFilterAdapter responseFilters; - protected final AtomicReference chosenServer; + protected final AtomicReference chosenServer; protected final AtomicReference chosenHostAddr; /* Individual request related state */ @@ -468,7 +466,7 @@ public void operationComplete(final Future connectResult) { methodBinding.bind(() -> { Integer readTimeout = null; - Server server = chosenServer.get(); + OriginServer server = chosenServer.get(); // The chosen server would be null if the loadbalancer found no available servers. if (server != null) { @@ -664,7 +662,7 @@ protected OriginResponseReceiver getOriginResponseReceiver() { return new OriginResponseReceiver(this); } - protected void preWriteToOrigin(Server chosenServer, HttpRequestMessage zuulRequest) { + protected void preWriteToOrigin(OriginServer chosenServer, HttpRequestMessage zuulRequest) { // override for custom metrics or processing } @@ -692,8 +690,8 @@ public void errorFromOrigin(final Throwable ex) { if (originConn != null) { // NOTE: if originConn is null, then these stats will have been incremented within PerServerConnectionPool // so don't need to be here. - originConn.getServerStats().incrementSuccessiveConnectionFailureCount(); - originConn.getServerStats().addToFailureCount(); + originConn.getServer().incrementSuccessiveConnectionFailureCount(); + originConn.getServer().addToFailureCount(); originConn.flagShouldClose(); } @@ -768,7 +766,7 @@ private void processErrorFromOrigin(final Throwable ex, final Channel origCh) { } } - protected void postErrorProcessing(Throwable ex, SessionContext zuulCtx, ErrorType err, Server chosenServer, int attemptNum) { + protected void postErrorProcessing(Throwable ex, SessionContext zuulCtx, ErrorType err, OriginServer chosenServer, int attemptNum) { // override for custom processing } @@ -841,10 +839,10 @@ private void processResponseFromOrigin(final HttpResponse originResponse) { } } - protected void handleOriginSuccessResponse(final HttpResponse originResponse, Server chosenServer) { + protected void handleOriginSuccessResponse(final HttpResponse originResponse, OriginServer chosenServer) { origin.recordSuccessResponse(); if (originConn != null) { - originConn.getServerStats().clearSuccessiveConnectionFailureCount(); + originConn.getServer().clearSuccessiveConnectionFailureCount(); } final int respStatus = originResponse.status().code(); long duration = 0; @@ -918,7 +916,7 @@ private HttpResponseMessage transformResponse(HttpResponseMessage resp) { return resp; } - protected void handleOriginNonSuccessResponse(final HttpResponse originResponse, Server chosenServer) { + protected void handleOriginNonSuccessResponse(final HttpResponse originResponse, OriginServer chosenServer) { final int respStatus = originResponse.status().code(); OutboundException obe; StatusCategory statusCategory; @@ -932,8 +930,8 @@ protected void handleOriginNonSuccessResponse(final HttpResponse originResponse, // TODO(carl-mastrangelo): pass in the clock for testing. origin.stats().lastThrottleEvent(ZonedDateTime.now()); if (originConn != null) { - originConn.getServerStats().incrementSuccessiveConnectionFailureCount(); - originConn.getServerStats().addToFailureCount(); + originConn.getServer().incrementSuccessiveConnectionFailureCount(); + originConn.getServer().addToFailureCount(); originConn.flagShouldClose(); } if (currentRequestStat != null) { diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/BasicRequestStat.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/BasicRequestStat.java index cf49fe1d..56e469e4 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/BasicRequestStat.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/BasicRequestStat.java @@ -17,7 +17,7 @@ package com.netflix.zuul.netty.connectionpool; import com.google.common.base.Stopwatch; -import com.netflix.loadbalancer.Server; +import com.netflix.zuul.domain.OriginServer; import com.netflix.zuul.exception.ErrorType; import com.netflix.zuul.exception.OutboundErrorType; @@ -38,7 +38,7 @@ public BasicRequestStat() { } @Override - public RequestStat server(Server server) { + public RequestStat server(OriginServer server) { return this; } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java index 39be1560..c45e9c6e 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java @@ -17,7 +17,7 @@ package com.netflix.zuul.netty.connectionpool; -import com.netflix.loadbalancer.Server; +import com.netflix.zuul.domain.OriginServer; import com.netflix.zuul.passport.CurrentPassport; import io.netty.channel.EventLoop; import io.netty.util.concurrent.Promise; @@ -48,7 +48,7 @@ Promise acquire( EventLoop eventLoop, Object key, CurrentPassport passport, - AtomicReference selectedServer, + AtomicReference selectedServer, AtomicReference selectedHostAddr); boolean isCold(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java index cd98b260..e40a19c1 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java @@ -26,12 +26,11 @@ import com.netflix.client.config.IClientConfig; import com.netflix.loadbalancer.DynamicServerListLoadBalancer; import com.netflix.loadbalancer.LoadBalancerStats; -import com.netflix.loadbalancer.Server; -import com.netflix.loadbalancer.ServerStats; import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Registry; import com.netflix.spectator.api.histogram.PercentileTimer; +import com.netflix.zuul.domain.OriginServer; import com.netflix.zuul.exception.OutboundErrorType; import com.netflix.zuul.netty.SpectatorUtils; import com.netflix.zuul.netty.insights.PassportStateHttpClientHandler; @@ -229,9 +228,9 @@ public boolean release(final PooledConnection conn) { releaseConnCounter.increment(); connsInUse.decrementAndGet(); - final ServerStats stats = conn.getServerStats(); - stats.decrementActiveRequestsCount(); - stats.incrementNumRequests(); + final OriginServer originServer = conn.getServer(); + originServer.decrementActiveRequestsCount(); + originServer.incrementNumRequests(); if (shuttingDown) { return false; @@ -247,7 +246,7 @@ public boolean release(final PooledConnection conn) { conn.setInPool(false); conn.close(); } - else if (stats.isCircuitBreakerTripped()) { + else if (originServer.isCircuitBreakerTripped()) { // Don't put conns for currently circuit-tripped servers back into the pool. conn.setInPool(false); conn.close(); @@ -263,7 +262,7 @@ else if (!conn.isActive()) { releaseHandlers(conn); // Attempt to return connection to the pool. - IConnectionPool pool = perServerPools.get(conn.getServer()); + IConnectionPool pool = perServerPools.get(originServer); if (pool != null) { released = pool.release(conn); } @@ -330,7 +329,7 @@ public Promise acquire( EventLoop eventLoop, @Nullable Object key, CurrentPassport passport, - AtomicReference selectedServer, + AtomicReference selectedServer, AtomicReference selectedHostAddr) { if (shuttingDown) { @@ -371,20 +370,20 @@ public Promise acquire( } protected PooledConnectionFactory createPooledConnectionFactory( - Server chosenServer, ServerStats stats, ClientChannelManager clientChannelMgr, Counter closeConnCounter, + OriginServer chosenServer, ClientChannelManager clientChannelMgr, Counter closeConnCounter, Counter closeWrtBusyConnCounter) { - return ch -> new PooledConnection(ch, chosenServer, clientChannelMgr, stats, closeConnCounter, closeWrtBusyConnCounter); + return ch -> new PooledConnection(ch, chosenServer, clientChannelMgr, closeConnCounter, closeWrtBusyConnCounter); } protected IConnectionPool createConnectionPool( - ServerStats stats, InstanceInfo instanceInfo, SocketAddress serverAddr, + OriginServer originServer, InstanceInfo instanceInfo, SocketAddress serverAddr, NettyClientConnectionFactory clientConnFactory, PooledConnectionFactory pcf, ConnectionPoolConfig connPoolConfig, IClientConfig clientConfig, Counter createNewConnCounter, Counter createConnSucceededCounter, Counter createConnFailedCounter, Counter requestConnCounter, Counter reuseConnCounter, Counter connTakenFromPoolIsNotOpen, Counter maxConnsPerHostExceededCounter, PercentileTimer connEstablishTimer, AtomicInteger connsInPool, AtomicInteger connsInUse) { return new PerServerConnectionPool( - stats, + originServer, instanceInfo, serverAddr, clientConnFactory, @@ -428,7 +427,7 @@ protected ConcurrentHashMap getPerServerPools() { } @VisibleForTesting - static InstanceInfo deriveInstanceInfoInternal(Server chosenServer) { + static InstanceInfo deriveInstanceInfoInternal(OriginServer chosenServer) { if (chosenServer instanceof DiscoveryEnabledServer) { DiscoveryEnabledServer discoveryServer = (DiscoveryEnabledServer) chosenServer; return discoveryServer.getInstanceInfo(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java index 2d8fdf55..3a0779f8 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java @@ -18,9 +18,9 @@ import com.netflix.appinfo.InstanceInfo; import com.netflix.client.config.IClientConfig; -import com.netflix.loadbalancer.ServerStats; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Timer; +import com.netflix.zuul.domain.OriginServer; import com.netflix.zuul.exception.OutboundErrorType; import com.netflix.zuul.passport.CurrentPassport; import com.netflix.zuul.passport.PassportState; @@ -53,7 +53,7 @@ public class PerServerConnectionPool implements IConnectionPool private final ConcurrentHashMap> connectionsPerEventLoop = new ConcurrentHashMap<>(); - private final ServerStats stats; + private final OriginServer server; private final InstanceInfo instanceInfo; private final SocketAddress serverAddr; private final NettyClientConnectionFactory connectionFactory; @@ -80,7 +80,7 @@ public class PerServerConnectionPool implements IConnectionPool private final AtomicInteger connCreationsInProgress; public PerServerConnectionPool( - ServerStats stats, + OriginServer server, InstanceInfo instanceInfo, SocketAddress serverAddr, NettyClientConnectionFactory connectionFactory, @@ -96,7 +96,7 @@ public PerServerConnectionPool( Timer connEstablishTimer, AtomicInteger connsInPool, AtomicInteger connsInUse) { - this.stats = stats; + this.server = server; this.instanceInfo = instanceInfo; // Note: child classes can sometimes connect to different addresses than this.serverAddr = Objects.requireNonNull(serverAddr, "serverAddr"); @@ -153,7 +153,7 @@ protected void removeIdleStateHandler(PooledConnection conn) { public Promise acquire( EventLoop eventLoop, CurrentPassport passport, AtomicReference selectedHostAddr) { requestConnCounter.increment(); - stats.incrementActiveRequestsCount(); + server.incrementActiveRequestsCount(); Promise promise = eventLoop.newPromise(); @@ -227,7 +227,7 @@ protected void tryMakingNewConnection( AtomicReference selectedHostAddr) { // Enforce MaxConnectionsPerHost config. int maxConnectionsPerHost = config.maxConnectionsPerHost(); - int openAndOpeningConnectionCount = stats.getOpenConnectionsCount() + connCreationsInProgress.get(); + int openAndOpeningConnectionCount = server.getOpenConnectionsCount() + connCreationsInProgress.get(); if (maxConnectionsPerHost != -1 && openAndOpeningConnectionCount >= maxConnectionsPerHost) { maxConnsPerHostExceededCounter.increment(); promise.setFailure(new OriginConnectException( @@ -288,16 +288,16 @@ protected void handleConnectCompletion( passport.add(PassportState.ORIGIN_CH_CONNECTED); - stats.incrementOpenConnectionsCount(); + server.incrementOpenConnectionsCount(); createConnSucceededCounter.increment(); connsInUse.incrementAndGet(); createConnection(cf, callerPromise, passport); } else { - stats.incrementSuccessiveConnectionFailureCount(); - stats.addToFailureCount(); - stats.decrementActiveRequestsCount(); + server.incrementSuccessiveConnectionFailureCount(); + server.addToFailureCount(); + server.decrementActiveRequestsCount(); createConnFailedCounter.increment(); callerPromise.setFailure(new OriginConnectException(cf.cause().getMessage(), OutboundErrorType.CONNECT_ERROR)); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java index cd0397ae..e55a4656 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java @@ -16,9 +16,8 @@ package com.netflix.zuul.netty.connectionpool; -import com.netflix.loadbalancer.Server; -import com.netflix.loadbalancer.ServerStats; import com.netflix.spectator.api.Counter; +import com.netflix.zuul.domain.OriginServer; import com.netflix.zuul.passport.CurrentPassport; import io.netty.channel.Channel; import io.netty.channel.ChannelFuture; @@ -38,10 +37,9 @@ public class PooledConnection { protected static final AttributeKey CHANNEL_ATTR = AttributeKey.newInstance("_pooled_connection"); public static final String READ_TIMEOUT_HANDLER_NAME = "readTimeoutHandler"; - private final Server server; + private final OriginServer server; private final Channel channel; private final ClientChannelManager channelManager; - private final ServerStats serverStats; private final long creationTS; private final Counter closeConnCounter; private final Counter closeWrtBusyConnCounter; @@ -70,15 +68,13 @@ public enum ConnectionState { private boolean shouldClose = false; private boolean released = false; - public PooledConnection(final Channel channel, final Server server, final ClientChannelManager channelManager, - final ServerStats serverStats, + public PooledConnection(final Channel channel, final OriginServer server, final ClientChannelManager channelManager, final Counter closeConnCounter, final Counter closeWrtBusyConnCounter) { this.channel = channel; this.server = server; this.channelManager = channelManager; - this.serverStats = serverStats; this.creationTS = System.currentTimeMillis(); this.closeConnCounter = closeConnCounter; this.closeWrtBusyConnCounter = closeWrtBusyConnCounter; @@ -109,7 +105,7 @@ public ConnectionPoolConfig getConfig() return this.channelManager.getConfig(); } - public Server getServer() + public OriginServer getServer() { return server; } @@ -136,17 +132,13 @@ public long getAgeInMillis() { return System.currentTimeMillis() - creationTS; } - public ServerStats getServerStats() { - return serverStats; - } - public void startRequestTimer() { reqStartTime = System.nanoTime(); } public long stopRequestTimer() { final long responseTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - reqStartTime); - serverStats.noteResponseTime(responseTime); + server.noteResponseTime(responseTime); return responseTime; } @@ -175,16 +167,14 @@ public void flagShouldClose() } public ChannelFuture close() { - final ServerStats stats = getServerStats(); - stats.decrementOpenConnectionsCount(); + server.decrementOpenConnectionsCount(); closeConnCounter.increment(); return channel.close(); } public void updateServerStats() { - final ServerStats stats = getServerStats(); - stats.decrementOpenConnectionsCount(); - stats.close(); + server.decrementOpenConnectionsCount(); + server.stopPublishingStats(); } public ChannelFuture closeAndRemoveFromPool() diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/RequestStat.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/RequestStat.java index 46f3dc66..79d6ed32 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/RequestStat.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/RequestStat.java @@ -16,7 +16,7 @@ package com.netflix.zuul.netty.connectionpool; -import com.netflix.loadbalancer.Server; +import com.netflix.zuul.domain.OriginServer; import com.netflix.zuul.context.SessionContext; import com.netflix.zuul.exception.ErrorType; @@ -41,7 +41,7 @@ static RequestStat getFromSessionContext(SessionContext context) return (RequestStat) context.get(SESSION_CONTEXT_KEY); } - RequestStat server(Server server); + RequestStat server(OriginServer server); boolean isFinished(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java index 493e1b7b..a18b9a86 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java +++ b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java @@ -24,8 +24,8 @@ import com.netflix.appinfo.InstanceInfo; import com.netflix.client.config.IClientConfig; import com.netflix.client.config.IClientConfigKey; -import com.netflix.loadbalancer.Server; import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; +import com.netflix.zuul.domain.OriginServer; import com.netflix.zuul.exception.OutboundException; import com.netflix.zuul.netty.connectionpool.OriginConnectException; import io.netty.handler.timeout.ReadTimeoutException; @@ -99,7 +99,7 @@ public RequestAttempt(int attemptNumber, InstanceInfo server, String targetVip, this.maxRetries = maxRetries; } - public RequestAttempt(final Server server, final IClientConfig clientConfig, int attemptNumber, int readTimeout) { + public RequestAttempt(final OriginServer server, final IClientConfig clientConfig, int attemptNumber, int readTimeout) { this.status = -1; this.attempt = attemptNumber; this.readTimeout = readTimeout; @@ -384,4 +384,4 @@ private static ObjectNode putNullableAttribute(ObjectNode node, String name, Str } return node; } -} \ No newline at end of file +} diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java index a708ef76..c68722c6 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java @@ -20,17 +20,15 @@ import static com.netflix.zuul.stats.status.ZuulStatusCategory.FAILURE_ORIGIN_THROTTLED; import static com.netflix.zuul.stats.status.ZuulStatusCategory.SUCCESS; -import com.google.common.base.Strings; import com.netflix.client.config.CommonClientConfigKey; import com.netflix.client.config.DefaultClientConfigImpl; import com.netflix.client.config.IClientConfig; import com.netflix.config.CachedDynamicBooleanProperty; import com.netflix.config.CachedDynamicIntProperty; -import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.reactive.ExecutionContext; -import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Registry; +import com.netflix.zuul.domain.OriginServer; import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.context.SessionContext; import com.netflix.zuul.exception.ErrorType; @@ -49,9 +47,9 @@ import io.netty.util.concurrent.Promise; import java.net.InetAddress; import java.util.Objects; +import java.util.Optional; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; -import javax.annotation.Nullable; /** * Netty Origin basic implementation that can be used for most apps, with the more complex methods having no-op @@ -121,7 +119,7 @@ public boolean isCold() { @Override public Promise connectToOrigin( HttpRequestMessage zuulReq, EventLoop eventLoop, int attemptNumber, CurrentPassport passport, - AtomicReference chosenServer, AtomicReference chosenHostAddr) { + AtomicReference chosenServer, AtomicReference chosenHostAddr) { return clientChannelManager.acquire(eventLoop, null, passport, chosenServer, chosenHostAddr); } @@ -130,22 +128,14 @@ public int getMaxRetriesForRequest(SessionContext context) { } @Override - public RequestAttempt newRequestAttempt(Server server, SessionContext zuulCtx, int attemptNum) { + public RequestAttempt newRequestAttempt(OriginServer server, SessionContext zuulCtx, int attemptNum) { return new RequestAttempt(server, config, attemptNum, config.get(CommonClientConfigKey.ReadTimeout)); } @Override - public String getIpAddrFromServer(Server server) { - if (server instanceof DiscoveryEnabledServer) { - DiscoveryEnabledServer discoveryServer = (DiscoveryEnabledServer) server; - if (discoveryServer.getInstanceInfo() != null) { - String ip = discoveryServer.getInstanceInfo().getIPAddr(); - if (!Strings.isNullOrEmpty(ip)) { - return ip; - } - } - } - return null; + public String getIpAddrFromServer(OriginServer originServer) { + final Optional ipAddr = originServer.ipAddr(); + return ipAddr.isPresent() ? ipAddr.get() : null; } @Override @@ -256,19 +246,19 @@ public void onRequestExecutionStart(HttpRequestMessage zuulReq) { } @Override - public void onRequestStartWithServer(HttpRequestMessage zuulReq, Server originServer, int attemptNum) { + public void onRequestStartWithServer(HttpRequestMessage zuulReq, OriginServer originServer, int attemptNum) { } @Override - public void onRequestExceptionWithServer(HttpRequestMessage zuulReq, Server originServer, int attemptNum, Throwable t) { + public void onRequestExceptionWithServer(HttpRequestMessage zuulReq, OriginServer originServer, int attemptNum, Throwable t) { } @Override - public void onRequestExecutionSuccess(HttpRequestMessage zuulReq, HttpResponseMessage zuulResp, Server originServer, int attemptNum) { + public void onRequestExecutionSuccess(HttpRequestMessage zuulReq, HttpResponseMessage zuulResp, OriginServer originServer, int attemptNum) { } @Override - public void onRequestExecutionFailed(HttpRequestMessage zuulReq, Server originServer, int attemptNum, Throwable t) { + public void onRequestExecutionFailed(HttpRequestMessage zuulReq, OriginServer originServer, int attemptNum, Throwable t) { } @Override diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java index b401c0dc..f082cc61 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java @@ -17,9 +17,9 @@ package com.netflix.zuul.origins; import com.netflix.client.config.IClientConfig; -import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.reactive.ExecutionContext; import com.netflix.spectator.api.Registry; +import com.netflix.zuul.domain.OriginServer; import com.netflix.zuul.context.SessionContext; import com.netflix.zuul.message.http.HttpRequestMessage; import com.netflix.zuul.message.http.HttpResponseMessage; @@ -42,31 +42,31 @@ public interface NettyOrigin extends InstrumentedOrigin { Promise connectToOrigin(final HttpRequestMessage zuulReq, EventLoop eventLoop, int attemptNumber, CurrentPassport passport, - AtomicReference chosenServer, + AtomicReference chosenServer, AtomicReference chosenHostAddr); int getMaxRetriesForRequest(SessionContext context); void onRequestExecutionStart(final HttpRequestMessage zuulReq); - void onRequestStartWithServer(final HttpRequestMessage zuulReq, final Server originServer, int attemptNum); + void onRequestStartWithServer(final HttpRequestMessage zuulReq, final OriginServer originServer, int attemptNum); - void onRequestExceptionWithServer(final HttpRequestMessage zuulReq, final Server originServer, + void onRequestExceptionWithServer(final HttpRequestMessage zuulReq, final OriginServer originServer, final int attemptNum, Throwable t); void onRequestExecutionSuccess(final HttpRequestMessage zuulReq, final HttpResponseMessage zuulResp, - final Server originServer, final int attemptNum); + final OriginServer originServer, final int attemptNum); - void onRequestExecutionFailed(final HttpRequestMessage zuulReq, final Server originServer, + void onRequestExecutionFailed(final HttpRequestMessage zuulReq, final OriginServer originServer, final int attemptNum, Throwable t); void recordFinalError(final HttpRequestMessage requestMsg, final Throwable throwable); void recordFinalResponse(final HttpResponseMessage resp); - RequestAttempt newRequestAttempt(final Server server, final SessionContext zuulCtx, int attemptNum); + RequestAttempt newRequestAttempt(final OriginServer server, final SessionContext zuulCtx, int attemptNum); - String getIpAddrFromServer(Server server); + String getIpAddrFromServer(OriginServer server); IClientConfig getClientConfig(); diff --git a/zuul-discovery/build.gradle b/zuul-discovery/build.gradle new file mode 100644 index 00000000..70c6eaa4 --- /dev/null +++ b/zuul-discovery/build.gradle @@ -0,0 +1,23 @@ +apply plugin: "java-library" + +dependencies { + + implementation "com.netflix.ribbon:ribbon-loadbalancer:${versions_ribbon}" + implementation "com.netflix.ribbon:ribbon-core:${versions_ribbon}" + implementation "com.netflix.ribbon:ribbon-eureka:${versions_ribbon}" + implementation "com.netflix.ribbon:ribbon-archaius:${versions_ribbon}" + + // Eureka + implementation "com.netflix.eureka:eureka-client:1.9.18" + + + testImplementation libraries.junit, + libraries.mockito, + libraries.truth +} + +test { + testLogging { + showStandardStreams = false + } +} diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/domain/OriginServer.java b/zuul-discovery/src/main/java/com/netflix/zuul/domain/OriginServer.java new file mode 100644 index 00000000..483f0e97 --- /dev/null +++ b/zuul-discovery/src/main/java/com/netflix/zuul/domain/OriginServer.java @@ -0,0 +1,129 @@ +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.domain; + +import com.netflix.appinfo.InstanceInfo; +import com.netflix.loadbalancer.ServerStats; +import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; +import java.util.Optional; + +/** + * @author Argha C + * @since 2/10/21 + */ +public final class OriginServer { + + private final DiscoveryEnabledServer server; + private final ServerStats serverStats; + + public OriginServer(DiscoveryEnabledServer server) { + this.server = server; + serverStats = new ServerStats(); + serverStats.initialize(server); + } + + public DiscoveryEnabledServer getServer() { + return server; + } + + public Optional ipAddr() { + if (server.getInstanceInfo() != null) { + String ip = server.getInstanceInfo().getIPAddr(); + if (ip != null && !ip.isEmpty()) { + return Optional.of(ip); + } + return Optional.empty(); + } + return Optional.empty(); + } + + public String getHost() { + return server.getHost(); + } + + public int getPort() { + return server.getPort(); + } + + public String getZone() { + return server.getZone(); + } + + public InstanceInfo getInstanceInfo() { + return server.getInstanceInfo(); + } + + public void noteResponseTime(double msecs) { + serverStats.noteResponseTime(msecs); + } + + public boolean isCircuitBreakerTripped() { + return serverStats.isCircuitBreakerTripped(); + } + + public void incrementActiveRequestsCount() { + serverStats.incrementActiveRequestsCount(); + } + + public void incrementOpenConnectionsCount() { + serverStats.incrementOpenConnectionsCount(); + } + + public void incrementSuccessiveConnectionFailureCount() { + serverStats.incrementSuccessiveConnectionFailureCount(); + } + + public void incrementNumRequests() { + serverStats.incrementNumRequests(); + } + + public int getOpenConnectionsCount() { + return serverStats.getOpenConnectionsCount(); + } + + public void decrementOpenConnectionsCount() { + serverStats.decrementOpenConnectionsCount(); + } + + public void decrementActiveRequestsCount() { + serverStats.decrementActiveRequestsCount(); + } + + public void clearSuccessiveConnectionFailureCount() { + serverStats.clearSuccessiveConnectionFailureCount(); + } + + public void addToFailureCount() { + serverStats.addToFailureCount(); + } + + public void stopPublishingStats() { + serverStats.close(); + } + + + @Override + public int hashCode() { + return super.hashCode(); + } + + @Override + public boolean equals(Object obj) { + return super.equals(obj); + } + +} From 96c56ef1bcfdfca06a6da5b4a59b2ff918364cce Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Wed, 24 Feb 2021 13:26:46 -0800 Subject: [PATCH 220/273] Remove all references to Server type --- .../DefaultClientChannelManager.java | 150 ++++-------------- .../PerServerConnectionPool.java | 7 +- .../com/netflix/zuul/niws/RequestAttempt.java | 28 ++-- .../DefaultClientChannelManagerTest.java | 136 +++++++--------- zuul-discovery/build.gradle | 3 + .../com/netflix/zuul/domain/OriginServer.java | 62 +++++++- .../com/netflix/zuul/domain/ServerPool.java | 82 ++++++++++ .../zuul/listeners/ResolverListener.java | 13 ++ .../com/netflix/zuul/misc/SimpleMetaInfo.java | 28 ++++ 9 files changed, 279 insertions(+), 230 deletions(-) create mode 100644 zuul-discovery/src/main/java/com/netflix/zuul/domain/ServerPool.java create mode 100644 zuul-discovery/src/main/java/com/netflix/zuul/listeners/ResolverListener.java create mode 100644 zuul-discovery/src/main/java/com/netflix/zuul/misc/SimpleMetaInfo.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java index e40a19c1..acb046c5 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java @@ -16,22 +16,17 @@ package com.netflix.zuul.netty.connectionpool; -import static com.netflix.client.config.CommonClientConfigKey.NFLoadBalancerClassName; - import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Throwables; import com.google.common.collect.Sets; import com.google.common.net.InetAddresses; -import com.netflix.appinfo.InstanceInfo; import com.netflix.client.config.IClientConfig; -import com.netflix.loadbalancer.DynamicServerListLoadBalancer; -import com.netflix.loadbalancer.LoadBalancerStats; -import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Registry; import com.netflix.spectator.api.histogram.PercentileTimer; import com.netflix.zuul.domain.OriginServer; +import com.netflix.zuul.domain.ServerPool; import com.netflix.zuul.exception.OutboundErrorType; +import com.netflix.zuul.listeners.ResolverListener; import com.netflix.zuul.netty.SpectatorUtils; import com.netflix.zuul.netty.insights.PassportStateHttpClientHandler; import com.netflix.zuul.netty.server.OriginResponseReceiver; @@ -69,7 +64,7 @@ public class DefaultClientChannelManager implements ClientChannelManager { public static final String METRIC_PREFIX = "connectionpool"; - private final DynamicServerListLoadBalancer loadBalancer; + private final ServerPool serverPool; private final ConnectionPoolConfig connPoolConfig; private final IClientConfig clientConfig; private final Registry spectatorRegistry; @@ -95,7 +90,7 @@ public class DefaultClientChannelManager implements ClientChannelManager { private final AtomicInteger connsInPool; private final AtomicInteger connsInUse; - private final ConcurrentHashMap perServerPools; + private final ConcurrentHashMap perServerPools; private NettyClientConnectionFactory clientConnFactory; private OriginChannelInitializer channelInitializer; @@ -105,7 +100,7 @@ public class DefaultClientChannelManager implements ClientChannelManager { public DefaultClientChannelManager( OriginName originName, IClientConfig clientConfig, Registry spectatorRegistry) { this.originName = Objects.requireNonNull(originName, "originName"); - this.loadBalancer = createLoadBalancer(clientConfig); + this.serverPool = new ServerPool(clientConfig, originName.getTarget(), new ServerPoolListener()); String metricId = originName.getMetricId(); @@ -113,9 +108,6 @@ public DefaultClientChannelManager( this.spectatorRegistry = spectatorRegistry; this.perServerPools = new ConcurrentHashMap<>(200); - // Setup a listener for Discovery serverlist changes. - this.loadBalancer.addServerListChangeListener(this::removeMissingServerConnectionPools); - this.connPoolConfig = new ConnectionPoolConfigImpl(originName, this.clientConfig); this.createNewConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_create", metricId); @@ -153,43 +145,6 @@ protected NettyClientConnectionFactory createNettyClientConnectionFactory(Connec return new NettyClientConnectionFactory(connPoolConfig, clientConnInitializer); } - protected DynamicServerListLoadBalancer createLoadBalancer(IClientConfig clientConfig) { - // Create and configure a loadbalancer for this vip. Use a hard coded string for the LB default name to avoid - // a dependency on Ribbon classes. - String loadBalancerClassName = - clientConfig.get(NFLoadBalancerClassName, "com.netflix.loadbalancer.ZoneAwareLoadBalancer"); - - DynamicServerListLoadBalancer lb; - try { - Class clazz = Class.forName(loadBalancerClassName); - lb = clazz.asSubclass(DynamicServerListLoadBalancer.class).getConstructor().newInstance(); - lb.initWithNiwsConfig(clientConfig); - } catch (Exception e) { - Throwables.throwIfUnchecked(e); - throw new IllegalStateException("Could not instantiate LoadBalancer " + loadBalancerClassName, e); - } - - return lb; - } - - protected void removeMissingServerConnectionPools(List oldList, List newList) { - Set oldSet = new HashSet<>(oldList); - Set newSet = new HashSet<>(newList); - Set removedSet = Sets.difference(oldSet, newSet); - - if (!removedSet.isEmpty()) { - LOG.debug("Removing connection pools for missing servers. name = " + originName - + ". " + removedSet.size() + " servers gone."); - - for (Server s : removedSet) { - IConnectionPool pool = perServerPools.remove(s); - if (pool != null) { - pool.shutdown(); - } - } - } - } - @Override public ConnectionPoolConfig getConfig() { return connPoolConfig; @@ -197,7 +152,7 @@ public ConnectionPoolConfig getConfig() { @Override public boolean isAvailable() { - return !loadBalancer.getReachableServers().isEmpty(); + return serverPool.hasServers(); } @Override @@ -214,7 +169,7 @@ public int getInflightRequestsCount() { public void shutdown() { this.shuttingDown = true; - loadBalancer.shutdown(); + serverPool.shutdown(); for (IConnectionPool pool : perServerPools.values()) { pool.shutdown(); @@ -339,7 +294,7 @@ public Promise acquire( } // Choose the next load-balanced server. - final Server chosenServer = loadBalancer.chooseServer(key); + final OriginServer chosenServer = serverPool.chooseServer(key); if (chosenServer == null) { Promise promise = eventLoop.newPromise(); promise.setFailure(new OriginConnectException("No servers available", OutboundErrorType.NO_AVAILABLE_SERVERS)); @@ -351,16 +306,11 @@ public Promise acquire( // Now get the connection-pool for this server. IConnectionPool pool = perServerPools.computeIfAbsent(chosenServer, s -> { SocketAddress finalServerAddr = pickAddress(chosenServer); - InstanceInfo instanceInfo = deriveInstanceInfoInternal(chosenServer); - // Get the stats from LB for this server. - LoadBalancerStats lbStats = loadBalancer.getLoadBalancerStats(); - ServerStats stats = lbStats.getSingleServerStat(chosenServer); - final ClientChannelManager clientChannelMgr = this; - PooledConnectionFactory pcf = createPooledConnectionFactory(chosenServer, stats, clientChannelMgr, closeConnCounter, closeWrtBusyConnCounter); + PooledConnectionFactory pcf = createPooledConnectionFactory(chosenServer, clientChannelMgr, closeConnCounter, closeWrtBusyConnCounter); // Create a new pool for this server. - return createConnectionPool(stats, instanceInfo, finalServerAddr, clientConnFactory, pcf, connPoolConfig, + return createConnectionPool(chosenServer, finalServerAddr, clientConnFactory, pcf, connPoolConfig, clientConfig, createNewConnCounter, createConnSucceededCounter, createConnFailedCounter, requestConnCounter, reuseConnCounter, connTakenFromPoolIsNotOpen, maxConnsPerHostExceededCounter, connEstablishTimer, connsInPool, connsInUse); @@ -376,7 +326,7 @@ protected PooledConnectionFactory createPooledConnectionFactory( } protected IConnectionPool createConnectionPool( - OriginServer originServer, InstanceInfo instanceInfo, SocketAddress serverAddr, + OriginServer originServer, SocketAddress serverAddr, NettyClientConnectionFactory clientConnFactory, PooledConnectionFactory pcf, ConnectionPoolConfig connPoolConfig, IClientConfig clientConfig, Counter createNewConnCounter, Counter createConnSucceededCounter, Counter createConnFailedCounter, Counter requestConnCounter, @@ -384,7 +334,6 @@ protected IConnectionPool createConnectionPool( PercentileTimer connEstablishTimer, AtomicInteger connsInPool, AtomicInteger connsInUse) { return new PerServerConnectionPool( originServer, - instanceInfo, serverAddr, clientConnFactory, pcf, @@ -403,6 +352,23 @@ protected IConnectionPool createConnectionPool( ); } + final class ServerPoolListener implements ResolverListener { + @Override + public void onChange(List removedSet) { + if (!removedSet.isEmpty()) { + LOG.debug("Removing connection pools for missing servers. name = " + originName + + ". " + removedSet.size() + " servers gone."); + for (OriginServer s : removedSet) { + IConnectionPool pool = perServerPools.remove(s); + if (pool != null) { + pool.shutdown(); + } + } + } + } + + } + @Override public int getConnsInPool() { return connsInPool.get(); @@ -414,70 +380,20 @@ public int getConnsInUse() { } // This is just used for information in the RestClient 'bridge'. - public DynamicServerListLoadBalancer getLoadBalancer() { - return this.loadBalancer; - } - - public IClientConfig getClientConfig() { - return this.loadBalancer.getClientConfig(); + public ServerPool getServerPool() { + return this.serverPool; } - protected ConcurrentHashMap getPerServerPools() { + protected ConcurrentHashMap getPerServerPools() { return perServerPools; } @VisibleForTesting - static InstanceInfo deriveInstanceInfoInternal(OriginServer chosenServer) { - if (chosenServer instanceof DiscoveryEnabledServer) { - DiscoveryEnabledServer discoveryServer = (DiscoveryEnabledServer) chosenServer; - return discoveryServer.getInstanceInfo(); - } else { - return new InstanceInfo( - /* instanceId= */ chosenServer.getId(), - /* appName= */ null, - /* appGroupName= */ null, - /* ipAddr= */ chosenServer.getHost(), - /* sid= */ chosenServer.getId(), - /* port= */ null, - /* securePort= */ null, - /* homePageUrl= */ null, - /* statusPageUrl= */ null, - /* healthCheckUrl= */ null, - /* secureHealthCheckUrl= */ null, - /* vipAddress= */ null, - /* secureVipAddress= */ null, - /* countryId= */ 0, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null); - } - } - - @VisibleForTesting - static SocketAddress pickAddressInternal(Server chosenServer, @Nullable OriginName originName) { + static SocketAddress pickAddressInternal(OriginServer chosenServer, @Nullable OriginName originName) { String rawHost; int port; - if (chosenServer instanceof DiscoveryEnabledServer) { - DiscoveryEnabledServer discoveryServer = (DiscoveryEnabledServer) chosenServer; - // Configuration for whether to use IP address or host has already been applied in the - // DiscoveryEnabledServer constructor. - rawHost = discoveryServer.getHost(); - port = discoveryServer.getPort(); - } else { - // create mock instance info for non-discovery instances rawHost = chosenServer.getHost(); port = chosenServer.getPort(); - } - InetSocketAddress serverAddr; try { InetAddress ipAddr = InetAddresses.forString(rawHost); @@ -502,7 +418,7 @@ static SocketAddress pickAddressInternal(Server chosenServer, @Nullable OriginNa /** * Given a server chosen from the load balancer, pick the appropriate address to connect to. */ - protected SocketAddress pickAddress(Server chosenServer) { + protected SocketAddress pickAddress(OriginServer chosenServer) { return pickAddressInternal(chosenServer, connPoolConfig.getOriginName()); } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java index 3a0779f8..cc909e70 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java @@ -54,7 +54,6 @@ public class PerServerConnectionPool implements IConnectionPool new ConcurrentHashMap<>(); private final OriginServer server; - private final InstanceInfo instanceInfo; private final SocketAddress serverAddr; private final NettyClientConnectionFactory connectionFactory; private final PooledConnectionFactory pooledConnectionFactory; @@ -81,7 +80,6 @@ public class PerServerConnectionPool implements IConnectionPool public PerServerConnectionPool( OriginServer server, - InstanceInfo instanceInfo, SocketAddress serverAddr, NettyClientConnectionFactory connectionFactory, PooledConnectionFactory pooledConnectionFactory, @@ -97,7 +95,6 @@ public PerServerConnectionPool( AtomicInteger connsInPool, AtomicInteger connsInUse) { this.server = server; - this.instanceInfo = instanceInfo; // Note: child classes can sometimes connect to different addresses than this.serverAddr = Objects.requireNonNull(serverAddr, "serverAddr"); this.connectionFactory = connectionFactory; @@ -236,7 +233,7 @@ protected void tryMakingNewConnection( LOG.warn("Unable to create new connection because at MaxConnectionsPerHost! " + "maxConnectionsPerHost=" + maxConnectionsPerHost + ", connectionsPerHost=" + openAndOpeningConnectionCount - + ", host=" + instanceInfo.getId() + + ", host=" + server.getServerId() + "origin=" + config.getOriginName() ); return; @@ -265,7 +262,7 @@ protected void tryMakingNewConnection( } LOG.warn("Error creating new connection! " + "origin=" + config.getOriginName() - + ", host=" + instanceInfo.getId() + + ", host=" + server.getServerId() ); } }); diff --git a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java index a18b9a86..1147281e 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java +++ b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java @@ -24,9 +24,9 @@ import com.netflix.appinfo.InstanceInfo; import com.netflix.client.config.IClientConfig; import com.netflix.client.config.IClientConfigKey; -import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; import com.netflix.zuul.domain.OriginServer; import com.netflix.zuul.exception.OutboundException; +import com.netflix.zuul.misc.SimpleMetaInfo; import com.netflix.zuul.netty.connectionpool.OriginConnectException; import io.netty.handler.timeout.ReadTimeoutException; @@ -109,26 +109,18 @@ public RequestAttempt(final OriginServer server, final IClientConfig clientConfi this.port = server.getPort(); this.availabilityZone = server.getZone(); - if (server instanceof DiscoveryEnabledServer) { - InstanceInfo instanceInfo = ((DiscoveryEnabledServer) server).getInstanceInfo(); - this.app = instanceInfo.getAppName().toLowerCase(); - this.asg = instanceInfo.getASGName(); - this.instanceId = instanceInfo.getInstanceId(); - this.host = instanceInfo.getHostName(); - this.port = instanceInfo.getPort(); + if (server.isDiscoveryEnabled()) { + this.app = server.getAppName().toLowerCase(); + this.asg = server.getASGName(); + this.instanceId = server.getServerId(); + this.host = server.getHost(); + this.port = server.getPort(); + this.vip = server.getVIP(); + this.availabilityZone = server.getAvailabilityZone(); - if (server.getPort() == instanceInfo.getSecurePort()) { - this.vip = instanceInfo.getSecureVipAddress(); - } - else { - this.vip = instanceInfo.getVIPAddress(); - } - if (instanceInfo.getDataCenterInfo() instanceof AmazonInfo) { - this.availabilityZone = ((AmazonInfo) instanceInfo.getDataCenterInfo()).getMetadata().get("availability-zone"); - } } else { - final Server.MetaInfo metaInfo = server.getMetaInfo(); + SimpleMetaInfo metaInfo = server.getMetaInfo(); if (metaInfo != null) { this.asg = metaInfo.getServerGroup(); this.vip = metaInfo.getServiceIdForDiscovery(); diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java index 90fdc1f9..58102bf5 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java @@ -17,15 +17,12 @@ package com.netflix.zuul.netty.connectionpool; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; - import com.google.common.net.InetAddresses; import com.google.common.truth.Truth; import com.netflix.appinfo.InstanceInfo; import com.netflix.appinfo.InstanceInfo.Builder; -import com.netflix.loadbalancer.Server; -import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; +import com.netflix.zuul.domain.OriginServer; import com.netflix.zuul.origins.OriginName; import java.net.InetSocketAddress; import java.net.SocketAddress; @@ -40,82 +37,57 @@ @RunWith(JUnit4.class) public class DefaultClientChannelManagerTest { - @Test - public void deriveInstanceInfoInternal_nonDiscovery() { - Server s = new Server("localhost", 443); - - InstanceInfo info = DefaultClientChannelManager.deriveInstanceInfoInternal(s); - - // Despite the port and ipaddr being obviously wrong, this is what the previous implementation did. - // TODO(carl-mastrangelo): find out the original reason why and fix this. - assertEquals(0, info.getPort()); - assertEquals("localhost", info.getIPAddr()); - - assertEquals("localhost:443", info.getId()); - assertEquals("localhost:443", info.getInstanceId()); - } - - @Test - public void deriveInstanceInfoInternal_discovery() { - InstanceInfo instanceInfo = Builder.newBuilder().setAppName("app").build(); - Server s = new DiscoveryEnabledServer(instanceInfo, true); - - InstanceInfo actual = DefaultClientChannelManager.deriveInstanceInfoInternal(s); - - assertSame(instanceInfo, actual); - } - - @Test - public void pickAddressInternal_discovery() { - InstanceInfo instanceInfo = - Builder.newBuilder().setAppName("app").setHostName("192.168.0.1").setPort(443).build(); - Server s = new DiscoveryEnabledServer(instanceInfo, true); - - SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); - - Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); - InetSocketAddress socketAddress = (InetSocketAddress) addr; - assertEquals(InetAddresses.forString("192.168.0.1"), socketAddress.getAddress()); - assertEquals(443, socketAddress.getPort()); - } - - @Test - public void pickAddressInternal_discovery_unresolved() { - InstanceInfo instanceInfo = - Builder.newBuilder().setAppName("app").setHostName("localhost").setPort(443).build(); - Server s = new DiscoveryEnabledServer(instanceInfo, true); - - SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); - - Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); - InetSocketAddress socketAddress = (InetSocketAddress) addr; - - assertTrue(socketAddress.toString(), socketAddress.getAddress().isLoopbackAddress()); - assertEquals(443, socketAddress.getPort()); - } - - @Test - public void pickAddressInternal_nonDiscovery() { - Server s = new Server("192.168.0.1", 443); - - SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); - - Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); - InetSocketAddress socketAddress = (InetSocketAddress) addr; - assertEquals(InetAddresses.forString("192.168.0.1"), socketAddress.getAddress()); - assertEquals(443, socketAddress.getPort()); - } - - @Test - public void pickAddressInternal_nonDiscovery_unresolved() { - Server s = new Server("localhost", 443); - - SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); - - Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); - InetSocketAddress socketAddress = (InetSocketAddress) addr; - - assertTrue(socketAddress.toString(), socketAddress.getAddress().isLoopbackAddress()); - assertEquals(443, socketAddress.getPort()); - } +// @Test +// public void pickAddressInternal_discovery() { +// InstanceInfo instanceInfo = +// Builder.newBuilder().setAppName("app").setHostName("192.168.0.1").setPort(443).build(); +// OriginServer s = new OriginServer(new DiscoveryEnabledServer(instanceInfo, true)); +// +// SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); +// +// Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); +// InetSocketAddress socketAddress = (InetSocketAddress) addr; +// assertEquals(InetAddresses.forString("192.168.0.1"), socketAddress.getAddress()); +// assertEquals(443, socketAddress.getPort()); +// } +// +// @Test +// public void pickAddressInternal_discovery_unresolved() { +// InstanceInfo instanceInfo = +// Builder.newBuilder().setAppName("app").setHostName("localhost").setPort(443).build(); +// OriginServer s = new OriginServer(new DiscoveryEnabledServer(instanceInfo, true)); +// +// SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); +// +// Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); +// InetSocketAddress socketAddress = (InetSocketAddress) addr; +// +// assertTrue(socketAddress.toString(), socketAddress.getAddress().isLoopbackAddress()); +// assertEquals(443, socketAddress.getPort()); +// } + +// @Test +// public void pickAddressInternal_nonDiscovery() { +// Server s = new Server("192.168.0.1", 443); +// +// SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); +// +// Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); +// InetSocketAddress socketAddress = (InetSocketAddress) addr; +// assertEquals(InetAddresses.forString("192.168.0.1"), socketAddress.getAddress()); +// assertEquals(443, socketAddress.getPort()); +// } +// +// @Test +// public void pickAddressInternal_nonDiscovery_unresolved() { +// Server s = new Server("localhost", 443); +// +// SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); +// +// Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); +// InetSocketAddress socketAddress = (InetSocketAddress) addr; +// +// assertTrue(socketAddress.toString(), socketAddress.getAddress().isLoopbackAddress()); +// assertEquals(443, socketAddress.getPort()); +// } } diff --git a/zuul-discovery/build.gradle b/zuul-discovery/build.gradle index 70c6eaa4..49617190 100644 --- a/zuul-discovery/build.gradle +++ b/zuul-discovery/build.gradle @@ -2,6 +2,9 @@ apply plugin: "java-library" dependencies { + implementation libraries.guava + implementation libraries.slf4j + implementation "com.netflix.ribbon:ribbon-loadbalancer:${versions_ribbon}" implementation "com.netflix.ribbon:ribbon-core:${versions_ribbon}" implementation "com.netflix.ribbon:ribbon-eureka:${versions_ribbon}" diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/domain/OriginServer.java b/zuul-discovery/src/main/java/com/netflix/zuul/domain/OriginServer.java index 483f0e97..7179c6fc 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/domain/OriginServer.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/domain/OriginServer.java @@ -16,10 +16,15 @@ package com.netflix.zuul.domain; +import com.netflix.appinfo.AmazonInfo; import com.netflix.appinfo.InstanceInfo; +import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.ServerStats; import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; +import com.netflix.zuul.misc.SimpleMetaInfo; +import java.util.Locale; import java.util.Optional; +import javax.annotation.Nullable; /** * @author Argha C @@ -36,10 +41,6 @@ public OriginServer(DiscoveryEnabledServer server) { serverStats.initialize(server); } - public DiscoveryEnabledServer getServer() { - return server; - } - public Optional ipAddr() { if (server.getInstanceInfo() != null) { String ip = server.getInstanceInfo().getIPAddr(); @@ -55,6 +56,32 @@ public String getHost() { return server.getHost(); } + public String getVIP() { + final InstanceInfo instanceInfo = server.getInstanceInfo(); + if (server.getPort() == instanceInfo.getSecurePort()) { + return instanceInfo.getSecureVipAddress(); + } else { + return instanceInfo.getVIPAddress(); + } + } + + public boolean isDiscoveryEnabled() { + return server instanceof DiscoveryEnabledServer; + } + + public SimpleMetaInfo getMetaInfo() { + return new SimpleMetaInfo(server.getMetaInfo()); + } + + @Nullable + public String getAvailabilityZone(){ + final InstanceInfo instanceInfo = server.getInstanceInfo(); + if (instanceInfo.getDataCenterInfo() instanceof AmazonInfo) { + return ((AmazonInfo) instanceInfo.getDataCenterInfo()).getMetadata().get("availability-zone"); + } + return null; + } + public int getPort() { return server.getPort(); } @@ -63,8 +90,16 @@ public String getZone() { return server.getZone(); } - public InstanceInfo getInstanceInfo() { - return server.getInstanceInfo(); + public String getServerId() { + return server.getInstanceInfo().getId(); + } + + public String getASGName() { + return server.getInstanceInfo().getASGName(); + } + + public String getAppName(){ + return server.getInstanceInfo().getAppName().toLowerCase(Locale.ROOT); } public void noteResponseTime(double msecs) { @@ -118,12 +153,23 @@ public void stopPublishingStats() { @Override public int hashCode() { - return super.hashCode(); + return server.hashCode(); } + + /** + * + * Two instances are deemed identical if they wrap the same underlying discovery server instance. + */ @Override public boolean equals(Object obj) { - return super.equals(obj); + if(obj == this) + return true; + + if (!(obj instanceof OriginServer)) + return false; + final OriginServer other = (OriginServer) obj; + return server.equals(other.server); } } diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/domain/ServerPool.java b/zuul-discovery/src/main/java/com/netflix/zuul/domain/ServerPool.java new file mode 100644 index 00000000..0e225248 --- /dev/null +++ b/zuul-discovery/src/main/java/com/netflix/zuul/domain/ServerPool.java @@ -0,0 +1,82 @@ +package com.netflix.zuul.domain; + +import static com.google.common.base.Preconditions.checkNotNull; +import static com.netflix.client.config.CommonClientConfigKey.NFLoadBalancerClassName; +import com.google.common.base.Throwables; +import com.google.common.collect.Sets; +import com.netflix.client.config.IClientConfig; +import com.netflix.loadbalancer.DynamicServerListLoadBalancer; +import com.netflix.loadbalancer.Server; +import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; +import com.netflix.zuul.listeners.ResolverListener; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +import javax.annotation.Nullable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @author Argha C + * @since 2/24/21 + */ +public class ServerPool { + + private final DynamicServerListLoadBalancer loadBalancer; + ResolverListener listener; + private final String originName; + private static final Logger log = LoggerFactory.getLogger(ServerPool.class); + + + public ServerPool(IClientConfig clientConfig, String originName, ResolverListener listener) { + this.loadBalancer = createLoadBalancer(clientConfig); + this.listener = listener; + this.loadBalancer.addServerListChangeListener(this::removeMissingServerConnectionPools); + this.originName = originName; + } + + private DynamicServerListLoadBalancer createLoadBalancer(IClientConfig clientConfig) { + // Create and configure a loadbalancer for this vip. Use a hard coded string for the LB default name to avoid + // a dependency on Ribbon classes. + String loadBalancerClassName = + clientConfig.get(NFLoadBalancerClassName, "com.netflix.loadbalancer.ZoneAwareLoadBalancer"); + + DynamicServerListLoadBalancer lb; + try { + Class clazz = Class.forName(loadBalancerClassName); + lb = clazz.asSubclass(DynamicServerListLoadBalancer.class).getConstructor().newInstance(); + lb.initWithNiwsConfig(clientConfig); + } catch (Exception e) { + Throwables.throwIfUnchecked(e); + throw new IllegalStateException("Could not instantiate LoadBalancer " + loadBalancerClassName, e); + } + + return lb; + } + + + private void removeMissingServerConnectionPools(List oldList, List newList) { + Set oldSet = new HashSet<>(oldList); + Set newSet = new HashSet<>(newList); + final List originServers = Sets.difference(oldSet, newSet).stream() + .map(server -> new OriginServer((DiscoveryEnabledServer) server)) + .collect(Collectors.toList()); + listener.onChange(originServers); + } + + public boolean hasServers() { + return !loadBalancer.getReachableServers().isEmpty(); + } + + public void shutdown() { + loadBalancer.shutdown(); + } + + public OriginServer chooseServer( @Nullable Object key) { + final Server server = loadBalancer.chooseServer(key); + checkNotNull(server, "Origin server returned by load balancer cannot be null"); + return new OriginServer((DiscoveryEnabledServer) server); + } + +} diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/listeners/ResolverListener.java b/zuul-discovery/src/main/java/com/netflix/zuul/listeners/ResolverListener.java new file mode 100644 index 00000000..5902e80e --- /dev/null +++ b/zuul-discovery/src/main/java/com/netflix/zuul/listeners/ResolverListener.java @@ -0,0 +1,13 @@ +package com.netflix.zuul.listeners; + +import java.util.List; + +/** + * @author Argha C + * @since 2/24/21 + */ +public interface ResolverListener { + + void onChange(List removedSet); + +} diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/misc/SimpleMetaInfo.java b/zuul-discovery/src/main/java/com/netflix/zuul/misc/SimpleMetaInfo.java new file mode 100644 index 00000000..f378ae30 --- /dev/null +++ b/zuul-discovery/src/main/java/com/netflix/zuul/misc/SimpleMetaInfo.java @@ -0,0 +1,28 @@ +package com.netflix.zuul.misc; + +import com.netflix.loadbalancer.Server.MetaInfo; + +/** + * @author Argha C + * @since 2/24/21 + */ +public class SimpleMetaInfo { + + private final MetaInfo metaInfo; + + public SimpleMetaInfo(MetaInfo metaInfo) { + this.metaInfo = metaInfo; + } + + public String getServerGroup() { + return metaInfo.getServerGroup(); + } + + public String getServiceIdForDiscovery() { + return metaInfo.getServiceIdForDiscovery(); + } + + public String getInstanceId() { + return metaInfo.getInstanceId(); + } +} From a404df4d26843b6bbfcb6ae98ef8374e35f9e56c Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Fri, 26 Feb 2021 09:47:10 -0800 Subject: [PATCH 221/273] remove a couple ribbon deps. Only thing blocking removal of ribbon-loadbalancer is ExecutionContext --- zuul-core/build.gradle | 8 ++-- .../com/netflix/zuul/util/ProxyUtilsTest.java | 45 ------------------- 2 files changed, 4 insertions(+), 49 deletions(-) delete mode 100644 zuul-core/src/test/java/com/netflix/zuul/util/ProxyUtilsTest.java diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index bd670ebf..cbf28607 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -17,11 +17,11 @@ dependencies { api project(":zuul-discovery") api "com.netflix.ribbon:ribbon-core:${versions_ribbon}" - api "com.netflix.ribbon:ribbon-httpclient:${versions_ribbon}" -// api "com.netflix.ribbon:ribbon-loadbalancer:${versions_ribbon}" - api "com.netflix.ribbon:ribbon-eureka:${versions_ribbon}" + //TODO(argha-c): the only remaining dep is ExecutionContext. Remove this once decoupled. + api "com.netflix.ribbon:ribbon-loadbalancer:${versions_ribbon}" api "com.netflix.ribbon:ribbon-archaius:${versions_ribbon}" -// // TODO(carl-mastrangelo): this is not actually needed, but it is pulling in API deps. Remove it. + + api "com.netflix.eureka:eureka-client:1.9.18" api "io.reactivex:rxjava:1.2.1" diff --git a/zuul-core/src/test/java/com/netflix/zuul/util/ProxyUtilsTest.java b/zuul-core/src/test/java/com/netflix/zuul/util/ProxyUtilsTest.java deleted file mode 100644 index 2fe77cc7..00000000 --- a/zuul-core/src/test/java/com/netflix/zuul/util/ProxyUtilsTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2019 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.zuul.util; - -import com.netflix.client.http.HttpResponse; -import com.netflix.zuul.message.http.HttpHeaderNames; -import com.netflix.zuul.message.http.HttpRequestMessage; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; - -/** - * Unit tests for {@link ProxyUtils}. - */ -@RunWith(MockitoJUnitRunner.class) -public class ProxyUtilsTest { - @Mock - HttpResponse proxyResp; - - @Mock - HttpRequestMessage request; - - @Test - public void testIsValidResponseHeader() { - Assert.assertTrue(ProxyUtils.isValidResponseHeader(HttpHeaderNames.get("test"))); - Assert.assertFalse(ProxyUtils.isValidResponseHeader(HttpHeaderNames.get("Keep-Alive"))); - Assert.assertFalse(ProxyUtils.isValidResponseHeader(HttpHeaderNames.get("keep-alive"))); - } -} From 4d598d20ca6bafea895c75b208753b9f33380381 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Fri, 26 Feb 2021 10:34:42 -0800 Subject: [PATCH 222/273] Make pretty. Make tests pass. --- .../zuul/filters/endpoint/ProxyEndpoint.java | 14 +- .../connectionpool/BasicRequestStat.java | 4 +- .../connectionpool/ClientChannelManager.java | 4 +- .../DefaultClientChannelManager.java | 55 ++++---- .../PerServerConnectionPool.java | 8 +- .../connectionpool/PooledConnection.java | 8 +- .../netty/connectionpool/RequestStat.java | 4 +- .../com/netflix/zuul/niws/RequestAttempt.java | 6 +- .../zuul/origins/BasicNettyOrigin.java | 18 +-- .../com/netflix/zuul/origins/NettyOrigin.java | 16 +-- .../DefaultClientChannelManagerTest.java | 128 +++++++++--------- .../DiscoveryResult.java} | 18 +-- .../zuul/discovery/DynamicServerResolver.java | 93 +++++++++++++ .../{misc => discovery}/SimpleMetaInfo.java | 4 +- .../com/netflix/zuul/domain/ServerPool.java | 82 ----------- .../zuul/listeners/ResolverListener.java | 13 -- .../com/netflix/zuul/resolver/Resolver.java | 13 ++ .../zuul/resolver/ResolverListener.java | 30 ++++ 18 files changed, 277 insertions(+), 241 deletions(-) rename zuul-discovery/src/main/java/com/netflix/zuul/{domain/OriginServer.java => discovery/DiscoveryResult.java} (92%) create mode 100644 zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java rename zuul-discovery/src/main/java/com/netflix/zuul/{misc => discovery}/SimpleMetaInfo.java (90%) delete mode 100644 zuul-discovery/src/main/java/com/netflix/zuul/domain/ServerPool.java delete mode 100644 zuul-discovery/src/main/java/com/netflix/zuul/listeners/ResolverListener.java create mode 100644 zuul-discovery/src/main/java/com/netflix/zuul/resolver/Resolver.java create mode 100644 zuul-discovery/src/main/java/com/netflix/zuul/resolver/ResolverListener.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 22a390d0..31a62a47 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -41,7 +41,7 @@ import com.netflix.loadbalancer.reactive.ExecutionContext; import com.netflix.spectator.api.Counter; import com.netflix.zuul.Filter; -import com.netflix.zuul.domain.OriginServer; +import com.netflix.zuul.discovery.DiscoveryResult; import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.context.Debug; import com.netflix.zuul.context.SessionContext; @@ -124,7 +124,7 @@ public class ProxyEndpoint extends SyncZuulFilterAdapter responseFilters; - protected final AtomicReference chosenServer; + protected final AtomicReference chosenServer; protected final AtomicReference chosenHostAddr; /* Individual request related state */ @@ -466,7 +466,7 @@ public void operationComplete(final Future connectResult) { methodBinding.bind(() -> { Integer readTimeout = null; - OriginServer server = chosenServer.get(); + DiscoveryResult server = chosenServer.get(); // The chosen server would be null if the loadbalancer found no available servers. if (server != null) { @@ -662,7 +662,7 @@ protected OriginResponseReceiver getOriginResponseReceiver() { return new OriginResponseReceiver(this); } - protected void preWriteToOrigin(OriginServer chosenServer, HttpRequestMessage zuulRequest) { + protected void preWriteToOrigin(DiscoveryResult chosenServer, HttpRequestMessage zuulRequest) { // override for custom metrics or processing } @@ -766,7 +766,7 @@ private void processErrorFromOrigin(final Throwable ex, final Channel origCh) { } } - protected void postErrorProcessing(Throwable ex, SessionContext zuulCtx, ErrorType err, OriginServer chosenServer, int attemptNum) { + protected void postErrorProcessing(Throwable ex, SessionContext zuulCtx, ErrorType err, DiscoveryResult chosenServer, int attemptNum) { // override for custom processing } @@ -839,7 +839,7 @@ private void processResponseFromOrigin(final HttpResponse originResponse) { } } - protected void handleOriginSuccessResponse(final HttpResponse originResponse, OriginServer chosenServer) { + protected void handleOriginSuccessResponse(final HttpResponse originResponse, DiscoveryResult chosenServer) { origin.recordSuccessResponse(); if (originConn != null) { originConn.getServer().clearSuccessiveConnectionFailureCount(); @@ -916,7 +916,7 @@ private HttpResponseMessage transformResponse(HttpResponseMessage resp) { return resp; } - protected void handleOriginNonSuccessResponse(final HttpResponse originResponse, OriginServer chosenServer) { + protected void handleOriginNonSuccessResponse(final HttpResponse originResponse, DiscoveryResult chosenServer) { final int respStatus = originResponse.status().code(); OutboundException obe; StatusCategory statusCategory; diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/BasicRequestStat.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/BasicRequestStat.java index 56e469e4..10d2b38f 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/BasicRequestStat.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/BasicRequestStat.java @@ -17,7 +17,7 @@ package com.netflix.zuul.netty.connectionpool; import com.google.common.base.Stopwatch; -import com.netflix.zuul.domain.OriginServer; +import com.netflix.zuul.discovery.DiscoveryResult; import com.netflix.zuul.exception.ErrorType; import com.netflix.zuul.exception.OutboundErrorType; @@ -38,7 +38,7 @@ public BasicRequestStat() { } @Override - public RequestStat server(OriginServer server) { + public RequestStat server(DiscoveryResult server) { return this; } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java index c45e9c6e..e188eef7 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientChannelManager.java @@ -17,7 +17,7 @@ package com.netflix.zuul.netty.connectionpool; -import com.netflix.zuul.domain.OriginServer; +import com.netflix.zuul.discovery.DiscoveryResult; import com.netflix.zuul.passport.CurrentPassport; import io.netty.channel.EventLoop; import io.netty.util.concurrent.Promise; @@ -48,7 +48,7 @@ Promise acquire( EventLoop eventLoop, Object key, CurrentPassport passport, - AtomicReference selectedServer, + AtomicReference selectedServer, AtomicReference selectedHostAddr); boolean isCold(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java index acb046c5..52a3197a 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java @@ -17,16 +17,15 @@ package com.netflix.zuul.netty.connectionpool; import com.google.common.annotations.VisibleForTesting; -import com.google.common.collect.Sets; import com.google.common.net.InetAddresses; import com.netflix.client.config.IClientConfig; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Registry; import com.netflix.spectator.api.histogram.PercentileTimer; -import com.netflix.zuul.domain.OriginServer; -import com.netflix.zuul.domain.ServerPool; +import com.netflix.zuul.discovery.DiscoveryResult; +import com.netflix.zuul.discovery.DynamicServerResolver; import com.netflix.zuul.exception.OutboundErrorType; -import com.netflix.zuul.listeners.ResolverListener; +import com.netflix.zuul.resolver.ResolverListener; import com.netflix.zuul.netty.SpectatorUtils; import com.netflix.zuul.netty.insights.PassportStateHttpClientHandler; import com.netflix.zuul.netty.server.OriginResponseReceiver; @@ -42,10 +41,8 @@ import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.SocketAddress; -import java.util.HashSet; import java.util.List; import java.util.Objects; -import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; @@ -64,7 +61,7 @@ public class DefaultClientChannelManager implements ClientChannelManager { public static final String METRIC_PREFIX = "connectionpool"; - private final ServerPool serverPool; + private final DynamicServerResolver dynamicServerResolver; private final ConnectionPoolConfig connPoolConfig; private final IClientConfig clientConfig; private final Registry spectatorRegistry; @@ -90,7 +87,7 @@ public class DefaultClientChannelManager implements ClientChannelManager { private final AtomicInteger connsInPool; private final AtomicInteger connsInUse; - private final ConcurrentHashMap perServerPools; + private final ConcurrentHashMap perServerPools; private NettyClientConnectionFactory clientConnFactory; private OriginChannelInitializer channelInitializer; @@ -100,7 +97,7 @@ public class DefaultClientChannelManager implements ClientChannelManager { public DefaultClientChannelManager( OriginName originName, IClientConfig clientConfig, Registry spectatorRegistry) { this.originName = Objects.requireNonNull(originName, "originName"); - this.serverPool = new ServerPool(clientConfig, originName.getTarget(), new ServerPoolListener()); + this.dynamicServerResolver = new DynamicServerResolver(clientConfig, new ServerPoolListener()); String metricId = originName.getMetricId(); @@ -152,7 +149,7 @@ public ConnectionPoolConfig getConfig() { @Override public boolean isAvailable() { - return serverPool.hasServers(); + return dynamicServerResolver.hasServers(); } @Override @@ -169,7 +166,7 @@ public int getInflightRequestsCount() { public void shutdown() { this.shuttingDown = true; - serverPool.shutdown(); + dynamicServerResolver.shutdown(); for (IConnectionPool pool : perServerPools.values()) { pool.shutdown(); @@ -183,9 +180,9 @@ public boolean release(final PooledConnection conn) { releaseConnCounter.increment(); connsInUse.decrementAndGet(); - final OriginServer originServer = conn.getServer(); - originServer.decrementActiveRequestsCount(); - originServer.incrementNumRequests(); + final DiscoveryResult discoveryResult = conn.getServer(); + discoveryResult.decrementActiveRequestsCount(); + discoveryResult.incrementNumRequests(); if (shuttingDown) { return false; @@ -201,7 +198,7 @@ public boolean release(final PooledConnection conn) { conn.setInPool(false); conn.close(); } - else if (originServer.isCircuitBreakerTripped()) { + else if (discoveryResult.isCircuitBreakerTripped()) { // Don't put conns for currently circuit-tripped servers back into the pool. conn.setInPool(false); conn.close(); @@ -217,7 +214,7 @@ else if (!conn.isActive()) { releaseHandlers(conn); // Attempt to return connection to the pool. - IConnectionPool pool = perServerPools.get(originServer); + IConnectionPool pool = perServerPools.get(discoveryResult); if (pool != null) { released = pool.release(conn); } @@ -284,7 +281,7 @@ public Promise acquire( EventLoop eventLoop, @Nullable Object key, CurrentPassport passport, - AtomicReference selectedServer, + AtomicReference selectedServer, AtomicReference selectedHostAddr) { if (shuttingDown) { @@ -294,7 +291,7 @@ public Promise acquire( } // Choose the next load-balanced server. - final OriginServer chosenServer = serverPool.chooseServer(key); + final DiscoveryResult chosenServer = dynamicServerResolver.resolve(key); if (chosenServer == null) { Promise promise = eventLoop.newPromise(); promise.setFailure(new OriginConnectException("No servers available", OutboundErrorType.NO_AVAILABLE_SERVERS)); @@ -320,20 +317,20 @@ public Promise acquire( } protected PooledConnectionFactory createPooledConnectionFactory( - OriginServer chosenServer, ClientChannelManager clientChannelMgr, Counter closeConnCounter, + DiscoveryResult chosenServer, ClientChannelManager clientChannelMgr, Counter closeConnCounter, Counter closeWrtBusyConnCounter) { return ch -> new PooledConnection(ch, chosenServer, clientChannelMgr, closeConnCounter, closeWrtBusyConnCounter); } protected IConnectionPool createConnectionPool( - OriginServer originServer, SocketAddress serverAddr, + DiscoveryResult discoveryResult, SocketAddress serverAddr, NettyClientConnectionFactory clientConnFactory, PooledConnectionFactory pcf, ConnectionPoolConfig connPoolConfig, IClientConfig clientConfig, Counter createNewConnCounter, Counter createConnSucceededCounter, Counter createConnFailedCounter, Counter requestConnCounter, Counter reuseConnCounter, Counter connTakenFromPoolIsNotOpen, Counter maxConnsPerHostExceededCounter, PercentileTimer connEstablishTimer, AtomicInteger connsInPool, AtomicInteger connsInUse) { return new PerServerConnectionPool( - originServer, + discoveryResult, serverAddr, clientConnFactory, pcf, @@ -352,13 +349,13 @@ protected IConnectionPool createConnectionPool( ); } - final class ServerPoolListener implements ResolverListener { + final class ServerPoolListener implements ResolverListener { @Override - public void onChange(List removedSet) { + public void onChange(List removedSet) { if (!removedSet.isEmpty()) { LOG.debug("Removing connection pools for missing servers. name = " + originName + ". " + removedSet.size() + " servers gone."); - for (OriginServer s : removedSet) { + for (DiscoveryResult s : removedSet) { IConnectionPool pool = perServerPools.remove(s); if (pool != null) { pool.shutdown(); @@ -380,16 +377,16 @@ public int getConnsInUse() { } // This is just used for information in the RestClient 'bridge'. - public ServerPool getServerPool() { - return this.serverPool; + public DynamicServerResolver getServerPool() { + return this.dynamicServerResolver; } - protected ConcurrentHashMap getPerServerPools() { + protected ConcurrentHashMap getPerServerPools() { return perServerPools; } @VisibleForTesting - static SocketAddress pickAddressInternal(OriginServer chosenServer, @Nullable OriginName originName) { + static SocketAddress pickAddressInternal(DiscoveryResult chosenServer, @Nullable OriginName originName) { String rawHost; int port; rawHost = chosenServer.getHost(); @@ -418,7 +415,7 @@ static SocketAddress pickAddressInternal(OriginServer chosenServer, @Nullable Or /** * Given a server chosen from the load balancer, pick the appropriate address to connect to. */ - protected SocketAddress pickAddress(OriginServer chosenServer) { + protected SocketAddress pickAddress(DiscoveryResult chosenServer) { return pickAddressInternal(chosenServer, connPoolConfig.getOriginName()); } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java index cc909e70..420fca3a 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java @@ -16,11 +16,10 @@ package com.netflix.zuul.netty.connectionpool; -import com.netflix.appinfo.InstanceInfo; import com.netflix.client.config.IClientConfig; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Timer; -import com.netflix.zuul.domain.OriginServer; +import com.netflix.zuul.discovery.DiscoveryResult; import com.netflix.zuul.exception.OutboundErrorType; import com.netflix.zuul.passport.CurrentPassport; import com.netflix.zuul.passport.PassportState; @@ -34,7 +33,6 @@ import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedDeque; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import javax.annotation.Nullable; @@ -53,7 +51,7 @@ public class PerServerConnectionPool implements IConnectionPool private final ConcurrentHashMap> connectionsPerEventLoop = new ConcurrentHashMap<>(); - private final OriginServer server; + private final DiscoveryResult server; private final SocketAddress serverAddr; private final NettyClientConnectionFactory connectionFactory; private final PooledConnectionFactory pooledConnectionFactory; @@ -79,7 +77,7 @@ public class PerServerConnectionPool implements IConnectionPool private final AtomicInteger connCreationsInProgress; public PerServerConnectionPool( - OriginServer server, + DiscoveryResult server, SocketAddress serverAddr, NettyClientConnectionFactory connectionFactory, PooledConnectionFactory pooledConnectionFactory, diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java index e55a4656..88637ad4 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java @@ -17,7 +17,7 @@ package com.netflix.zuul.netty.connectionpool; import com.netflix.spectator.api.Counter; -import com.netflix.zuul.domain.OriginServer; +import com.netflix.zuul.discovery.DiscoveryResult; import com.netflix.zuul.passport.CurrentPassport; import io.netty.channel.Channel; import io.netty.channel.ChannelFuture; @@ -37,7 +37,7 @@ public class PooledConnection { protected static final AttributeKey CHANNEL_ATTR = AttributeKey.newInstance("_pooled_connection"); public static final String READ_TIMEOUT_HANDLER_NAME = "readTimeoutHandler"; - private final OriginServer server; + private final DiscoveryResult server; private final Channel channel; private final ClientChannelManager channelManager; private final long creationTS; @@ -68,7 +68,7 @@ public enum ConnectionState { private boolean shouldClose = false; private boolean released = false; - public PooledConnection(final Channel channel, final OriginServer server, final ClientChannelManager channelManager, + public PooledConnection(final Channel channel, final DiscoveryResult server, final ClientChannelManager channelManager, final Counter closeConnCounter, final Counter closeWrtBusyConnCounter) { @@ -105,7 +105,7 @@ public ConnectionPoolConfig getConfig() return this.channelManager.getConfig(); } - public OriginServer getServer() + public DiscoveryResult getServer() { return server; } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/RequestStat.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/RequestStat.java index 79d6ed32..d9d64d66 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/RequestStat.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/RequestStat.java @@ -16,7 +16,7 @@ package com.netflix.zuul.netty.connectionpool; -import com.netflix.zuul.domain.OriginServer; +import com.netflix.zuul.discovery.DiscoveryResult; import com.netflix.zuul.context.SessionContext; import com.netflix.zuul.exception.ErrorType; @@ -41,7 +41,7 @@ static RequestStat getFromSessionContext(SessionContext context) return (RequestStat) context.get(SESSION_CONTEXT_KEY); } - RequestStat server(OriginServer server); + RequestStat server(DiscoveryResult server); boolean isFinished(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java index 1147281e..03988076 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java +++ b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java @@ -24,9 +24,9 @@ import com.netflix.appinfo.InstanceInfo; import com.netflix.client.config.IClientConfig; import com.netflix.client.config.IClientConfigKey; -import com.netflix.zuul.domain.OriginServer; +import com.netflix.zuul.discovery.DiscoveryResult; import com.netflix.zuul.exception.OutboundException; -import com.netflix.zuul.misc.SimpleMetaInfo; +import com.netflix.zuul.discovery.SimpleMetaInfo; import com.netflix.zuul.netty.connectionpool.OriginConnectException; import io.netty.handler.timeout.ReadTimeoutException; @@ -99,7 +99,7 @@ public RequestAttempt(int attemptNumber, InstanceInfo server, String targetVip, this.maxRetries = maxRetries; } - public RequestAttempt(final OriginServer server, final IClientConfig clientConfig, int attemptNumber, int readTimeout) { + public RequestAttempt(final DiscoveryResult server, final IClientConfig clientConfig, int attemptNumber, int readTimeout) { this.status = -1; this.attempt = attemptNumber; this.readTimeout = readTimeout; diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java index c68722c6..313f79aa 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java @@ -28,7 +28,7 @@ import com.netflix.loadbalancer.reactive.ExecutionContext; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Registry; -import com.netflix.zuul.domain.OriginServer; +import com.netflix.zuul.discovery.DiscoveryResult; import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.context.SessionContext; import com.netflix.zuul.exception.ErrorType; @@ -119,7 +119,7 @@ public boolean isCold() { @Override public Promise connectToOrigin( HttpRequestMessage zuulReq, EventLoop eventLoop, int attemptNumber, CurrentPassport passport, - AtomicReference chosenServer, AtomicReference chosenHostAddr) { + AtomicReference chosenServer, AtomicReference chosenHostAddr) { return clientChannelManager.acquire(eventLoop, null, passport, chosenServer, chosenHostAddr); } @@ -128,13 +128,13 @@ public int getMaxRetriesForRequest(SessionContext context) { } @Override - public RequestAttempt newRequestAttempt(OriginServer server, SessionContext zuulCtx, int attemptNum) { + public RequestAttempt newRequestAttempt(DiscoveryResult server, SessionContext zuulCtx, int attemptNum) { return new RequestAttempt(server, config, attemptNum, config.get(CommonClientConfigKey.ReadTimeout)); } @Override - public String getIpAddrFromServer(OriginServer originServer) { - final Optional ipAddr = originServer.ipAddr(); + public String getIpAddrFromServer(DiscoveryResult discoveryResult) { + final Optional ipAddr = discoveryResult.ipAddr(); return ipAddr.isPresent() ? ipAddr.get() : null; } @@ -246,19 +246,19 @@ public void onRequestExecutionStart(HttpRequestMessage zuulReq) { } @Override - public void onRequestStartWithServer(HttpRequestMessage zuulReq, OriginServer originServer, int attemptNum) { + public void onRequestStartWithServer(HttpRequestMessage zuulReq, DiscoveryResult discoveryResult, int attemptNum) { } @Override - public void onRequestExceptionWithServer(HttpRequestMessage zuulReq, OriginServer originServer, int attemptNum, Throwable t) { + public void onRequestExceptionWithServer(HttpRequestMessage zuulReq, DiscoveryResult discoveryResult, int attemptNum, Throwable t) { } @Override - public void onRequestExecutionSuccess(HttpRequestMessage zuulReq, HttpResponseMessage zuulResp, OriginServer originServer, int attemptNum) { + public void onRequestExecutionSuccess(HttpRequestMessage zuulReq, HttpResponseMessage zuulResp, DiscoveryResult discoveryResult, int attemptNum) { } @Override - public void onRequestExecutionFailed(HttpRequestMessage zuulReq, OriginServer originServer, int attemptNum, Throwable t) { + public void onRequestExecutionFailed(HttpRequestMessage zuulReq, DiscoveryResult discoveryResult, int attemptNum, Throwable t) { } @Override diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java index f082cc61..06efc843 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java @@ -19,7 +19,7 @@ import com.netflix.client.config.IClientConfig; import com.netflix.loadbalancer.reactive.ExecutionContext; import com.netflix.spectator.api.Registry; -import com.netflix.zuul.domain.OriginServer; +import com.netflix.zuul.discovery.DiscoveryResult; import com.netflix.zuul.context.SessionContext; import com.netflix.zuul.message.http.HttpRequestMessage; import com.netflix.zuul.message.http.HttpResponseMessage; @@ -42,31 +42,31 @@ public interface NettyOrigin extends InstrumentedOrigin { Promise connectToOrigin(final HttpRequestMessage zuulReq, EventLoop eventLoop, int attemptNumber, CurrentPassport passport, - AtomicReference chosenServer, + AtomicReference chosenServer, AtomicReference chosenHostAddr); int getMaxRetriesForRequest(SessionContext context); void onRequestExecutionStart(final HttpRequestMessage zuulReq); - void onRequestStartWithServer(final HttpRequestMessage zuulReq, final OriginServer originServer, int attemptNum); + void onRequestStartWithServer(final HttpRequestMessage zuulReq, final DiscoveryResult discoveryResult, int attemptNum); - void onRequestExceptionWithServer(final HttpRequestMessage zuulReq, final OriginServer originServer, + void onRequestExceptionWithServer(final HttpRequestMessage zuulReq, final DiscoveryResult discoveryResult, final int attemptNum, Throwable t); void onRequestExecutionSuccess(final HttpRequestMessage zuulReq, final HttpResponseMessage zuulResp, - final OriginServer originServer, final int attemptNum); + final DiscoveryResult discoveryResult, final int attemptNum); - void onRequestExecutionFailed(final HttpRequestMessage zuulReq, final OriginServer originServer, + void onRequestExecutionFailed(final HttpRequestMessage zuulReq, final DiscoveryResult discoveryResult, final int attemptNum, Throwable t); void recordFinalError(final HttpRequestMessage requestMsg, final Throwable throwable); void recordFinalResponse(final HttpResponseMessage resp); - RequestAttempt newRequestAttempt(final OriginServer server, final SessionContext zuulCtx, int attemptNum); + RequestAttempt newRequestAttempt(final DiscoveryResult server, final SessionContext zuulCtx, int attemptNum); - String getIpAddrFromServer(OriginServer server); + String getIpAddrFromServer(DiscoveryResult server); IClientConfig getClientConfig(); diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java index 58102bf5..09099a36 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java @@ -1,42 +1,42 @@ -/* - * Copyright 2020 Netflix, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.netflix.zuul.netty.connectionpool; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import com.google.common.net.InetAddresses; -import com.google.common.truth.Truth; -import com.netflix.appinfo.InstanceInfo; -import com.netflix.appinfo.InstanceInfo.Builder; -import com.netflix.zuul.domain.OriginServer; -import com.netflix.zuul.origins.OriginName; -import java.net.InetSocketAddress; -import java.net.SocketAddress; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -/** - * Tests for {@link DefaultClientChannelManager}. These tests don't use IPv6 addresses because {@link InstanceInfo} - * is not capable of expressing them. - */ -@RunWith(JUnit4.class) -public class DefaultClientChannelManagerTest { - +///* +// * Copyright 2020 Netflix, Inc. +// * +// * Licensed under the Apache License, Version 2.0 (the "License"); +// * you may not use this file except in compliance with the License. +// * You may obtain a copy of the License at +// * +// * http://www.apache.org/licenses/LICENSE-2.0 +// * +// * Unless required by applicable law or agreed to in writing, software +// * distributed under the License is distributed on an "AS IS" BASIS, +// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// * See the License for the specific language governing permissions and +// * limitations under the License. +// */ +// +//package com.netflix.zuul.netty.connectionpool; +// +//import static org.junit.Assert.assertEquals; +//import static org.junit.Assert.assertTrue; +//import com.google.common.net.InetAddresses; +//import com.google.common.truth.Truth; +//import com.netflix.appinfo.InstanceInfo; +//import com.netflix.appinfo.InstanceInfo.Builder; +//import com.netflix.zuul.domain.OriginServer; +//import com.netflix.zuul.origins.OriginName; +//import java.net.InetSocketAddress; +//import java.net.SocketAddress; +//import org.junit.Test; +//import org.junit.runner.RunWith; +//import org.junit.runners.JUnit4; +// +///** +// * Tests for {@link DefaultClientChannelManager}. These tests don't use IPv6 addresses because {@link InstanceInfo} +// * is not capable of expressing them. +// */ +//@RunWith(JUnit4.class) +//public class DefaultClientChannelManagerTest { +// // @Test // public void pickAddressInternal_discovery() { // InstanceInfo instanceInfo = @@ -65,29 +65,29 @@ public class DefaultClientChannelManagerTest { // assertTrue(socketAddress.toString(), socketAddress.getAddress().isLoopbackAddress()); // assertEquals(443, socketAddress.getPort()); // } - -// @Test -// public void pickAddressInternal_nonDiscovery() { -// Server s = new Server("192.168.0.1", 443); -// -// SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); // -// Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); -// InetSocketAddress socketAddress = (InetSocketAddress) addr; -// assertEquals(InetAddresses.forString("192.168.0.1"), socketAddress.getAddress()); -// assertEquals(443, socketAddress.getPort()); -// } -// -// @Test -// public void pickAddressInternal_nonDiscovery_unresolved() { -// Server s = new Server("localhost", 443); -// -// SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); -// -// Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); -// InetSocketAddress socketAddress = (InetSocketAddress) addr; -// -// assertTrue(socketAddress.toString(), socketAddress.getAddress().isLoopbackAddress()); -// assertEquals(443, socketAddress.getPort()); -// } -} +//// @Test +//// public void pickAddressInternal_nonDiscovery() { +//// Server s = new Server("192.168.0.1", 443); +//// +//// SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); +//// +//// Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); +//// InetSocketAddress socketAddress = (InetSocketAddress) addr; +//// assertEquals(InetAddresses.forString("192.168.0.1"), socketAddress.getAddress()); +//// assertEquals(443, socketAddress.getPort()); +//// } +//// +//// @Test +//// public void pickAddressInternal_nonDiscovery_unresolved() { +//// Server s = new Server("localhost", 443); +//// +//// SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); +//// +//// Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); +//// InetSocketAddress socketAddress = (InetSocketAddress) addr; +//// +//// assertTrue(socketAddress.toString(), socketAddress.getAddress().isLoopbackAddress()); +//// assertEquals(443, socketAddress.getPort()); +//// } +//} diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/domain/OriginServer.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java similarity index 92% rename from zuul-discovery/src/main/java/com/netflix/zuul/domain/OriginServer.java rename to zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java index 7179c6fc..46cca2aa 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/domain/OriginServer.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Netflix, Inc. + * Copyright 2021 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,28 +14,28 @@ * limitations under the License. */ -package com.netflix.zuul.domain; +package com.netflix.zuul.discovery; import com.netflix.appinfo.AmazonInfo; import com.netflix.appinfo.InstanceInfo; -import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.ServerStats; import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; -import com.netflix.zuul.misc.SimpleMetaInfo; import java.util.Locale; import java.util.Optional; import javax.annotation.Nullable; /** * @author Argha C - * @since 2/10/21 + * @since 2/25/21 + * + * Wraps a discovery enabled server, and stats related to it. */ -public final class OriginServer { +public final class DiscoveryResult { private final DiscoveryEnabledServer server; private final ServerStats serverStats; - public OriginServer(DiscoveryEnabledServer server) { + public DiscoveryResult(DiscoveryEnabledServer server) { this.server = server; serverStats = new ServerStats(); serverStats.initialize(server); @@ -166,9 +166,9 @@ public boolean equals(Object obj) { if(obj == this) return true; - if (!(obj instanceof OriginServer)) + if (!(obj instanceof DiscoveryResult)) return false; - final OriginServer other = (OriginServer) obj; + final DiscoveryResult other = (DiscoveryResult) obj; return server.equals(other.server); } diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java new file mode 100644 index 00000000..ab13ee28 --- /dev/null +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java @@ -0,0 +1,93 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.discovery; + +import static com.netflix.client.config.CommonClientConfigKey.NFLoadBalancerClassName; +import com.google.common.base.Throwables; +import com.google.common.collect.Sets; +import com.netflix.client.config.IClientConfig; +import com.netflix.loadbalancer.DynamicServerListLoadBalancer; +import com.netflix.loadbalancer.Server; +import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; +import com.netflix.zuul.resolver.Resolver; +import com.netflix.zuul.resolver.ResolverListener; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +import javax.annotation.Nullable; + +/** + * @author Argha C + * @since 2/25/21 + * + * Implements a resolver, wrapping a ribbon load-balancer. + */ +public class DynamicServerResolver implements Resolver { + + private final DynamicServerListLoadBalancer loadBalancer; + ResolverListener listener; + + public DynamicServerResolver(IClientConfig clientConfig, ResolverListener listener) { + this.loadBalancer = createLoadBalancer(clientConfig); + this.loadBalancer.addServerListChangeListener(this::onUpdate); + this.listener = listener; + } + + @Override + public DiscoveryResult resolve(@Nullable Object key) { + final Server server = loadBalancer.chooseServer(key); + return new DiscoveryResult((DiscoveryEnabledServer) server); + } + + public boolean hasServers() { + return !loadBalancer.getReachableServers().isEmpty(); + } + + public void shutdown() { + loadBalancer.shutdown(); + } + + private DynamicServerListLoadBalancer createLoadBalancer(IClientConfig clientConfig) { + //TODO(argha-c): Revisit this style of LB initialization post modularization. Ideally the LB should be pluggable. + + // Use a hard coded string for the LB default name to avoid a dependency on Ribbon classes. + String loadBalancerClassName = + clientConfig.get(NFLoadBalancerClassName, "com.netflix.loadbalancer.ZoneAwareLoadBalancer"); + + DynamicServerListLoadBalancer lb; + try { + Class clazz = Class.forName(loadBalancerClassName); + lb = clazz.asSubclass(DynamicServerListLoadBalancer.class).getConstructor().newInstance(); + lb.initWithNiwsConfig(clientConfig); + } catch (Exception e) { + Throwables.throwIfUnchecked(e); + throw new IllegalStateException("Could not instantiate LoadBalancer " + loadBalancerClassName, e); + } + + return lb; + } + + private void onUpdate(List oldList, List newList) { + Set oldSet = new HashSet<>(oldList); + Set newSet = new HashSet<>(newList); + final List discoveryResults = Sets.difference(oldSet, newSet).stream() + .map(server -> new DiscoveryResult((DiscoveryEnabledServer) server)) + .collect(Collectors.toList()); + listener.onChange(discoveryResults); + } +} diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/misc/SimpleMetaInfo.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/SimpleMetaInfo.java similarity index 90% rename from zuul-discovery/src/main/java/com/netflix/zuul/misc/SimpleMetaInfo.java rename to zuul-discovery/src/main/java/com/netflix/zuul/discovery/SimpleMetaInfo.java index f378ae30..fd3af031 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/misc/SimpleMetaInfo.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/SimpleMetaInfo.java @@ -1,10 +1,10 @@ -package com.netflix.zuul.misc; +package com.netflix.zuul.discovery; import com.netflix.loadbalancer.Server.MetaInfo; /** * @author Argha C - * @since 2/24/21 + * @since 2/25/21 */ public class SimpleMetaInfo { diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/domain/ServerPool.java b/zuul-discovery/src/main/java/com/netflix/zuul/domain/ServerPool.java deleted file mode 100644 index 0e225248..00000000 --- a/zuul-discovery/src/main/java/com/netflix/zuul/domain/ServerPool.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.netflix.zuul.domain; - -import static com.google.common.base.Preconditions.checkNotNull; -import static com.netflix.client.config.CommonClientConfigKey.NFLoadBalancerClassName; -import com.google.common.base.Throwables; -import com.google.common.collect.Sets; -import com.netflix.client.config.IClientConfig; -import com.netflix.loadbalancer.DynamicServerListLoadBalancer; -import com.netflix.loadbalancer.Server; -import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; -import com.netflix.zuul.listeners.ResolverListener; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; -import javax.annotation.Nullable; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * @author Argha C - * @since 2/24/21 - */ -public class ServerPool { - - private final DynamicServerListLoadBalancer loadBalancer; - ResolverListener listener; - private final String originName; - private static final Logger log = LoggerFactory.getLogger(ServerPool.class); - - - public ServerPool(IClientConfig clientConfig, String originName, ResolverListener listener) { - this.loadBalancer = createLoadBalancer(clientConfig); - this.listener = listener; - this.loadBalancer.addServerListChangeListener(this::removeMissingServerConnectionPools); - this.originName = originName; - } - - private DynamicServerListLoadBalancer createLoadBalancer(IClientConfig clientConfig) { - // Create and configure a loadbalancer for this vip. Use a hard coded string for the LB default name to avoid - // a dependency on Ribbon classes. - String loadBalancerClassName = - clientConfig.get(NFLoadBalancerClassName, "com.netflix.loadbalancer.ZoneAwareLoadBalancer"); - - DynamicServerListLoadBalancer lb; - try { - Class clazz = Class.forName(loadBalancerClassName); - lb = clazz.asSubclass(DynamicServerListLoadBalancer.class).getConstructor().newInstance(); - lb.initWithNiwsConfig(clientConfig); - } catch (Exception e) { - Throwables.throwIfUnchecked(e); - throw new IllegalStateException("Could not instantiate LoadBalancer " + loadBalancerClassName, e); - } - - return lb; - } - - - private void removeMissingServerConnectionPools(List oldList, List newList) { - Set oldSet = new HashSet<>(oldList); - Set newSet = new HashSet<>(newList); - final List originServers = Sets.difference(oldSet, newSet).stream() - .map(server -> new OriginServer((DiscoveryEnabledServer) server)) - .collect(Collectors.toList()); - listener.onChange(originServers); - } - - public boolean hasServers() { - return !loadBalancer.getReachableServers().isEmpty(); - } - - public void shutdown() { - loadBalancer.shutdown(); - } - - public OriginServer chooseServer( @Nullable Object key) { - final Server server = loadBalancer.chooseServer(key); - checkNotNull(server, "Origin server returned by load balancer cannot be null"); - return new OriginServer((DiscoveryEnabledServer) server); - } - -} diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/listeners/ResolverListener.java b/zuul-discovery/src/main/java/com/netflix/zuul/listeners/ResolverListener.java deleted file mode 100644 index 5902e80e..00000000 --- a/zuul-discovery/src/main/java/com/netflix/zuul/listeners/ResolverListener.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.netflix.zuul.listeners; - -import java.util.List; - -/** - * @author Argha C - * @since 2/24/21 - */ -public interface ResolverListener { - - void onChange(List removedSet); - -} diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/resolver/Resolver.java b/zuul-discovery/src/main/java/com/netflix/zuul/resolver/Resolver.java new file mode 100644 index 00000000..1a409435 --- /dev/null +++ b/zuul-discovery/src/main/java/com/netflix/zuul/resolver/Resolver.java @@ -0,0 +1,13 @@ +package com.netflix.zuul.resolver; + +/** + * @author Argha C + * @since 2/25/21 + * + * Resolves a key to a discovery result type. + */ +public interface Resolver { + + //TODO(argha-c) Param needs to be typed, once the ribbon LB lookup API is figured out. + T resolve(Object key); +} diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/resolver/ResolverListener.java b/zuul-discovery/src/main/java/com/netflix/zuul/resolver/ResolverListener.java new file mode 100644 index 00000000..304e9a2a --- /dev/null +++ b/zuul-discovery/src/main/java/com/netflix/zuul/resolver/ResolverListener.java @@ -0,0 +1,30 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.resolver; + +import java.util.List; + +/** + * @author Argha C + * @since 2/25/21 + * + * Listener for resolver updates. + */ +public interface ResolverListener { + + void onChange(List removedSet); +} From 75801533b9a839432ca5fb3ed98a9807e26282dc Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Mon, 1 Mar 2021 11:01:41 -0800 Subject: [PATCH 223/273] Refine resolver result. Add tests --- .../DefaultClientChannelManager.java | 3 +- .../zuul/origins/BasicNettyOrigin.java | 2 +- .../DefaultClientChannelManagerTest.java | 187 +++++++++--------- .../zuul/discovery/DiscoveryResult.java | 30 +-- .../zuul/discovery/DynamicServerResolver.java | 4 +- .../zuul/discovery/NonDiscoveryServer.java | 33 ++++ .../zuul/discovery/ResolverResult.java | 33 ++++ .../zuul/discovery/SimpleMetaInfo.java | 3 + .../discovery/DynamicServerResolverTest.java | 59 ++++++ 9 files changed, 247 insertions(+), 107 deletions(-) create mode 100644 zuul-discovery/src/main/java/com/netflix/zuul/discovery/NonDiscoveryServer.java create mode 100644 zuul-discovery/src/main/java/com/netflix/zuul/discovery/ResolverResult.java create mode 100644 zuul-discovery/src/test/java/com/netflix/zuul/discovery/DynamicServerResolverTest.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java index 52a3197a..ea63c184 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java @@ -24,6 +24,7 @@ import com.netflix.spectator.api.histogram.PercentileTimer; import com.netflix.zuul.discovery.DiscoveryResult; import com.netflix.zuul.discovery.DynamicServerResolver; +import com.netflix.zuul.discovery.ResolverResult; import com.netflix.zuul.exception.OutboundErrorType; import com.netflix.zuul.resolver.ResolverListener; import com.netflix.zuul.netty.SpectatorUtils; @@ -386,7 +387,7 @@ protected ConcurrentHashMap getPerServerPools( } @VisibleForTesting - static SocketAddress pickAddressInternal(DiscoveryResult chosenServer, @Nullable OriginName originName) { + static SocketAddress pickAddressInternal(ResolverResult chosenServer, @Nullable OriginName originName) { String rawHost; int port; rawHost = chosenServer.getHost(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java index 313f79aa..3df763c6 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java @@ -134,7 +134,7 @@ public RequestAttempt newRequestAttempt(DiscoveryResult server, SessionContext z @Override public String getIpAddrFromServer(DiscoveryResult discoveryResult) { - final Optional ipAddr = discoveryResult.ipAddr(); + final Optional ipAddr = discoveryResult.getIPAddr(); return ipAddr.isPresent() ? ipAddr.get() : null; } diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java index 09099a36..c9307d4c 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java @@ -1,93 +1,94 @@ -///* -// * Copyright 2020 Netflix, Inc. -// * -// * Licensed under the Apache License, Version 2.0 (the "License"); -// * you may not use this file except in compliance with the License. -// * You may obtain a copy of the License at -// * -// * http://www.apache.org/licenses/LICENSE-2.0 -// * -// * Unless required by applicable law or agreed to in writing, software -// * distributed under the License is distributed on an "AS IS" BASIS, -// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// * See the License for the specific language governing permissions and -// * limitations under the License. -// */ -// -//package com.netflix.zuul.netty.connectionpool; -// -//import static org.junit.Assert.assertEquals; -//import static org.junit.Assert.assertTrue; -//import com.google.common.net.InetAddresses; -//import com.google.common.truth.Truth; -//import com.netflix.appinfo.InstanceInfo; -//import com.netflix.appinfo.InstanceInfo.Builder; -//import com.netflix.zuul.domain.OriginServer; -//import com.netflix.zuul.origins.OriginName; -//import java.net.InetSocketAddress; -//import java.net.SocketAddress; -//import org.junit.Test; -//import org.junit.runner.RunWith; -//import org.junit.runners.JUnit4; -// -///** -// * Tests for {@link DefaultClientChannelManager}. These tests don't use IPv6 addresses because {@link InstanceInfo} -// * is not capable of expressing them. -// */ -//@RunWith(JUnit4.class) -//public class DefaultClientChannelManagerTest { -// -// @Test -// public void pickAddressInternal_discovery() { -// InstanceInfo instanceInfo = -// Builder.newBuilder().setAppName("app").setHostName("192.168.0.1").setPort(443).build(); -// OriginServer s = new OriginServer(new DiscoveryEnabledServer(instanceInfo, true)); -// -// SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); -// -// Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); -// InetSocketAddress socketAddress = (InetSocketAddress) addr; -// assertEquals(InetAddresses.forString("192.168.0.1"), socketAddress.getAddress()); -// assertEquals(443, socketAddress.getPort()); -// } -// -// @Test -// public void pickAddressInternal_discovery_unresolved() { -// InstanceInfo instanceInfo = -// Builder.newBuilder().setAppName("app").setHostName("localhost").setPort(443).build(); -// OriginServer s = new OriginServer(new DiscoveryEnabledServer(instanceInfo, true)); -// -// SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); -// -// Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); -// InetSocketAddress socketAddress = (InetSocketAddress) addr; -// -// assertTrue(socketAddress.toString(), socketAddress.getAddress().isLoopbackAddress()); -// assertEquals(443, socketAddress.getPort()); -// } -// -//// @Test -//// public void pickAddressInternal_nonDiscovery() { -//// Server s = new Server("192.168.0.1", 443); -//// -//// SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); -//// -//// Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); -//// InetSocketAddress socketAddress = (InetSocketAddress) addr; -//// assertEquals(InetAddresses.forString("192.168.0.1"), socketAddress.getAddress()); -//// assertEquals(443, socketAddress.getPort()); -//// } -//// -//// @Test -//// public void pickAddressInternal_nonDiscovery_unresolved() { -//// Server s = new Server("localhost", 443); -//// -//// SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); -//// -//// Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); -//// InetSocketAddress socketAddress = (InetSocketAddress) addr; -//// -//// assertTrue(socketAddress.toString(), socketAddress.getAddress().isLoopbackAddress()); -//// assertEquals(443, socketAddress.getPort()); -//// } -//} +/* + * Copyright 2020 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.netty.connectionpool; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import com.google.common.net.InetAddresses; +import com.google.common.truth.Truth; +import com.netflix.appinfo.InstanceInfo; +import com.netflix.appinfo.InstanceInfo.Builder; +import com.netflix.zuul.discovery.DiscoveryResult; +import com.netflix.zuul.discovery.NonDiscoveryServer; +import com.netflix.zuul.origins.OriginName; +import java.net.InetSocketAddress; +import java.net.SocketAddress; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** + * Tests for {@link DefaultClientChannelManager}. These tests don't use IPv6 addresses because {@link InstanceInfo} + * is not capable of expressing them. + */ +@RunWith(JUnit4.class) +public class DefaultClientChannelManagerTest { + + @Test + public void pickAddressInternal_discovery() { + InstanceInfo instanceInfo = + Builder.newBuilder().setAppName("app").setHostName("192.168.0.1").setPort(443).build(); + DiscoveryResult s = DiscoveryResult.from(instanceInfo, true); + + SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); + + Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); + InetSocketAddress socketAddress = (InetSocketAddress) addr; + assertEquals(InetAddresses.forString("192.168.0.1"), socketAddress.getAddress()); + assertEquals(443, socketAddress.getPort()); + } + + @Test + public void pickAddressInternal_discovery_unresolved() { + InstanceInfo instanceInfo = + Builder.newBuilder().setAppName("app").setHostName("localhost").setPort(443).build(); + DiscoveryResult s = DiscoveryResult.from(instanceInfo, true); + + SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); + + Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); + InetSocketAddress socketAddress = (InetSocketAddress) addr; + + assertTrue(socketAddress.toString(), socketAddress.getAddress().isLoopbackAddress()); + assertEquals(443, socketAddress.getPort()); + } + + @Test + public void pickAddressInternal_nonDiscovery() { + NonDiscoveryServer s = new NonDiscoveryServer("192.168.0.1", 443); + + SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); + + Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); + InetSocketAddress socketAddress = (InetSocketAddress) addr; + assertEquals(InetAddresses.forString("192.168.0.1"), socketAddress.getAddress()); + assertEquals(443, socketAddress.getPort()); + } + + @Test + public void pickAddressInternal_nonDiscovery_unresolved() { + NonDiscoveryServer s = new NonDiscoveryServer("localhost", 443); + + SocketAddress addr = DefaultClientChannelManager.pickAddressInternal(s, OriginName.fromVip("vip")); + + Truth.assertThat(addr).isInstanceOf(InetSocketAddress.class); + InetSocketAddress socketAddress = (InetSocketAddress) addr; + + assertTrue(socketAddress.toString(), socketAddress.getAddress().isLoopbackAddress()); + assertEquals(443, socketAddress.getPort()); + } +} diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java index 46cca2aa..fcbe6988 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java @@ -28,9 +28,9 @@ * @author Argha C * @since 2/25/21 * - * Wraps a discovery enabled server, and stats related to it. + * Wraps a single instance of discovery enabled server, and stats related to it. */ -public final class DiscoveryResult { +public final class DiscoveryResult implements ResolverResult { private final DiscoveryEnabledServer server; private final ServerStats serverStats; @@ -41,7 +41,11 @@ public DiscoveryResult(DiscoveryEnabledServer server) { serverStats.initialize(server); } - public Optional ipAddr() { + public static DiscoveryResult from(InstanceInfo instanceInfo, boolean useSecurePort) { + return new DiscoveryResult(new DiscoveryEnabledServer(instanceInfo, useSecurePort )); + } + + public Optional getIPAddr() { if (server.getInstanceInfo() != null) { String ip = server.getInstanceInfo().getIPAddr(); if (ip != null && !ip.isEmpty()) { @@ -52,10 +56,21 @@ public Optional ipAddr() { return Optional.empty(); } + @Override public String getHost() { return server.getHost(); } + @Override + public boolean isDiscoveryEnabled() { + return server instanceof DiscoveryEnabledServer; + } + + @Override + public int getPort() { + return server.getPort(); + } + public String getVIP() { final InstanceInfo instanceInfo = server.getInstanceInfo(); if (server.getPort() == instanceInfo.getSecurePort()) { @@ -65,9 +80,7 @@ public String getVIP() { } } - public boolean isDiscoveryEnabled() { - return server instanceof DiscoveryEnabledServer; - } + public SimpleMetaInfo getMetaInfo() { return new SimpleMetaInfo(server.getMetaInfo()); @@ -82,10 +95,6 @@ public String getAvailabilityZone(){ return null; } - public int getPort() { - return server.getPort(); - } - public String getZone() { return server.getZone(); } @@ -150,7 +159,6 @@ public void stopPublishingStats() { serverStats.close(); } - @Override public int hashCode() { return server.hashCode(); diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java index ab13ee28..a52a280b 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java @@ -17,6 +17,7 @@ package com.netflix.zuul.discovery; import static com.netflix.client.config.CommonClientConfigKey.NFLoadBalancerClassName; +import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Throwables; import com.google.common.collect.Sets; import com.netflix.client.config.IClientConfig; @@ -82,7 +83,8 @@ private DynamicServerListLoadBalancer createLoadBalancer(IClientConfig client return lb; } - private void onUpdate(List oldList, List newList) { + @VisibleForTesting + void onUpdate(List oldList, List newList) { Set oldSet = new HashSet<>(oldList); Set newSet = new HashSet<>(newList); final List discoveryResults = Sets.difference(oldSet, newSet).stream() diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/NonDiscoveryServer.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/NonDiscoveryServer.java new file mode 100644 index 00000000..e948941b --- /dev/null +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/NonDiscoveryServer.java @@ -0,0 +1,33 @@ +package com.netflix.zuul.discovery; + +import com.netflix.loadbalancer.Server; + +/** + * @author Argha C + * @since 3/1/21 + *

+ * This exists merely to wrap a resolver lookup result, that is not discovery enabled. + */ +public class NonDiscoveryServer implements ResolverResult { + + private final Server server; + + public NonDiscoveryServer(String host, int port) { + this.server = new Server(host, port); + } + + @Override + public String getHost() { + return server.getHost(); + } + + @Override + public int getPort() { + return server.getPort(); + } + + @Override + public boolean isDiscoveryEnabled() { + return false; + } +} diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/ResolverResult.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/ResolverResult.java new file mode 100644 index 00000000..cd33a228 --- /dev/null +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/ResolverResult.java @@ -0,0 +1,33 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.netflix.zuul.discovery; + +/** + * @author Argha C + * @since 2/25/21 + * + * Wraps the result of a resolution attempt. + * At this time, it doesn't encapsulate a collection of instances, but ideally should. + */ + +public interface ResolverResult { + + public String getHost(); + + public int getPort(); + + public boolean isDiscoveryEnabled(); +} diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/SimpleMetaInfo.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/SimpleMetaInfo.java index fd3af031..b5692ea0 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/SimpleMetaInfo.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/SimpleMetaInfo.java @@ -5,6 +5,9 @@ /** * @author Argha C * @since 2/25/21 + * + * placeholder to mimic metainfo for a non-Eureka enabled server. + * This exists to preserve compatibility with some current logic, but should be revisited. */ public class SimpleMetaInfo { diff --git a/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DynamicServerResolverTest.java b/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DynamicServerResolverTest.java new file mode 100644 index 00000000..5c4a7960 --- /dev/null +++ b/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DynamicServerResolverTest.java @@ -0,0 +1,59 @@ +package com.netflix.zuul.discovery; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; +import com.google.common.truth.Truth; +import com.netflix.appinfo.InstanceInfo; +import com.netflix.appinfo.InstanceInfo.Builder; +import com.netflix.client.config.DefaultClientConfigImpl; +import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; +import com.netflix.zuul.resolver.ResolverListener; +import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class DynamicServerResolverTest { + + + @Test + public void verifyListenerUpdates() { + + class CustomListener implements ResolverListener { + + private List resultSet = Lists.newArrayList(); + + @Override + public void onChange(List changedSet) { + resultSet = changedSet; + } + + public List updatedList() { + return resultSet; + } + } + + final CustomListener listener = new CustomListener(); + final DynamicServerResolver resolver = new DynamicServerResolver(new DefaultClientConfigImpl(), listener); + + final InstanceInfo first = Builder.newBuilder() + .setAppName("zuul-discovery-1") + .setHostName("zuul-discovery-1") + .setIPAddr("100.10.10.1") + .setPort(443) + .build(); + final InstanceInfo second = Builder.newBuilder() + .setAppName("zuul-discovery-2") + .setHostName("zuul-discovery-2") + .setIPAddr("100.10.10.2") + .setPort(443) + .build(); + final DiscoveryEnabledServer server1 = new DiscoveryEnabledServer(first, true); + final DiscoveryEnabledServer server2 = new DiscoveryEnabledServer(second, true); + + resolver.onUpdate(ImmutableList.of(server1, server2), ImmutableList.of()); + + Truth.assertThat(listener.updatedList()).containsExactly(new DiscoveryResult(server1), new DiscoveryResult(server2)); + } +} From c6d1484dfcc86beab6ab7a4b669a6a1784462184 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Mon, 1 Mar 2021 12:22:53 -0800 Subject: [PATCH 224/273] Add license headers --- .../zuul/discovery/NonDiscoveryServer.java | 16 ++++++++++++++++ .../netflix/zuul/discovery/SimpleMetaInfo.java | 16 ++++++++++++++++ .../java/com/netflix/zuul/resolver/Resolver.java | 16 ++++++++++++++++ .../discovery/DynamicServerResolverTest.java | 16 ++++++++++++++++ 4 files changed, 64 insertions(+) diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/NonDiscoveryServer.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/NonDiscoveryServer.java index e948941b..1a8da452 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/NonDiscoveryServer.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/NonDiscoveryServer.java @@ -1,3 +1,19 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.netflix.zuul.discovery; import com.netflix.loadbalancer.Server; diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/SimpleMetaInfo.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/SimpleMetaInfo.java index b5692ea0..dc8d4eae 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/SimpleMetaInfo.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/SimpleMetaInfo.java @@ -1,3 +1,19 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.netflix.zuul.discovery; import com.netflix.loadbalancer.Server.MetaInfo; diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/resolver/Resolver.java b/zuul-discovery/src/main/java/com/netflix/zuul/resolver/Resolver.java index 1a409435..e1fb4777 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/resolver/Resolver.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/resolver/Resolver.java @@ -1,3 +1,19 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.netflix.zuul.resolver; /** diff --git a/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DynamicServerResolverTest.java b/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DynamicServerResolverTest.java index 5c4a7960..b216a5bf 100644 --- a/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DynamicServerResolverTest.java +++ b/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DynamicServerResolverTest.java @@ -1,3 +1,19 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.netflix.zuul.discovery; import com.google.common.collect.ImmutableList; From f3d62652571239d238d9f5d78a8374a884639b00 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Tue, 2 Mar 2021 09:50:48 -0800 Subject: [PATCH 225/273] Incorporate feedback Add validation for hostname+port --- .../DefaultClientChannelManager.java | 19 ++++++++++--------- .../com/netflix/zuul/niws/RequestAttempt.java | 2 +- .../zuul/discovery/DiscoveryResult.java | 2 +- .../zuul/discovery/NonDiscoveryServer.java | 12 ++++++++++-- .../zuul/discovery/SimpleMetaInfo.java | 2 +- .../com/netflix/zuul/resolver/Resolver.java | 6 ++++++ .../zuul/resolver/ResolverListener.java | 4 ++++ 7 files changed, 33 insertions(+), 14 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java index ea63c184..042c116c 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java @@ -351,22 +351,23 @@ protected IConnectionPool createConnectionPool( } final class ServerPoolListener implements ResolverListener { + @Override public void onChange(List removedSet) { - if (!removedSet.isEmpty()) { - LOG.debug("Removing connection pools for missing servers. name = " + originName - + ". " + removedSet.size() + " servers gone."); - for (DiscoveryResult s : removedSet) { - IConnectionPool pool = perServerPools.remove(s); - if (pool != null) { - pool.shutdown(); - } + if (!removedSet.isEmpty()) { + LOG.debug("Removing connection pools for missing servers. name = " + originName + + ". " + removedSet.size() + " servers gone."); + for (DiscoveryResult s : removedSet) { + IConnectionPool pool = perServerPools.remove(s); + if (pool != null) { + pool.shutdown(); } } } - } + } + @Override public int getConnsInPool() { return connsInPool.get(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java index 03988076..abdb769d 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java +++ b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java @@ -115,7 +115,7 @@ public RequestAttempt(final DiscoveryResult server, final IClientConfig clientCo this.instanceId = server.getServerId(); this.host = server.getHost(); this.port = server.getPort(); - this.vip = server.getVIP(); + this.vip = server.getTarget(); this.availabilityZone = server.getAvailabilityZone(); } diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java index fcbe6988..13532cf6 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java @@ -71,7 +71,7 @@ public int getPort() { return server.getPort(); } - public String getVIP() { + public String getTarget() { final InstanceInfo instanceInfo = server.getInstanceInfo(); if (server.getPort() == instanceInfo.getSecurePort()) { return instanceInfo.getSecureVipAddress(); diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/NonDiscoveryServer.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/NonDiscoveryServer.java index 1a8da452..e3a91ba3 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/NonDiscoveryServer.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/NonDiscoveryServer.java @@ -17,6 +17,7 @@ package com.netflix.zuul.discovery; import com.netflix.loadbalancer.Server; +import java.util.Objects; /** * @author Argha C @@ -24,12 +25,13 @@ *

* This exists merely to wrap a resolver lookup result, that is not discovery enabled. */ -public class NonDiscoveryServer implements ResolverResult { +public final class NonDiscoveryServer implements ResolverResult { private final Server server; public NonDiscoveryServer(String host, int port) { - this.server = new Server(host, port); + Objects.requireNonNull(host, "host name"); + this.server = new Server(host, validatePort(port)); } @Override @@ -46,4 +48,10 @@ public int getPort() { public boolean isDiscoveryEnabled() { return false; } + + private int validatePort(int port) { + if (port < 0 || port > 0xFFFF) + throw new IllegalArgumentException("port out of range:" + port); + return port; + } } diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/SimpleMetaInfo.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/SimpleMetaInfo.java index dc8d4eae..29fed1bd 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/SimpleMetaInfo.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/SimpleMetaInfo.java @@ -25,7 +25,7 @@ * placeholder to mimic metainfo for a non-Eureka enabled server. * This exists to preserve compatibility with some current logic, but should be revisited. */ -public class SimpleMetaInfo { +public final class SimpleMetaInfo { private final MetaInfo metaInfo; diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/resolver/Resolver.java b/zuul-discovery/src/main/java/com/netflix/zuul/resolver/Resolver.java index e1fb4777..fa1b24e6 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/resolver/Resolver.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/resolver/Resolver.java @@ -24,6 +24,12 @@ */ public interface Resolver { + /** + * + * @param key unique identifier that may be used by certain resolvers as part of lookup. Implementations + * can narrow this down to be nullable. + * @return the result of a resolver lookup + */ //TODO(argha-c) Param needs to be typed, once the ribbon LB lookup API is figured out. T resolve(Object key); } diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/resolver/ResolverListener.java b/zuul-discovery/src/main/java/com/netflix/zuul/resolver/ResolverListener.java index 304e9a2a..b72e54c5 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/resolver/ResolverListener.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/resolver/ResolverListener.java @@ -26,5 +26,9 @@ */ public interface ResolverListener { + /** + * Hook to respond to resolver updates + * @param removedSet the servers removed from the latest resolver update, but included in the previous update. + */ void onChange(List removedSet); } From d929953d619f790c9167afc06378bf47d4ca96e9 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Thu, 4 Mar 2021 17:04:55 -0800 Subject: [PATCH 226/273] Expose Server for read access --- .../zuul/discovery/DiscoveryResult.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java index 13532cf6..92258cbd 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java @@ -71,6 +71,13 @@ public int getPort() { return server.getPort(); } + public int getSecurePort() { + return server.getInstanceInfo().getSecurePort(); + } + public boolean isSecurePortEnabled() { + return server.getPort() == server.getInstanceInfo().getSecurePort(); + } + public String getTarget() { final InstanceInfo instanceInfo = server.getInstanceInfo(); if (server.getPort() == instanceInfo.getSecurePort()) { @@ -103,6 +110,10 @@ public String getServerId() { return server.getInstanceInfo().getId(); } + public DiscoveryEnabledServer getServer() { + return server; + } + public String getASGName() { return server.getInstanceInfo().getASGName(); } @@ -139,6 +150,13 @@ public int getOpenConnectionsCount() { return serverStats.getOpenConnectionsCount(); } + public long getTotalRequestsCount() { + return serverStats.getTotalRequestsCount(); + } + public int getActiveRequestsCount() { + return serverStats.getActiveRequestsCount(); + } + public void decrementOpenConnectionsCount() { serverStats.decrementOpenConnectionsCount(); } From 3acc68fd3662ab46e0683001a9abdcbb62d52e2a Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Fri, 5 Mar 2021 12:00:27 -0800 Subject: [PATCH 227/273] Allow resolver injection to be more pluggable --- .../DefaultClientChannelManager.java | 40 ++++++++++++++++--- .../zuul/discovery/DynamicServerResolver.java | 2 + .../com/netflix/zuul/resolver/Resolver.java | 10 +++++ 3 files changed, 46 insertions(+), 6 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java index 042c116c..bcfcef64 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java @@ -26,6 +26,7 @@ import com.netflix.zuul.discovery.DynamicServerResolver; import com.netflix.zuul.discovery.ResolverResult; import com.netflix.zuul.exception.OutboundErrorType; +import com.netflix.zuul.resolver.Resolver; import com.netflix.zuul.resolver.ResolverListener; import com.netflix.zuul.netty.SpectatorUtils; import com.netflix.zuul.netty.insights.PassportStateHttpClientHandler; @@ -62,7 +63,7 @@ public class DefaultClientChannelManager implements ClientChannelManager { public static final String METRIC_PREFIX = "connectionpool"; - private final DynamicServerResolver dynamicServerResolver; + private final Resolver dynamicServerResolver; private final ConnectionPoolConfig connPoolConfig; private final IClientConfig clientConfig; private final Registry spectatorRegistry; @@ -125,6 +126,38 @@ public DefaultClientChannelManager( this.connsInUse = SpectatorUtils.newGauge(METRIC_PREFIX + "_inUse", metricId, new AtomicInteger()); } + @VisibleForTesting + public DefaultClientChannelManager( + OriginName originName, IClientConfig clientConfig, + Resolver resolver, Registry spectatorRegistry) { + this.originName = Objects.requireNonNull(originName, "originName"); + this.dynamicServerResolver = resolver; + + String metricId = originName.getMetricId(); + + this.clientConfig = clientConfig; + this.spectatorRegistry = spectatorRegistry; + this.perServerPools = new ConcurrentHashMap<>(200); + + this.connPoolConfig = new ConnectionPoolConfigImpl(originName, this.clientConfig); + + this.createNewConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_create", metricId); + this.createConnSucceededCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_create_success", metricId); + this.createConnFailedCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_create_fail", metricId); + + this.closeConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_close", metricId); + this.requestConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_request", metricId); + this.reuseConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_reuse", metricId); + this.releaseConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_release", metricId); + this.alreadyClosedCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_alreadyClosed", metricId); + this.connTakenFromPoolIsNotOpen = SpectatorUtils.newCounter(METRIC_PREFIX + "_fromPoolIsClosed", metricId); + this.maxConnsPerHostExceededCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_maxConnsPerHostExceeded", metricId); + this.closeWrtBusyConnCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_closeWrtBusyConnCounter", metricId); + this.connEstablishTimer = PercentileTimer.get(spectatorRegistry, spectatorRegistry.createId(METRIC_PREFIX + "_createTiming", "id", metricId)); + this.connsInPool = SpectatorUtils.newGauge(METRIC_PREFIX + "_inPool", metricId, new AtomicInteger()); + this.connsInUse = SpectatorUtils.newGauge(METRIC_PREFIX + "_inUse", metricId, new AtomicInteger()); + } + @Override public void init() { @@ -378,11 +411,6 @@ public int getConnsInUse() { return connsInUse.get(); } - // This is just used for information in the RestClient 'bridge'. - public DynamicServerResolver getServerPool() { - return this.dynamicServerResolver; - } - protected ConcurrentHashMap getPerServerPools() { return perServerPools; } diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java index a52a280b..93d9ae38 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java @@ -55,10 +55,12 @@ public DiscoveryResult resolve(@Nullable Object key) { return new DiscoveryResult((DiscoveryEnabledServer) server); } + @Override public boolean hasServers() { return !loadBalancer.getReachableServers().isEmpty(); } + @Override public void shutdown() { loadBalancer.shutdown(); } diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/resolver/Resolver.java b/zuul-discovery/src/main/java/com/netflix/zuul/resolver/Resolver.java index fa1b24e6..65590085 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/resolver/Resolver.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/resolver/Resolver.java @@ -32,4 +32,14 @@ public interface Resolver { */ //TODO(argha-c) Param needs to be typed, once the ribbon LB lookup API is figured out. T resolve(Object key); + + /** + * @return true if the resolver has available servers, false otherwise + */ + boolean hasServers(); + + /** + * hook to perform activities on shutdown + */ + void shutdown(); } From 0c7491c2d0fa91a500f65823267389d9746fbb1f Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Fri, 5 Mar 2021 15:27:09 -0800 Subject: [PATCH 228/273] Delegate to Objects hashcode --- .../zuul/discovery/DiscoveryResult.java | 3 +- .../zuul/discovery/DiscoveryResultTest.java | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java index 92258cbd..d070de39 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java @@ -21,6 +21,7 @@ import com.netflix.loadbalancer.ServerStats; import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; import java.util.Locale; +import java.util.Objects; import java.util.Optional; import javax.annotation.Nullable; @@ -179,7 +180,7 @@ public void stopPublishingStats() { @Override public int hashCode() { - return server.hashCode(); + return Objects.hashCode(server); } diff --git a/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java b/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java new file mode 100644 index 00000000..d6382e7a --- /dev/null +++ b/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java @@ -0,0 +1,29 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.discovery; + +import static org.junit.Assert.*; +import org.junit.Test; + +public class DiscoveryResultTest { + + @Test + public void testHashCode() { + final DiscoveryResult discoveryResult = new DiscoveryResult(null); + assertNotNull(discoveryResult.hashCode()); + } +} From d1df10b2c374757123b8f2c843691532d4764be7 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Fri, 5 Mar 2021 16:07:17 -0800 Subject: [PATCH 229/273] Defensive checks for host/port --- .../main/java/com/netflix/zuul/discovery/DiscoveryResult.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java index d070de39..188a3af4 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java @@ -59,7 +59,7 @@ public Optional getIPAddr() { @Override public String getHost() { - return server.getHost(); + return server == null ? "undefined" : server.getHost(); } @Override @@ -69,7 +69,7 @@ public boolean isDiscoveryEnabled() { @Override public int getPort() { - return server.getPort(); + return server == null ? -1 : server.getPort(); } public int getSecurePort() { From 1b4257c81006b6fa1a0dc17ad691cf5a590bbc67 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Fri, 5 Mar 2021 18:58:51 -0800 Subject: [PATCH 230/273] Add sentinel value for empty discovery result --- .../DefaultClientChannelManager.java | 2 +- .../zuul/discovery/DiscoveryResult.java | 29 +++++++++++++------ .../zuul/discovery/DynamicServerResolver.java | 2 +- .../zuul/discovery/DiscoveryResultTest.java | 11 ++++++- .../discovery/DynamicServerResolverTest.java | 17 +++++++++++ 5 files changed, 49 insertions(+), 12 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java index bcfcef64..6cd149a5 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java @@ -326,7 +326,7 @@ public Promise acquire( // Choose the next load-balanced server. final DiscoveryResult chosenServer = dynamicServerResolver.resolve(key); - if (chosenServer == null) { + if (chosenServer == DiscoveryResult.EMPTY) { Promise promise = eventLoop.newPromise(); promise.setFailure(new OriginConnectException("No servers available", OutboundErrorType.NO_AVAILABLE_SERVERS)); return promise; diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java index 188a3af4..50b4bec7 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java @@ -28,13 +28,22 @@ /** * @author Argha C * @since 2/25/21 - * + *

* Wraps a single instance of discovery enabled server, and stats related to it. */ public final class DiscoveryResult implements ResolverResult { private final DiscoveryEnabledServer server; private final ServerStats serverStats; + /** + * This exists to allow for a semblance of type safety, and encourages avoiding null checks on the underlying Server, + * thus representing a sentinel value for an empty resolution result. + */ + public static final DiscoveryResult EMPTY = + DiscoveryResult.from(InstanceInfo.Builder.newBuilder() + .setAppName("undefined") + .setHostName("undefined") + .setPort(-1).build(), false); public DiscoveryResult(DiscoveryEnabledServer server) { this.server = server; @@ -43,7 +52,7 @@ public DiscoveryResult(DiscoveryEnabledServer server) { } public static DiscoveryResult from(InstanceInfo instanceInfo, boolean useSecurePort) { - return new DiscoveryResult(new DiscoveryEnabledServer(instanceInfo, useSecurePort )); + return new DiscoveryResult(new DiscoveryEnabledServer(instanceInfo, useSecurePort)); } public Optional getIPAddr() { @@ -75,6 +84,7 @@ public int getPort() { public int getSecurePort() { return server.getInstanceInfo().getSecurePort(); } + public boolean isSecurePortEnabled() { return server.getPort() == server.getInstanceInfo().getSecurePort(); } @@ -89,16 +99,15 @@ public String getTarget() { } - public SimpleMetaInfo getMetaInfo() { return new SimpleMetaInfo(server.getMetaInfo()); } @Nullable - public String getAvailabilityZone(){ + public String getAvailabilityZone() { final InstanceInfo instanceInfo = server.getInstanceInfo(); if (instanceInfo.getDataCenterInfo() instanceof AmazonInfo) { - return ((AmazonInfo) instanceInfo.getDataCenterInfo()).getMetadata().get("availability-zone"); + return ((AmazonInfo) instanceInfo.getDataCenterInfo()).getMetadata().get("availability-zone"); } return null; } @@ -119,7 +128,7 @@ public String getASGName() { return server.getInstanceInfo().getASGName(); } - public String getAppName(){ + public String getAppName() { return server.getInstanceInfo().getAppName().toLowerCase(Locale.ROOT); } @@ -154,6 +163,7 @@ public int getOpenConnectionsCount() { public long getTotalRequestsCount() { return serverStats.getTotalRequestsCount(); } + public int getActiveRequestsCount() { return serverStats.getActiveRequestsCount(); } @@ -185,16 +195,17 @@ public int hashCode() { /** - * * Two instances are deemed identical if they wrap the same underlying discovery server instance. */ @Override public boolean equals(Object obj) { - if(obj == this) + if (obj == this) { return true; + } - if (!(obj instanceof DiscoveryResult)) + if (!(obj instanceof DiscoveryResult)) { return false; + } final DiscoveryResult other = (DiscoveryResult) obj; return server.equals(other.server); } diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java index 93d9ae38..0841f608 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java @@ -52,7 +52,7 @@ public DynamicServerResolver(IClientConfig clientConfig, ResolverListener updatedList() { Truth.assertThat(listener.updatedList()).containsExactly(new DiscoveryResult(server1), new DiscoveryResult(server2)); } + + @Test + public void properSentinelValueWhenServersUnavailable() { + final DynamicServerResolver resolver = new DynamicServerResolver(new DefaultClientConfigImpl(), new ResolverListener() { + @Override + public void onChange(List removedSet) { + } + }); + + final DiscoveryResult nonExistentServer = resolver.resolve(null); + + Truth.assertThat(nonExistentServer).isSameInstanceAs(DiscoveryResult.EMPTY); + Truth.assertThat(nonExistentServer.getHost()).isEqualTo("undefined"); + Truth.assertThat(nonExistentServer.getPort()).isEqualTo(-1); + } } From 494d79fa40ca140fbbd92f2c22cec8ae32dc5f0f Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Fri, 5 Mar 2021 19:46:57 -0800 Subject: [PATCH 231/273] Check sentinel value when no origin servers resolved --- .../com/netflix/zuul/filters/endpoint/ProxyEndpoint.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 31a62a47..952776a0 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -468,8 +468,8 @@ public void operationComplete(final Future connectResult) { Integer readTimeout = null; DiscoveryResult server = chosenServer.get(); - // The chosen server would be null if the loadbalancer found no available servers. - if (server != null) { + // The discovery result lookup is EMPTY if the loadbalancer resolves no available servers. + if (server != DiscoveryResult.EMPTY) { if (currentRequestStat != null) { currentRequestStat.server(server); } @@ -738,7 +738,7 @@ private void processErrorFromOrigin(final Throwable ex, final Channel origCh) { postErrorProcessing(ex, zuulCtx, err, chosenServer.get(), attemptNum); final ClientException niwsEx = new ClientException(ClientException.ErrorType.valueOf(err.getClientErrorType().name())); - if (chosenServer.get() != null) { + if (chosenServer.get() != DiscoveryResult.EMPTY) { origin.onRequestExceptionWithServer(zuulRequest, chosenServer.get(), attemptNum, niwsEx); } From 1a47cc08389aed1e37ade4a19a1f4610eabe716a Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Sat, 6 Mar 2021 11:34:53 -0800 Subject: [PATCH 232/273] Fix bug with updating server ref on origin connect failures --- .../com/netflix/zuul/filters/endpoint/ProxyEndpoint.java | 6 ++++-- .../netty/connectionpool/DefaultClientChannelManager.java | 5 ++++- .../src/main/java/com/netflix/zuul/niws/RequestAttempt.java | 2 +- .../java/com/netflix/zuul/discovery/DiscoveryResult.java | 3 +++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 952776a0..ae8ec06a 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -41,10 +41,10 @@ import com.netflix.loadbalancer.reactive.ExecutionContext; import com.netflix.spectator.api.Counter; import com.netflix.zuul.Filter; -import com.netflix.zuul.discovery.DiscoveryResult; import com.netflix.zuul.context.CommonContextKeys; import com.netflix.zuul.context.Debug; import com.netflix.zuul.context.SessionContext; +import com.netflix.zuul.discovery.DiscoveryResult; import com.netflix.zuul.exception.ErrorType; import com.netflix.zuul.exception.OutboundErrorType; import com.netflix.zuul.exception.OutboundException; @@ -468,7 +468,9 @@ public void operationComplete(final Future connectResult) { Integer readTimeout = null; DiscoveryResult server = chosenServer.get(); - // The discovery result lookup is EMPTY if the loadbalancer resolves no available servers. + /** TODO(argha-c): This reliance on mutable update of the `chosenServer` must be improved. + * @see DiscoveryResult.EMPTY indicates that the loadbalancer found no available servers. + */ if (server != DiscoveryResult.EMPTY) { if (currentRequestStat != null) { currentRequestStat.server(server); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java index 6cd149a5..9df2f6d7 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java @@ -326,13 +326,16 @@ public Promise acquire( // Choose the next load-balanced server. final DiscoveryResult chosenServer = dynamicServerResolver.resolve(key); + + //(argha-c): Always ensure the selected server is updated, since the call chain relies on this mutation. + selectedServer.set(chosenServer); if (chosenServer == DiscoveryResult.EMPTY) { Promise promise = eventLoop.newPromise(); promise.setFailure(new OriginConnectException("No servers available", OutboundErrorType.NO_AVAILABLE_SERVERS)); return promise; } - selectedServer.set(chosenServer); + // Now get the connection-pool for this server. IConnectionPool pool = perServerPools.computeIfAbsent(chosenServer, s -> { diff --git a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java index abdb769d..ae301460 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java +++ b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java @@ -104,7 +104,7 @@ public RequestAttempt(final DiscoveryResult server, final IClientConfig clientCo this.attempt = attemptNumber; this.readTimeout = readTimeout; - if (server != null) { + if (server != null && server != DiscoveryResult.EMPTY) { this.host = server.getHost(); this.port = server.getPort(); this.availabilityZone = server.getZone(); diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java index 50b4bec7..780d5fb4 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java @@ -56,6 +56,9 @@ public static DiscoveryResult from(InstanceInfo instanceInfo, boolean useSecureP } public Optional getIPAddr() { + if (this == DiscoveryResult.EMPTY) { + return Optional.empty(); + } if (server.getInstanceInfo() != null) { String ip = server.getInstanceInfo().getIPAddr(); if (ip != null && !ip.isEmpty()) { From 3851d6310da01e57b6daa21bf889bbd625921df1 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Mon, 8 Mar 2021 14:37:33 -0800 Subject: [PATCH 233/273] Force LB stats to use per server cache --- .../zuul/discovery/DiscoveryResult.java | 25 ++++++++++++++++--- .../zuul/discovery/DynamicServerResolver.java | 4 +-- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java index 780d5fb4..f8a0dfd2 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java @@ -16,8 +16,10 @@ package com.netflix.zuul.discovery; +import com.google.common.annotations.VisibleForTesting; import com.netflix.appinfo.AmazonInfo; import com.netflix.appinfo.InstanceInfo; +import com.netflix.loadbalancer.LoadBalancerStats; import com.netflix.loadbalancer.ServerStats; import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; import java.util.Locale; @@ -45,14 +47,31 @@ public final class DiscoveryResult implements ResolverResult { .setHostName("undefined") .setPort(-1).build(), false); + public DiscoveryResult(DiscoveryEnabledServer server, LoadBalancerStats lbStats) { + this.server = server; + Objects.requireNonNull(lbStats, "Loadbalancer stats must be a valid instance"); + this.serverStats = lbStats.getSingleServerStat(server); + } + + /** + * + * This solely exists to create a result object from incomplete InstanceInfo. + * Usage of this for production code is strongly discouraged, since the underlying instances are prone to memory leaks + */ public DiscoveryResult(DiscoveryEnabledServer server) { this.server = server; - serverStats = new ServerStats(); - serverStats.initialize(server); + this.serverStats = new ServerStats(); } + /** + * + * This convenience method exists for usage in tests. For production usage, please use the constructor linked: + * @see DiscoveryResult#DiscoveryResult(DiscoveryEnabledServer, LoadBalancerStats) + */ + @VisibleForTesting public static DiscoveryResult from(InstanceInfo instanceInfo, boolean useSecurePort) { - return new DiscoveryResult(new DiscoveryEnabledServer(instanceInfo, useSecurePort)); + final DiscoveryEnabledServer server = new DiscoveryEnabledServer(instanceInfo, useSecurePort); + return new DiscoveryResult(server); } public Optional getIPAddr() { diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java index 0841f608..35761209 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DynamicServerResolver.java @@ -52,7 +52,7 @@ public DynamicServerResolver(IClientConfig clientConfig, ResolverListener oldList, List newList) { Set oldSet = new HashSet<>(oldList); Set newSet = new HashSet<>(newList); final List discoveryResults = Sets.difference(oldSet, newSet).stream() - .map(server -> new DiscoveryResult((DiscoveryEnabledServer) server)) + .map(server -> new DiscoveryResult((DiscoveryEnabledServer) server, loadBalancer.getLoadBalancerStats())) .collect(Collectors.toList()); listener.onChange(discoveryResults); } From 9776b8556f915aa4372dc62ec0f30849f0d976ea Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Mon, 8 Mar 2021 15:02:28 -0800 Subject: [PATCH 234/273] Add basic tests --- .../zuul/discovery/DiscoveryResult.java | 5 +++ .../zuul/discovery/DiscoveryResultTest.java | 45 +++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java index f8a0dfd2..17135289 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java @@ -146,6 +146,11 @@ public DiscoveryEnabledServer getServer() { return server; } + @VisibleForTesting + ServerStats getServerStats(){ + return this.serverStats; + } + public String getASGName() { return server.getInstanceInfo().getASGName(); } diff --git a/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java b/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java index 1a3e56e7..cc738281 100644 --- a/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java +++ b/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java @@ -17,6 +17,13 @@ package com.netflix.zuul.discovery; import static org.junit.Assert.*; +import com.google.common.truth.Truth; +import com.netflix.appinfo.InstanceInfo; +import com.netflix.appinfo.InstanceInfo.Builder; +import com.netflix.client.config.DefaultClientConfigImpl; +import com.netflix.loadbalancer.DynamicServerListLoadBalancer; +import com.netflix.loadbalancer.Server; +import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; import org.junit.Test; public class DiscoveryResultTest { @@ -35,4 +42,42 @@ public void hostAndPortForNullServer() { assertEquals("undefined", discoveryResult.getHost()); assertEquals(-1, discoveryResult.getPort()); } + + @Test + public void serverStatsCacheForSameServer() { + final InstanceInfo instanceInfo = Builder.newBuilder() + .setAppName("serverstats-cache") + .setHostName("serverstats-cache") + .setPort(7777).build(); + final DiscoveryEnabledServer server = new DiscoveryEnabledServer(instanceInfo, false); + final DiscoveryEnabledServer serverSecure = new DiscoveryEnabledServer(instanceInfo, true); + + final DynamicServerListLoadBalancer lb = new DynamicServerListLoadBalancer<>(new DefaultClientConfigImpl()); + + final DiscoveryResult result = new DiscoveryResult(server, lb.getLoadBalancerStats()); + final DiscoveryResult result1 = new DiscoveryResult(serverSecure, lb.getLoadBalancerStats()); + + Truth.assertThat(result.getServerStats()).isSameInstanceAs(result1.getServerStats()); + } + + @Test + public void serverStatsDifferForDifferentServer() { + final InstanceInfo instanceInfo = Builder.newBuilder() + .setAppName("serverstats-cache") + .setHostName("serverstats-cache") + .setPort(7777).build(); + final InstanceInfo otherInstance = Builder.newBuilder() + .setAppName("serverstats-cache-2") + .setHostName("serverstats-cache-2") + .setPort(7777).build(); + final DiscoveryEnabledServer server = new DiscoveryEnabledServer(instanceInfo, false); + final DiscoveryEnabledServer serverSecure = new DiscoveryEnabledServer(otherInstance, false); + + final DynamicServerListLoadBalancer lb = new DynamicServerListLoadBalancer<>(new DefaultClientConfigImpl()); + + final DiscoveryResult result = new DiscoveryResult(server, lb.getLoadBalancerStats()); + final DiscoveryResult result1 = new DiscoveryResult(serverSecure, lb.getLoadBalancerStats()); + + Truth.assertThat(result.getServerStats()).isNotSameInstanceAs(result1.getServerStats()); + } } From 803f9bcf11b8de3c011717e28a166d367f0838f1 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Thu, 4 Mar 2021 13:42:38 -0800 Subject: [PATCH 235/273] abstract out origin timeout logic --- .../zuul/filters/endpoint/ProxyEndpoint.java | 102 +++++----------- .../netty/timeouts/OriginTimeoutManager.java | 110 ++++++++++++++++++ .../zuul/origins/BasicNettyOrigin.java | 21 ---- .../com/netflix/zuul/origins/NettyOrigin.java | 2 - 4 files changed, 138 insertions(+), 97 deletions(-) create mode 100644 zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index ae8ec06a..b4c5a653 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -16,7 +16,6 @@ package com.netflix.zuul.filters.endpoint; -import static com.netflix.client.config.CommonClientConfigKey.ReadTimeout; import static com.netflix.zuul.context.CommonContextKeys.ORIGIN_CHANNEL; import static com.netflix.zuul.netty.server.ClientRequestReceiver.ATTR_ZUUL_RESP; import static com.netflix.zuul.passport.PassportState.ORIGIN_CONN_ACQUIRE_END; @@ -38,7 +37,7 @@ import com.netflix.config.CachedDynamicLongProperty; import com.netflix.config.DynamicBooleanProperty; import com.netflix.config.DynamicIntegerSetProperty; -import com.netflix.loadbalancer.reactive.ExecutionContext; +import com.netflix.loadbalancer.Server; import com.netflix.spectator.api.Counter; import com.netflix.zuul.Filter; import com.netflix.zuul.context.CommonContextKeys; @@ -70,6 +69,7 @@ import com.netflix.zuul.netty.filter.FilterRunner; import com.netflix.zuul.netty.server.MethodBinding; import com.netflix.zuul.netty.server.OriginResponseReceiver; +import com.netflix.zuul.netty.timeouts.OriginTimeoutManager; import com.netflix.zuul.niws.RequestAttempt; import com.netflix.zuul.niws.RequestAttempts; import com.netflix.zuul.origins.NettyOrigin; @@ -135,10 +135,12 @@ public class ProxyEndpoint extends SyncZuulFilterAdapter methodBinding; protected HttpResponseMessage zuulResponse; protected boolean startedSendingResponseToClient; + // this is an Object because it can be a String or Integer depending on timeout config protected Object originalReadTimeout; /* Individual retry related state */ @@ -158,8 +160,6 @@ public class ProxyEndpoint extends SyncZuulFilterAdapter(); @@ -295,9 +296,14 @@ public HttpResponseMessage apply(final HttpRequestMessage input) { } // To act the same as Ribbon, we must do this before starting execution (as well as before each attempt). - IClientConfig requestConfig = origin.getExecutionContext(zuulRequest).getRequestConfig(); - originalReadTimeout = requestConfig.getProperty(ReadTimeout, null); - setReadTimeoutOnContext(requestConfig, 1); + IClientConfig requestConfig = originTimeoutManager.getRequestClientConfig(zuulRequest); + + // set original timeout so we can have a default to reset attempts to + originalReadTimeout = originTimeoutManager.getRequestReadTimeout(requestConfig, null); + + // compute read timeout from existing configs + int computeReadTimeout = originTimeoutManager.computeReadTimeout(requestConfig, 1); + originTimeoutManager.setRequestReadTimeout(requestConfig, computeReadTimeout); origin.onRequestExecutionStart(zuulRequest); proxyRequestToOrigin(); @@ -408,8 +414,11 @@ private void proxyRequestToOrigin() { try { attemptNum += 1; - IClientConfig requestConfig = origin.getExecutionContext(zuulRequest).getRequestConfig(); - setReadTimeoutOnContext(requestConfig, attemptNum); + IClientConfig requestConfig = originTimeoutManager.getRequestClientConfig(zuulRequest); + + // compute read timeout from existing configs + int computeReadTimeout = originTimeoutManager.computeReadTimeout(requestConfig, attemptNum); + originTimeoutManager.setRequestReadTimeout(requestConfig, computeReadTimeout); currentRequestStat = createRequestStat(); origin.preRequestChecks(zuulRequest); @@ -454,18 +463,13 @@ protected RequestStat createRequestStat() { return basicRequestStat; } - private void setReadTimeoutOnContext(IClientConfig requestConfig, int attempt) { - Duration readTimeout = getReadTimeout(requestConfig, attempt); - requestConfig.set(ReadTimeout, Math.toIntExact(readTimeout.toMillis())); - } - @Override public void operationComplete(final Future connectResult) { // MUST run this within bindingcontext because RequestExpiryProcessor (and probably other things) depends on ThreadVariables. try { methodBinding.bind(() -> { - Integer readTimeout = null; + Object readTimeout = null; DiscoveryResult server = chosenServer.get(); /** TODO(argha-c): This reliance on mutable update of the `chosenServer` must be improved. @@ -477,20 +481,15 @@ public void operationComplete(final Future connectResult) { } // Invoke the ribbon execution listeners (including RequestExpiry). - final ExecutionContext executionContext = origin.getExecutionContext(zuulRequest); - IClientConfig requestConfig = executionContext.getRequestConfig(); + IClientConfig requestConfig = originTimeoutManager.getRequestClientConfig(zuulRequest); try { - readTimeout = requestConfig.get(ReadTimeout); + readTimeout = originTimeoutManager.getRequestReadTimeout(requestConfig, null); origin.onRequestStartWithServer(zuulRequest, server, attemptNum); // As the read-timeout can be overridden in the listeners executed from onRequestStartWithServer() above // check now to see if it was. And if it was, then use that. - Object overriddenReadTimeoutObj = requestConfig.get(IClientConfigKey.Keys.ReadTimeout); - if (overriddenReadTimeoutObj != null && overriddenReadTimeoutObj instanceof Integer) { - int overriddenReadTimeout = (Integer) overriddenReadTimeoutObj; - readTimeout = overriddenReadTimeout; - } + readTimeout = originTimeoutManager.computeOverriddenReadTimeout(readTimeout, requestConfig); } catch (Throwable e) { handleError(e); @@ -499,18 +498,13 @@ public void operationComplete(final Future connectResult) { finally { // Reset the timeout in overriddenConfig back to what it was before, otherwise it will take // preference on subsequent retry attempts in RequestExpiryProcessor. - if (originalReadTimeout == null) { - requestConfig.setProperty(ReadTimeout, null); - } - else { - requestConfig.setProperty(ReadTimeout, originalReadTimeout); - } + originTimeoutManager.setRequestReadTimeout(requestConfig, originalReadTimeout); } } // Handle the connection establishment result. if (connectResult.isSuccess()) { - onOriginConnectSucceeded(connectResult.getNow(), readTimeout); + onOriginConnectSucceeded(connectResult.getNow(), (Integer) readTimeout); } else { onOriginConnectFailed(connectResult.cause()); } @@ -545,50 +539,6 @@ private void onOriginConnectSucceeded(PooledConnection conn, int readTimeout) { } } - /** - * Derives the read timeout from the configuration. This implementation prefers the longer of either the origin - * timeout or the request timeout. - * - * @param requestConfig the config for the request. - * @param attemptNum the attempt number, starting at 1. - */ - protected Duration getReadTimeout(IClientConfig requestConfig, int attemptNum) { - Long noTimeout = null; - // TODO(carl-mastrangelo): getProperty is deprecated, and suggests using the typed overload `get`. However, - // the value is parsed using parseReadTimeoutMs, which supports String, implying not all timeouts are Integer. - // Figure out where a string ReadTimeout is coming from and replace it. - Long originTimeout = - parseReadTimeoutMs(origin.getClientConfig().getProperty(IClientConfigKey.Keys.ReadTimeout, noTimeout)); - Long requestTimeout = - parseReadTimeoutMs(requestConfig.getProperty(IClientConfigKey.Keys.ReadTimeout, noTimeout)); - - if (originTimeout == null && requestTimeout == null) { - return Duration.ofMillis(MAX_OUTBOUND_READ_TIMEOUT_MS.get()); - } else if (originTimeout == null || requestTimeout == null) { - return Duration.ofMillis(originTimeout == null ? requestTimeout : originTimeout); - } else { - // return the greater of two timeouts - return Duration.ofMillis(originTimeout > requestTimeout ? originTimeout : requestTimeout); - } - } - - /** - * An Integer is expected as an input, but supports parsing Long and String. Returns {@code null} if no type is - * acceptable. - */ - @Nullable - private Long parseReadTimeoutMs(Object p) { - if (p instanceof String && !Strings.isNullOrEmpty((String) p)) { - return Long.valueOf((String)p); - } else if (p instanceof Long) { - return (Long) p; - } else if (p instanceof Integer) { - return Long.valueOf((Integer) p); - } else { - return null; - } - } - private void onOriginConnectFailed(Throwable cause) { passport.add(ORIGIN_CONN_ACQUIRE_FAILED); if (! context.isCancelled()) { @@ -1176,4 +1126,8 @@ protected void originNotFound(SessionContext context, String causeName) { // override for metrics or custom processing } + @ForOverride + protected OriginTimeoutManager getTimeoutManager(NettyOrigin origin) { + return new OriginTimeoutManager(origin); + } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java new file mode 100644 index 00000000..8adb7cf0 --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java @@ -0,0 +1,110 @@ +package com.netflix.zuul.netty.timeouts; + +import static com.netflix.client.config.CommonClientConfigKey.ReadTimeout; + +import com.google.common.base.Strings; +import com.netflix.client.config.DefaultClientConfigImpl; +import com.netflix.client.config.IClientConfig; +import com.netflix.config.DynamicLongProperty; +import com.netflix.zuul.context.CommonContextKeys; +import com.netflix.zuul.message.http.HttpRequestMessage; +import com.netflix.zuul.origins.NettyOrigin; +import java.time.Duration; +import javax.annotation.Nullable; + +/** + * Origin Timeout Manager + * + * @author Arthur Gonigberg + * @since February 24, 2021 + */ +public class OriginTimeoutManager { + + private final NettyOrigin origin; + + public OriginTimeoutManager(NettyOrigin origin) { + this.origin = origin; + } + + private static final DynamicLongProperty MAX_OUTBOUND_READ_TIMEOUT_MS = + new DynamicLongProperty("zuul.origin.readtimeout.max", Duration.ofSeconds(90).toMillis()); + + public Object getRequestReadTimeout(IClientConfig requestConfig, Long defaultTimeout) { + return requestConfig.getProperty(ReadTimeout, defaultTimeout); + } + + public void setRequestReadTimeout(IClientConfig requestConfig, Object timeout) { + requestConfig.setProperty(ReadTimeout, timeout); + } + + public Object getOriginReadTimeout(Long noTimeout) { + return origin.getClientConfig().getProperty(ReadTimeout, noTimeout); + } + + public Object computeOverriddenReadTimeout(Object originalTimeout, IClientConfig requestConfig) { + // check if there is a numeric override of the timeout + Integer overriddenReadTimeout = requestConfig.get(ReadTimeout); + if (overriddenReadTimeout != null) { + return overriddenReadTimeout; + } + return originalTimeout; + } + + public IClientConfig getRequestClientConfig(HttpRequestMessage zuulRequest) { + IClientConfig overriddenClientConfig = + (IClientConfig) zuulRequest.getContext().get(CommonContextKeys.REST_CLIENT_CONFIG); + if (overriddenClientConfig == null) { + overriddenClientConfig = new DefaultClientConfigImpl(); + zuulRequest.getContext().put(CommonContextKeys.REST_CLIENT_CONFIG, overriddenClientConfig); + } + + return overriddenClientConfig; + } + + public int computeReadTimeout(IClientConfig requestConfig, int attempt) { + Duration readTimeout = getReadTimeout(requestConfig, attempt); + return Math.toIntExact(readTimeout.toMillis()); + } + + /** + * Derives the read timeout from the configuration. This implementation prefers the longer of either the origin + * timeout or the request timeout. + * + * @param requestConfig the config for the request. + * @param attemptNum the attempt number, starting at 1. + */ + protected Duration getReadTimeout(IClientConfig requestConfig, int attemptNum) { + Long noTimeout = null; + // TODO(carl-mastrangelo): getProperty is deprecated, and suggests using the typed overload `get`. However, + // the value is parsed using parseReadTimeoutMs, which supports String, implying not all timeouts are Integer. + // Figure out where a string ReadTimeout is coming from and replace it. + Long originTimeout = parseReadTimeoutMs(getOriginReadTimeout(noTimeout)); + Long requestTimeout = parseReadTimeoutMs(getRequestReadTimeout(requestConfig, noTimeout)); + + if (originTimeout == null && requestTimeout == null) { + return Duration.ofMillis(MAX_OUTBOUND_READ_TIMEOUT_MS.get()); + } else if (originTimeout == null || requestTimeout == null) { + return Duration.ofMillis(originTimeout == null ? requestTimeout : originTimeout); + } else { + // return the greater of two timeouts + return Duration.ofMillis(originTimeout > requestTimeout ? originTimeout : requestTimeout); + } + } + + /** + * An Integer is expected as an input, but supports parsing Long and String. Returns {@code null} if no type is + * acceptable. + */ + @Nullable + private Long parseReadTimeoutMs(Object p) { + if (p instanceof String && !Strings.isNullOrEmpty((String) p)) { + return Long.valueOf((String) p); + } else if (p instanceof Long) { + return (Long) p; + } else if (p instanceof Integer) { + return Long.valueOf((Integer) p); + } else { + return null; + } + } +} diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java index 3df763c6..a5bd7b5f 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java @@ -25,7 +25,6 @@ import com.netflix.client.config.IClientConfig; import com.netflix.config.CachedDynamicBooleanProperty; import com.netflix.config.CachedDynamicIntProperty; -import com.netflix.loadbalancer.reactive.ExecutionContext; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Registry; import com.netflix.zuul.discovery.DiscoveryResult; @@ -148,26 +147,6 @@ public Registry getSpectatorRegistry() { return registry; } - @Override - public ExecutionContext getExecutionContext(HttpRequestMessage zuulRequest) { - ExecutionContext execCtx = (ExecutionContext) zuulRequest.getContext().get(CommonContextKeys.REST_EXECUTION_CONTEXT); - if (execCtx == null) { - IClientConfig overriddenClientConfig = (IClientConfig) zuulRequest.getContext().get(CommonContextKeys.REST_CLIENT_CONFIG); - if (overriddenClientConfig == null) { - overriddenClientConfig = new DefaultClientConfigImpl(); - zuulRequest.getContext().put(CommonContextKeys.REST_CLIENT_CONFIG, overriddenClientConfig); - } - - final ExecutionContext context = new ExecutionContext<>(zuulRequest, overriddenClientConfig, this.config, null); - context.put("vip", getName().getTarget()); - context.put("clientName", getName().getNiwsClientName()); - - zuulRequest.getContext().set(CommonContextKeys.REST_EXECUTION_CONTEXT, context); - execCtx = context; - } - return execCtx; - } - @Override public void recordFinalError(HttpRequestMessage requestMsg, Throwable throwable) { if (throwable == null) { diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java index 06efc843..c9442158 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java @@ -71,6 +71,4 @@ void onRequestExecutionFailed(final HttpRequestMessage zuulReq, final DiscoveryR IClientConfig getClientConfig(); Registry getSpectatorRegistry(); - - ExecutionContext getExecutionContext(HttpRequestMessage zuulRequest); } From 6f22bd5ac9c102a1f32ff0dbc559b7395676f689 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Thu, 4 Mar 2021 13:50:33 -0800 Subject: [PATCH 236/273] add license --- .../netty/timeouts/OriginTimeoutManager.java | 16 ++++++++++++++++ .../com/netflix/zuul/origins/NettyOrigin.java | 1 - 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java index 8adb7cf0..7e43c84f 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java @@ -1,3 +1,19 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.netflix.zuul.netty.timeouts; import static com.netflix.client.config.CommonClientConfigKey.ReadTimeout; diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java index c9442158..666b17b3 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/NettyOrigin.java @@ -17,7 +17,6 @@ package com.netflix.zuul.origins; import com.netflix.client.config.IClientConfig; -import com.netflix.loadbalancer.reactive.ExecutionContext; import com.netflix.spectator.api.Registry; import com.netflix.zuul.discovery.DiscoveryResult; import com.netflix.zuul.context.SessionContext; From 74bd73d56d10917ca55882f1788656c0842ceea5 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Fri, 5 Mar 2021 10:36:15 -0800 Subject: [PATCH 237/273] null check --- .../com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java index 7e43c84f..512a6e44 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java @@ -26,6 +26,7 @@ import com.netflix.zuul.message.http.HttpRequestMessage; import com.netflix.zuul.origins.NettyOrigin; import java.time.Duration; +import java.util.Objects; import javax.annotation.Nullable; /** @@ -39,7 +40,7 @@ public class OriginTimeoutManager { private final NettyOrigin origin; public OriginTimeoutManager(NettyOrigin origin) { - this.origin = origin; + this.origin = Objects.requireNonNull(origin); } private static final DynamicLongProperty MAX_OUTBOUND_READ_TIMEOUT_MS = From 38fed77875e8e68defad57b22c831d8c38cc0824 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Tue, 9 Mar 2021 15:15:53 -0800 Subject: [PATCH 238/273] remove ribbon dep, downgrade other deps --- zuul-core/build.gradle | 15 ++++++--------- .../zuul/filters/endpoint/ProxyEndpoint.java | 1 - 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index cbf28607..6f08cd70 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -8,21 +8,18 @@ dependencies { api libraries.slf4j implementation 'org.bouncycastle:bcprov-jdk15on:1.+' implementation 'com.fasterxml.jackson.core:jackson-core:2.12.1' - api 'com.fasterxml.jackson.core:jackson-databind:2.12.1' + implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.1' api "com.netflix.archaius:archaius-core:0.7.5" api "com.netflix.spectator:spectator-api:0.123.1" - api "com.netflix.netflix-commons:netflix-commons-util:0.3.0" + implementation "com.netflix.netflix-commons:netflix-commons-util:0.3.0" - api project(":zuul-discovery") + implementation project(":zuul-discovery") - api "com.netflix.ribbon:ribbon-core:${versions_ribbon}" - //TODO(argha-c): the only remaining dep is ExecutionContext. Remove this once decoupled. - api "com.netflix.ribbon:ribbon-loadbalancer:${versions_ribbon}" - api "com.netflix.ribbon:ribbon-archaius:${versions_ribbon}" + implementation "com.netflix.ribbon:ribbon-core:${versions_ribbon}" + implementation "com.netflix.ribbon:ribbon-archaius:${versions_ribbon}" - - api "com.netflix.eureka:eureka-client:1.9.18" + implementation "com.netflix.eureka:eureka-client:1.9.18" api "io.reactivex:rxjava:1.2.1" // TODO(carl-mastrangelo): some of these could probably be implementation. Do a deeper check. diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index b4c5a653..b8105cde 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -37,7 +37,6 @@ import com.netflix.config.CachedDynamicLongProperty; import com.netflix.config.DynamicBooleanProperty; import com.netflix.config.DynamicIntegerSetProperty; -import com.netflix.loadbalancer.Server; import com.netflix.spectator.api.Counter; import com.netflix.zuul.Filter; import com.netflix.zuul.context.CommonContextKeys; From d04ba095882a5182dbc67ace849f0a39e1ecd6dc Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Wed, 10 Mar 2021 10:29:05 -0800 Subject: [PATCH 239/273] Add todo. Avoid string interpolation --- .../netty/connectionpool/DefaultClientChannelManager.java | 4 ++-- .../main/java/com/netflix/zuul/discovery/ResolverResult.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java index 9df2f6d7..11b92f33 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java @@ -391,8 +391,8 @@ final class ServerPoolListener implements ResolverListener { @Override public void onChange(List removedSet) { if (!removedSet.isEmpty()) { - LOG.debug("Removing connection pools for missing servers. name = " + originName - + ". " + removedSet.size() + " servers gone."); + LOG.debug("Removing connection pools for missing servers. name = {}. {} servers gone.", originName, + removedSet.size()); for (DiscoveryResult s : removedSet) { IConnectionPool pool = perServerPools.remove(s); if (pool != null) { diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/ResolverResult.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/ResolverResult.java index cd33a228..b7bda4a2 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/ResolverResult.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/ResolverResult.java @@ -25,6 +25,7 @@ public interface ResolverResult { + //TODO(argha-c): This should ideally model returning a collection of host/port pairs. public String getHost(); public int getPort(); From 62878797cbab4ff4ca0fdc2884f7e7a85c081643 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Wed, 10 Mar 2021 13:37:30 -0800 Subject: [PATCH 240/273] Tests for DiscoveryResult ipAddr and equality --- .../zuul/discovery/DiscoveryResultTest.java | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java b/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java index cc738281..469fe45a 100644 --- a/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java +++ b/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java @@ -24,6 +24,7 @@ import com.netflix.loadbalancer.DynamicServerListLoadBalancer; import com.netflix.loadbalancer.Server; import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; +import java.util.Optional; import org.junit.Test; public class DiscoveryResultTest { @@ -80,4 +81,74 @@ public void serverStatsDifferForDifferentServer() { Truth.assertThat(result.getServerStats()).isNotSameInstanceAs(result1.getServerStats()); } + + @Test + public void ipAddrV4FromInstanceInfo() { + final String ipAddr = "100.1.0.1"; + final InstanceInfo instanceInfo = Builder.newBuilder() + .setAppName("ipAddrv4") + .setHostName("ipAddrv4") + .setIPAddr(ipAddr) + .setPort(7777).build(); + + final DiscoveryEnabledServer server = new DiscoveryEnabledServer(instanceInfo, false); + final DynamicServerListLoadBalancer lb = new DynamicServerListLoadBalancer<>(new DefaultClientConfigImpl()); + final DiscoveryResult result = new DiscoveryResult(server, lb.getLoadBalancerStats()); + + Truth.assertThat(result.getIPAddr()).isEqualTo(Optional.of(ipAddr)); + } + + @Test + public void ipAddrEmptyForIncompleteInstanceInfo() { + final InstanceInfo instanceInfo = Builder.newBuilder() + .setAppName("ipAddrMissing") + .setHostName("ipAddrMissing") + .setPort(7777).build(); + + final DiscoveryEnabledServer server = new DiscoveryEnabledServer(instanceInfo, false); + final DynamicServerListLoadBalancer lb = new DynamicServerListLoadBalancer<>(new DefaultClientConfigImpl()); + final DiscoveryResult result = new DiscoveryResult(server, lb.getLoadBalancerStats()); + + Truth.assertThat(result.getIPAddr()).isEqualTo(Optional.empty()); + } + + @Test + public void sameUnderlyingInstanceInfoEqualsSameResult() { + final InstanceInfo instanceInfo = Builder.newBuilder() + .setAppName("server-equality") + .setHostName("server-equality") + .setPort(7777).build(); + + final DiscoveryEnabledServer server = new DiscoveryEnabledServer(instanceInfo, false); + final DiscoveryEnabledServer otherServer = new DiscoveryEnabledServer(instanceInfo, false); + + final DynamicServerListLoadBalancer lb = new DynamicServerListLoadBalancer<>(new DefaultClientConfigImpl()); + + final DiscoveryResult result = new DiscoveryResult(server, lb.getLoadBalancerStats()); + final DiscoveryResult otherResult = new DiscoveryResult(otherServer, lb.getLoadBalancerStats()); + + Truth.assertThat(result).isEqualTo(otherResult); + } + + @Test + public void serverInstancesExposingDiffPortsAreNotEqual() { + final InstanceInfo instanceInfo = Builder.newBuilder() + .setAppName("server-equality") + .setHostName("server-equality") + .setPort(7777).build(); + final InstanceInfo otherPort = Builder.newBuilder() + .setAppName("server-equality") + .setHostName("server-equality") + .setPort(9999).build(); + + final DiscoveryEnabledServer server = new DiscoveryEnabledServer(instanceInfo, false); + final DiscoveryEnabledServer otherServer = new DiscoveryEnabledServer(otherPort, false); + + final DynamicServerListLoadBalancer lb = new DynamicServerListLoadBalancer<>(new DefaultClientConfigImpl()); + + final DiscoveryResult result = new DiscoveryResult(server, lb.getLoadBalancerStats()); + final DiscoveryResult otherResult = new DiscoveryResult(otherServer, lb.getLoadBalancerStats()); + + Truth.assertThat(result).isNotEqualTo(otherResult); + } } From 0e818fbe3c0381827aa1dd01a4de13c55682a41a Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Wed, 10 Mar 2021 15:43:09 -0800 Subject: [PATCH 241/273] Tests for bug fix on server ref update during conn. acquire --- .../DefaultClientChannelManagerTest.java | 60 ++++++++++++++++++- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java index c9307d4c..9c443f33 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManagerTest.java @@ -18,22 +18,32 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; import com.google.common.net.InetAddresses; import com.google.common.truth.Truth; import com.netflix.appinfo.InstanceInfo; import com.netflix.appinfo.InstanceInfo.Builder; +import com.netflix.client.config.DefaultClientConfigImpl; +import com.netflix.spectator.api.DefaultRegistry; import com.netflix.zuul.discovery.DiscoveryResult; +import com.netflix.zuul.discovery.DynamicServerResolver; import com.netflix.zuul.discovery.NonDiscoveryServer; import com.netflix.zuul.origins.OriginName; +import com.netflix.zuul.passport.CurrentPassport; +import io.netty.channel.DefaultEventLoop; +import io.netty.util.concurrent.Promise; import java.net.InetSocketAddress; import java.net.SocketAddress; +import java.util.concurrent.atomic.AtomicReference; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; /** - * Tests for {@link DefaultClientChannelManager}. These tests don't use IPv6 addresses because {@link InstanceInfo} - * is not capable of expressing them. + * Tests for {@link DefaultClientChannelManager}. These tests don't use IPv6 addresses because {@link InstanceInfo} is + * not capable of expressing them. */ @RunWith(JUnit4.class) public class DefaultClientChannelManagerTest { @@ -91,4 +101,50 @@ public void pickAddressInternal_nonDiscovery_unresolved() { assertTrue(socketAddress.toString(), socketAddress.getAddress().isLoopbackAddress()); assertEquals(443, socketAddress.getPort()); } + + @Test + public void updateServerRefOnEmptyDiscoveryResult() { + OriginName originName = OriginName.fromVip("vip", "test"); + final DefaultClientConfigImpl clientConfig = new DefaultClientConfigImpl(); + final DynamicServerResolver resolver = mock(DynamicServerResolver.class); + + when(resolver.resolve(any())).thenReturn(DiscoveryResult.EMPTY); + + final DefaultClientChannelManager clientChannelManager = new DefaultClientChannelManager(originName, + clientConfig, resolver, new DefaultRegistry()); + + final AtomicReference serverRef = new AtomicReference<>(); + + final Promise promise = clientChannelManager + .acquire(new DefaultEventLoop(), null, CurrentPassport.create(), serverRef, new AtomicReference<>()); + + Truth.assertThat(promise.isSuccess()).isFalse(); + Truth.assertThat(serverRef.get()).isSameInstanceAs(DiscoveryResult.EMPTY); + } + + @Test + public void updateServerRefOnValidDiscoveryResult() { + OriginName originName = OriginName.fromVip("vip", "test"); + final DefaultClientConfigImpl clientConfig = new DefaultClientConfigImpl(); + + final DynamicServerResolver resolver = mock(DynamicServerResolver.class); + final InstanceInfo instanceInfo = Builder.newBuilder() + .setAppName("server-equality") + .setHostName("server-equality") + .setPort(7777).build(); + final DiscoveryResult discoveryResult = DiscoveryResult.from(instanceInfo, false); + + when(resolver.resolve(any())).thenReturn(discoveryResult); + + final DefaultClientChannelManager clientChannelManager = new DefaultClientChannelManager(originName, + clientConfig, resolver, new DefaultRegistry()); + + final AtomicReference serverRef = new AtomicReference<>(); + + //TODO(argha-c) capture and assert on the promise once we have a dummy with ServerStats initialized + clientChannelManager + .acquire(new DefaultEventLoop(), null, CurrentPassport.create(), serverRef, new AtomicReference<>()); + + Truth.assertThat(serverRef.get()).isSameInstanceAs(discoveryResult); + } } From fd331add04b47e6c26bd56ed761b214b70d59d3f Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Fri, 12 Mar 2021 13:51:57 -0800 Subject: [PATCH 242/273] revert dep downgrade --- zuul-core/build.gradle | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index 6f08cd70..57973ac3 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -8,18 +8,18 @@ dependencies { api libraries.slf4j implementation 'org.bouncycastle:bcprov-jdk15on:1.+' implementation 'com.fasterxml.jackson.core:jackson-core:2.12.1' - implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.1' + api 'com.fasterxml.jackson.core:jackson-databind:2.12.1' api "com.netflix.archaius:archaius-core:0.7.5" api "com.netflix.spectator:spectator-api:0.123.1" - implementation "com.netflix.netflix-commons:netflix-commons-util:0.3.0" + api "com.netflix.netflix-commons:netflix-commons-util:0.3.0" - implementation project(":zuul-discovery") + api project(":zuul-discovery") - implementation "com.netflix.ribbon:ribbon-core:${versions_ribbon}" - implementation "com.netflix.ribbon:ribbon-archaius:${versions_ribbon}" + api "com.netflix.ribbon:ribbon-core:${versions_ribbon}" + api "com.netflix.ribbon:ribbon-archaius:${versions_ribbon}" - implementation "com.netflix.eureka:eureka-client:1.9.18" + api "com.netflix.eureka:eureka-client:1.9.18" api "io.reactivex:rxjava:1.2.1" // TODO(carl-mastrangelo): some of these could probably be implementation. Do a deeper check. From a505245a36d0b4308e457f762d41899ede5ae2c3 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Tue, 16 Mar 2021 15:12:24 -0700 Subject: [PATCH 243/273] InstanceInfo is SoT for secure port advertisement --- .../zuul/discovery/DiscoveryResult.java | 3 ++- .../zuul/discovery/DiscoveryResultTest.java | 27 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java index 17135289..f99e9d30 100644 --- a/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java +++ b/zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java @@ -19,6 +19,7 @@ import com.google.common.annotations.VisibleForTesting; import com.netflix.appinfo.AmazonInfo; import com.netflix.appinfo.InstanceInfo; +import com.netflix.appinfo.InstanceInfo.PortType; import com.netflix.loadbalancer.LoadBalancerStats; import com.netflix.loadbalancer.ServerStats; import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; @@ -108,7 +109,7 @@ public int getSecurePort() { } public boolean isSecurePortEnabled() { - return server.getPort() == server.getInstanceInfo().getSecurePort(); + return server.getInstanceInfo().isPortEnabled(PortType.SECURE); } public String getTarget() { diff --git a/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java b/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java index 469fe45a..f3ba8cc8 100644 --- a/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java +++ b/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java @@ -20,6 +20,7 @@ import com.google.common.truth.Truth; import com.netflix.appinfo.InstanceInfo; import com.netflix.appinfo.InstanceInfo.Builder; +import com.netflix.appinfo.InstanceInfo.PortType; import com.netflix.client.config.DefaultClientConfigImpl; import com.netflix.loadbalancer.DynamicServerListLoadBalancer; import com.netflix.loadbalancer.Server; @@ -151,4 +152,30 @@ public void serverInstancesExposingDiffPortsAreNotEqual() { Truth.assertThat(result).isNotEqualTo(otherResult); } + + @Test + public void securePortMustCheckInstanceInfo() { + final InstanceInfo instanceInfo = Builder.newBuilder() + .setAppName("secure-port") + .setHostName("secure-port") + .setPort(7777) + .enablePort(PortType.SECURE, false) + .build(); + final InstanceInfo secureEnabled = Builder.newBuilder() + .setAppName("secure-port") + .setHostName("secure-port") + .setPort(7777) + .enablePort(PortType.SECURE, true) + .build(); + + final DiscoveryEnabledServer server = new DiscoveryEnabledServer(instanceInfo, true); + final DiscoveryEnabledServer secureServer = new DiscoveryEnabledServer(secureEnabled, true); + final DynamicServerListLoadBalancer lb = new DynamicServerListLoadBalancer<>(new DefaultClientConfigImpl()); + + final DiscoveryResult result = new DiscoveryResult(server, lb.getLoadBalancerStats()); + final DiscoveryResult secure = new DiscoveryResult(secureServer, lb.getLoadBalancerStats()); + + Truth.assertThat(result.isSecurePortEnabled()).isFalse(); + Truth.assertThat(secure.isSecurePortEnabled()).isTrue(); + } } From 46ffcb6aa9024f76faf57ae6d25c05f7cb8a68c2 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Mon, 22 Mar 2021 18:35:26 -0700 Subject: [PATCH 244/273] simplify read timeout functionality and move to using Duration --- .../zuul/filters/endpoint/ProxyEndpoint.java | 68 +++++-------------- .../connectionpool/ClientTimeoutHandler.java | 7 +- .../connectionpool/PooledConnection.java | 6 +- .../netty/timeouts/OriginTimeoutManager.java | 45 ++++-------- .../com/netflix/zuul/niws/RequestAttempt.java | 6 +- 5 files changed, 44 insertions(+), 88 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index b8105cde..afa1e4f8 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -26,12 +26,12 @@ import static com.netflix.zuul.stats.status.ZuulStatusCategory.SUCCESS; import static com.netflix.zuul.stats.status.ZuulStatusCategory.SUCCESS_LOCAL_NO_ROUTE; import static com.netflix.zuul.stats.status.ZuulStatusCategory.SUCCESS_NOT_FOUND; + import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import com.google.common.collect.Sets; import com.google.errorprone.annotations.ForOverride; import com.netflix.client.ClientException; -import com.netflix.client.config.IClientConfig; import com.netflix.client.config.IClientConfigKey; import com.netflix.client.config.IClientConfigKey.Keys; import com.netflix.config.CachedDynamicLongProperty; @@ -139,8 +139,7 @@ public class ProxyEndpoint extends SyncZuulFilterAdapter methodBinding; protected HttpResponseMessage zuulResponse; protected boolean startedSendingResponseToClient; - // this is an Object because it can be a String or Integer depending on timeout config - protected Object originalReadTimeout; + protected Duration timeLeftForAttempt; /* Individual retry related state */ private volatile PooledConnection originConn; @@ -294,16 +293,6 @@ public HttpResponseMessage apply(final HttpRequestMessage input) { return null; } - // To act the same as Ribbon, we must do this before starting execution (as well as before each attempt). - IClientConfig requestConfig = originTimeoutManager.getRequestClientConfig(zuulRequest); - - // set original timeout so we can have a default to reset attempts to - originalReadTimeout = originTimeoutManager.getRequestReadTimeout(requestConfig, null); - - // compute read timeout from existing configs - int computeReadTimeout = originTimeoutManager.computeReadTimeout(requestConfig, 1); - originTimeoutManager.setRequestReadTimeout(requestConfig, computeReadTimeout); - origin.onRequestExecutionStart(zuulRequest); proxyRequestToOrigin(); @@ -389,11 +378,14 @@ private void storeAndLogOriginRequestInfo() { if (attemptToChosenHostMap == null) { attemptToChosenHostMap = new HashMap<>(); } - String ipAddr = origin.getIpAddrFromServer(chosenServer.get()); - if (ipAddr != null) { - attemptToIpAddressMap.put(attemptNum, ipAddr); - eventProps.put(CommonContextKeys.ZUUL_ORIGIN_ATTEMPT_IPADDR_MAP_KEY, attemptToIpAddressMap); - context.put(CommonContextKeys.ZUUL_ORIGIN_ATTEMPT_IPADDR_MAP_KEY, attemptToIpAddressMap); + + if (chosenServer.get() != null) { + String ipAddr = origin.getIpAddrFromServer(chosenServer.get()); + if (ipAddr != null) { + attemptToIpAddressMap.put(attemptNum, ipAddr); + eventProps.put(CommonContextKeys.ZUUL_ORIGIN_ATTEMPT_IPADDR_MAP_KEY, attemptToIpAddressMap); + context.put(CommonContextKeys.ZUUL_ORIGIN_ATTEMPT_IPADDR_MAP_KEY, attemptToIpAddressMap); + } } if (chosenHostAddr.get() != null) { attemptToChosenHostMap.put(attemptNum, chosenHostAddr.get()); @@ -413,11 +405,8 @@ private void proxyRequestToOrigin() { try { attemptNum += 1; - IClientConfig requestConfig = originTimeoutManager.getRequestClientConfig(zuulRequest); - - // compute read timeout from existing configs - int computeReadTimeout = originTimeoutManager.computeReadTimeout(requestConfig, attemptNum); - originTimeoutManager.setRequestReadTimeout(requestConfig, computeReadTimeout); + // compute how much time we have left for this attempt + timeLeftForAttempt = originTimeoutManager.computeReadTimeout(zuulRequest, attemptNum); currentRequestStat = createRequestStat(); origin.preRequestChecks(zuulRequest); @@ -464,11 +453,9 @@ protected RequestStat createRequestStat() { @Override public void operationComplete(final Future connectResult) { - // MUST run this within bindingcontext because RequestExpiryProcessor (and probably other things) depends on ThreadVariables. + // MUST run this within bindingcontext to support ThreadVariables. try { methodBinding.bind(() -> { - - Object readTimeout = null; DiscoveryResult server = chosenServer.get(); /** TODO(argha-c): This reliance on mutable update of the `chosenServer` must be improved. @@ -479,31 +466,12 @@ public void operationComplete(final Future connectResult) { currentRequestStat.server(server); } - // Invoke the ribbon execution listeners (including RequestExpiry). - IClientConfig requestConfig = originTimeoutManager.getRequestClientConfig(zuulRequest); - try { - readTimeout = originTimeoutManager.getRequestReadTimeout(requestConfig, null); - - origin.onRequestStartWithServer(zuulRequest, server, attemptNum); - - // As the read-timeout can be overridden in the listeners executed from onRequestStartWithServer() above - // check now to see if it was. And if it was, then use that. - readTimeout = originTimeoutManager.computeOverriddenReadTimeout(readTimeout, requestConfig); - } - catch (Throwable e) { - handleError(e); - return; - } - finally { - // Reset the timeout in overriddenConfig back to what it was before, otherwise it will take - // preference on subsequent retry attempts in RequestExpiryProcessor. - originTimeoutManager.setRequestReadTimeout(requestConfig, originalReadTimeout); - } + origin.onRequestStartWithServer(zuulRequest, server, attemptNum); } // Handle the connection establishment result. if (connectResult.isSuccess()) { - onOriginConnectSucceeded(connectResult.getNow(), (Integer) readTimeout); + onOriginConnectSucceeded(connectResult.getNow(), timeLeftForAttempt); } else { onOriginConnectFailed(connectResult.cause()); } @@ -519,7 +487,7 @@ public void operationComplete(final Future connectResult) { } } - private void onOriginConnectSucceeded(PooledConnection conn, int readTimeout) { + private void onOriginConnectSucceeded(PooledConnection conn, Duration readTimeout) { passport.add(ORIGIN_CONN_ACQUIRE_END); if (context.isCancelled()) { @@ -531,7 +499,7 @@ private void onOriginConnectSucceeded(PooledConnection conn, int readTimeout) { } else { // Update the RequestAttempt to reflect the readTimeout chosen. - currentRequestAttempt.setReadTimeout(readTimeout); + currentRequestAttempt.setReadTimeout(readTimeout.toMillis()); // Start sending the request to origin now. writeClientRequestToOrigin(conn, readTimeout); @@ -579,7 +547,7 @@ private void repopulateRetryBody() { } } - private void writeClientRequestToOrigin(final PooledConnection conn, int readTimeout) { + private void writeClientRequestToOrigin(final PooledConnection conn, Duration readTimeout) { final Channel ch = conn.getChannel(); passport.setOnChannel(ch); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientTimeoutHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientTimeoutHandler.java index b63c2e7e..ca02939a 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientTimeoutHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientTimeoutHandler.java @@ -22,6 +22,7 @@ import io.netty.channel.ChannelPromise; import io.netty.handler.codec.http.LastHttpContent; import io.netty.util.AttributeKey; +import java.time.Duration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -34,7 +35,7 @@ public final class ClientTimeoutHandler { private static final Logger LOG = LoggerFactory.getLogger(ClientTimeoutHandler.class); - public static final AttributeKey ORIGIN_RESPONSE_READ_TIMEOUT = AttributeKey.newInstance("originResponseReadTimeout"); + public static final AttributeKey ORIGIN_RESPONSE_READ_TIMEOUT = AttributeKey.newInstance("originResponseReadTimeout"); public static final class InboundHandler extends ChannelInboundHandlerAdapter { @Override @@ -55,10 +56,10 @@ public static final class OutboundHandler extends ChannelOutboundHandlerAdapter @Override public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { try { - final Integer timeout = ctx.channel().attr(ORIGIN_RESPONSE_READ_TIMEOUT).get(); + final Duration timeout = ctx.channel().attr(ORIGIN_RESPONSE_READ_TIMEOUT).get(); if (timeout != null && msg instanceof LastHttpContent) { promise.addListener(e -> { - LOG.debug("[{}] Adding read timeout handler: {}", ctx.channel().id(), timeout); + LOG.debug("[{}] Adding read timeout handler: {}", ctx.channel().id(), timeout.toMillis()); PooledConnection.getFromChannel(ctx.channel()).startReadTimeoutHandler(timeout); }); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java index 88637ad4..a271f47e 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PooledConnection.java @@ -24,6 +24,7 @@ import io.netty.channel.ChannelPipeline; import io.netty.handler.timeout.ReadTimeoutHandler; import io.netty.util.AttributeKey; +import java.time.Duration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -223,9 +224,10 @@ private void removeHandlerFromPipeline(String handlerName, ChannelPipeline pipel } } - public void startReadTimeoutHandler(int readTimeout) + public void startReadTimeoutHandler(Duration readTimeout) { - channel.pipeline().addBefore("originNettyLogger", READ_TIMEOUT_HANDLER_NAME, new ReadTimeoutHandler(readTimeout, TimeUnit.MILLISECONDS)); + channel.pipeline().addBefore("originNettyLogger", READ_TIMEOUT_HANDLER_NAME, + new ReadTimeoutHandler(readTimeout.toMillis(), TimeUnit.MILLISECONDS)); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java index 512a6e44..dbaedfa5 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java @@ -46,28 +46,8 @@ public OriginTimeoutManager(NettyOrigin origin) { private static final DynamicLongProperty MAX_OUTBOUND_READ_TIMEOUT_MS = new DynamicLongProperty("zuul.origin.readtimeout.max", Duration.ofSeconds(90).toMillis()); - public Object getRequestReadTimeout(IClientConfig requestConfig, Long defaultTimeout) { - return requestConfig.getProperty(ReadTimeout, defaultTimeout); - } - - public void setRequestReadTimeout(IClientConfig requestConfig, Object timeout) { - requestConfig.setProperty(ReadTimeout, timeout); - } - - public Object getOriginReadTimeout(Long noTimeout) { - return origin.getClientConfig().getProperty(ReadTimeout, noTimeout); - } - - public Object computeOverriddenReadTimeout(Object originalTimeout, IClientConfig requestConfig) { - // check if there is a numeric override of the timeout - Integer overriddenReadTimeout = requestConfig.get(ReadTimeout); - if (overriddenReadTimeout != null) { - return overriddenReadTimeout; - } - return originalTimeout; - } - public IClientConfig getRequestClientConfig(HttpRequestMessage zuulRequest) { + protected IClientConfig getRequestClientConfig(HttpRequestMessage zuulRequest) { IClientConfig overriddenClientConfig = (IClientConfig) zuulRequest.getContext().get(CommonContextKeys.REST_CLIENT_CONFIG); if (overriddenClientConfig == null) { @@ -78,25 +58,20 @@ public IClientConfig getRequestClientConfig(HttpRequestMessage zuulRequest) { return overriddenClientConfig; } - public int computeReadTimeout(IClientConfig requestConfig, int attempt) { - Duration readTimeout = getReadTimeout(requestConfig, attempt); - return Math.toIntExact(readTimeout.toMillis()); - } - /** * Derives the read timeout from the configuration. This implementation prefers the longer of either the origin * timeout or the request timeout. * - * @param requestConfig the config for the request. - * @param attemptNum the attempt number, starting at 1. + * @param request the request. + * @param attemptNum the attempt number, starting at 1. */ - protected Duration getReadTimeout(IClientConfig requestConfig, int attemptNum) { + public Duration computeReadTimeout(HttpRequestMessage request, int attemptNum) { Long noTimeout = null; // TODO(carl-mastrangelo): getProperty is deprecated, and suggests using the typed overload `get`. However, // the value is parsed using parseReadTimeoutMs, which supports String, implying not all timeouts are Integer. // Figure out where a string ReadTimeout is coming from and replace it. Long originTimeout = parseReadTimeoutMs(getOriginReadTimeout(noTimeout)); - Long requestTimeout = parseReadTimeoutMs(getRequestReadTimeout(requestConfig, noTimeout)); + Long requestTimeout = parseReadTimeoutMs(getRequestReadTimeout(request, noTimeout)); if (originTimeout == null && requestTimeout == null) { return Duration.ofMillis(MAX_OUTBOUND_READ_TIMEOUT_MS.get()); @@ -124,4 +99,14 @@ private Long parseReadTimeoutMs(Object p) { return null; } } + + @Nullable + private Object getRequestReadTimeout(HttpRequestMessage zuulRequest, Long defaultTimeout) { + return getRequestClientConfig(zuulRequest).getProperty(ReadTimeout, defaultTimeout); + } + + @Nullable + private Object getOriginReadTimeout(Long noTimeout) { + return origin.getClientConfig().getProperty(ReadTimeout, noTimeout); + } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java index ae301460..5a7a413a 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java +++ b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java @@ -55,7 +55,7 @@ public class RequestAttempt private String vip; private String region; private String availabilityZone; - private int readTimeout; + private long readTimeout; private int connectTimeout; private int maxRetries; @@ -209,7 +209,7 @@ public String getExceptionType() return exceptionType; } - public int getReadTimeout() + public long getReadTimeout() { return readTimeout; } @@ -279,7 +279,7 @@ public void setAvailabilityZone(String availabilityZone) this.availabilityZone = availabilityZone; } - public void setReadTimeout(int readTimeout) + public void setReadTimeout(long readTimeout) { this.readTimeout = readTimeout; } From 023b30f6961b7ca5a7cc2c846d739be6e96944d1 Mon Sep 17 00:00:00 2001 From: Roberto Perez Alcolea Date: Mon, 22 Mar 2021 20:55:06 -0700 Subject: [PATCH 245/273] Replace JCenter with MavenCentral (#1030) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5c1f01b8..5e38389b 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ configurations.all { allprojects { repositories { - jcenter() + mavenCentral() } } From f58d10bf86c34aab83d30af65017ec4ec4b27e86 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Tue, 23 Mar 2021 09:58:43 -0700 Subject: [PATCH 246/273] add comments, clean up method signatures --- .../zuul/filters/endpoint/ProxyEndpoint.java | 7 +- .../netty/timeouts/OriginTimeoutManager.java | 78 +++++++++---------- 2 files changed, 44 insertions(+), 41 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index afa1e4f8..e08d8410 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -379,6 +379,7 @@ private void storeAndLogOriginRequestInfo() { attemptToChosenHostMap = new HashMap<>(); } + // the chosen server can be null in the case of a timeout exception that skips acquiring a new origin connection if (chosenServer.get() != null) { String ipAddr = origin.getIpAddrFromServer(chosenServer.get()); if (ipAddr != null) { @@ -405,7 +406,11 @@ private void proxyRequestToOrigin() { try { attemptNum += 1; - // compute how much time we have left for this attempt + /* + * Before connecting to the origin, we need to compute how much time we have left for this attempt. This + * method is also intended to validate deadline and timeouts boundaries for the request as a whole and could + * throw an exception, skipping the logic below. + */ timeLeftForAttempt = originTimeoutManager.computeReadTimeout(zuulRequest, attemptNum); currentRequestStat = createRequestStat(); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java index dbaedfa5..ac5038c6 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java @@ -16,9 +16,7 @@ package com.netflix.zuul.netty.timeouts; -import static com.netflix.client.config.CommonClientConfigKey.ReadTimeout; - -import com.google.common.base.Strings; +import com.netflix.client.config.CommonClientConfigKey; import com.netflix.client.config.DefaultClientConfigImpl; import com.netflix.client.config.IClientConfig; import com.netflix.config.DynamicLongProperty; @@ -27,6 +25,7 @@ import com.netflix.zuul.origins.NettyOrigin; import java.time.Duration; import java.util.Objects; +import java.util.Optional; import javax.annotation.Nullable; /** @@ -46,67 +45,66 @@ public OriginTimeoutManager(NettyOrigin origin) { private static final DynamicLongProperty MAX_OUTBOUND_READ_TIMEOUT_MS = new DynamicLongProperty("zuul.origin.readtimeout.max", Duration.ofSeconds(90).toMillis()); - - protected IClientConfig getRequestClientConfig(HttpRequestMessage zuulRequest) { - IClientConfig overriddenClientConfig = - (IClientConfig) zuulRequest.getContext().get(CommonContextKeys.REST_CLIENT_CONFIG); - if (overriddenClientConfig == null) { - overriddenClientConfig = new DefaultClientConfigImpl(); - zuulRequest.getContext().put(CommonContextKeys.REST_CLIENT_CONFIG, overriddenClientConfig); - } - - return overriddenClientConfig; - } - /** * Derives the read timeout from the configuration. This implementation prefers the longer of either the origin * timeout or the request timeout. + *

+ * This method can also be used to validate timeout and deadline boundaries and throw exceptions as needed. If + * extending this method to do validation, you should extend {@link com.netflix.zuul.exception.OutboundException} + * and set the appropriate {@link com.netflix.zuul.exception.ErrorType}. * - * @param request the request. + * @param request the request. * @param attemptNum the attempt number, starting at 1. */ public Duration computeReadTimeout(HttpRequestMessage request, int attemptNum) { - Long noTimeout = null; - // TODO(carl-mastrangelo): getProperty is deprecated, and suggests using the typed overload `get`. However, - // the value is parsed using parseReadTimeoutMs, which supports String, implying not all timeouts are Integer. - // Figure out where a string ReadTimeout is coming from and replace it. - Long originTimeout = parseReadTimeoutMs(getOriginReadTimeout(noTimeout)); - Long requestTimeout = parseReadTimeoutMs(getRequestReadTimeout(request, noTimeout)); + IClientConfig clientConfig = getRequestClientConfig(request); + Long originTimeout = getOriginReadTimeout(); + Long requestTimeout = getRequestReadTimeout(clientConfig); if (originTimeout == null && requestTimeout == null) { return Duration.ofMillis(MAX_OUTBOUND_READ_TIMEOUT_MS.get()); } else if (originTimeout == null || requestTimeout == null) { return Duration.ofMillis(originTimeout == null ? requestTimeout : originTimeout); } else { - // return the greater of two timeouts - return Duration.ofMillis(originTimeout > requestTimeout ? originTimeout : requestTimeout); + // return the stricter (i.e. lower) of two timeouts + return Duration.ofMillis(originTimeout > requestTimeout ? requestTimeout : originTimeout); } } /** - * An Integer is expected as an input, but supports parsing Long and String. Returns {@code null} if no type is - * acceptable. + * This method will create a new client config or retrieve the existing one from the current request. + * + * @param zuulRequest - the request + * @return the config */ - @Nullable - private Long parseReadTimeoutMs(Object p) { - if (p instanceof String && !Strings.isNullOrEmpty((String) p)) { - return Long.valueOf((String) p); - } else if (p instanceof Long) { - return (Long) p; - } else if (p instanceof Integer) { - return Long.valueOf((Integer) p); - } else { - return null; + protected IClientConfig getRequestClientConfig(HttpRequestMessage zuulRequest) { + IClientConfig overriddenClientConfig = + (IClientConfig) zuulRequest.getContext().get(CommonContextKeys.REST_CLIENT_CONFIG); + if (overriddenClientConfig == null) { + overriddenClientConfig = new DefaultClientConfigImpl(); + zuulRequest.getContext().put(CommonContextKeys.REST_CLIENT_CONFIG, overriddenClientConfig); } + + return overriddenClientConfig; } + /** + * This method makes the assumption that the timeout is a numeric value + */ @Nullable - private Object getRequestReadTimeout(HttpRequestMessage zuulRequest, Long defaultTimeout) { - return getRequestClientConfig(zuulRequest).getProperty(ReadTimeout, defaultTimeout); + private Long getRequestReadTimeout(IClientConfig clientConfig) { + return Optional.ofNullable(clientConfig.get(CommonClientConfigKey.ReadTimeout)) + .map(Long::valueOf) + .orElse(null); } + /** + * This method makes the assumption that the timeout is a numeric value + */ @Nullable - private Object getOriginReadTimeout(Long noTimeout) { - return origin.getClientConfig().getProperty(ReadTimeout, noTimeout); + private Long getOriginReadTimeout() { + return Optional.ofNullable(origin.getClientConfig().get(CommonClientConfigKey.ReadTimeout)) + .map(Long::valueOf) + .orElse(null); } } From 269c9af2e087cbc97f6ad1a18ca6ba3bdbbff1db Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Tue, 23 Mar 2021 10:31:01 -0700 Subject: [PATCH 247/273] fix timeout computation logic, add tests --- .../netty/timeouts/OriginTimeoutManager.java | 16 ++- .../timeouts/OriginTimeoutManagerTest.java | 121 ++++++++++++++++++ 2 files changed, 132 insertions(+), 5 deletions(-) create mode 100644 zuul-core/src/test/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManagerTest.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java index ac5038c6..9a5530da 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManager.java @@ -16,6 +16,7 @@ package com.netflix.zuul.netty.timeouts; +import com.google.common.annotations.VisibleForTesting; import com.netflix.client.config.CommonClientConfigKey; import com.netflix.client.config.DefaultClientConfigImpl; import com.netflix.client.config.IClientConfig; @@ -42,7 +43,8 @@ public OriginTimeoutManager(NettyOrigin origin) { this.origin = Objects.requireNonNull(origin); } - private static final DynamicLongProperty MAX_OUTBOUND_READ_TIMEOUT_MS = + @VisibleForTesting + static final DynamicLongProperty MAX_OUTBOUND_READ_TIMEOUT_MS = new DynamicLongProperty("zuul.origin.readtimeout.max", Duration.ofSeconds(90).toMillis()); /** @@ -61,14 +63,18 @@ public Duration computeReadTimeout(HttpRequestMessage request, int attemptNum) { Long originTimeout = getOriginReadTimeout(); Long requestTimeout = getRequestReadTimeout(clientConfig); + long computedTimeout; if (originTimeout == null && requestTimeout == null) { - return Duration.ofMillis(MAX_OUTBOUND_READ_TIMEOUT_MS.get()); + computedTimeout = MAX_OUTBOUND_READ_TIMEOUT_MS.get(); } else if (originTimeout == null || requestTimeout == null) { - return Duration.ofMillis(originTimeout == null ? requestTimeout : originTimeout); + computedTimeout = originTimeout == null ? requestTimeout : originTimeout; } else { - // return the stricter (i.e. lower) of two timeouts - return Duration.ofMillis(originTimeout > requestTimeout ? requestTimeout : originTimeout); + // return the stricter (i.e. lower) of the two timeouts + computedTimeout = Math.min(originTimeout, requestTimeout); } + + // enforce max timeout upperbound + return Duration.ofMillis(Math.min(computedTimeout, MAX_OUTBOUND_READ_TIMEOUT_MS.get())); } /** diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManagerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManagerTest.java new file mode 100644 index 00000000..f66cbf2a --- /dev/null +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManagerTest.java @@ -0,0 +1,121 @@ +package com.netflix.zuul.netty.timeouts; + +import static com.netflix.zuul.netty.timeouts.OriginTimeoutManager.MAX_OUTBOUND_READ_TIMEOUT_MS; +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.when; + +import com.netflix.client.config.CommonClientConfigKey; +import com.netflix.client.config.DefaultClientConfigImpl; +import com.netflix.client.config.IClientConfig; +import com.netflix.zuul.context.CommonContextKeys; +import com.netflix.zuul.context.SessionContext; +import com.netflix.zuul.message.http.HttpRequestMessage; +import com.netflix.zuul.origins.NettyOrigin; +import java.time.Duration; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; + +/** + * Origin Timeout Manager Test + * + * @author Arthur Gonigberg + * @since March 23, 2021 + */ +@RunWith(MockitoJUnitRunner.class) +public class OriginTimeoutManagerTest { + + @Mock + private NettyOrigin origin; + @Mock + private HttpRequestMessage request; + + private SessionContext context; + private IClientConfig requestConfig; + private IClientConfig originConfig; + + private OriginTimeoutManager originTimeoutManager; + + @Before + public void before() { + originTimeoutManager = new OriginTimeoutManager(origin); + + context = new SessionContext(); + when(request.getContext()).thenReturn(context); + + requestConfig = new DefaultClientConfigImpl(); + originConfig = new DefaultClientConfigImpl(); + + context.put(CommonContextKeys.REST_CLIENT_CONFIG, requestConfig); + when(origin.getClientConfig()).thenReturn(originConfig); + } + + @Test + public void computeReadTimeout_default() { + Duration timeout = originTimeoutManager.computeReadTimeout(request, 1); + + assertEquals(MAX_OUTBOUND_READ_TIMEOUT_MS.get(), timeout.toMillis()); + } + + @Test + public void computeReadTimeout_requestOnly() { + requestConfig.set(CommonClientConfigKey.ReadTimeout, 1000); + + Duration timeout = originTimeoutManager.computeReadTimeout(request, 1); + + assertEquals(1000, timeout.toMillis()); + } + + @Test + public void computeReadTimeout_originOnly() { + originConfig.set(CommonClientConfigKey.ReadTimeout, 1000); + + Duration timeout = originTimeoutManager.computeReadTimeout(request, 1); + + assertEquals(1000, timeout.toMillis()); + } + + @Test + public void computeReadTimeout_bolth_equal() { + requestConfig.set(CommonClientConfigKey.ReadTimeout, 1000); + originConfig.set(CommonClientConfigKey.ReadTimeout, 1000); + + Duration timeout = originTimeoutManager.computeReadTimeout(request, 1); + + assertEquals(1000, timeout.toMillis()); + } + + @Test + public void computeReadTimeout_bolth_originLower() { + requestConfig.set(CommonClientConfigKey.ReadTimeout, 1000); + originConfig.set(CommonClientConfigKey.ReadTimeout, 100); + + Duration timeout = originTimeoutManager.computeReadTimeout(request, 1); + + assertEquals(100, timeout.toMillis()); + } + + @Test + public void computeReadTimeout_bolth_requestLower() { + requestConfig.set(CommonClientConfigKey.ReadTimeout, 1000); + originConfig.set(CommonClientConfigKey.ReadTimeout, 1000); + + Duration timeout = originTimeoutManager.computeReadTimeout(request, 1); + + assertEquals(1000, timeout.toMillis()); + } + + @Test + public void computeReadTimeout_bolth_enforceMax() { + requestConfig.set(CommonClientConfigKey.ReadTimeout, + (int) MAX_OUTBOUND_READ_TIMEOUT_MS.get() + 1000); + originConfig.set(CommonClientConfigKey.ReadTimeout, + (int) MAX_OUTBOUND_READ_TIMEOUT_MS.get() + 10000); + + Duration timeout = originTimeoutManager.computeReadTimeout(request, 1); + + assertEquals(MAX_OUTBOUND_READ_TIMEOUT_MS.get(), timeout.toMillis()); + } +} \ No newline at end of file From f71b274f8757a30db06264cc9225be2bd7becb38 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Tue, 23 Mar 2021 10:45:10 -0700 Subject: [PATCH 248/273] add license --- .../netty/timeouts/OriginTimeoutManagerTest.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManagerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManagerTest.java index f66cbf2a..f0cb9d97 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManagerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManagerTest.java @@ -1,3 +1,19 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.netflix.zuul.netty.timeouts; import static com.netflix.zuul.netty.timeouts.OriginTimeoutManager.MAX_OUTBOUND_READ_TIMEOUT_MS; From 489765350ccdd58b0719be1652368c736dae5769 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Tue, 23 Mar 2021 13:45:24 -0700 Subject: [PATCH 249/273] fix test typo --- .../netflix/zuul/netty/timeouts/OriginTimeoutManagerTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManagerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManagerTest.java index f0cb9d97..c79acc22 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManagerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/timeouts/OriginTimeoutManagerTest.java @@ -115,12 +115,12 @@ public void computeReadTimeout_bolth_originLower() { @Test public void computeReadTimeout_bolth_requestLower() { - requestConfig.set(CommonClientConfigKey.ReadTimeout, 1000); + requestConfig.set(CommonClientConfigKey.ReadTimeout, 100); originConfig.set(CommonClientConfigKey.ReadTimeout, 1000); Duration timeout = originTimeoutManager.computeReadTimeout(request, 1); - assertEquals(1000, timeout.toMillis()); + assertEquals(100, timeout.toMillis()); } @Test From 1b328f211ff2ef8db3b44564ee402231480d90b0 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Tue, 23 Mar 2021 18:17:09 -0700 Subject: [PATCH 250/273] downgrade noise logging --- .../com/netflix/zuul/netty/server/ClientResponseWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientResponseWriter.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientResponseWriter.java index 7678df42..892ba6d8 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientResponseWriter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientResponseWriter.java @@ -259,7 +259,7 @@ else if (evt instanceof IdleStateEvent) { LOG.debug("Received IdleStateEvent."); } else { - LOG.info("ClientResponseWriter Received event {}", evt); + LOG.debug("ClientResponseWriter Received event {}", evt); } } From 2e31fab9814080fa1408c8196cfdd23cfebc0f23 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 31 Mar 2021 10:05:55 -0700 Subject: [PATCH 251/273] all: update to netty 4.1.62 (#1036) --- gradle.properties | 2 +- zuul-core/dependencies.lock | 249 ++++++++++++++----------- zuul-discovery/dependencies.lock | 187 +++++++++++++++++++ zuul-groovy/dependencies.lock | 255 ++++++++++++-------------- zuul-guice/dependencies.lock | 255 ++++++++++++-------------- zuul-processor/dependencies.lock | 304 +++++++++++++++---------------- zuul-sample/dependencies.lock | 298 ++++++++++++++---------------- 7 files changed, 854 insertions(+), 696 deletions(-) create mode 100644 zuul-discovery/dependencies.lock diff --git a/gradle.properties b/gradle.properties index b93f7ecf..f5a748f5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ versions_groovy=3.0.3 versions_ribbon=2.4.4 -versions_netty=4.1.55.Final +versions_netty=4.1.62.Final release.scope=patch release.version=2.3.0-SNAPSHOT diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 5e7703cc..34708aff 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -24,44 +24,38 @@ "com.netflix.ribbon:ribbon-core": { "locked": "2.4.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.4.4" - }, "com.netflix.spectator:spectator-api": { "locked": "0.123.1" }, + "com.netflix.zuul:zuul-discovery": { + "project": true + }, "io.netty:netty-buffer": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -73,7 +67,7 @@ "locked": "1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.67" + "locked": "1.68" }, "org.slf4j:slf4j-api": { "locked": "1.7.25" @@ -81,10 +75,10 @@ }, "jmh": { "org.openjdk.jmh:jmh-core": { - "locked": "1.28" + "locked": "1.29" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.28" + "locked": "1.29" }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21" @@ -115,44 +109,38 @@ "com.netflix.ribbon:ribbon-core": { "locked": "2.4.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.4.4" - }, "com.netflix.spectator:spectator-api": { "locked": "0.123.1" }, + "com.netflix.zuul:zuul-discovery": { + "project": true + }, "io.netty:netty-buffer": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -164,13 +152,13 @@ "locked": "1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.67" + "locked": "1.68" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.28" + "locked": "1.29" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.28" + "locked": "1.29" }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21" @@ -187,6 +175,9 @@ "locked": "2.12.1" }, "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "29.0-jre" }, "com.google.truth:truth": { @@ -196,58 +187,73 @@ "locked": "0.7.6" }, "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "1.9.18" }, "com.netflix.netflix-commons:netflix-commons-util": { "locked": "0.3.0" }, "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "locked": "0.123.1" }, + "com.netflix.zuul:zuul-discovery": { + "project": true + }, "io.netty:netty-buffer": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.35.Final" }, "io.netty:netty-transport": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -262,21 +268,24 @@ "locked": "4.13.1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.67" + "locked": "1.68" }, "org.mockito:mockito-core": { "locked": "3.8.0" }, "org.openjdk.jmh:jmh-core": { - "locked": "1.28" + "locked": "1.29" }, "org.openjdk.jmh:jmh-generator-annprocess": { - "locked": "1.28" + "locked": "1.29" }, "org.openjdk.jmh:jmh-generator-bytecode": { "locked": "1.21" }, "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "1.7.30" }, "org.slf4j:slf4j-simple": { @@ -291,64 +300,82 @@ "locked": "2.12.1" }, "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "29.0-jre" }, "com.netflix.archaius:archaius-core": { "locked": "0.7.6" }, "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "1.9.18" }, "com.netflix.netflix-commons:netflix-commons-util": { "locked": "0.3.0" }, "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "locked": "0.123.1" }, + "com.netflix.zuul:zuul-discovery": { + "project": true + }, "io.netty:netty-buffer": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.35.Final" }, "io.netty:netty-transport": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -360,9 +387,12 @@ "locked": "1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.67" + "locked": "1.68" }, "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "1.7.30" } }, @@ -394,44 +424,38 @@ "com.netflix.ribbon:ribbon-core": { "locked": "2.4.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-loadbalancer": { - "locked": "2.4.4" - }, "com.netflix.spectator:spectator-api": { "locked": "0.123.1" }, + "com.netflix.zuul:zuul-discovery": { + "project": true + }, "io.netty:netty-buffer": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -446,7 +470,7 @@ "locked": "4.13.1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.67" + "locked": "1.68" }, "org.mockito:mockito-core": { "locked": "3.8.0" @@ -463,6 +487,9 @@ "locked": "2.12.1" }, "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "29.0-jre" }, "com.google.truth:truth": { @@ -472,58 +499,73 @@ "locked": "0.7.6" }, "com.netflix.eureka:eureka-client": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "1.9.18" }, "com.netflix.netflix-commons:netflix-commons-util": { "locked": "0.3.0" }, "com.netflix.ribbon:ribbon-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "2.4.4" }, "com.netflix.spectator:spectator-api": { "locked": "0.123.1" }, + "com.netflix.zuul:zuul-discovery": { + "project": true + }, "io.netty:netty-buffer": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-tcnative-boringssl-static": { "locked": "2.0.35.Final" }, "io.netty:netty-transport": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -538,12 +580,15 @@ "locked": "4.13.1" }, "org.bouncycastle:bcprov-jdk15on": { - "locked": "1.67" + "locked": "1.68" }, "org.mockito:mockito-core": { "locked": "3.8.0" }, "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-discovery" + ], "locked": "1.7.30" }, "org.slf4j:slf4j-simple": { diff --git a/zuul-discovery/dependencies.lock b/zuul-discovery/dependencies.lock new file mode 100644 index 00000000..b30deaa1 --- /dev/null +++ b/zuul-discovery/dependencies.lock @@ -0,0 +1,187 @@ +{ + "compileClasspath": { + "com.google.guava:guava": { + "locked": "29.0-jre" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.18" + }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-core": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "locked": "2.4.4" + }, + "org.slf4j:slf4j-api": { + "locked": "1.7.25" + } + }, + "jmh": { + "org.openjdk.jmh:jmh-core": { + "locked": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21" + } + }, + "jmhCompileClasspath": { + "com.google.guava:guava": { + "locked": "29.0-jre" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.18" + }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-core": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "locked": "2.4.4" + }, + "org.openjdk.jmh:jmh-core": { + "locked": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21" + }, + "org.slf4j:slf4j-api": { + "locked": "1.7.25" + } + }, + "jmhRuntimeClasspath": { + "com.google.guava:guava": { + "locked": "29.0-jre" + }, + "com.google.truth:truth": { + "locked": "1.0.1" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.18" + }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-core": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "locked": "2.4.4" + }, + "junit:junit": { + "locked": "4.13" + }, + "org.mockito:mockito-core": { + "locked": "3.8.0" + }, + "org.openjdk.jmh:jmh-core": { + "locked": "1.21" + }, + "org.openjdk.jmh:jmh-generator-bytecode": { + "locked": "1.21" + }, + "org.slf4j:slf4j-api": { + "locked": "1.7.25" + } + }, + "runtimeClasspath": { + "com.google.guava:guava": { + "locked": "29.0-jre" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.18" + }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-core": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "locked": "2.4.4" + }, + "org.slf4j:slf4j-api": { + "locked": "1.7.25" + } + }, + "testCompileClasspath": { + "com.google.guava:guava": { + "locked": "29.0-jre" + }, + "com.google.truth:truth": { + "locked": "1.0.1" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.18" + }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-core": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "locked": "2.4.4" + }, + "junit:junit": { + "locked": "4.13" + }, + "org.mockito:mockito-core": { + "locked": "3.8.0" + }, + "org.slf4j:slf4j-api": { + "locked": "1.7.25" + } + }, + "testRuntimeClasspath": { + "com.google.guava:guava": { + "locked": "29.0-jre" + }, + "com.google.truth:truth": { + "locked": "1.0.1" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.18" + }, + "com.netflix.ribbon:ribbon-archaius": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-core": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.4.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "locked": "2.4.4" + }, + "junit:junit": { + "locked": "4.13" + }, + "org.mockito:mockito-core": { + "locked": "3.8.0" + }, + "org.slf4j:slf4j-api": { + "locked": "1.7.25" + } + } +} \ No newline at end of file diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index 669add6b..f5145f3f 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -39,68 +39,56 @@ ], "locked": "2.4.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { + "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "0.123.1" }, - "com.netflix.ribbon:ribbon-loadbalancer": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" + "com.netflix.zuul:zuul-core": { + "project": true }, - "com.netflix.spectator:spectator-api": { + "com.netflix.zuul:zuul-discovery": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.123.1" - }, - "com.netflix.zuul:zuul-core": { "project": true }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -166,68 +154,56 @@ ], "locked": "2.4.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { + "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "0.123.1" }, - "com.netflix.ribbon:ribbon-loadbalancer": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" + "com.netflix.zuul:zuul-core": { + "project": true }, - "com.netflix.spectator:spectator-api": { + "com.netflix.zuul:zuul-discovery": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.123.1" - }, - "com.netflix.zuul:zuul-core": { "project": true }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -266,7 +242,8 @@ }, "com.google.guava:guava": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "29.0-jre" }, @@ -281,7 +258,8 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.9.18" }, @@ -293,31 +271,27 @@ }, "com.netflix.ribbon:ribbon-archaius": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, @@ -330,41 +304,47 @@ "com.netflix.zuul:zuul-core": { "project": true }, + "com.netflix.zuul:zuul-discovery": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "project": true + }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -376,19 +356,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -415,7 +395,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.67" + "locked": "1.68" }, "org.codehaus.groovy:groovy-all": { "locked": "3.0.3" @@ -431,7 +411,8 @@ }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.7.30" } @@ -451,7 +432,8 @@ }, "com.google.guava:guava": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "29.0-jre" }, @@ -463,7 +445,8 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.9.18" }, @@ -475,31 +458,27 @@ }, "com.netflix.ribbon:ribbon-archaius": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, @@ -512,41 +491,47 @@ "com.netflix.zuul:zuul-core": { "project": true }, + "com.netflix.zuul:zuul-discovery": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "project": true + }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -558,19 +543,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -594,14 +579,15 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.67" + "locked": "1.68" }, "org.codehaus.groovy:groovy-all": { "locked": "3.0.3" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.7.30" } @@ -649,68 +635,56 @@ ], "locked": "2.4.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { + "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "0.123.1" }, - "com.netflix.ribbon:ribbon-loadbalancer": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" + "com.netflix.zuul:zuul-core": { + "project": true }, - "com.netflix.spectator:spectator-api": { + "com.netflix.zuul:zuul-discovery": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.123.1" - }, - "com.netflix.zuul:zuul-core": { "project": true }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -749,7 +723,8 @@ }, "com.google.guava:guava": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "29.0-jre" }, @@ -764,7 +739,8 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.9.18" }, @@ -776,31 +752,27 @@ }, "com.netflix.ribbon:ribbon-archaius": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, @@ -813,41 +785,47 @@ "com.netflix.zuul:zuul-core": { "project": true }, + "com.netflix.zuul:zuul-discovery": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "project": true + }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -859,19 +837,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -898,7 +876,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.67" + "locked": "1.68" }, "org.codehaus.groovy:groovy-all": { "locked": "3.0.3" @@ -908,7 +886,8 @@ }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.7.30" } diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 26b7a1d2..42790f84 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -39,31 +39,19 @@ ], "locked": "2.4.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { + "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "0.123.1" }, - "com.netflix.ribbon:ribbon-loadbalancer": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" + "com.netflix.zuul:zuul-core": { + "project": true }, - "com.netflix.spectator:spectator-api": { + "com.netflix.zuul:zuul-discovery": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.123.1" - }, - "com.netflix.zuul:zuul-core": { "project": true }, "commons-configuration:commons-configuration": { @@ -73,37 +61,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -166,31 +154,19 @@ ], "locked": "2.4.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { + "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "0.123.1" }, - "com.netflix.ribbon:ribbon-loadbalancer": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" + "com.netflix.zuul:zuul-core": { + "project": true }, - "com.netflix.spectator:spectator-api": { + "com.netflix.zuul:zuul-discovery": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.123.1" - }, - "com.netflix.zuul:zuul-core": { "project": true }, "commons-configuration:commons-configuration": { @@ -200,37 +176,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -266,7 +242,8 @@ }, "com.google.guava:guava": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "29.0-jre" }, @@ -284,7 +261,8 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.9.18" }, @@ -296,31 +274,27 @@ }, "com.netflix.ribbon:ribbon-archaius": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, @@ -333,6 +307,12 @@ "com.netflix.zuul:zuul-core": { "project": true }, + "com.netflix.zuul:zuul-discovery": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "project": true + }, "commons-configuration:commons-configuration": { "locked": "1.8" }, @@ -340,37 +320,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -382,19 +362,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -421,7 +401,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.67" + "locked": "1.68" }, "org.mockito:mockito-core": { "locked": "3.8.0" @@ -434,7 +414,8 @@ }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.7.30" } @@ -454,7 +435,8 @@ }, "com.google.guava:guava": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "29.0-jre" }, @@ -469,7 +451,8 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.9.18" }, @@ -481,31 +464,27 @@ }, "com.netflix.ribbon:ribbon-archaius": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, @@ -518,6 +497,12 @@ "com.netflix.zuul:zuul-core": { "project": true }, + "com.netflix.zuul:zuul-discovery": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "project": true + }, "commons-configuration:commons-configuration": { "locked": "1.8" }, @@ -525,37 +510,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -567,19 +552,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -603,11 +588,12 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.67" + "locked": "1.68" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.7.30" } @@ -655,31 +641,19 @@ ], "locked": "2.4.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { + "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "0.123.1" }, - "com.netflix.ribbon:ribbon-loadbalancer": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" + "com.netflix.zuul:zuul-core": { + "project": true }, - "com.netflix.spectator:spectator-api": { + "com.netflix.zuul:zuul-discovery": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.123.1" - }, - "com.netflix.zuul:zuul-core": { "project": true }, "commons-configuration:commons-configuration": { @@ -689,37 +663,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -755,7 +729,8 @@ }, "com.google.guava:guava": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "29.0-jre" }, @@ -773,7 +748,8 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.9.18" }, @@ -785,31 +761,27 @@ }, "com.netflix.ribbon:ribbon-archaius": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, @@ -822,6 +794,12 @@ "com.netflix.zuul:zuul-core": { "project": true }, + "com.netflix.zuul:zuul-discovery": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "project": true + }, "commons-configuration:commons-configuration": { "locked": "1.8" }, @@ -829,37 +807,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -871,19 +849,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -910,14 +888,15 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.67" + "locked": "1.68" }, "org.mockito:mockito-core": { "locked": "3.8.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.7.30" } diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 7e15cd7a..96137caa 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -39,68 +39,56 @@ ], "locked": "2.4.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { + "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "0.123.1" }, - "com.netflix.ribbon:ribbon-loadbalancer": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" + "com.netflix.zuul:zuul-core": { + "project": true }, - "com.netflix.spectator:spectator-api": { + "com.netflix.zuul:zuul-discovery": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.123.1" - }, - "com.netflix.zuul:zuul-core": { "project": true }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -163,68 +151,56 @@ ], "locked": "2.4.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { + "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "0.123.1" }, - "com.netflix.ribbon:ribbon-loadbalancer": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" + "com.netflix.zuul:zuul-core": { + "project": true }, - "com.netflix.spectator:spectator-api": { + "com.netflix.zuul:zuul-discovery": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.123.1" - }, - "com.netflix.zuul:zuul-core": { "project": true }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -260,7 +236,8 @@ }, "com.google.guava:guava": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "29.0-jre" }, @@ -275,7 +252,8 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.9.18" }, @@ -287,31 +265,27 @@ }, "com.netflix.ribbon:ribbon-archaius": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, @@ -324,41 +298,47 @@ "com.netflix.zuul:zuul-core": { "project": true }, + "com.netflix.zuul:zuul-discovery": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "project": true + }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -370,19 +350,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -409,7 +389,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.67" + "locked": "1.68" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -419,7 +399,8 @@ }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.7.30" } @@ -439,7 +420,8 @@ }, "com.google.guava:guava": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "29.0-jre" }, @@ -451,7 +433,8 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.9.18" }, @@ -463,31 +446,27 @@ }, "com.netflix.ribbon:ribbon-archaius": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, @@ -500,41 +479,47 @@ "com.netflix.zuul:zuul-core": { "project": true }, + "com.netflix.zuul:zuul-discovery": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "project": true + }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -546,19 +531,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -582,11 +567,12 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.67" + "locked": "1.68" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.7.30" } @@ -607,6 +593,7 @@ "com.google.guava:guava": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery", "com.netflix.zuul:zuul-processor" ], "locked": "29.0-jre" @@ -619,7 +606,8 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.9.18" }, @@ -631,31 +619,27 @@ }, "com.netflix.ribbon:ribbon-archaius": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, @@ -671,6 +655,12 @@ ], "project": true }, + "com.netflix.zuul:zuul-discovery": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "project": true + }, "com.netflix.zuul:zuul-processor": { "project": true }, @@ -678,37 +668,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -720,19 +710,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -756,11 +746,12 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.67" + "locked": "1.68" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.7.30" } @@ -808,68 +799,56 @@ ], "locked": "2.4.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { + "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "0.123.1" }, - "com.netflix.ribbon:ribbon-loadbalancer": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" + "com.netflix.zuul:zuul-core": { + "project": true }, - "com.netflix.spectator:spectator-api": { + "com.netflix.zuul:zuul-discovery": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.123.1" - }, - "com.netflix.zuul:zuul-core": { "project": true }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -902,7 +881,8 @@ }, "com.google.guava:guava": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "29.0-jre" }, @@ -917,7 +897,8 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.9.18" }, @@ -929,31 +910,27 @@ }, "com.netflix.ribbon:ribbon-archaius": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, @@ -966,41 +943,47 @@ "com.netflix.zuul:zuul-core": { "project": true }, + "com.netflix.zuul:zuul-discovery": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "project": true + }, "io.netty:netty-buffer": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1012,19 +995,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -1051,11 +1034,12 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.67" + "locked": "1.68" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.7.30" } diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index f7ce4576..f1d3e5d1 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -15,6 +15,7 @@ "com.google.guava:guava": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery", "com.netflix.zuul:zuul-processor" ], "locked": "29.0-jre" @@ -27,7 +28,8 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.9.18" }, @@ -39,31 +41,27 @@ }, "com.netflix.ribbon:ribbon-archaius": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, @@ -79,6 +77,12 @@ ], "project": true }, + "com.netflix.zuul:zuul-discovery": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "project": true + }, "com.netflix.zuul:zuul-processor": { "project": true }, @@ -86,37 +90,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -128,19 +132,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -164,11 +168,12 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.67" + "locked": "1.68" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.7.30" } @@ -216,31 +221,19 @@ ], "locked": "2.4.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { + "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "0.123.1" }, - "com.netflix.ribbon:ribbon-loadbalancer": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" + "com.netflix.zuul:zuul-core": { + "project": true }, - "com.netflix.spectator:spectator-api": { + "com.netflix.zuul:zuul-discovery": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.123.1" - }, - "com.netflix.zuul:zuul-core": { "project": true }, "com.netflix.zuul:zuul-groovy": { @@ -256,37 +249,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -358,31 +351,19 @@ ], "locked": "2.4.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { + "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "0.123.1" }, - "com.netflix.ribbon:ribbon-loadbalancer": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" + "com.netflix.zuul:zuul-core": { + "project": true }, - "com.netflix.spectator:spectator-api": { + "com.netflix.zuul:zuul-discovery": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.123.1" - }, - "com.netflix.zuul:zuul-core": { "project": true }, "com.netflix.zuul:zuul-groovy": { @@ -398,37 +379,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -471,6 +452,7 @@ "com.google.guava:guava": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery", "com.netflix.zuul:zuul-groovy" ], "locked": "29.0-jre" @@ -489,7 +471,8 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.9.18" }, @@ -501,31 +484,27 @@ }, "com.netflix.ribbon:ribbon-archaius": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, @@ -542,6 +521,12 @@ ], "project": true }, + "com.netflix.zuul:zuul-discovery": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "project": true + }, "com.netflix.zuul:zuul-groovy": { "project": true }, @@ -558,37 +543,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -600,19 +585,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -642,7 +627,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.67" + "locked": "1.68" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -658,7 +643,8 @@ }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.7.30" } @@ -679,6 +665,7 @@ "com.google.guava:guava": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery", "com.netflix.zuul:zuul-groovy" ], "locked": "29.0-jre" @@ -697,7 +684,8 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.9.18" }, @@ -709,31 +697,27 @@ }, "com.netflix.ribbon:ribbon-archaius": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, @@ -750,6 +734,12 @@ ], "project": true }, + "com.netflix.zuul:zuul-discovery": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "project": true + }, "com.netflix.zuul:zuul-groovy": { "project": true }, @@ -766,37 +756,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -808,19 +798,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -850,7 +840,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.67" + "locked": "1.68" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -860,7 +850,8 @@ }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.7.30" } @@ -908,31 +899,19 @@ ], "locked": "2.4.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { + "com.netflix.spectator:spectator-api": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.4.4" + "locked": "0.123.1" }, - "com.netflix.ribbon:ribbon-loadbalancer": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" + "com.netflix.zuul:zuul-core": { + "project": true }, - "com.netflix.spectator:spectator-api": { + "com.netflix.zuul:zuul-discovery": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "0.123.1" - }, - "com.netflix.zuul:zuul-core": { "project": true }, "com.netflix.zuul:zuul-groovy": { @@ -948,37 +927,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1015,6 +994,7 @@ "com.google.guava:guava": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery", "com.netflix.zuul:zuul-groovy" ], "locked": "29.0-jre" @@ -1033,7 +1013,8 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.9.18" }, @@ -1045,31 +1026,27 @@ }, "com.netflix.ribbon:ribbon-archaius": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-core": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" - ], - "locked": "2.4.4" - }, - "com.netflix.ribbon:ribbon-httpclient": { - "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, "com.netflix.ribbon:ribbon-loadbalancer": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-discovery" ], "locked": "2.4.4" }, @@ -1086,6 +1063,12 @@ ], "project": true }, + "com.netflix.zuul:zuul-discovery": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "project": true + }, "com.netflix.zuul:zuul-groovy": { "project": true }, @@ -1102,37 +1085,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ @@ -1144,19 +1127,19 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.55.Final" + "locked": "4.1.62.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -1186,7 +1169,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "1.67" + "locked": "1.68" }, "org.codehaus.groovy:groovy-all": { "firstLevelTransitive": [ @@ -1196,7 +1179,8 @@ }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-discovery" ], "locked": "1.7.30" } From 53aa752a1da29790ba177263ea45d53310e91be9 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 1 Apr 2021 11:50:30 -0700 Subject: [PATCH 252/273] all: update to netty 4.1.63 --- gradle.properties | 2 +- zuul-core/build.gradle | 2 +- zuul-core/dependencies.lock | 114 +++++++++++++++--------------- zuul-groovy/dependencies.lock | 96 ++++++++++++------------- zuul-guice/dependencies.lock | 96 ++++++++++++------------- zuul-processor/dependencies.lock | 116 +++++++++++++++---------------- zuul-sample/dependencies.lock | 116 +++++++++++++++---------------- 7 files changed, 271 insertions(+), 271 deletions(-) diff --git a/gradle.properties b/gradle.properties index f5a748f5..96102040 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ versions_groovy=3.0.3 versions_ribbon=2.4.4 -versions_netty=4.1.62.Final +versions_netty=4.1.63.Final release.scope=patch release.version=2.3.0-SNAPSHOT diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index 57973ac3..144b95e7 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -33,7 +33,7 @@ dependencies { implementation "io.netty:netty-codec-haproxy:${versions_netty}" implementation "io.netty:netty-transport-native-epoll:${versions_netty}:linux-x86_64" implementation "io.netty:netty-transport-native-kqueue:${versions_netty}:osx-x86_64" - runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.35.Final" + runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.38.Final" implementation 'io.perfmark:perfmark-api:0.23.0' implementation 'javax.inject:javax.inject:1' diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 34708aff..8d3afbfe 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -31,31 +31,31 @@ "project": true }, "io.netty:netty-buffer": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -116,31 +116,31 @@ "project": true }, "io.netty:netty-buffer": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -226,34 +226,34 @@ "project": true }, "io.netty:netty-buffer": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.35.Final" + "locked": "2.0.38.Final" }, "io.netty:netty-transport": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -348,34 +348,34 @@ "project": true }, "io.netty:netty-buffer": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.35.Final" + "locked": "2.0.38.Final" }, "io.netty:netty-transport": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -431,31 +431,31 @@ "project": true }, "io.netty:netty-buffer": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" @@ -538,34 +538,34 @@ "project": true }, "io.netty:netty-buffer": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-tcnative-boringssl-static": { - "locked": "2.0.35.Final" + "locked": "2.0.38.Final" }, "io.netty:netty-transport": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "locked": "0.23.0" diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index f5145f3f..92f97738 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -58,37 +58,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -173,37 +173,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -314,61 +314,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.38.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -501,61 +501,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.38.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -654,37 +654,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -795,61 +795,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.38.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 42790f84..1dc66c11 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -61,37 +61,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -176,37 +176,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -320,61 +320,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.38.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -510,61 +510,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.38.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -663,37 +663,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -807,61 +807,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.38.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-processor/dependencies.lock b/zuul-processor/dependencies.lock index 96137caa..0ab4d580 100644 --- a/zuul-processor/dependencies.lock +++ b/zuul-processor/dependencies.lock @@ -58,37 +58,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -170,37 +170,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -308,61 +308,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.38.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -489,61 +489,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.38.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -668,61 +668,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.38.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -818,37 +818,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -953,61 +953,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.38.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index f1d3e5d1..4656c85f 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -90,61 +90,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.38.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -249,37 +249,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -379,37 +379,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -543,61 +543,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.38.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -756,61 +756,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.38.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ @@ -927,37 +927,37 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.reactivex:rxjava": { "firstLevelTransitive": [ @@ -1085,61 +1085,61 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-haproxy": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-codec-http2": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-common": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-handler": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-tcnative-boringssl-static": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "2.0.35.Final" + "locked": "2.0.38.Final" }, "io.netty:netty-transport": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-epoll": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.netty:netty-transport-native-kqueue": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-core" ], - "locked": "4.1.62.Final" + "locked": "4.1.63.Final" }, "io.perfmark:perfmark-api": { "firstLevelTransitive": [ From a0cf67dcabfe7021ccc9c6431e017783c61a02a0 Mon Sep 17 00:00:00 2001 From: sullis Date: Wed, 7 Apr 2021 09:13:34 -0700 Subject: [PATCH 253/273] chore: enable Gradle wrapper validation in release.yml (#1025) https://blog.gradle.org/gradle-wrapper-checksum-verification-github-action --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb341f35..665b6861 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: gradle/wrapper-validation-action@v1 - name: Set up JDK uses: actions/setup-java@v1 with: From 5b78ee28d8584e7c4e80d75b82791189a3381a4b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Apr 2021 09:22:30 -0700 Subject: [PATCH 254/273] build(deps): bump actions/setup-java from v1 to v2 (#1039) * build(deps): bump actions/setup-java from v1 to v2 Bumps [actions/setup-java](https://github.com/actions/setup-java) from v1 to v2. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v1...8764a52df183aa0ccea74521dfd9d506ffc7a19a) Signed-off-by: dependabot[bot] * Fix PR to include required field Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Carl Mastrangelo --- .github/workflows/pr.yml | 3 ++- .github/workflows/release.yml | 3 ++- .github/workflows/snapshot.yml | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 475fae8b..01c11378 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -13,8 +13,9 @@ jobs: with: fetch-depth: 0 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: + distribution: 'zulu' java-version: ${{ matrix.java }} - uses: actions/cache@v2 id: gradle-cache diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 665b6861..d69d2a3b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,8 +13,9 @@ jobs: - uses: actions/checkout@v2 - uses: gradle/wrapper-validation-action@v1 - name: Set up JDK - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: + distribution: 'zulu' java-version: 8 - uses: actions/cache@v2 id: gradle-cache diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 0e26f5f4..afdb12b7 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -13,8 +13,9 @@ jobs: with: fetch-depth: 0 - name: Set up JDK - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: + distribution: 'zulu' java-version: 8 - uses: actions/cache@v2 id: gradle-cache From dc4d229bce5ce25d9619f31d40c78f48bf5d5dd5 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Wed, 7 Apr 2021 12:01:04 -0700 Subject: [PATCH 255/273] Cleanup star imports --- .../netty/server/ClientRequestReceiverTest.java | 17 ++++++++++++----- .../zuul/discovery/DiscoveryResultTest.java | 3 ++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java index 098fb4fe..8ca9a5bb 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java @@ -16,6 +16,11 @@ package com.netflix.zuul.netty.server; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; import com.google.common.net.InetAddresses; import com.netflix.netty.common.SourceAddressChannelHandler; import com.netflix.spectator.api.DefaultRegistry; @@ -28,15 +33,17 @@ import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.embedded.EmbeddedChannel; -import io.netty.handler.codec.http.*; +import io.netty.handler.codec.http.DefaultFullHttpRequest; +import io.netty.handler.codec.http.HttpMethod; +import io.netty.handler.codec.http.HttpRequest; +import io.netty.handler.codec.http.HttpRequestEncoder; +import io.netty.handler.codec.http.HttpServerCodec; +import io.netty.handler.codec.http.HttpVersion; +import java.net.InetSocketAddress; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.junit.MockitoJUnitRunner; -import java.net.InetSocketAddress; - -import static org.junit.Assert.*; - /** * Unit tests for {@link ClientRequestReceiver}. */ diff --git a/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java b/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java index f3ba8cc8..301cbf4e 100644 --- a/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java +++ b/zuul-discovery/src/test/java/com/netflix/zuul/discovery/DiscoveryResultTest.java @@ -16,7 +16,8 @@ package com.netflix.zuul.discovery; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; import com.google.common.truth.Truth; import com.netflix.appinfo.InstanceInfo; import com.netflix.appinfo.InstanceInfo.Builder; From 8825757c84c7ad95edf35b9b7449f7ec4bf4def2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Apr 2021 13:41:48 -0700 Subject: [PATCH 256/273] build(deps): bump actions/cache from v2 to v2.1.4 (#1011) Bumps [actions/cache](https://github.com/actions/cache) from v2 to v2.1.4. - [Release notes](https://github.com/actions/cache/releases) - [Commits](https://github.com/actions/cache/compare/v2...26968a09c0ea4f3e233fdddbafd1166051a095f6) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/pr.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- .github/workflows/snapshot.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 01c11378..1c2ef26f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -17,13 +17,13 @@ jobs: with: distribution: 'zulu' java-version: ${{ matrix.java }} - - uses: actions/cache@v2 + - uses: actions/cache@v2.1.4 id: gradle-cache with: path: | ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - - uses: actions/cache@v2 + - uses: actions/cache@v2.1.4 id: gradle-wrapper-cache with: path: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d69d2a3b..d964c850 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,13 +17,13 @@ jobs: with: distribution: 'zulu' java-version: 8 - - uses: actions/cache@v2 + - uses: actions/cache@v2.1.4 id: gradle-cache with: path: | ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - - uses: actions/cache@v2 + - uses: actions/cache@v2.1.4 id: gradle-wrapper-cache with: path: | diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index afdb12b7..bf13e660 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -17,13 +17,13 @@ jobs: with: distribution: 'zulu' java-version: 8 - - uses: actions/cache@v2 + - uses: actions/cache@v2.1.4 id: gradle-cache with: path: | ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - - uses: actions/cache@v2 + - uses: actions/cache@v2.1.4 id: gradle-wrapper-cache with: path: | From 9102c930641baccd9e6ace901e653b1ba30add70 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 9 Apr 2021 16:10:47 -0700 Subject: [PATCH 257/273] zuul-guice: use later guice which doesnt need aop work around --- zuul-core/dependencies.lock | 6 +++--- zuul-discovery/dependencies.lock | 6 +++--- zuul-groovy/dependencies.lock | 6 +++--- zuul-guice/build.gradle | 2 +- zuul-guice/dependencies.lock | 24 ++++++++++++------------ zuul-sample/dependencies.lock | 18 +++++++++--------- 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 8d3afbfe..41e52f0a 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -271,7 +271,7 @@ "locked": "1.68" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.openjdk.jmh:jmh-core": { "locked": "1.29" @@ -473,7 +473,7 @@ "locked": "1.68" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.slf4j:slf4j-api": { "locked": "1.7.25" @@ -583,7 +583,7 @@ "locked": "1.68" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-discovery/dependencies.lock b/zuul-discovery/dependencies.lock index b30deaa1..2aaf0b05 100644 --- a/zuul-discovery/dependencies.lock +++ b/zuul-discovery/dependencies.lock @@ -85,7 +85,7 @@ "locked": "4.13" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -146,7 +146,7 @@ "locked": "4.13" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.slf4j:slf4j-api": { "locked": "1.7.25" @@ -178,7 +178,7 @@ "locked": "4.13" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.slf4j:slf4j-api": { "locked": "1.7.25" diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index 92f97738..530d8b5a 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -401,7 +401,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -699,7 +699,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -882,7 +882,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-guice/build.gradle b/zuul-guice/build.gradle index 4db10851..94a1a331 100644 --- a/zuul-guice/build.gradle +++ b/zuul-guice/build.gradle @@ -2,7 +2,7 @@ apply plugin: "java-library" dependencies { implementation project(":zuul-core") - api(group: 'com.google.inject', name: 'guice', version: "4.2.3", classifier: "no_aop") + api(group: 'com.google.inject', name: 'guice', version: "5.0.1") implementation 'commons-configuration:commons-configuration:1.8' testImplementation libraries.junit, diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 1dc66c11..ad4e6993 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -7,7 +7,7 @@ "locked": "2.12.1" }, "com.google.inject:guice": { - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -122,7 +122,7 @@ "locked": "2.12.1" }, "com.google.inject:guice": { - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -245,10 +245,10 @@ "com.netflix.zuul:zuul-core", "com.netflix.zuul:zuul-discovery" ], - "locked": "29.0-jre" + "locked": "30.1-jre" }, "com.google.inject:guice": { - "locked": "4.2.3" + "locked": "5.0.1" }, "com.google.truth:truth": { "locked": "1.0.1" @@ -404,7 +404,7 @@ "locked": "1.68" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -438,10 +438,10 @@ "com.netflix.zuul:zuul-core", "com.netflix.zuul:zuul-discovery" ], - "locked": "29.0-jre" + "locked": "30.1-jre" }, "com.google.inject:guice": { - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -606,7 +606,7 @@ "locked": "2.12.1" }, "com.google.inject:guice": { - "locked": "4.2.3" + "locked": "5.0.1" }, "com.google.truth:truth": { "locked": "1.0.1" @@ -705,7 +705,7 @@ "locked": "4.13.1" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -732,10 +732,10 @@ "com.netflix.zuul:zuul-core", "com.netflix.zuul:zuul-discovery" ], - "locked": "29.0-jre" + "locked": "30.1-jre" }, "com.google.inject:guice": { - "locked": "4.2.3" + "locked": "5.0.1" }, "com.google.truth:truth": { "locked": "1.0.1" @@ -891,7 +891,7 @@ "locked": "1.68" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 4656c85f..2f75673e 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -189,7 +189,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -319,7 +319,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -455,13 +455,13 @@ "com.netflix.zuul:zuul-discovery", "com.netflix.zuul:zuul-groovy" ], - "locked": "29.0-jre" + "locked": "30.1-jre" }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -668,13 +668,13 @@ "com.netflix.zuul:zuul-discovery", "com.netflix.zuul:zuul-groovy" ], - "locked": "29.0-jre" + "locked": "30.1-jre" }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -867,7 +867,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -997,13 +997,13 @@ "com.netflix.zuul:zuul-discovery", "com.netflix.zuul:zuul-groovy" ], - "locked": "29.0-jre" + "locked": "30.1-jre" }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ From 79301afd83730ea38026a601ec168e892f1df845 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 9 Apr 2021 16:48:18 -0700 Subject: [PATCH 258/273] Revert "zuul-guice: use later guice which doesnt need aop work around" (#1042) This reverts commit 9102c930641baccd9e6ace901e653b1ba30add70. --- zuul-core/dependencies.lock | 6 +++--- zuul-discovery/dependencies.lock | 6 +++--- zuul-groovy/dependencies.lock | 6 +++--- zuul-guice/build.gradle | 2 +- zuul-guice/dependencies.lock | 24 ++++++++++++------------ zuul-sample/dependencies.lock | 18 +++++++++--------- 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 41e52f0a..8d3afbfe 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -271,7 +271,7 @@ "locked": "1.68" }, "org.mockito:mockito-core": { - "locked": "3.9.0" + "locked": "3.8.0" }, "org.openjdk.jmh:jmh-core": { "locked": "1.29" @@ -473,7 +473,7 @@ "locked": "1.68" }, "org.mockito:mockito-core": { - "locked": "3.9.0" + "locked": "3.8.0" }, "org.slf4j:slf4j-api": { "locked": "1.7.25" @@ -583,7 +583,7 @@ "locked": "1.68" }, "org.mockito:mockito-core": { - "locked": "3.9.0" + "locked": "3.8.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-discovery/dependencies.lock b/zuul-discovery/dependencies.lock index 2aaf0b05..b30deaa1 100644 --- a/zuul-discovery/dependencies.lock +++ b/zuul-discovery/dependencies.lock @@ -85,7 +85,7 @@ "locked": "4.13" }, "org.mockito:mockito-core": { - "locked": "3.9.0" + "locked": "3.8.0" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -146,7 +146,7 @@ "locked": "4.13" }, "org.mockito:mockito-core": { - "locked": "3.9.0" + "locked": "3.8.0" }, "org.slf4j:slf4j-api": { "locked": "1.7.25" @@ -178,7 +178,7 @@ "locked": "4.13" }, "org.mockito:mockito-core": { - "locked": "3.9.0" + "locked": "3.8.0" }, "org.slf4j:slf4j-api": { "locked": "1.7.25" diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index 530d8b5a..92f97738 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -401,7 +401,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.9.0" + "locked": "3.8.0" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -699,7 +699,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.9.0" + "locked": "3.8.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -882,7 +882,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.9.0" + "locked": "3.8.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-guice/build.gradle b/zuul-guice/build.gradle index 94a1a331..4db10851 100644 --- a/zuul-guice/build.gradle +++ b/zuul-guice/build.gradle @@ -2,7 +2,7 @@ apply plugin: "java-library" dependencies { implementation project(":zuul-core") - api(group: 'com.google.inject', name: 'guice', version: "5.0.1") + api(group: 'com.google.inject', name: 'guice', version: "4.2.3", classifier: "no_aop") implementation 'commons-configuration:commons-configuration:1.8' testImplementation libraries.junit, diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index ad4e6993..1dc66c11 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -7,7 +7,7 @@ "locked": "2.12.1" }, "com.google.inject:guice": { - "locked": "5.0.1" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -122,7 +122,7 @@ "locked": "2.12.1" }, "com.google.inject:guice": { - "locked": "5.0.1" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -245,10 +245,10 @@ "com.netflix.zuul:zuul-core", "com.netflix.zuul:zuul-discovery" ], - "locked": "30.1-jre" + "locked": "29.0-jre" }, "com.google.inject:guice": { - "locked": "5.0.1" + "locked": "4.2.3" }, "com.google.truth:truth": { "locked": "1.0.1" @@ -404,7 +404,7 @@ "locked": "1.68" }, "org.mockito:mockito-core": { - "locked": "3.9.0" + "locked": "3.8.0" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -438,10 +438,10 @@ "com.netflix.zuul:zuul-core", "com.netflix.zuul:zuul-discovery" ], - "locked": "30.1-jre" + "locked": "29.0-jre" }, "com.google.inject:guice": { - "locked": "5.0.1" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -606,7 +606,7 @@ "locked": "2.12.1" }, "com.google.inject:guice": { - "locked": "5.0.1" + "locked": "4.2.3" }, "com.google.truth:truth": { "locked": "1.0.1" @@ -705,7 +705,7 @@ "locked": "4.13.1" }, "org.mockito:mockito-core": { - "locked": "3.9.0" + "locked": "3.8.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -732,10 +732,10 @@ "com.netflix.zuul:zuul-core", "com.netflix.zuul:zuul-discovery" ], - "locked": "30.1-jre" + "locked": "29.0-jre" }, "com.google.inject:guice": { - "locked": "5.0.1" + "locked": "4.2.3" }, "com.google.truth:truth": { "locked": "1.0.1" @@ -891,7 +891,7 @@ "locked": "1.68" }, "org.mockito:mockito-core": { - "locked": "3.9.0" + "locked": "3.8.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 2f75673e..4656c85f 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -189,7 +189,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "5.0.1" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -319,7 +319,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "5.0.1" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -455,13 +455,13 @@ "com.netflix.zuul:zuul-discovery", "com.netflix.zuul:zuul-groovy" ], - "locked": "30.1-jre" + "locked": "29.0-jre" }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "5.0.1" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -668,13 +668,13 @@ "com.netflix.zuul:zuul-discovery", "com.netflix.zuul:zuul-groovy" ], - "locked": "30.1-jre" + "locked": "29.0-jre" }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "5.0.1" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -867,7 +867,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "5.0.1" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -997,13 +997,13 @@ "com.netflix.zuul:zuul-discovery", "com.netflix.zuul:zuul-groovy" ], - "locked": "30.1-jre" + "locked": "29.0-jre" }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "5.0.1" + "locked": "4.2.3" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ From 6b36e092f6d6d9fd5f50a6c62efc121289a66ca0 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Tue, 13 Apr 2021 15:11:34 -0700 Subject: [PATCH 259/273] Set statuscategory explicitly for http pipelining --- .../common/HttpLifecycleChannelHandler.java | 6 ++- .../HttpServerLifecycleChannelHandler.java | 9 ++-- .../netty/server/ClientRequestReceiver.java | 5 ++ .../server/ClientRequestReceiverTest.java | 47 ++++++++++++++++--- 4 files changed, 56 insertions(+), 11 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/HttpLifecycleChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/HttpLifecycleChannelHandler.java index 5b04f222..7065a730 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/HttpLifecycleChannelHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/HttpLifecycleChannelHandler.java @@ -37,7 +37,8 @@ public abstract class HttpLifecycleChannelHandler { public static final AttributeKey ATTR_HTTP_REQ = AttributeKey.newInstance("_http_request"); public static final AttributeKey ATTR_HTTP_RESP = AttributeKey.newInstance("_http_response"); - + public static final AttributeKey ATTR_HTTP_PIPELINE_REJECT = AttributeKey.newInstance("_http_pipeline_reject"); + protected enum State { STARTED, COMPLETED } @@ -56,6 +57,7 @@ protected static boolean fireStartEvent(ChannelHandlerContext ctx, HttpRequest r // without waiting for the response from the first. And we don't support HTTP Pipelining. LOG.error("Received a http request on connection where we already have a request being processed. " + "Closing the connection now. channel = " + channel.id().asLongText()); + channel.attr(ATTR_HTTP_PIPELINE_REJECT).set(Boolean.TRUE); channel.close(); ctx.pipeline().fireUserEventTriggered(new RejectedPipeliningEvent()); return false; @@ -105,7 +107,7 @@ public enum CompleteReason // IDLE, DISCONNECT, DEREGISTER, -// PIPELINE_REJECT, + PIPELINE_REJECT, EXCEPTION, CLOSE // FAILURE_CLIENT_CANCELLED, diff --git a/zuul-core/src/main/java/com/netflix/netty/common/HttpServerLifecycleChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/HttpServerLifecycleChannelHandler.java index 8773e3fa..d5ae0e76 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/HttpServerLifecycleChannelHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/HttpServerLifecycleChannelHandler.java @@ -107,9 +107,12 @@ public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) throws public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { addPassportState(ctx, PassportState.SERVER_CH_CLOSE); - - fireCompleteEventIfNotAlready(ctx, CompleteReason.CLOSE); - + // This will likely expand based on more specific reasons for completion + if (ctx.channel().attr(HttpLifecycleChannelHandler.ATTR_HTTP_PIPELINE_REJECT).get() == null) { + fireCompleteEventIfNotAlready(ctx, CompleteReason.CLOSE); + } else { + fireCompleteEventIfNotAlready(ctx, CompleteReason.PIPELINE_REJECT); + } super.close(ctx, promise); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java index bdf520d0..b03e76b9 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java @@ -21,6 +21,7 @@ import static com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteReason.SESSION_COMPLETE; import static com.netflix.zuul.netty.server.http2.Http2OrHttpHandler.PROTOCOL_NAME; +import com.netflix.netty.common.HttpLifecycleChannelHandler; import com.netflix.netty.common.SourceAddressChannelHandler; import com.netflix.netty.common.ssl.SslHandshakeInfo; import com.netflix.netty.common.throttle.RejectionUtils; @@ -204,6 +205,10 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc StatusCategoryUtils.setStatusCategory(zuulRequest.getContext(), ZuulStatusCategory.FAILURE_CLIENT_CANCELLED); } + if (reason == CompleteReason.PIPELINE_REJECT && zuulRequest != null) { + StatusCategoryUtils.setStatusCategory(zuulRequest.getContext(), ZuulStatusCategory.FAILURE_CLIENT_PIPELINE_REJECT); + } + if (reason != SESSION_COMPLETE && zuulRequest != null) { final SessionContext zuulCtx = zuulRequest.getContext(); if (clientRequest != null) { diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java index 8ca9a5bb..425729ec 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ClientRequestReceiverTest.java @@ -22,9 +22,13 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import com.google.common.net.InetAddresses; +import com.netflix.netty.common.HttpLifecycleChannelHandler; +import com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteEvent; +import com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteReason; import com.netflix.netty.common.SourceAddressChannelHandler; import com.netflix.spectator.api.DefaultRegistry; import com.netflix.zuul.context.CommonContextKeys; +import com.netflix.zuul.context.SessionContext; import com.netflix.zuul.message.http.HttpRequestMessage; import com.netflix.zuul.message.http.HttpRequestMessageImpl; import com.netflix.zuul.netty.insights.PassportLoggingHandler; @@ -34,9 +38,11 @@ import io.netty.buffer.Unpooled; import io.netty.channel.embedded.EmbeddedChannel; import io.netty.handler.codec.http.DefaultFullHttpRequest; +import io.netty.handler.codec.http.DefaultFullHttpResponse; import io.netty.handler.codec.http.HttpMethod; import io.netty.handler.codec.http.HttpRequest; import io.netty.handler.codec.http.HttpRequestEncoder; +import io.netty.handler.codec.http.HttpResponseStatus; import io.netty.handler.codec.http.HttpServerCodec; import io.netty.handler.codec.http.HttpVersion; import java.net.InetSocketAddress; @@ -59,12 +65,14 @@ public void proxyProtocol_portSetInSessionContextAndInHttpRequestMessageImpl() { channel.attr(SourceAddressChannelHandler.ATTR_LOCAL_ADDR).set(hapmDestinationAddress); HttpRequestMessageImpl result; { - channel.writeInbound(new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "/post", Unpooled.buffer())); + channel.writeInbound( + new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "/post", Unpooled.buffer())); result = channel.readInbound(); result.disposeBufferedBody(); } assertEquals((int) result.getClientDestinationPort().get(), hapmDestinationAddress.getPort()); - int destinationPort = ((InetSocketAddress) result.getContext().get(CommonContextKeys.PROXY_PROTOCOL_DESTINATION_ADDRESS)).getPort(); + int destinationPort = ((InetSocketAddress) result.getContext() + .get(CommonContextKeys.PROXY_PROTOCOL_DESTINATION_ADDRESS)).getPort(); assertEquals(destinationPort, 444); assertEquals(result.getOriginalPort(), 444); channel.close(); @@ -77,7 +85,8 @@ public void parseQueryParamsWithEncodedCharsInURI() { channel.attr(SourceAddressChannelHandler.ATTR_SERVER_LOCAL_PORT).set(1234); HttpRequestMessageImpl result; { - channel.writeInbound(new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "foo/bar/somePath/%5E1.0.0?param1=foo¶m2=bar¶m3=baz", Unpooled.buffer())); + channel.writeInbound(new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, + "foo/bar/somePath/%5E1.0.0?param1=foo¶m2=bar¶m3=baz", Unpooled.buffer())); result = channel.readInbound(); result.disposeBufferedBody(); } @@ -153,7 +162,7 @@ public void largeResponse_aboveLimit() { } @Test - public void maxHeaderSizeExceeded_setBadRequestStatus(){ + public void maxHeaderSizeExceeded_setBadRequestStatus() { int maxInitialLineLength = BaseZuulChannelInitializer.MAX_INITIAL_LINE_LENGTH.get(); int maxHeaderSize = 10; @@ -176,7 +185,7 @@ public void maxHeaderSizeExceeded_setBadRequestStatus(){ String str = "test-header-value"; ByteBuf buf = Unpooled.buffer(1); HttpRequest httpRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "/post", buf); - for(int i = 0;i< 100;i++) { + for (int i = 0; i < 100; i++) { httpRequest.headers().add("test-header" + i, str); } @@ -187,7 +196,33 @@ public void maxHeaderSizeExceeded_setBadRequestStatus(){ channel.close(); HttpRequestMessage request = ClientRequestReceiver.getRequestFromChannel(channel); - assertEquals(StatusCategoryUtils.getStatusCategory(request.getContext()), ZuulStatusCategory.FAILURE_CLIENT_BAD_REQUEST); + assertEquals(StatusCategoryUtils.getStatusCategory(request.getContext()), + ZuulStatusCategory.FAILURE_CLIENT_BAD_REQUEST); + } + + @Test + public void setStatusCategoryForHttpPipelining() { + + EmbeddedChannel channel = new EmbeddedChannel(new ClientRequestReceiver(null)); + channel.attr(SourceAddressChannelHandler.ATTR_SERVER_LOCAL_PORT).set(1234); + + final DefaultFullHttpRequest request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, + "?ELhAWDLM1hwm8bhU0UT4", Unpooled.buffer()); + + // Write the message and save a copy + channel.writeInbound(request); + final HttpRequestMessage inboundRequest = ClientRequestReceiver.getRequestFromChannel(channel); + + // Set the attr to emulate pipelining rejection + channel.attr(HttpLifecycleChannelHandler.ATTR_HTTP_PIPELINE_REJECT).set(Boolean.TRUE); + + // Fire completion event + channel.pipeline().fireUserEventTriggered(new CompleteEvent(CompleteReason.PIPELINE_REJECT, request, + new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.BAD_REQUEST))); + channel.close(); + + assertEquals(ZuulStatusCategory.FAILURE_CLIENT_PIPELINE_REJECT, + StatusCategoryUtils.getStatusCategory(inboundRequest.getContext())); } } From de3a03b39e48462c87068d045c3a52e6a6031ea3 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Tue, 13 Apr 2021 18:50:15 -0700 Subject: [PATCH 260/273] Remove unnecessary event propagation --- .../netty/common/HttpLifecycleChannelHandler.java | 5 +---- .../netty/common/metrics/HttpMetricsChannelHandler.java | 9 +++++---- .../zuul/netty/filter/ZuulFilterChainHandler.java | 4 ---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/netty/common/HttpLifecycleChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/HttpLifecycleChannelHandler.java index 7065a730..736039c1 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/HttpLifecycleChannelHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/HttpLifecycleChannelHandler.java @@ -59,7 +59,6 @@ protected static boolean fireStartEvent(ChannelHandlerContext ctx, HttpRequest r "Closing the connection now. channel = " + channel.id().asLongText()); channel.attr(ATTR_HTTP_PIPELINE_REJECT).set(Boolean.TRUE); channel.close(); - ctx.pipeline().fireUserEventTriggered(new RejectedPipeliningEvent()); return false; } @@ -177,7 +176,5 @@ public HttpResponse getResponse() return response; } } - - public static class RejectedPipeliningEvent - {} + } diff --git a/zuul-core/src/main/java/com/netflix/netty/common/metrics/HttpMetricsChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/metrics/HttpMetricsChannelHandler.java index 20f403ae..fc732eae 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/metrics/HttpMetricsChannelHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/metrics/HttpMetricsChannelHandler.java @@ -16,6 +16,8 @@ package com.netflix.netty.common.metrics; +import com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteEvent; +import com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteReason; import com.netflix.netty.common.HttpServerLifecycleChannelHandler; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Gauge; @@ -84,13 +86,12 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc if (evt instanceof HttpServerLifecycleChannelHandler.StartEvent) { incrementCurrentRequestsInFlight(ctx); } + else if (evt instanceof HttpServerLifecycleChannelHandler.CompleteEvent && ((CompleteEvent) evt).getReason() == CompleteReason.PIPELINE_REJECT ) { + unSupportedPipeliningCounter.increment(); + } else if (evt instanceof HttpServerLifecycleChannelHandler.CompleteEvent) { decrementCurrentRequestsIfOneInflight(ctx); } - else if (evt instanceof HttpLifecycleChannelHandler.RejectedPipeliningEvent) { - unSupportedPipeliningCounter.increment(); - } - super.userEventTriggered(ctx, evt); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulFilterChainHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulFilterChainHandler.java index b2759825..3f0ed080 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulFilterChainHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/filter/ZuulFilterChainHandler.java @@ -108,10 +108,6 @@ else if (evt instanceof RequestCancelledEvent) { fireEndpointFinish(true); ctx.close(); } - else if (evt instanceof HttpLifecycleChannelHandler.RejectedPipeliningEvent) { - sendResponse(FAILURE_CLIENT_PIPELINE_REJECT, 400, ctx); - } - super.userEventTriggered(ctx, evt); } From 9b090bc200a9836a83e28d946e413bb58dfb096b Mon Sep 17 00:00:00 2001 From: "Sean C. Sullivan" Date: Wed, 14 Apr 2021 11:54:57 -0700 Subject: [PATCH 261/273] downgrade ClientResponseWriter logging This PR changes LOG.warn to LOG.debug in ClientResponseWriter Motivation: We have observed a large number of WARN messages in production. The log message that occurs most frequently is Received complete event while still handling the request. With reason: CLOSE --- .../com/netflix/zuul/netty/server/ClientResponseWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientResponseWriter.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientResponseWriter.java index 892ba6d8..228f847f 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientResponseWriter.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientResponseWriter.java @@ -247,7 +247,7 @@ else if (evt instanceof CompleteEvent) { } else { if (isHandlingRequest) { - LOG.warn("Received complete event while still handling the request. With reason: " + reason.name() + " -- " + + LOG.debug("Received complete event while still handling the request. With reason: " + reason.name() + " -- " + ChannelUtils.channelInfoForLogging(ctx.channel())); } ctx.close(); From 8e99f226cc0def48efa21b3d0ebad38b62829d23 Mon Sep 17 00:00:00 2001 From: argha-c <007.argha@gmail.com> Date: Thu, 15 Apr 2021 10:30:27 -0700 Subject: [PATCH 262/273] Defer to localAddress since bind doesn't rely on it --- .../test/java/com/netflix/zuul/netty/server/ServerTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java index 75493694..49f39487 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java @@ -54,9 +54,8 @@ public void getListeningSockets() throws Exception { protected void initChannel(Channel ch) {} }; initializers.put(new NamedSocketAddress("test", new InetSocketAddress(0)), init); - // Pick an InetAddress likely different than the above. The port to channel map has a unique Key; this - // prevents the key being a duplicate. - initializers.put(new NamedSocketAddress("test2", new InetSocketAddress(InetAddress.getLocalHost(), 0)), init); + // The port to channel map keys on the port, post bind. This should be unique even if InetAddress is same + initializers.put(new NamedSocketAddress("test2", new InetSocketAddress( 0)), init); ClientConnectionsShutdown ccs = new ClientConnectionsShutdown( new DefaultChannelGroup(GlobalEventExecutor.INSTANCE), From d08b812dca63568dee6c992fec7616b268184de1 Mon Sep 17 00:00:00 2001 From: Argha C <971473+argha-c@users.noreply.github.com> Date: Thu, 15 Apr 2021 10:58:21 -0700 Subject: [PATCH 263/273] Tests for completion event reason (#1047) * Tests for completion event reason --- .../common/HttpLifecycleChannelHandler.java | 4 +- ...HttpServerLifecycleChannelHandlerTest.java | 75 +++++++++++++++++++ 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 zuul-core/src/test/java/com/netflix/netty/common/HttpServerLifecycleChannelHandlerTest.java diff --git a/zuul-core/src/main/java/com/netflix/netty/common/HttpLifecycleChannelHandler.java b/zuul-core/src/main/java/com/netflix/netty/common/HttpLifecycleChannelHandler.java index 736039c1..bd41acda 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/HttpLifecycleChannelHandler.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/HttpLifecycleChannelHandler.java @@ -16,6 +16,7 @@ package com.netflix.netty.common; +import com.google.common.annotations.VisibleForTesting; import com.netflix.zuul.passport.CurrentPassport; import com.netflix.zuul.passport.PassportState; import io.netty.channel.Channel; @@ -43,7 +44,8 @@ protected enum State { STARTED, COMPLETED } - private static final AttributeKey ATTR_STATE = AttributeKey.newInstance("_httplifecycle_state"); + @VisibleForTesting + protected static final AttributeKey ATTR_STATE = AttributeKey.newInstance("_httplifecycle_state"); protected static boolean fireStartEvent(ChannelHandlerContext ctx, HttpRequest request) { diff --git a/zuul-core/src/test/java/com/netflix/netty/common/HttpServerLifecycleChannelHandlerTest.java b/zuul-core/src/test/java/com/netflix/netty/common/HttpServerLifecycleChannelHandlerTest.java new file mode 100644 index 00000000..61ea7365 --- /dev/null +++ b/zuul-core/src/test/java/com/netflix/netty/common/HttpServerLifecycleChannelHandlerTest.java @@ -0,0 +1,75 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.netty.common; + +import com.google.common.truth.Truth; +import com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteEvent; +import com.netflix.netty.common.HttpLifecycleChannelHandler.CompleteReason; +import com.netflix.netty.common.HttpLifecycleChannelHandler.State; +import com.netflix.netty.common.HttpServerLifecycleChannelHandler.HttpServerLifecycleOutboundChannelHandler; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelInboundHandlerAdapter; +import io.netty.channel.embedded.EmbeddedChannel; +import org.junit.Test; + +public class HttpServerLifecycleChannelHandlerTest { + + final class AssertReasonHandler extends ChannelInboundHandlerAdapter { + + CompleteEvent completeEvent; + + @Override + public void userEventTriggered(ChannelHandlerContext ctx, Object evt) { + assert evt instanceof CompleteEvent; + this.completeEvent = (CompleteEvent) evt; + } + + public CompleteEvent getCompleteEvent() { + return completeEvent; + } + } + + @Test + public void completionEventReasonIsUpdatedOnPipelineReject() { + + final EmbeddedChannel channel = new EmbeddedChannel(new HttpServerLifecycleOutboundChannelHandler()); + final AssertReasonHandler reasonHandler = new AssertReasonHandler(); + channel.pipeline().addLast(reasonHandler); + + channel.attr(HttpLifecycleChannelHandler.ATTR_STATE).set(State.STARTED); + // emulate pipeline rejection + channel.attr(HttpLifecycleChannelHandler.ATTR_HTTP_PIPELINE_REJECT).set(Boolean.TRUE); + // Fire close + channel.pipeline().close(); + + Truth.assertThat(reasonHandler.getCompleteEvent().getReason()).isEqualTo(CompleteReason.PIPELINE_REJECT); + } + + @Test + public void completionEventReasonIsCloseByDefault() { + + final EmbeddedChannel channel = new EmbeddedChannel(new HttpServerLifecycleOutboundChannelHandler()); + final AssertReasonHandler reasonHandler = new AssertReasonHandler(); + channel.pipeline().addLast(reasonHandler); + + channel.attr(HttpLifecycleChannelHandler.ATTR_STATE).set(State.STARTED); + // Fire close + channel.pipeline().close(); + + Truth.assertThat(reasonHandler.getCompleteEvent().getReason()).isEqualTo(CompleteReason.CLOSE); + } +} From 941a79b13b822f909e038b288094cde59f9ecc80 Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Thu, 15 Apr 2021 14:12:03 -0700 Subject: [PATCH 264/273] fix NPE --- .../java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index e08d8410..54e5db84 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -662,7 +662,7 @@ private void processErrorFromOrigin(final Throwable ex, final Channel origCh) { postErrorProcessing(ex, zuulCtx, err, chosenServer.get(), attemptNum); final ClientException niwsEx = new ClientException(ClientException.ErrorType.valueOf(err.getClientErrorType().name())); - if (chosenServer.get() != DiscoveryResult.EMPTY) { + if (chosenServer.get() != null && chosenServer.get() != DiscoveryResult.EMPTY) { origin.onRequestExceptionWithServer(zuulRequest, chosenServer.get(), attemptNum, niwsEx); } From 1ce5cb03331b3c5700f0a61b8bf35b9dd481d39b Mon Sep 17 00:00:00 2001 From: Arthur Gonigberg Date: Thu, 15 Apr 2021 14:42:17 -0700 Subject: [PATCH 265/273] try a different approach to fix null chosenServer --- .../zuul/filters/endpoint/ProxyEndpoint.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java index 54e5db84..e60161e3 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java +++ b/zuul-core/src/main/java/com/netflix/zuul/filters/endpoint/ProxyEndpoint.java @@ -190,7 +190,7 @@ public ProxyEndpoint(final HttpRequestMessage inMesg, final ChannelHandlerContex originTimeoutManager = getTimeoutManager(origin); requestAttempts = RequestAttempts.getFromSessionContext(context); passport = CurrentPassport.fromSessionContext(context); - chosenServer = new AtomicReference<>(); + chosenServer = new AtomicReference<>(DiscoveryResult.EMPTY); chosenHostAddr = new AtomicReference<>(); // This must happen after origin is set, since it depends on it. @@ -380,14 +380,13 @@ private void storeAndLogOriginRequestInfo() { } // the chosen server can be null in the case of a timeout exception that skips acquiring a new origin connection - if (chosenServer.get() != null) { - String ipAddr = origin.getIpAddrFromServer(chosenServer.get()); - if (ipAddr != null) { - attemptToIpAddressMap.put(attemptNum, ipAddr); - eventProps.put(CommonContextKeys.ZUUL_ORIGIN_ATTEMPT_IPADDR_MAP_KEY, attemptToIpAddressMap); - context.put(CommonContextKeys.ZUUL_ORIGIN_ATTEMPT_IPADDR_MAP_KEY, attemptToIpAddressMap); - } + String ipAddr = origin.getIpAddrFromServer(chosenServer.get()); + if (ipAddr != null) { + attemptToIpAddressMap.put(attemptNum, ipAddr); + eventProps.put(CommonContextKeys.ZUUL_ORIGIN_ATTEMPT_IPADDR_MAP_KEY, attemptToIpAddressMap); + context.put(CommonContextKeys.ZUUL_ORIGIN_ATTEMPT_IPADDR_MAP_KEY, attemptToIpAddressMap); } + if (chosenHostAddr.get() != null) { attemptToChosenHostMap.put(attemptNum, chosenHostAddr.get()); eventProps.put(CommonContextKeys.ZUUL_ORIGIN_CHOSEN_HOST_ADDR_MAP_KEY, attemptToChosenHostMap); @@ -662,7 +661,7 @@ private void processErrorFromOrigin(final Throwable ex, final Channel origCh) { postErrorProcessing(ex, zuulCtx, err, chosenServer.get(), attemptNum); final ClientException niwsEx = new ClientException(ClientException.ErrorType.valueOf(err.getClientErrorType().name())); - if (chosenServer.get() != null && chosenServer.get() != DiscoveryResult.EMPTY) { + if (chosenServer.get() != DiscoveryResult.EMPTY) { origin.onRequestExceptionWithServer(zuulRequest, chosenServer.get(), attemptNum, niwsEx); } From 530adfb6ed323f54bd122e0d3da0d4d60ba66070 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 20 Apr 2021 14:03:40 -0700 Subject: [PATCH 266/273] zuul-guice: update to Guice 5 (#1050) This is needed to run on later JDKs than 11, as it uses a better maintained classfile generator. From my reading, it is API compatible with Guice 4.2. --- zuul-core/dependencies.lock | 6 +++--- zuul-discovery/dependencies.lock | 6 +++--- zuul-groovy/dependencies.lock | 6 +++--- zuul-guice/build.gradle | 2 +- zuul-guice/dependencies.lock | 24 ++++++++++++------------ zuul-sample/dependencies.lock | 18 +++++++++--------- 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 8d3afbfe..41e52f0a 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -271,7 +271,7 @@ "locked": "1.68" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.openjdk.jmh:jmh-core": { "locked": "1.29" @@ -473,7 +473,7 @@ "locked": "1.68" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.slf4j:slf4j-api": { "locked": "1.7.25" @@ -583,7 +583,7 @@ "locked": "1.68" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-discovery/dependencies.lock b/zuul-discovery/dependencies.lock index b30deaa1..2aaf0b05 100644 --- a/zuul-discovery/dependencies.lock +++ b/zuul-discovery/dependencies.lock @@ -85,7 +85,7 @@ "locked": "4.13" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -146,7 +146,7 @@ "locked": "4.13" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.slf4j:slf4j-api": { "locked": "1.7.25" @@ -178,7 +178,7 @@ "locked": "4.13" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.slf4j:slf4j-api": { "locked": "1.7.25" diff --git a/zuul-groovy/dependencies.lock b/zuul-groovy/dependencies.lock index 92f97738..530d8b5a 100644 --- a/zuul-groovy/dependencies.lock +++ b/zuul-groovy/dependencies.lock @@ -401,7 +401,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -699,7 +699,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -882,7 +882,7 @@ "locked": "3.0.3" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-guice/build.gradle b/zuul-guice/build.gradle index 4db10851..94a1a331 100644 --- a/zuul-guice/build.gradle +++ b/zuul-guice/build.gradle @@ -2,7 +2,7 @@ apply plugin: "java-library" dependencies { implementation project(":zuul-core") - api(group: 'com.google.inject', name: 'guice', version: "4.2.3", classifier: "no_aop") + api(group: 'com.google.inject', name: 'guice', version: "5.0.1") implementation 'commons-configuration:commons-configuration:1.8' testImplementation libraries.junit, diff --git a/zuul-guice/dependencies.lock b/zuul-guice/dependencies.lock index 1dc66c11..ad4e6993 100644 --- a/zuul-guice/dependencies.lock +++ b/zuul-guice/dependencies.lock @@ -7,7 +7,7 @@ "locked": "2.12.1" }, "com.google.inject:guice": { - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -122,7 +122,7 @@ "locked": "2.12.1" }, "com.google.inject:guice": { - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -245,10 +245,10 @@ "com.netflix.zuul:zuul-core", "com.netflix.zuul:zuul-discovery" ], - "locked": "29.0-jre" + "locked": "30.1-jre" }, "com.google.inject:guice": { - "locked": "4.2.3" + "locked": "5.0.1" }, "com.google.truth:truth": { "locked": "1.0.1" @@ -404,7 +404,7 @@ "locked": "1.68" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.openjdk.jmh:jmh-core": { "locked": "1.21" @@ -438,10 +438,10 @@ "com.netflix.zuul:zuul-core", "com.netflix.zuul:zuul-discovery" ], - "locked": "29.0-jre" + "locked": "30.1-jre" }, "com.google.inject:guice": { - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -606,7 +606,7 @@ "locked": "2.12.1" }, "com.google.inject:guice": { - "locked": "4.2.3" + "locked": "5.0.1" }, "com.google.truth:truth": { "locked": "1.0.1" @@ -705,7 +705,7 @@ "locked": "4.13.1" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ @@ -732,10 +732,10 @@ "com.netflix.zuul:zuul-core", "com.netflix.zuul:zuul-discovery" ], - "locked": "29.0-jre" + "locked": "30.1-jre" }, "com.google.inject:guice": { - "locked": "4.2.3" + "locked": "5.0.1" }, "com.google.truth:truth": { "locked": "1.0.1" @@ -891,7 +891,7 @@ "locked": "1.68" }, "org.mockito:mockito-core": { - "locked": "3.8.0" + "locked": "3.9.0" }, "org.slf4j:slf4j-api": { "firstLevelTransitive": [ diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index 4656c85f..2f75673e 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -189,7 +189,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -319,7 +319,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -455,13 +455,13 @@ "com.netflix.zuul:zuul-discovery", "com.netflix.zuul:zuul-groovy" ], - "locked": "29.0-jre" + "locked": "30.1-jre" }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -668,13 +668,13 @@ "com.netflix.zuul:zuul-discovery", "com.netflix.zuul:zuul-groovy" ], - "locked": "29.0-jre" + "locked": "30.1-jre" }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -867,7 +867,7 @@ "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ @@ -997,13 +997,13 @@ "com.netflix.zuul:zuul-discovery", "com.netflix.zuul:zuul-groovy" ], - "locked": "29.0-jre" + "locked": "30.1-jre" }, "com.google.inject:guice": { "firstLevelTransitive": [ "com.netflix.zuul:zuul-guice" ], - "locked": "4.2.3" + "locked": "5.0.1" }, "com.netflix.archaius:archaius-core": { "firstLevelTransitive": [ From 2ca73f056cc283ffef37fbd37478a5a94e255e27 Mon Sep 17 00:00:00 2001 From: Argha C <971473+argha-c@users.noreply.github.com> Date: Thu, 29 Apr 2021 10:53:33 -0700 Subject: [PATCH 267/273] Begin 2.3.1-snapshot (#1052) --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 96102040..552b2b43 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,4 +2,4 @@ versions_groovy=3.0.3 versions_ribbon=2.4.4 versions_netty=4.1.63.Final release.scope=patch -release.version=2.3.0-SNAPSHOT +release.version=2.3.1-SNAPSHOT From 3f8e4ee545cd0c1752aab99fda2af34af16a2d65 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 11 May 2021 12:03:12 -0700 Subject: [PATCH 268/273] zuul-core: add ability to create trusted origin name authority (#1055) --- .../com/netflix/zuul/origins/OriginName.java | 20 +++++++++- .../netflix/zuul/origins/OriginNameTest.java | 39 +++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 zuul-core/src/test/java/com/netflix/zuul/origins/OriginNameTest.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/OriginName.java b/zuul-core/src/main/java/com/netflix/zuul/origins/OriginName.java index 49591483..7de8c9c1 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/OriginName.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/OriginName.java @@ -19,6 +19,8 @@ import com.netflix.zuul.util.VipUtils; import java.util.Locale; import java.util.Objects; +import java.util.Optional; +import javax.annotation.CheckReturnValue; public final class OriginName { /** @@ -55,6 +57,11 @@ public static OriginName fromVip(String vip, String niwsClientName) { return new OriginName(niwsClientName, vip, VipUtils.extractUntrustedAppNameFromVIP(vip), false); } + @CheckReturnValue + public OriginName withTrustedAuthority(String authority) { + return new OriginName(niwsClientName, target, authority, true); + } + private OriginName(String niwsClientName, String target, String authority, boolean authorityTrusted) { this.niwsClientName = Objects.requireNonNull(niwsClientName, "niwsClientName"); this.metricId = niwsClientName.toLowerCase(Locale.ROOT); @@ -86,6 +93,17 @@ public String getMetricId() { return metricId; } + /** + * Returns the Authority of this origin. This is used for establishing secure connections. May be absent + * if the authority is not trusted. + */ + public Optional getTrustedAuthority() { + if (authorityTrusted) { + return Optional.of(authority); + } + return Optional.empty(); + } + @Override public boolean equals(Object o) { if (!(o instanceof OriginName)) { @@ -100,7 +118,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(niwsClientName, target, authority, authorityTrusted); + return Objects.hash(authorityTrusted, niwsClientName, target, authority); } @Override diff --git a/zuul-core/src/test/java/com/netflix/zuul/origins/OriginNameTest.java b/zuul-core/src/test/java/com/netflix/zuul/origins/OriginNameTest.java new file mode 100644 index 00000000..5a8c676c --- /dev/null +++ b/zuul-core/src/test/java/com/netflix/zuul/origins/OriginNameTest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.netflix.zuul.origins; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class OriginNameTest { + @Test + public void getTrustedAuthority() { + OriginName originName = OriginName.fromVip("woodly-doodly"); + + assertFalse(originName.getTrustedAuthority().isPresent()); + + OriginName trusted = originName.withTrustedAuthority("westerndigital"); + + assertEquals("westerndigital", trusted.getTrustedAuthority().get()); + } +} From e22dc37d351db1da4562fd6ed71892224a18afb4 Mon Sep 17 00:00:00 2001 From: Argha C <971473+argha-c@users.noreply.github.com> Date: Wed, 12 May 2021 12:46:24 -0700 Subject: [PATCH 269/273] Add a basic builder for request message (#1056) --- .../zuul/message/util/HttpRequestBuilder.java | 116 ++++++++++++++++++ .../com/netflix/zuul/context/DebugTest.java | 8 +- 2 files changed, 122 insertions(+), 2 deletions(-) create mode 100644 zuul-core/src/main/java/com/netflix/zuul/message/util/HttpRequestBuilder.java diff --git a/zuul-core/src/main/java/com/netflix/zuul/message/util/HttpRequestBuilder.java b/zuul-core/src/main/java/com/netflix/zuul/message/util/HttpRequestBuilder.java new file mode 100644 index 00000000..94f3a055 --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/zuul/message/util/HttpRequestBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2021 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.zuul.message.util; + +import com.netflix.zuul.context.SessionContext; +import com.netflix.zuul.message.Headers; +import com.netflix.zuul.message.http.HttpQueryParams; +import com.netflix.zuul.message.http.HttpRequestMessage; +import com.netflix.zuul.message.http.HttpRequestMessageImpl; +import io.netty.handler.codec.http.HttpMethod; +import io.netty.handler.codec.http.HttpVersion; +import java.util.Objects; + +/** + * Builder for a zuul http request. *exclusively* for use in unit tests. + * + * For default values initialized in the constructor: + *

+ * {@code new HttpRequestBuilder(context).withDefaults();}
+ *
+ * + * For overrides : + *
+ * {@code new HttpRequestBuilder(context).withHeaders(httpHeaders).withQueryParams(requestParams).build();}
+ * 
+ * @author Argha C + * @since 5/11/21 + */ +public final class HttpRequestBuilder { + private SessionContext sessionContext; + private String protocol; + private String method; + private String path; + private HttpQueryParams queryParams; + private Headers headers; + private String clientIp; + private String scheme; + private int port; + private String serverName; + private boolean isBuilt; + + public HttpRequestBuilder(SessionContext context) { + sessionContext = Objects.requireNonNull(context); + protocol = HttpVersion.HTTP_1_1.text(); + method = "get"; + path = "/"; + queryParams = new HttpQueryParams(); + headers = new Headers(); + clientIp = "::1"; + scheme = "https"; + port = 443; + isBuilt = false; + } + + /** + * Builds a request with basic defaults + * + * @return `HttpRequestMessage` + */ + public HttpRequestMessage withDefaults() { + return build(); + } + + public HttpRequestBuilder withHost(String hostName) { + serverName = Objects.requireNonNull(hostName); + return this; + } + + public HttpRequestBuilder withHeaders(Headers requestHeaders) { + headers = Objects.requireNonNull(requestHeaders); + return this; + } + + public HttpRequestBuilder withQueryParams(HttpQueryParams requestParams) { + this.queryParams = Objects.requireNonNull(requestParams); + return this; + } + + public HttpRequestBuilder withMethod(HttpMethod httpMethod) { + method = Objects.requireNonNull(httpMethod).name(); + return this; + } + + public HttpRequestBuilder withUri(String uri) { + path = Objects.requireNonNull(uri); + return this; + } + + /** + * Used to build a request with overriden values + * + * @return `HttpRequestMessage` + */ + public HttpRequestMessage build() { + if (isBuilt) { + throw new IllegalStateException("Builder must only be invoked once!"); + } + isBuilt = true; + return new HttpRequestMessageImpl(sessionContext, protocol, method, path, queryParams, headers, clientIp, scheme, port, + serverName); + } +} diff --git a/zuul-core/src/test/java/com/netflix/zuul/context/DebugTest.java b/zuul-core/src/test/java/com/netflix/zuul/context/DebugTest.java index b3131fd1..3d2179cc 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/context/DebugTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/context/DebugTest.java @@ -34,6 +34,8 @@ import com.netflix.zuul.message.http.HttpRequestMessageImpl; import com.netflix.zuul.message.http.HttpResponseMessage; import com.netflix.zuul.message.http.HttpResponseMessageImpl; +import com.netflix.zuul.message.util.HttpRequestBuilder; +import io.netty.handler.codec.http.HttpMethod; import java.util.List; import org.junit.Before; import org.junit.Test; @@ -59,8 +61,10 @@ public void setup() { params = new HttpQueryParams(); params.add("k1", "v1"); - request = new HttpRequestMessageImpl(ctx, "HTTP/1.1", "post", "/some/where", - params, headers, "9.9.9.9", "https", 80, "localhost"); + request = new HttpRequestBuilder(ctx).withMethod(HttpMethod.POST) + .withUri("/some/where") + .withHeaders(headers) + .withQueryParams(params).build(); request.setBodyAsText("some text"); request.storeInboundRequest(); From 56fa76181776dbd320ce47e1f6606d6d4befab37 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 20 May 2021 16:33:00 -0700 Subject: [PATCH 270/273] zuul-core: Add overload for OriginName trust --- .../com/netflix/zuul/origins/OriginName.java | 45 +++++++++---------- .../netflix/zuul/origins/OriginNameTest.java | 11 ++--- 2 files changed, 25 insertions(+), 31 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/OriginName.java b/zuul-core/src/main/java/com/netflix/zuul/origins/OriginName.java index 7de8c9c1..ca6f2b1d 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/OriginName.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/OriginName.java @@ -19,8 +19,6 @@ import com.netflix.zuul.util.VipUtils; import java.util.Locale; import java.util.Objects; -import java.util.Optional; -import javax.annotation.CheckReturnValue; public final class OriginName { /** @@ -44,30 +42,36 @@ public final class OriginName { * used for establishing a secure connection, as well as logging. */ private final String authority; + /** - * Indicates if the authority comes from a trusted source. + * @deprecated use {@link #fromVipAndApp(String, String)} */ - private final boolean authorityTrusted; - + @Deprecated public static OriginName fromVip(String vip) { - return fromVip(vip, vip); + return fromVipAndApp(vip, VipUtils.extractUntrustedAppNameFromVIP(vip)); } + /** + * @deprecated use {@link #fromVipAndApp(String, String, String)} + */ + @Deprecated public static OriginName fromVip(String vip, String niwsClientName) { - return new OriginName(niwsClientName, vip, VipUtils.extractUntrustedAppNameFromVIP(vip), false); + return fromVipAndApp(vip, VipUtils.extractUntrustedAppNameFromVIP(vip), niwsClientName); } - @CheckReturnValue - public OriginName withTrustedAuthority(String authority) { - return new OriginName(niwsClientName, target, authority, true); + public static OriginName fromVipAndApp(String vip, String appName) { + return fromVipAndApp(vip, appName, vip); } - private OriginName(String niwsClientName, String target, String authority, boolean authorityTrusted) { - this.niwsClientName = Objects.requireNonNull(niwsClientName, "niwsClientName"); - this.metricId = niwsClientName.toLowerCase(Locale.ROOT); + public static OriginName fromVipAndApp(String vip, String appName, String niwsClientName) { + return new OriginName(vip, appName, niwsClientName); + } + + private OriginName(String target, String authority, String niwsClientName) { this.target = Objects.requireNonNull(target, "target"); this.authority = Objects.requireNonNull(authority, "authority"); - this.authorityTrusted = authorityTrusted; + this.niwsClientName = Objects.requireNonNull(niwsClientName, "niwsClientName"); + this.metricId = niwsClientName.toLowerCase(Locale.ROOT); } /** @@ -97,11 +101,8 @@ public String getMetricId() { * Returns the Authority of this origin. This is used for establishing secure connections. May be absent * if the authority is not trusted. */ - public Optional getTrustedAuthority() { - if (authorityTrusted) { - return Optional.of(authority); - } - return Optional.empty(); + public String getAuthority() { + return authority; } @Override @@ -110,15 +111,14 @@ public boolean equals(Object o) { return false; } OriginName that = (OriginName) o; - return authorityTrusted == that.authorityTrusted - && Objects.equals(niwsClientName, that.niwsClientName) + return Objects.equals(niwsClientName, that.niwsClientName) && Objects.equals(target, that.target) && Objects.equals(authority, that.authority); } @Override public int hashCode() { - return Objects.hash(authorityTrusted, niwsClientName, target, authority); + return Objects.hash(niwsClientName, target, authority); } @Override @@ -127,7 +127,6 @@ public String toString() { "niwsClientName='" + niwsClientName + '\'' + ", target='" + target + '\'' + ", authority='" + authority + '\'' + - ", authorityTrusted=" + authorityTrusted + '}'; } } diff --git a/zuul-core/src/test/java/com/netflix/zuul/origins/OriginNameTest.java b/zuul-core/src/test/java/com/netflix/zuul/origins/OriginNameTest.java index 5a8c676c..0916d872 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/origins/OriginNameTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/origins/OriginNameTest.java @@ -18,7 +18,6 @@ package com.netflix.zuul.origins; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; import org.junit.Test; import org.junit.runner.RunWith; @@ -27,13 +26,9 @@ @RunWith(JUnit4.class) public class OriginNameTest { @Test - public void getTrustedAuthority() { - OriginName originName = OriginName.fromVip("woodly-doodly"); + public void getAuthority() { + OriginName trusted = OriginName.fromVipAndApp("woodly-doodly", "westerndigital"); - assertFalse(originName.getTrustedAuthority().isPresent()); - - OriginName trusted = originName.withTrustedAuthority("westerndigital"); - - assertEquals("westerndigital", trusted.getTrustedAuthority().get()); + assertEquals("westerndigital", trusted.getAuthority()); } } From 6a26ade5626441c040d679d3d835cb92373f3bc5 Mon Sep 17 00:00:00 2001 From: visu83 <60400453+visu83@users.noreply.github.com> Date: Fri, 21 May 2021 09:54:27 -0700 Subject: [PATCH 271/273] Bug Fixed --- zuul-core/src/main/java/com/netflix/zuul/context/Debug.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/context/Debug.java b/zuul-core/src/main/java/com/netflix/zuul/context/Debug.java index a44dab61..539ba3e8 100755 --- a/zuul-core/src/main/java/com/netflix/zuul/context/Debug.java +++ b/zuul-core/src/main/java/com/netflix/zuul/context/Debug.java @@ -175,7 +175,7 @@ public static Observable writeDebugResponse(SessionContext context, String prefix = isInbound ? "RESPONSE_INBOUND" : "RESPONSE_OUTBOUND"; String arrow = "<"; - Debug.addRequestDebug(context, String.format("%s:: %s STATUS: %s", prefix, arrow, response.getStatus())); + Debug.addRequestDebug(context, String.format("%s:: %s STATUS: %d", prefix, arrow, response.getStatus())); obs = Debug.writeDebugMessage(context, response, prefix, arrow); } From ab9679209c0296b2db2e5669bcd6acc29e74a8f2 Mon Sep 17 00:00:00 2001 From: visu83 <60400453+visu83@users.noreply.github.com> Date: Fri, 21 May 2021 11:29:01 -0700 Subject: [PATCH 272/273] Fix issue --- zuul-core/src/main/java/com/netflix/zuul/context/Debug.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/context/Debug.java b/zuul-core/src/main/java/com/netflix/zuul/context/Debug.java index 539ba3e8..a8092090 100755 --- a/zuul-core/src/main/java/com/netflix/zuul/context/Debug.java +++ b/zuul-core/src/main/java/com/netflix/zuul/context/Debug.java @@ -175,7 +175,7 @@ public static Observable writeDebugResponse(SessionContext context, String prefix = isInbound ? "RESPONSE_INBOUND" : "RESPONSE_OUTBOUND"; String arrow = "<"; - Debug.addRequestDebug(context, String.format("%s:: %s STATUS: %d", prefix, arrow, response.getStatus())); + Debug.addRequestDebug(context, String.format("%s:: %s STATUS: %d ", prefix, arrow, response.getStatus())); obs = Debug.writeDebugMessage(context, response, prefix, arrow); } From 67fde95975346bca5c9fe413458a4d2ebbb3a9f2 Mon Sep 17 00:00:00 2001 From: gurudevtest Date: Thu, 1 Jul 2021 12:03:13 -0700 Subject: [PATCH 273/273] Update Server.java --- .../src/main/java/com/netflix/zuul/netty/server/Server.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java index f00cf6ce..887a89a2 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java @@ -436,6 +436,7 @@ synchronized private void stop() } catch (IllegalStateException e) { // This can happen if the VM is already shutting down LOG.debug("Failed to remove shutdown hook", e); + throw e; } stopped = true; @@ -508,4 +509,4 @@ private static boolean kqueueIsAvailable() { } return available; } -} \ No newline at end of file +}