<#7047 "Broken Pipe Error" should be caught and ha...
# meltano-repo-activity
g
#7047 "Broken Pipe Error" should be caught and handled by Meltano Issue created by aaronsteers Raised by
@Stephen Hazeltine
in Slack. Approximately 6 pages of log text in the traceback (copy-pasted below). I think we should raise this up to a parent error like
MeltanoBrokenPipeError
or similar, that links to
<https://melta.no/>...
. Often this occurs when the tap fails unexpectedly, which breaks the STDOUT > STDIN 'pipe' between tap and target. Details ``` 2022-12-02T185651.919760Z [error ] [Errno 32] Broken pipe ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /Users/stephen.hazeltine/Documents/Projects/meltano/meltano_venv_2/lib/python3.8/site-packages/m │ │ eltano/core/logging/output_logger.py:201 in redirect_logging │ │ │ │ 198 │ │ │ *ignore_errors, │ │ 199 │ │ ) │ │ 200 │ │ try: │ │ ❱ 201 │ │ │ yield │ │ 202 │ │ except ignored_errors: # noqa: WPS329 │ │ 203 │ │ │ raise │ │ 204 │ │ except Exception as err: │ │ │ │ ╭──────────────────────────────────── locals ─────────────────────────────────────╮ │ │ │ err = BrokenPipeError(32, 'Broken pipe') │ │ │ │ ignore_errors = (<class 'meltano.cli.utils.CliError'>,) │ │ │ │ ignored_errors = ( │ │ │ │ │ <class 'KeyboardInterrupt'>, │ │ │ │ │ <class 'asyncio.exceptions.CancelledError'>, │ │ │ │ │ <class 'meltano.cli.utils.CliError'> │ │ │ │ ) │ │ │ │ logger = <RootLogger root (INFO)> │ │ │ │ self = <meltano.core.logging.output_logger.Out object at 0x114357820> │ │ │ ╰─────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /Users/stephen.hazeltine/Documents/Projects/meltano/meltano_venv_2/lib/python3.8/site-packages/m │ │ eltano/cli/elt.py:257 in _redirect_output │ │ │ │ 254 │ with meltano_stdout.redirect_logging(ignore_errors=(CliError,)): │ │ 255 │ │ async with meltano_stdout.redirect_stdout(), meltano_stderr.redirect_stderr(): │ │ 256 │ │ │ try: │ │ ❱ 257 │ │ │ │ yield │ │ 258 │ │ │ except CliError as err: │ │ 259 │ │ │ │ err.print() │ │ 260 │ │ │ │ raise │ │ │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ log = <BoundLogger(context={'name': 'meltano', 'run_id': │ │ │ │ 'db41504f-d251-4bd1-8f0e-ef4a44bef9e9', 'state_id': │ │ │ │ '2022-12-02T183927--tap-workramp--target-bigquery'}, processors=[<function │ │ │ │ add_log_level at 0x103833700>, │ │ │ │ <structlog.stdlib.PositionalArgumentsFormatter object at 0x106b248e0>, │ │ │ │ <structlog.processors.TimeStamper object at 0x1044caf00>, │ │ │ │ <structlog.processors.StackInfoRenderer object at 0x106b247c0>, <function │ │ │ │ format_exc_info at 0x1038454c0>, <function │ │ │ │ ProcessorFormatter.wrap_for_formatter at 0x103ec0c10>])> │ │ │ │ meltano_stderr = <meltano.core.logging.output_logger.Out object at 0x114357f70> │ │ │ │ meltano_stdout = <meltano.core.logging.output_logger.Out object at 0x114357820> │ │ │ │ output_logger = <meltano.core.logging.output_logger.OutputLogger object at 0x114346850> │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /Users/stephen.hazeltine/Documents/Projects/meltano/meltano_venv_2/lib/python3.8/site-packages/m │ │ eltano/cli/elt.py:278 in _run_elt │ │ │ │ 275 │ │ │ if elt_context.only_transform: │ │ 276 │ │ │ │ log.info("Extract & load skipped.") │ │ 277 │ │ │ else: │ │ ❱ 278 │ │ │ │ await _run_extract_load(log, elt_context, output_logger) │ │ 279 │ │ │ │ │ 280 │ │ │ if elt_context.transformer: │ │ 281 │ │ │ │ await _run_transform(log, elt_context, output_logger) │ │ │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ context_builder = <meltano.core.elt_context.ELTContextBuilder object at 0x1142fdf70> │ │ │ │ elt_context = <meltano.core.elt_context.ELTContext object at 0x114373a00> │ │ │ │ log = <BoundLogger(context={'name': 'meltano', 'run_id': │ │ │ │ 'db41504f-d251-4bd1-8f0e-ef4a44bef9e9', 'state_id': │ │ │ │ '2022-12-02T183927--tap-workramp--target-bigquery'}, processors=[<function │ │ │ │ add_log_level at 0x103833700>, │ │ │ │ <structlog.stdlib.PositionalArgumentsFormatter object at 0x106b248e0>, │ │ │ │ <structlog.processors.TimeStamper object at 0x1044caf00>, │ │ │ │ <structlog.processors.StackInfoRenderer object at 0x106b247c0>, <function │ │ │ │ format_exc_info at 0x1038454c0>, <function │ │ │ │ ProcessorFormatter.wrap_… meltano/meltano