Skip to content

BuildStream and BuildGrid clash over use of protobuf

Summary

Import statements in BuildStream (in the juerg/googlecas branch) and in BuildGrid (in master) use the Google protobuf Python library incompatible ways. Both will work individually, but my research so far suggests that both may need to be modified to work correctly with each other and any other Python application which uses protobuf. Since it's expected to be a common situation to use the BuildStream artifact cache and BuildGrid remote execution server on the same machine, this is currently delaying development.

Steps to reproduce

Install BuildStream and BuildGrid on the same machine using the instructions given in the README.rst for both projects. I don't believe the order is important.

Attempt a normal build of freedesktop-sdk bootstrap bst build bootstrap and try listing current executable jobs in BuildGrid with bgd execute list.

Observed on BuildStream rev. 8c82f22f and BuildGrid rev. 811e7cef961b43f634c1f94d0ef8486e895d8360

What is the current bug behavior?

BuildGrid refuses to accept any commands, for example saying execute is not a valid command when executing bgd execute list. This is because it's catching an ImportError; the underlying error is:

  File "/home/jimmacarthur/bs/buildgrid/buildgrid/server/build_grid_server.py", line 30, in <module>
    from google.devtools.remoteworkers.v1test2 import bots_pb2_grpc
ModuleNotFoundError: No module named 'google.devtools.remoteworkers'

What is the expected correct behavior?

BuildGrid server and BuildStream's artifact cache should coexist on the same machine and work correctly.

Relevant logs and/or screenshots

See attachment protobuf-import-log.

Other relevant information

This is a known bug in protobuf:

https://github.com/google/protobuf/issues/1296

https://github.com/google/protobuf/issues/1296#issuecomment-192750438 suggests a possible fix.

protobuf-import-bug


Edited by Jim MacArthur
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information