Browsing code repos sometimes shows "unknown" commits.
Calculating the "last commit" info can take a while, so it's done in parallel chunks with a timeout (see RepositoryImplementation.last_commit_ids
and LastCommit._build
). If chunks time out, it is saved to the database missing some entries, and shows "unknown" for those files/folders forever.
Options:
- be smarter about it: use prior LastCommit docs (LCD) to get info about existing files/dirs (but those LCDs might not be built yet)
- flag LCDs that are incomplete, and try to build the rest of the content on later refreshes
- pre-compute it in scripts/refreshrepo.py - but we're trying to do less of that - at a minimum would have to do that after the "refresh" is "done" so the email notifications and web interface update. And it'd add a lot more data to mongo.
- run the compute as an on-demand background job with much longer timeout. Maybe couple this with ajax loading: [#6802]