Repository navigation
Restore OpenFeature agentless activation and lifecycle hardening - #6418
leoromanovsky wants to merge 4 commits into
Conversation
Typing analysisNote: Ignored files are excluded from the next sections. Untyped methodsThis PR introduces 3 partially typed methods, and clears 1 partially typed method. It increases the percentage of typed methods from 72.36% to 72.63% (+0.27%). Partially typed methods (+3-1)❌ Introduced:Untyped other declarationsThis PR introduces 1 partially typed other declaration. It increases the percentage of typed other declarations from 86.46% to 86.64% (+0.18%). Partially typed other declarations (+1-0)❌ Introduced:If you believe a method or an attribute is rightfully untyped or partially typed, you can add |
❌ ErrorsYour PR has failed checks. Please review the issues below and take necessary action before merging. 🚦 3 Pipeline jobs failed
ℹ️ InfoNo other issues found (see more)🧪 All tests passed 🎯 Code Coverage (details) Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: 0804532 | Docs | View more details | Give us feedback! |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c7f7449f57
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
DI changes in diff to pass keyword argument instead of positional approved. |
Preserve the latest Remote Configuration worker and barrier fork reset together with synchronized client replacement. Environment: Datadog
Cancel pending initialization without stopping shared delivery, reset failed activation for retry, align enablement with source selection, and preserve SDK error/recovery ordering across shutdown races. Cover each reported failure with deterministic regressions and retain current Remote Configuration fork reset behavior. Environment: Datadog
TonyCTHsu
left a comment
There was a problem hiding this comment.
Approve. It is a revert + revert
Strech
left a comment
There was a problem hiding this comment.
I would like to ask to move some leaked knowledge into OpenFeature back from Core components. The rest looks 👍🏼
| begin | ||
| @open_feature_activation.after_fork | ||
| rescue => e | ||
| # Feature Flags is optional and must never interrupt other post-fork handlers. | ||
| description = "Feature Flags delivery failed to restart after fork" | ||
| logger.error("#{description}: #{e.class}: #{e.message}") | ||
| telemetry.report(e, description: description) | ||
| end |
There was a problem hiding this comment.
responsibility-wise, why not @open_feature_activation.after_fork performing those logging and fail-safe operations? IMHO in core component is should be safe to call after_fork and consider it exception-free method
| begin | ||
| @open_feature_activation.start! | ||
| Datadog::OpenFeature.reattach(@open_feature_activation) | ||
| rescue => e | ||
| # Feature Flags is optional and must never interrupt library startup. | ||
| description = "Feature Flags delivery failed to start" | ||
| logger.error("#{description}: #{e.class}: #{e.message}") | ||
| telemetry.report(e, description: description) | ||
| end |
There was a problem hiding this comment.
What if it's an its own method in OpenFeature that handles that combo and also report errors to offload this manual work from core component?
| def initialize(receivers) | ||
| @receivers = receivers | ||
| @receivers = receivers.dup | ||
| @receivers_mutex = Mutex.new |
There was a problem hiding this comment.
I think there is no other mutex, let's shorten in to mutex
Motivation
Ruby applications need feature-flag configuration delivery to start during application/provider initialization, including applications that never receive a traced web request.
That startup behavior and its lifecycle handling were rolled back because the shared Ruby test adapter aborted when Remote Configuration was already running. The adapter compatibility fix has now merged, allowing us to restore the functionality.
Changes and Decisions
This PR retains separate commits restoring the two previously merged changes, including their original tests and type signatures; the original system-tests pin changes are excluded:
Follow-up fixes cancel initialization on shutdown without stopping shared delivery, make failed startup retryable, align enablement with source selection, order recovery after SDK errors, and prevent shutdown from leaking error handlers.
Merge the prerequisite system-tests pin update first, then retarget this PR to
master; review should confirm the restored delivery behavior, compatibility with the updated adapter, and the initialization and shutdown fixes.