Skip to content
This repository was archived by the owner on Mar 5, 2026. It is now read-only.

feat(uninstall): delete auth credentials on uninstall (CODY-1043)#2434

Merged
pkukielka merged 2 commits into
mainfrom
jsm/cody-1043-delete-creds-after-uninstall
Oct 15, 2024
Merged

feat(uninstall): delete auth credentials on uninstall (CODY-1043)#2434
pkukielka merged 2 commits into
mainfrom
jsm/cody-1043-delete-creds-after-uninstall

Conversation

@jamesmcnamara

Copy link
Copy Markdown
Contributor

This is the JetBrains half of the CODY-1043, the VSC half of it is in this PR.

For VSCode I was able to write an E2E as there are electron & VSCode test utilities for opening / closing instances of VSC and installing / uninstalling plugins.

Does anyone know if we have similar utilities that we could use to write a test for this behavior in JB?

The good news is that JB actually has proper APIs for this hook so the complexity is much lower here.

Test plan

I manually tested this by running CODY_DIR='<my local cody>' ./gradlew -PforceAgentBuild=true buildPlugin and then opening the plugins menu and installing a plugin from disk.
image

I logged in and then uninstalled from the same menu. After reinstalling, it takes me back to the login screen and all previous endpoints are cleared. When I log back into the same account I see my chat history is removed.

@pkukielka pkukielka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pkukielka pkukielka merged commit 65f65c5 into main Oct 15, 2024
@pkukielka pkukielka deleted the jsm/cody-1043-delete-creds-after-uninstall branch October 15, 2024 12:35
jamesmcnamara added a commit that referenced this pull request Oct 19, 2024
jamesmcnamara added a commit that referenced this pull request Oct 21, 2024
) (#2434)" (#2484)

This reverts commit 65f65c5.

The UninstallListener introduced in this commit seems to run for every
extension uninstall instead of just when the sourcegraph extension is
uninstalled.

## Test plan
This will need to be manually tested.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants