Skip to content

[FLINK-38587] Fix docker entrypoint script to preserve spaces in FLINK_PROPERTIES values#247

Open
wrmxs227 wants to merge 1 commit intoapache:masterfrom
wrmxs227:fix-flink-properties-spaces
Open

[FLINK-38587] Fix docker entrypoint script to preserve spaces in FLINK_PROPERTIES values#247
wrmxs227 wants to merge 1 commit intoapache:masterfrom
wrmxs227:fix-flink-properties-spaces

Conversation

@wrmxs227
Copy link

Motivation

When FLINK_PROPERTIES contains values with spaces (e.g. JVM options like
--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED --enable-preview),
the entrypoint script strips all whitespace using tr -d '[:space:]', causing
the options to be concatenated and become invalid.

Changes

Replace tr -d '[:space:]' with sed 's/^[[:space:]]*//;s/[[:space:]]*$//'
to only trim leading and trailing whitespace, preserving spaces within values.

Applied to all affected versions: 1.20, 2.0, 2.1, 2.2.

Testing

Verified with Docker Compose using a Flink 1.20.3 image with the fixed
entrypoint mounted. The WARNING about concatenated module options no longer
appears in the logs.

Related

https://issues.apache.org/jira/browse/FLINK-38587

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant