We have an existing Buildbucket V1 client in Chromite; this bug tracks adding a V2 client. Generated Python code here: https://cs.chromium.org/chromium/infra/infra/libs/buildbucket/proto/ Example Python client implementing the rRPC protocol: https://cs.chromium.org/chromium/infra/luci/appengine/components/components/prpc/client.py?q=components/prpc/client&sq=package:chromium&g=0&l=1 this client, however, uses AppEngine specific details to make requests: https://cs.chromium.org/chromium/infra/luci/appengine/components/components/prpc/client.py?q=components/prpc/client&sq=package:chromium&g=0&l=126&rcl=5282b6c5045a20fde990a7d8f659093c88ee1bea I will import this client, modify it to not be AppEngine-specific, import the Buildbucket V2 proto bindings, and then also provide an example client binding to the proto impl.
Made some good progress today decoupling the LUCI implementation from AppEngine. I believe I will be able to finish this tomorrow.
Uploaded pRPC client implementation <https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1374002>. Will upload Buildbucket V2 bindings, next. I'll also port the V1 clients on this same bug.
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/chromite/+/c191c63f78138b902dfe01517ef5c846e963e486 commit c191c63f78138b902dfe01517ef5c846e963e486 Author: Jason D. Clinton <jclinton@chromium.org> Date: Fri Dec 14 03:27:52 2018 Import LUCI pRPC client This is an import of the LUCI luci-py rRPC client implementation. It's quite a bit more capable than the rRPC client implementation that we already have in Chromite. Future CL's will add the Buildbucket V2 proto and port existing V1 and Chromite pRPC clients to the LUCI pRPC client. BUG=chromium:910630 TEST=./run_tests Change-Id: Ic37affbe85d20aaa65676aacd81f2b3477a316f1 Reviewed-on: https://chromium-review.googlesource.com/1374002 Commit-Ready: Jason Clinton <jclinton@chromium.org> Tested-by: Jason Clinton <jclinton@chromium.org> Reviewed-by: Jason Clinton <jclinton@chromium.org> [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/net_unittest.py [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/utils.py [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/prpc/codes.py [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/test_support/__init__.py [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/prpc/test/__init__.py [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/net.py [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/prpc/encoding.py [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/prpc/client.py [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/prpc/test/Makefile [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/__init__.py [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/test_support/test_env.py [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/prpc/test/test_pb2.py [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/prpc/test/test.proto [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/test_support/test_case.py [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/README.md [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/prpc/client_unittest.py [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/prpc/client_unittest [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/prpc/__init__.py [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/prpc/test/test_prpc_pb2.py [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/test_support/auto_stub.py [add] https://crrev.com/c191c63f78138b902dfe01517ef5c846e963e486/lib/luci/net_unittest
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/chromite/+/6a410fcae8eba3ac81c46833c31be90440d395fc commit 6a410fcae8eba3ac81c46833c31be90440d395fc Author: Jason D. Clinton <jclinton@chromium.org> Date: Sat Dec 15 06:40:46 2018 third_party: Add buildbucket generated proto bindings These are imported from LUCI infra/infra/libs. This is for V2 of the API. BUG=chromium:910630 TEST=none Change-Id: If5e9453dd093c15ce9d3167e4bfb7b4e6c611840 Reviewed-on: https://chromium-review.googlesource.com/1375129 Commit-Ready: Jason Clinton <jclinton@chromium.org> Tested-by: Jason Clinton <jclinton@chromium.org> Reviewed-by: Dhanya Ganesh <dhanyaganesh@chromium.org> [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/swarming/test/__init__.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/__init__.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/proto/project_config_pb2.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/proto/config/project_config_pb2.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/proto/rpc_prpc_pb2.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/proto/service_config_pb2.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/proto/step_pb2.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/proto/build_pb2.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/proto/config/__init__.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/proto/config/service_config_pb2.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/swarming/flatten_swarmingcfg.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/proto/Makefile [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/swarming/test/flatten_swarmingcfg_test.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/swarming/__init__.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/proto/compile.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/proto/rpc_pb2.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/proto/__init__.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/proto/common_pb2.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/proto/notification_pb2.py [add] https://crrev.com/6a410fcae8eba3ac81c46833c31be90440d395fc/third_party/infra_libs/buildbucket/proto/launcher_pb2.py
I'm setting a bad example by not updating this bug regularly. Status is that I just need to land a few uses of BBv1 API being converted to v2 to consider this bug closed.
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/chromite/+/603be5fc9273d46fb12671f3ce07f99ef36684dd commit 603be5fc9273d46fb12671f3ce07f99ef36684dd Author: Jason D. Clinton <jclinton@chromium.org> Date: Sun Jan 13 21:52:17 2019 Add foundation for Buildbucket V2 in Chromite Updating this required adding google/rpc (for status and codes protos) and updating google/protobuf. BUG=chromium:910630 TEST=run_tests Change-Id: Ie0dada3dd85d0fd29f08a57013c7c732ca46828d Reviewed-on: https://chromium-review.googlesource.com/1406261 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Jason Clinton <jclinton@chromium.org> Reviewed-by: Dhanya Ganesh <dhanyaganesh@chromium.org> [add] https://crrev.com/603be5fc9273d46fb12671f3ce07f99ef36684dd/third_party/google/rpc/error_details.proto [add] https://crrev.com/603be5fc9273d46fb12671f3ce07f99ef36684dd/third_party/google/rpc/status.proto [add] https://crrev.com/603be5fc9273d46fb12671f3ce07f99ef36684dd/third_party/google/rpc/__init__.py [add] https://crrev.com/603be5fc9273d46fb12671f3ce07f99ef36684dd/lib/buildbucket_v2_unittest.py [add] https://crrev.com/603be5fc9273d46fb12671f3ce07f99ef36684dd/third_party/google/rpc/error_details_pb2.py [add] https://crrev.com/603be5fc9273d46fb12671f3ce07f99ef36684dd/third_party/google/rpc/code.proto [add] https://crrev.com/603be5fc9273d46fb12671f3ce07f99ef36684dd/third_party/google/rpc/code_pb2.py [add] https://crrev.com/603be5fc9273d46fb12671f3ce07f99ef36684dd/third_party/google/rpc/status_pb2.py [add] https://crrev.com/603be5fc9273d46fb12671f3ce07f99ef36684dd/lib/buildbucket_v2_unittest [add] https://crrev.com/603be5fc9273d46fb12671f3ce07f99ef36684dd/third_party/google/rpc/README.md [add] https://crrev.com/603be5fc9273d46fb12671f3ce07f99ef36684dd/lib/buildbucket_v2.py
Comment 1 by jclinton@chromium.org
, Nov 30