Repository navigation
Check the mocked backend network aliases on GitLab - #8212
Merged
Merged
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>
Checks that the mocked backend network aliases (mocked-backend.invalid) work on GitLab's Docker network, where the agent can only reach the mocked backend through them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
|
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>
🎉 All green!🧪 All tests passed 🔗 Commit SHA: 707fb61 | Docs | View more details | Give us 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>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cbeauchesne
changed the base branch from
ffe-agentless-mocked-backend
to
main
October 29, 2026 09:53
…backend-gitlab # Conflicts: # tests/test_the_test/test_mock_ffe_agentless_backend.py # utils/_context/_scenarios/agentless_endtoend.py
cbeauchesne
marked this pull request as ready for review
October 29, 2026 09:58
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. |
cbeauchesne
marked this pull request as draft
October 30, 2026 10:37
GitLab runs containers on the default bridge network, so check there that the mocked backend network aliases work. On GitLab PR pipelines, python is now activated with a weblog map: flask-poc with APM_TRACING_E2E_SINGLE_SPAN and the agentless FFE scenarios. The map is filtered by the scenarios selected from the diff, using libraries_and_scenarios_rules.yml, and passed to the e2e pipeline as library_weblog_scenarios. library_weblog_scenarios can now be combined with libraries, scenarios, scenarios_groups and weblogs, which apply to the other libraries, so the selection of the other libraries is unchanged. The GitHub selection and the GitLab main selection are unchanged too.
nccatoni
force-pushed
the
ffe-agentless-mocked-backend-gitlab
branch
2 times, most recently
from
October 30, 2026 12:53
cad91a2 to
707fb61
Compare
cbeauchesne
marked this pull request as ready for review
October 30, 2026 13:00
nccatoni
approved these changes
Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Stacked on #8211. There, every scenario using the mocked backend reaches it through Docker network aliases (
mocked-backend.invalidand the intake hostnames derived from it). A comment inMockedBackendContainerwarns that Docker rejects aliases on the default bridge network, which GitLab uses (_NETWORK_NAME = "bridge"whenGITLAB_CIis set). This PR checks it.Changes
.gitlab-ci.ymlgets a newsystem_tests_python_mocked_backendjob. On every PR (non-default branches), whatever files changed, it runs these scenarios on pythonflask-poc(prod tracer) in a child pipeline:APM_TRACING_E2E_SINGLE_SPAN: the agent can only reach the mocked backend through themocked-backend.invalidalias.FEATURE_FLAGGING_AND_EXPERIMENTATION_AGENTLESS,_DIRECTand_SERVERLESS: the weblog (and serverless-init) reach it through the alias and the intake hostnames.It works the same way as
system_tests_php_thread_context_sharing: it triggers its own child pipeline fromutils/ci/gitlab/main.yml. The main e2e include is left unchanged, so every other GitLab run is unaffected.Note: locally, the
_DIRECTscenario already failed with the python prod tracer (4.16.1), also onmain: the released tracer does not deliver direct EVP events. A failure there on the EVP waits is not an alias problem; a container that does not start, or a name that does not resolve, is.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