Skip to content

Commit 64edebc

Browse files
committed
Upgrade to protocol buffer release v28.0
1 parent 697e53f commit 64edebc

9 files changed

Lines changed: 24 additions & 33 deletions

File tree

02_mqtt-cluster/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Where in:
3434

3535
1. **Step 1**: Download or install protoc. Refer
3636
* [Installing on Linux/MacOs](https://grpc.io/docs/protoc-installation/)
37-
* [Install pre-compiled version](https://github.com/protocolbuffers/protobuf/releases). This project currently is using version [Protocol Buffers v27.3](https://github.com/protocolbuffers/protobuf/releases/tag/v27.3)
37+
* [Install pre-compiled version](https://github.com/protocolbuffers/protobuf/releases). This project currently is using version [Protocol Buffers v28.0](https://github.com/protocolbuffers/protobuf/releases/tag/v28.0)
3838
and downloaded the pre-compiled versions for linux-x86_64 and win64. For other platforms please replace with the appropriate runtime or compile the runtime directly
3939
1. **Step 2**: Copy the [SparkPlugB protocol buffer specification](https://github.com/eclipse/tahu/tree/master/sparkplug_b/sparkplug_b.proto) from [Eclipse Tahu project](https://github.com/eclipse/tahu/tree/master/sparkplug_b) to the folder [./sparkplug_b](./sparkplug_b/)
4040
1. **Step 3**: Compile the SparkplugB protocol buffer into python class by the following command
@@ -235,11 +235,11 @@ poetry run pytest test/
235235

236236
1. The protoc executable for [Linux](./protobuf/bin/protoc) is for x86_64 architecture and will need execute rights to be able to run and compile the [sparkplug_b.proto](./sparkplug_b/sparkplug_b.proto) specification.
237237
The protoc executable for [Windows](./protobuf/bin/protoc.exe) is for a 64 bit processor.
238-
For other architectures please download the appropriate pre compiled version of [Protobuf release v27.3](https://github.com/protocolbuffers/protobuf/releases/tag/v27.3) e.g.
239-
* [protoc-27.3-linux-aarch_64.zip](https://github.com/protocolbuffers/protobuf/releases/download/v27.3/protoc-27.3-linux-aarch_64.zip)
240-
* [protoc-27.3-linux-ppcle_64.zip](https://github.com/protocolbuffers/protobuf/releases/download/v27.3/protoc-27.3-linux-ppcle_64.zip)
241-
* [protoc-27.3-linux-x86_32.zip](https://github.com/protocolbuffers/protobuf/releases/download/v27.3/protoc-27.3-linux-x86_32.zip)
242-
* [protoc-27.3-win32.zip](https://github.com/protocolbuffers/protobuf/releases/download/v27.3/protoc-27.3-win32.zip)
238+
For other architectures please download the appropriate pre compiled version of [Protobuf release v28.0](https://github.com/protocolbuffers/protobuf/releases/tag/v28.0) e.g.
239+
* [protoc-28.0-linux-aarch_64.zip](https://github.com/protocolbuffers/protobuf/releases/download/v28.0/protoc-28.0-linux-aarch_64.zip)
240+
* [protoc-28.0-linux-ppcle_64.zip](https://github.com/protocolbuffers/protobuf/releases/download/v28.0/protoc-28.0-linux-ppcle_64.zip)
241+
* [protoc-28.0-linux-x86_32.zip](https://github.com/protocolbuffers/protobuf/releases/download/v28.0/protoc-28.0-linux-x86_32.zip)
242+
* [protoc-28.0-win32.zip](https://github.com/protocolbuffers/protobuf/releases/download/v28.0/protoc-28.0-win32.zip)
243243

244244
1. Need to understand how to handle metric types DataSet, Template
245245

1.93 KB
Binary file not shown.
-338 KB
Binary file not shown.
-485 KB
Binary file not shown.

02_mqtt-cluster/protobuf/include/google/protobuf/cpp_features.proto

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ message CppFeatures {
2424
retention = RETENTION_RUNTIME,
2525
targets = TARGET_TYPE_FIELD,
2626
targets = TARGET_TYPE_FILE,
27-
// TODO Enable this in google3 once protoc rolls out.
2827
feature_support = {
2928
edition_introduced: EDITION_2023,
3029
edition_deprecated: EDITION_2023,
@@ -33,7 +32,7 @@ message CppFeatures {
3332
"edition 2025. Mark enum type on the enum "
3433
"definitions themselves rather than on fields.",
3534
},
36-
edition_defaults = { edition: EDITION_PROTO2, value: "true" },
35+
edition_defaults = { edition: EDITION_LEGACY, value: "true" },
3736
edition_defaults = { edition: EDITION_PROTO3, value: "false" }
3837
];
3938

@@ -48,11 +47,10 @@ message CppFeatures {
4847
retention = RETENTION_RUNTIME,
4948
targets = TARGET_TYPE_FIELD,
5049
targets = TARGET_TYPE_FILE,
51-
// TODO Enable this in google3 once protoc rolls out.
5250
feature_support = {
5351
edition_introduced: EDITION_2023,
5452
},
55-
edition_defaults = { edition: EDITION_PROTO2, value: "STRING" },
53+
edition_defaults = { edition: EDITION_LEGACY, value: "STRING" },
5654
edition_defaults = { edition: EDITION_2024, value: "VIEW" }
5755
];
5856
}

02_mqtt-cluster/protobuf/include/google/protobuf/descriptor.proto

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -635,13 +635,14 @@ message MessageOptions {
635635
}
636636

637637
message FieldOptions {
638+
// NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.
638639
// The ctype option instructs the C++ code generator to use a different
639640
// representation of the field than it normally would. See the specific
640641
// options below. This option is only implemented to support use of
641642
// [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
642-
// type "bytes" in the open source release -- sorry, we'll try to include
643-
// other types in a future version!
644-
optional CType ctype = 1 [default = STRING];
643+
// type "bytes" in the open source release.
644+
// TODO: make ctype actually deprecated.
645+
optional CType ctype = 1 [/*deprecated = true,*/ default = STRING];
645646
enum CType {
646647
// Default mode.
647648
STRING = 0;
@@ -974,11 +975,10 @@ message FeatureSet {
974975
retention = RETENTION_RUNTIME,
975976
targets = TARGET_TYPE_FIELD,
976977
targets = TARGET_TYPE_FILE,
977-
// TODO Enable this in google3 once protoc rolls out.
978978
feature_support = {
979979
edition_introduced: EDITION_2023,
980980
},
981-
edition_defaults = { edition: EDITION_PROTO2, value: "EXPLICIT" },
981+
edition_defaults = { edition: EDITION_LEGACY, value: "EXPLICIT" },
982982
edition_defaults = { edition: EDITION_PROTO3, value: "IMPLICIT" },
983983
edition_defaults = { edition: EDITION_2023, value: "EXPLICIT" }
984984
];
@@ -992,11 +992,10 @@ message FeatureSet {
992992
retention = RETENTION_RUNTIME,
993993
targets = TARGET_TYPE_ENUM,
994994
targets = TARGET_TYPE_FILE,
995-
// TODO Enable this in google3 once protoc rolls out.
996995
feature_support = {
997996
edition_introduced: EDITION_2023,
998997
},
999-
edition_defaults = { edition: EDITION_PROTO2, value: "CLOSED" },
998+
edition_defaults = { edition: EDITION_LEGACY, value: "CLOSED" },
1000999
edition_defaults = { edition: EDITION_PROTO3, value: "OPEN" }
10011000
];
10021001

@@ -1009,11 +1008,10 @@ message FeatureSet {
10091008
retention = RETENTION_RUNTIME,
10101009
targets = TARGET_TYPE_FIELD,
10111010
targets = TARGET_TYPE_FILE,
1012-
// TODO Enable this in google3 once protoc rolls out.
10131011
feature_support = {
10141012
edition_introduced: EDITION_2023,
10151013
},
1016-
edition_defaults = { edition: EDITION_PROTO2, value: "EXPANDED" },
1014+
edition_defaults = { edition: EDITION_LEGACY, value: "EXPANDED" },
10171015
edition_defaults = { edition: EDITION_PROTO3, value: "PACKED" }
10181016
];
10191017

@@ -1027,11 +1025,10 @@ message FeatureSet {
10271025
retention = RETENTION_RUNTIME,
10281026
targets = TARGET_TYPE_FIELD,
10291027
targets = TARGET_TYPE_FILE,
1030-
// TODO Enable this in google3 once protoc rolls out.
10311028
feature_support = {
10321029
edition_introduced: EDITION_2023,
10331030
},
1034-
edition_defaults = { edition: EDITION_PROTO2, value: "NONE" },
1031+
edition_defaults = { edition: EDITION_LEGACY, value: "NONE" },
10351032
edition_defaults = { edition: EDITION_PROTO3, value: "VERIFY" }
10361033
];
10371034

@@ -1044,11 +1041,10 @@ message FeatureSet {
10441041
retention = RETENTION_RUNTIME,
10451042
targets = TARGET_TYPE_FIELD,
10461043
targets = TARGET_TYPE_FILE,
1047-
// TODO Enable this in google3 once protoc rolls out.
10481044
feature_support = {
10491045
edition_introduced: EDITION_2023,
10501046
},
1051-
edition_defaults = { edition: EDITION_PROTO2, value: "LENGTH_PREFIXED" }
1047+
edition_defaults = { edition: EDITION_LEGACY, value: "LENGTH_PREFIXED" }
10521048
];
10531049

10541050
enum JsonFormat {
@@ -1061,11 +1057,10 @@ message FeatureSet {
10611057
targets = TARGET_TYPE_MESSAGE,
10621058
targets = TARGET_TYPE_ENUM,
10631059
targets = TARGET_TYPE_FILE,
1064-
// TODO Enable this in google3 once protoc rolls out.
10651060
feature_support = {
10661061
edition_introduced: EDITION_2023,
10671062
},
1068-
edition_defaults = { edition: EDITION_PROTO2, value: "LEGACY_BEST_EFFORT" },
1063+
edition_defaults = { edition: EDITION_LEGACY, value: "LEGACY_BEST_EFFORT" },
10691064
edition_defaults = { edition: EDITION_PROTO3, value: "ALLOW" }
10701065
];
10711066

02_mqtt-cluster/protobuf/include/google/protobuf/java_features.proto

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ message JavaFeatures {
2727
retention = RETENTION_RUNTIME,
2828
targets = TARGET_TYPE_FIELD,
2929
targets = TARGET_TYPE_FILE,
30-
// TODO Enable this in google3 once protoc rolls out.
3130
feature_support = {
3231
edition_introduced: EDITION_2023,
3332
edition_deprecated: EDITION_2023,
@@ -36,7 +35,7 @@ message JavaFeatures {
3635
"edition 2025. Mark enum type on the enum "
3736
"definitions themselves rather than on fields.",
3837
},
39-
edition_defaults = { edition: EDITION_PROTO2, value: "true" },
38+
edition_defaults = { edition: EDITION_LEGACY, value: "true" },
4039
edition_defaults = { edition: EDITION_PROTO3, value: "false" }
4140
];
4241

@@ -56,7 +55,6 @@ message JavaFeatures {
5655
retention = RETENTION_RUNTIME,
5756
targets = TARGET_TYPE_FIELD,
5857
targets = TARGET_TYPE_FILE,
59-
// TODO Enable this in google3 once protoc rolls out.
6058
feature_support = {
6159
edition_introduced: EDITION_2023,
6260
edition_deprecated: EDITION_2024,
@@ -66,6 +64,6 @@ message JavaFeatures {
6664
"use the global cross-language utf8_validation "
6765
"feature.",
6866
},
69-
edition_defaults = { edition: EDITION_PROTO2, value: "DEFAULT" }
67+
edition_defaults = { edition: EDITION_LEGACY, value: "DEFAULT" }
7068
];
7169
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v27.3
1+
v28.0

02_mqtt-cluster/src/uns_sparkplugb/generated/sparkplug_b_pb2.py

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

0 commit comments

Comments
 (0)