Geo: Project sync failures usually double-increment `*_retry_count`

Summary

Project sync failures usually double-increment *_retry_count. Not a huge deal, but inaccurate and unexpected.

How

  • sync_repository calls fetch_repository
  • fetch_repository calls update_registry!(started_at: DateTime.now)
  • We rescue certain exceptions in sync_repository and call fail_registry!
  • Both update_registry! and fail_registry! increment repository_retry_count/wiki_retry_count

TODO

  • Move update_registry! start call earlier to guarantee that it has been called by the time fail_registry! can be called
  • Remove increment from fail_registry!
  • Ensure in-progress syncs are not counted as failed (I think this bug was introduced while fixing this problem a long time ago)
Edited Jun 20, 2018 by Michael Kozono
Assignee Loading
Time tracking Loading