srkukarni commented on a change in pull request #2570: Fix BC issue in functions trigger function submitted by old CLI URL: https://github.com/apache/incubator-pulsar/pull/2570#discussion_r217209970
########## File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java ########## @@ -595,16 +594,23 @@ public Response triggerFunction(final String tenant, final String namespace, fin String inputTopicToWrite; if (topic != null) { inputTopicToWrite = topic; + } else if (functionMetaData.getFunctionDetails().getSource().getTopicsToSerDeClassNameMap().size() == 1) { Review comment: I think the right way of doing this would be to convert the old format into new format. Thus when you receive and decode a functiondetails proto, add a normalize method of some sort that puts all old style stuff into new style. The reason is because there are other pieces of code which will rely on data being present only in inputSpecs. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services