-
Notifications
You must be signed in to change notification settings - Fork 120
chore: Revert "fix: Ensure proper errors are reported when authentication fa… #325
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
Conversation
…ils (a2aproject#318)" This reverts commit 0165e0c.
Summary of ChangesHello @kabir, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request fully reverts a previous commit (#318) that aimed to enhance error reporting for authentication and authorization issues. The decision to revert was made due to recurring failures observed in the Continuous Integration (CI) pipeline after the original changes were introduced. This action removes the specific error handling logic and associated test cases, restoring the system to its state before the problematic commit. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request reverts a previous commit that introduced new authentication and authorization error handling, which was causing CI failures. The revert correctly removes the new error handling logic from the HTTP and gRPC transports, along with associated tests and utility classes. While the revert seems necessary to fix the build, I've identified a couple of issues in the code being reverted to that should be addressed to prevent future problems. Specifically, there's a potential for silent failures in asynchronous streaming requests due to missing exception handling, and a minor maintainability issue with the use of magic numbers.
| return httpClient.sendAsync(request, bodyHandler) | ||
| .thenAccept(response -> { | ||
| // Status checking is now handled in the body handler | ||
| }) | ||
| .exceptionally(throwable -> { | ||
| // handle any other async errors (network issues, etc.) | ||
| subscriber.onError(new IOException("Request failed: " + throwable.getMessage(), throwable)); | ||
| return null; | ||
| if (!JdkHttpResponse.success(response)) { | ||
| subscriber.onError(new IOException("Request failed " + response.statusCode())); | ||
| } | ||
| }); |
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.
The exceptionally() block was removed from this CompletableFuture chain as part of the revert. This is problematic because if httpClient.sendAsync() fails (e.g., due to a network error), the exception will not be propagated to the errorConsumer. The CompletableFuture returned by asyncRequest will complete exceptionally, but the subscriber's onError method will not be called, leading to silent failures for the stream consumer. Please re-add the exceptionally() block to ensure errors are correctly handled.
return httpClient.sendAsync(request, bodyHandler)
.thenAccept(response -> {
if (!JdkHttpResponse.success(response)) {
subscriber.onError(new IOException("Request failed " + response.statusCode()));
}
})
.exceptionally(throwable -> {
subscriber.onError(new IOException("Request failed: " + throwable.getMessage(), throwable));
return null;
});…thentication fa… (a2aproject#325)" This reverts commit 8815fba.
…thentication fa… (a2aproject#325)" This reverts commit 8815fba.
…tion fa… (a2aproject#325) …ils (a2aproject#318)" This reverts commit 0165e0c from a2aproject#318 since we started seeing failures on CI
…project#328) I can't reproduce the failures mentioned in a2aproject#325 so attempting to open the PR again to see if it fails on CI. Fixes a2aproject#317
…ils (#318)"
This reverts commit 0165e0c from #318 since we started seeing failures on CI