极狐gitlab15.8(15.7/15.6)在集成ONES后,无法创建合并请求。
Summary
所有项目
无法进行合并请求创建。目前在15.6、15.7、15.8均出现此问题。
说明:在极狐gitlab上做了ONES集成后,该组下的复现过程:
- step4: 根据Request ID查看日志
find /var/log/gitlab -type f -mtime 0 -exec grep '01GS4NYCHW9CE6FBQW303QK1FY' '{}' '+'
/var/log/gitlab/gitlab-rails/production_json.log:{"method":"GET","path":"/test/aaa/-/merge_requests/new","format":"html","controller":"Projects::MergeRequests::CreationsController","action":"new","status":500,"time":"2023-02-13T06:03:41.075Z","params":[{"key":"merge_request","value":{"source_branch":"dev"}},{"key":"namespace_id","value":"test"},{"key":"project_id","value":"aaa"}],"correlation_id":"01GS4NYCHW9CE6FBQW303QK1FY","meta.caller_id":"Projects::MergeRequests::CreationsController#new","meta.remote_ip":"123.139.161.195","meta.feature_category":"code_review_workflow","meta.user":"root","meta.user_id":1,"meta.project":"test/aaa","meta.root_namespace":"test","meta.client_id":"user/1","remote_ip":"123.139.161.195","user_id":1,"username":"root","ua":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36","queue_duration_s":0.00576,"request_urgency":"low","target_duration_s":5,"gitaly_calls":4,"gitaly_duration_s":0.009897,"redis_calls":10,"redis_allowed_cross_slot_calls":1,"redis_duration_s":0.0015609999999999999,"redis_read_bytes":827,"redis_write_bytes":1472,"redis_cache_calls":5,"redis_cache_duration_s":0.000886,"redis_cache_read_bytes":644,"redis_cache_write_bytes":245,"redis_sessions_calls":4,"redis_sessions_allowed_cross_slot_calls":1,"redis_sessions_duration_s":0.000536,"redis_sessions_read_bytes":183,"redis_sessions_write_bytes":1174,"redis_shared_state_calls":1,"redis_shared_state_duration_s":0.000139,"redis_shared_state_write_bytes":53,"db_count":15,"db_write_count":0,"db_cached_count":2,"db_replica_count":0,"db_primary_count":15,"db_main_count":15,"db_main_replica_count":0,"db_replica_cached_count":0,"db_primary_cached_count":2,"db_main_cached_count":2,"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.009,"db_main_duration_s":0.009,"db_main_replica_duration_s":0.0,"cpu_s":0.073589,"mem_objects":32951,"mem_bytes":3869472,"mem_mallocs":7726,"mem_total_bytes":5187512,"pid":728,"worker_id":"puma_2","rate_limiting_gates":[],"exception.class":"TypeError","exception.message":"wrong argument type nil (expected Regexp)","exception.backtrace":["app/services/merge_requests/build_service.rb:335:in `match'","app/services/merge_requests/build_service.rb:335:in `block in issue_iid'","lib/gitlab/utils/strong_memoize.rb:34:in `strong_memoize'","app/services/merge_requests/build_service.rb:332:in `issue_iid'","app/services/merge_requests/build_service.rb:345:in `block in issue'","lib/gitlab/utils/strong_memoize.rb:34:in `strong_memoize'","app/services/merge_requests/build_service.rb:344:in `issue'","app/services/merge_requests/build_service.rb:278:in `title_from_issue'","app/services/merge_requests/build_service.rb:229:in `assign_title_and_description'","ee/app/services/ee/merge_requests/build_service.rb:9:in `assign_title_and_description'","app/services/merge_requests/build_service.rb:30:in `execute'","app/controllers/projects/merge_requests/creations_controller.rb:112:in `block in build_merge_request'","lib/gitlab/gitaly_client.rb:336:in `allow_n_plus_1_calls'","app/controllers/projects/merge_requests/creations_controller.rb:111:in `build_merge_request'","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:534:in `set_current_admin'","lib/gitlab/session.rb:11:in `with_session'","app/controllers/application_controller.rb:525: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:513:in `set_locale'","app/controllers/application_controller.rb:507: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.00657,"view_duration_s":0.0,"duration_s":0.06378}
/var/log/gitlab/gitlab-workhorse/current:{"content_type":"text/html; charset=utf-8","correlation_id":"01GS4NYCHW9CE6FBQW303QK1FY","duration_ms":90,"host":"compose.bdeet.xyz","level":"info","method":"GET","msg":"access","proto":"HTTP/1.1","referrer":"https://compose.bdeet.xyz/test/aaa/-/merge_requests","remote_addr":"123.139.161.195:0","remote_ip":"123.139.161.195","route":"","status":500,"system":"http","time":"2023-02-13T06:03:41Z","ttfb_ms":90,"uri":"/test/aaa/-/merge_requests/new?merge_request%5Bsource_branch%5D=dev","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36","written_bytes":15191}
/var/log/gitlab/gitaly/current:{"command.count":1,"command.cpu_time_ms":1,"command.inblock":0,"command.majflt":0,"command.maxrss":306456,"command.minflt":399,"command.oublock":0,"command.real_time_ms":2,"command.system_time_ms":1,"command.user_time_ms":0,"correlation_id":"01GS4NYCHW9CE6FBQW303QK1FY","grpc.code":"OK","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"unary","grpc.method":"FindCommit","grpc.request.deadline":"2023-02-13T06:04:11.057","grpc.request.fullMethod":"/gitaly.CommitService/FindCommit","grpc.request.glProjectPath":"test/aaa","grpc.request.glRepository":"project-78","grpc.request.payload_bytes":122,"grpc.request.repoPath":"@hashed/34/9c/349c41201b62db851192665c504b350ff98c6b45fb62a8a2161f78b6534d8de9.git","grpc.request.repoStorage":"default","grpc.response.payload_bytes":234,"grpc.service":"gitaly.CommitService","grpc.start_time":"2023-02-13T06:03:41.057","grpc.time_ms":3.848,"level":"info","msg":"finished unary call with code OK","peer.address":"@","pid":296,"remote_ip":"123.139.161.195","span.kind":"server","system":"grpc","time":"2023-02-13T06:03:41.061Z","user_id":"1","username":"root"}
/var/log/gitlab/gitaly/current:{"correlation_id":"01GS4NYCHW9CE6FBQW303QK1FY","grpc.code":"OK","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"unary","grpc.method":"FindCommit","grpc.request.deadline":"2023-02-13T06:04:11.062","grpc.request.fullMethod":"/gitaly.CommitService/FindCommit","grpc.request.glProjectPath":"test/aaa","grpc.request.glRepository":"project-78","grpc.request.payload_bytes":125,"grpc.request.repoPath":"@hashed/34/9c/349c41201b62db851192665c504b350ff98c6b45fb62a8a2161f78b6534d8de9.git","grpc.request.repoStorage":"default","grpc.response.payload_bytes":234,"grpc.service":"gitaly.CommitService","grpc.start_time":"2023-02-13T06:03:41.062","grpc.time_ms":0.202,"level":"info","msg":"finished unary call with code OK","peer.address":"@","pid":296,"remote_ip":"123.139.161.195","span.kind":"server","system":"grpc","time":"2023-02-13T06:03:41.062Z","user_id":"1","username":"root"}
/var/log/gitlab/gitaly/current:{"correlation_id":"01GS4NYCHW9CE6FBQW303QK1FY","grpc.code":"OK","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"unary","grpc.method":"FindCommit","grpc.request.deadline":"2023-02-13T06:04:11.064","grpc.request.fullMethod":"/gitaly.CommitService/FindCommit","grpc.request.glProjectPath":"test/aaa","grpc.request.glRepository":"project-78","grpc.request.payload_bytes":136,"grpc.request.repoPath":"@hashed/34/9c/349c41201b62db851192665c504b350ff98c6b45fb62a8a2161f78b6534d8de9.git","grpc.request.repoStorage":"default","grpc.response.payload_bytes":234,"grpc.service":"gitaly.CommitService","grpc.start_time":"2023-02-13T06:03:41.064","grpc.time_ms":0.183,"level":"info","msg":"finished unary call with code OK","peer.address":"@","pid":296,"remote_ip":"123.139.161.195","span.kind":"server","system":"grpc","time":"2023-02-13T06:03:41.064Z","user_id":"1","username":"root"}
/var/log/gitlab/gitaly/current:{"correlation_id":"01GS4NYCHW9CE6FBQW303QK1FY","grpc.code":"OK","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"unary","grpc.method":"FindCommit","grpc.request.deadline":"2023-02-13T06:04:11.065","grpc.request.fullMethod":"/gitaly.CommitService/FindCommit","grpc.request.glProjectPath":"test/aaa","grpc.request.glRepository":"project-78","grpc.request.payload_bytes":133,"grpc.request.repoPath":"@hashed/34/9c/349c41201b62db851192665c504b350ff98c6b45fb62a8a2161f78b6534d8de9.git","grpc.request.repoStorage":"default","grpc.response.payload_bytes":234,"grpc.service":"gitaly.CommitService","grpc.start_time":"2023-02-13T06:03:41.065","grpc.time_ms":0.201,"level":"info","msg":"finished unary call with code OK","peer.address":"@","pid":296,"remote_ip":"123.139.161.195","span.kind":"server","system":"grpc","time":"2023-02-13T06:03:41.065Z","user_id":"1","username":"root"}
/cc @rzhu
Steps to reproduce
Example Project
What is the current bug behavior?
What is the expected correct behavior?
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)