hutiefang76 opened a new pull request, #4365:
URL: https://github.com/apache/streampark/pull/4365
## What changes were proposed in this pull request
Issue Number: close #4203
This pull request updates `FlinkConfigurationUtils.extractArguments(String)`
to split program arguments while preserving quoted segments. This prevents
arguments such as Kafka `properties.sasl.jaas.config='... username="user"
password="pass";'` from being split into multiple program arguments because of
spaces inside the quoted value.
## Brief change log
- Add quote-aware splitting before delegating to the existing
`extractArguments(Array[String])` logic.
- Keep existing array-based argument normalization unchanged.
- Add a regression test for Kafka JAAS config values with spaces and nested
double quotes.
## Verifying this change
This change added tests and can be verified as follows:
- Added
`PropertiesUtilsTestCase#testExtractProgramArgsKeepsQuotedKeyValueWithSpaces`.
- Verified the new test failed before the fix because the JAAS config value
was split across multiple arguments.
- Ran locally:
```bash
JAVA_HOME=$(/usr/libexec/java_home -v 17) ./mvnw -s
/tmp/codex-empty-maven-settings.xml -pl streampark-common -DskipITs -DskipRat
-DfailIfNoTests=false -Dtest=PropertiesUtilsTestCase test
```
Result: `Tests run: 3, Failures: 0, Errors: 0, Skipped: 0`.
- Ran the full `streampark-common` test target locally:
```bash
JAVA_HOME=$(/usr/libexec/java_home -v 17) ./mvnw -s
/tmp/codex-empty-maven-settings.xml -pl streampark-common -DskipITs -DskipRat
-DfailIfNoTests=false test
```
Result: `Tests run: 12, Failures: 0, Errors: 0, Skipped: 0`.
## Does this pull request potentially affect one of the following parts
- Dependencies (does it add or upgrade a dependency): no
--
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]