-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix an unnecessary cancel/re-request with GitHub Copilot requests (and fix some other bugs with Copilot exception handling) #12988
Fix an unnecessary cancel/re-request with GitHub Copilot requests (and fix some other bugs with Copilot exception handling) #12988
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.
These changes are safe, although the semantics are a bit confusing.
If cancellation is requested, that's typically an indication that the caller no longer cares about the result, so the old code was making that pattern explicit. However, it's possible that Copilot is behaving in an unexpected way here by requesting cancellation but still populating an internal cache with results that come later.
I was going to look at additional changes on Monday to remove some of the additional unnecessary cancelling -- and I think I'm going to create a separate function specifically for the register callback, since that appears to be a special case in regards to cancelling. |
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.
Follow up to #12773 and #12979 .
Fixes a GeneralError from a getProjectContext request returning undefined instead of throwing an exception (which triggers the retry).
Fixes this exception being thrown:
and