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/06 04:14:15 UTC

[pulsar] branch branch-2.6 updated: 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.6
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-2.6 by this push:
     new 48389cc  Fix regression in apply-config-from-env.py (#9097)
48389cc is described below

commit 48389cccb793cb29972b64d8ef84360bc7769f39
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 = "********"