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 (
|
Maxime Carbonneau-Leclerc (maxi297)
left a comment
There was a problem hiding this comment.
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.
Maxime Carbonneau-Leclerc (maxi297)
left a comment
There was a problem hiding this comment.
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:
|
|
Maxime Carbonneau-Leclerc (@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:
|
Maxime Carbonneau-Leclerc (maxi297)
left a comment
There was a problem hiding this comment.
Thanks for the explanation. Given the tests for source-stripe is successful, I'm fine with releasing this change. Poking Serhii Lazebnyi (@lazebnyi) as he is working on source-stripe right now and this might conflict with his release
|
Artem Inzhyyants (@artem1205) I would LOVE to see this in prod. Again, thank you for pushing this over the finish line. |
|
Artem Inzhyyants (@artem1205) how's testing going? Should we merge this in? |
|
testing stuck on progressive rollout: not sure what to do next, Catherine Noll (@clnoll) could you assist with it? |
|
Artem Inzhyyants (@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