Skip to content

test(ffe): validate Node and Java EVP egress - #7601

Draft
leoromanovsky wants to merge 1 commit into
mainfrom
leo.romanovsky/ffe-agentless-evp-egress-tests-v2
Draft

test(ffe): validate Node and Java EVP egress#7601
leoromanovsky wants to merge 1 commit into
mainfrom
leo.romanovsky/ffe-agentless-evp-egress-tests-v2

Conversation

@leoromanovsky

Copy link
Copy Markdown
Contributor

Motivation

Server-side flag-evaluation and exposure events need route-level coverage for Agent, agentless direct, and agentless sidecar delivery.

Changes

  • Add shared flag-evaluation egress tests for the three delivery topologies.
  • Assert aggregate evaluation count, payload fields, selected route, direct DD-API-KEY authentication, and zero events on unused routes.
  • Activate the flag-evaluation contract for Node.js express4 and Java spring-boot.
  • Activate Java exposure egress coverage for agentless direct and sidecar delivery.
  • Mark the two Go agentless flag-evaluation routes as pending implementation.
  • Configure the Node.js and Java test images to trust the checked-in system-test proxy CA.
  • Wait for asynchronous exposure capture before teardown and accept raw or SHA-256-prefixed targeting keys in the shared payload matcher.

Decisions

Validation

  • ./format.sh
  • Focused TEST_THE_TEST manifest, scenario-registration, and agentless-topology suite: 43 passed.
  • Node.js Agent, direct, and sidecar combined exposure and flag-evaluation runs: 2 passed per topology.
  • Java Agent, direct, and sidecar combined exposure and flag-evaluation runs: 2 passed per topology.

Tracks FFL-1488 and FFL-1490.

Validate Agent, direct, and sidecar EVP egress for Node.js and Java.

Environment: Datadog workspace
@github-actions

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

manifests/golang.yml                                                    @DataDog/system-tests-reviewers
manifests/java.yml                                                      @DataDog/system-tests-reviewers
manifests/nodejs.yml                                                    @DataDog/system-tests-reviewers
tests/ffe/test_exposure_egress.py                                       @DataDog/feature-flagging-and-experimentation-sdk @DataDog/system-tests-core
tests/ffe/test_flag_eval_evp.py                                         @DataDog/feature-flagging-and-experimentation-sdk @DataDog/system-tests-core
tests/test_the_test/scenarios.json                                      @DataDog/system-tests-core
utils/_context/_scenarios/agentless_endtoend.py                         @DataDog/system-tests-core
utils/build/docker/java/spring-boot.Dockerfile                          @DataDog/system-tests-reviewers

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Aug 27, 2026

Copy link
Copy Markdown

Pipelines  Tests

⚠️ Warnings

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 5 Pipeline jobs failed

Testing the test | System Tests (java, dev) / End-to-end #1 / spring-boot 1 — ❌ 1 test failed · 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

1 failed test. AssertionError: Timed out waiting for EVP flagevaluation event for flag empty-targeting-key-flag at tests/ffe/test_flag_eval_evp.py:318.

Showing tests most relevant to this failure.

❌ tests.ffe.test_flag_eval_evp.Test_FFE_EVP_Flagevaluation_Egress_Datadog_Agent.test_ffe_evp_flagevaluation_egress[spring-boot] from system_tests_suite
AssertionError: Timed out waiting for EVP flagevaluation event for flag empty-targeting-key-flag
assert False
 +  where False = <bound method ProxyBasedInterfaceValidator.wait_for of AgentInterfaceValidator('agent')>(<function FlagevaluationEgressContract.test_ffe_evp_flagevaluation_egress.<locals>.<lambda> at 0x7fc22059f600>, timeout=30)
 +    where <bound method ProxyBasedInterfaceValidator.wait_for of AgentInterfaceValidator('agent')> = AgentInterfaceValidator('agent').wait_for
 +      where AgentInterfaceValidator('agent') = FlagevaluationEgress(interface=AgentInterfaceValidator('agent'), excluded_interfaces=(), expected_api_key=None).interface

self = <tests.ffe.test_flag_eval_evp.Test_FFE_EVP_Flagevaluation_Egress_Datadog_Agent object at 0x7fc24d739580>

    def test_ffe_evp_flagevaluation_egress(self) -> None:
        for index, response in enumerate(self.responses):
...
Testing the test | System Tests (java, dev) / End-to-end #2 / spring-boot 2 — ❌ 2 tests failed · 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

Test run failed due to timeout waiting for EVP flagevaluation event for flag 'empty-targeting-key-flag' in tests/ffe/test_flag_eval_evp.py:318.

Showing tests most relevant to this failure.

❌ pytest.internal[spring-boot] from system_tests_suite
internal error

