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

Issue 848437 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Email to this user bounced
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Missing string format in deploy_chrome error path

Reported by tbrindus@chromium.org, May 31 2018

Issue description

If running deploy_chrome incorrectly (outside of a chromium src dir), the actual error will be masked out by a TypeError raised during the formatting of the real error message.

Traceback (most recent call last):
  File "/mnt/host/source/chromite/lib/parallel.py", line 442, in _Run
    self._task(*self._task_args, **self._task_kwargs)
  File "/mnt/host/source/chromite/lib/parallel.py", line 654, in ReturnWrapper
    queue.put(fn())
  File "/mnt/host/source/chromite/scripts/deploy_chrome.py", line 325, in _PrepareStagingDir
    self.copy_paths, self.chrome_dir)
  File "/mnt/host/source/chromite/scripts/deploy_chrome.py", line 630, in _PrepareStagingDir
    with _StripBinContext(options) as strip_bin:
  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/mnt/host/source/chromite/scripts/deploy_chrome.py", line 610, in _StripBinContext
    toolchain_url=options.toolchain_url) as ctx:
  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/mnt/host/source/chromite/cli/cros/cros_chrome_sdk.py", line 402, in Prepare
    version, _ = self.UpdateDefaultVersion()
  File "/mnt/host/source/chromite/cli/cros/cros_chrome_sdk.py", line 316, in UpdateDefaultVersion
    raise NoChromiumSrcDir(checkout_dir)
  File "/mnt/host/source/chromite/cli/cros/cros_chrome_sdk.py", line 52, in __init__
    Exception.__init__(self, 'No chromium src dir found in: ' % (path))
TypeError: not all arguments converted during string formatting

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/c4db2220d369130398800e33f83735755baec860

commit c4db2220d369130398800e33f83735755baec860
Author: Tudor Brindus <tbrindus@chromium.org>
Date: Sat Jun 02 00:44:48 2018

deploy_chrome: add missing string format in NoChromiumSrcDir exception

BUG= chromium:848437 
TEST=deploy_chrome fails as expected (with path in message)

Change-Id: I4213946da57c73a77251fa7facfd4e38b3a6fa47
Reviewed-on: https://chromium-review.googlesource.com/1081073
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Tudor Brindus <tbrindus@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>

[modify] https://crrev.com/c4db2220d369130398800e33f83735755baec860/cli/cros/cros_chrome_sdk.py

Project Member

Comment 2 by bugdroid1@chromium.org, Jun 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5e30abe6e3c20b2ee8eba0903eb2a0993cfa48ce

commit 5e30abe6e3c20b2ee8eba0903eb2a0993cfa48ce
Author: Chromite Chromium Autoroll <chromite-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Sat Jun 02 02:10:40 2018

Roll src/third_party/chromite d606e64..c4db222 (6 commits)

https://chromium.googlesource.com/chromiumos/chromite.git/+log/d606e64..c4db222


git log d606e64..c4db222 --date=short --no-merges --format='%ad %ae %s'
2018-06-02 tbrindus@chromium.org deploy_chrome: add missing string format in NoChromiumSrcDir exception
2018-06-02 achuith@chromium.org cros_run_vm_test: stream long running commands.
2018-06-02 ayatane@chromium.org infra_stages: Build skylab-inventory
2018-06-02 dgarrett@google.com config_lib: Remove dead site specific code.
2018-06-02 dgarrett@google.com config_lib: Have tests use config_lib not cbuildbot_config.
2018-06-02 mortonm@chromium.org Adjust tester for shill group.


Created with:
  gclient setdep -r src/third_party/chromite@c4db222

The AutoRoll server is located here: https://chromite-chromium-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



BUG= chromium:848437 , chromium:829481 ,chromium:845337, chromium:848020 , chromium:848020 ,chromium:649417
TBR=chrome-os-gardeners@chromium.org

Change-Id: If746ebf051296d3c05ede530501656a4339c8f10
Reviewed-on: https://chromium-review.googlesource.com/1083944
Reviewed-by: Chromite Chromium Autoroll <chromite-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: Chromite Chromium Autoroll <chromite-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#563915}
[modify] https://crrev.com/5e30abe6e3c20b2ee8eba0903eb2a0993cfa48ce/DEPS

Please, feel free to mark this as fixed if you believe all fixes are already landed.
Status: Fixed (was: Untriaged)

Sign in to add a comment