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

Issue 2245113002: Track step nesting in StreamEngine. (Closed)

Created:
4 years, 4 months ago by dnj
Modified:
4 years, 3 months ago
Reviewers:
martiniss
CC:
chromium-reviews, infra-reviews+recipes-py_chromium.org
Base URL:
https://github.com/luci/recipes-py@emit-initial-properties
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Track step nesting in StreamEngine. 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/4b3ff6014bcb018aff9ae2755faf47cc304f47af

Patch Set 1 #

Total comments: 14

Patch Set 2 : Cleanup, updates. #

Patch Set 3 : Track step nesting in StreamEngine. #

Patch Set 4 : Iterate #

Total comments: 4

Patch Set 5 : Rebase, comments. #

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

Dependent Patchsets:

Messages

Total messages: 25 (10 generated)
dnj
PTAL!
4 years, 4 months ago (2016-08-15 16:45:25 UTC) #2
dnj
https://codereview.chromium.org/2245113002/diff/1/recipe_engine/simulation_test.py File recipe_engine/simulation_test.py (right): https://codereview.chromium.org/2245113002/diff/1/recipe_engine/simulation_test.py#newcode24 recipe_engine/simulation_test.py:24: class SimulationAnnotatorStreamEngine(stream.AnnotatorStreamEngine): Now that the annotator stream engine tracks ...
4 years, 4 months ago (2016-08-15 17:33:53 UTC) #3
martiniss
Looks pretty good; is it ready for final review? I'm not sure what code I ...
4 years, 4 months ago (2016-08-24 01:09:58 UTC) #4
dnj
Oh sorry yes, this is ready for review.
4 years, 4 months ago (2016-08-24 02:43:30 UTC) #5
martiniss
lgtm https://codereview.chromium.org/2245113002/diff/60001/recipe_engine/stream.py File recipe_engine/stream.py (right): https://codereview.chromium.org/2245113002/diff/60001/recipe_engine/stream.py#newcode410 recipe_engine/stream.py:410: # Increase our current nest level and emit ...
4 years, 3 months ago (2016-09-01 21:03:39 UTC) #6
dnj
https://codereview.chromium.org/2245113002/diff/60001/recipe_engine/stream.py File recipe_engine/stream.py (right): https://codereview.chromium.org/2245113002/diff/60001/recipe_engine/stream.py#newcode410 recipe_engine/stream.py:410: # Increase our current nest level and emit a ...
4 years, 3 months ago (2016-09-07 16:28:51 UTC) #7
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/2245113002/80001
4 years, 3 months ago (2016-09-07 20:07:58 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: Recipe Roll Downstream Tester on luci.infra.try (JOB_FAILED, https://luci-milo.appspot.com/swarming/task/311f15daa7d72a10)
4 years, 3 months ago (2016-09-07 20:33:48 UTC) #12
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/2245113002/80001
4 years, 3 months ago (2016-09-07 22:46:02 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: Recipe Roll Downstream Tester on luci.infra.try (JOB_FAILED, https://luci-milo.appspot.com/swarming/task/311fa60813bb4910)
4 years, 3 months ago (2016-09-07 22:58:52 UTC) #16
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/2245113002/80001
4 years, 3 months ago (2016-09-07 23:39:36 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: Recipes-py Presubmit on luci.infra.try (JOB_FAILED, https://luci-milo.appspot.com/swarming/task/311fd895901d8110)
4 years, 3 months ago (2016-09-07 23:42:46 UTC) #20
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/2245113002/80001
4 years, 3 months ago (2016-09-08 17:33:44 UTC) #22
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://github.com/luci/recipes-py/commit/4b3ff6014bcb018aff9ae2755faf47cc304f47af
4 years, 3 months ago (2016-09-08 17:41:25 UTC) #24
dnj
4 years, 3 months ago (2016-09-08 19:11:52 UTC) #25
Message was sent while issue was closed.
A revert of this CL (patchset #5 id:80001) has been created in
https://codereview.chromium.org/2320223002/ by dnj@chromium.org.

The reason for reverting is: Broke a build:
https://uberchromegw.corp.google.com/i/internal.infra.cron/builders/recipe-au....

Powered by Google App Engine
This is Rietveld 408576698