New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 708395 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: 3
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocked on:
issue 728513
issue 730196

Blocking:
issue 694887
issue 721571
issue 729145
issue 740307
issue 742492


Participants' hotlists:
Luci-Current-Iteration


Sign in to add a comment

propagate luci build result to swarmbucket

Project Member Reported by no...@chromium.org, Apr 5 2017

Issue description

currently kitchen ignores recipe result. Buildbucket does not receive it. In particular, it does not distinguish between failures and infra failures.

Propagate recipe result from recipe engine through kitchen to buildbucket.
 

Comment 1 by no...@chromium.org, Apr 7 2017

Blocking: 702423
Project Member

Comment 2 by bugdroid1@chromium.org, May 5 2017

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

commit 95f0d5777e7c3db976c941758b2caa447f3c9872
Author: Nodir Turakulov <nodir@google.com>
Date: Fri May 05 17:46:54 2017

remote_run: add support for new kitchen result format

https://chromium-review.googlesource.com/c/468527/
makes a breaking change to kitchen's -output-result-json flag.

Update remote_run.py accordingly.

R=dnj@chromium.org
BUG= 708395 

Change-Id: Icc46af373a522150619f906516618847baf7ea7f
Reviewed-on: https://chromium-review.googlesource.com/495011
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Daniel Jacques <dnj@chromium.org>

[modify] https://crrev.com/95f0d5777e7c3db976c941758b2caa447f3c9872/scripts/slave/remote_run.py
[modify] https://crrev.com/95f0d5777e7c3db976c941758b2caa447f3c9872/scripts/slave/unittests/remote_run_test.py

Project Member

Comment 3 by bugdroid1@chromium.org, May 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/a3c90eb3fcdad7b24059b6d78d911bfe748e243d

commit a3c90eb3fcdad7b24059b6d78d911bfe748e243d
Author: Nodir Turakulov <nodir@google.com>
Date: Fri May 05 18:45:54 2017

kitchen: export execution result

Repurpose unused -output-result-json flag from recipe result to
cook subcommand execution result to put there as much information 
as possible, including recipe result proto, build proto, recipe
exit code and whether this is considered an infra failure.

R=dnj@chromium.org, iannucci@chromium.org
Bug= 708395 

Change-Id: I9c9e2fc3e596d68a9beb7190fd1b8a464b3d9f1f
Reviewed-on: https://chromium-review.googlesource.com/468527
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>

[add] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/third_party/recipe_engine/generate.go
[add] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/proto/result.proto
[add] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/third_party/recipe_engine/README.md
[add] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/testdata/recipe_repo/recipes.py
[add] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/third_party/recipe_engine/recipe_engine.infra_testing
[add] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/cook_test.go
[modify] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/kitchen.go
[delete] https://crrev.com/a9943df69765ae7a3b7e6c7c5bf3f6035550b9c1/go/src/infra/tools/kitchen/proto/README.md
[add] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/proto/result.pb.go
[rename] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/third_party/recipe_engine/arguments.proto
[add] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/third_party/recipe_engine/result.proto
[rename] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/third_party/recipe_engine/arguments.pb.go
[add] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/third_party/recipe_engine/result.pb.go
[modify] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/recipe.go
[modify] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/kitchen.infra_testing
[modify] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/cook.go
[modify] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/proto/generate.go
[modify] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/util.go
[add] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/testdata/recipe_repo/infra/config/recipes.cfg
[modify] https://crrev.com/a3c90eb3fcdad7b24059b6d78d911bfe748e243d/go/src/infra/tools/kitchen/cook_logdog.go

Project Member

Comment 4 by bugdroid1@chromium.org, May 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/f722408f104b8c708a2307234860f9cf0ca12ebc

commit f722408f104b8c708a2307234860f9cf0ca12ebc
Author: Nodir Turakulov <nodir@google.com>
Date: Fri May 05 22:29:49 2017

kitchen: add buildURL and limit recipe result

