SEPURI-SAI-KRISHNA commented on PR #13238:
URL: https://github.com/apache/seatunnel/pull/13238#issuecomment-6814559418
Thanks, I read the diff against #13232 and the validator code on dev. The
rule, the removal of the constructor check, the rejected value in the message,
and the create/restore test match the acceptance criteria. Every production
path (Zeta parser, Flink, Spark, and the starter config check) goes through
`FactoryUtil.createMultiTableSink`, so moving the check there loses no
coverage. Two suggestions, neither blocking:
1. The new `catch (OptionValidationException e)` in
`FactoryUtil.createMultiTableSink` names `multi_table_sink_replica` and its
value for any validation failure of the factory rule. That is correct today,
because the rule has only this option. Once another option gets a rule there
(the #11007 direction), a bad value of that other option would be reported as
"with option 'multi_table_sink_replica' = 1", which points the user at the
wrong option. I tried it on dev with the same change plus a second rule,
`job.retry.times >= 0`: with replica `2` and retry `-1`, the error reads
"Unable to create a sink for identifier 'MultiTableSink' with option
'multi_table_sink_replica' = 2." while the cause names `job.retry.times`. Two
ways to keep it accurate:
- add the replica part only when the configured replica is actually below
1, and otherwise keep the generic message, or
- put the configured value into the generic value-constraint error in
`ConfigValidator`, which would help every option under #11007. That one needs
care for sensitive options such as passwords, which your test already guards
against.
2. The tests add 187 lines. The 256-value random sample in
`testReplicaOptionRuleMatchesPositiveIntegerRange` checks the same thing as the
fixed boundaries already listed there (`Integer.MIN_VALUE`, `-1`, `0`, `1`,
`4`, `Integer.MAX_VALUE`). AGENTS.md asks for minimal, deterministic tests, so
the fixed values alone may be enough.
The fork CI run for the head commit was still queued when I looked.
--
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]