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 2020/12/02 09:45:07 UTC

[GitHub] [pulsar] vaihtovirta commented on a change in pull request #8780: Fix single-quotes added to user-conf

vaihtovirta commented on a change in pull request #8780:
URL: https://github.com/apache/pulsar/pull/8780#discussion_r534027994



##########
File path: pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/RuntimeUtils.java
##########
@@ -224,11 +226,13 @@
         ObjectMapper objectMapper = ObjectMapperFactory.getThreadLocal();
         String configContent = objectMapper.writeValueAsString(goInstanceConfig);
 
-        // Nit: at present, the implementation of go function depends on pulsar-client-go,
-        // pulsar-client-go uses cgo, so the currently uploaded executable doesn't support cross-compilation.
         args.add(originalCodeFileName);
         args.add("-instance-conf");
-        args.add("'" + configContent + "'");
+        if (k8sRuntime) {

Review comment:
       Why cannot we use a similar approach as for the Java and Python runtimes (`JsonFormat.printer`)?
   
   https://github.com/apache/pulsar/blob/a045d926c9620a3744a4bc755bf6f2a65209e6b6/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/RuntimeUtils.java#L349
   
   
   You're fixing the issue for non-k8s runtimes, but wouldn't the problem with json parsing still occur in k8s runtime?
   
   
   
   




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