Buildbucket is going to persists CookResult proto in result_details_json
field on Build entities, so they are exposed to users and replicated
in Milo (for fast serving). The problem is the proto size can surpass 1MB,
which is the datastore and memcache limits.

Add build_proto_url field which is the URL where the build field contents can
be fetched from. Upon receiving the cook proto, Buildbucket will clear build
field.

Add -recipe-result-byte-limit flag to cap recipe result size. Buildbucket
will pass 500Kb.

All other CookResult fields cannot grow too much b/c of user input.

R=dnj@chromium.org
Bug= 708395 
Change-Id: I9352cc209ff850c79cb875991f73619e4e30988d
Reviewed-on: https://chromium-review.googlesource.com/497591
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Daniel Jacques <dnj@chromium.org>

[modify] https://crrev.com/f722408f104b8c708a2307234860f9cf0ca12ebc/go/src/infra/tools/kitchen/cook.go
[modify] https://crrev.com/f722408f104b8c708a2307234860f9cf0ca12ebc/go/src/infra/tools/kitchen/proto/result.proto
[modify] https://crrev.com/f722408f104b8c708a2307234860f9cf0ca12ebc/go/src/infra/tools/kitchen/cook_test.go
[modify] https://crrev.com/f722408f104b8c708a2307234860f9cf0ca12ebc/go/src/infra/tools/kitchen/proto/result.pb.go

Comment 5 by no...@chromium.org, May 11 2017

Blocking: 721571

Comment 6 by no...@chromium.org, May 11 2017

Blocking: -702423

Comment 7 by no...@chromium.org, May 15 2017

Blocking: 694887

Comment 8 by no...@chromium.org, Jun 1 2017

Blockedon: 728513

Comment 9 by no...@chromium.org, Jun 2 2017

Cc: nxia@chromium.org jinjingl@chromium.org no...@chromium.org hinoka@chromium.org
 Issue 729101  has been merged into this issue.
Cc: dgarr...@chromium.org
in  bug 729101  dgarret wrote

"""
It would be much more efficient to have a user readable description of build failure reasons that is somehow generated by cbuildbot (and/or the recipe) included in buildbucket results where feasible.

This would allow UI to display more information with only a buildbucket query, instead of making additional Milo.BuildInfo calls per build.

Is there a reasonable approach for doing this?
"""
Cc: iannucci@chromium.org
this requires https://docs.google.com/document/d/1It-WpAyPDaCZpQm-vcjpYG7h-Qabc9fKKNKhTpVqxuA/edit# to be finalized and implemented
+iannucci
Project Member

Comment 12 by bugdroid1@chromium.org, Jun 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/a2ab98d6fb44cf20e65d7e96354b65c2bebcc8f3

commit a2ab98d6fb44cf20e65d7e96354b65c2bebcc8f3
Author: Nodir Turakulov <nodir@google.com>
Date: Fri Jun 02 19:52:57 2017

kitchen: generalize CookResult

the result of kitchen cook execution will be persisted Buildbucket
builds, visible to users, so it makes sense to ensure the proto is more
future-proof than less.

Generalize CookResult message to abstract kitchen out b/c kitchen is an
implementation details of LUCI/Swarmbucket.

Bug:  708395 
Change-Id: Ia30cdf11634282c11fdaa0f0c8f5028d74d582a1
Reviewed-on: https://chromium-review.googlesource.com/520734
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>

