Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim configuration value string which contains blank prefix or suffix #13984

Conversation

hangc0276
Copy link
Contributor

Motivation

For broker.conf and proxy.conf, if user configure value string which contains blank prefix or suffix, it will parse failed for related configuration and cause broker startup failed.

For example, if user configure the metadataStoreUrl=" zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181 ", we will connect to zookeeper server failed due to the blank suffix, and it's hard to debug.

Modifications

  1. Trim the value string on PulsarConfigurationLoader load process.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API: (yes / no)
  • The schema: (yes / no / don't know)
  • The default values of configurations: (yes / no)
  • The wire protocol: (yes / no)
  • The rest endpoints: (yes / no)
  • The admin cli options: (yes / no)
  • Anything that affects deployment: (yes / no / don't know)

Documentation

Check the box below or label this PR directly (if you have committer privilege).

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jan 27, 2022
@merlimat merlimat merged commit fa47a9f into apache:master Jan 27, 2022
codelipenghui pushed a commit that referenced this pull request Jan 29, 2022
@codelipenghui codelipenghui added cherry-picked/branch-2.8 Archived: 2.8 is end of life cherry-picked/branch-2.9 Archived: 2.9 is end of life and removed cherry-picked/branch-2.8 Archived: 2.8 is end of life labels Jan 29, 2022
zymap pushed a commit that referenced this pull request Jan 30, 2022
@zymap zymap added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Jan 30, 2022
lhotari added a commit that referenced this pull request Feb 10, 2022
@lhotari lhotari added the cherry-picked/branch-2.7 Archived: 2.7 is end of life label Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker cherry-picked/branch-2.7 Archived: 2.7 is end of life cherry-picked/branch-2.8 Archived: 2.8 is end of life cherry-picked/branch-2.9 Archived: 2.9 is end of life doc-not-needed Your PR changes do not impact docs release/2.7.5 release/2.8.3 release/2.9.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants