Call CreateLogStream when assigning leases and send names to clients
Description
This MR adds a way to configure a scheduler to talk to a LogStream service. It also adds functionality to the scheduler so that if a LogStream service is provided, the scheduler will create a stream for a job when assigning a lease.
The created stream details are stored in the data store, and the read-only resource name is communicated back to clients receiving operation messages for the job. Clients can then theoretically use this name to stream logs from the relevant ByteStream service (in practice this will only work once communication of the stream name to the workers is also implemented).
The MR also adds a LogStream server into the docker-compose setup and configures the Bots interface there to use it, to allow for easy verification that the functionality is working.
Validation
The functionality of this MR can be observed using the docker-compose setup and the test execution client. In the repository root, run
docker-compose up -d
tox -e venv -- bgd execute --remote-cas=http://localhost:50052 command buildgrid ls
The final response should contain a metadata field, and the value of the field should look similar to
\010\004\022E\n@d0bcff42d7a82ace79be28becabd14951187df2421df70bd0e2ab527257cf29c\020\217\001\032\213\001d0bcff42d7a82ace79be28becabd14951187df2421df70bd0e2ab527257cf29c_143_1594224970.759507/logStreams/test-d7a7709b-e596-4af9-bd57-792d6331b8b5
This is a packed ExecuteOperationMetadata
message containing a stream resource name.
Issues addressed
Closes #300 (closed)