spuru9 opened a new pull request, #29814:
URL: https://github.com/apache/flink/pull/29814
## What is the purpose of the change
`bin/config.sh` reads the flattened configuration line by line, and
`bash-java-utils.sh` keeps only the lines with the execution prefix. A
multi-line value, e.g. `env.java.opts.all` written as a YAML block scalar
(`|`), was flattened over several lines, so the scripts only saw `|`. The `|`
then breaks the `eval` in `flink-daemon.sh` / `flink-console.sh`, and the JVMs
start without any of these options, including the default Java 17 `--add-opens`.
## Brief change log
- `ConfigurationUtils#convertConfigToWritableLines`: in the flattened
output, string values with line breaks are joined into one line with single
spaces. Single-line values and the nested output used to rewrite `config.yaml`
are unchanged.
## Verifying this change
This change added tests and can be verified as follows:
- Added `ConfigurationUtilsTest` cases for all block scalar styles, CRLF
and surrounding whitespace, plus a check that the nested output keeps
multi-line values. Added
`FlinkConfigLoaderTest#testloadAndModifyConfigurationWithFlattenJoinsMultiLineValues`.
All new flattening tests fail without the fix.
- Manually started standalone clusters on macOS and in Linux containers
(Java 11, 17, 21), and JM/TM containers from an image based on
`flink:2.3.0-java17`, with multi-line `env.java.opts.*`. All options reach the
JVMs and WordCount finishes. Without the fix, startup logs `eval: syntax error
near unexpected token '|'`. The flattened default `config.yaml` is unchanged.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: yes (JVM options that
the `bin/` scripts read from multi-line values in `config.yaml` now take effect)
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Claude Code (Claude Opus 5.5)
--
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]