Skip to content

Commit c380060

Browse files
authored
Upgrade protobuf (#4359)
* Upgrade protobuf * Regenerate bbs protobuf files * regenerate logcache and loggregator protobuf files * regenerate locket protobuf files * Use protoc 30.2 in bump_bbs_protos action * Update/create readme for generating protobuf files for logcache, loggregator and locket
1 parent d807632 commit c380060

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+611
-1183
lines changed

.github/workflows/bump_bbs_protos.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,22 @@ jobs:
2626

2727
- name: Install protoc
2828
run: |
29-
wget -q -O /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip
30-
sudo unzip -q /tmp/protoc.zip -d /usr/local
29+
wget -q -O /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v30.2/protoc-30.2-linux-x86_64.zip
30+
unzip -q /tmp/protoc.zip -d /tmp/protoc
3131
rm /tmp/protoc.zip
32-
wget -q -O /tmp/protobuf.zip https://github.com/protocolbuffers/protobuf/archive/v3.6.1.zip
33-
unzip -q /tmp/protobuf.zip -d /tmp
34-
sudo cp -r /tmp/protobuf-3.6.1/src/google /usr/local/include/
32+
33+
sudo mv /tmp/protoc/bin/protoc /usr/local/bin/protoc
34+
sudo cp -r /tmp/protoc/include/google /usr/local/include/
3535
sudo chmod -R 755 /usr/local/include/google
36-
rm -rf /tmp/protobuf.zip /tmp/protobuf-3.6.1
36+
rm -rf /tmp/protoc
3737
export PATH=$PATH:/usr/local/bin
3838
39-
- name: Clone gogo/protobuf
40-
run: |
41-
PROTO_SRC=$(mktemp -d)
42-
git clone https://github.com/gogo/protobuf.git "$PROTO_SRC/github.com/gogo/protobuf"
43-
echo "PROTO_SRC=$PROTO_SRC" >> $GITHUB_ENV
44-
4539
- name: Generate Ruby files from protos
4640
run: |
4741
RUBY_OUT=$(mktemp -d)
4842
pushd bbs > /dev/null
49-
sed -i'' -e 's/package models/package diego.bbs.models/' models/*.proto
50-
protoc --proto_path="$PROTO_SRC":models --ruby_out="$RUBY_OUT" models/*.proto
43+
sed -i'' -E '/import.*gogoproto/d; /option.*gogoproto/d; s/\(gogoproto.*, //g; s/, \(gogoproto[^]]+//g; s/\[\(gogoproto[^]]*\]//g; s/package models/package diego.bbs.models/' models/*.proto
44+
protoc --proto_path=models --ruby_out="$RUBY_OUT" models/*.proto
5145
popd > /dev/null
5246
cp -r "$RUBY_OUT/." cloud_controller_ng/lib/diego/bbs/models
5347

.rubocop_cc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ AllCops:
2121
- errors/**/*
2222
- lib/diego/bbs/models/**/*
2323
- lib/locket/**/*
24-
- lib/logcache/v2/**/*
24+
- lib/loggregator-api/**/*
25+
- lib/logcache/*_pb.rb
2526
- vendor/bundle/**/*
2627
Layout/DotPosition:
2728
EnforcedStyle: trailing

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ gem 'concurrent-ruby'
88
gem 'digest-xxhash'
99
gem 'eventmachine', '~> 1.2.7'
1010
gem 'fluent-logger'
11-
gem 'googleapis-common-protos', '>= 1.3.12'
11+
gem 'googleapis-common-protos', '>= 1.8.0'
1212
gem 'hashdiff'
1313
gem 'honeycomb-beeline'
1414
gem 'httpclient'

Gemfile.lock

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -224,28 +224,34 @@ GEM
224224
google-apis-core (>= 0.11.0, < 2.a)
225225
google-cloud-env (1.6.0)
226226
faraday (>= 0.17.3, < 3.0)
227-
google-protobuf (3.25.6)
228-
google-protobuf (3.25.6-x86_64-darwin)
229-
google-protobuf (3.25.6-x86_64-linux)
230-
googleapis-common-protos (1.7.0)
227+
google-protobuf (4.30.2)
228+
bigdecimal
229+
rake (>= 13)
230+
google-protobuf (4.30.2-x86_64-darwin)
231+
bigdecimal
232+
rake (>= 13)
233+
google-protobuf (4.30.2-x86_64-linux)
234+
bigdecimal
235+
rake (>= 13)
236+
googleapis-common-protos (1.8.0)
231237
google-protobuf (>= 3.18, < 5.a)
232-
googleapis-common-protos-types (~> 1.7)
238+
googleapis-common-protos-types (~> 1.20)
233239
grpc (~> 1.41)
234-
googleapis-common-protos-types (1.19.0)
240+
googleapis-common-protos-types (1.20.0)
235241
google-protobuf (>= 3.18, < 5.a)
236242
googleauth (1.8.1)
237243
faraday (>= 0.17.3, < 3.a)
238244
jwt (>= 1.4, < 3.0)
239245
multi_json (~> 1.11)
240246
os (>= 0.9, < 2.0)
241247
signet (>= 0.16, < 2.a)
242-
grpc (1.71.0)
248+
grpc (1.72.0)
243249
google-protobuf (>= 3.25, < 5.0)
244250
googleapis-common-protos-types (~> 1.0)
245-
grpc (1.71.0-x86_64-darwin)
251+
grpc (1.72.0-x86_64-darwin)
246252
google-protobuf (>= 3.25, < 5.0)
247253
googleapis-common-protos-types (~> 1.0)
248-
grpc (1.71.0-x86_64-linux)
254+
grpc (1.72.0-x86_64-linux)
249255
google-protobuf (>= 3.25, < 5.0)
250256
googleapis-common-protos-types (~> 1.0)
251257
hashdiff (1.1.2)
@@ -632,7 +638,7 @@ DEPENDENCIES
632638
fog-google (~> 1.24.1)
633639
fog-local
634640
fog-openstack
635-
googleapis-common-protos (>= 1.3.12)
641+
googleapis-common-protos (>= 1.8.0)
636642
hashdiff
637643
honeycomb-beeline
638644
httpclient

lib/diego/bbs/models/actions_pb.rb

Lines changed: 18 additions & 89 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)