-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix: fix PrintBuffer logic #336
Conversation
Signed-off-by: Artem Inzhyyants <artem.inzhyyants@gmail.com>
TODO:
|
!!!!1111 thank you Artem! <3 |
UPD: pinned and tested on stripe test WS — no errors |
📝 WalkthroughWalkthroughThe changes update how output is buffered in the Airbyte CDK. In Changes
Sequence Diagram(s)sequenceDiagram
participant L as launch()
participant PB as PRINT_BUFFER
participant AE as AirbyteEntrypoint.run()
L->>PB: Enter context using PRINT_BUFFER
PB->>AE: Provide buffered output stream
AE->>PB: Write output (without flush=True)
PB->>PB: Automatically flush output at 0.1s intervals
Would you like any further details or additional diagrams to clarify the changes even more? 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🔇 Additional comments (3)
✨ Finishing Touches
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.
Just a couple of questions as comments. I would also like a more exhaustive description to understand what caused the issue before and how this change fixes the issue.
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.
So the problem was that PrintBuffer
wasn't used as a handlers. stream
in the logging config, right? As I don't have more information on the original issue, are we able to reproduce the issue that happened before, apply this change and see that we don't have the issue anymore?
I'll test it 02/24 UPD:
|
@maxi297 , UPD: after deeeeep Dive into logs from Brian's init sync I got the idea why it could happen and why we do not see the difference between old style implementation of PrintBuffer vs fixed one. there are many lines of Logger: Note The RLock (reentrant lock) is primarily designed to prevent data corruption when multiple threads access a shared resource (like your StringIO buffer). It ensures that only one thread can modify the buffer at a time, preventing garbled output. However, it does not provide a guarantee of delivery of every single write in the face of abrupt process termination. So my guess is that PrintBuffer tried to write to Rollout plan:
|
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.
Thanks for the explanation. Given the tests for source-stripe is successful, I'm fine with releasing this change. Poking @lazebnyi as he is working on source-stripe right now and this might conflict with his release
@artem1205 I would LOVE to see this in prod. Again, thank you for pushing this over the finish line. |
@artem1205 how's testing going? Should we merge this in? |
testing stuck on progressive rollout: not sure what to do next, @clnoll could you assist with it? |
@artem1205 looks like you set the initial rollout percent to 0, which put the rollout in an error state. If you cancel and restart it (but with a non-zero initial rollout percent), it should work. |
UPD:
|
I am very curious to see if we get a perf bump with this in
hardcoded-records. Update it to check?
…On Mon, Mar 10, 2025 at 3:13 AM Artem Inzhyyants ***@***.***> wrote:
Merged #336 <#336>
into main.
—
Reply to this email directly, view it on GitHub
<#336 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAKU4J7VIPTXGQFOV2ZY6D2TVQS5AVCNFSM6AAAAABXCDBV5GVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJWGY2TCOBSGM4DMMY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
What
Resolve https://github.com/airbytehq/airbyte-internal-issues/issues/10136
Resolve #283
How
Summary by CodeRabbit
New Features
Bug Fixes