New issue
Advanced search Search tips

Issue 782997 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Nov 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

ChromeOS Swarming builds don't use --remote-tryjob or cherry-pick CLs.

Project Member Reported by dgarr...@chromium.org, Nov 9 2017

Issue description

cros tryjob --swarming build-config

This works, but many additional arguments will be ignored. In particular, --remote-tryjob and cherry-pick CL arguments. This is a build recipe problem.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 9 2017

Labels: merge-merged-config
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/manifest/+/31ccd6daacd2b0b7d769ac76bd8b1a0c47871513

commit 31ccd6daacd2b0b7d769ac76bd8b1a0c47871513
Author: Don Garrett <dgarrett@google.com>
Date: Thu Nov 09 20:32:29 2017

swarmbucket: Switch from cbuildbot to cbuildbot_tryjob recipe.

The cbuildbot recipe ignores many of the properties passed into the
build that the cbuildbot_tryjob recipe will accept. We still want to
write a new / simpler recipe for swarming, but this should allow CLs
to be cherry-picked in for now.

BUG= chromium:782997 
TEST=None.

Change-Id: I126c9ef5f68b6c7cd7ab302b125fa8c5a3ce08e9
Reviewed-on: https://chromium-review.googlesource.com/759308
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>

[modify] https://crrev.com/31ccd6daacd2b0b7d769ac76bd8b1a0c47871513/cr-buildbucket.cfg

Project Member

Comment 2 by bugdroid1@chromium.org, Nov 9 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/manifest-internal/+/28b18d9b0817a582ad200f2f7b1b796e3f57aca7

commit 28b18d9b0817a582ad200f2f7b1b796e3f57aca7
Author: Don Garrett <dgarrett@google.com>
Date: Thu Nov 09 22:20:32 2017

Switching to the "cbuildbot_tryjob" recipe has broken tryjobs more generally:

recipe_result: <
  failure: <
    human_reason: "Uncaught Exception: AttributeError(\"'tuple' object has no attribute 'startswith'\",)"
    exception: <
      traceback: "Traceback (most recent call last):"
      traceback: "  File \"/b/swarming/w/ir/kitchen-checkout/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/run.py\", line 328, in _new_run"
      traceback: "    recipe_result = recipe_script.run(api, properties)"
      traceback: "  File \"/b/swarming/w/ir/kitchen-checkout/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/loader.py\", line 98, in run"
      traceback: "    self.run_steps, properties, self.PROPERTIES, api=api)"
      traceback: "  File \"/b/swarming/w/ir/kitchen-checkout/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/loader.py\", line 627, in invoke_with_properties"
      traceback: "    **additional_args)"
      traceback: "  File \"/b/swarming/w/ir/kitchen-checkout/scripts/slave/.recipe_deps/recipe_engine/recipe_engine/loader.py\", line 588, in _invoke_with_properties"
      traceback: "    return callable_obj(*props, **additional_args)"
      traceback: "  File \"/b/swarming/w/ir/kitchen-checkout/scripts/slave/recipes/cros/cbuildbot_tryjob.py\", line 77, in RunSteps"
      traceback: "    if tryjob_args.startswith('z:'):"
      traceback: "AttributeError: 'tuple' object has no attribute 'startswith'"


The value in question is populated this way for the swarming jobs:
        name: "cbb_extra_args"
        value: "[\"--remote-trybot\", \"-b\", \"master\", \"-g\", \"757986\"]"

On a typical buildbot build, it contains a string, which is optionally compressed:
   'z:eJyLVtLVLUrNzS9J1S0pqkzKL1HSUVDSTQKRuYnFJalFYH46iDQ3Nbe0MFOKBQCMqw3t' ->
   '["--remote-trybot", "-b", "master", "-g", "757986"]'

The problem appears to be that something is translating the string into a python struct for swarming, but not for buildbot.

The simplest solution appears to be to make the recipe robust against this.

Owner: dgarr...@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build/+/d1b3202f53ec973d6a94be321dda8671890ec7ff

commit d1b3202f53ec973d6a94be321dda8671890ec7ff
Author: Don Garrett <dgarrett@google.com>
Date: Fri Nov 10 00:55:06 2017

cbuildbot_tryjob: Update recipe for swarming.

Arguments passed in may not be strings in swarming builds, which means
there is no need to decode them from string to list, and also no need
to crash because it's not a string.

BUG= chromium:782997 
TBR=nxia@chromium.org

Change-Id: I468d1e39d5babf3fc3f74f3c41e0e873079715be
Reviewed-on: https://chromium-review.googlesource.com/762077
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Don Garrett <dgarrett@chromium.org>

[add] https://crrev.com/d1b3202f53ec973d6a94be321dda8671890ec7ff/scripts/slave/recipes/cros/cbuildbot_tryjob.expected/swarming.json
[modify] https://crrev.com/d1b3202f53ec973d6a94be321dda8671890ec7ff/scripts/slave/recipes/cros/cbuildbot_tryjob.py

Status: Verified (was: Started)

Sign in to add a comment