Skip to content

Commit

Permalink
better workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
dbolduc committed Nov 17, 2023
1 parent d65ba6e commit b4cff02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
4 changes: 4 additions & 0 deletions ci/cloudbuild/dockerfiles/centos-7.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,13 @@ RUN curl -fsSL https://github.com/google/benchmark/archive/v1.8.3.tar.gz | \
cmake --build cmake-out --target install && \
ldconfig && cd /var/tmp && rm -fr build

# We need to patch opentelemetry-cpp to work around a compiler bug in (at least)
# GCC 7.x. See https://github.com/open-telemetry/opentelemetry-cpp/issues/1014
# for more details.
WORKDIR /var/tmp/build/
RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \
tar -xzf - --strip-components=1 && \
sed -i 's/Stack &GetStack()/Stack \&GetStack() __attribute__((noinline, noclone))/' "api/include/opentelemetry/context/runtime_context.h" && \
cmake \
-DCMAKE_CXX_STANDARD=14 \
-DCMAKE_BUILD_TYPE=Release \
Expand Down
19 changes: 0 additions & 19 deletions google/cloud/internal/grpc_opentelemetry_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

#include "google/cloud/internal/grpc_opentelemetry.h"
#include "google/cloud/internal/compiler_info.h"
#include "google/cloud/internal/make_status.h"
#include "google/cloud/internal/trace_propagator.h"
#include "google/cloud/testing_util/mock_completion_queue_impl.h"
Expand Down Expand Up @@ -211,24 +210,6 @@ TEST(OpenTelemetry, TracedAsyncBackoffDisabled) {
}

TEST(OpenTelemetry, TracedAsyncBackoffPreservesContext) {
if (CompilerId() == "GNU" && CompilerVersion() == "7.3.1") {
// Skip this test because there is a compiler bug in gcc < ???, where active
// spans are not set as the parent of newly created spans.
//
// This problem exists in opentelemetry-cpp. It is outside of any types used
// in our repo. The following test reproduces the bug:
//
// @code
// auto parent = tracer->StartSpan("parent");
// opentelemetry::trace::Scope parent_scope(parent);
// auto child = tracer->StartSpan("child");
// child->End();
// parent->End();
// EXPECT_THAT(parent, IsParentOf(child));
// @endcode
GTEST_SKIP();
}

auto span_catcher = InstallSpanCatcher();
auto parent = MakeSpan("parent");

Expand Down

0 comments on commit b4cff02

Please sign in to comment.