Skip to content

fix(converter): honour fail_on_error - #147

Closed
Ankur Gupta (ankur-pattern) wants to merge 1 commit into
mainfrom
fix/converter-fail-on-error
Closed

Ankur Gupta (ankur-pattern) wants to merge 1 commit into
mainfrom
fix/converter-fail-on-error

Conversation

@ankur-pattern

Copy link
Copy Markdown

Description

The converter decodes its own YAML and copied only name, so fail_on_error: true on a converter task was silently dropped. A failed conversion printed error in <task> and the run still exited 0. For example, data-airflow's Coupang convert.yaml sets it so that a bad spreadsheet fails the job, and today it does not.

This reads fail_on_error too. A failed conversion with it set now fails the run. Without it, nothing changes.

task_concurrency and context are also ignored today, and this PR deliberately keeps it that way. The csv converter keeps per-task state (columns, skip_first), so honouring task_concurrency would let workers race on it, and data-airflow has converter tasks with task_concurrency: 5 and 20 that would change behaviour. The README now says the converter runs one worker and ignores context.

Effect on existing pipelines: the 6 converter tasks in data-airflow that set fail_on_error will start failing their run on a conversion error, which is what they ask for.

Found while working on DATA-12008. This touches the same mapper struct as #145, so whichever merges second needs a small rebase.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • I have added tests to cover my changes.

Test plan

  • go test -race ./internal/pkg/pipeline/task/converter/: fail_on_error is decoded when set and false when unset; task_concurrency stays 1
  • A .tsv read into format: xlsx with fail_on_error: true now ends with pipeline failed with errors and exit 1 (exit 0 on main)
  • The same pipeline without fail_on_error on the converter still exits 0

The converter decodes its own YAML and only copied name, so fail_on_error was silently dropped and a failed conversion still exited 0. Read fail_on_error as well. task_concurrency and context stay unread because the csv converter keeps per-task state that concurrent workers would race on; the README now says so.
@ankur-pattern
Ankur Gupta (ankur-pattern) requested a review from a team as a code owner December 2, 2026 08:57
Copilot AI balanced review requested due to automatic review settings December 2, 2026 08:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the converter’s fail_on_error configuration change.

No open issues 🎉

What changed in this PR

Fixes converter configuration decoding so fail_on_error: true causes conversion errors to fail the pipeline, while preserving default behavior.

Changes:

  • Copies fail_on_error into the converter’s base configuration.
  • Tests enabled and unset values and preserves single-worker behavior.
  • Documents error handling and ignored task_concurrency and context settings.
File Description
internal/​pkg/​pipeline/​task/​converter/​unmarshal_test.go Tests error configuration and ignored concurrency.
internal/​pkg/​pipeline/​task/​converter/​README.md Documents supported and ignored settings.
internal/​pkg/​pipeline/​task/​converter/​converter.go Decodes and applies fail_on_error.

Review effort: Balanced

@ankur-pattern

Copy link
Copy Markdown
Author

Closing: out of scope for DATA-12008. The bug it fixes still exists on main: the converter's YAML decoding copies only name, so fail_on_error: true on a converter task is ignored and a failed conversion exits 0. The branch fix/converter-fail-on-error is kept if anyone wants to pick it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants