fix(feature_flags): warn on comparator evaluation errors - #8470
Shubham-Padkonde wants to merge 1 commit into
Conversation
|
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
|
Not all issues are linked correctly. Please link each issue to the PR either manually or using a closing keyword in the format If mentioning more than one issue, separate them with commas: i.e. |
|
|
This implements only the warning-only first step of #8425; the proposed major-version exception behavior remains open. The related-issue check currently requires a development link or a closing keyword. Could a maintainer link #8425 manually (or advise the preferred tracking issue for this first step)? I have avoided a closing keyword so merging this PR does not inadvertently close the remaining major-version work. |



Issue number: #8425 (warning-only step)
Summary
Changes
Emit a warning when a feature-flag comparator raises while evaluating a present context key. Include the feature, rule, key, action, and exception type, without exposing operand values or exception messages. Pass that diagnostic context through the private comparator helper and document the warning.
User experience
Incompatible operands, such as
STARTSWITHon an integer, currently look like ordinary non-matches unless debug logging is enabled. They now produce an actionable warning. Existing non-match results and registered exception handlers are preserved; missing keys and valid non-matches stay quiet.This implements the first step proposed in the issue. Introducing a new exception remains a separate major-version decision. The tested approach was described in the issue before submission.
Validation:
make prstops at its Docker-based documentation command because Docker/WSL integration is unavailable here. Running markdownlint directly passes the edited page; the full docs check reports the pre-existingMD053error in unchangeddocs/changelog.md:1. The remaining check categories were run separately as listed above. AWS end-to-end and Redis integration tests were not run.Prepared with OpenAI Codex assistance.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.