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

Issue 646217 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

server-side tests failing on metrics import

Project Member Reported by lgoo...@chromium.org, Sep 13 2016

Issue description

The jetstream team runs server-side tests in the talyn lab.

Starting with build R55-8795.0.0, we are seeing all server-side tests fail on "from chromite.lib import metrics":

09/12 13:40:13.092 ERROR|         traceback:0013| stderr:
09/12 13:40:13.092 ERROR|         traceback:0013| Traceback (most recent call last):
09/12 13:40:13.092 ERROR|         traceback:0013|   File "/usr/local/autotest/server/autoserv", line 63, in <module>
09/12 13:40:13.092 ERROR|         traceback:0013|     from autotest_lib.server import server_job, utils, autoserv_parser, autotest
09/12 13:40:13.092 ERROR|         traceback:0013|   File "/usr/local/autotest/server/server_job.py", line 20, in <module>
09/12 13:40:13.093 ERROR|         traceback:0013|     from autotest_lib.server import test, subcommand, profilers
09/12 13:40:13.093 ERROR|         traceback:0013|   File "/usr/local/autotest/server/profilers.py", line 5, in <module>
09/12 13:40:13.093 ERROR|         traceback:0013|     from autotest_lib.server import profiler, autotest, standalone_profiler, hosts
09/12 13:40:13.093 ERROR|         traceback:0013|   File "/usr/local/autotest/server/hosts/__init__.py", line 16, in <module>
09/12 13:40:13.093 ERROR|         traceback:0013|     from adb_host import ADBHost
09/12 13:40:13.094 ERROR|         traceback:0013|   File "/usr/local/autotest/server/hosts/adb_host.py", line 33, in <module>
09/12 13:40:13.094 ERROR|         traceback:0013|     from autotest_lib.server.hosts import teststation_host
09/12 13:40:13.094 ERROR|         traceback:0013|   File "/usr/local/autotest/server/hosts/teststation_host.py", line 16, in <module>
09/12 13:40:13.094 ERROR|         traceback:0013|     from autotest_lib.server.hosts import moblab_host
09/12 13:40:13.094 ERROR|         traceback:0013|   File "/usr/local/autotest/server/hosts/moblab_host.py", line 14, in <module>
09/12 13:40:13.095 ERROR|         traceback:0013|     from autotest_lib.server.hosts import cros_host
09/12 13:40:13.095 ERROR|         traceback:0013|   File "/usr/local/autotest/server/hosts/cros_host.py", line 45, in <module>
09/12 13:40:13.095 ERROR|         traceback:0013|     from chromite.lib import metrics
09/12 13:40:13.095 ERROR|         traceback:0013| ImportError: cannot import name metrics

Likely triggered by https://chromium-review.googlesource.com/#/c/363741/

 

Comment 1 by sbasi@chromium.org, Sep 13 2016

Cc: akes...@chromium.org dshi@chromium.org pho...@chromium.org
Paul/Aviv is this related to your guys work? Dan had to update chromite on the test servers to get past this eariler.

I'm guessing something broke but not sure why the CQ didn't block it.

Lgoodby what is your MobLab IP so we can poke around?

Comment 2 by sbasi@chromium.org, Sep 13 2016

Yeah the builders are all green so somehow the automated catching isn't seeing this.

Comment 3 by sbasi@chromium.org, Sep 13 2016

Owner: sbasi@chromium.org
Problem is this is older moblab image testing new dut images. We need to try/except that import. I'll look at this in the morning.

Comment 4 by sbasi@chromium.org, Sep 13 2016

Dan thoughts on having the SSP image include chromite?

Comment 5 by dshi@chromium.org, Sep 13 2016

It's possible, we can upgrade base image to include chromite. However, that means every time moblab include some new chromite with desired function, we will have to update base container.

I think it's better for chromite related code to maintain backwards compatibility. Especially in this case, metrics doesn't work for moblab anyway.

Comment 6 by sbasi@chromium.org, Sep 13 2016

"I think it's better for chromite related code to maintain backwards compatibility."
The problem with this answer is how do we enforce it? We would need a common import strategy for chromite code that does not fail when modules are imported.

Maybe code that uses metrics should do so though an Autotest library that imports metrics?

Comment 7 by pho...@chromium.org, Sep 13 2016

I'd just like to point out that this is another problem that would go away with a proper build system & virtualenv instead of relying on dependencies already being on the system.

Comment 8 by autumn@chromium.org, Sep 13 2016

Labels: -current-issue

Comment 9 by tbroch@chromium.org, Sep 14 2016

I'm seeing similar/same issue running 'atest host list'
Re c#9:  Try running 'update_lab_tools'.
that worked after I blew away src/aosp/toolchain/gcc which made git? angry for some reason.  Thanks!
Project Member

Comment 12 by bugdroid1@chromium.org, Sep 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/382506be44b6f3d7f3943ca299a371a94f0d4b3c

commit 382506be44b6f3d7f3943ca299a371a94f0d4b3c
Author: Simran Basi <sbasi@google.com>
Date: Tue Sep 13 21:58:15 2016

cros_host: Fix metrics import for moblab.

BUG= chromium:646217 
TEST=None

Change-Id: Ieb05d058dbbddab7282cf0aec382504f5cc2aa2a
Reviewed-on: https://chromium-review.googlesource.com/385109
Commit-Ready: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>

[modify] https://crrev.com/382506be44b6f3d7f3943ca299a371a94f0d4b3c/server/hosts/cros_host.py

Also, hold on - this isn't a problem with *backwards* compatibility, it's a problem with *forwards* compatibility.  We added a module, and autotest code that expects that module to be there should be able to work (it doesn't).  The only sane way to maintain forwards compatibility is to add a wrapper in autotest that gracefully degrades when the features we added aren't there.

Comment 14 by sbasi@chromium.org, Sep 16 2016

Yup its a forward compatibility problem. I don't understand your proposal though.

Comment 15 by sbasi@chromium.org, Jul 18 2017

Status: WontFix (was: Untriaged)

Sign in to add a comment