Skip to content
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

symf: support cancelling index #2202

Merged
merged 2 commits into from
Dec 8, 2023
Merged

symf: support cancelling index #2202

merged 2 commits into from
Dec 8, 2023

Conversation

beyang
Copy link
Member

@beyang beyang commented Dec 8, 2023

Fixes #1876

image

Follow-up tasks

  • Known improvement opportunity: If a user triggers indexing when an index already exists and then cancels the new indexing, the old index is removed. It would be nicer if we could still reuse the old index. Will fix this in a follow-up PR.

Test plan

  • rm -rf ~/.cody-symf to erase the symf index
  • Open the cody repository
  • Do a natural language search to trigger indexing
  • Cancel the search. In the terminal, run ps aux | grep symf to verify the process was killed.
  • Verify the index was not built by running find ~/.cody-symf/. You should only see contents in the .tmp and .failed directories.
  • Try doing another search. The index should build this time.
  • Refresh the index using the refresh button in the side panel. Cancel the reindex. Verify the index doesn't exist.

@beyang beyang marked this pull request as ready for review December 8, 2023 07:08
Copy link
Contributor

@dominiccooney dominiccooney left a comment

Choose a reason for hiding this comment

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

Looks good!

vscode/src/local-context/symf.ts Outdated Show resolved Hide resolved
@toolmantim
Copy link
Contributor

Nice!

Copy link
Contributor

@abeatrix abeatrix left a comment

Choose a reason for hiding this comment

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

Let's go!

@kalanchan
Copy link
Contributor

GOGOGO nice work!

Co-authored-by: Dominic Cooney <dominic.cooney@sourcegraph.com>
@beyang beyang enabled auto-merge (squash) December 8, 2023 16:38
@beyang beyang merged commit 013b431 into main Dec 8, 2023
14 checks passed
@beyang beyang deleted the bl/symf-cancellation branch December 8, 2023 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: can't cancel search indexing
5 participants