fix: add missing SetReasonOnly to objectResponseV2#1925
Open
fix: add missing SetReasonOnly to objectResponseV2#1925
Conversation
objectResponseV2 was missing the SetReasonOnly method, unlike all other V2 response types. This caused the fallback path (null targeting + no defaultVariant) to silently return empty responses for object flags. Also adds compile-time interface satisfaction checks for all V2 response types to prevent this class of bug in the future. Closes #1913 Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
✅ Deploy Preview for polite-licorice-3db33c canceled.
|
|
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates several Go dependencies in the go.sum file and enhances the flag evaluation service. Specifically, it adds compile-time interface satisfaction checks for the responseV2 interface and implements the SetReasonOnly method for the objectResponseV2 type, allowing for the assignment of reasons and metadata to responses without a result value. No review comments were provided, so I have no feedback to offer.
suthar26
approved these changes
Apr 2, 2026
|
@toddbaert would be nice to add a testcase for this to ensure something like this is not missed in another version bump |
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.



objectResponseV2was missing theSetReasonOnlymethod, unlike all other V2 response types.I added an assertion to prevent regressions.
thanks @asppsa for the detailed report!
Fixes: #1913