diff --git a/requirements.txt b/requirements.txt index fad8546faf..ddee844f5e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,7 @@ WebOb paramiko GitPython>=0.3.2.RC1 lockfile +ordereddict python-daemon extras statsd>=1.0.0,<3.0 diff --git a/zuul/model.py b/zuul/model.py index 59fc1a4c23..a582ead248 100644 --- a/zuul/model.py +++ b/zuul/model.py @@ -15,6 +15,10 @@ import re import time from uuid import uuid4 +import extras + +OrderedDict = extras.try_imports(['collections.OrderedDict', + 'ordereddict.OrderedDict']) MERGER_MERGE = 1 # "git merge" @@ -916,7 +920,7 @@ class EventFilter(object): class Layout(object): def __init__(self): self.projects = {} - self.pipelines = {} + self.pipelines = OrderedDict() self.jobs = {} self.metajobs = [] diff --git a/zuul/scheduler.py b/zuul/scheduler.py index 0d50c72fd3..705d400ec4 100644 --- a/zuul/scheduler.py +++ b/zuul/scheduler.py @@ -600,7 +600,6 @@ class Scheduler(threading.Thread): ret += '

' keys = self.layout.pipelines.keys() - keys.sort() for key in keys: pipeline = self.layout.pipelines[key] s = 'Pipeline: %s' % pipeline.name @@ -631,7 +630,6 @@ class Scheduler(threading.Thread): pipelines = [] data['pipelines'] = pipelines keys = self.layout.pipelines.keys() - keys.sort() for key in keys: pipeline = self.layout.pipelines[key] pipelines.append(pipeline.formatStatusJSON())