Skip to content

LDAP group sync: undefined method < for nil

Summary

Seen in https://gitlab.zendesk.com/agent/tickets/56350 - if an LDAP group sync times out, but the sync has never successfully completed, we compare nil < 1.hour.ago

Steps to reproduce

Kill the sync job partway through then leave GitLab turned off for > 1 hour

Expected behavior

Sync should be successfully cancelled in this instance

Actual behavior

NoMethodError is raised

/cc @dblessing