For each webhook, all event test are ok EXCEPT for the merge request event test which leads to an error 500 code page “Whoops, something went wrong on our end.” from Gitlab.
This is happening now, after the last Gitlab update to version 15.7. Everything was ok before.
==> /var/log/gitlab/gitlab-rails/production.log <==
Started POST “/admin/hooks/17/test?trigger=merge_requests_events” for 192.168.199.200 at 2023-01-02 23:47:21 +0100
Processing by Admin::HooksController#test as HTML
Parameters: {“authenticity_token”=>“[FILTERED]”, “trigger”=>“merge_requests_events”, “id”=>“17”}
Completed 500 Internal Server Error in 31ms (ActiveRecord: 6.6ms | Elasticsearch: 0.0ms | Allocations: 9111)
==> /var/log/gitlab/gitlab-rails/production_json.log <==
{“method”:“POST”,“path”:“/admin/hooks/17/test”,“format”:“html”,“controller”:“Admin::HooksController”,“action”:“test”,“status”:500,“time”:“2023-01-02T22:47:21.322Z”,“params”:[{“key”:“_method”,“value”:“post”},{“key”:“authenticity_token”,“value”:“[FILTERED]”},{“key”:“trigger”,“value”:“merge_requests_events”},{“key”:“id”,“value”:“17”}],“correlation_id”:“01GNTANZCR3E86YS855ZZRXD59”,“meta.caller_id”:“Admin::HooksController#test”,“meta.remote_ip”:“192.168.199.200”,“meta.feature_category”:“integrations”,“meta.user”:“INT00”,“meta.user_id”:2,“meta.client_id”:“user/2”,“remote_ip”:“192.168.199.200”,“user_id”:2,“username”:“INT00”,“ua”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.54”,“queue_duration_s”:0.04051,“request_urgency”:“low”,“target_duration_s”:5,“redis_calls”:19,“redis_allowed_cross_slot_calls”:1,“redis_duration_s”:0.014454,“redis_read_bytes”:2536,“redis_write_bytes”:2715,“redis_cache_calls”:14,“redis_cache_duration_s”:0.012995,“redis_cache_read_bytes”:2353,“redis_cache_write_bytes”:926,“redis_sessions_calls”:4,“redis_sessions_allowed_cross_slot_calls”:1,“redis_sessions_duration_s”:0.00109,“redis_sessions_read_bytes”:183,“redis_sessions_write_bytes”:1683,“redis_shared_state_calls”:1,“redis_shared_state_duration_s”:0.000369,“redis_shared_state_write_bytes”:106,“db_count”:9,“db_write_count”:0,“db_cached_count”:0,“db_replica_count”:0,“db_primary_count”:9,“db_main_count”:9,“db_main_replica_count”:0,“db_replica_cached_count”:0,“db_primary_cached_count”:0,“db_main_cached_count”:0,“db_main_replica_cached_count”:0,“db_replica_wal_count”:0,“db_primary_wal_count”:0,“db_main_wal_count”:0,“db_main_replica_wal_count”:0,“db_replica_wal_cached_count”:0,“db_primary_wal_cached_count”:0,“db_main_wal_cached_count”:0,“db_main_replica_wal_cached_count”:0,“db_replica_duration_s”:0.0,“db_primary_duration_s”:0.012,“db_main_duration_s”:0.012,“db_main_replica_duration_s”:0.0,“cpu_s”:0.056848,“mem_objects”:21924,“mem_bytes”:3170966,“mem_mallocs”:6271,“mem_total_bytes”:4047926,“pid”:7385,“worker_id”:“puma_0”,“rate_limiting_gates”:,“exception.class”:“NoMethodError”,“exception.message”:“undefined method payload' for #<Hash:0x00007f8e060174d0>","exception.backtrace":["app/controllers/concerns/web_hooks/hook_execution_notice.rb:8:in
set_hook_execution_notice’”,“app/controllers/admin/hooks_controller.rb:14:in test'","ee/lib/gitlab/ip_address_state.rb:10:in
with’”,“ee/app/controllers/ee/application_controller.rb:46:in set_current_ip_address'","app/controllers/application_controller.rb:533:in
set_current_admin’”,“lib/gitlab/session.rb:11:in with_session'","app/controllers/application_controller.rb:524:in
set_session_storage’”,“lib/gitlab/i18n.rb:107:in with_locale'","lib/gitlab/i18n.rb:113:in
with_user_locale’”,“app/controllers/application_controller.rb:512:in set_locale'","app/controllers/application_controller.rb:506:in
set_current_context’”,“lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in call'","lib/gitlab/middleware/memory_report.rb:13:in
call’”,“lib/gitlab/middleware/speedscope.rb:13:in call'","lib/gitlab/database/load_balancing/rack_middleware.rb:23:in
call’”,“lib/gitlab/middleware/rails_queue_duration.rb:33:in call'","lib/gitlab/metrics/rack_middleware.rb:16:in
block in call’”,“lib/gitlab/metrics/web_transaction.rb:46:in run'","lib/gitlab/metrics/rack_middleware.rb:16:in
call’”,“lib/gitlab/jira/middleware.rb:19:in call'","lib/gitlab/middleware/go.rb:20:in
call’”,“lib/gitlab/etag_caching/middleware.rb:21:in call'","lib/gitlab/middleware/query_analyzer.rb:11:in
block in call’”,“lib/gitlab/database/query_analyzer.rb:37:in within'","lib/gitlab/middleware/query_analyzer.rb:11:in
call’”,“lib/gitlab/middleware/multipart.rb:173:in call'","lib/gitlab/middleware/read_only/controller.rb:50:in
call’”,“lib/gitlab/middleware/read_only.rb:18:in call'","lib/gitlab/middleware/same_site_cookies.rb:27:in
call’”,“lib/gitlab/middleware/handle_malformed_strings.rb:21:in call'","lib/gitlab/middleware/basic_health_check.rb:25:in
call’”,“lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in call'","lib/gitlab/middleware/request_context.rb:21:in
call’”,“lib/gitlab/middleware/webhook_recursion_detection.rb:15:in call'","config/initializers/fix_local_cache_middleware.rb:11:in
call’”,“lib/gitlab/middleware/compressed_json.rb:37:in call'","lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in
call’”,“lib/gitlab/middleware/sidekiq_web_static.rb:20:in call'","lib/gitlab/metrics/requests_rack_middleware.rb:77:in
call’”,“lib/gitlab/middleware/release_env.rb:13:in `call’”],“db_duration_s”:0.00663,“view_duration_s”:0.0,“duration_s”:0.03156}
==> /var/log/gitlab/gitlab-rails/production.log <==
NoMethodError (undefined method `payload’ for #Hash:0x00007f8e060174d0):
app/controllers/concerns/web_hooks/hook_execution_notice.rb:8:in set_hook_execution_notice' app/controllers/admin/hooks_controller.rb:14:in
test’
ee/lib/gitlab/ip_address_state.rb:10:in with' ee/app/controllers/ee/application_controller.rb:46:in
set_current_ip_address’
app/controllers/application_controller.rb:533:in set_current_admin' lib/gitlab/session.rb:11:in
with_session’
app/controllers/application_controller.rb:524:in set_session_storage' lib/gitlab/i18n.rb:107:in
with_locale’
lib/gitlab/i18n.rb:113:in with_user_locale' app/controllers/application_controller.rb:512:in
set_locale’
app/controllers/application_controller.rb:506:in set_current_context' lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in
call’
lib/gitlab/middleware/memory_report.rb:13:in call' lib/gitlab/middleware/speedscope.rb:13:in
call’
lib/gitlab/database/load_balancing/rack_middleware.rb:23:in call' lib/gitlab/middleware/rails_queue_duration.rb:33:in
call’
lib/gitlab/metrics/rack_middleware.rb:16:in block in call' lib/gitlab/metrics/web_transaction.rb:46:in
run’
lib/gitlab/metrics/rack_middleware.rb:16:in call' lib/gitlab/jira/middleware.rb:19:in
call’
lib/gitlab/middleware/go.rb:20:in call' lib/gitlab/etag_caching/middleware.rb:21:in
call’
lib/gitlab/middleware/query_analyzer.rb:11:in block in call' lib/gitlab/database/query_analyzer.rb:37:in
within’
lib/gitlab/middleware/query_analyzer.rb:11:in call' lib/gitlab/middleware/multipart.rb:173:in
call’
lib/gitlab/middleware/read_only/controller.rb:50:in call' lib/gitlab/middleware/read_only.rb:18:in
call’
lib/gitlab/middleware/same_site_cookies.rb:27:in call' lib/gitlab/middleware/handle_malformed_strings.rb:21:in
call’
lib/gitlab/middleware/basic_health_check.rb:25:in call' lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in
call’
lib/gitlab/middleware/request_context.rb:21:in call' lib/gitlab/middleware/webhook_recursion_detection.rb:15:in
call’
config/initializers/fix_local_cache_middleware.rb:11:in call' lib/gitlab/middleware/compressed_json.rb:37:in
call’
lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in call' lib/gitlab/middleware/sidekiq_web_static.rb:20:in
call’
lib/gitlab/metrics/requests_rack_middleware.rb:77:in call' lib/gitlab/middleware/release_env.rb:13:in
call’