New issue
Advanced search Search tips

Issue 787093 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Debug task button in UI doesn't print original task command

Project Member Reported by bpastene@chromium.org, Nov 20 2017

Issue description

Just tried it out in https://chromium-swarm.appspot.com/task?id=39f3e0cbb71cae10 and noticed it was missing.

The debug_task.py script does print it: https://chromium.googlesource.com/infra/luci/luci-py/+/95f1b5af847bc3b85d9a402a6bf05d191d9b95ba/client/tools/debug_task.py#25

Note that it should probably include anything passed to the "--extra-args" swarming.py option.
 
BTW, knowing virtually zero polymer, I did a little grep'ing to see how easily I could add this option myself and noticed the button's logic is implemented in two different places:
https://chromium.googlesource.com/infra/luci/luci-py/+/95f1b5af847bc3b85d9a402a6bf05d191d9b95ba/appengine/swarming/ui/res/imp/taskpage/task-page.html#1140
https://chromium.googlesource.com/infra/luci/luci-py/+/95f1b5af847bc3b85d9a402a6bf05d191d9b95ba/appengine/swarming/ui/build/elements.html

Is that WAI? Can one be removed?



Comment 2 by mar...@chromium.org, Nov 20 2017

It's tricky to do in JS, as it means two things:
- Extracting the isolated
- Fetch the command from it and be smart about it, e.g. vs raw command.

One thing I'd like to see happen is *turning down support for command in .isolated files*. One way to start working on that is to work on issue 665183.
Your observation in #1 is WAI - the latter is a "built" version of the former (and the rest of the elements).  The latter is what is served on the bots.
Re #2: That sounds understandably non-trivial. Feel free to close this as wontfix then. Though, maybe we can print a line like "See the command listed in isolateserver.appspot.com/browse?hash=the_isolate_hash to rerun task"?

Comment 5 by mar...@chromium.org, Nov 20 2017

I'm fine with this hack, it'd be relatively easy to code and fairly safe, pseudo-code:

if properties.command:
  print properties.command
elif properties.isolated:
  print `See https://isolate/browser...` and add properties.extra_args

Not awesome, still less bad and not hard to implement.
Status: Available (was: Untriaged)
When we do this we should also set env and env_prefixes.

Maybe the best way to do this would be to have the bot prepare some helper script in the root of the task that could be `eval'd` (or the windows equivalent .bat file) that sets up the envvars and also prints the command that would have run?

Sign in to add a comment