Skip to content

GitHub Importer - Failed email lookup is cached for a day

Problem to solve

When importing projects from GitHub, user email lookups are cached for performance. If one of these lookups fail (e.g. email was marked as private), this result is also cached. A failed lookup prevents user matching during import, but it can often be easily fixed by changing the email (visibility) and re-importing. However, due to these lookups being cached (for ~ a day), subsequent re-imports will still fail to match the user.

To avoid this, the user performing the import would have to wait for a day or find a way to clear the cache (which is not documented and not accessible for gitlab.com).

Proposed solution

Depending on the performance impact, one of the following solutions should be implemented:

  1. Do not cache failed user lookups
  2. Retry the failed user lookups (at least once, up to x times)
  3. Clear the cache more often (at least the failed lookups in the cache)
  4. Allow the user to manually trigger clearing the cache

Solution picked

Clear the cache more often

See #296706 (comment 677486127) for more details

Documentation

Edited by Doug Stull