Skip to content

4942: Cached values from the previous account #4943

@sergeibbb

Description

@sergeibbb

Steps to reproduce

  • connect one GitHub account on GKDev
  • sync account on GitLens, reload window, open launchpad -> you get this GitHub account cached
  • go to GKDev disconnect GitHub and connect another account.
  • sync accounts on GitLens, open launchpad

Expected result

  • launchpad gets the new GitHub account as "currentAccount"

Current result

  • launchpad gets the old cached GitHub account as "currentAccount"

Workaround

User can solve the problem by reloading the VSCode window

Possible solution

Drop values when the session is updated by updating their ETag:
Image

  • Pros: simple and quick to implement
  • Cons: Azure refreshes tokens every hour, it would mean that would cause their caches to refresh frequently

Notes

This is revealed by #4944.

Switching accounts is a rare case. But since #4944 starts caching Authentication errors it become more frequent:

  • have an error cached
  • reconnect the integration
  • sync GitLens integrations
  • keep getting the cached error

Metadata

Metadata

Labels

triageNeeds to be looked at

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions