-
Notifications
You must be signed in to change notification settings - Fork 291
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
VS Code: fix repo name resolution cache #5978
Conversation
expect(getRepoNameGraphQLMock).toBeCalledTimes(1) | ||
}) | ||
|
||
it('reuses cached API responses that are needed to resolve enterprise repo names', async () => { |
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 new test fails if shouldCountRefs
is set to true
in getRepoNameCached
.
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.
Good work although the subtlety of this scares me about observables in general.
Is this covered by tests that changing auth will re-query for repo IDs?
You mentioned an LRU, but that is not here... Any concerns about this being a source of leaks?
Same! It's easy to make this mistake. Similar to concerns about React's
I don't know if we have this type of test for all the features where reactivity was introduced. We should start adding more of those. I tested this case manually with a debugger for now.
The LRU cache was added to |
Test plan
CI with updated unit tests.
Changelog