Skip to content

Commit

Permalink
Fix CI test run failures for dotnet and cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharycmontoya committed Jan 17, 2025
1 parent db05b40 commit 689b1d7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifests/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ tests/:
test_distributed.py:
Test_DistributedHttp: missing_feature
Test_Span_Links_Flags_From_Conflicting_Contexts: missing_feature (implementation specs have not been determined)
Test_Span_Links_From_Conflicting_Contexts: v3.9.0
Test_Span_Links_From_Conflicting_Contexts: missing_feature (implementation specs have not been determined)
Test_Span_Links_Omit_Tracestate_From_Conflicting_Contexts: missing_feature (implementation specs have not been determined)
test_identify.py:
Test_Basic: v2.7.0
Expand Down
10 changes: 9 additions & 1 deletion tests/test_library_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2021 Datadog, Inc.

from utils import weblog, interfaces, scenarios, features
from utils import weblog, interfaces, scenarios, features, missing_feature
from utils._context.header_tag_vars import *
from utils import remote_config as rc
import json
Expand Down Expand Up @@ -305,6 +305,7 @@ def setup_single_tracecontext(self):
},
)

@missing_feature(library="cpp", reason="baggage is not implemented, also remove DD_TRACE_PROPAGATION_STYLE_EXTRACT workaround in containers.py")
def test_single_tracecontext(self):
interfaces.library.assert_trace_exists(self.r)
spans = interfaces.agent.get_spans_list(self.r)
Expand Down Expand Up @@ -339,6 +340,7 @@ def setup_multiple_tracecontexts(self):
},
)

@missing_feature(library="cpp", reason="baggage is not implemented, also remove DD_TRACE_PROPAGATION_STYLE_EXTRACT workaround in containers.py")
def test_multiple_tracecontexts(self):
interfaces.library.assert_trace_exists(self.r)
spans = interfaces.agent.get_spans_list(self.r)
Expand Down Expand Up @@ -388,6 +390,7 @@ def setup_single_tracecontext(self):
},
)

@missing_feature(library="cpp", reason="baggage is not implemented, also remove DD_TRACE_PROPAGATION_STYLE_EXTRACT workaround in containers.py")
def test_single_tracecontext(self):
interfaces.library.assert_trace_exists(self.r)
spans = interfaces.agent.get_spans_list(self.r)
Expand Down Expand Up @@ -434,6 +437,7 @@ def setup_multiple_tracecontexts(self):
},
)

@missing_feature(library="cpp", reason="baggage is not implemented, also remove DD_TRACE_PROPAGATION_STYLE_EXTRACT workaround in containers.py")
def test_multiple_tracecontexts(self):
interfaces.library.assert_trace_exists(self.r)
spans = interfaces.agent.get_spans_list(self.r)
Expand Down Expand Up @@ -489,6 +493,7 @@ def setup_single_tracecontext(self):
},
)

@missing_feature(library="cpp", reason="baggage is not implemented, also remove DD_TRACE_PROPAGATION_STYLE_EXTRACT workaround in containers.py")
def test_single_tracecontext(self):
interfaces.library.assert_trace_exists(self.r)
spans = interfaces.agent.get_spans_list(self.r)
Expand Down Expand Up @@ -523,6 +528,7 @@ def setup_multiple_tracecontexts(self):
},
)

@missing_feature(library="cpp", reason="baggage is not implemented, also remove DD_TRACE_PROPAGATION_STYLE_EXTRACT workaround in containers.py")
def test_multiple_tracecontexts(self):
interfaces.library.assert_trace_exists(self.r)
spans = interfaces.agent.get_spans_list(self.r)
Expand Down Expand Up @@ -566,6 +572,7 @@ def setup_single_tracecontext(self):
},
)

@missing_feature(library="cpp", reason="baggage is not implemented, also remove DD_TRACE_PROPAGATION_STYLE_EXTRACT workaround in containers.py")
def test_single_tracecontext(self):
interfaces.library.assert_trace_exists(self.r)
spans = interfaces.agent.get_spans_list(self.r)
Expand Down Expand Up @@ -612,6 +619,7 @@ def setup_multiple_tracecontexts(self):
},
)

@missing_feature(library="cpp", reason="baggage is not implemented, also remove DD_TRACE_PROPAGATION_STYLE_EXTRACT workaround in containers.py")
def test_multiple_tracecontexts(self):
interfaces.library.assert_trace_exists(self.r)
spans = interfaces.agent.get_spans_list(self.r)
Expand Down
9 changes: 9 additions & 0 deletions utils/_context/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,15 @@ def configure(self, replay):

self.appsec_rules_file = (self.image.env | self.environment).get("DD_APPSEC_RULES", None)

# Workaround: We may want to define baggage in our list of propagators, but the cpp library
# has strict checks on tracer startup that will fail to launch the application
# when it encounters unfamiliar configurations. Override the configuration that the cpp
# weblog container sees so we can still run tests
if library == "cpp":
extract_config = self.environment.get("DD_TRACE_PROPAGATION_STYLE_EXTRACT")
if extract_config and "baggage" in extract_config:
self.environment["DD_TRACE_PROPAGATION_STYLE_EXTRACT"] = extract_config.replace("baggage", "").strip(",")

if library == "nodejs":
try:
with open("./binaries/nodejs-load-from-local", encoding="utf-8") as f:
Expand Down

0 comments on commit 689b1d7

Please sign in to comment.