Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Issue 2322093002: Track step nesting in StreamEngine (Reland). (Closed)

Created:
4 years, 3 months ago by dnj
Modified:
4 years, 3 months ago
Reviewers:
iannucci, martiniss
CC:
chromium-reviews, infra-reviews+recipes-py_chromium.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Track step nesting in StreamEngine (Reland). Currently, step nesting is tracked by the step runner as an integer, which is passed to the stream engine as the `set_nest_level` post-create event. This poses two problems, namely: - The nest level is known to the runner immediately on step creation, but is presented to the stream engine as a separate piece of information. - This forces the step runner's concept of nesting (integer) onto the stream engine, when all it really cares about is whether or not a step is nested. This patch updates the API to pass the nested state as a boolean: either a step is nested in the previous step, or it isn't. The stream engine is responsible for tracking how it represents this to the stream's consumer. The nested state is also passed at step creation, making nesting an atomic step propety instead of an out-of-band option. Along the way, small cleanups. BUG=chromium:628770 TEST=local - Ran unit tests locally. - `./recipes.py --package ./infra/config/recipes.cfg run example/nested` Committed: https://github.com/luci/recipes-py/commit/227f56ba6353986a7fe6d56fb283ad73c84e94d9

Patch Set 1 #

Patch Set 2 : Fix variable name. #

Patch Set 3 : Might as well go deeper. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+398 lines, -166 lines) Patch
M recipe_engine/run.py View 1 5 chunks +12 lines, -10 lines 0 comments Download
M recipe_engine/simulation_test.py View 4 chunks +29 lines, -2 lines 0 comments Download
M recipe_engine/step_runner.py View 6 chunks +17 lines, -12 lines 0 comments Download
M recipe_engine/stream.py View 9 chunks +117 lines, -122 lines 0 comments Download
M recipe_engine/unittests/run_test.py View 2 chunks +3 lines, -1 line 0 comments Download
M recipe_engine/unittests/stream_test.py View 1 chunk +4 lines, -2 lines 0 comments Download
M recipe_modules/generator_script/api.py View 1 chunk +1 line, -1 line 0 comments Download
M recipe_modules/generator_script/example.py View 1 chunk +14 lines, -0 lines 0 comments Download
A recipe_modules/generator_script/example.expected/nested.json View 1 chunk +127 lines, -0 lines 0 comments Download
M recipe_modules/step/api.py View 2 chunks +19 lines, -8 lines 0 comments Download
M recipe_modules/step/config.py View 1 chunk +1 line, -2 lines 0 comments Download
M recipes.py View 1 chunk +3 lines, -2 lines 0 comments Download
M recipes/example/nested.py View 1 2 2 chunks +16 lines, -2 lines 0 comments Download
M recipes/example/nested.expected/basic.json View 1 2 2 chunks +35 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 7 (3 generated)
dnj
PTAL, reland of https://codereview.chromium.org/2245113002 This fixes the bug and adds a unit test that asserts ...
4 years, 3 months ago (2016-09-08 20:08:19 UTC) #2
iannucci
lgtm
4 years, 3 months ago (2016-09-08 22:24:17 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2322093002/40001
4 years, 3 months ago (2016-09-08 22:25:41 UTC) #5
commit-bot: I haz the power
4 years, 3 months ago (2016-09-08 22:33:38 UTC) #7
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://github.com/luci/recipes-py/commit/227f56ba6353986a7fe6d56fb283ad73c84...

Powered by Google App Engine
This is Rietveld 408576698