hermannpencole / nifi-config

Automatically deploy and configure Template on Nifi
Apache License 2.0
55 stars 39 forks source link

updateConfig does not appear to work against NiFi 1.0.1 #9

Closed bbossola-tesco closed 7 years ago

bbossola-tesco commented 7 years ago

When I try to run my script against one of our environment, where unfortunately we have a 1.0.1 nifi, I get this error:

017-08-17 14:57:30 | INFO  | [main] c.g.h.n.c.s.UpdateProcessorService:157 - Update processor : GetHTTP
Exception in thread "main" com.github.hermannpencole.nifi.config.model.ConfigException: Bad Request: Message body is malformed. Unable to map into expected format.
        at com.github.hermannpencole.nifi.config.service.UpdateProcessorService.updateProcessor(UpdateProcessorService.java:189)
        at com.github.hermannpencole.nifi.config.service.UpdateProcessorService.lambda$updateComponent$3(UpdateProcessorService.java:138)
        at java.util.ArrayList.forEach(ArrayList.java:1249)
        at com.github.hermannpencole.nifi.config.service.UpdateProcessorService.updateComponent(UpdateProcessorService.java:138)
        at com.github.hermannpencole.nifi.config.service.UpdateProcessorService.updateByBranch(UpdateProcessorService.java:78)
        at com.github.hermannpencole.nifi.config.Main.main(Main.java:122)
Caused by: com.github.hermannpencole.nifi.swagger.ApiException: Bad Request
        at com.github.hermannpencole.nifi.swagger.ApiClient.handleResponse(ApiClient.java:1066)
        at com.github.hermannpencole.nifi.swagger.ApiClient.execute(ApiClient.java:989)
        at com.github.hermannpencole.nifi.swagger.client.ProcessorsApi.updateProcessorWithHttpInfo(ProcessorsApi.java:768)
        at com.github.hermannpencole.nifi.swagger.client.ProcessorsApi.updateProcessor(ProcessorsApi.java:753)
        at com.github.hermannpencole.nifi.config.service.UpdateProcessorService.updateProcessor(UpdateProcessorService.java:184)
        ... 5 more

Do you plan to support 1.0.x? If so, can this issue be fixed? Even sending an empty config (an array with no items) I get the same error, so it looks like a comm protocol issue of the underlying library.

hermannpencole commented 7 years ago

I had not planned to support nifi 1.0.X. But i will look at the problem.

hermannpencole commented 7 years ago

I have just set restricted to null on component.

Release 1.1.7 is created and have the correction (It is necessary to wait that oss.sonatype.org deploy the release on maven central otherwhise you can build immediatly your own snapshot).

Thanks for your collaboration

hermannpencole commented 7 years ago

If the correction is ok for you, could you close the issue. If not could you say what is wrong.

bbossola-tesco commented 7 years ago

I am sorry, I thought I commented and close it but apparent y I forgot. Yes, it works, thank you!