Skip to content

Commit 4dd559c

Browse files
committed
Use protobuf v34 for macOS Ruby build
1 parent 445145e commit 4dd559c

2 files changed

Lines changed: 4 additions & 13 deletions

File tree

.github/workflows/ruby.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@ jobs:
148148
ARROW_WITH_SNAPPY: ON
149149
ARROW_WITH_ZLIB: ON
150150
ARROW_WITH_ZSTD: ON
151-
Protobuf_SOURCE: BUNDLED
152-
gRPC_SOURCE: BUNDLED
153151
steps:
154152
- name: Checkout Arrow
155153
uses: actions/checkout@v6
@@ -165,16 +163,6 @@ jobs:
165163
brew bundle --file=cpp/Brewfile
166164
brew bundle --file=c_glib/Brewfile
167165
168-
# protobuf@33 workaround: unlink v34 (pulled by grpc) and make
169-
# keg-only protobuf@33 visible to CMake and pkg-config.
170-
# Remove after gRPC problem is fixed.
171-
# See https://github.com/grpc/grpc/issues/41755
172-
brew unlink protobuf
173-
export PROTOBUF_PREFIX="$(brew --prefix protobuf@33)"
174-
echo "PKG_CONFIG_PATH=${PROTOBUF_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}" >> "$GITHUB_ENV"
175-
echo "CMAKE_PREFIX_PATH=${PROTOBUF_PREFIX}:${ARROW_HOME}:${CMAKE_PREFIX_PATH}" >> "$GITHUB_ENV"
176-
echo "${PROTOBUF_PREFIX}/bin" >> "$GITHUB_PATH"
177-
178166
# For Meson.
179167
# See also: https://github.com/mesonbuild/meson/issues/7701
180168
echo "PKG_CONFIG=$(brew --prefix pkgconf)/bin/pkgconf" >> $GITHUB_ENV

cpp/src/arrow/flight/transport/grpc/serialization_internal.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,10 @@ ::grpc::Status FlightDataDeserialize(ByteBuffer* buffer,
353353
// Can't use ParseFromCodedStream as this reads the entire
354354
// rest of the stream into the descriptor command field.
355355
std::string buffer;
356-
pb_stream.ReadString(&buffer, length);
356+
if (!pb_stream.ReadString(&buffer, length)) {
357+
return {::grpc::StatusCode::INTERNAL,
358+
"Unable to read FlightDescriptor from protobuf"};
359+
}
357360
if (!pb_descriptor.ParseFromString(buffer)) {
358361
return {::grpc::StatusCode::INTERNAL, "Unable to parse FlightDescriptor"};
359362
}

0 commit comments

Comments
 (0)