nikhiln64 commented on PR #18434:
URL:
https://github.com/apache/dolphinscheduler/pull/18434#issuecomment-5099370124
Thanks @SbloodyS, all four points are addressed and pushed, and the branch
is rebased onto the latest dev.
The check is now centralized in a single
DataxParameters.isInlineJsonAbsent() method that both checkParameters and
DataxTask.buildDataxJsonFile call, so the duplicated literal comparison is
gone. It treats the inline json as absent when it is blank or when it parses to
a JSON object with no fields, so {}, { } and a formatted multi line empty
object are all recognized, while malformed json still counts as present so the
existing format validation reports it.
The UI validator in use-datax.ts applies the same semantic rule. A parsed
empty object without a resource file is now rejected with the same message as
an empty editor, and it is accepted when a resource file is selected, so the UI
and the worker agree on every combination.
DataxParametersTest now covers null, blank, {}, { } and a formatted empty
object, each both with and without a resource, plus the malformed json case and
the inline definition winning when both are present. The task level test now
feeds a formatted empty object through the real ResourceContext path and
asserts the generated job file carries the resource content. The full module
suite passes locally, 12 tests across DataxTaskTest and DataxParametersTest.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]