You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
depot_tools/third_party/cq_client
Michael Anthony Knyszek 9957a266a0 Update CQ proto to latest version
Bug:
Change-Id: Iefa3a7bd449dfbe29450597d4ead73626c5315b1
Reviewed-on: https://chromium-review.googlesource.com/636167
Commit-Queue: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
..
v1 Update CQ proto to latest version 8 years ago
v2 Update CQ proto to latest version 8 years ago
OWNERS
README.depot_tools.md Update CQ proto to latest version 8 years ago
README.md Update CQ proto files to 07b713a88. 8 years ago
__init__.py

README.md

CQ Client Library.

This directory contains CQ client library to be distributed to other repos. If you need to modify some files in this directory, please make sure that you are changing the canonical version of the source code and not one of the copies, which should only be updated as a whole using Glyco (when available, see chromium issue 489420).

The canonical version is located at https://chrome-internal.googlesource.com/infra/infra_internal/+/master/commit_queue/cq_client.

When modifying cq.proto, consider adding checks to validator in https://chrome-internal.googlesource.com/infra/infra_internal/+/master/appengine/commit_queue/src/commitqueue/validate.go.

Updating depot_tools with the copy of this.

make update-depot-tools

Generation of Python and Go bindings

tl;dr

make

Details

All commands below assume you are working in a standard infra_internal gclient checkout (e.g., after you ran mkdir src && cd src && fetch infra_internal) and are in current directory of this README.md (that is, in cd infra_internal/commit_queue/cq_client).

To generate Python's cq_pb2.py you'll need to get and protoc of version 2.6.1. You can get it by make py-prepare.

make py

To generate Golang's protobuf file cq.pb.go, you'll need to bootstrap infra/infra repository and go utilities make go-prepare.

make go

Notes

  1. Please make sure to use proto3-compatible syntax, e.g. no default values, no required fields. As of this writing (Jan 2016), the Go protobuf compiler has been upgraded to 3.0.0. So, if you can generate go bindings, all is good.

  2. If after generating Python binding, CQ tests fail with:

     TypeError: __init__() got an unexpected keyword argument 'syntax'
    

You've probably used 3.0.0 protoc generator. We should eventually switch to 3x Python version as well, but it requires upgrading infra's Python ENV to newer package. See bootstrap/README.md for more information. We may end up deprecating Python before all infra's Python code can be moved to protobuf v3.