Skip to content

Conversation

@leoromanovsky
Copy link
Contributor

Motivation

Enable Feature Flagging and Experimentation (FFE) system tests for PHP, companion to DataDog/dd-trace-php#3630.

Changes

  • utils/build/docker/php/parametric/server.php: Added POST /ffe/start and POST /ffe/evaluate endpoints to the PHP parametric test server
  • utils/build/docker/php/common/ffe.php: Added POST /ffe endpoint for end-to-end tests (Apache weblog)
  • manifests/php.yml: Removed missing_feature for tests/ffe/test_dynamic_evaluation.py, tests/ffe/test_exposures.py, and tests/parametric/test_ffe/test_dynamic_evaluation.py

Decisions

  • PHP endpoints use DDTrace\FeatureFlags\Provider from dd-trace-php for flag evaluation
  • Exposure events are flushed immediately after evaluation in the weblog endpoint for test observability
  • Parametric server uses the same Amphp router pattern as existing endpoints

- Add /ffe/start and /ffe/evaluate to PHP parametric server
- Add /ffe.php for end-to-end tests
- Remove missing_feature for PHP FFE tests in manifest
@leoromanovsky leoromanovsky force-pushed the feature/ff-scan-worktree branch from f75549f to 2db71e0 Compare February 11, 2026 13:48
@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

CODEOWNERS have been resolved as:

utils/build/docker/php/common/ffe.php                                   @DataDog/apm-php @DataDog/system-tests-core
manifests/php.yml                                                       @DataDog/apm-php @DataDog/asm-php
utils/build/docker/php/apache-mod/php.conf                              @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/parametric/composer.json                         @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/parametric/server.php                            @DataDog/apm-php @DataDog/system-tests-core

@datadog-official
Copy link

datadog-official bot commented Feb 11, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

🧪 270 Tests failed

tests.ffe.test_dynamic_evaluation.Test_FFE_RC_Down_From_Start.test_ffe_rc_down_from_start[apache-mod-7.0] from system_tests_suite (Datadog) (Fix with Cursor)
AssertionError: Flag evaluation failed: 
assert 500 == 200
 +  where 500 = HttpResponse(status_code:500, headers:{'Date': 'Wed, 11 Feb 2026 17:37:07 GMT', 'Server': 'Apache/2.4.66 (Debian)', 'X...ed-By': 'PHP/7.0.33', 'Content-Length': '0', 'Connection': 'close', 'Content-Type': 'text/html; charset=UTF-8'}, text:).status_code
 +    where HttpResponse(status_code:500, headers:{'Date': 'Wed, 11 Feb 2026 17:37:07 GMT', 'Server': 'Apache/2.4.66 (Debian)', 'X...ed-By': 'PHP/7.0.33', 'Content-Length': '0', 'Connection': 'close', 'Content-Type': 'text/html; charset=UTF-8'}, text:) = <tests.ffe.test_dynamic_evaluation.Test_FFE_RC_Down_From_Start object at 0x7f0dc0607440>.r

self = <tests.ffe.test_dynamic_evaluation.Test_FFE_RC_Down_From_Start object at 0x7f0dc0607440>

    def test_ffe_rc_down_from_start(self):
        """Test that default value is returned when RC is down from start."""
        # Verify tracer received 503 from RC
...
tests.ffe.test_dynamic_evaluation.Test_FFE_RC_Down_From_Start.test_ffe_rc_down_from_start[apache-mod-7.0-zts] from system_tests_suite (Datadog) (Fix with Cursor)
AssertionError: Flag evaluation failed: 
assert 500 == 200
 +  where 500 = HttpResponse(status_code:500, headers:{'Date': 'Wed, 11 Feb 2026 17:37:42 GMT', 'Server': 'Apache/2.4.66 (Debian)', 'X...ed-By': 'PHP/7.0.33', 'Content-Length': '0', 'Connection': 'close', 'Content-Type': 'text/html; charset=UTF-8'}, text:).status_code
 +    where HttpResponse(status_code:500, headers:{'Date': 'Wed, 11 Feb 2026 17:37:42 GMT', 'Server': 'Apache/2.4.66 (Debian)', 'X...ed-By': 'PHP/7.0.33', 'Content-Length': '0', 'Connection': 'close', 'Content-Type': 'text/html; charset=UTF-8'}, text:) = <tests.ffe.test_dynamic_evaluation.Test_FFE_RC_Down_From_Start object at 0x7ff66822f560>.r

self = <tests.ffe.test_dynamic_evaluation.Test_FFE_RC_Down_From_Start object at 0x7ff66822f560>

    def test_ffe_rc_down_from_start(self):
        """Test that default value is returned when RC is down from start."""
        # Verify tracer received 503 from RC
...
tests.ffe.test_dynamic_evaluation.Test_FFE_RC_Down_From_Start.test_ffe_rc_down_from_start[apache-mod-7.1] from system_tests_suite (Datadog) (Fix with Cursor)
AssertionError: Flag evaluation failed: 
assert 500 == 200
 +  where 500 = HttpResponse(status_code:500, headers:{'Date': 'Wed, 11 Feb 2026 17:36:48 GMT', 'Server': 'Apache/2.4.66 (Debian)', 'X...ed-By': 'PHP/7.1.33', 'Content-Length': '0', 'Connection': 'close', 'Content-Type': 'text/html; charset=UTF-8'}, text:).status_code
 +    where HttpResponse(status_code:500, headers:{'Date': 'Wed, 11 Feb 2026 17:36:48 GMT', 'Server': 'Apache/2.4.66 (Debian)', 'X...ed-By': 'PHP/7.1.33', 'Content-Length': '0', 'Connection': 'close', 'Content-Type': 'text/html; charset=UTF-8'}, text:) = <tests.ffe.test_dynamic_evaluation.Test_FFE_RC_Down_From_Start object at 0x7f0c48513c20>.r

self = <tests.ffe.test_dynamic_evaluation.Test_FFE_RC_Down_From_Start object at 0x7f0c48513c20>

    def test_ffe_rc_down_from_start(self):
        """Test that default value is returned when RC is down from start."""
        # Verify tracer received 503 from RC
...
View all

ℹ️ Info

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 5490b6c | Docs | Datadog PR Page | Was this helpful? Give us feedback!

- Add Apache rewrite rule for /ffe endpoint to ffe.php
- Mark Test_FFE_Exposure_Caching_Same_Subject as missing_feature
  because PHP shared-nothing architecture resets the in-memory
  ExposureCache on every HTTP request
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