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

Issue 708254 link

Starred by 0 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Apr 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

cros uprevchrome fails with ImportError MYSQLDdb

Project Member Reported by achuith@chromium.org, Apr 4 2017

Issue description

cros uprevchrome --pfq-build 1429102 --bug='chromium:706939' --debug --nowipe

Stack:
11:57:16: DEBUG: Configured cache_dir to '/usr/local/google/home/achuith/code/chrome/.cros_cache'
11:57:16: DEBUG: Using cached credentials /usr/local/google/home/achuith/code/chrome/.cros_cache/cidb_creds
11:57:16: ERROR: cros uprevchrome failed before completing.
cros: Unhandled exception:
Traceback (most recent call last):
  File "/usr/local/google/home/achuith/code/chrome/src/third_party/chromite/bin/cros", line 168, in <module>
    DoMain()
  File "/usr/local/google/home/achuith/code/chrome/src/third_party/chromite/bin/cros", line 164, in DoMain
    commandline.ScriptWrapperMain(FindTarget)
  File "/usr/local/google/home/achuith/code/chrome/src/third_party/chromite/lib/commandline.py", line 834, in ScriptWrapperMain
    ret = target(argv[1:])
  File "/usr/local/google/home/achuith/code/chrome/src/third_party/chromite/scripts/cros.py", line 65, in main
    code = _RunSubCommand(subcommand)
  File "/usr/local/google/home/achuith/code/chrome/src/third_party/chromite/scripts/cros.py", line 50, in _RunSubCommand
    return subcommand.Run()
  File "/usr/local/google/home/achuith/code/chrome/src/third_party/chromite/cli/cros/cros_uprevchrome.py", line 354, in Run
    db = cidb.CIDBConnection(cidb_creds)
  File "/usr/local/google/home/achuith/code/chrome/src/third_party/chromite/lib/cidb.py", line 621, in __init__
    db_credentials_dir, *args, **kwargs)
  File "/usr/local/google/home/achuith/code/chrome/src/third_party/chromite/lib/cidb.py", line 246, in __init__
    listeners=[self._listener_class()])
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/__init__.py", line 332, in create_engine
    return strategy.create(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 64, in create
    dbapi = dialect_cls.dbapi(**dbapi_args)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/connectors/mysqldb.py", line 57, in dbapi
    return __import__('MySQLdb')
ImportError: No module named MySQLdb

 
I need to uprev chrome soonish, so please let me know how to proceed.

Comment 2 by nxia@chromium.org, Apr 4 2017

where did you run the command? inside or outside the chroot?
I tried outside chroot, and inside the simple chrome environment
The doc makes no mention of where the command should be run, and the script does not complain that it is in the wrong environment.
I don't run into this ImportError in the chroot, so I'm going to proceed with the uprev in the chroot.

If the tool cannot be reliably run outside the chroot, we should probably not that in the google doc and the help documentation.
I have a new error now:
(cr) (bash_completion) achuith@achuithz620 ~/trunk/src/scripts $ cros uprevchrome --pfq-build 1429498 --bug='chromium:706939' --debug --nowipe
13:49:56: DEBUG: Cache dir lookup.
13:49:56: DEBUG: Configured cache_dir to '/mnt/host/source/.cache'
13:49:56: DEBUG: Using cached credentials /mnt/host/source/.cache/cidb_creds
13:49:56: INFO: Running cidb query on pid 3334, repr(query) starts with 'SHOW DATABASES'
13:49:57: INFO: Created cidb engine readonly@173.194.81.53 for pid 3334
13:49:57: INFO: Running cidb query on pid 3334, repr(query) starts with 'SHOW TABLES'
13:49:58: INFO: Running cidb query on pid 3334, repr(query) starts with 'SELECT MAX(schemaVersion) from schemaVersionTable'
13:49:59: INFO: Created a SchemaVersionedMySQLConnection, sqlalchemy version 0.9.2
13:50:00: INFO: Running cidb query on pid 3334, repr(query) starts with <sqlalchemy.sql.selectable.Select at 0x7f469570d610; Select object>
13:50:00: INFO: Running cidb query on pid 3334, repr(query) starts with 'SELECT id, build_config, start_time, finish_time, status, waterfall, build_number, builder_name, pl
Setting up working directory...
13:50:00: INFO: RunCommand: git clone https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay /tmp/uprevchrome_WoAOlR/pub_overlay --reference /mnt/host/source/src/third_party/chromiumos-overlay --branch master --single-branch in /tmp/uprevchrome_WoAOlR/pub_overlay
13:52:09: INFO: RunCommand: git clone https://chrome-internal.googlesource.com/chromeos/overlays/chromeos-partner-overlay /tmp/uprevchrome_WoAOlR/priv_overlay --reference /mnt/host/source/src/private-overlays/chromeos-partner-overlay --branch master --single-branch in /tmp/uprevchrome_WoAOlR/priv_overlay
Preparing CLs...
13:52:33: INFO: Checking remote refs.
13:52:34: INFO: Leaving working directory at /tmp/uprevchrome_WoAOlR
13:52:34: ERROR: cros uprevchrome failed before completing.
cros: Unhandled exception:
Traceback (most recent call last):
  File "/mnt/host/source/chromite/bin/cros", line 168, in <module>
    DoMain()
  File "/mnt/host/source/chromite/bin/cros", line 164, in DoMain
    commandline.ScriptWrapperMain(FindTarget)
  File "/mnt/host/source/chromite/lib/commandline.py", line 834, in ScriptWrapperMain
    ret = target(argv[1:])
  File "/mnt/host/source/chromite/scripts/cros.py", line 65, in main
    code = _RunSubCommand(subcommand)
  File "/mnt/host/source/chromite/scripts/cros.py", line 50, in _RunSubCommand
    return subcommand.Run()
  File "/mnt/host/source/chromite/cli/cros/cros_uprevchrome.py", line 364, in Run
    self.UprevChrome(work_dir, self.options.pfq_build, build_number)
  File "/mnt/host/source/chromite/cli/cros/cros_uprevchrome.py", line 269, in UprevChrome
    self.CheckRemoteBranch(pub_overlay, remote, remote_ref)
  File "/mnt/host/source/chromite/cli/cros/cros_uprevchrome.py", line 169, in CheckRemoteBranch
    % (git_repo, remote, remote_ref))
chromite.cli.cros.cros_uprevchrome.MissingBranchException: repo /tmp/uprevchrome_WoAOlR/pub_overlay remote origin ref refs/pfq/staging_pfq_branch_1429498 doesn't exist


The PFQ build that I'm targeting is this one:
https://uberchromegw.corp.google.com/i/chromeos/builders/master-chromium-pfq/builds/4185

The build id appears to be 1429498

Comment 7 by nxia@chromium.org, Apr 4 2017

this is blocked by  crbug.com/708288 . The revert CL:467989 will fix that.

Comment 8 by nxia@chromium.org, Apr 5 2017

Status: Fixed (was: Assigned)
fixed  crbug.com/708288 
Status: Verified (was: Fixed)
Yup, uprev tool works!

Sign in to add a comment