Skip to content

Commit

Permalink
Update to Thrift 0.11.0
Browse files Browse the repository at this point in the history
We need a newer Thrift to support hosts with openssl 1.1. Since Jaeger its
self requires a c++11 compiler and nlohmann-json requires at least g++ 4.9,
supporting newer dependencies makes sense. But Thrift 0.9.2 didn't support
openssl 1.1.

This is some pretty brutal surgery:

- Remove crossdock and zipkin support entirely. The IDL is broken for C++ /
  Thrift generates bad code for it. See
  jaegertracing/jaeger-idl#35,
  https://issues.apache.org/jira/browse/THRIFT-4484
  jaegertracing#45

- Adapt Thrift's namespace-aliasing approach to support Thrift built with
  use of std::smart_ptr or boost::smart_ptr; Thrift switched to std::smart_ptr
  in later versions but retains boost::smart_ptr for BC.

- Regenerate IDL with Thrift 0.11.0 and commit in-tree.

Unsure if Hunter still works; may need to package Thrift 0.11.0

Haven't tested with a Thrift configured with Boost smart pointers. Don't do
that.

The wholesale removal of zipkin and crossdock support means this is unlikely to
be committable to mainline. Hopefully Thrift will fix their codegen. If not,
well, we're probably going to throw Thrift out entirely soon.
  • Loading branch information
ringerc committed Feb 16, 2018
1 parent 203313b commit 26a1b9a
Show file tree
Hide file tree
Showing 67 changed files with 1,327 additions and 5,981 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ cmake_install.cmake
Makefile
/generated
CMakeCache.txt
libjaegertracing.so.*
compile_commands.json

# vim swap files
*.swo
Expand Down
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ hunter_add_package(Boost COMPONENTS regex)
find_package(Boost ${hunter_config} REQUIRED regex)

hunter_add_package(thrift)
find_package(thrift 0.9.2 ${hunter_config} EXACT REQUIRED)
find_package(thrift 0.11.0 ${hunter_config} EXACT REQUIRED)

hunter_add_package(opentracing-cpp)
# Not `${hunter_config}` because OpenTracing provides its own
Expand Down Expand Up @@ -124,4 +124,3 @@ if (BUILD_TESTING)
endif()

add_subdirectory(src/jaegertracing)
add_subdirectory(crossdock)
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ The code can be re-generated with

git submodule init
git submodule update
find idl/thrift/ -type f -name \*.thrift -exec thrift -gen cpp -out src/jaegertracing/thrift-gen {} \;
sed -i '/zipkin/d' idl/thrift/agent.thrift
find idl/thrift/ -type f -name \*.thrift -not -name tracetest.thrift -not -name zipkincore.thrift -exec thrift -gen cpp -out src/jaegertracing/thrift-gen {} \;

but at time of writing (Thrift 0.11.0) the resulting code is invalid due to
https://issues.apache.org/jira/browse/THRIFT-4484
Expand Down
38 changes: 0 additions & 38 deletions crossdock/CMakeLists.txt

This file was deleted.

18 changes: 0 additions & 18 deletions crossdock/Dockerfile

This file was deleted.

Loading

0 comments on commit 26a1b9a

Please sign in to comment.