Swarming: enforce lower task limits and make them coherent between bot and task request |
||
Issue descriptionLike the maximum length of dimension keys, etc.
,
Apr 27 2018
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-py.git/+/a41f00be006798cc12ba1d81e0e0c8370ae6fb1c commit a41f00be006798cc12ba1d81e0e0c8370ae6fb1c Author: Marc-Antoine Ruel <maruel@chromium.org> Date: Fri Apr 27 18:42:37 2018 [swarming] add stricter limits for task requests. - They are easy to increase if someone ever needs more, but this guards against unknown intrinsic limits, which is more dangerous. - Add unit test to cover many cases (but not all yet). - Make task request dimensions and bot dimensions use the same code to verify the key validitiy. - This fixes some issues like cache name could have been longer than what is valid as a dimension value. Request: - Command: - Max # items 256->128 - Extra args (only with isolated command): - Max # items 256->128 - Dimensions: - Max # keys 64->32 - Max key length ∝->64 - Max # values ∝->16 - Max value length ∝->128 (mainly due to cache) - Env: - Max key length 1024->64 - Max # keys stays at 64 - Max value length stays at 1024 - Env prefixes: - Max key length 1024->64 - Max # keys stays at 64 - Max value length ∝->1024 - Isolate: - Max Isolate server length 8192->1024 - Tags: - Max length 1024->256 - Cache: - Max # caches 64->32 - Max name length 1024->128 - Max path length 1024->256 - CIPD: - Max installation path length 1024->256 - Max CIPD server length 8192->1024 - Outputs: - Max path length 1024->512 - Max # outputs stays at 4096 - Service account: - Max account name length 1024->128 - PubSub: - Topic length stays at 1024 - User data length stays at 1024 Bot: - Dimensions: - Max key length 256->64 - Max value key length 256->128 Bug: 831348 Change-Id: I3bbc8cce04141d4e0b3aa709c8474f7fccac20aa Reviewed-on: https://chromium-review.googlesource.com/1030046 Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org> Reviewed-by: Nodir Turakulov <nodir@chromium.org> Reviewed-by: Vadim Shtayura <vadimsh@chromium.org> [modify] https://crrev.com/a41f00be006798cc12ba1d81e0e0c8370ae6fb1c/appengine/swarming/server/config.py [modify] https://crrev.com/a41f00be006798cc12ba1d81e0e0c8370ae6fb1c/appengine/swarming/server/task_request.py [modify] https://crrev.com/a41f00be006798cc12ba1d81e0e0c8370ae6fb1c/appengine/swarming/server/task_request_test.py
,
Apr 27 2018
This has been live for an hour and nothing blew up (at least not spectacularly). While it's possible to require small follow ups to tweak specific values based on actual use cases, I'm declaring this a success. |
||
►
Sign in to add a comment |
||
Comment 1 by mar...@chromium.org
, Apr 26 2018