Fork me on GitHub
#onyx
<
2016-09-15
>
aaelony00:09:06

will take a stab at it

smw05:09:17

How come the layout of onyx-starter is so vastly different than the onyx lein template?

lucasbradstreet05:09:04

@smw: starter is simpler and easy to understand. The template uses best practices, and more advanced techniques that will help you go to prod

smw05:09:24

wouldn’t component be considered a best practice?

lucasbradstreet05:09:28

You mean the repl reloaded workflow?

smw05:09:41

Frustrated with inability to stop/restart/reload in my project based on the template.

smw05:09:11

If you interrupt execution, the dev env ends up holding onto the port, etc.

lucasbradstreet05:09:30

I use clojure.tools.namespace.repl/refresh + with-test-env

smw05:09:31

I finally realized the starter repo had a system setup.

lucasbradstreet05:09:57

I almost never have issues ctrl-c'ing it

smw05:09:58

That’s beautiful.

smw05:09:19

I’m using cursive, maybe that’s the difference.

lucasbradstreet05:09:58

We're going to add a system as an option to the template but I recommend deving by running individual tests with clojure.test/run-test + repl/refresh. It will pretty much be a repl reloaded workflow when you do it right

lucasbradstreet05:09:16

Are you having trouble ctrl-c'ing the test, or is it something else?

smw05:09:49

Yeah… cursive has an ‘interrupt current execution’ button that I believe is effectively ctrl-c

smw05:09:08

so far about 90% of the time, I’m unable to restart a test after using it.

smw05:09:15

(port in use)

lucasbradstreet05:09:36

K hmm. Can you open a lein repl and try if manually for a bit? I like to put (clojure.tools.namespace.repl/refresh)(clojure.test/run-test 'your-test-ns) on the same line

smw05:09:58

Yeah, I’ll give that a shot.

lucasbradstreet05:09:32

The only time you should have to repl bounce is when you're connecting to thinks and they're timing out, or similar issues where it won't get a clean shutdown until you wait

smw05:09:30

What causes the dev-system to stop when an exception is thrown/task dies?

smw05:09:52

(I just found onyx.system from looking at the source to feedback-exception!)

smw05:09:30

defrecord OnyxTestEnv

lucasbradstreet05:09:20

Tasks are on their own threads, and won't cause the peers to die, just the job to be killed

smw05:09:23

(try
       (s/with-fn-validation [email protected])
       (catch InterruptedException e#
         (Thread/interrupted))
       (catch ThreadDeath e#
         (Thread/interrupted))
       (finally
         (component/stop ~symbol-name)))))

smw05:09:34

that’s with-test-env

smw05:09:42

so it obviously looks like it should be stopping?

smw05:09:08

or does the exception get sent to the job and not to the peer itself?

lucasbradstreet05:09:43

Exception message gets written to zookeeper, peers keeps going until the end of with-test-WBC

lucasbradstreet05:09:55

This is why you want feedback-exception! as it gives you a way to drop out of it if your job dies

smw05:09:32

so feedback-exception! monitors the zk log for the exception written by the job before it dies, right?

smw05:09:55

and then re-throws the exception so that it should end the test?

(throw (extensions/read-chunk log :exception job-id)))))

smw06:09:28

I’ll try it on the command line.

vladclj12:09:06

@lucasbradstreet again questions about retry-params (https://github.com/onyx-platform/onyx-http/commit/4b7c985bf065d570600597319027e9cc8b6abcdb) Is it only for Batch http-output ? or it's support also http-output

lucasbradstreet12:09:27

Only for batch output for now

lucasbradstreet12:09:34

Since we had a need

lucasbradstreet12:09:41

I will accept PRs which come with tests

lucasbradstreet12:09:27

Sorry, we don’t have the time to work on it ourselves for now

vladclj12:09:03

It is a very good feature and useful in real life, would be great for a http-output also retry-params

lucasbradstreet12:09:03

I agree that it’s very useful. We just don’t have the time to work on it. If you are interested in working on it, then I am happy to review PRs to do it

aaelony23:09:32

Just made a PR "Attempt to enable push to SSE encrypted s3 buckets". https://github.com/onyx-platform/onyx-amazon-s3/pull/2 Hope it is useful.