New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 784569 link

Starred by 4 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 746665
issue 760633


Show other hotlists

Hotlists containing this issue:
Hotlist-1


Sign in to add a comment

Create a shared python lib to parse DEPS file

Project Member Reported by st...@chromium.org, Nov 13 2017

Issue description

Currently, there are quite a few apps that need to parse DEPS file: Findit, Predator, ChromimiumDash, Pinpoint, ClusterFuzz, etc.

It would be great if the infra could have a standalone python lib that could be reused by all the apps mentioned above.
As gclient uses ast parsing (IIUC), it is also better to avoid exec for security reason.
 

Comment 1 by st...@chromium.org, Nov 13 2017

Cc: pras...@chromium.org kateso...@chromium.org simonhatch@chromium.org infe...@chromium.org
agable@ mentioned that there is plan to migrate from DEPS to git modules. If that happens, it would be great if we could have backward compatibility.


cc other app owners on this bug.

Comment 2 by st...@chromium.org, Nov 13 2017

Description: Show this description

Comment 3 by aga...@chromium.org, Nov 15 2017

Components: Infra>SDK
Labels: -Pri-3 Pri-2
Yep, this is definitely something that we want to provide. We already *almost* provide it: use-cases which have access to a subprocess environment can run "gclient flatten".

But yes, better would be to have a library which consumes DEPS files (including over the network, pulling contents from googlesource) and produces a dependency tree.

How upset would people be if it were in Go, since we try not to write any new code in Python? (I know, doing it in Go is a long shot anyway, since DEPS files are literally python, but I'd like to discuss it anyway.)

Comment 4 by st...@chromium.org, Nov 15 2017

From what I know, the apps I mentioned above are all in python. So a python library would be appreciated!
Put differently, a Go library would be worse than a command-line interface :).

Comment 6 by aga...@chromium.org, Nov 20 2017

Blocking: 760633
Any updates for this bug? 

recently the DEPS parser for Findit and Predator failed to parse the buildspec DEPS, I can do a hacky fix but think it might be much cleaner that we can have a such a shared and well-maintained lib to parse DEPS file. 

Comment 8 by aga...@chromium.org, Mar 12 2018

DEPS files are now parsed via gclient_eval.py, a stand-alone DPES-file-parser in depot_tools. However:
1) it isn't executable, it's just a library.
2) it's in depot_tools, so importing it from elsewhere is non-trivial.
3) we don't guarantee that its API is stable yet.

Comment 9 by lyan@chromium.org, Mar 19 2018

We, the chrome crash team, has a job that exports blame/source info to our frontend http://crash, and our job depends on parsing DEPS file. Our code is in C++ but we could use a python parser.

Comment 10 by lyan@chromium.org, Mar 19 2018

Cc: lyan@chromium.org
Blocking: 746665

Sign in to add a comment