Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

[Backport 5.3.9104] scip-ctags: better error propagation#61847

Merged
BolajiOlajide merged 1 commit into
5.3.9104from
backport-61712-to-5.3.9104
Apr 15, 2024
Merged

[Backport 5.3.9104] scip-ctags: better error propagation#61847
BolajiOlajide merged 1 commit into
5.3.9104from
backport-61712-to-5.3.9104

Conversation

@sourcegraph-release-bot

Copy link
Copy Markdown
Collaborator

This change corrects the error handling in scip-ctags, making it more
consistent with universal-ctags. We now split errors into two classes:

  • Fatal: user command is invalid or incorrectly formatted, I/O errors. This
    indicates a big issue in how we're using ctags and we should fail hard.
  • Non-fatal: any file parsing issue (invalid UTF-8, unsupported language, or all symbols
    can't be parsed).

Our go-ctags wrapper only reports fatal errors, and just logs non-fatal errors.
We fail indexing for an entire Zoekt repo on go-ctags errors, which helps
surface serious issues with ctags, while allowing parse failures for individual files.

Fixes https://github.com/sourcegraph/sourcegraph/issues/61785
Fixes ENG-23595

Test plan

Added a new snapshot test for an error case, and made sure the output looked
good. Manual testing, including indexing the github-linguist/linguist repo
locally and checking it now succeeds.
Backport 47ab5f5 from #61712

This change corrects the error handling in scip-ctags, making it more
consistent with universal-ctags. We now split errors into two classes:
* Fatal: user command is invalid or incorrectly formatted, I/O errors. This
indicates a big issue in how we're using ctags and we should fail hard.
* Non-fatal: any file parsing issue (invalid UTF-8, unsupported language, or all symbols
can't be parsed).

Our go-ctags wrapper only reports fatal errors, and just logs non-fatal errors.
We fail indexing for an entire Zoekt repo on go-ctags errors, which helps
surface serious issues with ctags, while allowing parse failures for individual files.

(cherry picked from commit 47ab5f5)
@BolajiOlajide BolajiOlajide merged commit 153b624 into 5.3.9104 Apr 15, 2024
@BolajiOlajide BolajiOlajide deleted the backport-61712-to-5.3.9104 branch April 15, 2024 11:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants