You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "Isha2790 (via GitHub)" <gi...@apache.org> on 2026/07/10 08:50:59 UTC
[PR] [Fix][Engine] Add defensive null checks to JobDAGInfo toJsonObject [seatunnel]
Isha2790 opened a new pull request, #11398:
URL: https://github.com/apache/seatunnel/pull/11398
<!--
Thank you for contributing to SeaTunnel! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
## Contribution Checklist
- Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/seatunnel/issues).
- Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
- Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
-->
### Purpose of this pull request
This pull request introduces comprehensive defensive null-checks in `JobDAGInfo.java` inside the `toJsonObject()` method to prevent potential `NullPointerException` (NPE) runtime failures during internal job configuration serialization or cluster state reporting via the REST API.
Specifically, this PR ensures that:
- Deep nested paths (e.g., `vertexInfo.getType().getType()`) check for intermediary null references.
- Potential null wrappers like `jobId`, `vertexId`, and list elements are safely handled with clean ternary operators rather than crashing the thread with unboxing or direct method access failures.
- Optional parameters like `envOptions` fallback safely to an empty JSON structure when absent.
### Does this PR introduce _any_ user-facing change?
No. This is a purely internal stabilization fix that hardens runtime execution safety. It does not alter behavior or configuration formats for users.
### How was this patch tested?
- This changes basic string-formatting serialization utility methods inside the `seatunnel-engine-core` sub-module.
- The module has been compiled and run locally to verify code correctness.
- The codebase formatting guidelines have been strictly preserved by executing `mvn spotless:apply` locally before final commit.
### Check list
* [ ] If any new Jar binary package adding in your PR, please add License Notice according
[New License Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md)
* [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
* [ ] If necessary, please update `incompatible-changes.md` to describe the incompatibility caused by this PR.
* [ ] If you are contributing the connector code, please check that the following files are updated:
1. Update [plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties) and add new connector information in it
2. Update the pom file of [seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
3. Add ci label in [label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
4. Add e2e testcase in [seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
5. Update connector [plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
--
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][Engine] Add defensive null checks to JobDAGInfo toJsonObject [seatunnel]
Posted by "dybyte (via GitHub)" <gi...@apache.org>.
dybyte commented on PR #11398:
URL: https://github.com/apache/seatunnel/pull/11398#issuecomment-4937242711
Please enable CI following [the instruction](https://github.com/apache/seatunnel/pull/11398/checks?check_run_id=86324931510).
--
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][Engine] Add defensive null checks to JobDAGInfo toJsonObject [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11398:
URL: https://github.com/apache/seatunnel/pull/11398#issuecomment-6285844698
Pushed `dbd0a75fd6d` on top of your branch, @Isha2790 (merge of the current `dev` plus one commit) to close the three open items:
1. Vertex-id gap: `inputVertexId` / `targetVertexId` go through a small `toStringOrNull` helper, so a null id renders as JSON null instead of throwing.
2. Broader coverage: `jobId` (JSON null when absent), `envOptions` (empty object when absent) and `vertexInfoMap` (empty array when absent) are guarded the same way; inside each `VertexInfo`, a null entry is skipped and a null `type` / `tablePaths` no longer fails. The method now has a Javadoc stating this contract.
3. Tests: new `JobDAGInfoTest` in `seatunnel-engine-core` covers the all-null no-arg instance, an edge with a null vertex id (plus a null edge in the list), and partial `VertexInfo` entries; each case fails on the previous head with a `NullPointerException`.
The PR description should be updated to match this scope (all fields of `JobDAGInfo`, not only `pipelineEdges`). Your fork has not produced a Build run yet; please enable GitHub Actions on it if needed and start the Build workflow from the Actions tab. I started a verification run of the same head on my fork: https://github.com/DanielLeens/seatunnel/actions?query=branch%3Apr11398-verify-dbd0a75fd6d
--
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][Engine] Add defensive null checks to JobDAGInfo toJsonObject [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #11398:
URL: https://github.com/apache/seatunnel/pull/11398#issuecomment-5192176627
Thanks for your contribution! This is a solid addition to the project, and your attention to detail really shows. Contributors like you are what keep this community moving forward. Feel free to keep the PRs coming — we're always glad to have you here!
Please ignore the following message if you have joined in the Slack~
```
To facilitate focused communication among contributors, we’ve created a brand-new dedicated #contributors channel in official Slack workspace.
Slack workspace link: https://s.apache.org/seatunnel-slack
This channel is designed for technical discussions, feature design brainstorming, roadmap sync and direct communication with project core Contributors. Everyone who contributes code, docs, test cases or community ideas is warmly invited to join, share thoughts and collaborate together under The Apache Way. Welcome to join 😄
```
--
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][Engine] Add defensive null checks to JobDAGInfo toJsonObject [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11398:
URL: https://github.com/apache/seatunnel/pull/11398#issuecomment-6339506971
Thanks for your patience. The upstream status has changed since my preceding note: [#12938](https://github.com/apache/seatunnel/pull/12938) merged into `dev` at 2026-10-22 10:26 UTC (merge `cc54bb433357b4cb45db9cd5d0743589c3111b79`). I checked that current dev contains the merge and that its diff restores the historical `AbstractMultiCatalogTransform` serialization UID and makes the construction-only config transient. My earlier instruction to wait for that fix is now superseded.
The archived-wrapper `LLMBooleanOutputTest.readsLegacyFactoryWrapperWithValidationDisabled` / `InvalidClassException` is the shared unit-test failure identified in the preceding review ([affected job](https://github.com/Isha2790/seatunnel/actions/runs/39573285512/job/119133706052)). This head is still `db2197412815492a756914021cb8157a0bc694cd`; the current `dev` comparison is `diverged`, ahead 4 / behind 10. Please sync with the latest `dev` and rerun the affected unit checks first, plus any stage whose log showed the same archived-wrapper error. Keep unrelated transform-serialization patches out of this PR. This is a targeted remedy for that known upstream failure, not a claim that syncing fixes every failed stage.
Other failed job families in the same head's run are `all-connectors-it-2`, `all-connectors-it-6`, `engine-resource-managers-it`, `engine-v2-it`, `hbase-connector-it`, `mysql-cdc-connector-it`, `transform-v2-it-part-2`. Their causes/results remain separate; this upstream patch does not establish that they pass. The existing source/documentation blockers in my preceding review remain open; the upstream CI correction clears none of those findings. Required CI and the final write-capable maintainer review remain gates. This is a CI-status follow-up only, with no new source findings or fresh full-review 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][Engine] Add defensive null checks to JobDAGInfo toJsonObject [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11398:
URL: https://github.com/apache/seatunnel/pull/11398#issuecomment-5149755484
Thanks for your contribution for Apache SeaTunnel.
To facilitate focused communication among contributors, we’ve created a brand-new dedicated #contributors channel in official Slack workspace.
Slack workspace link: https://s.apache.org/seatunnel-slack
This channel is designed for technical discussions, feature design brainstorming, roadmap sync and direct communication with project core Contributors. Everyone who contributes code, docs, test cases or community ideas is warmly invited to join, share thoughts and collaborate together under The Apache Way. Welcome to join us😄
--
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][Engine] Add defensive null checks to JobDAGInfo toJsonObject [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11398:
URL: https://github.com/apache/seatunnel/pull/11398#issuecomment-5149757394
Thanks for your contribution for Apache SeaTunnel.
To facilitate focused communication among contributors, we’ve created a brand-new dedicated #contributors channel in official Slack workspace.
Slack workspace link: https://s.apache.org/seatunnel-slack
This channel is designed for technical discussions, feature design brainstorming, roadmap sync and direct communication with project core Contributors. Everyone who contributes code, docs, test cases or community ideas is warmly invited to join, share thoughts and collaborate together under The Apache Way. Welcome to join us😄
--
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][Engine] Add defensive null checks to JobDAGInfo toJsonObject [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #11398:
URL: https://github.com/apache/seatunnel/pull/11398#issuecomment-5316849993
Thanks for the contribution! Summarizing what's still needed on the current head `5ac02727f834`:
1. **Vertex-id null gap in the guarded edge loop**: the new `edge != null` check isn't enough — `edge.getInputVertexId()` and `edge.getTargetVertexId()` can still be null before `.toString()` is called. Please handle that case as well.
2. **Broader null coverage in `JobDAGInfo.toJsonObject()`**: `jobId`, `envOptions`, and `vertexInfoMap` are still dereferenced without the null-safe treatment given to `pipelineEdges`, even though the no-arg constructor allows all fields to be null. Please apply the same guards there.
3. **PR description scope**: please either complete the coverage or narrow the description so it matches the actual null-safety changes in the diff.
On the CI side, please enable CI in your fork following the instructions here (thanks @dybyte for the pointer): https://github.com/apache/seatunnel/pull/11398/checks?check_run_id=86324931510 — and please sync your branch with the latest `dev` so we can separate baseline CI noise from the code-side fixes.
Happy to re-review as soon as a new revision is pushed.
<!-- streview-comment:190 -->
--
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][Engine] Add defensive null checks to JobDAGInfo toJsonObject [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11398:
URL: https://github.com/apache/seatunnel/pull/11398#issuecomment-4944509864
Thanks @SEZ9. I rechecked the same head `5ac02727f834` after your review, and I agree the current null-safety fix is still incomplete.
Your additional point about `edge.getInputVertexId()` and `edge.getTargetVertexId()` is valid: the new `edge != null` guard is not enough if either vertex-id wrapper itself is null before `.toString()` is called. I also agree the PR description currently overstates the scope of the fix relative to the actual diff on this head.
So from Daniel's side the current unchanged head still needs a code update before merge:
1. close the remaining vertex-id null-dereference gap inside the guarded edge loop
2. narrow or complete the PR scope so the description matches the actual null-safety coverage on this revision
The `Build` workflow is still `action_required` here:
https://github.com/apache/seatunnel/runs/86324931510
But enabling CI alone will not clear the PR yet — the source-side blocker remains open on this head.
--
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][Engine] Add defensive null checks to JobDAGInfo toJsonObject [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11398:
URL: https://github.com/apache/seatunnel/pull/11398#issuecomment-4937412161
Thanks for the CI ping.
The current `Build` run is still `action_required`, so please enable CI workflows in your fork first using this exact check entry:
https://github.com/apache/seatunnel/runs/86324931510
One important note from Daniel's side: enabling the workflow is not enough by itself for this PR yet. My earlier blocker on `JobDAGInfo.toJsonObject()` still stands on the current unchanged head, because the method still dereferences `jobId`, `envOptions`, and `vertexInfoMap` without the same null-safe treatment that was added for `pipelineEdges`. So after CI is enabled, I still need a code update for that null-coverage gap before I can clear the review.
--
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][Engine] Add defensive null checks to JobDAGInfo toJsonObject [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #11398:
URL: https://github.com/apache/seatunnel/pull/11398#issuecomment-6331510758
Re-checked head `db2197412815` against the previously reviewed head `dbd0a75fd6de`: the only new commit is a merge of `dev`, which touches neither of this PR's two files, so the previous findings still stand. Summary of what remains open:
**PR11398-F1 (Logic, MEDIUM)** – Edges with a null endpoint are still serialized with a null `inputVertexId` rather than dropped, which hands a dangling edge to the Web UI DAG renderer. Ask: skip the edge (and log it, see F3) instead of serializing a null endpoint.
**PR11398-F2 (Robustness, MEDIUM)** – Structural nulls (`pipelineEdges` / `vertexInfoMap` / `jobId`) still render as an empty DAG, and `BaseService` will cache that empty JSON for up to 10 minutes with nothing to diagnose it. Ask: either fail fast on these structural nulls or at minimum emit a WARN with the job id so the empty DAG is traceable.
**PR11398-F3 (Logic, MEDIUM)** – Null pipeline keys becoming `""` and null vertices/edges being silently dropped still masks corrupted DAG state. Ask: add logging at each drop/degrade point so an inconsistent DAG in the UI can be traced back to its cause.
**PR11398-F4 (Docs, LOW)** – The Javadoc still attributes the nulls to "partially written IMap entries". Ask: reword to the actual sources — the no-arg constructor and `LogicalDag` edges with a null `inputVertexId`.
**PR11398-F5 (Docs, LOW)** – The PR description still says "no user-facing change", but the REST job-detail JSON can now carry JSON null for `jobId`, `inputVertexId`, `targetVertexId` and `type` where the documented examples only show strings. Ask: update the description (and the documented examples if you keep the null rendering) so the contract change is explicit.
**PR11398-F6 (Test, LOW)** – `testToJsonObjectWithPartialVertexInfo` still identifies vertices by array index, which depends on `HashMap` iteration order. Ask: look vertices up by `vertexId` in the resulting array, or use an order-preserving map in the fixture.
F1–F3 all sit in `toJsonObject()`, so resolving them together in one pass should be straightforward. Once those are pushed I'll do another full re-review of the new head. Thanks for the continued work on this.
<!-- streview-comment:1936 -->
--
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][Engine] Add defensive null checks to JobDAGInfo toJsonObject [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11398:
URL: https://github.com/apache/seatunnel/pull/11398#issuecomment-4968431309
Rechecked the current head `5ac02727f834` against the latest `dev` after the CI / merge-gate fact changed.
## Runtime path rechecked
```text
same runtime path as the previous Daniel review on this unchanged head
```
## Merge conclusion
### Conclusion: still needs fixes before merge
1. Blocking items
- The source-side blockers from my previous Daniel review still stand on this unchanged head.
- Separately, this branch is behind upstream (`compare status: diverged`, `ahead_by=1`, `behind_by=10`), and the current failing gate is `FAILURE gate: Build`: https://github.com/apache/seatunnel/runs/86324931510
2. Lowest-cost next step
- Please sync with the latest `dev` and rerun the failing gate first so we can separate baseline CI noise from the remaining code-side fixes.
- After that, if the same source blocker is still unresolved, I would still keep this PR out of merge-ready state from Daniel's side.
--
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][Engine] Add defensive null checks to JobDAGInfo toJsonObject [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11398:
URL: https://github.com/apache/seatunnel/pull/11398#issuecomment-5323254498
Thanks @SEZ9 for consolidating the outstanding items — that matches exactly what I found on this same head (`5ac02727f834`): the vertex-id null gap inside the guarded edge loop, the broader null-safety gap on `jobId`/`envOptions`/`vertexInfoMap` in `JobDAGInfo.toJsonObject()`, and the PR description needing to match the actual diff scope.
There's still no new commit on the branch, so I don't have anything new to re-review yet. Once an update is pushed and CI has a chance to run on the new head, I'll take a fresh full pass. No rush — just flag me when it's ready.
--
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][Engine] Add defensive null checks to JobDAGInfo toJsonObject [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11398:
URL: https://github.com/apache/seatunnel/pull/11398#issuecomment-6338512806
Thanks @SEZ9 for spelling out the consumer-side concern. I treated that contract too lightly in my earlier review; sorry for that. I checked the actual UI path on unchanged head `db2197412815` and agree with your existing F1 rather than adding a duplicate finding:
`JobDAGInfo.toJsonObject` (65-69) emits an edge even when one endpoint is null. The DAG renderer at `seatunnel-engine-ui/src/components/directed-acyclic-graph/index.tsx:426-445` unconditionally constructs cells such as `node-null`, and converts the endpoint with Number(...); it does not filter that edge before constructing it. The logical-DAG packaging path also acknowledges a possible null input at `DAGUtils.java:169-172`. Rendering JSON successfully is therefore not enough to establish that the UI can consume the new value safely.
+1 to your F1 request to drop an edge with an absent endpoint and retain diagnostic context. The observability requests F2/F3 overlap my earlier note about silently substituted structural nulls; logging should explain the job/pipeline and degradation without claiming a partially written IMap value is a demonstrated cause. Please handle that alongside the null-endpoint regression case. The order-independent vertex assertions from your F6 are also the right way to avoid a HashMap-order assumption.
I am withdrawing the earlier "CI-only" characterization: the existing consumer-contract request is not cleared. This is a response to your existing findings, not a fresh full review or a new batch of numbered findings. Build also remains failed; the LLM fixture correction #12938 and template-provider proposal #12895 are still open, so current-dev sync alone is not a demonstrated cure for those failures. Please push the focused fix and then I will re-review the full updated diff. Final approval still belongs to a write-capable maintainer.
Current status evidence: head `db2197412815492a756914021cb8157a0bc694cd`, base `dev`, compare `diverged` (ahead 4, behind 8), mergeable state `blocked`.
CI references: [current Build check](https://github.com/apache/seatunnel/runs/119198636589), [Run / transform-v2-it-part-2 (11, ubuntu-latest)](https://github.com/Isha2790/seatunnel/actions/runs/39573285512/job/119133706428), [Run / mysql-cdc-connector-it (11, ubuntu-latest)](https://github.com/Isha2790/seatunnel/actions/runs/39573285512/job/119133707350).
--
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][Engine] Add defensive null checks to JobDAGInfo toJsonObject [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11398:
URL: https://github.com/apache/seatunnel/pull/11398#issuecomment-6310049422
Thanks @SEZ9 for the detailed pass on `dbd0a75fd6de`. Since that commit is the follow-up I pushed onto this branch, I went through each point against the code instead of just accepting them. Here is where I land, so @Isha2790 is not left with conflicting signals.
**Where I agree (small follow-ups, none of them blocking):**
- Issue 2 / Issue 3 (logging): agreed. The structural fallbacks (`pipelineEdges`, `vertexInfoMap`, `jobId`) are only reachable through the no-arg constructor or a broken producer, so a single `log.warn` with the job id and field name is cheap and makes "empty DAG" distinguishable from "corrupt DAG", especially because `BaseService` caches the rendered JSON for 10 minutes. This is the same point as my own Issue 1 in the previous review.
- Issue 4 (Javadoc): fair. The "partially written IMap entries" wording in `JobDAGInfo.java:50-51` is mine, and it is not accurate: a Hazelcast IMap value is one serialized blob, and `DAGUtils.getJobDAGInfo` always builds a complete object before `JobHistoryService.storeJobInfo` stores it. The honest sources of nulls are the Lombok no-arg constructor and defensive handling of hand-built instances. The wording should be changed to say that.
- Issue 6 (test ordering): agreed, `testToJsonObjectWithPartialVertexInfo` should use a `LinkedHashMap` (or look vertices up by `vertexId`). I flagged the same thing as Low in my previous review.
- Issue 5 (docs/PR description): agreed that the description should mention that missing scalars now render as JSON null; a one-line nullable note in the `jobDag` section of the REST docs would be a nice touch, but I would keep it optional.
**Where I read the code differently:**
- Issue 1 (dangling edge for a null endpoint): the premise that a null `inputVertexId` "happens for real on the logical-DAG path" does not hold in the current source. `LogicalDagGenerator.createLogicalEdges()` builds `new LogicalEdge(entry.getKey(), targetId)` from a map keyed by `inputAction.getId()`, so both ids are non-null. `LogicalEdge.writeData` calls `out.writeLong(inputVertexId)` and `readData` uses `in.readLong()`, so a `LogicalEdge` with a null id cannot even be serialized or deserialized (it would NPE on unboxing). The `e.getInputVertexId() != null` check at `DAGUtils.java:170` is purely defensive. That means the `{"inputVertexId": null}` edge is only reachable from a hand-built `Edge`, which is the case the test pins. I do agree the policy inside the loop is inconsistent (null `Edge` is skipped, null endpoint is kept), so I am fine with either skipping such an edge or keeping the JSON null; I would not call it Medium.
- `BaseService.getJobMetrics` (`BaseService.java:597-598`) dereferencing `vertexInfo.getConnectorType()`: true, but the same reasoning applies, a null `VertexInfo` value is not producible by `DAGUtils`. If we keep the null-vertex skip in `toJsonObject()`, the consistent options are a one-line `continue` on a null `vertexInfo` in those two loops (`BaseService.java:597` and the similar loop near `:760`) or no skip in the serializer at all. I would rather not widen this PR beyond the serializer unless the maintainers want it.
**Net:** no new blocker from my side. Suggested follow-up: fold the logging, Javadoc wording and `LinkedHashMap` changes into one small commit on this branch. CI on this head is red in jobs unrelated to this diff (see below), so a rerun is still needed before this can be merged.
CI note for `dbd0a75fd6de` (fork run for this head): the `unit-test` jobs fail only in `seatunnel-transforms-v2` (`LLMBooleanOutputTest.readsLegacyFactoryWrapperWithValidationDisabled`, `InvalidClass`), a module this PR does not touch; `JobDAGInfoTest` is not among the failures. The remaining red jobs are connector ITs (hbase, mysql-cdc, all-connectors-it, transform-v2-it).
--
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