upsync: Don't crash when starting with no existing lab

BUG=None
TEST=upsync, from non-existent dir, and from existing dir.

Change-Id: I35d0a94ed696d62e8560c1713e625e172cd545a0
Reviewed-on: https://chromium-review.googlesource.com/1200157
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
1 file changed
tree: 93c2348593000dba74bb07cb2c5cca765834267d
  1. bin/
  2. go/
  3. protos/
  4. venv/
  5. .gitignore
  6. COMMIT-QUEUE.ini
  7. PRESUBMIT.cfg
  8. README.md
README.md

Skylab inventory

Updating inventory schema

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 (must be done outside chroot):

cd protos
protoc --python_out=../venv/skylab_inventory/protos/ *.proto
protoc --go_out=../go/src/chromiumos/infra/skylab/inventory/protos/ *.proto