Skip to content

Commit

Permalink
[java] Report bugs info to JIRA (#3546)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeauchesne authored Nov 25, 2024
1 parent bffb2b1 commit ee5d104
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 38 deletions.
18 changes: 0 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,6 @@ allow_no_feature_nodes = [
]

allow_no_jira_ticket_for_bugs = [
"tests/apm_tracing_e2e/test_otel.py::Test_Otel_Span.test_datadog_otel_span",
"tests/appsec/iast/source/test_body.py::TestRequestBody.test_source_reported",
"tests/appsec/iast/source/test_parameter_value.py::TestParameterValue.test_source_post_reported",
"tests/appsec/test_blocking_addresses.py::Test_Blocking_request_method.test_blocking_before",
"tests/appsec/test_rate_limiter.py::Test_Main.test_main",
"tests/appsec/test_traces.py::Test_AppSecEventSpanTags.test_header_collection",
"tests/appsec/test_user_blocking_full_denylist.py::Test_UserBlocking_FullDenylist.test_blocking_test",
"tests/appsec/waf/test_rules.py::Test_SQLI.test_sqli3",
"tests/auto_inject/test_auto_inject_install.py::TestContainerAutoInjectInstallScript.test_install",
"tests/auto_inject/test_auto_inject_install.py::TestInstallerAutoInjectManual.test_install_uninstall",
"tests/auto_inject/test_auto_inject_install.py::TestSimpleInstallerAutoInjectManual.test_install",
"tests/integrations/test_db_integrations_sql.py::Test_Postgres.test_db_type",
"tests/integrations/test_dbm.py::Test_Dbm.test_trace_payload_service",
"tests/integrations/test_open_telemetry.py::_BaseOtelDbIntegrationTestClass.test_db_operation",
Expand All @@ -66,8 +55,6 @@ allow_no_jira_ticket_for_bugs = [
"tests/k8s_lib_injection/test_k8s_init_image_validator.py::TestK8sInitImageValidator.test_valid_weblog_instrumented",
"tests/k8s_lib_injection/test_k8s_init_image_validator.py::TestK8sInitImageValidatorUnsupported.test_invalid_weblog_not_instrumented",

"tests/parametric/test_headers_precedence.py::Test_Headers_Precedence.test_headers_precedence_propagationstyle_default_tracecontext_datadog",
"tests/parametric/test_headers_precedence.py::Test_Headers_Precedence.test_headers_precedence_propagationstyle_tracecontext_last_extract_first_true_correctly_propagates_tracestate",
"tests/parametric/test_headers_tracestate_dd.py::Test_Headers_Tracestate_DD.test_headers_tracestate_dd_evicts_32_or_greater_list_members",
"tests/parametric/test_headers_tracestate_dd.py::Test_Headers_Tracestate_DD.test_headers_tracestate_dd_keeps_32_or_fewer_list_members",
"tests/parametric/test_otel_span_methods.py::Test_Otel_Span_Methods.test_otel_span_started_with_link_from_other_spans",
Expand All @@ -83,15 +70,10 @@ allow_no_jira_ticket_for_bugs = [
"tests/test_semantic_conventions.py::Test_Meta.test_meta_component_tag",
"tests/test_semantic_conventions.py::Test_Meta.test_meta_http_url",
"tests/test_semantic_conventions.py::Test_Meta.test_meta_language_tag",
"tests/test_semantic_conventions.py::Test_Meta.test_meta_runtime_id_tag",
"tests/test_semantic_conventions.py::Test_Meta.test_meta_span_kind",
"tests/test_standard_tags.py::Test_StandardTagsClientIp.test_client_ip",
"tests/test_standard_tags.py::Test_StandardTagsClientIp.test_client_ip_vendor",
"tests/test_standard_tags.py::Test_StandardTagsMethod.test_method_trace",
"tests/test_telemetry.py::Test_Telemetry.test_proxy_forwarding",
"tests/test_telemetry.py::Test_MessageBatch.test_message_batch_enabled",
"tests/test_telemetry.py::Test_Telemetry.test_app_dependencies_loaded",
"tests/test_telemetry.py::Test_Telemetry.test_app_heartbeats_delays",
"tests/test_telemetry.py::Test_Telemetry.test_app_started_is_first_message",
"tests/test_telemetry.py::Test_Telemetry.test_status_ok",
"tests/test_telemetry.py::Test_Telemetry.test_telemetry_proxy_enrichment",
Expand Down
2 changes: 1 addition & 1 deletion tests/apm_tracing_e2e/test_otel.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def setup_datadog_otel_span(self):
# - tags necessary to retain the mapping between the system-tests/weblog request id and the traces/spans
# - duration of one second
# - span kind of SpanKind - Internal
@bug(context.library == "java", reason="Span.kind is not set to internal, have type instead")
@bug(context.library == "java", reason="APMAPI-912")
@flaky(library="golang", reason="APMAPI-178")
def test_datadog_otel_span(self):
spans = interfaces.agent.get_spans_list(self.req)
Expand Down
2 changes: 1 addition & 1 deletion tests/appsec/iast/source/test_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TestRequestBody(BaseSourceTest):
source_names = None
source_value = None

@bug(weblog_variant="jersey-grizzly2", reason="Not reported")
@bug(weblog_variant="jersey-grizzly2", reason="APPSEC-56007")
def test_source_reported(self):
super().test_source_reported()

Expand Down
2 changes: 1 addition & 1 deletion tests/appsec/iast/source/test_parameter_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TestParameterValue(BaseSourceTest):
reason="Flask and Django need a header; otherwise, they return a 415 status code."
"TODO: When FastAPI implements POST body source, verify if it does too.",
)
@flaky(context.weblog_variant == "resteasy-netty3", reason="Issue with weak references, needs investigation")
@flaky(context.weblog_variant == "resteasy-netty3", reason="APPSEC-56007")
def test_source_post_reported(self):
self.validate_request_reported(self.requests["POST"])

Expand Down
2 changes: 1 addition & 1 deletion tests/appsec/test_blocking_addresses.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def setup_blocking_before(self):
self.set_req1 = weblog.request("GET", path="/tag_value/clean_value_3876/200")
self.block_req2 = weblog.request("OPTIONS", path="/tag_value/tainted_value_6512/200")

@flaky(context.library < "[email protected]")
@flaky(context.library < "[email protected]", reason="APMRP-360")
def test_blocking_before(self):
"""Test that blocked requests are blocked before being processed"""
# first request should not block and must set the tag in span accordingly
Expand Down
5 changes: 2 additions & 3 deletions tests/appsec/test_rate_limiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ def setup_main(self):
logger.debug(f"Sent 50 requests in {(datetime.datetime.now() - start_time).total_seconds()} s")

@bug(
context.library > "[email protected]" and context.library < "[email protected]",
reason="_sampling_priority_v1 is missing",
)
context.library > "[email protected]" and context.library < "[email protected]", reason="APMRP-360"
) # _sampling_priority_v1 is missing
def test_main(self):
"""send requests for 10 seconds, check that only 10-ish traces are sent, as rate limiter is set to 1/s"""

Expand Down
2 changes: 1 addition & 1 deletion tests/appsec/test_traces.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def test_custom_span_tags(self):
def setup_header_collection(self):
self.r = weblog.get("/headers", headers={"User-Agent": "Arachni/v1", "Content-Type": "text/plain"})

@bug(context.library < f"python@{PYTHON_RELEASE_GA_1_1}", reason="a PR was not included in the release")
@bug(context.library < f"python@{PYTHON_RELEASE_GA_1_1}", reason="APMRP-360")
@bug(context.library < "[email protected]", weblog_variant="spring-boot-openliberty", reason="APPSEC-6734")
@irrelevant(context.library not in ["golang", "nodejs", "java", "dotnet"], reason="test")
def test_header_collection(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/appsec/test_user_blocking_full_denylist.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def setup_blocking_test(self):
@bug(
context.library >= "[email protected]" and context.library < "[email protected]", reason="APMRP-360",
)
@bug(library="java", reason="Request blocked but appsec.blocked tag not set")
@bug(library="java", reason="APPSEC-56006")
def test_blocking_test(self):
"""Test with a denylisted user"""

Expand Down
5 changes: 2 additions & 3 deletions tests/parametric/test_headers_precedence.py
Original file line number Diff line number Diff line change
Expand Up @@ -925,9 +925,8 @@ def test_headers_precedence_propagationstyle_tracecontext_last_extract_first_fal
@missing_feature(context.library == "cpp", reason="DD_TRACE_PROPAGATION_EXTRACT_FIRST is not yet implemented")
@missing_feature(context.library == "php", reason="DD_TRACE_PROPAGATION_EXTRACT_FIRST is not yet implemented")
@bug(
context.library < "[email protected]",
reason="Legacy behaviour: tracecontext propagator would always take precedence",
)
context.library < "[email protected]", reason="APMRP-360"
) # Legacy behaviour: tracecontext propagator would always take precedence
def test_headers_precedence_propagationstyle_tracecontext_last_extract_first_true_correctly_propagates_tracestate(
self, test_agent, test_library
):
Expand Down
11 changes: 5 additions & 6 deletions tests/test_standard_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def setup_method_trace(self):
self.trace_request = weblog.trace("/waf", data=None)

@irrelevant(library="php", reason="Trace method does not reach php-land")
@bug(weblog_variant="spring-boot-payara", reason="This weblog variant is currently not accepting TRACE")
@missing_feature(weblog_variant="spring-boot-payara", reason="This weblog variant is currently not accepting TRACE")
def test_method_trace(self):
interfaces.library.add_span_tag_validation(request=self.trace_request, tags={"http.method": "TRACE"})

Expand Down Expand Up @@ -270,9 +270,8 @@ def setup_client_ip(self):
self._setup_with_attack()

@bug(
context.library < "[email protected]",
reason="X-Client-Ip not supported, see https://github.com/DataDog/dd-trace-java/pull/4878",
)
context.library < "[email protected]", reason="APMRP-360"
) # X-Client-Ip not supported, see https://github.com/DataDog/dd-trace-java/pull/4878
def test_client_ip(self):
"""Test http.client_ip is always reported in the default scenario which has ASM enabled"""
meta = self._get_root_span_meta(self.request_with_attack)
Expand All @@ -286,8 +285,8 @@ def setup_client_ip_vendor(self):

@bug(context.library < "[email protected]", reason="APMRP-360")
@bug(
context.library < "[email protected]", reason="not supported, see https://github.com/DataDog/dd-trace-java/pull/4878"
)
context.library < "[email protected]", reason="APMRP-360"
) # not supported, see https://github.com/DataDog/dd-trace-java/pull/4878
def test_client_ip_vendor(self):
"""Test http.client_ip is always reported in the default scenario which has ASM enabled when using vendor headers"""
self._test_client_ip(self.FORWARD_HEADERS_VENDOR)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def test_app_started_is_first_message(self):
), "app-started is not the first message by seq_id"

@bug(weblog_variant="spring-boot-openliberty", reason="APPSEC-6583")
@bug(weblog_variant="spring-boot-wildfly", reason="Jira missing")
@bug(weblog_variant="spring-boot-wildfly", reason="APPSEC-6583")
@bug(context.agent_version > "7.53.0", reason="Jira missing")
def test_proxy_forwarding(self):
"""Test that all telemetry requests sent by library are forwarded correctly by the agent"""
Expand Down Expand Up @@ -369,7 +369,7 @@ def setup_app_dependencies_loaded(self):
@irrelevant(library="golang")
@irrelevant(library="python")
@missing_feature(context.library < "[email protected]", reason="Telemetry V2 is not implemented yet")
@bug(
@irrelevant(
library="java",
reason="""
A Java application can be redeployed to the same server for many times (for the same JVM process).
Expand Down

0 comments on commit ee5d104

Please sign in to comment.