You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2021/01/07 02:38:00 UTC

[pulsar] 01/03: Fix regression in apply-config-from-env.py (#9097)

This is an automated email from the ASF dual-hosted git repository.

penghui pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit a32782944e1e7f7da8f4bc1cb2483cb137259bd2
Author: lipenghui <pe...@apache.org>
AuthorDate: Mon Jan 4 08:54:35 2021 +0800

    Fix regression in apply-config-from-env.py (#9097)
    
    ### Motivation
    
    Fix the regression that introduced in #8709
    
    In #8709, if values contain spaces, the value will be wrapped as "value", this will introduce break changes while users already have some configs with the value that contains spaces, so this PR is reverting this change.
    
    If users want to ensure some values are processed as a group, they should use `export key=\"value\"` instead of implicitly adding `""` when encountering spaces
    
    (cherry picked from commit 4ad499d56307d52f616e4dbfd0bbd3693c26d14b)
---
 docker/pulsar/scripts/apply-config-from-env.py | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/docker/pulsar/scripts/apply-config-from-env.py b/docker/pulsar/scripts/apply-config-from-env.py
index 948254b..992b8f7 100755
--- a/docker/pulsar/scripts/apply-config-from-env.py
+++ b/docker/pulsar/scripts/apply-config-from-env.py
@@ -57,10 +57,6 @@ for conf_filename in conf_files:
     for k in sorted(os.environ.keys()):
         v = os.environ[k].strip()
 
-        # Quote the value if it contains a space.
-        if v.find(" ") >= 0:
-            v = '\"%s\"' % v
-
         # Hide the value in logs if is password.
         if "password" in k:
             displayValue = "********"
@@ -81,10 +77,6 @@ for conf_filename in conf_files:
         if not k.startswith(PF_ENV_PREFIX):
             continue
 
-        # Quote the value if it contains a space.
-        if v.find(" ") >= 0:
-            v = '\"%s\"' % v
-
         # Hide the value in logs if is password.
         if "password" in k:
             displayValue = "********"