Skip to content

Commit 9a83e1d

Browse files
maxi297jatinyadav-cc
authored andcommitted
Fix broken print in ccdk (airbytehq#34578)
1 parent e241838 commit 9a83e1d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

airbyte-cdk/python/airbyte_cdk/entrypoint.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,9 @@ def launch(source: Source, args: List[str]) -> None:
212212
source_entrypoint = AirbyteEntrypoint(source)
213213
parsed_args = source_entrypoint.parse_args(args)
214214
for message in source_entrypoint.run(parsed_args):
215-
print(message)
215+
# simply printing is creating issues for concurrent CDK as Python uses different two instructions to print: one for the message and
216+
# the other for the break line. Adding `\n` to the message ensure that both are printed at the same time
217+
print(f"{message}\n", end="")
216218

217219

218220
def _init_internal_request_filter() -> None:

0 commit comments

Comments
 (0)