Support cross-repo-dependencies in dependent pipelines
Parse commit messages for "Depends-On: <changeid>" and treat
matching changes as changes that the given change depends on.
This will treat any changes in any branch of any project as
such. If the projects share a dependent change queue, the
changes will be enqueued in order. If they do not share a
change queue in a dependent pipeline, then the latter one will
be unable to be enqueued until the change it depends on merges.
If the dependencies result in a cycle, Zuul will log the error
but otherwise the problematic changes will be ignored.
Dependent changes in independent pipelines are not yet addressed.
Change-Id: I90c173f86d11e6c44d1f408646589b7c75b1cd52
diff --git a/tests/base.py b/tests/base.py
index b872a85..773f926 100755
--- a/tests/base.py
+++ b/tests/base.py
@@ -418,11 +418,15 @@
return {}
def simpleQuery(self, query):
- # This is currently only used to return all open changes for a
- # project
self.queries.append(query)
- l = [change.query() for change in self.changes.values()]
- l.append({"type": "stats", "rowCount": 1, "runTimeMilliseconds": 3})
+ if query.startswith('change:'):
+ # Query a specific changeid
+ changeid = query[len('change:'):]
+ l = [change.query() for change in self.changes.values()
+ if change.data['id'] == changeid]
+ else:
+ # Query all open changes
+ l = [change.query() for change in self.changes.values()]
return l
def startWatching(self, *args, **kw):