Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(922)

Unified Diff: third_party/cq_client/README.md

Issue 1697053003: Roll cq_client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/cq_client/cq.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/cq_client/README.md
diff --git a/third_party/cq_client/README.md b/third_party/cq_client/README.md
index f1bb79c2ddea724aa939d2d893334880b67d0495..d3a264f0268c9e5ffb4fdde5f94bb78dc64cf588 100644
--- a/third_party/cq_client/README.md
+++ b/third_party/cq_client/README.md
@@ -1,29 +1,55 @@
+# 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](http://crbug.com/489420)).
-The canonical version is located at `https://chrome-internal.googlesource.com/
-infra/infra_internal/+/master/commit_queue/cq_client`.
+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]().
+
+
+## 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`).
-You'll need to use protoc version 2.6.1 and
-recent golang/protobuf package. Sadly, the latter has neither tags nor versions.
+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
-You can get protobuf by downloading archive from
-https://github.com/google/protobuf/tree/v2.6.1 and manually building it. As for
-golang compiler, if you have go configured, just
+To generate Golang's protobuf file `cq.pb.go`, you'll need to bootstrap
+infra/infra repository and go utilities `make go-prepare`.
- go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
+ make go
-TODO(tandrii,sergiyb): decide how to pin the go protobuf generator.
+## Notes
-To generate `cq_pb2.py` and `cq.pb.go`:
+1. Please make sure to use proto3-compatible yntax, 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.
- cd commit_queue/cq_client
- protoc cq.proto --python_out $(pwd) --go_out $(pwd)
+2. If after generating Python binding, CQ tests fail with:
-Additionally, please make sure to use proto3-compatible syntax, e.g. no default
-values, no required fields. Ideally, we should use proto3 generator already,
-however alpha version thereof is still unstable.
+ 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](../../bootstrap/README.md) for more
+information. We may end up deprecating Python before all infra's Python code
+can be moved to protobuf v3.
« no previous file with comments | « no previous file | third_party/cq_client/cq.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698