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

Issue 822024 link

Starred by 8 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug


Participants' hotlists:
Tiff-List


Sign in to add a comment

lots of links are broken in SOM

Project Member Reported by crouleau@chromium.org, Mar 14 2018

Issue description

Problem with Sheriff-o-Matic

for example I get this link: https://uberchromegw.corp.google.com/i/chromium.linux/builders/Linux%20Builder%20%28dbg%29 from SOM.

The text is "Builders this step failed on:
Linux Builder (dbg)  Δ"
 
Labels: Milestone-Polish
Status: Available (was: Untriaged)
Looking at the builder list, it looks like the link this should be pointing to is probably https://uberchromegw.corp.google.com/i/chromium.linux/builders/Linux%20Builder%20%28dbg%29%2832%29 or something of the like? 
 Issue 822423  has been merged into this issue.
Cc: iannucci@chromium.org
+ iannucci from merged bug. 

It looks like https://ci.chromium.org/buildbot/chromium.linux/Linux%20Builder/ exists in the list of builders under chromium.linux in Milo but the page seems to be broken, so I wonder if there might be a bug somewhere else in the stack. 
Hm... I don't see it listed though? https://ci.chromium.org/search?q=Linux%20Builder

I see it listed under luci.chromium.ci, which is the correct Buildbucket bucket for it's current configuration
Components: Infra>Platform>Milo
I suspect that we're going to need to add a ViewURL to the Build response in GetCompressedMasterJSON: https://cs.chromium.org/chromium/infra/go/src/go.chromium.org/luci/milo/api/buildbot/structs.go?l=151

Comment 6 by efoo@chromium.org, Mar 15 2018

Labels: LUCI-TaskForce LUCI-Chromium-CQSets

Comment 7 by efoo@chromium.org, Mar 15 2018

Labels: -LUCI-Chromium-CQSets LUCI-Blocker-Chromium-CQSets

Comment 8 by hinoka@chromium.org, Mar 15 2018

Should be fairly easy to make a self link field in the emulated JSON endpoint.  How does SoM generating these links?  I'd want to know if it's constructed, or taken out of a field in Milo.
Project Member

Comment 9 by bugdroid1@chromium.org, Mar 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/luci/luci-go.git/+/dbef627f726a861e28666cc87b7a1012fb0c7aa7

commit dbef627f726a861e28666cc87b7a1012fb0c7aa7
Author: Robert Iannucci <iannucci@chromium.org>
Date: Thu Mar 15 22:46:45 2018

[milo] Add ViewURL to GetCompressedMasterJSON result.

This should allow downstream services like S-o-M to correctly link back
to the non-emulated view of the build.

R=hinoka@chromium.org, nodir@chromium.org, zhangtiff@chromium.org

Bug: 822024
Change-Id: Ifdd0404772d74b0a64cb23c3b5f4ed8ef037b809
Reviewed-on: https://chromium-review.googlesource.com/964947
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Tiffany Zhang <zhangtiff@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>

[modify] https://crrev.com/dbef627f726a861e28666cc87b7a1012fb0c7aa7/milo/api/buildbot/structs.go
[modify] https://crrev.com/dbef627f726a861e28666cc87b7a1012fb0c7aa7/milo/buildsource/buildbot/buildstore/buildbucket.go
[modify] https://crrev.com/dbef627f726a861e28666cc87b7a1012fb0c7aa7/milo/buildsource/buildbot/buildstore/query.go

Project Member

Comment 10 by bugdroid1@chromium.org, Mar 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/luci/luci-go.git/+/761c2fb7ef5977938f76b3e97860ff96cb30abae

commit 761c2fb7ef5977938f76b3e97860ff96cb30abae
Author: Robert Iannucci <iannucci@chromium.org>
Date: Fri Mar 16 19:38:22 2018

[milo] Centralize ViewPath calculation to catch GetBuild too.

GetBuildbotBuildJSON was bypassing the new ViewPath logic.

R=hinoka@chromium.org, nodir@chromium.org, zhangtiff@chromium.org

Bug: 822024
Change-Id: I8630aad57a925f4dc9201a237b0073b36a4fc061
Reviewed-on: https://chromium-review.googlesource.com/965456
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>

[modify] https://crrev.com/761c2fb7ef5977938f76b3e97860ff96cb30abae/milo/buildsource/buildbot/buildstore/build.go
[modify] https://crrev.com/761c2fb7ef5977938f76b3e97860ff96cb30abae/milo/buildsource/buildbot/buildstore/query.go
[modify] https://crrev.com/761c2fb7ef5977938f76b3e97860ff96cb30abae/milo/buildsource/buildbot/pubsub_test.go

