sudeephazra commented on PR #12293: URL: https://github.com/apache/seatunnel/pull/12293#issuecomment-6909426897
@DanielLeens Comments for incoming commit 6d9188efe9ba6161787cc3d5231a0cf31184927a related to issue `Duplicate spelling is lost before connector validation`. The evidence is: 1. [ConfigBuilder.java (line 255)](https://github.com/sudeephazra/seatunnel-adls-connector-v2/tree/ADLS_MergeConflict/seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/utils/ConfigBuilder.java:255) unwraps the parsed configuration into maps, then reparses those maps. This loses the original quoting of keys. 2. [ConfigMapPathUtils.java (line 64)](https://github.com/sudeephazra/seatunnel-adls-connector-v2/tree/ADLS_MergeConflict/seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/ConfigMapPathUtils.java:64) quotes only keys that cannot parse as paths. Both k and k are valid path expressions, so neither is protected. 3. Typesafe Config 1.3.3, the repository’s configured version, trims surrounding whitespace when parsing paths and stores entries by parsed path. Consequently, those two spellings become the same entry, overwriting one value. This follows directly from its [path parser](https://github.com/lightbend/config/blob/v1.3.3/config/src/main/java/com/typesafe/config/impl/PathParser.java#L249-L256) and [map conversion](https://github.com/lightbend/config/blob/v1.3.3/config/src/main/java/com/typesafe/config/impl/PropertiesParser.java#L75-L87). 4. [ADLSConfigValidator.java (line 99)](https://github.com/sudeephazra/seatunnel-adls-connector-v2/tree/ADLS_MergeConflict/seatunnel-connectors-v2/connector-file/connector-file-adls/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/adls/config/ADLSConfigValidator.java:99) can detect duplicates only when both raw entries survive. Once one disappears, the validator cannot recover it. The current branch already acknowledges this limitation: - [ADLSConfigValidatorTest.java (line 90)](https://github.com/sudeephazra/seatunnel-adls-connector-v2/tree/ADLS_MergeConflict/seatunnel-connectors-v2/connector-file/connector-file-adls/src/test/java/org/apache/seatunnel/connectors/seatunnel/file/adls/config/ADLSConfigValidatorTest.java:90) supplies a direct map preserving both spellings. It covers both insertion orders and identical/different values. - The en/zh source/sink documentation explicitly says CLI processing may collapse duplicates. - AzuriteWasbFileIT.java:183–199 now starts Azurite; there is no duplicate-key negative job there. -- 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]
