Add Ruby EVP fork isolation system test#7226
Draft
leoromanovsky wants to merge 2 commits into
Draft
Conversation
Contributor
|
|
🎉 All green!🧪 All tests passed 🔗 Commit SHA: bb50669 | Docs | Datadog PR Page | Give us feedback! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Ruby EVP flagevaluation has fork/prefork behavior that is hard to prove from unit tests alone: the child process must not flush parent-process queued EVP evaluation state. This PR pre-wires Rails72 system-test coverage for that runtime path without activating it yet.
Changes
/ffe/fork-isolationendpoint that evaluates one flag in the parent process, evaluates another in a forked child, and flushes OpenFeature exposure and EVP flagevaluation writers deterministically.missing_feature (FFL-2446).DataDog/dd-trace-rb#5896lands.openfeature-sdkto>= 0.5.1so provider hooks are available when Ruby EVP coverage is activated.Decisions
DataDog/dd-trace-rb#5896, so merging activation intosystem-testsfirst would advertise coverage before the default Ruby tracer can satisfy it.Validation
Validation was run locally against
DataDog/dd-trace-rb#5896by building Rails72 with that local Ruby tracer source:./build.sh --library ruby --weblog-variant rails72 --images weblog --binary-path /tmp/system-tests-ruby-binarydatadog 2.37.0.dev,openfeature-sdk 0.5.1,libdatadog 36.0.0.1.0.TEST_LIBRARY=ruby ./run.sh FEATURE_FLAGGING_AND_EXPERIMENTATION tests/ffe/test_flag_eval_evp_ruby.py::Test_FFE_EVP_Flagevaluation_Ruby_Fork_Isolation --library ruby->1 passed in 24.65s-
TEST_LIBRARY=ruby ./run.sh FEATURE_FLAGGING_AND_EXPERIMENTATION tests/ffe/test_flag_eval_evp.py tests/ffe/test_flag_eval_evp_ruby.py --library ruby->8 passed, 1 skipped in 46.39spython3 -m compileall -q tests/ffe/test_flag_eval_evp_ruby.pyvenv/bin/ruff check tests/ffe/test_flag_eval_evp_ruby.pymypyfortests/ffe/test_flag_eval_evp_ruby.pyandtests/ffe/test_flag_eval_evp.pyvenv/bin/python utils/manifest/validate.pyvenv/bin/yamllint -s manifests/ruby.ymlgit diff --check