Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
3e5f51c371
commit
a3e10bf320
2
Gemfile
2
Gemfile
|
|
@ -478,8 +478,6 @@ end
|
|||
|
||||
gem 'octokit', '~> 4.15'
|
||||
|
||||
# Updating this gem version here is deprecated. See:
|
||||
# https://docs.gitlab.com/ee/development/emails.html#mailroom-gem-updates
|
||||
gem 'gitlab-mail_room', '~> 0.0.23', require: 'mail_room'
|
||||
|
||||
gem 'email_reply_trimmer', '~> 0.1'
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ class Gitlab::Seeder::TriageOps
|
|||
group = Group.new(
|
||||
name: group_path.titleize,
|
||||
path: group_path,
|
||||
parent_id: parent&.id
|
||||
parent: parent
|
||||
)
|
||||
group.description = FFaker::Lorem.sentence
|
||||
group.save!
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class RemoveMrMentionsTempIndex < Gitlab::Database::Migration[2.1]
|
||||
INDEX_NAME = 'merge_request_mentions_temp_index'
|
||||
|
||||
# TODO: Index to be destroyed synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/402497
|
||||
def up
|
||||
prepare_async_index_removal :merge_requests, :id, name: INDEX_NAME
|
||||
end
|
||||
|
||||
def down
|
||||
unprepare_async_index :merge_requests, :id, name: INDEX_NAME
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1 @@
|
|||
7dccec7b92a1ea97acad03086c8d7c05ee06d1afdb88ffe34d6e83b1ffe61ad3
|
||||
|
|
@ -1033,7 +1033,7 @@ For more information on Gitaly server configuration, see our
|
|||
1. Disable all other services by editing `/etc/gitlab/gitlab.rb`:
|
||||
|
||||
```ruby
|
||||
# Disable all other services on the Praefect node
|
||||
# Disable all other services on the Gitaly node
|
||||
postgresql['enable'] = false
|
||||
redis['enable'] = false
|
||||
nginx['enable'] = false
|
||||
|
|
|
|||
|
|
@ -151,37 +151,10 @@ fork of [`MailRoom`](https://github.com/tpitale/mail_room/), to ensure
|
|||
that we can make updates quickly to the gem if necessary. We try to upstream
|
||||
changes as soon as possible and keep the two projects in sync.
|
||||
|
||||
Updating the `gitlab-mail_room` dependency in `Gemfile` is deprecated at
|
||||
the moment in favor of updating the version in
|
||||
[Omnibus](https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/master/config/software/mail_room.rb)
|
||||
(see [example merge request](https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/5816))
|
||||
and Helm Chart configuration (see [example merge request](https://gitlab.com/gitlab-org/build/CNG/-/merge_requests/854)).
|
||||
To update MailRoom:
|
||||
|
||||
#### Rationale
|
||||
|
||||
This was done because to avoid [thread deadlocks](https://github.com/ruby/net-imap/issues/14), `MailRoom` needs
|
||||
an updated version of the `net-imap` gem. However, this
|
||||
[version of the net-imap cannot be installed by an unprivileged user](https://github.com/ruby/net-imap/issues/14) due to
|
||||
[an error installing the digest gem](https://github.com/ruby/digest/issues/14).
|
||||
[This bug in the Ruby interpreter](https://bugs.ruby-lang.org/issues/17761) was fixed in Ruby
|
||||
3.0.2.
|
||||
|
||||
Updating the gem directly in the GitLab Rails `Gemfile` caused a [production incident](https://gitlab.com/gitlab-com/gl-infra/production/-/issues/4053)
|
||||
since Kubernetes pods do not run as privileged users.
|
||||
|
||||
Note that Omnibus GitLab runs `/opt/gitlab/embedded/bin/mail_room`
|
||||
instead of `bundle exec rake` to avoid loading the older version. With a
|
||||
Kubernetes install, the MailRoom version has always been explicitly set
|
||||
in the Helm Chart configuration rather than the `Gemfile`.
|
||||
|
||||
#### Preserving backwards compatibility
|
||||
|
||||
Removing the `Gemfile` would break incoming email processing for source
|
||||
installs. For now, source installs are advised to upgrade manually to
|
||||
the version specified in Omnibus and run `bin/mail_room` directly as
|
||||
done with Omnibus.
|
||||
|
||||
We can reconsider this deprecation once we upgrade to Ruby 3.0.
|
||||
1. Update `Gemfile` in GitLab Rails (see [example merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/116494)).
|
||||
1. Update the Helm Chart configuration (see [example merge request](https://gitlab.com/gitlab-org/build/CNG/-/merge_requests/854)).
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -60,16 +60,6 @@ to ensure the major components of GitLab are working:
|
|||
|
||||
1. If using Elasticsearch, verify that searches are successful.
|
||||
|
||||
1. If you are using [Reply by Email](../administration/reply_by_email.md) or [Service Desk](../user/project/service_desk.md),
|
||||
manually install the latest version of `gitlab-mail_room`:
|
||||
|
||||
```shell
|
||||
gem install gitlab-mail_room
|
||||
```
|
||||
|
||||
NOTE: This step is necessary to avoid thread deadlocks and to support the latest MailRoom features. See
|
||||
[this explanation](../development/emails.md#mailroom-gem-updates) for more details.
|
||||
|
||||
If in any case something goes wrong, see [how to troubleshoot](#troubleshooting).
|
||||
|
||||
## Rollback plan
|
||||
|
|
|
|||
|
|
@ -55,6 +55,9 @@ To import projects from GitHub:
|
|||
See also [Branch protection rules and project settings](#branch-protection-rules-and-project-settings) for additional
|
||||
prerequisites for those imports.
|
||||
|
||||
Because of a [known issue](https://gitlab.com/gitlab-org/gitlab/-/issues/383047), if you are using GitHub as an OmniAuth provider, ensure that the URL
|
||||
perimeter is specified in the [OmniAuth configuration](../../../integration/github.md#enable-github-oauth-in-gitlab).
|
||||
|
||||
### Importing from GitHub Enterprise to self-managed GitLab
|
||||
|
||||
If you are importing from GitHub Enterprise to a self-managed GitLab instance:
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ If you have problems with [migrating projects using file exports](import_export.
|
|||
|
||||
## Troubleshooting commands
|
||||
|
||||
Finds information about the status of the import and further logs using the JID:
|
||||
Finds information about the status of the import and further logs using the JID,
|
||||
using the [Rails console](../../../administration/operations/rails_console.md):
|
||||
|
||||
```ruby
|
||||
# Rails console
|
||||
Project.find_by_full_path('group/project').import_state.slice(:jid, :status, :last_error)
|
||||
> {"jid"=>"414dec93f941a593ea1a6894", "status"=>"finished", "last_error"=>nil}
|
||||
```
|
||||
|
|
@ -35,6 +35,27 @@ Review [issue 276930](https://gitlab.com/gitlab-org/gitlab/-/issues/276930), and
|
|||
- Ensure shared runners are enabled in both the source and destination projects.
|
||||
- Disable shared runners on the parent group when you import the project.
|
||||
|
||||
## Users missing from imported project
|
||||
|
||||
If users aren't imported with imported projects, see the [preserving user contributions](import_export.md#preserving-user-contributions) requirements.
|
||||
|
||||
A common reason for missing users is that the [public email setting](../../profile/index.md#set-your-public-email) isn't configured for users.
|
||||
To resolve this issue, ask users to configure this setting using the GitLab UI.
|
||||
|
||||
If there are too many users for manual configuration to be feasible,
|
||||
you can set all user profiles to use a public email address using the
|
||||
[Rails console](../../../administration/operations/rails_console.md#starting-a-rails-console-session):
|
||||
|
||||
```ruby
|
||||
User.where("public_email IS NULL OR public_email = '' ").find_each do |u|
|
||||
next if u.bot?
|
||||
|
||||
puts "Setting #{u.username}'s currently empty public email to #{u.email}…"
|
||||
u.public_email = u.email
|
||||
u.save!
|
||||
end
|
||||
```
|
||||
|
||||
## Import workarounds for large repositories
|
||||
|
||||
[Maximum import size limitations](import_export.md#import-a-project-and-its-data)
|
||||
|
|
@ -153,12 +174,12 @@ Rather than attempting to push all changes at once, this workaround:
|
|||
|
||||
You usually export a project through [the web interface](import_export.md#export-a-project-and-its-data) or through [the API](../../../api/project_import_export.md). Exporting using these
|
||||
methods can sometimes fail without giving enough information to troubleshoot. In these cases,
|
||||
[open a rails console session](../../../administration/operations/rails_console.md#starting-a-rails-console-session) and loop through
|
||||
[open a Rails console session](../../../administration/operations/rails_console.md#starting-a-rails-console-session) and loop through
|
||||
[all the defined exporters](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/services/projects/import_export/export_service.rb).
|
||||
Execute each line individually, rather than pasting the entire block at once, so you can see any
|
||||
errors each command returns.
|
||||
|
||||
```shell
|
||||
```ruby
|
||||
# User needs to have permission to export
|
||||
u = User.find_by_username('someuser')
|
||||
p = Project.find_by_full_path('some/project')
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ module QA
|
|||
prepend Page::SubMenus::SuperSidebar::Manage
|
||||
prepend Page::SubMenus::SuperSidebar::Plan
|
||||
prepend SubMenus::SuperSidebar::Settings
|
||||
prepend SubMenus::SuperSidebar::Main
|
||||
prepend SubMenus::SuperSidebar::Build
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module QA
|
||||
module Page
|
||||
module Group
|
||||
module SubMenus
|
||||
module SuperSidebar
|
||||
module Main
|
||||
extend QA::Page::PageConcern
|
||||
|
||||
def self.included(base)
|
||||
super
|
||||
|
||||
base.class_eval do
|
||||
include QA::Page::SubMenus::SuperSidebar::Main
|
||||
end
|
||||
end
|
||||
|
||||
def go_to_group_overview
|
||||
click_element(:nav_item_link, submenu_item: 'Group overview')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -80,10 +80,14 @@ module QA
|
|||
end
|
||||
|
||||
def go_to_projects
|
||||
return click_element(:nav_item_link, submenu_item: 'Projects') if Runtime::Env.super_sidebar_enabled?
|
||||
|
||||
click_element(:sidebar_menu_link, menu_item: 'Projects')
|
||||
end
|
||||
|
||||
def go_to_groups
|
||||
return click_element(:nav_item_link, submenu_item: 'Groups') if Runtime::Env.super_sidebar_enabled?
|
||||
|
||||
# Use new functionality to visit Groups where possible
|
||||
if has_element?(:sidebar_menu_link, menu_item: 'Groups')
|
||||
click_element(:sidebar_menu_link, menu_item: 'Groups')
|
||||
|
|
@ -98,6 +102,8 @@ module QA
|
|||
end
|
||||
|
||||
def go_to_snippets
|
||||
return click_element(:nav_item_link, submenu_item: 'Snippets') if Runtime::Env.super_sidebar_enabled?
|
||||
|
||||
click_element(:sidebar_menu_link, menu_item: 'Snippets')
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -6,19 +6,23 @@ module QA
|
|||
module SuperSidebar
|
||||
module Menu
|
||||
def click_ssh_keys
|
||||
click_element(:sidebar_menu_link, menu_item: 'SSH Keys')
|
||||
click_element(:nav_item_link, submenu_item: 'SSH Keys')
|
||||
end
|
||||
|
||||
def click_account
|
||||
click_element(:sidebar_menu_link, menu_item: 'Account')
|
||||
click_element(:nav_item_link, submenu_item: 'Account')
|
||||
end
|
||||
|
||||
def click_emails
|
||||
click_element(:sidebar_menu_link, menu_item: 'Emails')
|
||||
click_element(:nav_item_link, submenu_item: 'Emails')
|
||||
end
|
||||
|
||||
def click_password
|
||||
click_element(:sidebar_menu_link, menu_item: 'Password')
|
||||
click_element(:nav_item_link, submenu_item: 'Password')
|
||||
end
|
||||
|
||||
def click_access_tokens
|
||||
click_element(:nav_item_link, submenu_item: 'Access Tokens')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@ module QA
|
|||
|
||||
if Runtime::Env.super_sidebar_enabled?
|
||||
include Page::SubMenus::SuperSidebar::Manage
|
||||
include SubMenus::SuperSidebar::Project
|
||||
include SubMenus::SuperSidebar::Plan
|
||||
include SubMenus::SuperSidebar::Settings
|
||||
include SubMenus::SuperSidebar::Code
|
||||
include SubMenus::SuperSidebar::Build
|
||||
include SubMenus::SuperSidebar::Operate
|
||||
include SubMenus::SuperSidebar::Monitor
|
||||
include SubMenus::SuperSidebar::Main
|
||||
end
|
||||
|
||||
def click_merge_requests
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ module QA
|
|||
end
|
||||
end
|
||||
|
||||
def click_issues
|
||||
def go_to_issues
|
||||
within_sidebar do
|
||||
click_element(:sidebar_menu_link, menu_item: 'Issues')
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,14 +5,20 @@ module QA
|
|||
module Project
|
||||
module SubMenus
|
||||
module SuperSidebar
|
||||
module Project
|
||||
module Main
|
||||
extend QA::Page::PageConcern
|
||||
|
||||
def click_project
|
||||
within_sidebar do
|
||||
click_element(:sidebar_menu_link, menu_item: 'Project overview')
|
||||
def self.included(base)
|
||||
super
|
||||
|
||||
base.class_eval do
|
||||
include QA::Page::SubMenus::SuperSidebar::Main
|
||||
end
|
||||
end
|
||||
|
||||
def click_project
|
||||
click_element(:nav_item_link, submenu_item: 'Project overview')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module QA
|
||||
module Page
|
||||
module SubMenus
|
||||
module SuperSidebar
|
||||
module Main
|
||||
extend QA::Page::PageConcern
|
||||
|
||||
def go_to_issues
|
||||
click_element(:nav_item_link, submenu_item: 'Issues')
|
||||
end
|
||||
|
||||
def go_to_merge_requests
|
||||
click_element(:nav_item_link, submenu_item: 'Merge requests')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -37,7 +37,11 @@ module QA
|
|||
end
|
||||
end
|
||||
|
||||
it 'imports a project', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347877' do
|
||||
it 'imports a project', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347877',
|
||||
quarantine: {
|
||||
issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/405127',
|
||||
type: :investigating
|
||||
} do
|
||||
Page::Project::Import::Github.perform do |import_page|
|
||||
import_page.add_personal_access_token(Runtime::Env.github_access_token)
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ module QA
|
|||
set_up_jira_integration
|
||||
import_jira_issues
|
||||
|
||||
Page::Project::Menu.perform(&:click_issues)
|
||||
Page::Project::Menu.perform(&:go_to_issues)
|
||||
Page::Project::Issue::Index.perform do |issues_page|
|
||||
expect { issues_page }.to eventually_have_content(jira_issue_title).within(
|
||||
max_attempts: 5, sleep_interval: 1, reload_page: issues_page
|
||||
|
|
@ -56,7 +56,7 @@ module QA
|
|||
end
|
||||
|
||||
def import_jira_issues
|
||||
Page::Project::Menu.perform(&:click_issues)
|
||||
Page::Project::Menu.perform(&:go_to_issues)
|
||||
Page::Project::Issue::Index.perform(&:go_to_jira_import_form)
|
||||
|
||||
Page::Project::Issue::JiraImport.perform do |form|
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ module QA
|
|||
) do
|
||||
issue = Resource::Issue.fabricate_via_browser_ui! { |issue| issue.project = project }
|
||||
|
||||
Page::Project::Menu.perform(&:click_issues)
|
||||
Page::Project::Menu.perform(&:go_to_issues)
|
||||
|
||||
Page::Project::Issue::Index.perform do |index|
|
||||
expect(index).to have_issue(issue)
|
||||
|
|
@ -46,7 +46,7 @@ module QA
|
|||
expect(issue_page).to have_reopen_issue_button
|
||||
end
|
||||
|
||||
Page::Project::Menu.perform(&:click_issues)
|
||||
Page::Project::Menu.perform(&:go_to_issues)
|
||||
|
||||
Page::Project::Issue::Index.perform do |index|
|
||||
expect(index).not_to have_issue(closed_issue)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ module QA
|
|||
end
|
||||
|
||||
project.visit!
|
||||
Page::Project::Menu.perform(&:click_issues)
|
||||
Page::Project::Menu.perform(&:go_to_issues)
|
||||
end
|
||||
|
||||
it 'successfully exports issues list as CSV', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347968' do
|
||||
|
|
|
|||
Loading…
Reference in New Issue