beanstalkd / beaneater

The best way to interact with beanstalkd from within Ruby
http://beanstalkd.github.com/beaneater
MIT License
199 stars 43 forks source link

using colon in one parameter causes a weird replacement by underscores #87

Closed joananeves closed 2 years ago

joananeves commented 2 years ago

I'm using ruby 2.6.6, and when changed from beaneater 1.1.1 to 1.1.2, got a json parse problem.

If I use colon in one of the parameters, I get this error (removing the colon will have success):

[2022-10-14 15:46:09] #00 ERROR: Exception Backburner::Job::JobFormatInvalid -> Job body could not be parsed: #<JSON::ParserError: 859: unexpected token at '{"action_list":["reconfigure_journals"],"app_digest":"","brand":"toconline","destination_tube":"accounting-ops-reconfigure","entity_id":"265843","entity_schema":"pt999999990_c265843","entity_variable_ids":"","fiscal_year_name":"Exercício de 2022","id":"3376","module_mask":"511","notification_title":"Redefinir configuração: Exercício de 2022","product"_"toconline","role_mask"_"32772","sharded_schema"_"pt999999990_c265843","source_company_id"_63571,"source_prefix"_"y2022_12_","source_schema"_"pt221170391_97586","source_user_id"_null,"subentity_id"_"pt999999990_16_1#y2022_1_","subentity_prefix"_"y2022_1_","subentity_schema"_"pt999999990_16_1","ttr"_21600,"tube"_"job_controller","user_email"_"rita.cunha+cluster1@cldware.com","user_id"_"750063","validity"_21600,"x_brand"_"toconline","x_product"_"toconline"}
'>
   /Users/joana/.rbenv/versions/2.6.6/lib/ruby/2.6.0/delegate.rb:85:in `call'
   /Users/joana/.rbenv/versions/2.6.6/lib/ruby/2.6.0/delegate.rb:85:in `method_missing'
   /Users/joana/.rbenv/versions/2.6.6/gemsets/toconline-rubies-jobs/gems/backburner-1.6.0/lib/backburner/job.rb:30:in `rescue in initialize'
   /Users/joana/.rbenv/versions/2.6.6/gemsets/toconline-rubies-jobs/gems/backburner-1.6.0/lib/backburner/job.rb:22:in `initialize'
   /Users/joana/.rbenv/versions/2.6.6/gemsets/toconline-rubies-jobs/gems/backburner-1.6.0/lib/backburner/worker.rb:178:in `new'
   /Users/joana/.rbenv/versions/2.6.6/gemsets/toconline-rubies-jobs/gems/backburner-1.6.0/lib/backburner/worker.rb:178:in `reserve_job'
   /Users/joana/work/sp-job/lib/sp/job/worker.rb:52:in `work_one_job'
   /Users/joana/work/sp-job/lib/sp/job/worker.rb:30:in `block in start'
   /Users/joana/work/sp-job/lib/sp/job/worker.rb:28:in `loop'
   /Users/joana/work/sp-job/lib/sp/job/worker.rb:28:in `start'
   /Users/joana/.rbenv/versions/2.6.6/gemsets/toconline-rubies-jobs/gems/backburner-1.6.0/lib/backburner/worker.rb:60:in `start'
   /Users/joana/.rbenv/versions/2.6.6/gemsets/toconline-rubies-jobs/gems/backburner-1.6.0/lib/backburner.rb:40:in `work'
   /Users/joana/work/toconline/jobs/toc-fast/toc-fast:47:in `<top (required)>'

With the following job submitted:

Screenshot 2022-10-14 at 16 44 23
nesquena commented 2 years ago

Thanks for the report. Stick to 1.1.1 for the time being. I'll take a look and push a fix when I can.

joananeves commented 2 years ago

Thanks @nesquena That's what I did locked to 1.1.1.

pond commented 2 years ago

@joananeves This is probably my fault, after a patch I attempted (leading to v1.1.2) which tried to get things working with the YAML responses from beanstalkd on a "modern" v4 YAML parser. The PR discussion is in #86. I'm very sorry this has caused you inconvenience. I'm discussing a solution and hopefully we'll be able to get this fixed for you soon.

nesquena commented 2 years ago

1.1.2 has been yanked as well until we find a suitable fix, thanks again for the report, and sorry about the inconvenience

pond commented 2 years ago

We are reviewing #88 as a fix. Apologies again for the bug.

nesquena commented 2 years ago

I can confirm all tests were passing for me as well, and it seemed to work locally. Pushed 1.1.3 out live! Thanks for your help

@joananeves When you get a chance, perhaps you can confirm that everything is back online with 1.1.3 as well!

joananeves commented 2 years ago

Hi @nesquena @pond I confirm that 1.1.3 is working for me. Thanks to both!

nesquena commented 2 years ago

Hi @nesquena @pond

I confirm that 1.1.3 is working for me.

Thanks to both!

Great news, thanks for confirming!