Skip to content

Commit

Permalink
fix(scheduler): handle missing timestamps in pod events
Browse files Browse the repository at this point in the history
fix a crash during "deis run", when some pod events are missing a
timestamp, see kubernetes/kubernetes#89689
  • Loading branch information
felixbuenemann committed Jun 19, 2020
1 parent d6023de commit 3d84a8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rootfs/scheduler/resources/pod.py
Expand Up @@ -552,7 +552,7 @@ def events(self, pod):
if not events:
events = []
# make sure that events are sorted
events.sort(key=lambda x: x['lastTimestamp'])
events.sort(key=lambda x: x['lastTimestamp'] or '')
return events

def _handle_pod_errors(self, pod, reason, message):
Expand Down

0 comments on commit 3d84a8f

Please sign in to comment.