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

Issue 2300543002: Minor refactoring in task_runner.py in preparation for adding more code. (Closed)

Created:
4 years, 3 months ago by Vadim Sh.
Modified:
4 years, 3 months ago
Reviewers:
M-A Ruel
CC:
chromium-reviews, infra-reviews+luci-py_chromium.org
Base URL:
https://chromium.googlesource.com/external/github.com/luci/luci-py@master
Target Ref:
refs/heads/master
Project:
luci-py
Visibility:
Public.

Description

Minor refactoring in task_runner.py in preparation for adding more code. In particular: * Move all auth related stuff into bot_auth.py. It will grow later. task_runner.py is already huge. * Move auth init/shutdown to load_and_run, run_command is too big. * Use InternalError exception instead of ValueError to signal errors. * Rename MustExit to ExitSignal to indicate that it is raised by signals. * Various nits in comments. Also it makes more kinds of errors recognized as internal errors. For example, IOError when reading from a task process pipe. R=maruel@chromium.org BUG= Committed: https://github.com/luci/luci-py/commit/43a6d619519fc21eb427cdd25b6d912c4616ff6f

Patch Set 1 #

Total comments: 23

Patch Set 2 : Minor refactoring in task_runner.py in preparation for adding more code. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+213 lines, -96 lines) Patch
M appengine/swarming/swarming_bot/bot_code/bot_auth.py View 1 2 chunks +89 lines, -0 lines 0 comments Download
M appengine/swarming/swarming_bot/bot_code/task_runner.py View 1 10 chunks +93 lines, -84 lines 0 comments Download
M appengine/swarming/swarming_bot/bot_code/task_runner_test.py View 9 chunks +31 lines, -12 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
Vadim Sh.
https://codereview.chromium.org/2300543002/diff/1/appengine/swarming/swarming_bot/bot_code/bot_auth.py File appengine/swarming/swarming_bot/bot_code/bot_auth.py (right): https://codereview.chromium.org/2300543002/diff/1/appengine/swarming/swarming_bot/bot_code/bot_auth.py#newcode70 appengine/swarming/swarming_bot/bot_code/bot_auth.py:70: class AuthSystem(object): I couldn't come up with a better ...
4 years, 3 months ago (2016-08-31 03:53:33 UTC) #1
M-A Ruel
lgtm https://codereview.chromium.org/2300543002/diff/1/appengine/swarming/swarming_bot/bot_code/bot_auth.py File appengine/swarming/swarming_bot/bot_code/bot_auth.py (right): https://codereview.chromium.org/2300543002/diff/1/appengine/swarming/swarming_bot/bot_code/bot_auth.py#newcode70 appengine/swarming/swarming_bot/bot_code/bot_auth.py:70: class AuthSystem(object): On 2016/08/31 03:53:32, Vadim Sh. wrote: ...
4 years, 3 months ago (2016-08-31 15:03:47 UTC) #2
Vadim Sh.
https://codereview.chromium.org/2300543002/diff/1/appengine/swarming/swarming_bot/bot_code/bot_auth.py File appengine/swarming/swarming_bot/bot_code/bot_auth.py (right): https://codereview.chromium.org/2300543002/diff/1/appengine/swarming/swarming_bot/bot_code/bot_auth.py#newcode90 appengine/swarming/swarming_bot/bot_code/bot_auth.py:90: self._auth_params_reader = None On 2016/08/31 15:03:46, M-A Ruel wrote: ...
4 years, 3 months ago (2016-09-01 00:15:56 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/2300543002/20001
4 years, 3 months ago (2016-09-06 21:36:18 UTC) #6
commit-bot: I haz the power
4 years, 3 months ago (2016-09-06 21:39:15 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://github.com/luci/luci-py/commit/43a6d619519fc21eb427cdd25b6d912c4616ff6f

Powered by Google App Engine
This is Rietveld 408576698