Skip to content

Conversation

@leoromanovsky
Copy link
Contributor

@leoromanovsky leoromanovsky commented Dec 12, 2025

Motivation

Through manual inspection we noticed some undesired behavior in a few SDKs around exposure deduplication and logging; following up on this investigation we found that the system tests were missing this core behavior validation and the individual trace sdks had inconsistent validation. Centralizing here is the best way to enforce the desired behavior.

Changes

Adds additional tests to cover the various conditions:

  | Test Class                                   | What it Tests                     | Exposures |
  |----------------------------------------------|-----------------------------------|-----------|
  | Test_FFE_Exposure_Caching_Same_Subject       | Same subject, same flag, 5x       | 1         |
  | Test_FFE_Exposure_Caching_Different_Subjects | 5 different subjects              | 5         |
  | Test_FFE_Exposure_Caching_Allocation_Cycle   | alloc-a → alloc-b → alloc-a       | 3         |
  | Test_FFE_Exposure_Caching_Variant_Cycle      | variant-a → variant-b → variant-a | 3         |
  | Test_FFE_Exposure_Missing_Flag               | flag not in config, 3x            | 0         |
  | Test_FFE_Exposure_DoLog_False                | doLog=false, 3x                   | 0         |

These SDKs need to be corrected before merging this system test:

  • python (note: merged to main, going out in 4.0.2)
  • golang (note: merged to main, going out in 2.5.0)

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • If PR title starts with [<language>], double-check that only <language> is impacted by the change
  • No system-tests internal is modified. Otherwise, I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added (or removed)?

@github-actions
Copy link
Contributor

github-actions bot commented Dec 12, 2025

CODEOWNERS have been resolved as:

tests/ffe/test_exposures.py                                             @DataDog/feature-flagging-and-experimentation-sdk @DataDog/system-tests-core
utils/build/docker/ruby/rails72/Gemfile                                 @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby/rails72/app/controllers/internal_controller.rb  @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby/rails72/app/controllers/open_feature_controller.rb  @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby/rails72/config/routes.rb                        @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core

dd-oleksii added a commit to DataDog/dd-trace-py that referenced this pull request Dec 18, 2025
## Description

