python-esppy
python-esppy copied to clipboard
Schema not validating with connector `configfilesection` property
There is a bug in serializing connector properties when using configfilesection. Example:
request_source = esp.SourceWindow(
name='request',
schema=('espid*:int64', 'clnt_id:double'),
index_type='empty', insert_only=True,
)
request_source.add_connector(
SocketPublisher(configfilesection='[REQS]')
)
In the end it gives xml like this:
<connectors>
<connector class="fs" name="c_w5y9lijs" type="publish">
<properties>
<property name="configfilesection">[REQS]</property>
</properties>
<properties/>
</connector>
</connectors>
The <properties/> is too much and chema does not validate giving an error
SPError: load project failed: DataOpsPython, /tmp/fileTwmtwN:28:28: error: element "properties" not allowed here; expected the element end-tag
Uploading this project from this xml, however, gives no errors.