Skip to content

Enable .NET serial ID metadata system tests - #7858

Draft
hhan2024 wants to merge 10 commits into
mainfrom
ffe-dotnet-serial-id-metadata
Draft

hhan2024 wants to merge 10 commits into
mainfrom
ffe-dotnet-serial-id-metadata

Conversation

@hhan2024

@hhan2024 hhan2024 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Stacked directly on #7820 (ffe-serial-id-metadata-system-test).

  • Add the missing .NET /ffe/start and /ffe/evaluate parametric endpoints using OpenFeature evaluation details.
  • Forward the provider's known metadata keys through public typed accessors, preserving their actual types. The adapter does not derive IDs from UFC or coerce strings to integers.
  • Enable the serial-ID metadata tests from the verified .NET tracer version v3.54.0.
  • Make .NET the only string-valued serial-ID exception: assert exact decimal strings for positive, zero, targeted, and repeated serial IDs. Every other SDK retains numeric expectations. Missing IDs must still omit the metadata key for every SDK.

Why .NET uses strings

The .NET evaluator reads UFC serial IDs as nullable Int64 values and preserves them as decimal strings in flag metadata. Its span-enrichment hook reads GetString and parses the value back into an Int64. OpenFeature .NET metadata only exposes an Int32 integer getter, so this representation preserves the full serial-ID range without narrowing.

The agreed contract accepts this existing .NET representation; no .NET SDK change is required. The test changes the expected value only, not the actual metadata returned by the SDK. It does not accept strings for other SDKs or normalize response values.

Validation

  • All 5 serial-ID tests pass without force/skip overrides against tracer 3.54.0, Datadog.FeatureFlags.OpenFeature 2.3.1, and OpenFeature 2.3.0:

    TEST_LIBRARY=dotnet venv/bin/pytest -S PARAMETRIC --skip-parametric-build -n=2 \
      -p no:warnings tests/parametric/test_ffe/test_serial_id_metadata.py
  • Expectation-helper checks: 42 combinations across all seven SDK names and serial IDs including zero, values above Int32, and Int64 max. Only .NET produces string expectations.

  • ./format.sh --check: passed.

  • Prior Docker adapter build: passed.

  • Prior forced dynamic-evaluation regression suite: 22 passed, 2 failed. Both failures are the JSON-default/no-allocation fixtures, returning null instead of the caller's object default. Source inspection points to the existing provider conversion: ConvertObject does not recognize an already-wrapped OpenFeature Value. This separate issue is not masked by the adapter, and dynamic-test activation remains unchanged.

hhan2024 and others added 8 commits September 24, 2026 18:30
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.
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
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>
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>
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>
Fix the import-policy failure when the PR is tested against current main.

Environment: Datadog workspace

Co-Authored-By: Codex GPT-6 <noreply@localhost>
Bring in the exact upstream facade so imports work on the PR head as well as merged main.

Environment: Datadog workspace

Co-Authored-By: Codex GPT-5 <noreply@localhost>
Forward provider metadata through public OpenFeature accessors; retain the serial ID test gate pending integer support.

Environment: Datadog workspace

Co-Authored-By: Codex GPT-5 <noreply@localhost>
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

utils/build/docker/dotnet/parametric/Endpoints/ApmTestApiFfe.cs         @DataDog/system-tests-reviewers
manifests/dotnet.yml                                                    @DataDog/system-tests-reviewers
tests/parametric/test_ffe/test_serial_id_metadata.py                    @DataDog/feature-flagging-and-experimentation-sdk
utils/build/docker/dotnet/parametric/ApmTestApi.csproj                  @DataDog/system-tests-reviewers
utils/build/docker/dotnet/parametric/Program.cs                         @DataDog/system-tests-reviewers

@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Tests

✅ All CI checks and tests passed.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 4e81241 | Docs | View more details | Give us feedback!

Enable the verified .NET serial ID tests while preserving numeric expectations for other SDKs and key omission for missing IDs.

Environment: Datadog workspace

Co-Authored-By: Codex GPT-5 <noreply@localhost>
@hhan2024 hhan2024 changed the title [FFE] Add .NET serial ID metadata test adapter (pending integer support) Enable .NET serial ID metadata system tests Sep 29, 2026
@hhan2024
hhan2024 force-pushed the ffe-serial-id-metadata-system-test branch from 9547cef to ea6ec3f Compare September 30, 2026 16:24
@hhan2024
hhan2024 force-pushed the ffe-serial-id-metadata-system-test branch from b59cca6 to 4352704 Compare October 15, 2026 17:12
Start the provider without injecting the UFC fixture after Remote Config acknowledgement.

Environment: Datadog workspace

Co-Authored-By: Codex GPT-6 <noreply@localhost>
Base automatically changed from ffe-serial-id-metadata-system-test to main October 16, 2026 17:03

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants