From 822d76c725b3787e2f00fdeb206b3e3fd5512238 Mon Sep 17 00:00:00 2001 From: Brian Lai <51336873+brianjlai@users.noreply.github.com> Date: Thu, 11 Apr 2024 15:11:23 -0400 Subject: [PATCH] [airbyte-cdk] add print parameter to flush the print buffer after each invocation (#37000) --- airbyte-cdk/python/airbyte_cdk/entrypoint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-cdk/python/airbyte_cdk/entrypoint.py b/airbyte-cdk/python/airbyte_cdk/entrypoint.py index 15fce677eac34..557d3369f94a9 100644 --- a/airbyte-cdk/python/airbyte_cdk/entrypoint.py +++ b/airbyte-cdk/python/airbyte_cdk/entrypoint.py @@ -235,7 +235,7 @@ def launch(source: Source, args: List[str]) -> None: for message in source_entrypoint.run(parsed_args): # simply printing is creating issues for concurrent CDK as Python uses different two instructions to print: one for the message and # the other for the break line. Adding `\n` to the message ensure that both are printed at the same time - print(f"{message}\n", end="") + print(f"{message}\n", end="", flush=True) def _init_internal_request_filter() -> None: