Fix pre-main-jh pipeline 2025-03-19

用户描述

What does this MR do and why?

Fix pre-main-jh pipeline 2025-03-19

Broken by upstream MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/184281

References

Screenshots or screen recordings

Before After

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.


合并请求类型

Bug fix


合并请求描述

  • 修复了 RapidDiffs::AppComponent 组件测试中的 data-metadata-endpoint 渲染问题。
  • 调整了 set_assignees 测试中的数据库查询限制,确保在没有权限时不会更改指派人。
  • 调整了 Elasticsearch 启用时的查询阈值和限制,以避免潜在的 N+1 查询问题。

变更概览

相关文件
错误修复
app_component_spec.rb
修复 RapidDiffs 组件测试中的 metadata-endpoint 渲染问题                           

jh/spec/components/rapid_diffs/app_component_spec.rb

修复了 RapidDiffs::AppComponent 组件的测试,确保 data-metadata-endpoint 属性被正确渲染。
删除了不必要的 expect(container['data-metadata-endpoint']).to
eq(metadata_endpoint) 断言。
+1/-1     
set_assignees_spec.rb
调整 set_assignees 测试中的数据库查询限制                                                         

jh/spec/requests/jh/api/graphql/mutations/merge_requests/set_assignees_spec.rb

调整了 set_assignees 的测试,将 db_query_limit 从 32 增加到 33。
确保在没有权限的情况下,不会更改合并请求的指派人。
+1/-1     
search_controller_spec.rb
调整 Elasticsearch 测试中的查询阈值和限制                                                         

jh/spec/requests/search_controller_spec.rb

调整了 Elasticsearch 启用时的 threshold 值,从 7 增加到 8(issues 范围)。
调整了 notesmilestones 范围的 threshold 值,分别从 3 增加到 4。
调整了 commits 范围的查询限制,从 control.count + 3 增加到 control.count + 4
+4/-4     
CodeRider Agent 编辑于

合并请求报告

加载中