Traceback (most recent call last):
  File "/home/runner/work/system-tests/system-tests/venv/lib/python3.12/site-packages/_pytest/main.py", line 268, in wrap_session
    session.exitstatus = doit(config, session) or 0
                         ^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/system-tests/system-tests/venv/lib/python3.12/site-packages/_pytest/main.py", line 321, in _main
    config.hook.pytest_collection(session=session)
  File "/home/runner/work/system-tests/system-tests/venv/lib/python3.12/site-packages/pluggy/_hooks.py", line 265, in __call__
    return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
...
❌ tests.ffe.test_flag_eval_evp.Test_FFE_EVP_Flagevaluation_Egress_Agentless_Sidecar.test_ffe_evp_flagevaluation_egress[spring-boot] from system_tests_suite
AssertionError: Timed out waiting for EVP flagevaluation event for flag empty-targeting-key-flag
assert False
 +  where False = <bound method ProxyBasedInterfaceValidator.wait_for of ProxyBasedInterfaceValidator('datadog_sidecar')>(<function FlagevaluationEgressContract.test_ffe_evp_flagevaluation_egress.<locals>.<lambda> at 0x7f2f418067a0>, timeout=30)
 +    where <bound method ProxyBasedInterfaceValidator.wait_for of ProxyBasedInterfaceValidator('datadog_sidecar')> = ProxyBasedInterfaceValidator('datadog_sidecar').wait_for
 +      where ProxyBasedInterfaceValidator('datadog_sidecar') = FlagevaluationEgress(interface=ProxyBasedInterfaceValidator('datadog_sidecar'), excluded_interfaces=(ProxyBasedInterfaceValidator('datadog_direct'),), expected_api_key='0123456789abcdef0123456789abcdef').interface

self = <tests.ffe.test_flag_eval_evp.Test_FFE_EVP_Flagevaluation_Egress_Agentless_Sidecar object at 0x7f2f70d7cf80>

    def test_ffe_evp_flagevaluation_egress(self) -> None:
        for index, response in enumerate(self.responses):
...
Testing the test | System Tests (nodejs, dev) / End-to-end #1 / express4 1 — ❌ 3 tests failed · 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

3 failed tests due to timeout waiting for EVP flagevaluation events for 'empty-targeting-key-flag'.

Showing tests most relevant to this failure.

❌ tests.ffe.test_flag_eval_evp.Test_FFE_EVP_Flagevaluation_Egress_Agentless_Direct.test_ffe_evp_flagevaluation_egress[express4] from system_tests_suite
AssertionError: Timed out waiting for EVP flagevaluation event for flag empty-targeting-key-flag
assert False
 +  where False = <bound method ProxyBasedInterfaceValidator.wait_for of ProxyBasedInterfaceValidator('datadog_direct')>(<function FlagevaluationEgressContract.test_ffe_evp_flagevaluation_egress.<locals>.<lambda> at 0x7fd753f72840>, timeout=30)
 +    where <bound method ProxyBasedInterfaceValidator.wait_for of ProxyBasedInterfaceValidator('datadog_direct')> = ProxyBasedInterfaceValidator('datadog_direct').wait_for
 +      where ProxyBasedInterfaceValidator('datadog_direct') = FlagevaluationEgress(interface=ProxyBasedInterfaceValidator('datadog_direct'), excluded_interfaces=(ProxyBasedInterfaceValidator('datadog_sidecar'),), expected_api_key='system-tests-mock-api-key').interface

self = <tests.ffe.test_flag_eval_evp.Test_FFE_EVP_Flagevaluation_Egress_Agentless_Direct object at 0x7fd780deb500>

    def test_ffe_evp_flagevaluation_egress(self) -> None:
        for index, response in enumerate(self.responses):
...
❌ tests.ffe.test_flag_eval_evp.Test_FFE_EVP_Flagevaluation_Egress_Agentless_Sidecar.test_ffe_evp_flagevaluation_egress[express4] from system_tests_suite
AssertionError: Timed out waiting for EVP flagevaluation event for flag empty-targeting-key-flag
assert False
 +  where False = <bound method ProxyBasedInterfaceValidator.wait_for of ProxyBasedInterfaceValidator('datadog_sidecar')>(<function FlagevaluationEgressContract.test_ffe_evp_flagevaluation_egress.<locals>.<lambda> at 0x7f58d46c6c00>, timeout=30)
 +    where <bound method ProxyBasedInterfaceValidator.wait_for of ProxyBasedInterfaceValidator('datadog_sidecar')> = ProxyBasedInterfaceValidator('datadog_sidecar').wait_for
 +      where ProxyBasedInterfaceValidator('datadog_sidecar') = FlagevaluationEgress(interface=ProxyBasedInterfaceValidator('datadog_sidecar'), excluded_interfaces=(ProxyBasedInterfaceValidator('datadog_direct'),), expected_api_key='0123456789abcdef0123456789abcdef').interface

