cros deploy fails when using progress bar operation |
||||||||||||
Issue descriptioncros deploy crashes when output is piped and log-level is not specified: $ cros deploy $remote cryptohome | cat 09:30:24: NOTICE: Cleaning outdated binary packages from /build/daisy 09:30:26: NOTICE: These are the packages to emerge: 09:30:26: NOTICE: * 1) chromeos-base/cryptohome-0.0.1-r1220 09:30:26: ERROR: cros deploy failed before completing. 09:30:26: ERROR: _EmergePackages() got an unexpected keyword argument 'log_level' The actual use case here is running cros deploy through a bash script executed from utils.command_executer. Setting --log-level=notice appears to fix it.
,
Jun 28 2016
,
Jun 28 2016
while we should fix this python error, it won't really help you -- the code is prompting you for input and you haven't provided any
looks like it's:
cli/deploy.py:
if emerge:
func = functools.partial(_EmergePackages, pkgs, device, strip,
sysroot, root, emerge_args)
else:
func = functools.partial(_UnmergePackages, pkgs, device, root)
if command.UseProgressBar():
op = BrilloDeployOperation(len(pkgs), emerge)
op.Run(func, log_level=logging.DEBUG)
that code will turn around and pass |log_level| to |func|, but neither of those funcs accept |log_level|. should just drop it i think.
,
Jun 29 2016
,
Jul 29 2016
raising priority a little. I was just hit by this. It is annoying not to be able to do this..
,
Feb 27 2017
Assuming this is available, Matteo got a fix for it: https://chromium-review.googlesource.com/c/445787/ If it is ok, I will mark it as started (and next assign to someone at our team).
,
Mar 3 2017
Assigning it to one of our team mates in UK.
,
Mar 3 2017
,
Mar 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/chromite/+/e30397d83d7bf84734c00e9776ef703f75d44d23 commit e30397d83d7bf84734c00e9776ef703f75d44d23 Author: Matteo Franchin <matteo.franchin@arm.com> Date: Tue Mar 07 14:16:14 2017 Always consume log_level arg in ProgressBarOperation.Run Fix inconsistent handling of the log_level keyword argument in ProgressBarOperation.Run(). This method was indeed passing the log_level keyword argument to its callback in certain cases, but not in others. In particular, when running cros deploy with redirected stdout (isatty() returning False) Run() passed the log_level argument to its callback. This caused failures to run cros deploy when redirecting its output to a file, for example. This commit fixes the issue by changing the Run() method so that it always consumes the log_level argument and uses it to set the log level under which the callback function is ran. BUG= chromium:623999 TEST=lib/operation_unittest cli/deploy_unittest Change-Id: I846d3868d3274d01d017a4b80b84eb91345586b0 Reviewed-on: https://chromium-review.googlesource.com/445787 Commit-Ready: Matteo Franchin <matteo.franchin@arm.com> Tested-by: Matteo Franchin <matteo.franchin@arm.com> Reviewed-by: Chris Sosa <sosa@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/e30397d83d7bf84734c00e9776ef703f75d44d23/lib/operation.py
,
Mar 9 2017
As the patch landed, I'm marking the issue as Fixed.
,
May 30 2017
,
Aug 1 2017
,
Aug 3 2017
Closing. Please reopen it if its not fixed. Thanks! |
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by cburden@google.com
, Jun 28 2016