-
Notifications
You must be signed in to change notification settings - Fork 40
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
Draft: Add more logging options (DO NOT MERGE) #444
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Warning Rate limit exceeded@aaronsteers has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 10 minutes and 37 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 WalkthroughWalkthroughThe changes in this pull request enhance the logging functionality of the PyAirbyte library by introducing a new boolean variable, Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Logger
participant GlobalLogger
User->>Logger: Configure logs
Logger->>Logger: Check ISOLATED_CONNECTOR_LOGS
alt Isolated logs
Logger->>Logger: Disable propagation
Logger->>Logger: Write to connector-specific log
else Consolidated logs
Logger->>GlobalLogger: Enable propagation
Logger->>GlobalLogger: Write to main log
end
What do you think about this sequence diagram? Does it capture the flow accurately? 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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 0
🧹 Outside diff range and nitpick comments (2)
airbyte/logs.py (2)
11-26
: Documentation looks great, but there's a small typo! 🎯The documentation for custom log handlers is clear and helpful. However, there's an incomplete sentence on line 79: "including ." - seems like something got cut off there. What did you mean to include in that sentence?
Also applies to: 79-79
66-80
: Extra quote in docstring - small fix needed! 🔍The implementation looks solid, but there's an extra quote in the docstring (line 72). Would you mind fixing that?
-""""Whether to write logs for each connector to a separate file. +"""Whether to write logs for each connector to a separate file.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
airbyte/logs.py
(3 hunks)
🔇 Additional comments (1)
airbyte/logs.py (1)
316-321
: Implementation looks good! One thing to verify... 🤔
The logic for controlling log propagation is clear and well-commented. Just want to make sure we've considered all scenarios - what happens if someone changes ISOLATED_CONNECTOR_LOGS
at runtime? Should we perhaps add a note in the docs about when this setting takes effect?
Let's check if there are any existing loggers that might be affected by runtime changes:
✅ Verification successful
Runtime changes to ISOLATED_CONNECTOR_LOGS are safe! 🎯
The implementation is actually quite robust! Each connector gets a fresh logger instance through new_passthrough_file_logger()
and the propagation setting is applied at creation time. No loggers are cached globally - they're created per-connector instance and stored as instance attributes (self._file_logger
). This means runtime changes to ISOLATED_CONNECTOR_LOGS
will affect new loggers but won't disrupt existing ones, which is exactly what we want!
Maybe we could add a small doc note about this behavior for clarity, wdyt? 🤔
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for instances where this logger is cached or stored
rg -l "new_passthrough_file_logger"
Length of output: 78
Script:
#!/bin/bash
# Let's check how the logger is used in _connector_base.py
rg -A 5 "new_passthrough_file_logger" airbyte/_connector_base.py
# Also check if there are any caching or storage of logger instances
ast-grep --pattern 'logger = $$$'
Length of output: 816
Summary by CodeRabbit