adoroszlai commented on PR #7672: URL: https://github.com/apache/ozone/pull/7672#issuecomment-2592847174
Thanks @ivanzlenko for the patch. Repeating part of [my comment](https://issues.apache.org/jira/browse/HDDS-11590?focusedCommentId=17911640&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17911640) from the Jira issue. I don't think we should wrap configs in JSON string. 1. It adds unnecessary complexity. The Docker Compose bug only affects files references by `env_file`. We can include the same variables in the `docker-compose.yaml` file itself. 2. It is error-prone. E.g. we have to come up with unique name in each config file. 3. It also leads to unpredictable variable overriding behavior. With individual variables, any previous definitions are overridden by new ones, in the order they are defined, when Docker Compose reads the files. With wrapped variables, overriding happens in `envtoconf`, where order is not guaranteed to be the same. 4. It is hard to debug (see sample SCM startup failure below -- which config file does it refer to, and which config variable?) ``` Traceback (most recent call last): File "/opt/hadoop/libexec/envtoconf.py", line 130, in <module> Simple(sys.argv[1:]).main() File "/opt/hadoop/libexec/envtoconf.py", line 117, in main self.process_envs() File "/opt/hadoop/libexec/envtoconf.py", line 56, in process_envs conf_variables=json.loads(os.environ[key]) File "/usr/lib64/python3.9/json/__init__.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib64/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python3.9/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 7 column 1 (char 215) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
