Closed skydread1 closed 1 year ago
Evaluating a cluster which contains ::consumer-config triggers a malli error
::consumer-config
malli
If we evaluate the cluster in the waterfall ns comment, we can reproduce the error:
waterfall
(require '[malli.dev]) (malli.dev/start!) (def clu (kafka-cluster {::nodes "localhost:9092" ::shapes [(shape/topic (constantly "sentence")) (shape/edn) (shape/value-only)] ::consumer-config {:position :beginning} ;; malli.core/extra-key ::group-id "tester1" ::topics ["sentence"] ::source-xform (map identity)})) ;=> ... Errors: {:in [0 :robertluo.waterfall/consumer-config], :message "disallowed key", :path [0 :robertluo.waterfall/consumer-config], :schema [:map {:closed true} [:robertluo.waterfall/nodes :robertluo.waterfall/nodes] [:robertluo.waterfall/shapes [:vector [:fn #object["malli.core$_instrument$fn__21038@cd4fc92"]]]] [:robertluo.waterfall/producer-config {:optional true} :robertluo.waterfall/producer-config] [:robertluo.waterfall/group-id {:optional true} :string] [:robertluo.waterfall/topics {:optional true} [:vector :string]] [:robertluo.waterfall/source-xform {:optional true} fn?]], :type :malli.core/extra-key, :value {:position :beginning}}
Add the registry key to waterfall/kafka-cluster mall schema
waterfall/kafka-cluster
Thanks for the reporting and the fix.
Problem
Evaluating a cluster which contains
::consumer-config
triggers amalli
errorIf we evaluate the cluster in the
waterfall
ns comment, we can reproduce the error:Suggestion
Add the registry key to
waterfall/kafka-cluster
mall schema