Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/understand/scenarios/parametric.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Options use the Node helper's names (`distributionChannel`, `apiKey`, `clientTok

The shared `mocked_backend` fixture serves these protobuf responses. Import shared FFE constants and fixture helpers from `utils.mocked_backend.ffe`. On the server distribution endpoint, explicitly accepting `application/protobuf` selects protobuf, including in comma-separated `Accept` lists with a positive quality value. Wildcard-only requests and existing agentless provider tests continue to receive JSON.

Use `mocked_backend.client.ffe_set_response` or `mocked_backend.client.ffe_set_responses` with `response_format="protobuf"` to configure these responses; the default format is JSON. Each format has an independent response timeline, and controls reject response IDs unsupported by the selected format. `mocked_backend.client.ffe_reset` resets both timelines and the shared request history, serves the root UFC again instead of an `ffe_use_suite` suite, and clears `ffe_set_flag_selection_ignored_reason`. Use `mocked_backend.ffe_get_requests` to inspect paths, queries, and headers without including fixture control traffic.
Use `mocked_backend.client.ffe_set_response` or `mocked_backend.client.ffe_set_responses` with `response_format="protobuf"` to configure these responses; the default format is JSON. The standalone precomputed-fetch tests use `response_format="precomputed"` for the separate POST response timeline. Each format has an independent response timeline, and controls reject response IDs unsupported by the selected format. `mocked_backend.client.ffe_reset` resets all timelines and the shared request history, serves the root UFC again instead of an `ffe_use_suite` suite, and clears `ffe_set_flag_selection_ignored_reason`. Use `mocked_backend.ffe_get_requests` to inspect paths, queries, headers, and precomputed POST bodies without including fixture control traffic.

The protobuf response IDs `selection_ignored_empty`, `selection_ignored_tag_load_failed`, and `selection_ignored_unknown` return the full rules fixture with a `DD-Flag-Selection-Ignored` header set to an empty string, `tag_load_failed`, or `future_reason`, respectively. Use these shared responses to test selection diagnostics without replacing the rules endpoint handler. The `valid` response omits the header.

Expand Down
30 changes: 30 additions & 0 deletions docs/understand/weblogs/parametric_weblog.md
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,36 @@ An unexpected failure, process timeout, or invalid child output returns HTTP 500
The parent strips `NODE_OPTIONS` and imposes a 10-second deadline.
This does not test tracer hook attachment or delivery to an intake.

#### `POST /ffe/fetch-precomputed-configuration`

Called by `ParametricTestClientApi.ffe_fetch_precomputed_configuration()`. Node.js-only
fresh-process probe of `fetchPrecomputedConfiguration()` from the Node SDK bundles
vendored in the tracer package, not a standalone development dependency. The
request has `options` using the SDK's public fields, optional
`entryPoint` (`root` or `rules-based`), `abort`, `abortAfterMs`, `mutateContext`,
`evaluate` (defaults to true), `trackExposures` (defaults to false), and optional evaluation `contexts`.

The custom Fetch transport routes to `SYSTEM_TESTS_FFE_RULES_BASE_URL` without
changing the generated path, query, headers, body, or request options. `requestUrl`
records the SDK's original URL before this rewrite, and is absent when validation
or cancellation prevents the Fetch call. The response contains a portable `wire`,
codec `restored` wire, diagnostics, and optional actual
OpenFeature status/results; a typed fetch failure instead returns `error` with
`name`, `code`, `message`, and optional HTTP `status`. HTTP and exposure-channel
counts are observed through process exit. Unexpected errors/timeouts are HTTP 500.
`exposuresBeforeTracking` records the count after fetching/serialization and before
provider registration. The explicit tracking control proves this adapter's capture
path using the same channel; it does not create an uploader.
No tracer or uploader is initialized. Future-only opt-out is checked with
`evaluate: false` because the Node provider does not implement that policy.

The shared mock accepts `POST /precompute-assignments`. Configure its independent
timeline with `ffe_set_response(..., response_format="precomputed")`; `ffe_reset()`
resets all three formats. `ffe_get_requests()` includes a detached parsed `body`
for these POST requests, in addition to their path and headers. Encoding, selection,
and opt-out results are scripted response cases, not an origin evaluator or rollout
simulator. The encoded cases test response acceptance, not live negotiation.

