commit | 8a42cac951ad336e232420bc34fa32c02f30db62 | [log] [tgz] |
---|---|---|
author | Allen Li <ayatane@google.com> | Thu Aug 01 23:56:24 2019 |
committer | Allen Li <ayatane@chromium.org> | Mon Aug 05 17:08:14 2019 |
tree | 701ac9eb094845cfd43a7801f706270c71289686 | |
parent | 70efb4eae31dd1f46ece442dfa29a10182992169 [diff] |
Fix Go type error I didn't run the tests/vet because it required entering the chroot, shame on me. Also fixed pre-upload stuff. BUG=None TEST=None Change-Id: Iea11d736a5d11db133f29f03555382dd4d366648 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/skylab_inventory/+/1731304 Reviewed-by: Alex Zamorzaev <zamorzaev@chromium.org> Commit-Queue: Allen Li <ayatane@chromium.org> Tested-by: Allen Li <ayatane@chromium.org>
Inventory schema is stored as protobuf definitions in the proto/ directory. When you update these protobuf definitions, you must also update the generated python libraries for them.
You need the protoc compiler for this. On gLinux:
sudo apt-get install protobuf-compiler go get github.com/golang/protobuf/protoc-gen-go
Then, regenerate the libraries inside the chroot:
cros_sdk (cr) cd ~/trunk/infra/skylab_inventory/protos (cr) protoc --python_out=../venv/skylab_inventory/protos/ *.proto (cr) protoc --go_out=../go/src/chromiumos/infra/skylab/inventory/protos/ *.proto