From bbf21390c40c877fe6f064a53520b5015607ceec Mon Sep 17 00:00:00 2001 From: Bryce Mecum Date: Wed, 22 Apr 2026 19:10:31 -0700 Subject: [PATCH 01/13] Update deploy_development_cookbooks.yml --- .github/workflows/deploy_development_cookbooks.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/deploy_development_cookbooks.yml b/.github/workflows/deploy_development_cookbooks.yml index e34a35e3..6471d95d 100644 --- a/.github/workflows/deploy_development_cookbooks.yml +++ b/.github/workflows/deploy_development_cookbooks.yml @@ -2,6 +2,9 @@ on: push: branches: - main + pull_request: + branches: + - main name: Deploy development Cookbooks @@ -80,6 +83,7 @@ jobs: name: deploy runs-on: ubuntu-latest needs: [make_dev_cookbooks, make_dev_cpp] + if: github.event_name == 'push' steps: - name: Checkout repo uses: actions/checkout@v5 From 75b12470dfd3c1b49c97dedfface7a7f0e65cba7 Mon Sep 17 00:00:00 2001 From: Bryce Mecum Date: Wed, 22 Apr 2026 19:13:32 -0700 Subject: [PATCH 02/13] minor fixes --- cpp/code/CMakeLists.txt | 4 +++- cpp/dev.yml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cpp/code/CMakeLists.txt b/cpp/code/CMakeLists.txt index 7c9890fe..c915ad87 100644 --- a/cpp/code/CMakeLists.txt +++ b/cpp/code/CMakeLists.txt @@ -126,7 +126,9 @@ recipe(flight) # Add protobuf to flight find_package(Threads) -find_package(gRPC CONFIG REQUIRED) +if(NOT TARGET gRPC::grpc) + find_package(gRPC CONFIG REQUIRED) +endif() set(PROTO_FILES protos/helloworld.proto diff --git a/cpp/dev.yml b/cpp/dev.yml index 90eda6eb..f0908260 100644 --- a/cpp/dev.yml +++ b/cpp/dev.yml @@ -27,6 +27,7 @@ dependencies: - gmock - clang-tools - zlib + - openssl - grpc-cpp - protobuf - abseil-cpp From 2f4f104157b62407ae700ec8d6aa14d3724be995 Mon Sep 17 00:00:00 2001 From: Bryce Mecum Date: Wed, 22 Apr 2026 19:16:16 -0700 Subject: [PATCH 03/13] Update CMakeLists.txt --- cpp/code/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpp/code/CMakeLists.txt b/cpp/code/CMakeLists.txt index c915ad87..d3ad59b4 100644 --- a/cpp/code/CMakeLists.txt +++ b/cpp/code/CMakeLists.txt @@ -140,9 +140,8 @@ target_link_libraries(flight gRPC::grpc++ ) target_include_directories(flight PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) -get_target_property(grpc_cpp_plugin_location gRPC::grpc_cpp_plugin LOCATION) protobuf_generate(TARGET flight LANGUAGE cpp PROTOS ${PROTO_FILES}) protobuf_generate(TARGET flight LANGUAGE grpc GENERATE_EXTENSIONS .grpc.pb.h .grpc.pb.cc - PLUGIN "protoc-gen-grpc=${grpc_cpp_plugin_location}" + PLUGIN "protoc-gen-grpc=$" PROTOS ${PROTO_FILES}) From 6741af1eb507d8a780f23c6c75de9a1b6b2036d7 Mon Sep 17 00:00:00 2001 From: Bryce Mecum Date: Wed, 22 Apr 2026 19:20:14 -0700 Subject: [PATCH 04/13] Fix thrift issue --- cpp/code/CMakeLists.txt | 1 + cpp/dev.yml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/code/CMakeLists.txt b/cpp/code/CMakeLists.txt index d3ad59b4..c5cf6c15 100644 --- a/cpp/code/CMakeLists.txt +++ b/cpp/code/CMakeLists.txt @@ -32,6 +32,7 @@ if(DEFINED ENV{ARROW_NIGHTLY}) set(ARROW_SIMD_LEVEL NONE) # macOS-specific workaround set(ARROW_WITH_SNAPPY ON) + set(ARROW_THRIFT_SOURCE "BUNDLED") set(ARROW_ACERO ON) set(ARROW_COMPUTE ON) diff --git a/cpp/dev.yml b/cpp/dev.yml index f0908260..3f271f2d 100644 --- a/cpp/dev.yml +++ b/cpp/dev.yml @@ -33,6 +33,5 @@ dependencies: - abseil-cpp - c-ares - re2 - - thrift-cpp - rapidjson - snappy From 6226ed69703174f90ee6e0750038c5c99939bd32 Mon Sep 17 00:00:00 2001 From: Bryce Mecum Date: Wed, 22 Apr 2026 19:23:05 -0700 Subject: [PATCH 05/13] Update CMakeLists.txt --- cpp/code/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpp/code/CMakeLists.txt b/cpp/code/CMakeLists.txt index c5cf6c15..92723e13 100644 --- a/cpp/code/CMakeLists.txt +++ b/cpp/code/CMakeLists.txt @@ -42,6 +42,8 @@ if(DEFINED ENV{ARROW_NIGHTLY}) set(ARROW_IPC ON) set(ARROW_PARQUET ON) + find_package(OpenSSL REQUIRED) + include(FetchContent) FetchContent_Declare(Arrow From f706bf66bd19b1e4e28bd3c0d352c4d38e0d5a8f Mon Sep 17 00:00:00 2001 From: Bryce Mecum Date: Wed, 22 Apr 2026 20:36:46 -0700 Subject: [PATCH 06/13] use bundled protobuf/grpc --- cpp/code/CMakeLists.txt | 2 ++ cpp/dev.yml | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cpp/code/CMakeLists.txt b/cpp/code/CMakeLists.txt index 92723e13..d3eaf4c1 100644 --- a/cpp/code/CMakeLists.txt +++ b/cpp/code/CMakeLists.txt @@ -33,6 +33,8 @@ if(DEFINED ENV{ARROW_NIGHTLY}) set(ARROW_WITH_SNAPPY ON) set(ARROW_THRIFT_SOURCE "BUNDLED") + set(ARROW_PROTOBUF_SOURCE "BUNDLED") + set(ARROW_GRPC_SOURCE "BUNDLED") set(ARROW_ACERO ON) set(ARROW_COMPUTE ON) diff --git a/cpp/dev.yml b/cpp/dev.yml index 3f271f2d..6d9ebc81 100644 --- a/cpp/dev.yml +++ b/cpp/dev.yml @@ -28,10 +28,5 @@ dependencies: - clang-tools - zlib - openssl - - grpc-cpp - - protobuf - - abseil-cpp - - c-ares - - re2 - rapidjson - snappy From 9931924c843e066fe412f3106ab2f9d447beeec0 Mon Sep 17 00:00:00 2001 From: Bryce Mecum Date: Wed, 22 Apr 2026 21:38:04 -0700 Subject: [PATCH 07/13] Update CMakeLists.txt --- cpp/code/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpp/code/CMakeLists.txt b/cpp/code/CMakeLists.txt index d3eaf4c1..50684622 100644 --- a/cpp/code/CMakeLists.txt +++ b/cpp/code/CMakeLists.txt @@ -46,6 +46,11 @@ if(DEFINED ENV{ARROW_NIGHTLY}) find_package(OpenSSL REQUIRED) + # Prevent re2 from registering its test targets with CTest. + # re2 uses its own variable instead of BUILD_TESTING. + # TODO: fix upstream in Arrow's bundled dependency handling. + set(RE2_BUILD_TESTING OFF CACHE BOOL "" FORCE) + include(FetchContent) FetchContent_Declare(Arrow From cac0f169fa605367ef0d8e896e77cf6b792f8a80 Mon Sep 17 00:00:00 2001 From: Bryce Mecum Date: Thu, 23 Apr 2026 09:08:19 -0700 Subject: [PATCH 08/13] Fix segfault at shutdown --- cpp/code/flight.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cpp/code/flight.cc b/cpp/code/flight.cc index 038f43e7..2814475e 100644 --- a/cpp/code/flight.cc +++ b/cpp/code/flight.cc @@ -392,6 +392,12 @@ arrow::Status TestCustomGrpcImpl() { rout << response.reply(); EndRecipe("CustomGrpcImpl::CreateClient"); + + StartRecipe("CustomGrpcImpl::StopServer"); + ARROW_RETURN_NOT_OK(server->Shutdown()); + rout << "Server shut down successfully" << std::endl; + EndRecipe("CustomGrpcImpl::StopServer"); + return arrow::Status::OK(); } From a688e8c3426bcab2702eb903b655e61163e1c541 Mon Sep 17 00:00:00 2001 From: Bryce Mecum Date: Fri, 24 Apr 2026 17:31:31 -0700 Subject: [PATCH 09/13] Fix the crash, I think --- cpp/code/CMakeLists.txt | 10 +++++++++- cpp/code/flight.cc | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cpp/code/CMakeLists.txt b/cpp/code/CMakeLists.txt index 50684622..0bcab9c9 100644 --- a/cpp/code/CMakeLists.txt +++ b/cpp/code/CMakeLists.txt @@ -35,6 +35,7 @@ if(DEFINED ENV{ARROW_NIGHTLY}) set(ARROW_THRIFT_SOURCE "BUNDLED") set(ARROW_PROTOBUF_SOURCE "BUNDLED") set(ARROW_GRPC_SOURCE "BUNDLED") + set(ARROW_BUILD_STATIC ON) set(ARROW_ACERO ON) set(ARROW_COMPUTE ON) @@ -103,12 +104,19 @@ function(RECIPE TARGET) common.cc main.cc ) - if(TARGET Arrow::arrow_shared) + if(TARGET Arrow::arrow_shared AND (NOT DEFINED ARROW_GRPC_USE_SHARED OR ARROW_GRPC_USE_SHARED)) target_link_libraries( ${TARGET} ArrowDataset::arrow_dataset_shared ArrowFlight::arrow_flight_shared GTest::gtest ) + elseif(TARGET arrow_flight_static) + # gRPC is statically bundled inside Arrow. Link against the static Arrow libs + # so there is only one copy of gRPC in the binary (avoids duplicate TLS slots). + target_link_libraries(parquet_static INTERFACE arrow_static) + target_link_libraries(arrow_dataset_static INTERFACE parquet_static) + target_link_libraries(arrow_flight_static INTERFACE arrow_static) + target_link_libraries(${TARGET} arrow_dataset_static arrow_flight_static GTest::gtest) else() target_link_libraries(parquet_shared INTERFACE arrow_shared) target_link_libraries(arrow_dataset_shared INTERFACE parquet_shared) diff --git a/cpp/code/flight.cc b/cpp/code/flight.cc index 2814475e..24daa701 100644 --- a/cpp/code/flight.cc +++ b/cpp/code/flight.cc @@ -395,6 +395,7 @@ arrow::Status TestCustomGrpcImpl() { StartRecipe("CustomGrpcImpl::StopServer"); ARROW_RETURN_NOT_OK(server->Shutdown()); + ARROW_RETURN_NOT_OK(server->Wait()); rout << "Server shut down successfully" << std::endl; EndRecipe("CustomGrpcImpl::StopServer"); From 929bb0a06de8863a0ae6c00c520fa601c0815e72 Mon Sep 17 00:00:00 2001 From: Bryce Mecum Date: Fri, 24 Apr 2026 18:20:18 -0700 Subject: [PATCH 10/13] rework cmakelists --- cpp/code/CMakeLists.txt | 79 ++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 44 deletions(-) diff --git a/cpp/code/CMakeLists.txt b/cpp/code/CMakeLists.txt index 0bcab9c9..053283a4 100644 --- a/cpp/code/CMakeLists.txt +++ b/cpp/code/CMakeLists.txt @@ -19,17 +19,16 @@ cmake_minimum_required(VERSION 3.19) project(arrow-cookbook) set(CMAKE_CXX_STANDARD 20) -if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++") endif() -# Add Arrow and other required packages if(DEFINED ENV{ARROW_NIGHTLY}) set(CMAKE_BUILD_TYPE Debug) set(ARROW_BUILD_SHARED True) set(ARROW_DEPENDENCY_SOURCE "AUTO") set(ARROW_ENABLE_THREADING ON) - set(ARROW_SIMD_LEVEL NONE) # macOS-specific workaround + set(ARROW_SIMD_LEVEL NONE) # macOS-specific workaround set(ARROW_WITH_SNAPPY ON) set(ARROW_THRIFT_SOURCE "BUNDLED") @@ -87,53 +86,53 @@ else() find_package(Parquet REQUIRED) endif() -if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(CMAKE_CXX_CLANG_TIDY "clang-tidy") endif() -# Create test targets enable_testing() find_package(GTest REQUIRED) include(GoogleTest) +# Resolve which Arrow targets to link against and wire up their dependency +# chains once here, before any recipe() calls. +if(TARGET Arrow::arrow_shared AND (NOT DEFINED ARROW_GRPC_USE_SHARED OR ARROW_GRPC_USE_SHARED)) + set(ARROW_RECIPE_LIBS + ArrowDataset::arrow_dataset_shared + ArrowFlight::arrow_flight_shared) +elseif(TARGET arrow_flight_static) + # gRPC is statically bundled inside Arrow. Link against the static Arrow libs + # so there is only one copy of gRPC in the binary (avoids duplicate TLS slots). + target_link_libraries(parquet_static INTERFACE arrow_static) + target_link_libraries(arrow_dataset_static INTERFACE parquet_static) + target_link_libraries(arrow_flight_static INTERFACE arrow_static) + set(ARROW_RECIPE_LIBS arrow_dataset_static arrow_flight_static) +else() + target_link_libraries(parquet_shared INTERFACE arrow_shared) + target_link_libraries(arrow_dataset_shared INTERFACE parquet_shared) + target_link_libraries(arrow_flight_shared INTERFACE arrow_shared) + set(ARROW_RECIPE_LIBS arrow_dataset_shared arrow_flight_shared) +endif() + function(RECIPE TARGET) add_executable( - ${TARGET} - ${TARGET}.cc - common.cc - main.cc + ${TARGET} + ${TARGET}.cc + common.cc + main.cc ) - if(TARGET Arrow::arrow_shared AND (NOT DEFINED ARROW_GRPC_USE_SHARED OR ARROW_GRPC_USE_SHARED)) - target_link_libraries( - ${TARGET} - ArrowDataset::arrow_dataset_shared - ArrowFlight::arrow_flight_shared GTest::gtest - ) - elseif(TARGET arrow_flight_static) - # gRPC is statically bundled inside Arrow. Link against the static Arrow libs - # so there is only one copy of gRPC in the binary (avoids duplicate TLS slots). - target_link_libraries(parquet_static INTERFACE arrow_static) - target_link_libraries(arrow_dataset_static INTERFACE parquet_static) - target_link_libraries(arrow_flight_static INTERFACE arrow_static) - target_link_libraries(${TARGET} arrow_dataset_static arrow_flight_static GTest::gtest) - else() - target_link_libraries(parquet_shared INTERFACE arrow_shared) - target_link_libraries(arrow_dataset_shared INTERFACE parquet_shared) - target_link_libraries(arrow_flight_shared INTERFACE arrow_shared) - target_link_libraries(${TARGET} arrow_dataset_shared arrow_flight_shared GTest::gtest) - endif() - if (MSVC) + target_link_libraries(${TARGET} ${ARROW_RECIPE_LIBS} GTest::gtest) + if(MSVC) target_compile_options(${TARGET} PRIVATE /W4 /WX) - else () + else() target_compile_options(${TARGET} PRIVATE -Wall -Wextra -Wpedantic -Werror) - # _Nullable/_Nonnull nullability annotations in absl macros trigger - # -Wnullability-extension under -Wpedantic; this is Clang-only. if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + # _Nullable/_Nonnull nullability annotations in absl macros trigger + # -Wnullability-extension under -Wpedantic. target_compile_options(${TARGET} PRIVATE -Wno-nullability-extension) endif() - endif () - + endif() gtest_discover_tests(${TARGET}) endfunction() @@ -142,21 +141,13 @@ recipe(creating_arrow_objects) recipe(datasets) recipe(flight) -# Add protobuf to flight -find_package(Threads) if(NOT TARGET gRPC::grpc) find_package(gRPC CONFIG REQUIRED) endif() -set(PROTO_FILES - protos/helloworld.proto -) +set(PROTO_FILES protos/helloworld.proto) -target_link_libraries(flight - protobuf::libprotobuf - gRPC::grpc - gRPC::grpc++ -) +target_link_libraries(flight protobuf::libprotobuf gRPC::grpc gRPC::grpc++) target_include_directories(flight PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) protobuf_generate(TARGET flight LANGUAGE cpp PROTOS ${PROTO_FILES}) protobuf_generate(TARGET flight LANGUAGE grpc From 435264986130e3e9ce52f084a31a322d66113e17 Mon Sep 17 00:00:00 2001 From: Bryce Mecum Date: Fri, 24 Apr 2026 18:23:30 -0700 Subject: [PATCH 11/13] remove simd workaround --- cpp/code/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/cpp/code/CMakeLists.txt b/cpp/code/CMakeLists.txt index 053283a4..632e6044 100644 --- a/cpp/code/CMakeLists.txt +++ b/cpp/code/CMakeLists.txt @@ -28,7 +28,6 @@ if(DEFINED ENV{ARROW_NIGHTLY}) set(ARROW_BUILD_SHARED True) set(ARROW_DEPENDENCY_SOURCE "AUTO") set(ARROW_ENABLE_THREADING ON) - set(ARROW_SIMD_LEVEL NONE) # macOS-specific workaround set(ARROW_WITH_SNAPPY ON) set(ARROW_THRIFT_SOURCE "BUNDLED") From f09c3e6283607ac752ee7349aedea6f5be993b6e Mon Sep 17 00:00:00 2001 From: Bryce Mecum Date: Fri, 24 Apr 2026 18:26:12 -0700 Subject: [PATCH 12/13] clean up comment --- cpp/code/CMakeLists.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cpp/code/CMakeLists.txt b/cpp/code/CMakeLists.txt index 632e6044..cb7259f3 100644 --- a/cpp/code/CMakeLists.txt +++ b/cpp/code/CMakeLists.txt @@ -71,11 +71,8 @@ if(DEFINED ENV{ARROW_NIGHTLY}) arrow_shared SYSTEM INTERFACE "$" ) - # Force FetchContent Arrow headers to the front of every target's include - # list so they take priority over any system Arrow headers added transitively - # (e.g. /opt/homebrew/include from GTest::gtest). Without this the recipe - # executables compile against the older installed Arrow headers but link - # against the FetchContent Arrow runtime, causing ABI mismatches. + # Help make sure the FetchContent build headers go in front if the system has + # stable Arrow DLLs installed too include_directories(BEFORE SYSTEM "${arrow_SOURCE_DIR}/cpp/src") else() From 2db51154ded98260b298242bb559836248a87dac Mon Sep 17 00:00:00 2001 From: Bryce Mecum Date: Fri, 24 Apr 2026 19:29:11 -0700 Subject: [PATCH 13/13] add pyarrow nightly --- cpp/dev.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpp/dev.yml b/cpp/dev.yml index 6d9ebc81..e96158ef 100644 --- a/cpp/dev.yml +++ b/cpp/dev.yml @@ -19,6 +19,10 @@ channels: - conda-forge dependencies: - python=3.10 + - pip + - pip: + - --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple + - pyarrow - compilers - cmake - ninja