| 2011-05-17 06:17:50 utc | biv | hey jmettraux - you awake? |
| 2011-05-17 06:18:14 utc | jmettraux | biv: hello, yes, how was the gym ? |
| 2011-05-17 06:18:26 utc | biv | haha, good thanks |
| 2011-05-17 06:18:34 utc | biv | still at basics tho |
| 2011-05-17 06:18:36 utc | biv | how are you? |
| 2011-05-17 06:18:51 utc | jmettraux | I'm doing fine |
| 2011-05-17 06:19:03 utc | biv | quick question, if that's ok |
| 2011-05-17 06:19:12 utc | jmettraux | please |
| 2011-05-17 06:19:40 utc | biv | Just wondering how much the DSL for ruote has changed between the current version of ruote - 2.2.0 - and 2.1.11 |
| 2011-05-17 06:19:52 utc | biv | Im hitting a bug with our ruote code and threading |
| 2011-05-17 06:20:05 utc | biv | sometimes a thread doesn't load the required classes properly (other times it does) |
| 2011-05-17 06:20:20 utc | biv | so the first step to fixing it, I think, is upgrading. Just wondering if that will be a big effort or not |
| 2011-05-17 06:20:43 utc | jmettraux | when it comes to the dsl, there aren't much changes |
| 2011-05-17 06:20:51 utc | biv | k |
| 2011-05-17 06:20:59 utc | biv | does the problem of thread class loading ring a bell? |
| 2011-05-17 06:21:23 utc | jmettraux | sorry, not much |
| 2011-05-17 06:21:25 utc | biv | k |
| 2011-05-17 06:21:41 utc | biv | it's happening with solr, particularly, a lot of class methods dont exist which should |
| 2011-05-17 06:21:52 utc | jmettraux | is it inside of Rails ? |
| 2011-05-17 06:22:07 utc | biv | kind of - we call a rake task to run the integration code |
| 2011-05-17 06:22:16 utc | biv | and the rake task loads the Rails environment first |
| 2011-05-17 06:22:24 utc | biv | the code always works if I just run one thread |
| 2011-05-17 06:22:42 utc | biv | but when I spawn more threads inside a service, then sometimes it fails, about 1/2 times |
| 2011-05-17 06:22:57 utc | biv | the way to fix it is to put the threads back to 1, run it, then start it with 5 threads and it will work |
| 2011-05-17 06:23:00 utc | biv | very strange |
| 2011-05-17 06:23:32 utc | jmettraux | and if you force some wait in the new threads, does it happen ? |
| 2011-05-17 06:23:54 utc | jmettraux | sounds like a require vs threads issue |
| 2011-05-17 06:24:36 utc | biv | yeh, that's it |
| 2011-05-17 06:24:51 utc | biv | my thinking was to find a list of explicit require statements to force each thread to run |
| 2011-05-17 06:24:57 utc | biv | but that could be a bit of work |
| 2011-05-17 06:25:10 utc | biv | anyway, let me upgrade to 2.2.0 and see what happens |
| 2011-05-17 06:25:17 utc | jmettraux | ok |
| 2011-05-17 06:25:41 utc | jmettraux | maybe, if it only chokes on solr, you could have a kind of require_solr with a mutex |
| 2011-05-17 06:26:01 utc | jmettraux | threads would only exit it when solr is fully loaded |
| 2011-05-17 06:26:25 utc | biv | yeh, solr is a bit of a nuisance here, actually |
| 2011-05-17 06:26:32 utc | biv | I wanted to turn it off on the integration run - simplest solution |
| 2011-05-17 06:26:35 utc | biv | won't stand for it |
| 2011-05-17 06:26:46 utc | biv | andromeda:ada-cms nicholas$ rake nesstar |
| 2011-05-17 06:26:46 utc | biv | (in /Users/nicholas/code/src/clients/anu/ADA-CMS) |
| 2011-05-17 06:26:47 utc | biv | rake aborted! |
| 2011-05-17 06:26:50 utc | jmettraux | ah, too bad |
| 2011-05-17 06:27:06 utc | biv | is there a doc I can read to catch up on migrating from 2.1.x to 2.2.0 ? |
| 2011-05-17 06:27:16 utc | jmettraux | sorry, not really |
| 2011-05-17 06:27:20 utc | jmettraux | ah well |
| 2011-05-17 06:27:22 utc | jmettraux | let me grab it |
| 2011-05-17 06:27:37 utc | biv | it's breaking on the first service def |
| 2011-05-17 06:27:41 utc | biv | engine.register_participant 'initialize_directory' do |workitem| |
| 2011-05-17 06:28:13 utc | jmettraux | http://jmettraux.wordpress.com/2011/03/02/ruote-2-2-0-released/ (changelog somehow) |
| 2011-05-17 06:28:18 utc | biv | k |
| 2011-05-17 06:28:28 utc | jmettraux | how does it break ? |
| 2011-05-17 06:28:52 utc | biv | let me gist it for you |
| 2011-05-17 06:30:03 utc | biv | https://gist.github.com/976043#comments |
| 2011-05-17 06:30:35 utc | biv | so, it's basically borking on the first workflow participant that's being called to do something |
| 2011-05-17 06:30:44 utc | biv | line 35 to line 80 |
| 2011-05-17 06:32:29 utc | jmettraux | ah |
| 2011-05-17 06:32:44 utc | jmettraux | yes, those block participants are not trusted anymore |
| 2011-05-17 06:32:58 utc | biv | k |
| 2011-05-17 06:32:59 utc | jmettraux | let me look up the way to disable that security check |
| 2011-05-17 06:33:08 utc | biv | ty |
| 2011-05-17 06:34:36 utc | jmettraux | in your engine configuration thing, you can say "engine.context['use_ruby_treechecker'] = false" |
| 2011-05-17 06:34:42 utc | biv | ok |
| 2011-05-17 06:34:51 utc | jmettraux | it will disable all security checks for process definitions and block participants |
| 2011-05-17 06:35:29 utc | jmettraux | if you still need those checks, you could port your participants from blocks to classes |
| 2011-05-17 06:35:34 utc | biv | didn't work ... I put @engine.context['use_ruby_treechecker'] = false on line 34 |
| 2011-05-17 06:35:42 utc | jmettraux | and re-activate the treechecker |
| 2011-05-17 06:36:20 utc | jmettraux | ouch |
| 2011-05-17 06:36:21 utc | jmettraux | my bad |
| 2011-05-17 06:36:53 utc | jmettraux | quick fix |
| 2011-05-17 06:36:59 utc | biv | no worries |
| 2011-05-17 06:37:07 utc | biv | if this is bad timing to ask you questions, all this can wait |
| 2011-05-17 06:37:13 utc | biv | just thought Id try upgrade it this arvo |
| 2011-05-17 06:37:22 utc | jmettraux | no, it's OK, no worries |
| 2011-05-17 06:37:27 utc | biv | cool |
| 2011-05-17 06:39:05 utc | jmettraux | remove the line 34 I told you to add |
| 2011-05-17 06:39:06 utc | jmettraux | and |
| 2011-05-17 06:39:10 utc | jmettraux | line 31 |
| 2011-05-17 06:39:26 utc | jmettraux | @storage = Ruote::FsStorage.new("/tmp/nesstar/ruote/", "use_ruby_treechecker" => false) |
| 2011-05-17 06:39:30 utc | jmettraux | should do the trick |
| 2011-05-17 06:39:56 utc | biv | ok |
| 2011-05-17 06:40:21 utc | biv | running .. |
| 2011-05-17 06:40:33 utc | biv | yeh that fixed that |
| 2011-05-17 06:40:54 utc | biv | now it's saying there's an unexpected end tho, weird |
| 2011-05-17 06:41:06 utc | biv | it ran in ruote 2.1.11 |
| 2011-05-17 06:41:21 utc | biv | from /Users/nicholas/.rvm/gems/ruby-1.9.2-p0/gems/ruote-2.2.0/lib/ruote/part/block_participant.rb:90:in `consume' |
| 2011-05-17 06:41:22 utc | biv | from /Users/nicholas/.rvm/gems/ruby-1.9.2-p0/gems/ruote-2.2.0/lib/ruote/svc/dispatch_pool.rb:94:in `do_dispatch' |
| 2011-05-17 06:41:22 utc | biv | from /Users/nicholas/.rvm/gems/ruby-1.9.2-p0/gems/ruote-2.2.0/lib/ruote/svc/dispatch_pool.rb:121:in `block in do_threaded_dispatch' |
| 2011-05-17 06:41:59 utc | jmettraux | 2.2.0 turns the block code in participants as a code string |
| 2011-05-17 06:42:04 utc | jmettraux | there are some issues sometimes |
| 2011-05-17 06:42:15 utc | biv | k, I dont mind rewriting that really |
| 2011-05-17 06:42:21 utc | jmettraux | which participant is failing ? |
| 2011-05-17 06:42:46 utc | biv | hard to say |
| 2011-05-17 06:42:58 utc | biv | I wonder if it's a threading thing |
| 2011-05-17 06:43:06 utc | biv | let me cut the threads back t 1 |
| 2011-05-17 06:43:56 utc | biv | it doesnt mention my code anywhere in the stack trace |
| 2011-05-17 06:44:18 utc | biv | https://gist.github.com/976043#gistcomment-31157 |
| 2011-05-17 06:44:22 utc | jmettraux | you could add some "p" or "puts" in /Users/nicholas/.rvm/gems/ruby-1.9.2-p0/gems/ruote-2.2.0/lib/ruote/part/block_participant.rb:90 |
| 2011-05-17 06:44:34 utc | jmettraux | to see which code is concerned |
| 2011-05-17 06:44:41 utc | biv | ok |
| 2011-05-17 06:45:54 utc | biv | this makes no sense |
| 2011-05-17 06:46:13 utc | biv | it's saying the error occurs on line 121 of block_participant |
| 2011-05-17 06:46:19 utc | biv | but the file only has 115 lines |
| 2011-05-17 06:46:35 utc | jmettraux | line 90 |
| 2011-05-17 06:46:59 utc | jmettraux | let me double-check |
| 2011-05-17 06:46:59 utc | biv | yah |
| 2011-05-17 06:47:10 utc | biv | outputting the block now |
| 2011-05-17 06:47:42 utc | biv | commented |
| 2011-05-17 06:47:48 utc | biv | https://gist.github.com/976043#gistcomment-31157 |
| 2011-05-17 06:47:53 utc | biv | maybe the rescue statement is screwing it up? |
| 2011-05-17 06:49:15 utc | jmettraux | just fed that into my IRB (ruby 1.9.2-p180) and it didn't complain |
| 2011-05-17 06:49:27 utc | biv | yeh |
| 2011-05-17 06:49:32 utc | biv | it's dropping an end statement |
| 2011-05-17 06:49:38 utc | biv | just before the ensure |
| 2011-05-17 06:49:44 utc | biv | in my src code there's one more there |
| 2011-05-17 06:49:59 utc | biv | in the original gist, look at line 167 |
| 2011-05-17 06:50:43 utc | jmettraux | ok |
| 2011-05-17 06:51:32 utc | biv | that must be a bug with the tree checker |
| 2011-05-17 06:51:56 utc | biv | er, altho probably not cos it's been turned off! |
| 2011-05-17 06:51:58 utc | biv | :) |
| 2011-05-17 06:52:23 utc | jmettraux | I spoke too fast, IRB is not happy |
| 2011-05-17 06:52:32 utc | jmettraux | let me redo the paste |
| 2011-05-17 06:52:35 utc | biv | also, another end statement is being dropped |
| 2011-05-17 06:52:44 utc | biv | there should be another after the ensure statement |
| 2011-05-17 06:52:46 utc | biv | yeh, no worries |
| 2011-05-17 06:53:21 utc | jmettraux | if an end statement is dropped, then that's it |
| 2011-05-17 06:53:35 utc | jmettraux | probably Sourcify doesn't know how to deal with that |
| 2011-05-17 06:53:50 utc | biv | ACTION nods |
| 2011-05-17 06:54:05 utc | jmettraux | there is a Sourcify 0.5.0 out, I wonder how it performs |
| 2011-05-17 06:54:17 utc | jmettraux | gem install sourcify would tell us immediately |
| 2011-05-17 06:54:24 utc | biv | righto |
| 2011-05-17 06:54:26 utc | jmettraux | (or you're using bundle) |
| 2011-05-17 06:54:32 utc | biv | Im using bundle |
| 2011-05-17 06:54:35 utc | biv | I can upgrade it |
| 2011-05-17 06:55:07 utc | jmettraux | just for a few tests |
| 2011-05-17 06:55:43 utc | jmettraux | sour-cify |
| 2011-05-17 06:55:43 utc | biv | no worries, just trying to install it now |
| 2011-05-17 06:55:47 utc | biv | gem 'ruote', '2.2.0' |
| 2011-05-17 06:55:48 utc | biv | gem 'sourcify', '>=0.5.0' |
| 2011-05-17 06:56:01 utc | biv | k |
| 2011-05-17 06:56:05 utc | jmettraux | I have to try it anyway on my side for ruote 2.2.1 |
| 2011-05-17 06:56:37 utc | biv | is it on github? |
| 2011-05-17 06:56:39 utc | jmettraux | does tests on my side |
| 2011-05-17 06:56:53 utc | jmettraux | https://github.com/ngty/sourcify |
| 2011-05-17 06:57:42 utc | biv | k, using latest from github, installing it now |
| 2011-05-17 06:58:18 utc | biv | ruote (= 2.2.0) depends on |
| 2011-05-17 06:58:19 utc | biv | sourcify (= 0.4.2) |
| 2011-05-17 06:58:19 utc | biv | sourcify (0.5.0) |
| 2011-05-17 06:58:36 utc | biv | need to update that in the gemspec I suppose |
| 2011-05-17 06:58:41 utc | jmettraux | :-( |
| 2011-05-17 06:59:16 utc | biv | that's cool |
| 2011-05-17 06:59:23 utc | biv | I can keep limping on with 2.1.11 |
| 2011-05-17 06:59:29 utc | biv | but let me know when you're ready to test with this |
| 2011-05-17 06:59:32 utc | biv | and I can jump into it |
| 2011-05-17 06:59:40 utc | jmettraux | 0.5.0 is OK with ruote master |
| 2011-05-17 06:59:42 utc | biv | it's on a branch for the project |
| 2011-05-17 06:59:48 utc | biv | ok, I'll try ruote master |
| 2011-05-17 06:59:59 utc | jmettraux | let me update the gemspec |
| 2011-05-17 07:00:13 utc | biv | k |
| 2011-05-17 07:00:13 utc | biv | \ |
| 2011-05-17 07:00:14 utc | jmettraux | I'm tempted to go the lazy way ">= 0.5.0" |
| 2011-05-17 07:00:21 utc | biv | that's all I do! |
| 2011-05-17 07:00:23 utc | biv | :D |
| 2011-05-17 07:00:26 utc | biv | give me 5 |
| 2011-05-17 07:02:14 utc | jmettraux | if it's too much pain, you can wrap the participant in a Class LoadStudyIntegrations include Ruote::LocalParticipant; def consume(workitem); ...; end; end |
| 2011-05-17 07:02:38 utc | jmettraux | with a "reply_to_engine(worktime)" at the end of the #consume method |
| 2011-05-17 07:02:57 utc | jmettraux | and it will be equivalent (and Sourcify won't steal "end"s) |
| 2011-05-17 07:06:26 utc | jmettraux | :-( |
| 2011-05-17 07:07:13 utc | biv | hrm |
| 2011-05-17 07:07:16 utc | biv | no, I'll try that |
| 2011-05-17 07:07:16 utc | jmettraux | this https://gist.github.com/976072 could show how sourcify behaves with the blocks |
| 2011-05-17 07:08:06 utc | biv | hrm, actually |
| 2011-05-17 07:08:13 utc | biv | I might play with this tomorrow |
| 2011-05-17 07:08:19 utc | biv | it's looking like a decent refactor |
| 2011-05-17 07:08:38 utc | biv | would it be easier if I just rewrote a lot of the participants to use the DSL which is considered secure? |
| 2011-05-17 07:09:15 utc | jmettraux | you wouldn't run into issues with Sourcify losing "end"s |
| 2011-05-17 07:09:29 utc | biv | do you have some examples of how the new DSL looks? |
| 2011-05-17 07:09:47 utc | jmettraux | from what I've seen so far, it's just a matter of gaming the block, like adding return nil at the end |
| 2011-05-17 07:09:54 utc | jmettraux | ok, let me look up for example |
| 2011-05-17 07:09:55 utc | jmettraux | s |
| 2011-05-17 07:12:05 utc | jmettraux | https://gist.github.com/976077 |
| 2011-05-17 07:12:19 utc | jmettraux | it's basically like ruby, without "do" and "end" |
| 2011-05-17 07:12:30 utc | jmettraux | and JSON-like for attributes |
| 2011-05-17 07:13:02 utc | jmettraux | the painful thing is that there aren't no syntax files for vim/emacs/mate for such a beast |
| 2011-05-17 07:13:21 utc | biv | hrm right |
| 2011-05-17 07:13:35 utc | biv | ok, I'm going to take some time to think through my options here |
| 2011-05-17 07:13:38 utc | biv | might hit it tomoz |
| 2011-05-17 07:13:41 utc | biv | thanks for your help |
| 2011-05-17 07:14:13 utc | jmettraux | you're welcome, don't hesitate to ask again tomorrow |
| 2011-05-17 07:14:21 utc | biv | will do |
| 2011-05-17 21:34:52 utc | jadams | hello all |
| 2011-05-17 21:35:04 utc | jadams | going to be using ruote in production for the first time soon (well, starting today) |
| 2011-05-17 21:35:05 utc | jadams | :) |
| 2011-05-17 21:35:11 utc | jadams | which is nice, since I have no idea how to use it so far |