devshawn / kafka-gitops

🚀Manage Apache Kafka topics and generate ACLs through a desired state file.
https://devshawn.github.io/kafka-gitops
Apache License 2.0
320 stars 71 forks source link

Latest Docker version (0.2.15 - master) cannot parse state file #94

Open n2taylor opened 2 years ago

n2taylor commented 2 years ago

Hi, there's something wrong with the Docker version published with the latest tag (0.2.15, but possibly running master code?). It always gives a NPE when parsing the state file:

kafka-gitops -f state.yaml validate
java.lang.NullPointerException
    at java.util.Objects.requireNonNull(Objects.java:203)
    at com.devshawn.kafka.gitops.config.ManagerConfig_Builder.setConfigFile(ManagerConfig_Builder.java:221)
    at com.devshawn.kafka.gitops.config.ManagerConfig$Builder.setConfigFile(ManagerConfig.java:27)
    at com.devshawn.kafka.gitops.cli.ValidateCommand.generateStateManagerConfig(ValidateCommand.java:41)
    at com.devshawn.kafka.gitops.cli.ValidateCommand.call(ValidateCommand.java:25)
    at com.devshawn.kafka.gitops.cli.ValidateCommand.call(ValidateCommand.java:15)
    at picocli.CommandLine.executeUserObject(CommandLine.java:1783)
    at picocli.CommandLine.access$900(CommandLine.java:145)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2141)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2108)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1975)
    at picocli.CommandLine.execute(CommandLine.java:1904)
    at com.devshawn.kafka.gitops.MainCommand.main(MainCommand.java:84)

This same command works fine on the image tagged with 0.2.15. I suspect recent changes on master caused this but have no way to verify this.

joschi commented 2 years ago

This is a regression which was introduced by https://github.com/devshawn/kafka-gitops/pull/68, making the configuration file a mandatory parameter (and then ignoring its content 🙃).

joschi commented 2 years ago

@n2taylor If you're still interested, there's a release with a fix for this at https://github.com/joschi/kafka-gitops/releases/tag/0.2.16.