We'd like to send build data to a gRPC endpoint based on Bazel's Build Event Stream. I assume this might be of value to other folks either migrating to build iOS projects with Bazel, or DevX teams supporting multiple build systems and interested in a unified solution.
This implementation is workable as-is for us and we'll be launching the alpha immediately. That said, this lives on our fork, and upstreaming isn't really a blocker for us, but we are happy to contribute it back if there is interest.
Implementation:
Based on the presence of XCMETRICS_BES_* env vars, the server now supports booting into "BES Proxy" mode in which it will send parsed xcactivity logs to the specified BES server instead of persisting to the database; this has limited the surface area of the changes to the addition of a new implementation of the MetricsRepository protocol.
As this PR also contains generated gRPC code, here's a list of the items to look at during review once the links are available.
protodep.toml - handles fetching the various protos used by gen_proto around the internet. This brings a dependency on protodep, which is committed (and that's my first todo here; I guess I need to look at LFS settings maybe)
routes.swift - this is where the conditional swapping of repositories happens based on env config
I believe this is a bit out of scope for XCMetrics at the moment. I don't think we have received many requests around this area, but I'm happy to re-evaluate if the situation changes.
Motivation:
We'd like to send build data to a gRPC endpoint based on Bazel's Build Event Stream. I assume this might be of value to other folks either migrating to build iOS projects with Bazel, or DevX teams supporting multiple build systems and interested in a unified solution.
This implementation is workable as-is for us and we'll be launching the alpha immediately. That said, this lives on our fork, and upstreaming isn't really a blocker for us, but we are happy to contribute it back if there is interest.
Implementation:
Based on the presence of
XCMETRICS_BES_*
env vars, the server now supports booting into "BES Proxy" mode in which it will send parsed xcactivity logs to the specified BES server instead of persisting to the database; this has limited the surface area of the changes to the addition of a new implementation of the MetricsRepository protocol.As this PR also contains generated gRPC code, here's a list of the items to look at during review once the links are available.
Files to review:
gen_proto
around the internet. This brings a dependency on protodep, which is committed (and that's my first todo here; I guess I need to look at LFS settings maybe)