You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/03/11 10:10:29 UTC

[GitHub] [pulsar] fmiguelez commented on issue #9867: Script gen-yml-from-env.py does not work with array types

fmiguelez commented on issue #9867:
URL: https://github.com/apache/pulsar/issues/9867#issuecomment-796623650


   > You can try to use `[org.apache.pulsar.broker.authentication.AuthenticationProviderTls]` or `[org.apache.pulsar.broker.authentication.AuthenticationProviderTls,org.apache.pulsar.broker.authentication.AuthenticationProviderAthen]` to fetch values of array types.
   
   It will not work either. You can try your proposal yourself with (it fails with same error):
   
   ```shell
   docker run -e "PF_authenticationProviders=[org.apache.pulsar.broker.authentication.AuthenticationProviderTls]" apachepulsar/pulsar:2.7.0 bash -c "bin/gen-yml-from-env.py conf/functions_worker.yml; bin/pulsar functions-worker;"
   ```
   
   The problem is that they python script interprets the value as a string so final value you will see in yaml file will be:
   
   ```yaml
   authenticationProviders: '[org.apache.pulsar.broker.authentication.AuthenticationProviderTls]'
   ```
   
   I does not matter if you enclose the value in square brackets or not, final result will always be quoted (string) and thus provoke an exception on Java when trying to read it as a `Set<String>`. 
   
   I have some changes on the script so I when we finish testing it locally I will publish a pull request with the corrections to solve the issue.
   
   
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org