Skip to content

[Bug] Revert FlinkEnv config path persistence regression#4375

Open
michael1991 wants to merge 1 commit into
apache:dev-2.1.8from
michael1991:fix-flink-env-conf
Open

[Bug] Revert FlinkEnv config path persistence regression#4375
michael1991 wants to merge 1 commit into
apache:dev-2.1.8from
michael1991:fix-flink-env-conf

Conversation

@michael1991

Copy link
Copy Markdown

What is the purpose of the change

This PR reverts the regression introduced by 81b8161 from v2.1.7.

That commit changed FlinkEnv.doSetFlinkConf() to persist the absolute Flink config file path into t_flink_env.flink_conf.

However, existing read paths still expect flink_conf to be compressed Base64 content and call DeflaterUtils.unzipString(...), for example:

  • /flink/env/get
  • FlinkEnv.convertFlinkYamlAsMap()
  • FlinkEnvServiceImpl.getFlinkConfig(...)

When flink_conf contains a path such as:

  /data/flink/flink-1.20.5/conf/config.yaml

  Base64 decoding fails with:

  IllegalArgumentException: Illegal base64 character 2d

  This causes Flink Env view/edit and Application edit to return HTTP 500.

Brief change log

  • Revert FlinkEnv.doSetFlinkConf() to persist compressed config content.
  • Read the resolved Flink config file content.
  • Store t_flink_env.flink_conf as DeflaterUtils.zipString(...).

Verifying this change

Manually verified with Flink 1.20.5:

  1. Create a Flink Env with flink_home=/data/flink/flink-1.20.5.
  2. Confirm t_flink_env.flink_conf stores compressed Base64 content, not the config file path.
  3. Call /flink/env/get.
  4. Open the Application edit page.
  5. No Illegal base64 character 2d error occurs.

Does this pull request potentially affect one of the following parts

  • Dependencies: no
  • The public API: no
  • The schema: no
  • The default values of configurations: no
  • The behavior of t_flink_env.flink_conf: yes, restores the expected behavior used by existing read paths

@sonarqubecloud

Copy link
Copy Markdown

@michael1991

michael1991 commented Jun 25, 2026

Copy link
Copy Markdown
Author

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant