Skip to content

Sync does not update sessions #4297

@sergeibbb

Description

@sergeibbb

Steps to reproduce

  1. have two Azure accounts.
  2. open a repo of a 1st Azure account in VSCode.
  3. open GK.dev. Connect to the 2nd Azure account. Sync GitLens with GK.dev
  4. Make sure you cannot get the information about the repository pull-requests.
  5. open GK.dev. Disconnect the 2nd Azure account. Connect it to the 1st account.
  6. Sync GitLens with GK.dev
  7. try to reach out the information about the repository pull-requests.

Expected result
GitLens is logged in to the 1st Azure account. It can get the information about thre repository pull-requests.

Actual result
GitLens keeps being logged in to the 2nd Azure account. It fails getting the information about thre repository pull-requests.

I think that the problem is that syncCloudConnection does not refresh token if it thinks that the current session is valid. I believe it can be reproduced with other types of integrations too.

Discovered and specified in #4192

Verification steps

Go through steps to reproduce and make sure that you see the Expected result.

Workaround

When there is an old session that you cannot sync with GK.dev the following helps:

  1. Disconnect the integration on GK.dev
  2. Sync
  3. Connect the integration on GK.dev
  4. Sync

Metadata

Metadata

Assignees

Labels

pending-releaseResolved but not yet released to the stable editionverified ✔Verified

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions