New issue
Advanced search Search tips

Issue 832789 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

cros tools without ChromeOS checkout.

Project Member Reported by dgarr...@chromium.org, Apr 13 2018

Issue description

Part of the ChromeOS helper scripts should really be independent from the current ChromeOS checkout, and not even require a checkout. Further, it would be nice to ensure they only run the current version of the tools (especially cros tryjob, dated versions of it are consistently painful).

cros tools that are semi-checkout independent:

bisect
buildresult
cidbcreds
flash
lint
payload
pinchrome
shell
stage
stats
tryjob
uprevchrome

cros tools that are very repo checkout dependent:

build
chroot
chrome-sdk
clean
debug
deploy
moblabvm

 
A note....

The cros command currently exists in "depot_tools", but it just looks for the current ChromeOS checkout based on CWD, and bootstraps the local version of the cros command.

That means that by somehow making a current "blessed" version of chromite available in to the cros in depot_tools, we can move most of those commands there. Then we only have to make sure that depot_tools is current, which many Chrome Infra tools do today, but which our tools do not.

Cc: vapier@chromium.org
chrome-sdk doesn't require a repo checkout.  if it did, the simple chrome workflow wouldn't work at all.

clean requires a checkout, but the entire point of it is to clean a checkout, so decoupling there doesn't make sense.

deploy requires a checkout, but i'm not sure how it'd be useful without one.  the point of it is to take a locally built board package and deploy it to a DUT.

debug is for debugging CrOS binaries, so not sure making it work w/out a chroot is useful.

i'm not exactly sure what the goal of this bug is overall ?
I think I inverted the priorities in the original description.

1) Keep people using current versions, even if they don't "repo sync".
2) Allow as many tools as possible to work without a repo checkout. Especially:
  cros tryjob
  cros pinchrome
  cros uprevchrome
  cros branchutil (upcoming tool, I hope?)

People using older versions tools and having no good way to force updates is a steady source of pain for me, and having to figure out how to have a ChromeOS checkout and maintain it is a steady source of pain for TPMs, Gardeners, and other people who aren't full time ChromeOS developers.

Understanding what happens when these tools are branched (and if they are using a branched version) is even worse.

So... I'd like to make a bunch of these tools manage their own versions. ;>
i agree all of those should work w/out needing a full CrOS checkout.  our previous focus has only been on expanding tools to work in a Chromium browser checkout (e.g. for simple chrome), but that includes the chromite checkout for us already.

i guess you're saying that we shouldn't require people to have either of those ?  but to support just having a depot_tools checkout ?

i hesitate here because we get into a tricky situation ... if your cwd is a CrOS checkout, but you're still getting the launcher/wrapper from depot_tools, should we use the copy in the checkout ?  or always the bootstrapped version ?  the answer to that question depends very heavily on what tool you're trying to use as some of them, by design, won't work with older/newer branches.
I want to force people to use the "current version" for some tools no matter what, so yes, always use the bootstrap version. People doing development could skip the wrapper.

Maybe a new wrapper script should be added that uses bootstrapped code to reduce the magic involved?

"cros-bootstrapped tryjob" instead of "cros tryjob", except with a better name?


Comment 7 by la...@chromium.org, Jun 15 2018

Labels: -Type-Bug Type-Feature
Status: Available (was: Untriaged)

Sign in to add a comment