You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "goutamadwant (via GitHub)" <gi...@apache.org> on 2026/09/10 06:32:52 UTC
[PR] [Fix][Transform-V2] Honor JsonPath conversion error policies [seatunnel]
goutamadwant opened a new pull request, #12251:
URL: https://github.com/apache/seatunnel/pull/12251
### Purpose of this pull request
Fixes #9778.
JsonPath handles path-reading failures through its configured error policies, but destination-type conversion exceptions bypass those policies. For example, extracting `{"amount":"invalid"}` as `int` throws `NumberFormatException` even with column `SKIP`. Invalid dates and other conversion failures have the same problem.
Apply the existing policies at the conversion boundary, preserve the original cause, and report conversion failures with a dedicated error code. Shared JSON converters are unchanged. This addresses the remaining conversion-error gap, not the date-field-context fix already merged in #10390.
### Does this PR introduce _any_ user-facing change?
Yes. Conversion failures now honor the documented policies:
- Column `SKIP` sets the destination field to null and continues processing other columns.
- Column `SKIP_ROW` skips the row.
- Without a column policy, `row_error_handle_way` applies.
- Explicit column `FAIL` still takes precedence over row-level `SKIP`.
The default remains `FAIL`. Valid values, null handling, table IDs, and CDC row kinds are preserved. No configuration options or dependencies are added. English and Chinese documentation clarify the behavior.
### How was this patch tested?
- Reproduced conversion failures before the fix.
- Added 12 regression cases covering numeric, temporal, binary, array and map conversion errors; policy precedence; valid/null values; date formatter reuse; and unrelated source failures.
- Ran the transform module and prerequisite-module test suites on Java 8 and Java 11: 1,640 tests passed on each, with no failures or skips.
- Formatting checks and reactor packaging passed on both runtimes.
```bash
mvn -pl seatunnel-transforms-v2 -am -DskipIT verify
```
Connector/engine E2E tests were not run locally.
### Check list
* [x] New dependency license notices: not applicable; no dependencies added.
* [x] Updated English and Chinese documentation.
* [x] Reviewed compatibility: existing options and defaults remain unchanged; this restores documented error handling.
* [x] Connector registration, distribution, labels and plugin configuration updates: not applicable; no connector added or changed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Transform-V2] Honor JsonPath conversion error policies [seatunnel]
Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on PR #12251:
URL: https://github.com/apache/seatunnel/pull/12251#issuecomment-5673465393
@DanielLeens Update in 4a4baaa6b:
Synced dev to include #12302 for the S3 dry-run image failure. No JsonPath behavior changed in this update. Fresh CI has been triggered; the previous OpenGauss restore failure remains distinct from the Pulsar registry connection reset.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Transform-V2] Honor JsonPath conversion error policies [seatunnel]
Posted by "DanielLeens (via GitHub) via commits" <co...@seatunnel.apache.org>.
DanielLeens commented on PR #12251:
URL: https://github.com/apache/seatunnel/pull/12251#issuecomment-6557117609
Thanks for keeping this contribution moving. I need to update the merge-gate information on unchanged head `eb95e7ec00dbcbcd5bb927fed7cf3f2fcd9e6d63`: GitHub currently reports actual content conflicts with `dev` (`CONFLICTING` / `DIRTY`). This supersedes the earlier no-conflict/blocked snapshot; it is a content-conflict request, not a sync request based solely on branch age.
Please sync the latest `dev` and resolve the conflicts while preserving both this PR's intended change and the intervening upstream changes, then obtain required checks on the resulting head.
My latest source-level clearance remains unchanged. The existing runner-loss CI failure is separate from this content conflict; do not patch JsonPath code to chase that infrastructure signal. The [preceding complete source review](https://github.com/apache/seatunnel/pull/12251#pullrequestreview-5720918311) remains the source assessment; this is a gate clarification, not another full review or a new list of source findings.
Current existing-head checks: [Build](https://github.com/apache/seatunnel/runs/123937465428)=FAILURE. Compare `diverged`, ahead 19 / behind 9. Checked 2026-11-01T11:08:13.478002+00:00. Daniel has READ repository permission; final effective approval/dismissal and merge belong to a write-capable maintainer. Happy to review the resulting head once the conflict is resolved.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Transform-V2] Honor JsonPath conversion error policies [seatunnel]
Posted by "goutamadwant (via GitHub) via commits" <co...@seatunnel.apache.org>.
goutamadwant commented on PR #12251:
URL: https://github.com/apache/seatunnel/pull/12251#issuecomment-6651163199
Thanks @SEZ9. These refer to head `ab016a9042`; no new push.
- F3: Not implemented; it behaves like `FAIL`. `handleConversionError` throws for any non-`SKIP` policy (`JsonPathTransform.java:236-248`) and the row handler rethrows it (`AbstractSeaTunnelTransform.java:94-107`). Documented at `jsonpath.md:26-30`, `:85`, `:261-262`; tested at `JsonPathErrorHandlingTest.java:545-557`. Routing needs a second output table, like DataValidator, so I'd leave it for a follow-up.
- F4: Yes: `jsonpath.md:20-31`, `:83-86`, `:252-284`, example `:286-301` (zh `:20-30`, `:82-84`, `:250-273`, `:275`).
- F5: Yes: `incompatible-changes.md:281-287` (zh `:229-233`).
- F6: Still separate. The policy cases use the public config API. Only 5 of 24 tests reflect into `converters` (`:660-669`), to inject cyclic chains, wrapped `Error`s and suppressed payloads that real JSON can't produce. A rename fails with `NoSuchFieldException`. I can move the public-API cases into `testErrorHandleWay` if you prefer.
- F8: Yes, path-read errors only (`JsonPathTransform.java:288`); conversion failures have no cause. `ErrorDataTransformException` has no cause constructor (`ErrorDataTransformException.java:31-54`), and the row handler needs its `errorHandleWay`.
CI: all-connectors-it-3 (17) timed out; a re-run of the failed job started today.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Transform-V2] Honor JsonPath conversion error policies [seatunnel]
Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on PR #12251:
URL: https://github.com/apache/seatunnel/pull/12251#issuecomment-5743950872
Synced dev to pick up the merged RocketMQ fixes. JsonPath behavior is unchanged; 41 JsonPath tests and 23 adjacent JSON serialization tests pass on Java 11. Fresh CI is queued; remaining shared CDC/checkpoint failures are tracked separately.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Transform-V2] Honor JsonPath conversion error policies [seatunnel]
Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on PR #12251:
URL: https://github.com/apache/seatunnel/pull/12251#issuecomment-5748012127
Addressed in `74defe3d5`: only recognized data-conversion failures follow the skip policies. Unexpected converter failures, unsupported types, incomplete/cyclic cause chains and fatal errors remain non-skippable. Conversion diagnostics and DEBUG skip logs now omit source/extracted values, path expressions and raw causes, while retaining field/type context. A bounded value or attached cause could still expose payloads, so neither is retained.
EN/ZH docs now cover row/column precedence, an invalid-int example, unsupported ROUTE_TO_TABLE behavior and the JSONPATH_ERROR_CODE-07 compatibility change. The existing E2E fixture includes invalid-int SKIP. Real nested-row tests use typed configuration; reflection stays local to synthetic fault injection, avoiding a production test hook. The focused conversion suite stays separate from existing path tests. No cause constructor is needed on the new cause-free conversion path; legacy path handling is unchanged.
Verified red-before-green: the 51-test run had 25 assertion failures before the fix and now passes with zero failures/errors/skips; reactor verify and Spotless also pass. Docker E2E remains unrun. This does not claim payload sanitization for legacy path errors or unexpected failures.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Transform-V2] Honor JsonPath conversion error policies [seatunnel]
Posted by "SEZ9 (via GitHub) via commits" <co...@seatunnel.apache.org>.
SEZ9 commented on PR #12251:
URL: https://github.com/apache/seatunnel/pull/12251#issuecomment-6568404646
Thanks for keeping this branch current. Head `ab016a9042bcb469c8221f662859cf69d1d92b0d` is a plain merge of `dev` on top of `eb95e7ec`, so the Java sources, tests and E2E fixture are unchanged from the previously reviewed head and only the two `incompatible-changes.md` files differ. Updating my earlier findings against that:
**Resolved**
- F2 (blanket `catch (RuntimeException e)`): `isDataConversionFailure` now accepts only `NumberFormatException`, `DateTimeException`, `FORMAT_DATE_ERROR`/`FORMAT_DATETIME_ERROR` and `JSON_OPERATION_FAILED` wrappers whose remaining causes are themselves recognized, returns false for unknown or cyclic chains, and a nested `Error` is rethrown unchanged. That is the fail-closed behaviour I was after, so this is closed.
- F1 / F7 (source JSON embedded in the exception message): the diagnostics now omit record, value, path and raw cause, which addresses both the log-leak and the master-propagation concern. Closed.
**Still need confirmation from you** (a short per-item answer is enough):
- F3: when `ROUTE_TO_TABLE` is configured for `column_error_handle_way` or `row_error_handle_way`, does a conversion failure now route to the error table, or does it still fall through to `FAIL`? If the latter, please either implement it or document the limitation explicitly.
- F4: have the jsonpath transform docs been updated so that the `row_error_handle_way` section and the "Configure error data handle way" section/examples describe conversion failures as well as path failures, not just the `column_error_handle_way` entry?
- F5: since conversion failures under the default `FAIL` policy now surface as `ErrorDataTransformException` / `JSONPATH_ERROR_CODE-07` rather than the raw converter exception with its `COMMON-*` code, please confirm this is called out in `incompatible-changes.md` so users matching on the old code are not surprised.
- F6: is the new error-handling test still a separate class that reaches into a private field via reflection? I would prefer these cases folded into `JsonPathTransformTest#testErrorHandleWay` (or exercised through the public transform API) so the tests are not coupled to field names.
- F8: is the cause still attached via `initCause()`? If `SeaTunnelRuntimeException` already offers a cause constructor, please use that instead; otherwise a one-line note on why `initCause()` is required is fine.
Once you reply on F3–F8, I can finish the review.
<!-- streview-comment:2220 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Transform-V2] Honor JsonPath conversion error policies [seatunnel]
Posted by "DanielLeens (via GitHub) via commits" <co...@seatunnel.apache.org>.
DanielLeens commented on PR #12251:
URL: https://github.com/apache/seatunnel/pull/12251#issuecomment-6574855679
Thanks @SEZ9. To save @goutamadwant a round trip, here is where F3-F8 stand on the current head `ab016a9042bcb469c8221f662859cf69d1d92b0d`, from code and doc reading only (nothing executed locally). This head is the plain `dev` merge on top of `eb95e7ec`, so the Java sources and tests are the ones already covered in my last full review.
- **F3 (`ROUTE_TO_TABLE`):** it still behaves like `FAIL` on the conversion path, and that is documented as a limitation rather than implemented. `JsonPathTransform.handleConversionError` (`JsonPathTransform.java:236`) throws `ErrorDataTransformException` for any non-`SKIP` policy. `docs/en/transforms/jsonpath.md:26` says `ROUTE_TO_TABLE` is not implemented and is identical to `FAIL`, `:28-29` applies that to recognized conversion failures, and `:261` repeats it in the error-handling section.
- **F4 (docs):** the `row_error_handle_way` section (`jsonpath.md:20-29`), the column option text (`:83-85`) and the "Configure error data handle way" section (`:254-270`) all now describe recognized conversion failures (numbers, dates/times, binary and nested conversions) as well as path failures.
- **F5 (compat note):** `docs/en/introduction/concepts/incompatible-changes.md:275-289` has a "JsonPath Transform" entry saying that recognized conversion failures under `FAIL` surface as `ErrorDataTransformException` with `JSONPATH_ERROR_CODE-07` instead of the raw converter exception, and the sanitized-cause change. I only grepped the English file in this pass; the Chinese file was checked in my earlier full review of the same content.
- **F6 (test class):** unchanged. The cases are still in `JsonPathErrorHandlingTest`, which injects converters by reflecting into the private `converters` field for synthetic fault injection (`:666-668`). I treated this as a non-blocking Low in my review, since the assertions are on outcomes and would fail if the whitelist or precedence broke. If you prefer folding the policy matrix into `JsonPathTransformTest#testErrorHandleWay`, that is a reasonable optional cleanup, and the author can state the reason for keeping the separate class.
- **F8 (cause):** still `initCause()`, at `JsonPathTransform.java:288`, attaching a placeholder `JsonPathException("Original path-reading details omitted")` to the legacy path-read error. I raised the placeholder nature as a Low in my earlier review. @goutamadwant, a one-line note on why the cause constructor is not used would close it for the record.
On CI: the `Build` check on this head is now `TIMED_OUT` (https://github.com/apache/seatunnel/runs/124986656633), and it points to the fork run https://github.com/goutamadwant/seatunnel/actions/runs/41352854679. This is a status read, not a diagnosis. Please open that run and re-run only the failed or timed-out jobs ("Re-run failed jobs"); if the same job fails again, link it here. The branch is 0 commits behind `dev` and was mergeable at the time I checked, so no sync is needed. My source-level conclusion is unchanged: no non-CI blocker.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Transform-V2] Honor JsonPath conversion error policies [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #12251:
URL: https://github.com/apache/seatunnel/pull/12251#issuecomment-5771185165
Thanks @goutamadwant. `cba69e7ce` on top of `74defe3d5` already covers the conversion-path changes I went through in my last pass (fail-closed cause-chain whitelist, rethrowing `Error`, and conversion diagnostics carrying no record/value/path/cause), so nothing further is needed from you on those.
For the EN/ZH documentation and compatibility-note follow-up you describe (path exception now attached as the cause, plus the stack-trace section), I don't see a commit referenced in this thread yet. Could you point me to it? Once I can look at the diff I'll check it against the remaining points from my earlier review myself — `ROUTE_TO_TABLE` handling on the conversion-error path, the `row_error_handle_way` and "Configure error data handle way" sections, the compatibility note for the default `FAIL` behaviour, the test overlap/reflection, and how the cause is attached — rather than asking you to confirm each one. Happy to take another pass as soon as it's up.
<!-- streview-comment:1235 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Transform-V2] Honor JsonPath conversion error policies [seatunnel]
Posted by "davidzollo (via GitHub) via commits" <co...@seatunnel.apache.org>.
davidzollo merged PR #12251:
URL: https://github.com/apache/seatunnel/pull/12251
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Transform-V2] Honor JsonPath conversion error policies [seatunnel]
Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on PR #12251:
URL: https://github.com/apache/seatunnel/pull/12251#issuecomment-5772192752
Resolved the dev documentation conflict without changing the JsonPath behavior. The website failure is already addressed by apache/seatunnel-website#539; its earlier targeted retry was refused because the parent workflow was still active. The previous-head Windows failure was PayPalClientTest.closeWakesRetryWait. Neither log identifies a JsonPath regression.
Pushed in 251a76af9d9a. CI for the new head is pending; the results above are scoped verification, not a green aggregate-build claim.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Transform-V2] Honor JsonPath conversion error policies [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #12251:
URL: https://github.com/apache/seatunnel/pull/12251#issuecomment-5946888332
Thanks @goutamadwant for resolving the `dev` docs conflict in `251a76af9d9a` without changing the JsonPath behaviour, and for keeping the CI notes scoped rather than claiming a green aggregate build.
Before I can close out the earlier review points, I'd like to confirm the current state directly against the diff rather than from summaries. Could you help with the following?
- **ROUTE_TO_TABLE on the conversion-error path (F3)** and **docs coverage of `row_error_handle_way` / "Configure error data handle way" (F4)**: please point me to where in the current head these sections document the conversion case and the ROUTE_TO_TABLE behaviour, and which test pins it (I understand this landed around `74defe3d5`/`cba69e7c`, but I want to verify at `251a76af9d9a`).
- **Default `FAIL` compatibility note (F5)**: please confirm the note is present in both `incompatible-changes.md` files at the current head.
- **Cause attachment (F8)**: I understand `d121f9e7685` is docs-only. Can you state how the cause is attached in the current code (constructor vs. `initCause()`), and if it is `initCause()`, why that is preferred over the existing `SeaTunnelRuntimeException` cause constructors? Not blocking, just want the decision on record.
- **Test duplication / reflection into a private field (F6)**: still open as Low. If you want to keep the separate class, please restate the reason here so it isn't lost; otherwise folding the cases into `JsonPathTransformTest#testErrorHandleWay` would be my preference.
Two items I have no update on:
1. **Full source JSON in the exception message (F1/F7)**: is the entire record (plus the converter's own copy) still embedded in the message that propagates to engine logs / job failure status? If yes, please consider truncating or omitting the payload, or explain why keeping it is intended.
2. **Blanket `catch (RuntimeException e)` (F2)**: can you confirm that `isDataConversionFailure` narrows the skippable set so only recognised data-conversion failures are nulled at DEBUG and everything else still propagates?
Once CI for `251a76af9d9a` finishes, please ping here with the result and I'll do the final pass.
<!-- streview-comment:1472 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Transform-V2] Honor JsonPath conversion error policies [seatunnel]
Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on PR #12251:
URL: https://github.com/apache/seatunnel/pull/12251#issuecomment-5770137069
@DanielLeens Corrected the EN/ZH documentation and compatibility notes to explain that the path exception is newly attached as the cause, including the additional stack-trace section. Existing path-reading policies are unchanged. Documentation checks passed; this follow-up makes no runtime changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Transform-V2] Honor JsonPath conversion error policies [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12251:
URL: https://github.com/apache/seatunnel/pull/12251#issuecomment-6337549009
A merge-state follow-up so the earlier conclusion does not hide the current gate: GitHub now reports **merge conflicts** (`mergeable_state=dirty`) between `dev` and the unchanged head `b89875528d209051521b6c9876fd52a422fbaa1e`. The compare is `diverged`, ahead 17 and behind 48.
Please sync the latest `dev` and resolve the conflicts before the next merge attempt, then obtain checks for the resulting head. This request is specifically to resolve GitHub's reported conflicts; it is not based only on the behind count. The required Build is still timed out, so it also needs a successful result on the new head after the conflicts are resolved.
The earlier source-level conclusion is unchanged; this follow-up records a new merge-state gate rather than adding another code finding on the same head. Thanks for following through on this; a write-capable maintainer will still need to perform the final approval/merge step.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Transform-V2] Honor JsonPath conversion error policies [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12251:
URL: https://github.com/apache/seatunnel/pull/12251#issuecomment-6473858466
Thanks for the contribution. The merge-gate fact cited in my previous conclusion has changed: GitHub now reports a real merge conflict. This follow-up corrects that gate on the unchanged reviewed head; it is not another full source review or a sync request based only on being behind.
Gate snapshot (2026-10-28T15:56:22+00:00), head `93e8fc2ce92024d3443f458381121ba4e45ba6e2`: [Build](https://github.com/apache/seatunnel/runs/121073003561) is `SUCCESS`.
CI is green, but that does not remove the separate conflict gate below. My [previous source conclusion](https://github.com/apache/seatunnel/pull/12251#pullrequestreview-5642791786) and any independent source requests remain as recorded; no new effective approval or dismissal is performed by this clarification.
Separately, GitHub reports merge conflicts with `dev`. Please sync the latest base and resolve the conflicts first; the resulting new head needs checks and re-review. This conflict gate is independent of CI and existing source findings.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org