This repository was archived by the owner on Jan 6, 2023. It is now read-only.
This repository was archived by the owner on Jan 6, 2023. It is now read-only.
Validation error for min-max-n-peers for flux policy is not printed correctly. #864
Open
Description
The following catalog entry:
{:onyx/name ::compute-average
:onyx/type :function
:onyx/batch-size batch-size
:onyx/batch-timeout batch-timeout
:onyx/group-by-fn ::some-grouping-fn
:onyx/flux-policy :kill}
fails validation when submitting a job. This is printed in the REPL:
------ Onyx Job Error -----
There was a validation error in your catalog for key 9
{:onyx/name :example/compute-average
:onyx/fn :clojure.core/identity
:onyx/type :function
:onyx/batch-size 5
:onyx/batch-timeout 50
:onyx/group-by-fn :nexample/some-grouping-fn
:onyx/flux-policy :kill }
------
The true reason it failed is revealed when validating by hand:
(require '[onyx.schema :refer [Job]])
(require '[schema.core :as schema])
(schema/validate Job job-map)
clojure.lang.ExceptionInfo: Value does not match schema: {:catalog [nil nil nil nil nil nil nil nil nil (not (valid-flux-policy-min-max-n-peers a-clojure.lang.PersistentArrayMap)) nil]}
So for this particular misconfiguration, the validation error is getting swallowed somewhere.
Metadata
Metadata
Assignees
Labels
No labels