<!-- Provide an overview of the change and motivation for the change -->
This fixes feature flags exposure logging according to
[requirements](https://datadoghq.atlassian.net/wiki/spaces/PANA/pages/5906009399/FFE+SDK+requirements)
and [new system
tests](DataDog/system-tests#5868).

## Testing

<!-- Describe your testing strategy or note what tests are included -->
Updated python tests but haven't tested with system tests.

## Risks

<!-- Note any risks associated with this change, or "None" if no risks
-->
I guess none

## Additional Notes

<!-- Any other information that would be helpful for reviewers -->

---------

Co-authored-by: Leo Romanovsky <[email protected]>
leoromanovsky added a commit to DataDog/dd-trace-py that referenced this pull request Dec 18, 2025
<!-- Provide an overview of the change and motivation for the change -->
This fixes feature flags exposure logging according to
[requirements](https://datadoghq.atlassian.net/wiki/spaces/PANA/pages/5906009399/FFE+SDK+requirements)
and [new system
tests](DataDog/system-tests#5868).

<!-- Describe your testing strategy or note what tests are included -->
Updated python tests but haven't tested with system tests.

<!-- Note any risks associated with this change, or "None" if no risks
-->
I guess none

<!-- Any other information that would be helpful for reviewers -->

---------

Co-authored-by: Leo Romanovsky <[email protected]>
(cherry picked from commit 1dcf5d1)
leoromanovsky added a commit to DataDog/dd-trace-py that referenced this pull request Dec 18, 2025
…5714)

<!-- Provide an overview of the change and motivation for the change -->
This fixes feature flags exposure logging according to
[requirements](https://datadoghq.atlassian.net/wiki/spaces/PANA/pages/5906009399/FFE+SDK+requirements)
and [new system
tests](DataDog/system-tests#5868).

<!-- Describe your testing strategy or note what tests are included -->
Updated python tests but haven't tested with system tests.

<!-- Note any risks associated with this change, or "None" if no risks
-->
I guess none

<!-- Any other information that would be helpful for reviewers -->

---------


(cherry picked from commit 1dcf5d1)

## Description

<!-- Provide an overview of the change and motivation for the change -->

## Testing

<!-- Describe your testing strategy or note what tests are included -->

## Risks

<!-- Note any risks associated with this change, or "None" if no risks
-->

## Additional Notes

<!-- Any other information that would be helpful for reviewers -->

Co-authored-by: Oleksii Shmalko <[email protected]>
@leoromanovsky leoromanovsky force-pushed the lr/ffe-test-exposure-cache branch 6 times, most recently from 1a6d23e to 39dd02c Compare December 19, 2025 02:47
@leoromanovsky leoromanovsky changed the base branch from main to ffl-1320-add-feature-flags-to-weblog December 19, 2025 02:47
@leoromanovsky leoromanovsky force-pushed the lr/ffe-test-exposure-cache branch from 39dd02c to 92b8da1 Compare December 19, 2025 03:13
@leoromanovsky leoromanovsky marked this pull request as ready for review December 19, 2025 03:13
@leoromanovsky leoromanovsky requested review from a team as code owners December 19, 2025 03:13
@leoromanovsky leoromanovsky requested review from a team, KowalskiThomas and P403n1x87 and removed request for a team December 19, 2025 03:13
Base automatically changed from ffl-1320-add-feature-flags-to-weblog to main December 19, 2025 03:21
@leoromanovsky leoromanovsky requested review from a team as code owners December 19, 2025 03:21
@leoromanovsky leoromanovsky force-pushed the lr/ffe-test-exposure-cache branch 2 times, most recently from 2849bc8 to e427aba Compare December 19, 2025 13:46
@leoromanovsky leoromanovsky force-pushed the lr/ffe-test-exposure-cache branch from a8c948f to c1592cf Compare December 19, 2025 18:21
- Add test_exposures.py with tests for FFE exposure event caching and deduplication
- Add /ffe/start endpoint to Ruby rails72 weblog to initialize OpenFeature provider
- Update routes from /ffe to /ffe/start and /ffe/evaluate
- Fix typos in comments (FFL -> FFE, "is have" -> "has")
- Update python manifest version for exposure tests
leoromanovsky added a commit to DataDog/dd-trace-py that referenced this pull request Dec 19, 2025
<!-- Provide an overview of the change and motivation for the change -->
This fixes feature flags exposure logging according to
[requirements](https://datadoghq.atlassian.net/wiki/spaces/PANA/pages/5906009399/FFE+SDK+requirements)
and [new system
tests](DataDog/system-tests#5868).

<!-- Describe your testing strategy or note what tests are included -->
Updated python tests but haven't tested with system tests.

<!-- Note any risks associated with this change, or "None" if no risks
-->
I guess none

<!-- Any other information that would be helpful for reviewers -->

---------

Co-authored-by: Leo Romanovsky <[email protected]>
(cherry picked from commit 1dcf5d1)
@leoromanovsky leoromanovsky force-pushed the lr/ffe-test-exposure-cache branch from c1592cf to b98f871 Compare December 19, 2025 21:37
# Conflicts:
#	manifests/python.yml
- Revert Python exposures test to bug (FFL-1623) since issue is still open
- Use fetch_float_value instead of fetch_number_value in Ruby for consistency
- Move UFC_EXPOSURE_DOLOG_FALSE_FIXTURE closer to Test_FFE_Exposure_DoLog_False
brettlangdon pushed a commit to DataDog/dd-trace-py that referenced this pull request Jan 6, 2026
## Description

<!-- Provide an overview of the change and motivation for the change -->
This fixes feature flags exposure logging according to
[requirements](https://datadoghq.atlassian.net/wiki/spaces/PANA/pages/5906009399/FFE+SDK+requirements)
and [new system
tests](DataDog/system-tests#5868).

## Testing

<!-- Describe your testing strategy or note what tests are included -->
Updated python tests but haven't tested with system tests.

## Risks

<!-- Note any risks associated with this change, or "None" if no risks
-->
I guess none

## Additional Notes

<!-- Any other information that would be helpful for reviewers -->

---------

Co-authored-by: Leo Romanovsky <[email protected]>
Copy link
Member

@Strech Strech left a comment

Choose a reason for hiding this comment

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

👏🏼

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.

5 participants