hutiefang76 commented on PR #12443: URL: https://github.com/apache/seatunnel/pull/12443#issuecomment-6332626540
@SEZ9, the requested cases are already in `3d6c855f`. Here are direct links so you can check the current diff. The shared guard is [ConfigMapPathUtils](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/ConfigMapPathUtils.java#L41). It recurses through maps and lists and quotes only keys rejected by the same path parser. Its production call sites are: - [ReadonlyConfig.toConfig()](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/ReadonlyConfig.java#L79). - `ConfigBuilder`: [REST map](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/utils/ConfigBuilder.java#L111), [config adapter](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/utils/ConfigBuilder.java#L243), [variable backfill](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/utils/ConfigBuilder.java#L264), [user variable map](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/utils/ConfigBuilder.java#L278) and [merged user/system map](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb 3/seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/utils/ConfigBuilder.java#L292). - [ConfigShadeUtils decrypt re-parse](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/utils/ConfigShadeUtils.java#L229). The REST wording is in [EN](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/docs/en/engines/zeta/rest-api-v2.md#L923) / [ZH](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/docs/zh/engines/zeta/rest-api-v2.md#L894); the shared config explanation is in [EN](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/docs/en/introduction/concepts/config.md#L144) / [ZH](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/docs/zh/introduction/concepts/config.md#L144). Both distinguish invalid path keys, which stay literal, from valid expressions, which retain `->` splitting, quote removal and whitespace trimming. The requested regression cases are: - Regex through `decryptConfig`: [testInvalidPathKeysSurviveConfigShadeRoundTrip](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/seatunnel-core/seatunnel-core-starter/src/test/java/org/apache/seatunnel/core/starter/utils/ConfigBuilderTest.java#L48). - Quote/backslash and standalone `$`, `:` and `${FOO}` through encrypt/decrypt: [buildConfigShouldPreserveEscapedAndReservedKeysThroughConfigShade](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/seatunnel-engine/seatunnel-engine-server/src/test/java/org/apache/seatunnel/engine/server/utils/RestUtilTest.java#L75). - A top-level regex key through decrypt: [buildConfigShouldPreserveTopLevelInvalidPathKey](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/seatunnel-engine/seatunnel-engine-server/src/test/java/org/apache/seatunnel/engine/server/utils/RestUtilTest.java#L63). - Existing `->` splitting: [buildConfigShouldKeepValidPathExpressions](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/seatunnel-engine/seatunnel-engine-server/src/test/java/org/apache/seatunnel/engine/server/utils/RestUtilTest.java#L55); the whitespace boundary also has [its own case](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/seatunnel-core/seatunnel-core-starter/src/test/java/org/apache/seatunnel/core/starter/utils/ConfigBuilderTest.java#L75). - Actual HTTP submission: [testSubmitJobWithRegexFieldInJson](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/seatunnel-engine/seatunnel-engine-server/src/test/java/org/apache/seatunnel/engine/server/rest/RestApiSubmitJobConfigShadeDecryptTest.java#L191) and [RestApiIT.testSubmitJobWithJsonFormat](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/RestApiIT.java#L1372). The quoted HOCON path has [an additional RestApiIT case](https://github.com/apache/seatunnel/blob/3d6c855f30d0a0b915befbe29abea3e31e6e7bb3/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/RestApiIT.java#L1471). On the title, production changes are in `seatunnel-api` and `seatunnel-core-starter`; the engine/E2E changes are tests. The current `[Fix][Core]` prefix reflects the starter changes, which is why I kept it after the earlier scope discussion. CI is still not green, so that merge gate remains open. -- 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]
