Skip to content

Enable Python serial ID flag metadata tests - #7853

Open
hhan2024 wants to merge 2 commits into
mainfrom
ffe-python-serial-id-metadata
Open

hhan2024 wants to merge 2 commits into
mainfrom
ffe-python-serial-id-metadata

Conversation

@hhan2024

@hhan2024 hhan2024 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #7820, independently of the Go activation PR.

Changes

  • Forward the OpenFeature evaluation details flag_metadata unchanged as flagMetadata in the Python parametric app.
  • Enable the serial-ID tests for Python v4.15.2 and later.
  • No SDK change is required: ddtrace v4.15.2 already copies non-None serial IDs into __dd_split_serial_id, preserving zero and omitting missing IDs.

Validation

  • Python 4.15.2: all 5 serial-ID metadata tests passed, without force-enabling disabled tests.
  • All 24 dynamic-evaluation regression tests passed (29 total).
  • ./format.sh passed.

The parent tests explicitly enable span enrichment and assert positive IDs, zero, missing-key omission, selected-split metadata, and repeated evaluations.

FFE reviewer selection

Reviewers: @leoromanovsky, @sameerank

Why: Flag evaluation on EVP — The PR enables Python parametric tests for SDK evaluation metadata. Reviewers come from the matched pod.

🤖 Automated selection.

Selection details

Initiative: project / flag-evaluation-evp

Why this match: The PR enables Python parametric tests for SDK evaluation metadata. The Python test client now returns the OpenFeature flag_metadata as flagMetadata, so the tests can check the per-split serial ID (__dd_split_serial_id). The manifest enables these tests for ddtrace v4.15.2 and later. New test cases and a flag fixture cover serial IDs shared across allocations, a selected second split, and Remote Config updates that replace or remove IDs. This matches the flag-evaluation-evp scope of SDK evaluation metadata. The work is not onboarding diagnostics, bandits, or a consent/egress change, so the other initiatives don't fit. The catalog has no supplemental review areas.

  • @leoromanovsky — primary (flag-evaluation-evp): Matched pod member. Existing review coverage preserved.
  • @sameerank — floating (flag-evaluation-evp): Coverage and knowledge sharing. Existing review coverage preserved.

The PR author was excluded. Existing reviewers and teams were preserved.

Debug or fix a problem

Workflow run · Bits Code session

  • Wrong project or pod? Clarify this PR’s purpose, or correct the reviewer registry and publish the change. Sheet edits take effect after publication.
  • Need another reviewer now? Request them in GitHub. This workflow only adds requests and keeps existing reviewers.
  • Stuck beyond five minutes or failed? Inspect the run’s failed step and available Bits session. After fixing the cause, rerun the workflow with this PR URL and dry_run=false. Unchanged completed runs are skipped. If the receipt says needs_reconciliation or a write outcome is uncertain, ask the workflow owner to reconcile GitHub and the receipt before retrying; do not delete the lock blindly.
  • Report a problem: Comment on the reviewer-routing skill PR with this PR URL, the workflow run link, and the expected initiative or reviewer correction.
Evidence and run details

✅ Complete — reviewer coverage verified. The workflow checked pending requests or submitted reviews on the evaluated head.

Generated asynchronously by the FFE reviewer-routing workflow.

Changed paths: utils/build/docker/python/parametric/apm_test_client/server.py, manifests/python.yml, tests/parametric/test_ffe/test_serial_id_metadata.py, tests/parametric/test_ffe/serial-id-metadata-flags.json

Evaluated head: fb15a00c00001ac607987c2622913a1ead43c7fc

Registry revision: revision:1946aa2a-530e-487a-84a7-83aff44a1089

Pinned skill source: d214cfc65ae154b97d39af5cf32caf48aaec9bf0

Instructions: workflow-injected snapshot (no plugin loaded)

Instruction snapshot SHA-256: f23b2a88c13c0da90e2dd58246a14f257af91e2195c555039bd555b52e6f3516

@hhan2024
hhan2024 requested a review from a team as a code owner September 29, 2026 15:39
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

manifests/python.yml                                                    @DataDog/system-tests-reviewers
tests/parametric/test_ffe/serial-id-metadata-flags.json                 @DataDog/feature-flagging-and-experimentation-sdk
tests/parametric/test_ffe/test_serial_id_metadata.py                    @DataDog/feature-flagging-and-experimentation-sdk
utils/build/docker/python/parametric/apm_test_client/server.py          @DataDog/system-tests-reviewers

@datadog-official

datadog-official Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

❌ Errors

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 3 Pipeline jobs failed

Testing the test | System Tests (java, dev) / parametric / parametric (2) — ❌ 1 test failed · 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

❌ tests.parametric.test_ffe.test_serial_id_metadata.Test_FFE_Serial_Id_Metadata.test_serial_id_refreshes_after_remote_config_updates[library_env0, parametric-j... from system_tests_suite
AssertionError: FFE evaluation failed; result={'reason': 'ERROR', 'errorCode': 'PROVIDER_NOT_READY', 'flagMetadata': {'observe_full_evaluation_data': False}, 'value': False}
assert 'PROVIDER_NOT_READY' in {None, ''}
 +  where 'PROVIDER_NOT_READY' = <built-in method get of dict object at 0x7f6348404cc0>('errorCode')
 +    where <built-in method get of dict object at 0x7f6348404cc0> = {'errorCode': 'PROVIDER_NOT_READY', 'flagMetadata': {'observe_full_evaluation_data': False}, 'reason': 'ERROR', 'value': False}.get

self = <tests.parametric.test_ffe.test_serial_id_metadata.Test_FFE_Serial_Id_Metadata object at 0x7f6355d77500>
test_agent = <utils.docker_fixtures._test_agent.TestAgentAPI object at 0x7f6352c79310>
test_library = <utils.docker_fixtures._test_clients._test_client_parametric.ParametricTestClientApi object at 0x7f634849de80>

    @parametrize("library_env", [{**DEFAULT_ENVVARS}])
...
Testing the test | System Tests (java, prod) / parametric / parametric (1) — 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

Testing the test | all-jobs-are-green

View more details · View in GitHub Actions

ℹ️ Info

No 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: fb15a00 | Docs | View more details | Give us feedback!

@hhan2024
hhan2024 force-pushed the ffe-serial-id-metadata-system-test branch from 9547cef to ea6ec3f Compare September 30, 2026 16:24
@hhan2024
hhan2024 requested review from a team as code owners September 30, 2026 16:24
@hhan2024
hhan2024 requested review from danyal002 and sameerank and removed request for a team September 30, 2026 16:24

@sameerank sameerank left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Some suggestions for improvement, all non-blocking because they're not correctness issues

Comment thread tests/parametric/test_ffe/serial-id-metadata-flags.json
Comment thread tests/parametric/test_ffe/test_serial_id_metadata.py
Comment thread tests/parametric/test_ffe/test_serial_id_metadata.py

@nccatoni nccatoni left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there is a merge conflict with utils/pytest.py, otherwise LGTM

Forward OpenFeature flag metadata in the Python parametric adapter and activate the serial ID contract for verified ddtrace 4.15.2.

Environment: Datadog workspace

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

Co-authored-by: hhan2024 <helen.han@datadoghq.com>
Exercise second-split selection, shared variants across allocations, and metadata replacement and removal without restarting the provider. Reject non-integer serial IDs and match each Remote Config acknowledgement.

Environment: Datadog workspace

Co-Authored-By: Codex GPT-6 <noreply@localhost>

Co-authored-by: helen.han <helen.han@datadoghq.com>

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants