Repository navigation
Prepare the mocked backend to receive agentless FFE traffic - #8186
cbeauchesne wants to merge 15 commits into
Conversation
…erverless-init Each sender uses its own API key, so with_api_key tells where a request comes from. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ainer Agentless senders only speak HTTPS to the hostnames derived from DD_SITE. The mocked backend container gets network aliases for them, and serves them over TLS with a certificate signed by the mitmproxy CA, sharing its routes and records with the HTTP port. 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. 🚦 22 Pipeline jobs failed
ℹ️ InfoNo 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: 0a12ffb | Docs | View more details | Give us feedback! |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
Failed TLS initialization leaves the HTTP listener and background thread running, potentially blocking subsequent startup attempts.
1 open issue
What changed in this PR
Prepares the mocked backend to receive agentless feature-flag evaluation traffic and identify senders by API key, without redirecting traffic yet.
Changes:
- Adds optional API-key filtering to backend interface methods.
- Adds HTTPS support for mock intake hostnames using the mitmproxy CA.
- Gives serverless-init a distinct fake API key and adds filtering and TLS tests.
| File | Description |
|---|---|
utils/mocked_backend/_tls.py |
Adds certificate generation and a shared-backend HTTPS listener. |
utils/mocked_backend/_backend.py |
Integrates optional TLS startup and shutdown. |
utils/mocked_backend/__main__.py |
Exposes TLS configuration through CLI options. |
utils/interfaces/_backend_v2.py |
Adds API-key filtering to retrieval methods. |
utils/_context/containers.py |
Configures intake aliases, HTTPS, and a distinct serverless-init key. |
tests/test_the_test/test_mock_backend_v2.py |
Tests API-key filtering, HTTPS recording, and hostname validation. |
Review effort: Balanced
Instead of generating one at startup. A test checks it covers the container hostnames, and is not about to expire. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No scenario needs both: the container gets a tls option (off by default), and scenarios will turn it on when they move their HTTPS senders to the mocked backend. The TLS listener is gone; the certificate also covers the container name and localhost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
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. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An idle connection no longer blocks the other requests, nor close(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d312c796bb
ℹ️ 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".


Motivation
First step to remove the
datadog_sidecaranddatadog_directinterfaces: FFE agentless traffic will go to the mocked backend, and the sender will be identified by its API key.Changes
interfaces.backend_v2methods acceptwith_api_key, to only get requests sent with this keyMockedBackendContainer(tls=True)serves the mock intake hostnames (*.mock-intake.invalid) on 443, with a committed certificate signed by the mitmproxy CANo behavior change yet: no scenario uses
tls=True.🤖 Generated with Claude Code