Retrieve build info with buildbucket id |
||||||||
Issue descriptionMilo.BuildInfo API could take in a single buildbucket id as a request. This would allow API users such as the GoldenEye team to retrieve build info without differentiating between buildbot builds and swarming builds when building the request.
,
Oct 10 2017
,
Oct 16 2017
Right now this API is returning internal error when using buildbucketId to query.
,
Oct 18 2017
It's possible this is a javascript error. See: https://2192-24e9a3b-tainted-hinoka-dot-luci-milo-dev.appspot.com/rpcexplorer/services/milo.BuildInfo/Get?request={%20%20%20%20%22buildbucket%22:%20{%20%20%20%20%20%20%20%20%22id%22:%208967802503324054000%20%20%20%20}} I enter in 8967802503324053232 but it gets transformed into 8967802503324054000 when sending.
,
Oct 18 2017
So the actual API works, just not the explorer?
,
Oct 18 2017
It's hard to say, will try to look into what's going on with the explorer first, otherwise this would get annoying to debug.
,
Oct 18 2017
I took the request an ran it on curl: curl 'https://2192-24e9a3b-tainted-hinoka-dot-luci-milo-dev.appspot.com/prpc/milo.BuildInfo/Get' -H 'pragma: no-cache' -H 'origin: https://2192-24e9a3b-tainted-hinoka-dot-luci-milo-dev.appspot.com' -H 'accept-encoding: gzip, deflate, br' -H 'accept-language: en-GB,en;q=0.8,en-US;q=0.6,ja;q=0.4' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36' -H 'content-type: application/json' -H 'accept: application/json' -H 'cache-control: no-cache' -H 'authority: 2192-24e9a3b-tainted-hinoka-dot-luci-milo-dev.appspot.com' -H 'cookie: G_ENABLED_IDPS=google' -H 'referer: https://2192-24e9a3b-tainted-hinoka-dot-luci-milo-dev.appspot.com/rpcexplorer/services/milo.BuildInfo/Get?request={%20%20%20%20%22buildbucket%22:%20{%20%20%20%20%20%20%20%20%22id%22:%208967802503324054000%20%20%20%20}}' --data-binary '{"buildbucket":{"id":8967802503324053232}}' --compressed It came out correctly. I think this is just a problem with the explorer.
,
Oct 18 2017
Also this only currently works with swarmbucket builds. Buildbot builds aren't supported by the endpoint yet. Do you need it soon?
,
Oct 19 2017
JSON and JavaScript does not support such big numbers. If you type 8967802503324053232 in Chrome console, it will return 8967802503324054000 pass such big numbers as strings https://2192-24e9a3b-tainted-hinoka-dot-luci-milo-dev.appspot.com/rpcexplorer/services/milo.BuildInfo/Get?request={%20%20%20%20%22buildbucket%22:%20{%20%20%20%20%20%20%20%20%22id%22:%20%228967802503324053232%22%20%20%20%20}}
,
Oct 19 2017
oh neat, i didn't expect that to work.
,
Oct 26 2017
Thanks Nodir, yeah adding the string makes it work. And for Comment 8 from Ryan, yeah most of the Chrome OS builds are still on Buildbot, so yeah we would need the endpoint to work with Buildbot builds.
,
Oct 30 2017
,
Oct 30 2017
,
Oct 30 2017
,
Nov 21 2017
I'm curious, what's the state of this? Also, side nit: numbers in JSON are actually arbitrary precision (you can use as many digits as you want), but it's generally a bad idea to use something that doesn't store cleaning into an IEEE-754 double, because of the JavaScript limitation (which does exist) :).
,
Nov 21 2017
Right now this works only for swarming builds. We are hoping to have it (querying using buildbucketId) work for Buildbot builds as well, as it will enable us to show details of all builds during our transition to swarming.
,
Nov 21 2017
Ryan or Nodir, how much work would it be to support buildbot builds using a buildbucket ID? Jinjing, what alternatives do you have to using buildbucket IDs for lookups for both buildbot and swarming on the goldeneye side? You mention it would let you not need to differentiate them during migration on the goldeneye side but this isn't a feature that would be used by anyone but your team so I'd like to know if it actually makes more sense to implement it in milo than goldeneye.
,
Nov 21 2017
Hi Erik, thanks for checking :-) Update: We can look up most of the Buildbot builds in BuildInfo using their builder name and build number, provided such builder name and build number are given to us through the url to our details page. So this is no longer a blocker for us. But it would be most ideal if we can generate a link using buildbucketId to our GE page using when a user kicks off a tryjob. That way we don't need to wait until the build got assigned a build number to show the user the stage details. I believe once BuildInfo support such querying, both Milo and GE pages should work. However, we do plan to use GE pages as the default details page for Chrome OS builds, because it has more Chrome OS customization and timeline views.
,
Nov 22 2017
> But it would be most ideal if we can generate a link using buildbucketId please define "link". buildbucket API returns build URLs.
,
Nov 27 2017
Hi Nodir, Thanks for asking. Link means a GoldenEye link for build details like this https://cros-goldeneye.corp.google.com/chromeos/healthmonitoring/buildDetails?buildbucketId=8961742600383506432 Right now buildbucket API sometimes return uberchromegw links like: https://uberchromegw.corp.google.com/i/chromiumos.tryserver/builders/release/builds/17667 (again, I don't think this link can be populated until the build actually got to its cbuildbot stage) or https://ci.chromium.org/swarming/task/39bc3f46b773f110#. There might be other places that generate links other than buildbucket (e.g, the command line interface when a user first starts a tryjob). Don can clarify more. Regardless, we plan to have all the links go to GoldenEye build detail pages.
,
Nov 27 2017
do I understand correctly that you want builds to link to GE pages, as opposed to uberchromegw and ci.chromium.org? It would affect what build links Gerrit displays. This sounds like a separate feature request in Infra>Platform>Buildbucket component. And then, you don't need the feature in this bug, correct?
,
Nov 27 2017
Yes. The link part is correct. And yes, we don't need the exact feature in this bug. However, we still want to be able to query BuildInfo API with buildbucketId to display content on GE details page (see comment #18)
,
Nov 27 2017
but if GE page deals with buildbucket ids, presumably it loads the build and has the build number, so it can query BuildInfo with build number. If build number is not available yet (build didn't start yet), then BuildInfo wouldn't return anything useful, would it?
,
Nov 27 2017
There are some cases that we can't load the build to retrieve build number (i.e, tryjobs are in CrOS Infra's debug DB that we don't have connection to), also Don mentioned that people sometimes want to see stages before cbuildbot stages.
,
Dec 4 2017
The use case we are focused on today is: 1) User runs "cros tryjob <blah>". 2) cros tryjob creates buildbucket request. 3) cros tryjob gives user a URL. The buildbucket id is available for creating the URL in 3, but nothing else is since the tryjob probably hasn't started yet and no buildbot info exists. For now, we need to be able to generate URLs that work for both swarming and buildbot builds. Today, our code generates buildbot URLs based on the users email address, but that doesn't work very well. Using buildbucket id's would be much more effective and fix a number of long standing bugs.
,
Dec 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-go.git/+/d123a4ecc233e1a09e7c5733d531a527aa0cd8ac commit d123a4ecc233e1a09e7c5733d531a527aa0cd8ac Author: Ryan Tseng <hinoka@google.com> Date: Wed Dec 06 23:49:24 2017 [milo] Add support for getting buildbot builds via buildbucket ID By adding the buildbucket ID in the build summary's context uri. Bug: 761152 Change-Id: Ie5df184664fad9fd4b1135e5c5686758093b1999 Reviewed-on: https://chromium-review.googlesource.com/809821 Commit-Queue: Ryan Tseng <hinoka@chromium.org> Reviewed-by: Nodir Turakulov <nodir@chromium.org> [modify] https://crrev.com/d123a4ecc233e1a09e7c5733d531a527aa0cd8ac/milo/buildsource/buildbot/buildstore/build.go [add] https://crrev.com/d123a4ecc233e1a09e7c5733d531a527aa0cd8ac/milo/buildsource/buildbot/buildstore/build_test.go [modify] https://crrev.com/d123a4ecc233e1a09e7c5733d531a527aa0cd8ac/milo/buildsource/buildbucket/build.go [modify] https://crrev.com/d123a4ecc233e1a09e7c5733d531a527aa0cd8ac/milo/common/model/build_summary.go [modify] https://crrev.com/d123a4ecc233e1a09e7c5733d531a527aa0cd8ac/milo/rpc/buildinfo.go
,
Dec 7 2017
Hey sorry for the delay, we launched the LUCI UI last Wednesday so I finally got some breathing room. The latest version has been rolled. The implementation is so that only future buildbot builds are tagged with the right things to work. Do you need previous builds to work with this? Let me know if it works for you.
,
Dec 7 2017
Thanks a lot of getting this settled!
,
Dec 7 2017
Thank you so much Ryan! Working for future buildbot builds are enough.
,
Jul 30
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by bugdroid1@chromium.org
, Oct 6 2017