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

Revert "search: fail ListAllIndexed if zoekt is partially available (#45519)"#46123

Merged
ggilmore merged 1 commit into
mainfrom
revert-zoekt-missing
Jan 4, 2023
Merged

Revert "search: fail ListAllIndexed if zoekt is partially available (#45519)"#46123
ggilmore merged 1 commit into
mainfrom
revert-zoekt-missing

Conversation

@ggilmore

@ggilmore ggilmore commented Jan 4, 2023

Copy link
Copy Markdown
Contributor

This reverts commit 8135224.

As reported in https://sourcegraph.slack.com/archives/C023ELQLV7F/p1672835804462349.

Currently, Zoekt tries to report in its responses whether or not it has finished the initial load of all of its shards before performing the query. However, there was a bug that caused to still report that it hadn't finished loading even if there were no shards to load. This bug caused this error message to appear on the site admin page:

Screen Shot 2023-01-04 at 8 31 30 AM

This revert papers over this issue by restoring the old behavaior (not outright failing the ListAllIndexed call if a crash occurred during the response). After the revert, the site-admin page looks normal again:

Screen Shot 2023-01-04 at 8 29 04 AM

The underlying cause in Zoekt was fixed in sourcegraph/zoekt#512. However, for the purposes of a 4.3.1 release I think this change is the smaller one to make to work around the issue (Zoekt has recieved other commits since 4.3.0 release, and I don't want to bring in more changes than we have to).

Test plan

Manual testing:

  1. Run the local dev stack with the external service commented out:
    {
      // "GITHUB": [
      //   {
      //     "url": "https://github.com",
      //     "token": "$REDACTED", // user: sourcegraph-dogfood-user token: dev-private-localdev
      //     "repos": [
      //       "sourcegraph/sourcegraph",
      //       "hashicorp/go-multierror",
      //       "hashicorp/errwrap",
      //       "sourcegraph-testing/etcd",
      //       "sourcegraph-testing/tidb",
      //       "sourcegraph-testing/titan",
      //       "sourcegraph-testing/zap"
      //     ]
      //   }
      // ]
    }
  2. Go to the site admin page, and see this screenshot:
    Screen Shot 2023-01-04 at 8 31 30 AM
  3. Revert 8135224, and go the site admin page again and see that the page looks normal again:
    Screen Shot 2023-01-04 at 8 29 04 AM

@cla-bot cla-bot Bot added the cla-signed label Jan 4, 2023
@ggilmore ggilmore marked this pull request as ready for review January 4, 2023 17:49
@ggilmore ggilmore requested review from a team, jhchabran and mrnugget January 4, 2023 17:49
@sourcegraph-bot

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff ee72ba3...7310de1.

Notify File(s)
@beyang internal/search/env.go
@camdencheek internal/search/env.go
@keegancsmith internal/search/env.go

@ggilmore ggilmore merged commit 9be0f51 into main Jan 4, 2023
@ggilmore ggilmore deleted the revert-zoekt-missing branch January 4, 2023 19:11
@ggilmore ggilmore mentioned this pull request Jan 4, 2023
11 tasks
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.

4 participants