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

Issue 739394 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Findit should not depend on steps.py directly

Project Member Reported by kdillon@chromium.org, Jul 5 2017

Issue description

Adding a call to gsutil in steps.py caused a ModuleInjectionError in Findit.

Adding depot_tools/gsutil as a dependency to scripts/slave/recipes/findit/chromium/test.py passes the tests on training (https://chromium-review.googlesource.com/c/558098)

Here is the stack trace we've seen: 

findit/chromium/test.findit_steps_multiple_culprits failed:
Traceback (most recent call last):
  File "/usr/local/google/home/kdillon/infra_internal/build/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/test.py", line 582, in wrapper
    return (True, test, f(test, *args, **kwargs))
  File "/usr/local/google/home/kdillon/infra_internal/build/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/test.py", line 591, in run_worker
    return run_test(test, debug=debug, train=train)
  File "/usr/local/google/home/kdillon/infra_internal/build/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/test.py", line 238, in run_test
    enable_coverage=(not debug))
  File "/usr/local/google/home/kdillon/infra_internal/build/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/test.py", line 314, in run_recipe
    result = engine.run(recipe_script, api, test_data.properties)
  File "/usr/local/google/home/kdillon/infra_internal/build/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/run.py", line 318, in run
    return self._old_run(recipe_script, api, properties)
  File "/usr/local/google/home/kdillon/infra_internal/build/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/run.py", line 374, in _old_run
    recipe_result = recipe_script.run(api, properties)
  File "/usr/local/google/home/kdillon/infra_internal/build/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/loader.py", line 98, in run
    self.run_steps, properties, self.PROPERTIES, api=api)
  File "/usr/local/google/home/kdillon/infra_internal/build/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/loader.py", line 628, in invoke_with_properties
    **additional_args)
  File "/usr/local/google/home/kdillon/infra_internal/build/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/loader.py", line 589, in _invoke_with_properties
    return callable_obj(*props, **additional_args)
  File "/usr/local/google/home/kdillon/infra_internal/build/scripts/slave/recipes/findit/chromium/test.py", line 219, in RunSteps
    revision, tests_to_run, use_analyze, test_repeat_count))
  File "/usr/local/google/home/kdillon/infra_internal/build/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/recipe_api.py", line 631, in _inner
    return func(*a, **kw)
  File "/usr/local/google/home/kdillon/infra_internal/build/scripts/slave/recipe_modules/findit/api.py", line 238, in compile_and_test_at_revision
    api, actual_tests_to_run, suffix=abbreviated_revision)
  File "/usr/local/google/home/kdillon/infra_internal/build/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/recipe_api.py", line 631, in _inner
    return func(*a, **kw)
  File "/usr/local/google/home/kdillon/infra_internal/build/scripts/slave/recipe_modules/test_utils/api.py", line 107, in run_tests
    t.post_run(caller_api, suffix)
  File "/usr/local/google/home/kdillon/infra_internal/build/scripts/slave/recipe_modules/chromium_tests/steps.py", line 1818, in post_run
    return self._test.post_run(api, suffix)
  File "/usr/local/google/home/kdillon/infra_internal/build/scripts/slave/recipe_modules/chromium_tests/steps.py", line 1374, in post_run
    api.gsutil.upload(
  File "/usr/local/google/home/kdillon/infra_internal/build/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/util.py", line 32, in __getattr__
    "RecipeApi has no dependency %r. (Add it to DEPS?)" % (key,))
ModuleInjectionError: RecipeApi has no dependency 'gsutil'. (Add it to DEPS?)

----------------------------------------------------------------------
Ran 1810 tests in 21.379s

FAILED

NOTE: You may need to re-train the expectation files by running:

  ./scripts/slave/.recipe_deps/recipe_engine/recipes.py --package /usr/local/google/home/kdillon/infra_internal/build/infra/config/recipes.cfg test train

This will update all the .json files to have content which matches
the current recipe logic. Review them for correctness and include
them with your CL.

 
Summary: Findit should not depend on steps.py directly (was: Findit depends on steps.py directly )
It should depend on chromium_tests module instead, so that we have to specify dependencies for steps.py in chromium_tests module only 
Components: -Infra>Platform>Recipes Infra>Client>Chrome
Components: Tools>Test>FindIt

Comment 5 by st...@chromium.org, Jul 29 2017

kdillon, phajdan.jr: Is this still a valid bug for Findit? Any further suggestion?
Cc: phajdan@google.com
I think so.

Why should Katie's CL https://chromium-review.googlesource.com/c/558098 need to add gsutil to findit deps?

Comment 7 by hzl@chromium.org, Dec 19 2017

Owner: chanli@chromium.org
Status: Assigned (was: Untriaged)
@chanli, would you please take a look at this bug. Please reassign to someone in findit team if necessary or mark as wontfix.

Sign in to add a comment