Fix Pipeline 2242535
What does this MR do and why?
#1 Uninitialized constant Gitlab::Patch::PoToJson
1⃣️ FailureFailed job: https://jihulab.com/gitlab-cn/gitlab/-/jobs/11578832
An error occurred while loading spec_helper.
Failure/Error: require_relative '../config/environment'
NameError:
uninitialized constant Gitlab::Patch::PoToJson
# ./jh/lib/gitlab/patch/po_to_json.rb:5:in `<module:Patch>'
# ./jh/lib/gitlab/patch/po_to_json.rb:4:in `<module:Gitlab>'
# ./jh/lib/gitlab/patch/po_to_json.rb:3:in `<top (required)>'
Details
Related issue: #2948 (closed)
What
Delete useless code below because they are not used anywhere anymore.
Gitlab::Patch::GettextI18nRailsJsTask
Gitlab::Patch::PoToJson
Why
These "Patch" codes were previously used in the rake gettext:po_to_json
command to generate the required front-end
i18n file, such as app/assets/javascripts/locale/en/app.js
.
The po_to_json
command is now deprecated and replaced by bin/rake gettext:compile
(See Upstream MR).
Screenshots or screen recordings
No UI changes.
How to set up and validate locally
Verify these commands work correctly: bin/rake jh:gettext:regenerate
and bin/rake gettext:compile
-
bin/rake gettext:compile
# Delete `app.js` file $ rm app/assets/javascripts/locale/en/app.js # Execute compile command $ bin/rake gettext:compile # Expect `app.js` to be regenerated $ ls app/assets/javascripts/locale/en/app.js
-
bin/rake jh:gettext:regenerate
$ old_i18n_string="JH|VulnerabilityExports|Tool" $ new_i18n_string="JH|VulnerabilityExports|Tooooool" $ filename="jh/app/services/jh/vulnerability_exports/exporters/csv_service.rb" $ sed -i '' "s/$old_i18n_string/$new_i18n_string/g" $filename # Expect the `gitlab.po` file to be updated $ bin/rake jh:gettext:regenerate
#2 llm/summarize_merge_request_worker_spec.rb
2⃣️ FailureFailed job: https://jihulab.com/gitlab-cn/gitlab/-/jobs/11588106
Related Upstream MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137409
4) MergeRequests::Llm::SummarizeMergeRequestWorker when provided an invalid user_id does not create a new note
Failure/Error: expect { worker.perform(*params) }.not_to change { Note.count }
NameError:
undefined local variable or method `user' for #<MergeRequests::Llm::SummarizeMergeRequestWorker:0x00007fc2a31fd930 @user=nil>
Did you mean? @user
# ./jh/app/workers/jh/merge_requests/llm/summarize_merge_request_worker.rb:12:in `perform'
#3 qa_selector_for_provider
3⃣️ FailureFailed job: https://jihulab.com/gitlab-cn/gitlab/-/jobs/11588108
# NoMethodError:
# undefined method `qa_selector_for_provider' for #<ActionView::Base:0x00000000acf558>
# ./jh/app/views/devise/shared/_omniauth_box.html.haml:15:in `block in _jh_app_views_devise_shared__omniauth_box_html_haml__1250061498385930220_4783020'
#4 qa:selectors
4⃣️ FailureFailed job: https://jihulab.com/gitlab-cn/gitlab/-/jobs/11588034
Author: @TomHeng
bundler: failed to load command: bin/qa (bin/qa)
/builds/gitlab-cn/gitlab/qa/qa/page/validator.rb:48:in `validate!': Page views / elements validation error! (QA::Page::Validator::ValidationError)
from /builds/gitlab-cn/gitlab/qa/qa/scenario/test/sanity/selectors.rb:50:in `each'