Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2589)

Unified Diff: appengine/findit/common/dependency.py

Issue 1154593005: [Findit] Add a sub-pipeline to analyze failures caused by DEPS rolls. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Improve readability. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/findit/common/chromium_deps.py ('k') | appengine/findit/common/http_client_appengine.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/common/dependency.py
diff --git a/appengine/findit/common/dependency.py b/appengine/findit/common/dependency.py
index 7e6812d9d46efad0cc55bb66ad2f22eba22d39cf..b29264ff709a7fddcd41ab8cd63c925c63ddfa13 100644
--- a/appengine/findit/common/dependency.py
+++ b/appengine/findit/common/dependency.py
@@ -2,10 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import collections
class Dependency(object):
- """Represent a dependency in Chrome, like blink, v8, pdfium, etc."""
- def __init__(self, path, repo_url, revision, deps_file):
+ """Represents a dependency in Chrome, like blink, v8, pdfium, etc."""
+ def __init__(self, path, repo_url, revision, deps_file='DEPS'):
self.path = path
self.repo_url = repo_url
self.revision = revision
@@ -32,3 +33,15 @@ class Dependency(object):
'deps_file': self.deps_file,
'children': children_dict,
}
+
+
+class DependencyRoll(collections.namedtuple(
+ 'DependencyRoll', ('path', 'repo_url', 'old_revision', 'new_revision'))):
+ """Represents a dependency roll (revision update) in chromium.
+
+ Note: It is possible that the DEPS roll is a revert so that |new_revision| is
+ actually older than |old_revision| in the dependency.
+ """
+
+ def ToDict(self):
+ return self._asdict()
« no previous file with comments | « appengine/findit/common/chromium_deps.py ('k') | appengine/findit/common/http_client_appengine.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698