Skip to content

Commit

Permalink
bump to gRPC v1.48.1 for bazel CIs (#1786)
Browse files Browse the repository at this point in the history
  • Loading branch information
esigo authored Nov 23, 2022
1 parent 0dc2268 commit 6ba1f73
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 6 deletions.
16 changes: 13 additions & 3 deletions bazel/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,23 @@ def opentelemetry_cpp_deps():
],
)

maybe(
http_archive,
name = "com_github_grpc_grpc_latest11",
sha256 = "e266aa0d9d9cddb876484a370b94f468248594a96ca0b6f87c21f969db2b8c5b",
strip_prefix = "grpc-1.46.4",
urls = [
"https:/grpc/grpc/archive/v1.46.4.tar.gz",
],
)

maybe(
http_archive,
name = "com_github_grpc_grpc",
sha256 = "b74ce7d26fe187970d1d8e2c06a5d3391122f7bc1fdce569aff5e435fb8fe780",
strip_prefix = "grpc-1.43.2",
sha256 = "320366665d19027cda87b2368c03939006a37e0388bfd1091c8d2a96fbc93bd8",
strip_prefix = "grpc-1.48.1",
urls = [
"https:/grpc/grpc/archive/v1.43.2.tar.gz",
"https:/grpc/grpc/archive/v1.48.1.tar.gz",
],
)

Expand Down
11 changes: 8 additions & 3 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function run_benchmarks

[ -z "${BENCHMARK_DIR}" ] && export BENCHMARK_DIR=$HOME/benchmark
mkdir -p $BENCHMARK_DIR
bazel $BAZEL_STARTUP_OPTIONS build $BAZEL_OPTIONS_ASYNC -c opt -- \
bazel $BAZEL_STARTUP_OPTIONS build --cxxopt=-std=c++14 $BAZEL_OPTIONS_ASYNC -c opt -- \
$(bazel query 'attr("tags", "benchmark_result", ...)')
echo ""
echo "Benchmark results in $BENCHMARK_DIR:"
Expand Down Expand Up @@ -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"

BAZEL_TEST_OPTIONS="$BAZEL_OPTIONS --test_output=errors"

Expand Down Expand Up @@ -298,9 +299,13 @@ elif [[ "$1" == "bazel.valgrind" ]]; then
bazel $BAZEL_STARTUP_OPTIONS build $BAZEL_OPTIONS_ASYNC //...
bazel $BAZEL_STARTUP_OPTIONS test --run_under="/usr/bin/valgrind --leak-check=full --error-exitcode=1 --suppressions=\"${SRC_DIR}/ci/valgrind-suppressions\"" $BAZEL_TEST_OPTIONS_ASYNC //...
exit 0
elif [[ "$1" == "bazel.e2e" ]]; then
cd examples/e2e
bazel $BAZEL_STARTUP_OPTIONS build $BAZEL_OPTIONS_DEFAULT //...
exit 0
elif [[ "$1" == "benchmark" ]]; then
[ -z "${BENCHMARK_DIR}" ] && export BENCHMARK_DIR=$HOME/benchmark
bazel $BAZEL_STARTUP_OPTIONS build $BAZEL_OPTIONS_ASYNC -c opt -- \
bazel $BAZEL_STARTUP_OPTIONS build --cxxopt=-std=c++14 $BAZEL_OPTIONS_ASYNC -c opt -- \
$(bazel query 'attr("tags", "benchmark_result", ...)')
echo ""
echo "Benchmark results in $BENCHMARK_DIR:"
Expand Down
5 changes: 5 additions & 0 deletions exporters/otlp/test/otlp_grpc_exporter_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ BENCHMARK(BM_OtlpExporterDenseSpans);
} // namespace exporter
OPENTELEMETRY_END_NAMESPACE

#ifdef NDEBUG
// disabled as valgrind reports a memroy leak at absl::lts_20220623::random_internal::(anonymous
// namespace)::PoolAlignedAlloc()
// see PR #1737
namespace
{
opentelemetry::exporter::otlp::OtlpGrpcExporterOptions opts;
Expand All @@ -212,5 +216,6 @@ void BM_otlp_grpc_with_collector(benchmark::State &state)
}
BENCHMARK(BM_otlp_grpc_with_collector);
} // namespace
#endif

BENCHMARK_MAIN();
2 changes: 2 additions & 0 deletions exporters/otlp/test/otlp_http_exporter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# include "opentelemetry/sdk/trace/tracer_provider.h"
# include "opentelemetry/trace/provider.h"

# include <google/protobuf/message_lite.h>
# include <gtest/gtest.h>
# include "gmock/gmock.h"

Expand Down Expand Up @@ -466,6 +467,7 @@ TEST_F(OtlpHttpExporterTestPeer, ExportJsonIntegrationTestSync)
TEST_F(OtlpHttpExporterTestPeer, ExportJsonIntegrationTestAsync)
{
ExportJsonIntegrationTestAsync();
google::protobuf::ShutdownProtobufLibrary();
}
# endif

Expand Down
2 changes: 2 additions & 0 deletions exporters/otlp/test/otlp_http_log_record_exporter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
# include "opentelemetry/sdk/logs/logger_provider.h"
# include "opentelemetry/sdk/resource/resource.h"

# include <google/protobuf/message_lite.h>
# include <gtest/gtest.h>
# include "gmock/gmock.h"

Expand Down Expand Up @@ -507,6 +508,7 @@ TEST_F(OtlpHttpLogRecordExporterTestPeer, ExportJsonIntegrationTestSync)
TEST_F(OtlpHttpLogRecordExporterTestPeer, ExportJsonIntegrationTestAsync)
{
ExportJsonIntegrationTestAsync();
google::protobuf::ShutdownProtobufLibrary();
}
# endif

Expand Down
2 changes: 2 additions & 0 deletions exporters/otlp/test/otlp_http_metric_exporter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "opentelemetry/sdk/metrics/instruments.h"
#include "opentelemetry/sdk/resource/resource.h"

#include <google/protobuf/message_lite.h>
#include <gtest/gtest.h>
#include "gmock/gmock.h"

Expand Down Expand Up @@ -845,6 +846,7 @@ TEST_F(OtlpHttpMetricExporterTestPeer, ConfigJsonBytesMappingTest)
opts.json_bytes_mapping = JsonBytesMappingKind::kHex;
std::unique_ptr<OtlpHttpMetricExporter> exporter(new OtlpHttpMetricExporter(opts));
EXPECT_EQ(GetOptions(exporter).json_bytes_mapping, JsonBytesMappingKind::kHex);
google::protobuf::ShutdownProtobufLibrary();
}

#ifndef NO_GETENV
Expand Down

0 comments on commit 6ba1f73

Please sign in to comment.