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

Issue 603774 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Can not create job based on tests only present in a testing build image

Project Member Reported by ntang@google.com, Apr 15 2016

Issue description

i put "xxxx-release/Rxx-xxx" in the image url field, and click "Fetch Tests from Build" (I am able to do this after a localfix on  issue 603302 ). Now I can see the test suites (present in the testing image, but not in the guado-moblab build) in the drop down. However, when I select the test suite, and submit to create the job, it complains:
No such file or directory: '/usr/local/autotest/test_suites/control.<suite-name>'

I have checked "Require server-side packaging".
 

Comment 1 by dshi@chromium.org, Apr 15 2016

Labels: Infra-ChromeOS

Comment 2 by ntang@google.com, Apr 18 2016

Cc: kevcheng@chromium.org
hey Michael,

which suite are you trying to start?
and can you point me to your moblab so I Can dig around?

Comment 5 by dshi@chromium.org, Apr 18 2016

The issue is that AFE tries to load the suite control file which does not exist in local autotest, as the control file list is loaded from a build, which contains private suite.

We might have to pass the control file content along with the names, not sure if that will make the page content too big too load (or that's something we can cache on the server side?)

Comment 6 by ntang@google.com, Apr 18 2016

@kevcheng, ping-ed you the information you need.

@dshi, I remember somebody mentioned private tests already work with moblab? Or it only works if it is simple client tests? Since for server side tests, the control file is run on the moblab device (inside a drone container), so the moblab device need to have access to control files?

Comment 7 by dshi@chromium.org, Apr 18 2016

yes, private tests can certainly work in moblab.

This issue is just limited to AFE UI.

Comment 8 by autumn@chromium.org, Apr 18 2016

Cc: akes...@chromium.org
+ Aviv to add more details on the work around
Owner: sbasi@chromium.org
Status: Started (was: Untriaged)
To sbasi@ who I believe is in the middle if implementing a way to launch meta-suites from the web afe.

That new interface should be a good workaround for this issue too. You will be able to launch a suite with the attribute string "suite:foo" where foo is the name of your private suite. That method will create a suite purely based on which test control files match that suite, without need a suite control file.

Comment 10 by ntang@google.com, Apr 19 2016

Any workaround and detailed instructions to run the private test suites manually on the moblab devices? 

Comment 11 by dshi@chromium.org, Apr 19 2016

run_suite command line should just work. You can specify the build/board/pool/suite name in the command line.
Here's an example command:

/usr/local/autotest/site_utils/run_suite.py --run_prod_code --pool=bvt --timeout_mins=90 --suite_name=brillo-bvt --build=git_mnc-brillo-dev/dragonboard-eng/LATEST --board=brillo-dragonboard -c

The '-c' at the end tells the command to return after it has started so you can just track it through afe with the jobid.

Comment 13 by ntang@google.com, Apr 20 2016

Thanks all the info. The command line works.

Comment 14 by ntang@google.com, Apr 26 2016

The job is scheduled but all tests still failed with "... test does not exist". Is it possible to specify "require ssp" on the command line?
Components: Infra>Client>ChromeOS
Labels: -Infra-ChromeOS

Comment 16 by ntang@google.com, May 20 2016

@sbasis did a run with "run_suite" command line last night, and most test job is created and the most tests seem to pass now. So we just need to support job creation  via the AFE now.

Comment 17 by sbasi@chromium.org, May 20 2016

kk so heres the problem with the UI:

IOError: [Errno 2] No such file or directory: '/usr/local/autotest/test_suites/control.arc-cts'
Traceback (most recent call last):
  File "/usr/local/autotest/frontend/afe/json_rpc/serviceHandler.py", line 114, in dispatchRequest
    results['result'] = self.invokeServiceEndpoint(meth, args)
  File "/usr/local/autotest/frontend/afe/json_rpc/serviceHandler.py", line 154, in invokeServiceEndpoint
    return meth(*args)
  File "/usr/local/autotest/frontend/afe/rpc_handler.py", line 125, in new_fn
    return f(*args, **keyword_args)
  File "/usr/local/autotest/frontend/afe/rpc_interface.py", line 801, in generate_control_file
    upload_kernel_config=upload_kernel_config)
  File "/usr/local/autotest/frontend/afe/control_file.py", line 394, in generate_control
    client_control_file)
  File "/usr/local/autotest/frontend/afe/control_file.py", line 236, in get_tests_stanza
    raw_control_files = [read_control_file(test) for test in tests]
  File "/usr/local/autotest/frontend/afe/control_file.py", line 157, in read_control_file
    control_file = open(os.path.join(AUTOTEST_DIR, test.path))
IOError: [Errno 2] No such file or directory: '/usr/local/autotest/test_suites/control.arc-cts'

Its searching for the control file contents from the local storage.

Here's what we should make it do:
* Update generate_control_file in rpc_interface.py to accept an optional build argument and have the UI pass it from the selected element in "Test source build"
* Refactor site_rpc_interface.py:get_tests_by_build to allow you to specify a control file name and get its contents.
* Have generate_control_file use the refactored code to get the contents and return that.

Michael does that info help unblock you or do you need me to jump in more?

Comment 18 by ntang@google.com, May 20 2016

I can follow up on this and try to come up with a fix.

Comment 19 by ntang@google.com, Jun 1 2016

Owner: ntang@chromium.org
Start to work on the UI fix.
Project Member

Comment 20 by sheriffbot@chromium.org, Jun 3 2016

Labels: Hotlist-Google
Project Member

Comment 21 by bugdroid1@chromium.org, Jun 14 2016

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

commit 84a2ecf3422e6b7f52ffd4628e4a8d47dbe53b4e
Author: Michael Tang <ntang@google.com>
Date: Tue Jun 07 22:10:53 2016

Enabled create test job out of private test build.

We now allow user to have a test source build containing tests not
present in the moblab and its database. The user could fetch those tests
and select them to create jobs.

BUG= chromium:603774 
TEST=manually tests and some unit test.

Change-Id: I4aecb922b006a0743ef4cb223f555fac7343c6c0
Reviewed-on: https://chromium-review.googlesource.com/351480
Commit-Ready: Michael Tang <ntang@chromium.org>
Tested-by: Michael Tang <ntang@chromium.org>
Reviewed-by: Michael Tang <ntang@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>

[modify] https://crrev.com/84a2ecf3422e6b7f52ffd4628e4a8d47dbe53b4e/frontend/afe/rpc_utils.py
[modify] https://crrev.com/84a2ecf3422e6b7f52ffd4628e4a8d47dbe53b4e/frontend/afe/site_rpc_interface.py
[add] https://crrev.com/84a2ecf3422e6b7f52ffd4628e4a8d47dbe53b4e/frontend/afe/rpc_utils_unittest.py
[modify] https://crrev.com/84a2ecf3422e6b7f52ffd4628e4a8d47dbe53b4e/frontend/client/src/autotest/public/AfeClient.html
[modify] https://crrev.com/84a2ecf3422e6b7f52ffd4628e4a8d47dbe53b4e/frontend/client/src/autotest/afe/create/CreateJobViewPresenter.java
[modify] https://crrev.com/84a2ecf3422e6b7f52ffd4628e4a8d47dbe53b4e/frontend/afe/control_file.py
[modify] https://crrev.com/84a2ecf3422e6b7f52ffd4628e4a8d47dbe53b4e/frontend/client/src/autotest/afe/create/CreateJobViewDisplay.java
[modify] https://crrev.com/84a2ecf3422e6b7f52ffd4628e4a8d47dbe53b4e/frontend/afe/rpc_interface.py

Comment 22 by ntang@google.com, Sep 6 2016

Status: Fixed (was: Started)
Labels: VerifyIn-55

Comment 24 by dchan@chromium.org, Oct 10 2016

Labels: -VerifyIn-55

Comment 25 by dchan@google.com, Nov 19 2016

Labels: VerifyIn-56

Comment 26 by dchan@google.com, Jan 21 2017

Labels: VerifyIn-57

Comment 27 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58

Comment 28 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 29 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61

Comment 31 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment