Merged
Conversation
There was a problem hiding this comment.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
featuremanagement/_featuremanagerbase.py:243
- The error message could be more informative. Suggestion: logging.warning("targeting_context_accessor did not return a TargetingContext. Received type: {}".format(type(targeting_context)))
logging.warning("targeting_context_accessor did not return a TargetingContext")
featuremanagement/_featuremanagerbase.py:240
- Ensure that the new behavior introduced by the targeting_context_accessor is covered by tests, including cases where it returns a valid TargetingContext and where it does not.
targeting_context = self._targeting_context_accessor()
There was a problem hiding this comment.
Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.
Files not reviewed (2)
- samples/formatted_feature_flags.json: Language not supported
- featuremanagement/_featuremanager.py: Evaluated as low risk
Comments suppressed due to low confidence (2)
featuremanagement/_featuremanagerbase.py:243
- Returning None instead of an empty TargetingContext could lead to NoneType errors. Ensure the calling code handles None properly.
return None
featuremanagement/_featuremanagerbase.py:282
- Inconsistent use of logging. Should use logger.warning instead of logging.warning.
logging.warning("Feature flag %s not found", feature_flag_id)
rossgrambo
approved these changes
Feb 3, 2025
Co-authored-by: Ross Grambo <rossgrambo@microsoft.com>
mrm9084
added a commit
that referenced
this pull request
Apr 24, 2025
* Added Accessor (#55) * Added Accessor with comments * comment and format change * fixing log * fixing log length * async version with tests * fix test and pylint issue * Update featuremanagement/aio/_featuremanager.py Co-authored-by: Ross Grambo <rossgrambo@microsoft.com> * Update _featuremanager.py --------- Co-authored-by: Ross Grambo <rossgrambo@microsoft.com> * New OTel Integration (#54) * New OTel Integration * fixing issues * pylint fixes * fixing mypy issues * Update _send_telemetry.py * Update _send_telemetry.py * Update dev_requirements.txt * fixing checks * Update _send_telemetry.py * Update _send_telemetry.py * trying mypy fix * Update _send_telemetry.py * Update to use accessor * remove attach_targeting_info * added tests * Adding Quart sample * Added otel to quart sample * Update requirements.txt * Updating Version/Status * review comments * Update _version.py --------- Co-authored-by: Ross Grambo <rossgrambo@microsoft.com>
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.
Description
Adds option of adding a callback that sets the targeting context.
Contribution checklist:
General Guidelines and Best Practices