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

Issue 2024313003: Send authorization headers when calling Swarming backend. (Closed)

Created:
4 years, 6 months ago by Vadim Sh.
Modified:
4 years, 6 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

Send authorization headers when calling Swarming backend. What headers to send are decided by bot_config.py. It allows different bots to use different authentication mechanisms (e.g. some bots may use machine tokens, some may use GCE service accounts, some may use predeployed JSON keys, etc). R=maruel@chromium.org BUG= Committed: https://github.com/luci/luci-py/commit/3285ba3b48309de808817a4ee9d61466bc0e5485

Patch Set 1 #

Total comments: 2

Patch Set 2 : finish it, no tests yet #

Patch Set 3 : fix existing tests #

Patch Set 4 : add tests #

Total comments: 3

Patch Set 5 : rebase #

Total comments: 8

Patch Set 6 : read headers asynchroniously too #

Patch Set 7 : extract into separate function #

Total comments: 10

Patch Set 8 : #

Patch Set 9 : keep it as part of environ #

Total comments: 3

Patch Set 10 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+960 lines, -65 lines) Patch
M appengine/swarming/doc/Magic-Values.md View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M appengine/swarming/server/bot_archive.py View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M appengine/swarming/swarming_bot/api/bot.py View 4 chunks +12 lines, -3 lines 0 comments Download
M appengine/swarming/swarming_bot/api/bot_test.py View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
A appengine/swarming/swarming_bot/bot_code/bot_auth.py View 1 2 3 4 5 6 7 8 1 chunk +63 lines, -0 lines 0 comments Download
M appengine/swarming/swarming_bot/bot_code/bot_main.py View 1 2 3 4 5 6 7 8 9 13 chunks +73 lines, -19 lines 0 comments Download
M appengine/swarming/swarming_bot/bot_code/bot_main_test.py View 1 2 3 4 5 6 7 8 15 chunks +114 lines, -11 lines 0 comments Download
A appengine/swarming/swarming_bot/bot_code/file_reader.py View 1 2 3 4 5 6 7 1 chunk +107 lines, -0 lines 0 comments Download
A appengine/swarming/swarming_bot/bot_code/file_reader_test.py View 1 2 3 4 5 1 chunk +72 lines, -0 lines 0 comments Download
A appengine/swarming/swarming_bot/bot_code/file_refresher.py View 1 2 3 4 5 6 7 1 chunk +102 lines, -0 lines 0 comments Download
A appengine/swarming/swarming_bot/bot_code/file_refresher_test.py View 1 2 3 4 5 1 chunk +53 lines, -0 lines 0 comments Download
A appengine/swarming/swarming_bot/bot_code/remote_client.py View 1 2 3 1 chunk +122 lines, -0 lines 0 comments Download
A appengine/swarming/swarming_bot/bot_code/remote_client_test.py View 1 2 3 1 chunk +84 lines, -0 lines 0 comments Download
M appengine/swarming/swarming_bot/bot_code/task_runner.py View 1 2 3 4 5 6 7 8 11 chunks +64 lines, -10 lines 0 comments Download
M appengine/swarming/swarming_bot/bot_code/task_runner_test.py View 1 2 3 4 5 6 7 8 19 chunks +58 lines, -18 lines 0 comments Download
M appengine/swarming/swarming_bot/config/bot_config.py View 1 2 chunks +25 lines, -2 lines 0 comments Download
M client/utils/file_path.py View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (7 generated)
Vadim Sh.
This CL is not finished yet, but I'd like to get your feedback before finishing ...
4 years, 6 months ago (2016-06-01 02:29:56 UTC) #1
M-A Ruel
On 2016/06/01 02:29:56, Vadim Sh. wrote: > This CL is not finished yet, but I'd ...
4 years, 6 months ago (2016-06-01 17:08:02 UTC) #2
Vadim Sh.
This is finished now, PTAL. https://codereview.chromium.org/2024313003/diff/1/appengine/swarming/swarming_bot/bot_code/bot_main.py File appengine/swarming/swarming_bot/bot_code/bot_main.py (right): https://codereview.chromium.org/2024313003/diff/1/appengine/swarming/swarming_bot/bot_code/bot_main.py#newcode182 appengine/swarming/swarming_bot/bot_code/bot_main.py:182: return func(botobj) if func ...
4 years, 6 months ago (2016-06-03 01:15:32 UTC) #3
M-A Ruel
https://codereview.chromium.org/2024313003/diff/80001/appengine/swarming/swarming_bot/bot_code/file_refresher.py File appengine/swarming/swarming_bot/bot_code/file_refresher.py (right): https://codereview.chromium.org/2024313003/diff/80001/appengine/swarming/swarming_bot/bot_code/file_refresher.py#newcode37 appengine/swarming/swarming_bot/bot_code/file_refresher.py:37: target=self._run, normally +4 https://codereview.chromium.org/2024313003/diff/80001/appengine/swarming/swarming_bot/bot_code/file_refresher.py#newcode86 appengine/swarming/swarming_bot/bot_code/file_refresher.py:86: def _run(self, signal): why ...
4 years, 6 months ago (2016-06-03 20:00:49 UTC) #4
Vadim Sh.
https://codereview.chromium.org/2024313003/diff/80001/appengine/swarming/swarming_bot/bot_code/file_refresher.py File appengine/swarming/swarming_bot/bot_code/file_refresher.py (right): https://codereview.chromium.org/2024313003/diff/80001/appengine/swarming/swarming_bot/bot_code/file_refresher.py#newcode37 appengine/swarming/swarming_bot/bot_code/file_refresher.py:37: target=self._run, On 2016/06/03 20:00:49, M-A Ruel wrote: > normally ...
4 years, 6 months ago (2016-06-03 23:37:55 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2024313003/120001
4 years, 6 months ago (2016-06-03 23:51:45 UTC) #7
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-03 23:54:56 UTC) #9
Vadim Sh.
ping
4 years, 6 months ago (2016-06-06 18:07:06 UTC) #10
M-A Ruel
small nits https://codereview.chromium.org/2024313003/diff/120001/appengine/swarming/swarming_bot/bot_code/file_reader.py File appengine/swarming/swarming_bot/bot_code/file_reader.py (right): https://codereview.chromium.org/2024313003/diff/120001/appengine/swarming/swarming_bot/bot_code/file_reader.py#newcode75 appengine/swarming/swarming_bot/bot_code/file_reader.py:75: except (OSError, IOError, ValueError) as e: IOError, ...
4 years, 6 months ago (2016-06-06 21:18:37 UTC) #11
Vadim Sh.
https://codereview.chromium.org/2024313003/diff/120001/appengine/swarming/swarming_bot/bot_code/file_reader.py File appengine/swarming/swarming_bot/bot_code/file_reader.py (right): https://codereview.chromium.org/2024313003/diff/120001/appengine/swarming/swarming_bot/bot_code/file_reader.py#newcode75 appengine/swarming/swarming_bot/bot_code/file_reader.py:75: except (OSError, IOError, ValueError) as e: On 2016/06/06 21:18:36, ...
4 years, 6 months ago (2016-06-06 22:17:09 UTC) #12
M-A Ruel
lgtm
4 years, 6 months ago (2016-06-06 22:48:53 UTC) #13
Vadim Sh.
Please take another look at the latest patchset. I made it more "future friendly" in ...
4 years, 6 months ago (2016-06-07 22:22:59 UTC) #14
M-A Ruel
I like it more, lgtm https://codereview.chromium.org/2024313003/diff/160001/appengine/swarming/doc/Magic-Values.md File appengine/swarming/doc/Magic-Values.md (right): https://codereview.chromium.org/2024313003/diff/160001/appengine/swarming/doc/Magic-Values.md#newcode36 appengine/swarming/doc/Magic-Values.md:36: - `SWARMING_HEADLESS=1` is always ...
4 years, 6 months ago (2016-06-07 22:41:19 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2024313003/160001
4 years, 6 months ago (2016-06-07 22:45:09 UTC) #17
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-07 22:48:21 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2024313003/180001
4 years, 6 months ago (2016-06-07 23:41:38 UTC) #22
commit-bot: I haz the power
4 years, 6 months ago (2016-06-07 23:44:59 UTC) #24
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://github.com/luci/luci-py/commit/3285ba3b48309de808817a4ee9d61466bc0e5485

Powered by Google App Engine
This is Rietveld 408576698