This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-13
Channels
- # admin-announcements (2)
- # beginners (27)
- # boot (85)
- # cider (24)
- # cljs-dev (20)
- # cljsrn (16)
- # clojure (73)
- # clojure-brasil (2)
- # clojure-czech (152)
- # clojure-dusseldorf (7)
- # clojure-france (3)
- # clojure-japan (1)
- # clojure-norway (1)
- # clojure-poland (7)
- # clojure-russia (140)
- # clojure-uk (7)
- # clojurescript (66)
- # cursive (20)
- # datomic (8)
- # emacs (7)
- # events (1)
- # hoplon (325)
- # jobs (2)
- # jobs-discuss (69)
- # leiningen (3)
- # off-topic (6)
- # om (48)
- # onyx (82)
- # parinfer (1)
- # planck (10)
- # re-frame (53)
- # reagent (8)
- # ring (103)
- # untangled (13)
- # yada (14)
I’m trying to update a 0.8.11.0 generated app to 0.9.1 (as exercise and because I like the generated app in structure). Looking at the changelog I only need to update
:onyx/id
=> :onyx/tenancy-id
. However I get this error (in the logs) when running the one test: Assert failed: (invariants/active-job-invariant %)
. The test succeeds, but I wonder what it means. I saw that putting some delay in the tests actually gets rid of the errorhi @jeroenvandijk. Hmm, that’s interesting.
We really need to upgrade the template to 0.9. So you just updated the generated app to 0.9.1 and ran the test?
Yeah and i changed the onyx/id to onyx/tenancy-id in the configs
i can do it again and push it to github if it’s helpful
OK, cool. I’ll look into it. That shouldn’t happen but I wonder if there’s an element of timing with it.
I’m going to do that anyway, so don’t worry about it
ok cool
hmm, it works fine for me
I did upgrade to 0.9.3 though
Lemme downgrade
Oh wait nevermind
my previous “fix” (adding a print statement) doesn’t seem to help anymore
lein ancient didn’t upgrade it because the test failed
Ok (Thread/sleep 10)
gives me no background errors
This test
(deftest onyx-dev-job-test
(let [id (java.util.UUID/randomUUID)
config (load-config)
env-config (assoc (:env-config config) :onyx/tenancy-id id)
peer-config (assoc (:peer-config config) :onyx/tenancy-id id)]
;; Be sure to set the peer count (5 here) to a number greater than
;; the amount of tasks in your job.
(with-test-env [test-env [5 env-config peer-config]]
(let [job (build-job :dev)
{:keys [write-lines]} (get-core-async-channels job)
_ (validate-enough-peers! test-env job)
{:keys [job-id]} (onyx.api/submit-job peer-config job)]
;; FIXME When running test get this error "Assert failed: (invariants/active-job-invariant %)"
(Thread/sleep 10)
(feedback-exception! peer-config job-id)
(let [results (take-segments! write-lines)]
(is (= 4 (count results)))
(is (= :done (last results))))))))
could you post the stack trace for me?
I think I’m going to have some problems reproducing it locally
Great. Thanks
@jeroenvandijk: Could you please clone onyx from [email protected]:onyx-platform/onyx.git and lein install from branch reproduce-invariant-failure ?
You’ll need to switch the project to use 0.9.4-SNAPSHOT
once that’s done it should log the offending replica to onyx.log
ok, sure np
ok same error, will look into the log
it’s a log with just the output after running lein test
once
Perfect
@jeroenvandijk: could you pull one more time and run it again? I’m going to need see what the peer log entries are so I can see how we got here
@lucasbradstreet there you go
Thanks
Great, it is the only thing I thought it could be. Looks like you found a bug.
Yeah 😎
I don’t get the error on Circle CI (just tried)
Yeah, it’s definitely a timing related issue. It’s caused by this https://github.com/onyx-platform/onyx/issues/493 which I’ve been meaning to fix
I think the peer is getting an extra chance to write an exhaust-input log entry out before it stops processing the job
Ah ok, I’m still to new to understand that, but great that you found it so quickly
I’ll get a fix out soon. Thanks very much
Could you give it one pull / lein install and tell me if this fix works?
+1 I am getting the same error some times when running the same job. I am using onyx 0.9.0
@lucasbradstreet I’ve run it twice, no exceptions
Great. I’ll get 0.9.4 out now then
Cool, thanks
@jeroenvandijk, @aspra: 0.9.4 is released with that fix. All the plugins are going through the release process now, but it’s safe to use 0.9.3 plugins with them for now
I’ll do a new template release upgraded to 0.9.4 shortly
@lucasbradstreet thanks will upgrade
@lucasbradstreet after I upgraded the error has not appeared again!
Do people run the Onyx-dashboard against an in-jvm development cluster? It doesn’t seem to work well. When running against the cluster generated by docker-compose it works fine
@jeroenvandijk: Yeah, it should work fine though if your ZooKeeper goes down in between runs you may have to restart the dashboard.
@lucasbradstreet: thanks for confirming
By the way I’ve upgraded the template to 0.9.4. It’s mostly to bump it to 0.9.4 but there’s a fix to the metrics in there too. Those were broken.
Managed to get 3/4 of the Onyx team in the same city. Now we just need to get in the same room. 😛
@jeroenvandijk @aspra Thanks for the bug report.
@lucasbradstreet: Thanks for the upgrade of the template. I ran it over my existing application succesfully
The template doesn’t contain the Component repl functions. Is that on purpose? I think this is useful to add
I have copied the version here https://github.com/onyx-platform/onyx-starter/blob/0.9.x/env/dev/user.clj, but I suspect I did something wrong as I cannot connect with the dashboard properly when running (go)
The with-test-env macro ends up replacing a lot of the functionality that the user namespace used to offer
Yeah, generally we use with-test-env + clojure.tools.namespace.repl/refresh
Ah ok, will have a look. I saw something about it in the readme
@jeroenvandijk: maybe try adding a sleep to the _test file before the feedback exception call to keep the environment up long enough to connect to it with your dashboard?
i'm trying to start a cluster via the repl so I can submit jobs to it. I’m not trying to connect with the test env
Ah k, which is perfectly valid too
still need to use with-test-env
for that?
Nope, though I think I would still tend to, personally.
At least for dev
ok will have a look. Probably good to know how that works anyway
What you’re doing is fine too, and worth getting the hang of
onyx.test-helper has an overall component that you could use to help you out with a component/repl reloaded type workflow https://github.com/onyx-platform/onyx/blob/0.9.x/src/onyx/test_helper.clj#L106
That’s what’s used by with-test-env anyway
You could put that into your user.clj if you wish
Ah cool, that’s what I need
Thanks!
Ah great, now i can connect with the dashboard. Probably some subtle difference
Hoorah
Btw the onyx-seq README refers to :seq/elements-per-segment which is now deprecated
@zamaterian: Thanks, Ill get to that shortly.
@zamaterian: Fixed, thanks for the heads up. ^^
Sweet 😄
@jeroenvandijk: that's very nice