self = <tests.ffe.test_flag_eval_evp.Test_FFE_EVP_Flagevaluation_Egress_Agentless_Sidecar object at 0x7f59007582c0>

    def test_ffe_evp_flagevaluation_egress(self) -> None:
        for index, response in enumerate(self.responses):
...
❌ tests.ffe.test_flag_eval_evp.Test_FFE_EVP_Flagevaluation_Egress_Datadog_Agent.test_ffe_evp_flagevaluation_egress[express4] from system_tests_suite
AssertionError: Timed out waiting for EVP flagevaluation event for flag empty-targeting-key-flag
assert False
 +  where False = <bound method ProxyBasedInterfaceValidator.wait_for of AgentInterfaceValidator('agent')>(<function FlagevaluationEgressContract.test_ffe_evp_flagevaluation_egress.<locals>.<lambda> at 0x7f7fdf61ad40>, timeout=30)
 +    where <bound method ProxyBasedInterfaceValidator.wait_for of AgentInterfaceValidator('agent')> = AgentInterfaceValidator('agent').wait_for
 +      where AgentInterfaceValidator('agent') = FlagevaluationEgress(interface=AgentInterfaceValidator('agent'), excluded_interfaces=(), expected_api_key=None).interface

self = <tests.ffe.test_flag_eval_evp.Test_FFE_EVP_Flagevaluation_Egress_Datadog_Agent object at 0x7f8009a5f1d0>

    def test_ffe_evp_flagevaluation_egress(self) -> None:
        for index, response in enumerate(self.responses):
...

View all 5 failed jobs.

📋 Copy fix prompt
CI on my pull request is failing. Help me find and fix the root cause of each failing job below — they were flagged as caused by changes in this PR, so focus on the diff. For each job, explain the failure and propose a fix.

Before you start, set up the Datadog software-delivery tooling so you can
query the CI data yourself:

1. Check whether you already have the Datadog software-delivery MCP tools
   (e.g. a `search_datadog_ci_pipeline_events` tool) and the `unblock-pr` skill.
2. If either is missing, STOP and ask me for permission before installing
   anything. Do not install or run anything until I have said yes.
3. Only with my explicit approval, set up the Datadog software-delivery MCP
   server and skills by following:
     https://docs.datadoghq.com/getting_started/software_delivery_mcp_tools/
   then restart so the skill is picked up.
4. If I decline, skip all of the above and work from the context below alone.

Then run /unblock-pr — it will pull the CI data itself. The job context below is what we already know.

If /unblock-pr is not available — because I declined the setup above, or it did not install — work from the context below instead.

Datadog has already classified this failure as caused by changes in this PR.
Take that as given and work the fix:

1. Locate the change. Diff this branch against its base and find the change
   that produces this error. Explain the mechanism, don't just name a file:
     git fetch origin && git diff $(git merge-base origin/main HEAD)...HEAD
2. Reproduce it locally. Run the failing job's command or test before
   proposing anything.
3. Propose the smallest fix that addresses the root cause — not a workaround,
   not a broadened assertion, not a disabled or skipped test.
4. Re-run the same command to confirm, and say exactly what you ran.
5. If the failure turns out to be intermittent rather than deterministic, say
   so plainly instead of "fixing" it — that is a flaky test, and patching it
   hides the problem.

If the right move is to re-run the job rather than change code, use the job
link in the context below. For GitHub Actions: `gh run rerun <run-id> --failed`,
where the run ID is the number after `/runs/` in that URL (not the trailing
number, which is the job ID).

Branch: leo.romanovsky/ffe-agentless-evp-egress-tests-v2

Testing the test | System Tests (java, dev) / End-to-end #1 / spring-boot 1
Commit: f690550c194b27a2903af75fd4014b963dbf4799
Error (code / test):
1 failed test. AssertionError: Timed out waiting for EVP flagevaluation event for flag empty-targeting-key-flag at tests/ffe/test_flag_eval_evp.py:318.
CI job: https://github.com/DataDog/system-tests/actions/runs/33043727193/job/98424901558

Testing the test | System Tests (java, dev) / End-to-end #2 / spring-boot 2
Commit: f690550c194b27a2903af75fd4014b963dbf4799
Error (code / test):
1 test failed due to timeout waiting for EVP flagevaluation event for flag 'empty-targeting-key-flag' in tests/ffe/test_flag_eval_evp.py:318.
CI job: https://github.com/DataDog/system-tests/actions/runs/33043727193/job/98424902502

Testing the test | System Tests (nodejs, dev) / End-to-end #1 / express4 1
Commit: f690550c194b27a2903af75fd4014b963dbf4799
Error (code / test):
3 failed tests due to timeout waiting for EVP flagevaluation events for 'empty-targeting-key-flag'.
CI job: https://github.com/DataDog/system-tests/actions/runs/33043727193/job/98423354666

Plus 1 more failing job not shown here.

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 9b45731 | Docs | View more details | 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