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

Issue 899136 link

Starred by 1 user

Issue metadata

Status: Unconfirmed
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

factory: Store the active test list in other place.

Project Member Reported by yhong@google.com, Oct 26

Issue description

While developing, developers might create py/test/test_lists/ACTIVE for testing.  However, it's easy to forgot to remove that file before building a factory toolkit for factory and cause the toolkit unable to switch to the correct test list.  This scenario will even become more often to happen if goofy in docker becomes more mature.
 
Cc: hungte@chromium.org pihsun@chromium.org
Cc: stimim@chromium.org
Cc: chromeos-factory-eng@google.com
Labels: Hotlist-GoodFirstBug
I think we did plan (or have we already created a bug?) to store configs using JSON way - in /var/factory/config/state.json or goofy.json
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 13

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/89938e609942337588313e3ca44bad32a7a599b6

commit 89938e609942337588313e3ca44bad32a7a599b6
Author: Yong Hong <yhong@chromium.org>
Date: Tue Nov 13 11:32:48 2018

test_list: Manage the active test list ID by config_utils.

This CL makes the test list manager reads the active test list ID
by `cros.factory.utils.config_utils` module and saves the ID just
as other configurations to take advantages of that utility.

When developing, developers might want create a dummy testlist and
specify the default test list to that file.  In such usecase, we
can just have the config file in /var/factory/config to override
the real one.

BUG=chromium:899136
TEST=manually test

Change-Id: I59813cb03670f2623ec997c34379ae9da5c6aa92
Reviewed-on: https://chromium-review.googlesource.com/1301015
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/89938e609942337588313e3ca44bad32a7a599b6/doc/test_list_api.rst
[modify] https://crrev.com/89938e609942337588313e3ca44bad32a7a599b6/py/utils/config_utils.py
[modify] https://crrev.com/89938e609942337588313e3ca44bad32a7a599b6/py/test/test_lists/manager.py
[modify] https://crrev.com/89938e609942337588313e3ca44bad32a7a599b6/py/test/test_lists/README.md
[modify] https://crrev.com/89938e609942337588313e3ca44bad32a7a599b6/py/toolkit/installer.py
[add] https://crrev.com/89938e609942337588313e3ca44bad32a7a599b6/py/test/test_lists/active_test_list.schema.json

Project Member

Comment 5 by bugdroid1@chromium.org, Nov 13

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/08c5234ae77608f99915c3727514cef33f98159f

commit 08c5234ae77608f99915c3727514cef33f98159f
Author: Yong Hong <yhong@chromium.org>
Date: Tue Nov 13 11:32:49 2018

goofy: Remove --test_list argument.

This argument is not used for a while.  Let's just remove it.

BUG=chromium:899136
TEST=make test; manually test

Change-Id: Icb7842eb8ea0a50092210c1df6712179c3807d8e
Reviewed-on: https://chromium-review.googlesource.com/1326161
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/08c5234ae77608f99915c3727514cef33f98159f/py/goofy/invocation.py
[modify] https://crrev.com/08c5234ae77608f99915c3727514cef33f98159f/py/goofy/goofy.py
[modify] https://crrev.com/08c5234ae77608f99915c3727514cef33f98159f/py/goofy/goofy_unittest.py

Project Member

Comment 6 by bugdroid1@chromium.org, Nov 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/5ec7a7aa0200e9bc11531f676ae12ab761f9a414

commit 5ec7a7aa0200e9bc11531f676ae12ab761f9a414
Author: Yong Hong <yhong@chromium.org>
Date: Wed Nov 28 03:13:53 2018

test_lists: Allows manager to load the runtime test lists.

`cros.factory.test.test_lists.manager` searched the existing test list
files by itself in /usr/local/factory/py/test/test_lists.  Therefore,
it couldn't find the test lists in runtime configuration directory.
Also, the error handling between the `config_utils` module and the
caller was not designed carefully so some of the error message
might be misleading.

This CL moves more logic to `config_utils` from the test list manager
so that we can take the benefits of the powerful `config_utils` module,
which includes searching the config files in both build time and run
time directories.

BUG=chromium:899136
TEST=manually test; make test

Change-Id: Ibd27f750f749d9fbca4b7af2f88a53d1dc4239f5
Reviewed-on: https://chromium-review.googlesource.com/1326163
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/5ec7a7aa0200e9bc11531f676ae12ab761f9a414/py/goofy/goofy.py
[modify] https://crrev.com/5ec7a7aa0200e9bc11531f676ae12ab761f9a414/py/test/test_lists/manager_unittest.py
[modify] https://crrev.com/5ec7a7aa0200e9bc11531f676ae12ab761f9a414/py/utils/config_utils.py
[modify] https://crrev.com/5ec7a7aa0200e9bc11531f676ae12ab761f9a414/py/test/test_lists/test_list.py
[modify] https://crrev.com/5ec7a7aa0200e9bc11531f676ae12ab761f9a414/py/test/test_lists/manager.py

Project Member

Comment 7 by bugdroid1@chromium.org, Nov 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/5ae263666798cf3615b9b752e509b48477bd20e9

commit 5ae263666798cf3615b9b752e509b48477bd20e9
Author: Yong Hong <yhong@chromium.org>
Date: Wed Nov 28 03:13:53 2018

test_list: Preserve active test list when updating the toolkit.

Since chromium:756275 has not been solved, the updater has to
manually preserve the active test list.

BUG=chromium:899136
TEST=manually test on DUT

Change-Id: Idcf642d9697e9f4bab9d0ceb286840bbd4db6286
Reviewed-on: https://chromium-review.googlesource.com/1337238
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/5ae263666798cf3615b9b752e509b48477bd20e9/py/test/test_lists/manager.py
[modify] https://crrev.com/5ae263666798cf3615b9b752e509b48477bd20e9/py/tools/factory.py
[modify] https://crrev.com/5ae263666798cf3615b9b752e509b48477bd20e9/py/goofy/updater.py

Sign in to add a comment