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

Issue 628318 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

Script to remove unused labels in cautotest front end

Project Member Reported by autumn@chromium.org, Jul 14 2016

Issue description

Seems like we don't have a way to hide labels that aren't used, would be nice to purge these with some frequency to make the cautotest front end easier to use. 

Maybe if not used in 30 days hide from front end view? 

I found this while looking for FAFT labels. Right now we have seven faft labels, but only four are being used. 

faft_flashrom
pool:faft-test
pool:faft-test-au
pool:faft-test-experiment
pool:faft-test-experimental (not being used) 
pool:labfaft (not being used) 
pool: tempfaft (not being used)


 

Comment 1 by aut...@google.com, Jul 19 2016

Whoops, skipped link
http://cautotest.corp.google.com/afe/#tab_id=hosts

Comment 2 by aut...@google.com, Jul 19 2016

Labels: -current-issue Hotlist-Fixit starter
Summary: Script to remove unused labels in cautotest front end (was: Purge unused labels in cautotest front end)
Cc: dshi@chromium.org
Is this what label_cleaner does?

Comment 4 by dshi@chromium.org, Jun 14 2017

from the script's code, it should serve this purpose.

Comment 5 by xixuan@chromium.org, Jun 22 2017

Owner: xixuan@chromium.org
Status: Started (was: Untriaged)

Comment 6 by xixuan@chromium.org, Jun 23 2017

Solutions:

1. cautotest doesn't run this script due to error: ”ImportError: No module named MySQLdb“. Will install this package on cautotest if no objections.

2. The script only filter labels whose prefix is cros-version/fwrw-version/fwro-version, not include pool or other label prefix. Will add the prefix.
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 26 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/chromeos-admin/+/1860c94853ab25a7f80ba7bda3ab5e83c5b7bbab

commit 1860c94853ab25a7f80ba7bda3ab5e83c5b7bbab
Author: xixuan <xixuan@chromium.org>
Date: Mon Jun 26 22:28:36 2017

Cc: akes...@chromium.org pprabhu@chromium.org
from label_cleaner.log, shard executes the script, but cautotest raises error:

Traceback (most recent call last):
  File "/usr/local/autotest/site_utils/label_cleaner.py", line 26, in <module>
    import MySQLdb
ImportError: No module named MySQLdb
Is it safe for me to install MySQLdb? any ideas why it's installed in shards but not cautotest?

Comment 10 by dshi@chromium.org, Aug 14 2017

Re #9

Where do you want to install mysql? cautotest uses a remote mysql server (cautotest-mysql), however, shards use mysql running locally.
Status: Verified (was: Started)
cautotest.

But never mind, https://chromium-review.googlesource.com/c/604723 already fixes this. MySQLdb is installed in site-packages.

Checked with cautotest, the script starts running.

Sign in to add a comment