This is deployed to ci.chromium.org; now every Build in the emulated JSON responses has a 'view_path' field which looks like '/p/chromium/builders/luci.chromium.ci/Linux Builder/99845' in the case of a LUCI build and '/buildbot/chromium.linux/Linux Builder/99845' in the case of a buildbot builder. You can add this path to the host like:

  "https://" + miloHost + viewPath

To get a full url like:

  https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux Builder/99845

Note that you can trim the number off of either of these URLs to get the URL to the correct builder containing that build.
Owner: zhangtiff@chromium.org
Status: Started (was: Available)
Thanks for the fix, Robbie! I'll start working on fixing this on the SoM side now. 

Comment 13 by no...@chromium.org, Mar 31 2018

Labels: -Pri-2 Pri-1 Type-Bug
 Issue 826944  has been merged into this issue.
Issue 829072 has been merged into this issue.

Comment 16 by athom@google.com, Apr 11 2018

Cc: machenb...@chromium.org
Is it intentional that the Builder name in the view_path field in the JSON response not escaped?

In the example above: "https://" + miloHost + viewPath = broken URL (as can be seen in the comment's full URI).
If a client of the API attempts to escape the entire view_path you would also get escaped slashes.

Comment 18 by no...@chromium.org, Apr 11 2018

imo code generating URLs should be aware of its structure and escaping. If that code used https://godoc.org/net/url#URL.Path for generating, it would not have a problem. https://play.golang.org/p/fx9SfV-6w9N

@zhangtiff - any update on the state of this?
@dpranke: Sorry, I started this a while back, realized it would take a bit longer than I initially expected then forgot to make time to finish this. I'll aim to fix this by EOW. 
 Issue 834009  has been merged into this issue.
Project Member

Comment 22 by bugdroid1@chromium.org, Apr 18 2018

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

commit 4cf8fc3e285bbb9c9d53ba0061fb977bb5a876a3
Author: Tiff Zhang <zhangtiff@google.com>
Date: Wed Apr 18 21:49:59 2018

SoM: Fix most broken milo links.


Bug:822024
Change-Id: I592af24dbbddaa3b615e109928a3b5e3c60c6d8a
Reviewed-on: https://chromium-review.googlesource.com/1017900
Reviewed-by: Sean McCullough <seanmccullough@chromium.org>
Commit-Queue: Tiffany Zhang <zhangtiff@chromium.org>

[modify] https://crrev.com/4cf8fc3e285bbb9c9d53ba0061fb977bb5a876a3/go/src/infra/appengine/sheriff-o-matic/som/analyzer/test/test_helpers_test.go
[modify] https://crrev.com/4cf8fc3e285bbb9c9d53ba0061fb977bb5a876a3/go/src/infra/appengine/sheriff-o-matic/frontend/elements/som-linkify-behavior.html
[modify] https://crrev.com/4cf8fc3e285bbb9c9d53ba0061fb977bb5a876a3/go/src/infra/appengine/sheriff-o-matic/frontend/elements/som-settings/som-settings.html
[modify] https://crrev.com/4cf8fc3e285bbb9c9d53ba0061fb977bb5a876a3/go/src/infra/appengine/sheriff-o-matic/som/analyzer/analyzer.go
[modify] https://crrev.com/4cf8fc3e285bbb9c9d53ba0061fb977bb5a876a3/go/src/infra/appengine/sheriff-o-matic/som/analyzer/analyzer_test.go
[modify] https://crrev.com/4cf8fc3e285bbb9c9d53ba0061fb977bb5a876a3/go/src/infra/appengine/sheriff-o-matic/som/handler/analyze.go
[modify] https://crrev.com/4cf8fc3e285bbb9c9d53ba0061fb977bb5a876a3/go/src/infra/appengine/sheriff-o-matic/som/client/client.go
[modify] https://crrev.com/4cf8fc3e285bbb9c9d53ba0061fb977bb5a876a3/go/src/infra/appengine/sheriff-o-matic/frontend/elements/som-drawer/som-drawer.html
[modify] https://crrev.com/4cf8fc3e285bbb9c9d53ba0061fb977bb5a876a3/go/src/infra/appengine/sheriff-o-matic/som/analyzer/test/test_helpers.go
[modify] https://crrev.com/4cf8fc3e285bbb9c9d53ba0061fb977bb5a876a3/go/src/infra/monitoring/messages/buildextract.go
[modify] https://crrev.com/4cf8fc3e285bbb9c9d53ba0061fb977bb5a876a3/go/src/infra/appengine/sheriff-o-matic/frontend/elements/som-settings/som-settings.js

Issue 835772 has been merged into this issue.
Cc: jchin...@chromium.org hzl@chromium.org yoichio@google.com
 Issue 836081  has been merged into this issue.
Issue 835008 has been merged into this issue.
Cc: -yoichio@google.com
Cc: iannu...@google.com
Cc: -iannucci@chromium.org

Sign in to add a comment