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:
- Do not cache failed user lookups
- Retry the failed user lookups (at least once, up to x times)
- Clear the cache more often (at least the failed lookups in the cache)
- Allow the user to manually trigger clearing the cache
Solution picked
Clear the cache more often
See #296706 (comment 677486127) for more details