#### `POST /ffe/fetch-rules-configuration`

Called by `ParametricTestClientApi.ffe_fetch_rules_configuration()`. Fetch and serialize portable rules in a process without tracer/provider initialization.
Expand Down
1 change: 1 addition & 0 deletions manifests/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ manifest:
tests/parametric/test_ffe/test_dynamic_evaluation.py::Test_Feature_Flag_Split_Features: incomplete_test_app (Split-feature hook capture is currently implemented only in the Java parametric client)
tests/parametric/test_ffe/test_exposure_hooks.py: incomplete_test_app (Exposure hook observations are not implemented)
tests/parametric/test_ffe/test_flag_selection.py: irrelevant (cpp is not in scope for v1 agentless server SDK configuration-source coverage)
tests/parametric/test_ffe/test_precomputed_configuration.py: incomplete_test_app (Standalone precomputed-fetch endpoint is only implemented in Node.js)
tests/parametric/test_ffe/test_rules_configuration.py: missing_feature (Standalone rules configuration helpers are currently tested only in Node.js)
tests/parametric/test_ffe/test_serial_id_metadata.py: missing_feature
tests/parametric/test_ffe/test_serial_id_metadata.py::Test_FFE_Serial_Id_Metadata_Go: irrelevant (Legacy Go metadata key)
Expand Down
1 change: 1 addition & 0 deletions manifests/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,7 @@ manifest:
tests/parametric/test_ffe/test_dynamic_evaluation.py::Test_Feature_Flag_Split_Features: incomplete_test_app (Split-feature hook capture is currently implemented only in the Java parametric client)
tests/parametric/test_ffe/test_exposure_hooks.py: incomplete_test_app (Exposure hook observations are not implemented)
tests/parametric/test_ffe/test_flag_selection.py: missing_feature (The flag selection provider option is not implemented)
tests/parametric/test_ffe/test_precomputed_configuration.py: incomplete_test_app (Standalone precomputed-fetch endpoint is only implemented in Node.js)
tests/parametric/test_ffe/test_rules_configuration.py: missing_feature (Standalone rules configuration helpers are currently tested only in Node.js)
tests/parametric/test_ffe/test_serial_id_metadata.py: missing_feature
tests/parametric/test_ffe/test_serial_id_metadata.py::Test_FFE_Serial_Id_Metadata_Go: irrelevant (Legacy Go metadata key)
Expand Down
1 change: 1 addition & 0 deletions manifests/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2357,6 +2357,7 @@ manifest:
tests/parametric/test_ffe/test_exposure_hooks.py: v2.13.0-dev # Easy win for all weblogs and version 2.12.0
tests/parametric/test_ffe/test_exposure_hooks.py::Test_FFE_ExposureHooks::test_evaluation_feature_aggregation: missing_feature (Test agent needs EVP flagevaluation capture)
tests/parametric/test_ffe/test_flag_selection.py: missing_feature (The flag selection provider option is not implemented)
tests/parametric/test_ffe/test_precomputed_configuration.py: incomplete_test_app (Standalone precomputed-fetch endpoint is only implemented in Node.js)
tests/parametric/test_ffe/test_rules_configuration.py: missing_feature (Standalone rules configuration helpers are currently tested only in Node.js)
tests/parametric/test_ffe/test_serial_id_metadata.py: v2.10.1
tests/parametric/test_ffe/test_serial_id_metadata.py::Test_FFE_Serial_Id_Metadata:
Expand Down
1 change: 1 addition & 0 deletions manifests/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4395,6 +4395,7 @@ manifest:
tests/parametric/test_ffe/test_exposure_hooks.py::Test_FFE_ExposureHooks::test_evaluation_feature_aggregation: missing_feature (Test agent needs EVP flagevaluation capture)
tests/parametric/test_ffe/test_exposure_hooks.py::Test_FFE_ExposureHooks::test_multiprovider_exposure_guard: irrelevant (Go exposure hook composition guard)
tests/parametric/test_ffe/test_flag_selection.py: missing_feature (The flag selection provider option is not implemented)
tests/parametric/test_ffe/test_precomputed_configuration.py: incomplete_test_app (Standalone precomputed-fetch endpoint is only implemented in Node.js)
tests/parametric/test_ffe/test_rules_configuration.py: missing_feature (Standalone rules configuration helpers are currently tested only in Node.js)
tests/parametric/test_ffe/test_serial_id_metadata.py: v1.66.0
tests/parametric/test_ffe/test_serial_id_metadata.py::Test_FFE_Serial_Id_Metadata_Go: irrelevant (Legacy Go metadata key)
Expand Down
1 change: 1 addition & 0 deletions manifests/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2757,6 +2757,7 @@ manifest:
tests/parametric/test_ffe/test_dynamic_evaluation.py::Test_Feature_Flag_Split_Features: incomplete_test_app (Split-feature hook capture is currently implemented only in the Java parametric client)
tests/parametric/test_ffe/test_exposure_hooks.py: incomplete_test_app (Exposure hook observations are not implemented)
tests/parametric/test_ffe/test_flag_selection.py: *ref_6_25_0
tests/parametric/test_ffe/test_precomputed_configuration.py: 'missing_feature (Requires a dd-trace-js release whose vendored openfeature-node-server bundles contain fetchPrecomputedConfiguration and DatadogCoreProvider, openfeature-js-client#462 and #469)'
tests/parametric/test_ffe/test_rules_configuration.py: 7.0.0-pre # Exact development version until the first containing release is confirmed.
tests/parametric/test_ffe/test_rules_configuration.py::Test_FFE_Rules_Configuration_Selection: missing_feature (FFL-3364 requires the Node flag-selection dependency update in dd-trace-js)
tests/parametric/test_ffe/test_serial_id_metadata.py: v6.18.0
Expand Down
1 change: 1 addition & 0 deletions manifests/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1772,6 +1772,7 @@ manifest:
tests/parametric/test_ffe/test_dynamic_evaluation.py::Test_Feature_Flag_Split_Features: incomplete_test_app (Split-feature hook capture is currently implemented only in the Java parametric client)
tests/parametric/test_ffe/test_exposure_hooks.py: incomplete_test_app (Exposure hook observations are not implemented)
tests/parametric/test_ffe/test_flag_selection.py: missing_feature (The flag selection provider option is not implemented)
tests/parametric/test_ffe/test_precomputed_configuration.py: incomplete_test_app (Standalone precomputed-fetch endpoint is only implemented in Node.js)
tests/parametric/test_ffe/test_rules_configuration.py: missing_feature (Standalone rules configuration helpers are currently tested only in Node.js)
tests/parametric/test_ffe/test_serial_id_metadata.py: missing_feature
tests/parametric/test_ffe/test_serial_id_metadata.py::Test_FFE_Serial_Id_Metadata_Go: irrelevant (Legacy Go metadata key)
Expand Down
1 change: 1 addition & 0 deletions manifests/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3209,6 +3209,7 @@ manifest:
tests/parametric/test_ffe/test_dynamic_evaluation.py::Test_Feature_Flag_Split_Features: incomplete_test_app (Split-feature hook capture is currently implemented only in the Java parametric client)
tests/parametric/test_ffe/test_exposure_hooks.py: incomplete_test_app (Exposure hook observations are not implemented)
tests/parametric/test_ffe/test_flag_selection.py: missing_feature (The flag selection provider option is not implemented)
tests/parametric/test_ffe/test_precomputed_configuration.py: incomplete_test_app (Standalone precomputed-fetch endpoint is only implemented in Node.js)
tests/parametric/test_ffe/test_rules_configuration.py: missing_feature (Standalone rules configuration helpers are currently tested only in Node.js)
tests/parametric/test_ffe/test_serial_id_metadata.py: missing_feature
tests/parametric/test_ffe/test_serial_id_metadata.py::Test_FFE_Serial_Id_Metadata_Go: irrelevant (Legacy Go metadata key)
Expand Down
1 change: 1 addition & 0 deletions manifests/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2744,6 +2744,7 @@ manifest:
tests/parametric/test_ffe/test_dynamic_evaluation.py::Test_Feature_Flag_Split_Features: incomplete_test_app (Split-feature hook capture is currently implemented only in the Java parametric client)
tests/parametric/test_ffe/test_exposure_hooks.py: incomplete_test_app (Exposure hook observations are not implemented)
tests/parametric/test_ffe/test_flag_selection.py: missing_feature (The flag selection provider option is not implemented)
tests/parametric/test_ffe/test_precomputed_configuration.py: incomplete_test_app (Standalone precomputed-fetch endpoint is only implemented in Node.js)
tests/parametric/test_ffe/test_rules_configuration.py: missing_feature (Standalone rules configuration helpers are currently tested only in Node.js)
tests/parametric/test_ffe/test_serial_id_metadata.py: missing_feature
tests/parametric/test_ffe/test_serial_id_metadata.py::Test_FFE_Serial_Id_Metadata_Go: irrelevant (Legacy Go metadata key)
Expand Down
1 change: 1 addition & 0 deletions manifests/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ manifest:
tests/parametric/test_ffe/test_dynamic_evaluation.py::Test_Feature_Flag_Split_Features: incomplete_test_app (Split-feature hook capture is currently implemented only in the Java parametric client)
tests/parametric/test_ffe/test_exposure_hooks.py: incomplete_test_app (Exposure hook observations are not implemented)
tests/parametric/test_ffe/test_flag_selection.py: irrelevant (rust is not in scope for v1 agentless server SDK configuration-source coverage)
tests/parametric/test_ffe/test_precomputed_configuration.py: incomplete_test_app (Standalone precomputed-fetch endpoint is only implemented in Node.js)
tests/parametric/test_ffe/test_rules_configuration.py: missing_feature (Standalone rules configuration helpers are currently tested only in Node.js)
tests/parametric/test_ffe/test_serial_id_metadata.py: missing_feature
tests/parametric/test_ffe/test_serial_id_metadata.py::Test_FFE_Serial_Id_Metadata_Go: irrelevant (Legacy Go metadata key)
Expand Down
10 changes: 10 additions & 0 deletions tests/ffe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ Fixture provenance and deterministic expected behavior are documented in
[`core-provider-rules-wire.md`](../parametric/test_ffe/core-provider-rules-wire.md).
Standalone precomputation helper coverage is a separate change in [#8267](https://github.com/DataDog/system-tests/pull/8267).

`tests/parametric/test_ffe/test_precomputed_configuration.py` covers the standalone
Node precomputed-fetch helper from both entry points: JSON:API request fields,
context binding and codec round-trips, fingerprint query mapping and response
encoding checks, selection diagnostics, opt-out acknowledgments, transport failures,
deadlines/cancellation, and invalid options without a request. It uses the shared
mock's `precomputed` response timeline and loads the tracer's vendored Node SDK
bundles. It remains gated pending a tracer release containing both the fetch helper
and `DatadogCoreProvider`. Use the same command above with this file selected and forced.
These tests validate scripted responses, not live Datadog selection or encoding rollout.

`Test_FFE_Rules_Configuration_Selection` covers tag/key-pattern query parameters on both distribution channels, invalid/URL-overflow selections dropped with diagnostics, quiet empty-selection omission, and retention of the full response when the backend ignores selection. It also checks diagnostics for nonempty `DD-Flag-Selection-Ignored` response headers, including unknown reasons. The mock does not implement backend filtering. These cases require [openfeature-js-client #445](https://github.com/DataDog/openfeature-js-client/pull/445) in the `dd-trace` dependency and remain gated in the Node manifest until a containing build is available. Other SDKs retain the existing file-level gate.

The class also runs the canonical selection vectors' `sdk` expectations through real HTTP requests, grouped by distribution channel to share container startup. These cover Unicode `White_Space` trimming, UTF-8 byte ordering and length, the 31/32-value and 200/201-byte boundaries, and drop-reason precedence. Raw-query percent-decoding and server-side `selectedKeys` expectations are intentionally excluded. The fixture updater validates the SDK vector shape before replacing the snapshot, and the existing update workflow tracks changes to both evaluator and selection fixtures.
Expand Down
Loading
Loading