2010-07-22 01:14:30 utc |
jmettraux |
test |
2010-07-22 07:30:09 utc |
lbt |
still here |
2010-07-22 07:33:02 utc |
jmettraux |
hello |
2010-07-22 07:35:19 utc |
lbt |
hi... sorry I've not been around much |
2010-07-22 07:35:43 utc |
jmettraux |
no worries |
2010-07-22 07:36:01 utc |
lbt |
I wanted to talk more interactively about the AMQP too :) |
2010-07-22 07:36:23 utc |
lbt |
I'm getting things pulled together for an internal deployment here |
2010-07-22 07:36:30 utc |
jmettraux |
cool |
2010-07-22 07:36:35 utc |
lbt |
so I need to get that finished first |
2010-07-22 07:36:54 utc |
lbt |
packaged all the ruoute dependencies for opensuse now |
2010-07-22 07:37:05 utc |
lbt |
so we can "zypper install ruote" |
2010-07-22 07:37:25 utc |
lbt |
I'll hand that off to the opensuse pkging team |
2010-07-22 07:37:39 utc |
jmettraux |
http://gembundler.com/ |
2010-07-22 07:37:42 utc |
lbt |
(discussed with them and should all be OK) |
2010-07-22 07:37:43 utc |
lbt |
yes |
2010-07-22 07:38:05 utc |
lbt |
some production environments have policies |
2010-07-22 07:38:12 utc |
lbt |
"thou shalt use packages" |
2010-07-22 07:38:14 utc |
jmettraux |
ah OK |
2010-07-22 08:09:53 utc |
jmettraux |
ah, replying now to your AMQP questions on the mailing list |
2010-07-22 08:34:49 utc |
jmettraux |
sorry for the late reply, was hidden by Asier's reply |
2010-07-22 08:43:55 utc |
jmettraux |
lbt: your http://github.com/lbt/amqp/commit/56da75f7c9cdc3362e60159fcaf3334ae26b837d commit is overkill |
2010-07-22 08:48:32 utc |
lbt |
it is? |
2010-07-22 08:48:44 utc |
lbt |
surely it should allow the standard headers to be addressed? |
2010-07-22 08:49:43 utc |
lbt |
and because the convention seems to be to share "opts" values between both headers and something else.. it's important to explicitly list the valid values in headers |
2010-07-22 08:50:27 utc |
lbt |
otherwise we could end up with an illegal value in headers which would close the connection - or we'd prohibit the sending of other values |
2010-07-22 08:50:51 utc |
jmettraux |
you're not preventing any illegal key nor illegal value from going there |
2010-07-22 08:50:55 utc |
lbt |
anyhow... that was my rationale at the time :) |
2010-07-22 08:51:20 utc |
lbt |
I thought merge(opts) would only overwrite? |
2010-07-22 08:51:27 utc |
lbt |
vs merge!(opts) |
2010-07-22 08:51:40 utc |
lbt |
bad ruby again? :) |
2010-07-22 08:51:52 utc |
jmettraux |
well |
2010-07-22 08:52:02 utc |
jmettraux |
delete if value is null is following |
2010-07-22 08:52:12 utc |
lbt |
yes... that cleans up |
2010-07-22 08:52:44 utc |
jmettraux |
{ 'a' => nil }.merge('evil_key' => 'evil_value')... |
2010-07-22 08:52:56 utc |
lbt |
yes... that was my concern |
2010-07-22 08:53:13 utc |
lbt |
and http://github.com/lbt/amqp/blob/56da75f7c9cdc3362e60159fcaf3334ae26b837d/lib/mq/exchange.rb#L279-280 |
2010-07-22 08:53:41 utc |
lbt |
so if I did a merge! then "routing_key" could end up in headers... |
2010-07-22 08:55:47 utc |
jmettraux |
it's not a merge vs merge! issue |
2010-07-22 08:55:59 utc |
lbt |
OK... |
2010-07-22 08:56:08 utc |
lbt |
ACTION is willing to learn |
2010-07-22 08:56:44 utc |
jmettraux |
{ 'a' => nil }.merge('evil_key' => 'evil_value').delete_if {|key, value| value == nil } |
2010-07-22 08:57:01 utc |
jmettraux |
# => { 'evil_key' => 'evil_value' } |
2010-07-22 08:57:44 utc |
lbt |
yes... at which point the amqp connection will, I think, raise an exception and close down |
2010-07-22 08:58:03 utc |
lbt |
"MUST" as they say in rfc language |
2010-07-22 08:58:08 utc |
jmettraux |
great |
2010-07-22 08:58:40 utc |
jmettraux |
so your commit is adding a hash generation and a delete_if iteration for nothing |
2010-07-22 08:58:40 utc |
lbt |
so by listing the permitted values I try to prevent that |
2010-07-22 08:58:48 utc |
lbt |
yes |
2010-07-22 08:58:54 utc |
lbt |
it's a QA thing |
2010-07-22 08:59:22 utc |
lbt |
is there a better way to code it? |
2010-07-22 08:59:43 utc |
jmettraux |
ACTION is puzzled |
2010-07-22 08:59:46 utc |
lbt |
the real problem is that the input is : def publish data, opts |
2010-07-22 08:59:58 utc |
jmettraux |
your commit will never make it |
2010-07-22 09:00:12 utc |
lbt |
not : def publish data, opts, header |
2010-07-22 09:01:07 utc |
lbt |
that's OK - I'm happy to see a more efficient solution... |
2010-07-22 09:01:42 utc |
lbt |
but simply doing a headers = {...} .merge(opts) *MUST* fail |
2010-07-22 09:01:51 utc |
jmettraux |
great |
2010-07-22 09:01:58 utc |
lbt |
if opts ever has :key in it |
2010-07-22 09:02:19 utc |
jmettraux |
do you realize your code does nothing ? |
2010-07-22 09:02:33 utc |
lbt |
heh... no. |
2010-07-22 09:03:21 utc |
lbt |
publish "My text", {:key => "there", :reply_to => "here" } |
2010-07-22 09:03:27 utc |
lbt |
works as I intended |
2010-07-22 09:04:12 utc |
jmettraux |
it worked before as well |
2010-07-22 09:06:51 utc |
lbt |
I have misunderstood merge then? |
2010-07-22 09:07:01 utc |
lbt |
OK ... sorry. |
2010-07-22 09:07:13 utc |
lbt |
I see what you meant above |
2010-07-22 09:08:16 utc |
lbt |
yep... when I read this: http://ruby-doc.org/core/classes/Hash.html#M002880 |
2010-07-22 09:08:44 utc |
lbt |
I read it as merge overwrites entries whereas merge! adds entries... |
2010-07-22 09:08:58 utc |
lbt |
in fact merge! modifies in-place doesn't it |
2010-07-22 09:09:06 utc |
jmettraux |
yes |
2010-07-22 09:09:32 utc |
lbt |
so, yes... my patch does nothing... not even restrict to legal entries |
2010-07-22 09:09:53 utc |
lbt |
although it does clarify the documentation :) |
2010-07-22 09:10:05 utc |
jmettraux |
well |
2010-07-22 09:10:31 utc |
lbt |
yeah... |
2010-07-22 09:10:57 utc |
lbt |
OK, I'll go apologise to tmm1 for the noise... |
2010-07-22 09:11:10 utc |
jmettraux |
did he reply anything ? |
2010-07-22 09:11:18 utc |
lbt |
nah |
2010-07-22 09:12:22 utc |
jmettraux |
I wish they had visible tests or specs |
2010-07-22 09:12:45 utc |
lbt |
well, I'm looking into spec/cucumber |
2010-07-22 09:13:20 utc |
lbt |
so maybe I'll get someone to work on them... |
2010-07-22 09:13:55 utc |
jmettraux |
you mean, the specs of tmm1/amqp ? |
2010-07-22 09:14:28 utc |
lbt |
we need to start with our own .. but I'd hope that we'd extend that to upstream |
2010-07-22 09:14:54 utc |
jmettraux |
specs for BOSS ? |
2010-07-22 09:15:30 utc |
lbt |
yes, and the rpc thing too |
2010-07-22 09:15:43 utc |
jmettraux |
which rpc thing ? |
2010-07-22 09:15:49 utc |
lbt |
http://meego.gitorious.org/meego-infrastructure-tools/air |
2010-07-22 09:15:58 utc |
lbt |
I'll push that to github too |
2010-07-22 09:16:35 utc |
jmettraux |
ah OK |
2010-07-22 09:16:45 utc |
jmettraux |
have to move, ciao ! |