-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: redact data from cloud #232
Conversation
WalkthroughThe changes introduce a mechanism to redact sensitive information such as phone numbers, emails, and credit card details from logs within the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant MideaCloud
participant Logger
User->>MideaCloud: Call _api_request()
MideaCloud->>Logger: Log request data
MideaCloud->>MideaCloud: Execute API request
MideaCloud->>Logger: Log response data
MideaCloud->>MideaCloud: Call _redact_data() with response data
MideaCloud-->>Logger: Log redacted data
MideaCloud-->>User: Return response
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #232 +/- ##
==========================================
+ Coverage 35.95% 36.05% +0.09%
==========================================
Files 81 81
Lines 7064 7075 +11
==========================================
+ Hits 2540 2551 +11
Misses 4524 4524 ☔ View full report in Codecov by Sentry. |
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.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- midealocal/cloud.py (4 hunks)
- requirements.txt (1 hunks)
Additional comments not posted (3)
requirements.txt (1)
4-4
: Dependency addition looks good.The
commonregex
library is correctly added to the list of dependencies.midealocal/cloud.py (2)
6-7
: New imports are correctly added.The imports for
re
andCommonRegex
are necessary for the new redaction functionality.Also applies to: 16-16
209-210
: Redaction integration in_api_request
looks good.The redaction of sensitive data in the logs is correctly integrated and does not affect the functionality of the API request.
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.
LGTM.
What about coderabbitai comment ?
Each will be used only once. It doesn't make sense to me to compile the regex. |
I still think is a good practice as in future it may be easily extended. |
🤖 I have created a release *beep* *boop* --- ## [2.2.0](v2.1.1...v2.2.0) (2024-07-20) ### Features * redact data from cloud ([#232](#232)) ([c61991e](c61991e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced functionality for users to redact data from the cloud, enhancing data privacy management. - **Version Update** - Updated the software version to 2.2.0, indicating new features and improvements. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
New Features
Chores
commonregex
.