[delete] https://crrev.com/f2814499f904de8d63ba7856d857f402f3807eda/go/src/infra/tools/kitchen/proto/result.proto
[modify] https://crrev.com/a2ab98d6fb44cf20e65d7e96354b65c2bebcc8f3/go/src/infra/tools/kitchen/kitchen.go
[rename] https://crrev.com/a2ab98d6fb44cf20e65d7e96354b65c2bebcc8f3/go/src/infra/tools/kitchen/build/build.infra_testing
[modify] https://crrev.com/a2ab98d6fb44cf20e65d7e96354b65c2bebcc8f3/go/src/infra/tools/kitchen/cookflags/validate.go
[add] https://crrev.com/a2ab98d6fb44cf20e65d7e96354b65c2bebcc8f3/go/src/infra/tools/kitchen/build/result.pb.go
[modify] https://crrev.com/a2ab98d6fb44cf20e65d7e96354b65c2bebcc8f3/go/src/infra/tools/kitchen/cook_test.go
[delete] https://crrev.com/f2814499f904de8d63ba7856d857f402f3807eda/go/src/infra/tools/kitchen/proto/result.pb.go
[add] https://crrev.com/a2ab98d6fb44cf20e65d7e96354b65c2bebcc8f3/go/src/infra/tools/kitchen/build/result.proto
[modify] https://crrev.com/a2ab98d6fb44cf20e65d7e96354b65c2bebcc8f3/go/src/infra/tools/kitchen/cook.go
[rename] https://crrev.com/a2ab98d6fb44cf20e65d7e96354b65c2bebcc8f3/go/src/infra/tools/kitchen/build/generate.go

Blocking: 729145
Project Member

Comment 14 by bugdroid1@chromium.org, Jun 2 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/infradata/config/+/8af2236c57dffecdcac14334867978f4570e0eb0

commit 8af2236c57dffecdcac14334867978f4570e0eb0
Author: Nodir Turakulov <nodir@google.com>
Date: Fri Jun 02 23:01:15 2017

Project Member

Comment 16 by bugdroid1@chromium.org, Jun 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/a8c980c8e40b24ad9c899c16d353e93603722919

commit a8c980c8e40b24ad9c899c16d353e93603722919
Author: Nodir Turakulov <nodir@google.com>
Date: Sat Jun 03 06:30:12 2017

buildbucket: fix isolate client

net.py does not like query string params in url. Split them out
and pass them via `params` parameter

Bug:  708395 
TBR=maruel@chromium.org
Change-Id: I37a10aee5ddbe3da880af002bf9eeb64142a3f58
Reviewed-on: https://chromium-review.googlesource.com/522939
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>

[modify] https://crrev.com/a8c980c8e40b24ad9c899c16d353e93603722919/appengine/cr-buildbucket/swarming/test/isolate_test.py
[modify] https://crrev.com/a8c980c8e40b24ad9c899c16d353e93603722919/appengine/cr-buildbucket/swarming/isolate.py

Status update: necessary changes in buildbucket are landed and deployed on cr-buildbucket-dev. I will deploy them on prod on Monday.

Example of a successful build: https://cr-buildbucket-dev.appspot.com/_ah/api/buildbucket/v1/builds/8977857598185783744
see build_run_result property in result_details_json.
build_run_result is JSONPB of BuildRunResult protobuf message https://cs.chromium.org/chromium/infra/go/src/infra/tools/kitchen/build/result.proto?q=build/result.p+package:%5Echromium$&l=11

However, the format of recipe_result field (Result message in https://cs.chromium.org/chromium/infra/go/src/infra/tools/kitchen/third_party/recipe_engine/result.proto) will change in the near future; it is currently being designed, see #11. Also we plan to remove recipe_exit_code.
Project Member

Comment 18 by bugdroid1@chromium.org, Jun 5 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/infradata/config/+/47e60962edaaaf548c82b58d89ab9ca951c9b69d

commit 47e60962edaaaf548c82b58d89ab9ca951c9b69d
Author: Nodir Turakulov <nodir@google.com>
Date: Mon Jun 05 14:58:17 2017

Blockedon: 730196
This is implemented, but deployment was reverted because of bug 730196. Unless swarming grows a new API to upload task results, we cannot deploy this feature until bug 730196 is fixed.

Comment 21 by no...@chromium.org, Jul 13 2017

Blocking: 740307

Comment 22 by no...@chromium.org, Jul 13 2017

Blocking: 742492

Comment 23 by no...@chromium.org, Aug 15 2017

Status: Fixed (was: Started)

Sign in to add a comment