Skip to content

ci: test system-tests agent_interface_timeout fix for flaky PHP tests#3766

Draft
link04 wants to merge 1 commit intomasterfrom
maximo/flaky-tests-fix
Draft

ci: test system-tests agent_interface_timeout fix for flaky PHP tests#3766
link04 wants to merge 1 commit intomasterfrom
maximo/flaky-tests-fix

Conversation

@link04
Copy link
Copy Markdown
Contributor

@link04 link04 commented Apr 2, 2026

DO NOT MERGE - Test branch

Testing a system-tests fix for consistently failing PHP tests in [tracer-release]:

  • Test_Config_HttpServerErrorStatuses_FeatureFlagCustom::test_status_code_200
  • Test_Config_HttpServerErrorStatuses_FeatureFlagCustom::test_status_code_202
  • Test_Config_UnifiedServiceTagging_CustomService::test_specified_service_name
  • Test_Basic::test_main (IPv6)

Root cause hypothesis

PHP's libdatadog sidecar buffers traces for up to 5s (DEFAULT_FLUSH_INTERVAL_MS=5000) before sending to the agent. The agent then needs ~10s to flush to the backend. The default 5s agent_interface_timeout in system-tests isn't enough for this chain.

Other languages send traces directly (no sidecar), so they don't hit this timing issue.

What this tests

Points system-tests at branch maxim/fix-php-config-tests-use-library-interface which increases agent_interface_timeout from 5s to 15s for TRACING_CONFIG_NONDEFAULT and IPV6 scenarios.

System-tests PR: DataDog/system-tests#6670

How to validate

  1. Trigger [tracer-release] manually from this branch
  2. Check if the 3 TRACING_CONFIG_NONDEFAULT + 1 IPV6 tests pass

Points system-tests clone at branch with increased agent_interface_timeout
for TRACING_CONFIG_NONDEFAULT (5s -> 15s) to account for PHP sidecar's
5s trace buffer + agent flush cycle.

Temporary branch - DO NOT MERGE.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@link04 link04 requested a review from a team as a code owner April 2, 2026 02:45
@link04 link04 marked this pull request as draft April 2, 2026 02:47
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d016182d33

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<?php dockerhub_login() ?>
- /tmp/vault kv get --format=json "kv/k8s/gitlab-runner/dd-trace-php/datadoghq-api-key" 2>/dev/null | python3 -c "import sys,json;print(json.load(sys.stdin)['data']['data']['key'])" > /tmp/.dd-api-key 2>/dev/null || true
- git clone https://github.com/DataDog/system-tests.git
- git clone --branch maxim/fix-php-config-tests-use-library-interface https://github.com/DataDog/system-tests.git
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Revert temporary system-tests branch pin

This change makes CI clone DataDog/system-tests from maxim/fix-php-config-tests-use-library-interface instead of the default stable branch, so merged pipelines will depend on a personal feature branch rather than upstream system-tests. That means routine System Tests runs no longer validate the canonical suite and can fail immediately if the feature branch is renamed, force-pushed, or removed.

Useful? React with 👍 / 👎.

@datadog-datadog-prod-us1-2
Copy link
Copy Markdown

datadog-datadog-prod-us1-2 bot commented Apr 2, 2026

⚠️ Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

🧪 9 Tests failed

❄️ Known flaky: tests.test_config_consistency.Test_Config_HttpServerErrorStatuses_FeatureFlagCustom.test_status_code_200[apache-mod-8.0] from system_tests_suite   View in Datadog   (Fix with Cursor)
AssertionError: Agent received the incorrect amount of chunks
assert 0 == 1
 +  where 0 = len([])

self = <tests.test_config_consistency.Test_Config_HttpServerErrorStatuses_FeatureFlagCustom object at 0x7f7d02ff4c20>

    def test_status_code_200(self):
        assert self.r.status_code == 200
    
        interfaces.library.assert_trace_exists(self.r)
...
❄️ Known flaky: tests.test_config_consistency.Test_Config_HttpServerErrorStatuses_FeatureFlagCustom.test_status_code_202[apache-mod-8.0] from system_tests_suite   View in Datadog   (Fix with Cursor)
AssertionError: Agent received the incorrect amount of chunks
assert 0 == 1
 +  where 0 = len([])

self = <tests.test_config_consistency.Test_Config_HttpServerErrorStatuses_FeatureFlagCustom object at 0x7f7d02ff4ce0>

    def test_status_code_202(self):
        assert self.r.status_code == 202
    
        interfaces.library.assert_trace_exists(self.r)
...
tests.test_config_consistency.Test_Config_ObfuscationQueryStringRegexp_Empty.test_query_string_obfuscation_empty_server[apache-mod-8.0] from system_tests_suite   View in Datadog   (Fix with Cursor)
AssertionError: <utils.dd_types._datadog_library_trace.DataDogLibrarySpanLegacy object at 0x7fc0d38799a0>
assert {}

self = <tests.test_config_consistency.Test_Config_ObfuscationQueryStringRegexp_Empty object at 0x7fc11d435910>

    def test_query_string_obfuscation_empty_server(self):
        spans = [s for _, _, s in interfaces.library.get_spans(request=self.r, full_trace=True)]
        server_span = _get_span_by_tags(spans, tags={"http.url": "http://localhost:7777/?application_key=value"})
>       assert server_span, "\n".join([str(s) for s in spans])
E       AssertionError: <utils.dd_types._datadog_library_trace.DataDogLibrarySpanLegacy object at 0x7fc0d38799a0>
...
View all

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 60.68% (-0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: d016182 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant