Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump to gRPC v1.48.1 for bazel CIs #1786

Merged
merged 6 commits into from
Nov 23, 2022
Merged

Conversation

esigo
Copy link
Member

@esigo esigo commented Nov 19, 2022

#1634 (issue) step 1/2

Changes

This PR bumps gRPC to v1.48.1 for bazel CIs. It also adds the latest gRPC with C++11 support, so that in a separate PR we can hava e2e C++11 test:

"https://github.com/esigo/opentelemetry-cpp/archive/grpc_e2e.zip",

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@esigo esigo marked this pull request as ready for review November 19, 2022 18:13
@esigo esigo requested a review from a team November 19, 2022 18:13
@codecov
Copy link

codecov bot commented Nov 19, 2022

Codecov Report

Merging #1786 (238fe46) into main (0dc2268) will increase coverage by 0.04%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1786      +/-   ##
==========================================
+ Coverage   85.73%   85.77%   +0.04%     
==========================================
  Files         171      171              
  Lines        5240     5240              
==========================================
+ Hits         4492     4494       +2     
+ Misses        748      746       -2     
Impacted Files Coverage Δ
sdk/src/trace/batch_span_processor.cc 90.63% <0.00%> (-0.78%) ⬇️
ext/src/http/client/curl/http_client_curl.cc 81.44% <0.00%> (+1.14%) ⬆️

@esigo esigo mentioned this pull request Nov 19, 2022
3 tasks
strip_prefix = "abseil-cpp-20211102.0",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/abseil/abseil-cpp/archive/20211102.0.tar.gz",
"https://github.com/abseil/abseil-cpp/archive/20211102.0.tar.gz",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repository.bzl is already using:
strip_prefix = "abseil-cpp-20220623.1",

Per the abseil release notes:
https://github.com/abseil/abseil-cpp/releases/tag/20220623.1
this is the latest abseil version using C++11.

Why do we need to use an older version ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest gRPC can not work with a old abseil-cpp , I think we can use a old gRPC and abseil-cpp with legacy toolchain and the latest version with modern toolchain.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, grpc-1.46.4 is the last gRPC release supporting C++11, which is dependent on abseil-cpp-20211102.0.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gRPC 1.46.4 is the last with C++11 support which has dependency on abseil-cpp-20211102.0. But it seems it works with the latest abseil as well:
https://github.com/open-telemetry/opentelemetry-cpp/actions/runs/3516378955/jobs/5892867609

I'm going to remove it.

@@ -59,7 +59,8 @@ mkdir -p "${BUILD_DIR}"
[ -z "${PLUGIN_DIR}" ] && export PLUGIN_DIR=$HOME/plugin
mkdir -p "${PLUGIN_DIR}"

BAZEL_OPTIONS="--copt=-DENABLE_LOGS_PREVIEW --copt=-DENABLE_TEST --copt=-DENABLE_METRICS_EXEMPLAR_PREVIEW"
BAZEL_OPTIONS_DEFAULT="--copt=-DENABLE_LOGS_PREVIEW --copt=-DENABLE_TEST --copt=-DENABLE_METRICS_EXEMPLAR_PREVIEW"
BAZEL_OPTIONS="--cxxopt=-std=c++14 $BAZEL_OPTIONS_DEFAULT"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand the PR description correctly, we will add the CI test for gRPC-1.46.4 ( i.e building with C++11) in separate PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes #1787, gRPC with C++11 needed to be defined in the main branch first.

Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@esigo esigo enabled auto-merge (squash) November 22, 2022 17:23
@@ -466,6 +467,7 @@ TEST_F(OtlpHttpExporterTestPeer, ExportJsonIntegrationTestSync)
TEST_F(OtlpHttpExporterTestPeer, ExportJsonIntegrationTestAsync)
{
ExportJsonIntegrationTestAsync();
google::protobuf::ShutdownProtobufLibrary();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is protobuf library loaded explicitly?

Copy link
Member Author

@esigo esigo Nov 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call is needed to delete any global objects that were allocated by the Protocol Buffer: https://developers.google.com/protocol-buffers/docs/cpptutorial

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sharing the doc. It looks optional in the doc. Also wondering whether live global objects should be considered as leak.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it is optional, here we need it to prevent the leak report though.
Live global objects should not be considered as leak.

@esigo esigo merged commit 6ba1f73 into open-telemetry:main Nov 23, 2022
yxue pushed a commit to yxue/opentelemetry-cpp that referenced this pull request Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants