Repository navigation
Add parametric test: thread UFC serialId through flagMetadata - #7820
gh-worker-dd-mergequeue-cf854d[bot] merged 8 commits into
Conversation
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 194539dc51
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9547cefa87
ℹ️ 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".
9547cef to
ea6ec3f
Compare
Every UFC split has a stable per-org serialId used by downstream consumers (APM span enrichment, exposure caching, evaluation-metrics correlation) to identify the exact (allocation, variant) pair that was assigned. Today only the Node server SDK (openfeature-js-client#269) exposes this via flagMetadata["__dd_split_serial_id"]; this test generalizes the contract so every SDK can be validated the same way. Adds a dedicated fixture covering: a plain serialId, serialId=0 (a valid ID that must not be dropped by a truthiness check), a split with no serialId (must not fabricate one), and two allocations with different serialIds selected via targeting. All languages are marked missing_feature: verified directly against the Node.js and Go parametric weblog handlers that neither returns flagMetadata from POST /ffe/evaluate today. The new feature_flags_serial_id_metadata marker uses NOT_REPORTED_ID pending a real feature-parity page. Co-authored-by: helen.han <helen.han@datadoghq.com>
Exclude the UFC configuration from evaluation-case discovery, disable the new suite for Rust, and require successful evaluation before accepting an absent serial ID. Apply the repository formatter to the new test module. Environment: Datadog workspace Co-authored-by: Leo Romanovsky <leo.romanovsky@datadoghq.com>
Fail evaluations that omit flagMetadata while allowing null or empty metadata when a split has no serial ID. Environment: Datadog workspace Co-Authored-By: Codex GPT-5 <noreply@localhost> Co-authored-by: hhan2024 <helen.han@datadoghq.com>
Tighten the missing-serial-ID test so an SDK cannot serialize an absent UFC serial ID as a null metadata entry. Environment: Datadog workspace Co-Authored-By: Codex GPT-5 <noreply@localhost> Co-authored-by: hhan2024 <helen.han@datadoghq.com>
Exercise serial-ID flag metadata under the required span-enrichment configuration for positive, zero, and missing UFC serial IDs. Environment: Datadog workspace Co-Authored-By: Codex GPT-5 <noreply@localhost> Co-authored-by: hhan2024 <helen.han@datadoghq.com>
Fix the import-policy failure when the PR is tested against current main. Environment: Datadog workspace Co-Authored-By: Codex GPT-6 <noreply@localhost> Co-authored-by: hhan2024 <helen.han@datadoghq.com>
Use the registered Feature Parity entry for FFE serial ID metadata. Environment: Datadog workspace Co-Authored-By: Codex GPT-5 <noreply@localhost>
b59cca6 to
4352704
Compare
Start the provider without injecting the UFC fixture after Remote Config acknowledgement. Environment: Datadog workspace Co-Authored-By: Codex GPT-6 <noreply@localhost>
Summary
Add shared parametric system tests for the contract that SDKs expose the selected UFC split's
serialIdin flag-evaluation metadata when span enrichment is enabled. The tests inspect the SDK's evaluation details through the parametric adapter; adapters must forward actual SDK metadata rather than reconstruct serial IDs from the configuration.This PR introduces the tests and intentionally marks all eight language manifests (
cpp,dotnet,golang,java,nodejs,php,python,ruby) asmissing_feature. The SDK-specific PRs below expose metadata through the adapters, identify any SDK implementation gaps, and enable the tests at verified versions.Contract
flagMetadata. When there is no metadata, the field may be an empty map ornull; the field itself must not be omitted.nullvalue does not count as omission. With span enrichment enabled, a missing UFC serial ID is the only case where the serial-ID key is expected to be absent. Other metadata may still be present."42"or"0"); all other SDKs return a numeric value. .NET uses strings to preserve Int64 serial IDs through an OpenFeature metadata API whose integer getter only supports Int32. No response coercion is used to make the test pass.The contract does not require serial-ID metadata when span enrichment is disabled.
The tests use each SDK's metadata key: Go uses
dd.serialId; the other server SDKs use__dd_split_serial_id. The Go key handling and .NET string exception are implemented in their respective stacked PRs below, not in this parent branch alone.Implementation
tests/parametric/test_ffe/test_serial_id_metadata.pywith five cases: positive ID, zero ID, missing-ID key omission, targeting-selected IDs, and repeated evaluations.serial-id-metadata-flags.jsonwith fixtures for those cases, including separate targeted allocations with distinct serial IDs.DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED=trueandDD_EXPERIMENTAL_FLAGGING_PROVIDER_SPAN_ENRICHMENT_ENABLED=true.feature_flags_serial_id_metadatafeature marker (NOT_REPORTED_IDpending an assigned feature-parity ID).utils.pytestfacade, including the upstream facade on this branch so both PR-head and merged-tree imports work.Server SDK test-enablement PRs
All seven system-tests PRs are stacked directly on this PR's branch,
ffe-serial-id-metadata-system-test, rather than on one another. Version floors below are locally verified floors, not claims that every earlier release fails.dd.serialIdkey. No SDK change required.missing_featureuntil the SDK fix is merged and its release version is known.missing_featureuntil the SDK fix is merged and its release version is known.C++ remains
missing_feature; there is no C++ activation PR in this set.Validation
Follow-up
NOT_REPORTED_ID.missing_feature.