Repository navigation
fix(converter): honour fail_on_error - #147
Closed
Ankur Gupta (ankur-pattern) wants to merge 1 commit into
Closed
Ankur Gupta (ankur-pattern) wants to merge 1 commit into
Ankur Gupta (ankur-pattern) wants to merge 1 commit into
Conversation
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.
Contributor
There was a problem hiding this comment.
🟢 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_errorinto the converter’s base configuration. - Tests enabled and unset values and preserves single-worker behavior.
- Documents error handling and ignored
task_concurrencyandcontextsettings.
| 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
Author
|
Closing: out of scope for DATA-12008. The bug it fixes still exists on main: the converter's YAML decoding copies only |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The converter decodes its own YAML and copied only
name, sofail_on_error: trueon a converter task was silently dropped. A failed conversion printederror in <task>and the run still exited 0. For example,data-airflow's Coupangconvert.yamlsets it so that a bad spreadsheet fails the job, and today it does not.This reads
fail_on_errortoo. A failed conversion with it set now fails the run. Without it, nothing changes.task_concurrencyandcontextare also ignored today, and this PR deliberately keeps it that way. Thecsvconverter keeps per-task state (columns,skip_first), so honouringtask_concurrencywould let workers race on it, anddata-airflowhas converter tasks withtask_concurrency: 5and20that would change behaviour. The README now says the converter runs one worker and ignorescontext.Effect on existing pipelines: the 6 converter tasks in
data-airflowthat setfail_on_errorwill start failing their run on a conversion error, which is what they ask for.Found while working on DATA-12008. This touches the same
mapperstruct as #145, so whichever merges second needs a small rebase.Types of changes
Checklist
Test plan
go test -race ./internal/pkg/pipeline/task/converter/:fail_on_erroris decoded when set and false when unset;task_concurrencystays 1.tsvread intoformat: xlsxwithfail_on_error: truenow ends withpipeline failed with errorsand exit 1 (exit 0 onmain)fail_on_erroron the converter still exits 0