travis-ci / cyclist

AWS ASG lifecycle thing :tada: :bicyclist:
MIT License
8 stars 2 forks source link

return nil on missing lifecycle action #29

Closed igorwwwwwwwwwwwwwwwwwwww closed 7 years ago

igorwwwwwwwwwwwwwwwwwwww commented 7 years ago

Redis HGETALL returns an empty list when accessing a missing key. The calling code in this case is expecting fetchInstanceLifecycleAction() to return nil in case of a missing action.

Missing action may happen when an instance posts against /terminations/ after imploding. In that case it never received a termination request, so there is no action to fetch.