Skip to content
This repository has been 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
kamituel opened this issue May 16, 2018 · 0 comments

Comments

@kamituel
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant