[DRE-maint] Bug#962259: Creating Webhooks fails and returns error 500

Pirate Praveen praveen at onenetbeyond.org
Mon Jul 20 20:12:56 BST 2020


On Fri, 5 Jun 2020 10:33:42 +0200 =?UTF-8?Q?Patrick_Matth=c3=a4i?= 
<pmatthaei at debian.org> wrote:
 > Subject: gitlab: Creating Webhooks fails and returns error 500
 > Package: gitlab
 > Version: 13.0.4-1+fto10+1
 > Severity: normal
 >
 > On creating a webhook at a project we just get a 500 error since a
 > longer time. This is logged:
 >
 > ==> /var/log/gitlab/production.log <==
 > Started POST "/customer/XXXXX/hooks" for YYYYYYYYYYYY at 2020-06-05
 > 10:27:31 +0200
 > Processing by Projects::HooksController#create as HTML
 > Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]",
 > "hook"=>"[FILTERED]", "namespace_id"=>"customer", 
"project_id"=>"XXXXXX"}
 > Completed 500 Internal Server Error in 137ms (ActiveRecord: 3.8ms |
 > Elasticsearch: 0.0ms | Allocations: 12840)
 >
 > ==> /var/log/gitlab/production_json.log <==
 > 
{"method":"POST","path":"/customer/XXXXXXXXXX/hooks","format":"html","controller":"Projects::HooksController","action":"create","status":500,"time":"2020-06-05T08:27:31.242Z","params":[{"key":"utf8","value":"✓"},{"key":"authenticity_token","value":"[FILTERED]"},{"key":"hook","value":"[FILTERED]"},{"key":"namespace_id","value":"customer"},{"key":"project_id","value":"XXXXXXXXXXXXXXX"}],"remote_ip":"YYYYYYYYYYYYYYYY","user_id":10,"username":"ZZZZZZZZZZZ","ua":"Mozilla/5.0
 > (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101
 > 
Firefox/77.0","queue_duration_s":null,"correlation_id":"mal85NkY5w1","meta.user":"AAAAAAAAAAA","meta.project":"customer/XXXXXXXXXXXX","meta.root_namespace":"customer","meta.caller_id":"Projects::HooksController#create","redis_calls":1,"redis_duration_s":0.000427,"cpu_s":0.18,"exception.class":"NoMethodError","exception.message":"undefined
 > method `set_attribute_was' for
 > 
#<ProjectHook:0x000055a3c779f1d8>","exception.backtrace":["app/controllers/projects/hooks_controller.rb:20:in
 > `create'","app/controllers/application_controller.rb:496:in
 > `set_current_admin'","lib/gitlab/session.rb:11:in
 > `with_session'","app/controllers/application_controller.rb:487:in
 > 
`set_session_storage'","app/controllers/application_controller.rb:481:in
 > `set_locale'","lib/gitlab/error_tracking.rb:48:in
 > `with_context'","app/controllers/application_controller.rb:546:in
 > `sentry_context'","app/controllers/application_controller.rb:474:in
 > `block in 
set_current_context'","lib/gitlab/application_context.rb:52:in
 > `block in use'","lib/gitlab/application_context.rb:52:in
 > `use'","lib/gitlab/application_context.rb:20:in
 > `with_context'","app/controllers/application_controller.rb:467:in
 > 
`set_current_context'"],"db_duration_s":0.0038,"view_duration_s":0.0,"duration_s":0.1377}
 >
 > ==> /var/log/gitlab/production.log <==
 >
 > NoMethodError (undefined method `set_attribute_was' for
 > #<ProjectHook:0x000055a3c779f1d8>):

This appear to be a bug in ruby-attr-encrypted gem with rails 6 as seen 
in 
https://people.debian.org/~praveen/rails6-meta-build/buildlogs/ruby-attr-encrypted.log, 
but unfortunately that gem seems unmaintained now 
https://github.com/attr-encrypted/attr_encrypted/issues/379




More information about the Pkg-ruby-extras-maintainers mailing list