Remove Bulid.view_url field |
|||||||
Issue descriptionhttps://chromium.googlesource.com/infra/infra/+/b1d87bd5b5922353a874377b09382e0e262e865a/appengine/cr-buildbucket/proto/build.proto defines view_url a simpler solution is to use something like cr-buildbucket.appspot.com/<build_id> which would redirect to the actual URL. This will use cookies for authorization and requires a frontpage with login/logout button.
,
May 9 2018
We are in big favor of this change! With a build id, we should be able to get info we want including the build page!
,
May 9 2018
Re #1: I believe using build id is more cleaner and simpler. For example, in flake detection, we don't have to store the view_url besides build id.
,
May 9 2018
an HTTP redirect seems to be simpler than a proto field. Note that the proto field is surfaced in RPC, BigQuery and PubSub. Also cr-buildbucket.appspot.com/<id> can be typed manually
,
May 9 2018
I see why not having such .proto field might be simpler for buildbucket implementation. However, for users that's 1 extra redirect when they click on links provided at least by CQ and/or Gerrit UI plugin. Worse, for internal projects this means logging in twice to buildbucket and Milo. Additionally, while Milo's ci.chromium.org domain makes sense, "cr-buildbucket.appspot.com" leads to reasonable "wtf is this and wtf do I have to login here?". If the a goal is typing manually, ci.chromium.org/b/<id> is even easier to type and can be implemented (but admittedly, not all buildbucket builds have view_url which leads to prod Milo). To sum up, I'm not opposed to cr-buildbucket.appspot.com/<id> url, I think it can be handy. But I disagree removes the need for build.view_url in buildbucket API. Finally, FindIt use case can be served by new easy to implement route on milo.
,
May 10 2018
Reiterating #5, a canonical URL for a buildbucket build ID sounds good if there are many different backends But if Milo is the only view_url destination, then from a user perspective, this smells like unnecessary indirection. Imagine this flow for an internal build: 1. User clicks cr-buildbucket.appspot.com/<build_id> 2. (Assuming unauthorized is an automatic redirect) User presented with log in page. Clicks to log in. 3. User redirected back to cr-buildbucket.appspot.com/<build_id> 4. cr-buildbucket.appspot.com/<build_id> redirects to ci.chromium.org/blah. Presented with a 401 page. Clicks log in 5. User is in the log in flow. Clicks log in. 6. User is presented with build page. Currently this is: 1. User clicks ci.chromium.org/blah 2. Milo presents 401, user clicks log in 3. User is in the log in flow. Clicks log in. 4. User is presented with build page.
,
May 11 2018
> I see why not having such .proto field might be simpler for buildbucket implementation. it is the opposite. For buildbucket impl, having the field is very easy. it is the API clients that suffer. > but admittedly, not all buildbucket builds have view_url which leads to prod Milo the context is API v2. We can limit it to builds that are rendered only by Milo. ----- Why do we need view_url if we establish a protocol that any LUCI build on prod buildbucket can be accessed by a human at ci.chromiium.org//b/b<id> ?
,
May 11 2018
> We can limit it to builds that are rendered only by Milo. Give this, short URL in Milo is very SGTM. Nit for ULR though: I think it can be as simple as https://ci.chromium.org/b/<numeric_id>
,
May 11 2018
I like https://ci.chromium.org/b/<numeric_id> better
,
May 12 2018
Today we have ci.chromium.org/p/<any project, actually>/b/b<id> The second “b” is there to indicate that the id is a buildbucket id. It is intended to be generic and support other kinds of builds. Maybe it is an overgeneralization. I’m fine with /<id>. Let’s move the handler. It sounds like you agree that we don’t need view_url if we have the handler.
,
May 19 2018
I just found that the following URLs works magically! https://ci.chromium.org/p/chromium/builds/b8946143958977039584 https://ci.chromium.org/p/chromium/builds/b8946141414025680272 https://ci.chromium.org/p/v8/builds/b8946162619295537264 From Findit perspective, no need to change buildbucket anymore :) But I have a question, what info from the BQ tables of CQ and buildbucket to figure whether it is "chromium", "v8", or other project to be used in the url?
,
May 19 2018
URL project is set in Milo's config and doesn't have to be equal to project in buildbucket v2. So, I still think Milo should support /b/<id> and redirect to the correct project.
,
May 19 2018
If we don't have to infer which project it is, that's simpler and better!
,
May 19 2018
Yeah. Milo shouldn’t ask for project because ids are unique. But the project in BQ is .buulder.project
,
May 19 2018
,
Jun 8 2018
,
Jun 8 2018
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-go.git/+/7c2f2dfcd575b95f0de1e3d373f10edc16fd22d6 commit 7c2f2dfcd575b95f0de1e3d373f10edc16fd22d6 Author: Nodir Turakulov <nodir@google.com> Date: Fri Jun 08 23:33:04 2018 [milo] Remove common.errorTag type. Remove common.errorTag type and common.ErrorTag variable. They are unnecessary. Bug: 841603 Change-Id: I44a8fcf74f3a2c5f753529bc400019c86ab27db9 Reviewed-on: https://chromium-review.googlesource.com/1093432 Commit-Queue: Nodir Turakulov <nodir@chromium.org> Reviewed-by: Ryan Tseng <hinoka@chromium.org> [modify] https://crrev.com/7c2f2dfcd575b95f0de1e3d373f10edc16fd22d6/milo/buildsource/buildbot/build_test.go [modify] https://crrev.com/7c2f2dfcd575b95f0de1e3d373f10edc16fd22d6/milo/buildsource/buildbot/buildinfo.go [modify] https://crrev.com/7c2f2dfcd575b95f0de1e3d373f10edc16fd22d6/milo/buildsource/buildbot/grpc.go [modify] https://crrev.com/7c2f2dfcd575b95f0de1e3d373f10edc16fd22d6/milo/common/acl_test.go [modify] https://crrev.com/7c2f2dfcd575b95f0de1e3d373f10edc16fd22d6/milo/common/error.go [modify] https://crrev.com/7c2f2dfcd575b95f0de1e3d373f10edc16fd22d6/milo/frontend/view_console.go [modify] https://crrev.com/7c2f2dfcd575b95f0de1e3d373f10edc16fd22d6/milo/frontend/view_error.go [modify] https://crrev.com/7c2f2dfcd575b95f0de1e3d373f10edc16fd22d6/milo/git/client_test.go
,
Jun 12 2018
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-go.git/+/d8a954cec2f9a5edcd8e703b6b535e494e65406e commit d8a954cec2f9a5edcd8e703b6b535e494e65406e Author: Nodir Turakulov <nodir@google.com> Date: Tue Jun 12 20:59:32 2018 [milo] Add buildbot.BuildID struct Add convenient buildbot.BuildID struct, a tuple of master, builder and build number. Use it in other places. Its methods use non-pointer receives to avoid unnecessary heap allocation. Bug: 841603 Change-Id: Id2dd8cca9c6e3644494988664a402061d9a97537 Reviewed-on: https://chromium-review.googlesource.com/1097470 Reviewed-by: Ryan Tseng <hinoka@chromium.org> Commit-Queue: Nodir Turakulov <nodir@chromium.org> [add] https://crrev.com/d8a954cec2f9a5edcd8e703b6b535e494e65406e/milo/api/buildbot/buildid.go [modify] https://crrev.com/d8a954cec2f9a5edcd8e703b6b535e494e65406e/milo/api/buildbot/structs.go [modify] https://crrev.com/d8a954cec2f9a5edcd8e703b6b535e494e65406e/milo/buildsource/buildbot/build.go [modify] https://crrev.com/d8a954cec2f9a5edcd8e703b6b535e494e65406e/milo/buildsource/buildbot/build_test.go [modify] https://crrev.com/d8a954cec2f9a5edcd8e703b6b535e494e65406e/milo/buildsource/buildbot/buildinfo.go [modify] https://crrev.com/d8a954cec2f9a5edcd8e703b6b535e494e65406e/milo/buildsource/buildbot/buildstore/blame.go [modify] https://crrev.com/d8a954cec2f9a5edcd8e703b6b535e494e65406e/milo/buildsource/buildbot/buildstore/build.go [modify] https://crrev.com/d8a954cec2f9a5edcd8e703b6b535e494e65406e/milo/buildsource/buildbot/grpc.go [modify] https://crrev.com/d8a954cec2f9a5edcd8e703b6b535e494e65406e/milo/buildsource/buildbot/pubsub_test.go [modify] https://crrev.com/d8a954cec2f9a5edcd8e703b6b535e494e65406e/milo/frontend/routes.go
,
Jun 12 2018
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-go.git/+/ad2451d6ce1f9055c1b8f69f382c55eb2c941b13 commit ad2451d6ce1f9055c1b8f69f382c55eb2c941b13 Author: Nodir Turakulov <nodir@google.com> Date: Tue Jun 12 23:17:33 2018 [milo] Refactor build/log handlers HandleBuild and buildsource.BuildID.GetBuild abstractions try to capture the common logic among build handlers. Also they cause a certain level of complexity (one has to implement BuildID) and limits what handlers can do (cannot do buildsource-specific HTTP-speciifc logic). HandleLog and buildsource.BuildID.GetLog are similar to HandleBuild, except this is actually used implemented only in one BuildID implementation, so it has even less value. Overall, there is less code without these abstractions, which is a sign that their (value/cost) or (provides/requires) ratios are too low to justify their existence. Extract the common code in helper functions and inline HandleBuild/HandleLog. Also - delete unused rawpresentation.getUIBuild - rename buildbot.Build to GetBuild, to be consistent with other build sources. - handle "server" parameter in swarming log handler. It was ignored. Bug: 841603 Change-Id: I6dc7c2be9bdae04a5099c7b011a40dda8a770282 Reviewed-on: https://chromium-review.googlesource.com/1097499 Reviewed-by: Ryan Tseng <hinoka@chromium.org> Commit-Queue: Nodir Turakulov <nodir@chromium.org> [modify] https://crrev.com/ad2451d6ce1f9055c1b8f69f382c55eb2c941b13/milo/buildsource/buildbot/build.go [modify] https://crrev.com/ad2451d6ce1f9055c1b8f69f382c55eb2c941b13/milo/buildsource/buildbot/build_test.go [modify] https://crrev.com/ad2451d6ce1f9055c1b8f69f382c55eb2c941b13/milo/buildsource/buildbucket/build.go [modify] https://crrev.com/ad2451d6ce1f9055c1b8f69f382c55eb2c941b13/milo/buildsource/rawpresentation/build.go [modify] https://crrev.com/ad2451d6ce1f9055c1b8f69f382c55eb2c941b13/milo/buildsource/swarming/build.go [modify] https://crrev.com/ad2451d6ce1f9055c1b8f69f382c55eb2c941b13/milo/frontend/routes.go [modify] https://crrev.com/ad2451d6ce1f9055c1b8f69f382c55eb2c941b13/milo/frontend/view_build.go [modify] https://crrev.com/ad2451d6ce1f9055c1b8f69f382c55eb2c941b13/milo/frontend/view_logs.go [modify] https://crrev.com/ad2451d6ce1f9055c1b8f69f382c55eb2c941b13/milo/rpc/buildinfo.go
,
Jun 12 2018
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-go.git/+/a2b7ea336050467d815c310a14641faa1a30a43f commit a2b7ea336050467d815c310a14641faa1a30a43f Author: Nodir Turakulov <nodir@google.com> Date: Tue Jun 12 23:49:53 2018 [milo] Add /b/:id URL Users need a simple way to translate a buildbucket ID into a human-consumable build URL. Here "simple" implies without RPCs. Add /b/:id handler that redirects to a canonical build URL. Also move "/b/:project/b/b:id" to "/b/:project/builders/:bucket/:builder/b:id". Bug: 841603 Change-Id: Icab6914d17aca301c25fe653b3d355ad2de5d8c0 Reviewed-on: https://chromium-review.googlesource.com/1097566 Commit-Queue: Nodir Turakulov <nodir@chromium.org> Reviewed-by: Ryan Tseng <hinoka@chromium.org> [modify] https://crrev.com/a2b7ea336050467d815c310a14641faa1a30a43f/milo/buildsource/buildbucket/build.go [modify] https://crrev.com/a2b7ea336050467d815c310a14641faa1a30a43f/milo/buildsource/buildbucket/builder.go [modify] https://crrev.com/a2b7ea336050467d815c310a14641faa1a30a43f/milo/buildsource/buildbucket/expectations/luci.infra.try/InfraPresubmit.Swarming.json [modify] https://crrev.com/a2b7ea336050467d815c310a14641faa1a30a43f/milo/common/model/build_summary.go [modify] https://crrev.com/a2b7ea336050467d815c310a14641faa1a30a43f/milo/common/model/builder_summary_test.go [modify] https://crrev.com/a2b7ea336050467d815c310a14641faa1a30a43f/milo/frontend/routes.go [modify] https://crrev.com/a2b7ea336050467d815c310a14641faa1a30a43f/milo/frontend/view_build.go
,
Jun 13 2018
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-go.git/+/1d007923054aca9e3692830a7efed634ee5abff6 commit 1d007923054aca9e3692830a7efed634ee5abff6 Author: Nodir Turakulov <nodir@google.com> Date: Wed Jun 13 00:00:03 2018 [buildbucket] Remove buildbucket.v2.Build.view_url Bug: 841603 Change-Id: I496ebe31d116b5f4d3cd0e9b118f560b15dde6a0 Reviewed-on: https://chromium-review.googlesource.com/1097595 Commit-Queue: Nodir Turakulov <nodir@chromium.org> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> [modify] https://crrev.com/1d007923054aca9e3692830a7efed634ee5abff6/buildbucket/proto/build.pb.go [modify] https://crrev.com/1d007923054aca9e3692830a7efed634ee5abff6/buildbucket/proto/build.proto [modify] https://crrev.com/1d007923054aca9e3692830a7efed634ee5abff6/buildbucket/proto/pb.discovery.go [modify] https://crrev.com/1d007923054aca9e3692830a7efed634ee5abff6/buildbucket/testdata/v2_builds.json [modify] https://crrev.com/1d007923054aca9e3692830a7efed634ee5abff6/buildbucket/v1.go [modify] https://crrev.com/1d007923054aca9e3692830a7efed634ee5abff6/luci_notify/doc/email_templates.md [modify] https://crrev.com/1d007923054aca9e3692830a7efed634ee5abff6/luci_notify/notify/emailgen.go
,
Jun 13 2018
The following revision refers to this bug: https://chromium.googlesource.com/infra/infra/+/ab5918403281e27f7f4d4c77cf21c38fb2b5ff85 commit ab5918403281e27f7f4d4c77cf21c38fb2b5ff85 Author: Nodir Turakulov <nodir@google.com> Date: Wed Jun 13 17:07:19 2018 [buildbucket] Remove Build.view_url. buildbucket.v2.Build.view_url field was removed in the proto. Remove its usages and recompile protos. Bug: 841603 Change-Id: Id0874ecba004951b55dc86e56c0c5043d6670b1a Reviewed-on: https://chromium-review.googlesource.com/1098300 Commit-Queue: Nodir Turakulov <nodir@chromium.org> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> [modify] https://crrev.com/ab5918403281e27f7f4d4c77cf21c38fb2b5ff85/appengine/cr-buildbucket/proto/build_pb2.py [modify] https://crrev.com/ab5918403281e27f7f4d4c77cf21c38fb2b5ff85/appengine/cr-buildbucket/v2/default_field_masks.py [modify] https://crrev.com/ab5918403281e27f7f4d4c77cf21c38fb2b5ff85/appengine/cr-buildbucket/v2/test/builds_test.py [modify] https://crrev.com/ab5918403281e27f7f4d4c77cf21c38fb2b5ff85/appengine/cr-buildbucket/v2/builds.py [modify] https://crrev.com/ab5918403281e27f7f4d4c77cf21c38fb2b5ff85/appengine/cr-buildbucket/proto/rpc_prpc_pb2.py
,
Jun 13 2018
short URLs were deployed, e.g. http://ci.chromium.org/b/8943809679751142640 hopefully it will stick
,
Jun 13 2018
🎉🎉🎉
,
Jun 13 2018
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-go.git/+/1eab9bb491286bc6c80a68b8420888ebf21e5b80 commit 1eab9bb491286bc6c80a68b8420888ebf21e5b80 Author: Nodir Turakulov <nodir@google.com> Date: Wed Jun 13 21:15:19 2018 [milo] use htmlMW for /b/:id route /b/:id uses project middlware. It is incorrect because there is no project parameter. Use its base. Bug: 841603 Change-Id: Ide8ee3284cb99427711b0df8ada55df555b82edd Reviewed-on: https://chromium-review.googlesource.com/1099842 Reviewed-by: Ryan Tseng <hinoka@chromium.org> Commit-Queue: Nodir Turakulov <nodir@chromium.org> [modify] https://crrev.com/1eab9bb491286bc6c80a68b8420888ebf21e5b80/milo/frontend/routes.go
,
Jun 13 2018
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/manifest-internal/+/7b4fdf1d6903b4dd8cd833d7c5e23086c01ad16d commit 7b4fdf1d6903b4dd8cd833d7c5e23086c01ad16d Author: Nodir Turakulov <nodir@google.com> Date: Wed Jun 13 22:17:50 2018
,
Jun 14 2018
Awesome!
,
Jun 14 2018
,
Jun 15 2018
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-go.git/+/b17df14d9320e9c4819d1e7de2d83b190cd03baf commit b17df14d9320e9c4819d1e7de2d83b190cd03baf Author: Nodir Turakulov <nodir@google.com> Date: Fri Jun 15 23:15:09 2018 [luci-notify] Do not ask for view_url TBR=tandrii@google.com Bug: 841603 Change-Id: Ib7f8623c1ff6ecdcc88881765a1f5cb9bec72108 Reviewed-on: https://chromium-review.googlesource.com/1103438 Reviewed-by: Nodir Turakulov <nodir@chromium.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Commit-Queue: Nodir Turakulov <nodir@chromium.org> [modify] https://crrev.com/b17df14d9320e9c4819d1e7de2d83b190cd03baf/luci_notify/notify/pubsub.go |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by tandrii@chromium.org
, May 9 2018