google / zoekt

Fast trigram based code search
1.7k stars 113 forks source link

Error for all repos: `subrepository branch mismatch` #137

Closed dziemba closed 3 years ago

dziemba commented 3 years ago

When using the latest version of zoekt, we get these errors for all our repos:

ERR: 2021/06/28 11:18:43 indexGitRepo(/data/zoekt/repos/github.com/soundcloud/normailize.git): got subrepository branches [{master 7e9e61c707ed52052a453e71f3d81d4048746f67} {master 0000000000000000000000000000000000000000}], want main repository branches [{master 7e9e61c707ed52052a453e71f3d81d4048746f67}]

We run it like this:

zoekt-indexserver \
  -data_dir /data/zoekt \
  -git_index_flags='-submodules=false -file_limit=8000000 -max_trigram_count=1000000' \
  -fetch_interval 5m \
  -mirror_duration 15m \
  -mirror_config [...]/mirror_config.json

mirror_config.json contains:

[
  {
    "GithubOrg": "soundcloud",
    "CredentialPath": "[redacted]"
  }
]

Are we doing something wrong or is this a bug?

cc @keegancsmith

keegancsmith commented 3 years ago

sorry it seems I didn't run tests properly. This is picked up. I am reverting my commit, I am unsure of the correct behaviour here. https://gerrit-review.googlesource.com/c/zoekt/+/311014

keegancsmith commented 3 years ago

FYI the revert is in master so this issue can be closed. https://github.com/google/zoekt/commit/5118231428f3b0ff69b0455f909573c65248586d

dziemba commented 3 years ago

Thank you!