Non-Code: Fix pipeline zoekt connection
Failed pipeline:
- https://jihulab.com/gitlab-cn/gitlab/-/pipelines/1102830/failures
- https://jihulab.com/gitlab-cn/gitlab/-/pipelines/1102838/failures
- https://jihulab.com/gitlab-cn/gitlab/-/pipelines/1103278/failures
- https://jihulab.com/gitlab-cn/gitlab/-/pipelines/1103345/failures
Related MR or file:
- https://gitlab.com/gitlab-org/gitlab-development-kit/-/merge_requests/2971
- Add zoekt services to run zoekt tests in CI
- Zoekt integration for code search
- Dockerfile.zoekt-ci-image-1.0
What does this MR do and why?
In GDK env, Take ee/spec/models/concerns/zoekt/searchable_repository_spec.rb:20
as an example.
Failed case log
Run options: include {:focus=>true, :locations=>{"./ee/spec/models/concerns/zoekt/searchable_repository_spec.rb"=>[20]}}
Test environment set up in 8.302325 seconds
F
Failures:
1) Zoekt::SearchableRepository#use_zoekt? is true for indexed projects
Failure/Error: result = super
Errno::ECONNREFUSED:
Failed to open TCP connection to 127.0.0.1:6060 (Connection refused - connect(2) for "127.0.0.1" port 6060)
# ./lib/gitlab/net_http_adapter.rb:21:in `connect'
# ./lib/gitlab/http.rb:55:in `perform_request'
# ./ee/app/models/concerns/zoekt/searchable_repository.rb:11:in `truncate_zoekt_index!'
# ./ee/spec/support/zoekt.rb:16:in `zoekt_truncate_index!'
# ./ee/spec/support/zoekt.rb:37:in `block (2 levels) in <main>'
# ------------------
# --- Caused by: ---
# Errno::ECONNREFUSED:
# Connection refused - connect(2) for "127.0.0.1" port 6060
# ./lib/gitlab/net_http_adapter.rb:21:in `connect'
Finished in 30.34 seconds (files took 23.89 seconds to load)
1 example, 1 failure
Failed examples:
rspec ./ee/spec/models/concerns/zoekt/searchable_repository_spec.rb:20 # Zoekt::SearchableRepository#use_zoekt? is true for indexed projects
Randomized with seed 7693
[TEST PROF INFO] Time spent in factories: 00:18.672 (56.42% of total time)
After completing the correct configuration: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/zoekt.md
gdk config set zoekt.enabled true
gdk reconfigure
gdk start
Passed case log
% spec ee/spec/models/concerns/zoekt/searchable_repository_spec.rb:20
Run options: include {:focus=>true, :locations=>{"./ee/spec/models/concerns/zoekt/searchable_repository_spec.rb"=>[20]}}
Test environment set up in 17.441515 seconds
.
Finished in 46.07 seconds (files took 29.33 seconds to load)
1 example, 0 failures
Randomized with seed 32498
[TEST PROF INFO] Time spent in factories: 00:21.229 (43.17% of total time)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
由 Baodong 编辑于