Repository navigation
Send agentless FFE events to the mocked backend - #8211
Conversation
The direct and serverless agentless FFE scenarios captured exposures and flag evaluations with the proxy (datadog_direct / datadog_sidecar interfaces). They now go to the mocked backend, as the rest of the agentless traffic, and are read with interfaces.backend_v2, the sender being identified by its API key. - the end-to-end mocked backend always serves HTTPS, also under the intake hostnames derived from DD_SITE=mock-intake.invalid. The agent and the agentless weblogs trust its certificate (mitmproxy CA) - the egress scenarios no longer use the proxy; serverless-init sends to the mocked backend - the mocked backend records when a request started, and answers 202 on the exposures and flag evaluation intake paths - remove the datadog_direct and datadog_sidecar interfaces and their proxy ports Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Temporary: only run the scenarios using the mocked backend, on the libraries running the agentless FFE egress tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
wait_for gets the same with_api_key parameter as get_data, replacing the _evp_capture_matcher helper of the agentless FFE scenario. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Revert the with_api_key parameter of interfaces.backend_v2.wait_for: each matcher of the agentless FFE scenario checks the API key itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
weblog_api_key and sidecar_api_key tell which sender a mocked backend request comes from, instead of dd_api_key and the serverless-init container environment. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The key is deterministic with the mocked backend: no reason to skip the check in replay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The scenario defines the serverless-init API key, and gives it to the container it creates, instead of a constant in containers.py and a container built by the weblog infra. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The agent, serverless-init and the weblogs reach the mocked backend on https://mocked-backend.invalid, and DD_SITE is mocked-backend.invalid: the intake hostnames derived from it are network aliases of the mocked backend. One constant, MOCKED_BACKEND_DOMAIN, replaces MOCK_INTAKE_SITE and the container name in the URLs. The certificate is regenerated for these hostnames. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CI is green with the hard-coded set: back to the computed libraries and scenarios. This reverts commit b746bd5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d9e099253
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
It was stopped after the mocked backend: what it flushed while shutting down was lost. It now stops right after the weblog it relays, while the mocked backend still receives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
❌ ErrorsYour PR has failed checks. Please review the issues below and take necessary action before merging. 🚦 2 Pipeline jobs failed
ℹ️ InfoNo other issues found (see more)🧪 All tests passed Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: c9155a5 | Docs | View more details | Give us feedback! |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The JVM does not use the system CA bundle: with the mocked backend now serving HTTPS, Java weblogs failed to fetch the agentless configuration (PKIX path building failed). They get the mitmproxy CA in a PKCS12 trust store (built with keytool), through JDK_JAVA_OPTIONS, which does not replace the JAVA_TOOL_OPTIONS set by the weblogs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Golden rule, with the TLS mocked backend as example: make clients trust its certificate instead of falling back to plain HTTP. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Motivation
Second step after #8186: remove the
datadog_sidecaranddatadog_directinterfaces. Agentless FFE exposures and flag evaluations go to the mocked backend, like the rest of the agentless traffic, and the sender is identified by its API key.Changes
MockedBackendContainer(tls=True)) on a single domain,mocked-backend.invalid(MOCKED_BACKEND_DOMAIN): the agent, serverless-init and the weblogs reach it onhttps://mocked-backend.invalid, and it is theDD_SITEof the agentless senders, the intake hostnames derived from it being its network aliases. The certificate is regenerated for these hostnames. Its certificate is signed by the mitmproxy CA, already trusted by the agent and by the agentless weblogs (CA bundle mount,NODE_EXTRA_CA_CERTS), which now get it in every agentless scenario since the configuration is fetched over HTTPS._DIRECT,_SERVERLESS) no longer use the proxy. serverless-init owns its API key from the scenario (sidecar_api_key), and sends to the mocked backend.interfaces.backend_v2, filtered by API key: the SDK key for direct, the serverless-init key for sidecar. "Not sent by the other route" becomes "not sent with the other API key". The intake host is asserted from theHostheader.timestamp_start(used by the shutdown-flush evidence) and answers 202 on/api/v2/exposuresand/api/v2/flagevaluation.datadog_direct/datadog_sidecarinterfaces, proxy ports 8201/8202 and their routing.Known caveat, to check: Docker rejects network aliases on GitLab's default bridge network, and every scenario using the mocked backend now relies on them (including the agent ones). If they run on GitLab, the senders need
extra_hostsinstead.Workflow
system-tests-reviewers: ask to one of youre co-worker familiar with the tested feature.system-tests-core(slack)🚀 Once your PR is reviewed and the CI green, you can merge it!
🛟 #apm-shared-testing 🛟
🤖 Generated with Claude Code