pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] tuteng opened a new pull request #6641: [hotfix]Python function protobuf missing field
Date Tue, 31 Mar 2020 05:02:13 GMT
tuteng opened a new pull request #6641: [hotfix]Python function protobuf missing field
URL: https://github.com/apache/pulsar/pull/6641
 
 
   
   
   ### Motivation
   
   At present, in the test, we found that due to the addition of a field `forwardSourceMessageProperty`
in the proto file of function, this field was lost in the proto file generated by python and
go. Due to python parsing with the following code:
   
   
   ```
   json_format.Parse(args.function_details, function_details)
   ```
   
   the following exception will be thrown. 
   
   ```
   2020-03-30T13:13:25.2339031Z 13:13:24.379 [pulsar-external-listener-20-1] INFO  org.apache.pulsar.functions.runtime.process.ProcessRuntime
- Started process successfully
   2020-03-30T13:13:25.2339190Z Traceback (most recent call last):
   2020-03-30T13:13:25.2340782Z   File "/pulsar/instances/python-instance/python_instance_main.py",
line 211, in <module>
   2020-03-30T13:13:25.2340944Z     main()
   2020-03-30T13:13:25.2342589Z   File "/pulsar/instances/python-instance/python_instance_main.py",
line 98, in main
   2020-03-30T13:13:25.2342744Z     json_format.Parse(args.function_details, function_details)
   2020-03-30T13:13:25.2354119Z   File "/usr/local/lib/python2.7/dist-packages/google/protobuf/json_format.py",
line 430, in Parse
   2020-03-30T13:13:25.2354284Z     return ParseDict(js, message, ignore_unknown_fields, descriptor_pool)
   2020-03-30T13:13:25.2354689Z   File "/usr/local/lib/python2.7/dist-packages/google/protobuf/json_format.py",
line 450, in ParseDict
   2020-03-30T13:13:25.2354882Z     parser.ConvertMessage(js_dict, message)
   2020-03-30T13:13:25.2355386Z   File "/usr/local/lib/python2.7/dist-packages/google/protobuf/json_format.py",
line 481, in ConvertMessage
   2020-03-30T13:13:25.2355537Z     self._ConvertFieldValuePair(value, message)
   2020-03-30T13:13:25.2356082Z   File "/usr/local/lib/python2.7/dist-packages/google/protobuf/json_format.py",
line 590, in _ConvertFieldValuePair
   2020-03-30T13:13:25.2356559Z     raise ParseError('Failed to parse {0} field: {1}.'.format(name,
e))
   2020-03-30T13:13:25.2357199Z google.protobuf.json_format.ParseError: Failed to parse sink
field: Message type "proto.SinkSpec" has no field named "forwardSourceMessageProperty".
   2020-03-30T13:13:25.2357634Z  Available Fields(except extensions): ['className', 'configs',
'typeClassName', 'topic', 'serDeClassName', 'builtin', 'schemaType'].
   ```
   
   This pr is mainly to fix the proto file generated by python first. In order to make the
test pass smoothly, I will gradually fix this problem in other languages in the next pull
request.
   
   
   ### Modifications
   
   * Enable build docker image to pulsar and pulsar-all.
   * Add new generated protobuf file for python
   
   ### Verifying this change
   
   The integration process passed https://github.com/AmateurEvents/pulsar/pull/22

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


With regards,
Apache Git Services

Mime
View raw message