ci: Add API protobuf breaking-change-detector CI script (#17793)
This PR is a continuation to #17515 - it adds a script that uses buf to check for breaking changes on proto files in the api folder. It does so by comparing the current api folder against the api folder at the git commit computed by tools/git/last_github_commit.sh - that should hopefully represent the most recent commit on main (if there is a better method to obtain the base branch commit, let me know!). Adding the script also required re-organizing some of the breaking change detector logic from the previous pr: some levels of abstraction were added, and the detector now expects a git repository and ref as the input for initial state (rather than a proto file). The script is invoked in do_ci.sh if bazel.api_compat is specified as the CI_TARGET. This PR also bumps the buf bazel dependency to 0.53.0. If this is preferred to be in a separate PR, let me know and I would be happy to do so Risk Level: low (hopefully) - the CI script will be invoked in a separate CI pipeline job that can be set to be optional on github. The azure pipeline has been added but needs to be set to optional by a CI maintainer Testing: New scripts and logic were tested manually; also ran tests from the previous PR and they still pass. hoping to observe more output of this tool through reading CI logs of other PRs once this is merged (this PR should not affect the existing PR workflow - refer to Risk Level) Docs Changes: n/a Release Notes: n/a Platform Specific Features: CI script uses a linux binary for buf so it cannot be run outside of docker on non-linux systems Fixes #3368 Signed-off-by: Yaseen Alkhafaji <yaseena@google.com> Mirrored from https://github.com/envoyproxy/envoy @ f30c289e456df11d549d7236c56f22da00500e9epull/624/head
parent
77872e2bb4
commit
af40d8639f
4 changed files with 82 additions and 3 deletions
@ -0,0 +1,52 @@ |
|||||||
|
# Generated by buf. DO NOT EDIT. |
||||||
|
version: v1 |
||||||
|
deps: |
||||||
|
- remote: buf.build |
||||||
|
owner: beta |
||||||
|
repository: opencensus |
||||||
|
branch: main |
||||||
|
commit: 5f5f8259293649d68707d2e5b6285748 |
||||||
|
digest: b1-myYwcdM0Xu05qIwhiy4eWEcARYUuZZ1vTbYvrrHu1mU= |
||||||
|
create_time: 2021-03-03T20:50:42.079743Z |
||||||
|
- remote: buf.build |
||||||
|
owner: beta |
||||||
|
repository: opentelemetry |
||||||
|
branch: main |
||||||
|
commit: 549da630ffe24b53be3983fcee3bb346 |
||||||
|
digest: b1-HVAvWKH61BF6TdZSbHRhrD2SUuC0V7uAlZgCRimGPLI= |
||||||
|
create_time: 2021-08-09T14:24:57.923964Z |
||||||
|
- remote: buf.build |
||||||
|
owner: beta |
||||||
|
repository: prometheus |
||||||
|
branch: main |
||||||
|
commit: a91b42d18a994cd4b07b37f365f87cf9 |
||||||
|
digest: b1-uKmv58fyoNwJI855qg7UEagfdyUl6XNPsFAdDoi57f4= |
||||||
|
create_time: 2021-06-23T20:16:58.410272Z |
||||||
|
- remote: buf.build |
||||||
|
owner: beta |
||||||
|
repository: protoc-gen-validate |
||||||
|
branch: main |
||||||
|
commit: 82388a0a0cb04e98a203f95dfed5e84b |
||||||
|
digest: b1-lYgUMN58PxyCwvfQoopp40AJ-oHHjWXAzksF7v9U-U4= |
||||||
|
create_time: 2021-06-21T22:00:30.152545Z |
||||||
|
- remote: buf.build |
||||||
|
owner: beta |
||||||
|
repository: xds |
||||||
|
branch: main |
||||||
|
commit: 45f850b92541434cbde4aece01bc7d53 |
||||||
|
digest: b1-QZUL5DC6-nVgMMlajH_hlImwghg5HjRsqlEAOl0dZgI= |
||||||
|
create_time: 2021-08-09T14:37:06.872899Z |
||||||
|
- remote: buf.build |
||||||
|
owner: gogo |
||||||
|
repository: protobuf |
||||||
|
branch: main |
||||||
|
commit: 4df00b267f944190a229ce3695781e99 |
||||||
|
digest: b1-sjLgsg7CzrkOrIjBDh3s-l0aMjE6oqTj85-OsoopKAw= |
||||||
|
create_time: 2021-08-10T00:14:28.345069Z |
||||||
|
- remote: buf.build |
||||||
|
owner: googleapis |
||||||
|
repository: googleapis |
||||||
|
branch: main |
||||||
|
commit: d1a849b8f8304950832335723096e954 |
||||||
|
digest: b1-zJkwX0YeOp1Wa0Jaj_RqMLa2-oEzePH6PJEK8aaMeI4= |
||||||
|
create_time: 2021-08-26T15:07:19.652533Z |
@ -0,0 +1,19 @@ |
|||||||
|
version: v1beta1 |
||||||
|
deps: |
||||||
|
- buf.build/googleapis/googleapis |
||||||
|
- buf.build/beta/opencensus |
||||||
|
- buf.build/beta/prometheus |
||||||
|
- buf.build/beta/opentelemetry |
||||||
|
- buf.build/gogo/protobuf |
||||||
|
- buf.build/beta/xds |
||||||
|
breaking: |
||||||
|
ignore_unstable_packages: true |
||||||
|
use: |
||||||
|
- FIELD_SAME_ONEOF |
||||||
|
- FIELD_SAME_JSON_NAME |
||||||
|
- FIELD_SAME_NAME |
||||||
|
- FIELD_SAME_TYPE |
||||||
|
- FIELD_SAME_LABEL |
||||||
|
- FILE_SAME_PACKAGE |
||||||
|
- FIELD_NO_DELETE_UNLESS_NUMBER_RESERVED |
||||||
|
- FIELD_NO_DELETE_UNLESS_NAME_RESERVED |
Loading…
Reference in new issue