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

Issue 1391403003: Add priority groups to local paths in the dependency manager. (Closed)

Created:
5 years, 2 months ago by aiolos (Not reviewing)
Modified:
5 years ago
CC:
chromium-reviews, telemetry-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add priority groups to local paths in the dependency manager. BUG=541441

Patch Set 1 #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+185 lines, -67 lines) Patch
M tools/telemetry/catapult_base/dependency_manager/dependency_info.py View 4 chunks +26 lines, -8 lines 9 comments Download
M tools/telemetry/catapult_base/dependency_manager/dependency_info_unittest.py View 6 chunks +27 lines, -15 lines 0 comments Download
M tools/telemetry/catapult_base/dependency_manager/dependency_manager.py View 1 chunk +14 lines, -4 lines 1 comment Download
M tools/telemetry/catapult_base/dependency_manager/dependency_manager_unittest.py View 1 chunk +118 lines, -40 lines 1 comment Download

Messages

Total messages: 12 (2 generated)
aiolos (Not reviewing)
5 years, 2 months ago (2015-10-09 02:33:19 UTC) #1
aiolos (Not reviewing)
5 years, 2 months ago (2015-10-09 02:34:00 UTC) #3
nednguyen
Making local_paths in dependency_info a list of list seems way too overkill to me. Can't ...
5 years, 2 months ago (2015-10-09 04:44:30 UTC) #4
aiolos (Not reviewing)
On 2015/10/09 04:44:30, nednguyen wrote: > Making local_paths in dependency_info a list of list seems ...
5 years, 2 months ago (2015-10-09 15:08:33 UTC) #5
nednguyen
On 2015/10/09 15:08:33, aiolos wrote: > On 2015/10/09 04:44:30, nednguyen wrote: > > Making local_paths ...
5 years, 2 months ago (2015-10-09 15:24:14 UTC) #6
nednguyen
+John since you need priority groups feature.
5 years, 2 months ago (2015-10-09 16:03:12 UTC) #8
nednguyen
Chatted offline and devil needs the priority group feature. Please ignore my comments against it. ...
5 years, 2 months ago (2015-10-09 16:20:07 UTC) #9
eakuefner
https://codereview.chromium.org/1391403003/diff/1/tools/telemetry/catapult_base/dependency_manager/dependency_manager.py File tools/telemetry/catapult_base/dependency_manager/dependency_manager.py (right): https://codereview.chromium.org/1391403003/diff/1/tools/telemetry/catapult_base/dependency_manager/dependency_manager.py#newcode225 tools/telemetry/catapult_base/dependency_manager/dependency_manager.py:225: mtime = os.stat(path).st_mtime mtime = os.path.getmtime(path) https://codereview.chromium.org/1391403003/diff/1/tools/telemetry/catapult_base/dependency_manager/dependency_manager_unittest.py File tools/telemetry/catapult_base/dependency_manager/dependency_manager_unittest.py ...
5 years, 2 months ago (2015-10-09 16:29:17 UTC) #10
aiolos (Not reviewing)
https://codereview.chromium.org/1391403003/diff/1/tools/telemetry/catapult_base/dependency_manager/dependency_info.py File tools/telemetry/catapult_base/dependency_manager/dependency_info.py (right): https://codereview.chromium.org/1391403003/diff/1/tools/telemetry/catapult_base/dependency_manager/dependency_info.py#newcode30 tools/telemetry/catapult_base/dependency_manager/dependency_info.py:30: local_paths: A list of paths to search in order ...
5 years, 2 months ago (2015-10-09 16:52:00 UTC) #11
nednguyen
5 years, 2 months ago (2015-10-09 17:04:04 UTC) #12
https://codereview.chromium.org/1391403003/diff/1/tools/telemetry/catapult_ba...
File tools/telemetry/catapult_base/dependency_manager/dependency_info.py
(right):

https://codereview.chromium.org/1391403003/diff/1/tools/telemetry/catapult_ba...
tools/telemetry/catapult_base/dependency_manager/dependency_info.py:129: def
_ParseLocalPaths(local_paths):
On 2015/10/09 16:52:00, aiolos wrote:
> On 2015/10/09 16:20:07, nednguyen wrote:
> > We should restrict the type of local_paths to list of list. Th rule that if
> this
> > is a list of path strings, then each path is transformed into a priority
group
> > with single path is surprising.
> 
> I'm not sure why that's surprising, since priority groups are an abstraction
> within the dependency manager that keeps the current behavior with flat
> local_paths lists. Priority groups are meant to be an optional feature, and
> should not force people to use them in their configs if they don't want to.
It's
> also why I kept the name "local_files" instead of changing it to
> "local_file_priority_groups" or similar.

The fact that priority groups is an optional feature to users is orthogonal to
the issue of naming "local_paths" variable. If I see
"dependency_info.local_files" in code, how would I suppose to expect that the
variable 'local_files' is meant to be a list of list of files? 

You can keep the "local_paths" argument unchanged in the constructor of
DependencyInfo & add documentation explaining the extra meaning. However the
member method "local_paths" of DependencyInfo should be renamed to reflect that
it's not a simple list of paths.

> 
> In the json files:
> 
> ['1', '2', '3'] means files at path 1, 2 and 3 will all be checked in order.
> [['1', '2', '3']] means that files at paths 1, 2 and 3 should all be checked
and
> the most recently changed one should be used.
> ['1', ['2', '3']] or [['1'], ['2', '3']] mean that the file at path 1 should
be
> used if it's available, otherwise use path 2 or 3 depending on which one is
> newer.

Hmm, this seems reasonable. But can you update the docstring of BaseConfig to
also reflect this?
 
> 
> 
> If we changed it, that would mean forcing the json for the first case to look
> like this instead, which seems over complicated. (Note that this example still
> works with the current implementation, it just isn't required.)
> 
> [['1'], ['2'], ['3']]
> 
> 
> If we want to force users to always put files in priority groups for
Telemetry,
> which I think is questionable, we should be doing so at the config level, not
> the dependency_info level. That will allow future configs to specify either
> always or never using the priority groups if they so desire.

Powered by Google App Engine
This is Rietveld 408576698