-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
s2a: Address comments on PR#11113 #11534
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This batch of changes looks fine (excepting the one interrupt comment). We can merge this easily and additional changes can be in another PR.
@@ -121,6 +121,7 @@ private void checkPeerTrusted(X509Certificate[] chain, boolean isCheckingClientC | |||
try { | |||
resp = stub.send(reqBuilder.build()); | |||
} catch (IOException | InterruptedException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This catch needs to be split, because we don't want to interrupt on IOException.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing that out, done in b060a49
Ugh. Sorry, my #11537 is causing a conflict here. |
@ejona86 , I think you may have to add the kokoro tag to get the rest of tests to run |
@@ -121,6 +121,9 @@ private void checkPeerTrusted(X509Certificate[] chain, boolean isCheckingClientC | |||
try { | |||
resp = stub.send(reqBuilder.build()); | |||
} catch (IOException | InterruptedException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be more standard as the following (but I don't feel strongly about it as it requires the CertificateException definition to be duplicated)
} catch (IOException e) {
Thread.currentThread().interrupt();
throw new CertificateException("Failed to send request to S2A.", e);
} catch (InterruptedException e) {
throw new CertificateException("Failed to send request to S2A.", e);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Larry, I'll address this in a followup along with #11539 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in f264c58
* Mark S2A public APIs as experimental. * Rename S2AChannelCredentials createBuilder API to newBuilder. * Remove usage of AdvancedTls. * Use InsecureChannelCredentials.create instead of Optional. * Invoke Thread.currentThread().interrupt() in a InterruptedException block.
No description provided.