-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CAS diff command #849
CAS diff command #849
Conversation
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
Example, running it for this PR: #832 (comment) # from the modules dir using synced references
➜ cd ./modules/sync/envoyproxy/envoy
➜ go run ../../../../cmd/diff v1.32.3 v1.33.0 > diff.md
# or from the cas dir using the manifests digests
➜ cd ./modules/sync/envoyproxy/envoy/cas
➜ go run ../../../../cmd/diff a85ebaf16e7fbb65c6c15e0b6f2ca8790e82d27d8952114ebb8c531ca3d8ca48ccef60fc6c13dd6788a3eaa47e03fd1d1aa23e0f7211380db969f1b5b48975cb 0f6f4339ea181ae26dd8156629ac3d40d49740ff4ba2cea29a7c393755902df2a8a5ab4140e97f28c86ca25c08b73d4610bd00d049e6fa2ed176191570b209f1 > diff.md diff.md
Removed:- shake256:0ceaf70cf3fe02577abd4afb4da61ad063f036d32f49d4c399d5c41b1add94c29b2ed39081d35bcb69e2d9e165606064cdd4bd48fe10447b5531b2e02179f1b7 envoy/config/trace/v2/opencensus.proto
- shake256:9686c006be651abd4657dc919d2cb50af9924cd7d19d21d4e817abd33db4035ecde0bfcb646dee74746eb22c9dc58e144addb3bdd7ef2d7ee305f1306190cfb2 envoy/config/trace/v3/opencensus.proto
- shake256:d064376af017a1aba89bb087dfd46cb19876e674a6f2fb0ede123262f15456303ea7ba9076710943463e9b21945c5949487f8ec8a77821bebbf40622298c99ae envoy/service/trace/v2/trace_service.proto
- shake256:62caad4899e648ca1f43060b06e431ccdf0503b357d22be46547bb1483d61b216f5d668072e7ec7c322f279185c411a2485174546eeac731feaedb0ed88093fc envoy/service/trace/v3/trace_service.proto Added:+ shake256:e3fbc3da2acacca933166dc9dabde689f5f20e29f2b7ab43f839c0b29c8bb5bea668ff8536544d06a5a0020b7c537e3789fe9a671b2e217880442891c899d9a3 envoy/extensions/clusters/common/dns/v3/dns.proto
+ shake256:b8474a002d72c2f26c487b3f7ff34c9d28dede1ae5deebca5bca92acdc82e3eb084a31405538e2210f87d882cc4cedc05abe0a337497ff6dc211e65c16dcf02a envoy/extensions/clusters/dns/v3/dns_cluster.proto
+ shake256:3c8077c937c86ff48ab61d081a0dd12a4f34778e79d77bc2bdeeecafcfc6e4bbd032fc63aecfb89e7a7828872ded2dc4efa515b62995683d4dc6d19c2da07e69 envoy/extensions/common/aws/v3/credential_provider.proto
+ shake256:c6d8f7809023346a853aedc7b74dd1f18dbb8be1dfe43cefecbc74b24ef29ee107f4f115a0481b954e41517f9d5c1d12d1a0eb3563bcdd5202b17d56555d8359 envoy/extensions/dynamic_modules/v3/dynamic_modules.proto
+ shake256:3a1640f66dbc67a20600d062e3b0bdeb164df21765beb797dde519f0fa918cbfdb91a93956172fdd866a964a4cc02b5bbaf899fec9d102e681b241c95fe14c41 envoy/extensions/filters/http/api_key_auth/v3/api_key_auth.proto
+ shake256:f0425c1657f5d21bc766ab56612144f466c193c9557a7ef43170b054b8f5f5f04b14d5fae4ec23a2503b68c22c2d7f30d4ab965aecb8472508901d4f277f717b envoy/extensions/filters/http/dynamic_modules/v3/dynamic_modules.proto
+ shake256:8695627774888384867f60a36b2bdd64d260d7dbeb4bde5a9fcaf617c436af794050181efee94998f5966bdceeaee8733c6db03b11af64e4487d1a0f4dd1e476 envoy/extensions/filters/http/grpc_json_reverse_transcoder/v3/transcoder.proto
+ shake256:f7680ea8269c00d0a1c18ee2f3af1e75f8dd2c000c5e8b943910b9d94929ab55ee5d987f52e72a9de04314d7b1067f32b720b754a90f86de61696b264851498e envoy/extensions/quic/connection_debug_visitor/quic_stats/v3/quic_stats.proto
+ shake256:b8aeb0435ab80c4f331ede8ee6367cf5eb25df2219c291e177b1be3dae38269671d7d2c2855e045c88058f0e973fdd447875a154228148abb5f00e94f4c47281 envoy/type/matcher/v3/address.proto Changed content:
|
cmd/diff/main.go
Outdated
sb.WriteString("```diff\n") | ||
sortedPaths := slicesext.MapKeysToSortedSlice(d.removedPaths) | ||
for _, path := range sortedPaths { | ||
sb.WriteString("- " + d.removedPaths[path].String() + "\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to handle any escaping within markdown?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think so, it's just file nodes in this format:
- <digestType>:<digestValue> <path>
Just minor comments but this looks super handy - it will make it much easier for reviewers of updates to managed modules if we include this information somewhere. |
Utility to help diff changes between 2 manifests in CAS directories.