madecoste / swarming

Automatically exported from code.google.com/p/swarming
Apache License 2.0
0 stars 1 forks source link

Remove support to run multiple commands in a swarming task #188

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Removing support for multiple commands per swarming task will greatly simplify 
the project. This will have a lot of repercussions (for the better) but will 
create backward incompatible changes. The transition with Cloud Endpoints 
(issue 179) could be used to this client API change but it is not strictly 
required, we can as well do a temporary v2/ client API in the meantime 
depending on the progress of each task, it's not a big deal.

Action Items in order:
- client: Remove support to do task request with >1 command in swarming.py.
- server: Update task request handler to disallow task request with >1 command 
in /swarming/api/v1/client/request.
- bot: swarming/bot/task_runner.py expect only one command.
- bot: Remove the loop in load_and_run() and command index.
- server: Remove support from multiple commands in bot API.
- server: Create new entity schema to remove repeated=True at multiple places, 
s/exit_codes/exit_code/ and remove TaskOutput. It's unnecessary now and 
TaskOutputChunk can be directly descendent of TaskRunResult.
- server: Update UI at multiple places to support both entity schemas. Hide the 
fact multiple commands are supported.
- server: Run map reduce to convert all previous tasks to new entity schema as 
if they had run only one command.
- server: Remove support for old entity schema.
- server: Create client API v2 with lack of multiple command results. In 
particular .../v2/client/request and add .../v2/client/task/<id>/output which 
replaces ../v1/client/task/<id>/output/<index> and 
.../v1/client/task/<id>/output/all.
- client: Switch to use client API v2.
- server: Remove client API v1.

I think doing the internal overhaul before doing the external client API has 
the advantage of having a clearer view of what the final API should look like. 
Both can still be worked on simultaneously and strict ordering is not necessary.

Original issue reported on code.google.com by maruel@chromium.org on 8 Dec 2014 at 3:29