New issue
Advanced search Search tips

Issue 691084 link

Starred by 2 users

Issue metadata

Status: Archived
Owner: ----
Closed: Dec 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug
OKR

Blocking:
issue 687781



Sign in to add a comment

Clean up the Autotest database schema

Reported by jrbarnette@chromium.org, Feb 10 2017

Issue description

As a result of dead code elimination, parts of Autotest
database schema have become dead data.  Some tables have
become unsused.  Some columns within certain tables are
now unused.

We should make a pass through the schema, and do a one
time cleanup update/migration.

The following tables are unused:
    afe_atomic_groups
    afe_kernels
    afe_parameterized_job_parameters
    afe_parameterized_job_profiler_parameters
    afe_parameterized_jobs
    afe_parameterized_jobs_kernels
    afe_parameterized_jobs_profilers
    afe_test_parameters

The following columns are unused:
    afe_host_queue_entries.atomic_group_id
    afe_hosts.synch_id
    afe_jobs.drone_set_id
    afe_jobs.parameterized_job_id
    afe_autotests.experimental
    afe_labels.kernel_config
    afe_labels.atomic_group_id

The lists above are not comprehensive.  There are bugs
filed that request deleting code that will make other
tables/columns dead, and there may be still unidentified
dead tables and columns.

 
Also this table is unused:
    afe_recurring_run

Comment 2 by aut...@google.com, Feb 15 2017

Labels: OKR
Sounds like an OKR level of work, adding to that list
Adding another task to this list: 
https://chromium-review.googlesource.com/c/450837/

Dropping synch_id column requires a push-to-prod with some downtime.
Blocking: 687781
Re comment #3:  afe_hosts.synch_id is listed as an unused column
in the original description; it's not new.

Project Member

Comment 6 by bugdroid1@chromium.org, Mar 6 2017

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

commit 2d3884ade80ee5a8e2316ddc0996e7a1a12d58da
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Mon Mar 06 23:57:01 2017

Revert "[autotest] Remove synch_id from database"

This reverts commit c744f5fa4992f996768a4857c28fcc8045ea9df1.

Reason for revert: We don't want lab downtime today. We decided
to batch up some outstanding DB changes and do it in one fell
swoop. I'm just the executor...

Original change's description:
> [autotest] Remove synch_id from database
>
> BUG= chromium:687781 
> TEST=Run migrate.py sync back and forth
>
> Change-Id: Ieed2052c9aa6958cf3fb6081ee310499c233d112
> Reviewed-on: https://chromium-review.googlesource.com/449972
> Reviewed-by: Allen Li <ayatane@chromium.org>
> Commit-Queue: Allen Li <ayatane@chromium.org>
> Tested-by: Allen Li <ayatane@chromium.org>
>

TBR=pprabhu@chromium.org,xixuan@chromium.org,ayatane@chromium.org
BUG= chromium:687781 
BUG= chromium:691084 

Change-Id: Ia822a826f8f63dbe32c435adf9e4aea2045a6c3f
Reviewed-on: https://chromium-review.googlesource.com/450837
Reviewed-by: Ningning Xia <nxia@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Commit-Queue: Ningning Xia <nxia@chromium.org>
Tested-by: Ningning Xia <nxia@chromium.org>

[modify] https://crrev.com/2d3884ade80ee5a8e2316ddc0996e7a1a12d58da/frontend/afe/rdb_model_extensions.py
[modify] https://crrev.com/2d3884ade80ee5a8e2316ddc0996e7a1a12d58da/frontend/afe/models_test.py
[modify] https://crrev.com/2d3884ade80ee5a8e2316ddc0996e7a1a12d58da/scheduler/scheduler_models.py
[modify] https://crrev.com/2d3884ade80ee5a8e2316ddc0996e7a1a12d58da/frontend/afe/doctests/001_rpc_test.txt
[add] https://crrev.com/2d3884ade80ee5a8e2316ddc0996e7a1a12d58da/frontend/migrations/113_add_back_sync_id_temporarily.py

Status: Archived (was: Available)
We've broken things by accident with these cleanups. Furthermore, we're migrating away from the afe entirely in the skylab roadmap. This work is not worth investing in.

Sign in to add a comment