Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly serialize availabilityZone and remove maxRetries from RequestAttempt #1639

Merged
merged 1 commit into from
Sep 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 2 additions & 13 deletions zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java
Expand Up @@ -57,10 +57,9 @@ public class RequestAttempt
private String availabilityZone;
private long readTimeout;
private int connectTimeout;
private int maxRetries;

public RequestAttempt(int attemptNumber, InstanceInfo server, String targetVip, String chosenWarmupLB, int status, String error, String exceptionType,
int readTimeout, int connectTimeout, int maxRetries)
int readTimeout, int connectTimeout)
{
if (attemptNumber < 1) {
throw new IllegalArgumentException("Attempt number must be greater than 0! - " + attemptNumber);
Expand Down Expand Up @@ -96,7 +95,6 @@ public RequestAttempt(int attemptNumber, InstanceInfo server, String targetVip,
this.exceptionType = exceptionType;
this.readTimeout = readTimeout;
this.connectTimeout = connectTimeout;
this.maxRetries = maxRetries;
}

public RequestAttempt(final DiscoveryResult server, final IClientConfig clientConfig, int attemptNumber, int readTimeout) {
Expand Down Expand Up @@ -219,11 +217,6 @@ public int getConnectTimeout()
return connectTimeout;
}

public int getMaxRetries()
{
return maxRetries;
}

public void setStatus(int status)
{
this.status = status;
Expand Down Expand Up @@ -330,11 +323,6 @@ else if (t instanceof SSLHandshakeException) {
}
}

public void setMaxRetries(int maxRetries)
{
this.maxRetries = maxRetries;
}

@Override
public String toString()
{
Expand All @@ -357,6 +345,7 @@ public ObjectNode toJsonNode()
putNullableAttribute(root, "cause", cause);
putNullableAttribute(root, "exceptionType", exceptionType);
putNullableAttribute(root, "region", region);
putNullableAttribute(root, "availabilityZone", availabilityZone);
putNullableAttribute(root, "asg", asg);
putNullableAttribute(root, "instanceId", instanceId);
putNullableAttribute(root, "vip", vip);
Expand Down