-
Notifications
You must be signed in to change notification settings - Fork 8
Added Accessor #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Accessor #55
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
Co-authored-by: Ross Grambo <[email protected]>
* 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 <[email protected]> * Update _featuremanager.py --------- Co-authored-by: Ross Grambo <[email protected]> * 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 <[email protected]>
Description
Adds option of adding a callback that sets the targeting context.
Contribution checklist:
General Guidelines and Best Practices