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

Issue 782142 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

Make recipe module's "self" available under "self.m"

Project Member Reported by machenb...@chromium.org, Nov 7 2017

Issue description

We often pass the recipe modules under the recipe API's self.m to helper methods, e.g. chromium_tests makes heavy use of this. But the owning module itself is not under self.m and if it is needed, it's passed in separation, leading to more complicated code.

Could we just add it as well in the engine by default?

More formal:

Recipe module A depends on modules B and C. Within A, we'll have self.m.B and self.m.C. We currently don't have self.m.A, but should have it by default, in order to pass self.m to helper methods.

I'd like to simplify code like:
https://chromium.googlesource.com/chromium/tools/build/+/af07e22d335a6f2/scripts/slave/recipe_modules/chromium_tests/api.py#252
https://chromium.googlesource.com/chromium/tools/build/+/af07e22d335a6f2/scripts/slave/recipe_modules/v8/api.py#796
https://chromium.googlesource.com/chromium/tools/build/+/af07e22d335a6f2/scripts/slave/recipe_modules/v8/api.py#805
 
Owner: iannucci@chromium.org
Status: Assigned (was: Untriaged)
Change ready:
https://chromium-review.googlesource.com/c/infra/luci/recipes-py/+/756678
Status: fi (was: Assigned)
Status: Fixed (was: fi)
.... sigh
Status: Verified (was: Fixed)
Thanks a bunch!
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build/+/7bf768d618f7476fe4dd0e38302a7b0f2b1759b4

commit 7bf768d618f7476fe4dd0e38302a7b0f2b1759b4
Author: Michael Achenbach <machenbach@chromium.org>
Date: Wed Nov 08 10:36:54 2017

V8: Refactoring - simplify how recipe module dependencies are passed

Bug:  782142 
Change-Id: Ia43569534add8c71c2dfa36e17d98a8e0dc33e2e
Reviewed-on: https://chromium-review.googlesource.com/758357
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>

[modify] https://crrev.com/7bf768d618f7476fe4dd0e38302a7b0f2b1759b4/scripts/slave/recipe_modules/v8/api.py
[modify] https://crrev.com/7bf768d618f7476fe4dd0e38302a7b0f2b1759b4/scripts/slave/recipe_modules/v8/testing.py

Sign in to add a comment