Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-04-09 03:09:05 +00:00
parent e206ab6282
commit b724fa8431
22 changed files with 85 additions and 32 deletions

View File

@ -779,10 +779,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- spec/lib/api/entities/release_spec.rb
- spec/lib/api/helpers/caching_spec.rb
- spec/lib/api/helpers/packages_manager_clients_helpers_spec.rb
- spec/lib/banzai/filter/external_issue_reference_filter_spec.rb
- spec/lib/banzai/filter/inline_metrics_redactor_filter_spec.rb
- spec/lib/banzai/filter/upload_link_filter_spec.rb
- spec/lib/banzai/pipeline/gfm_pipeline_spec.rb
- spec/lib/bulk_imports/groups/loaders/group_loader_spec.rb
- spec/lib/extracts_path_spec.rb
- spec/lib/extracts_ref_spec.rb
@ -856,9 +852,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- spec/lib/gitlab/repository_size_error_message_spec.rb
- spec/lib/gitlab/search_results_spec.rb
- spec/lib/gitlab/shell_spec.rb
- spec/mailers/emails/projects_spec.rb
- spec/mailers/emails/releases_spec.rb
- spec/mailers/emails/service_desk_spec.rb
- spec/models/abuse_report_spec.rb
- spec/models/alert_management/alert_spec.rb
- spec/models/audit_event_spec.rb

View File

@ -274,7 +274,7 @@ gem 'licensee', '~> 9.14.1'
gem 'charlock_holmes', '~> 0.7.7'
# Detect mime content type from content
gem 'ruby-magic', '~> 0.3.2'
gem 'ruby-magic', '~> 0.4'
# Fake version of the gem to trick bundler
gem 'mimemagic', '0.3.7', path: 'vendor/shims/mimemagic', require: false

View File

@ -1113,7 +1113,7 @@ GEM
i18n
ruby-fogbugz (0.2.1)
crack (~> 0.4)
ruby-magic (0.3.2)
ruby-magic (0.4.0)
mini_portile2 (~> 2.5.0)
ruby-prof (1.3.1)
ruby-progressbar (1.11.0)
@ -1560,7 +1560,7 @@ DEPENDENCIES
rspec_junit_formatter
rspec_profiling (~> 0.0.6)
ruby-fogbugz (~> 0.2.1)
ruby-magic (~> 0.3.2)
ruby-magic (~> 0.4)
ruby-prof (~> 1.3.0)
ruby-progressbar (~> 1.10)
ruby_parser (~> 3.15)

View File

@ -0,0 +1,5 @@
---
title: Fix EmptyLineAfterFinalLetItBe offenses in spec/lib/banzai
merge_request: 58242
author: Huzaifa Iftikhar @huzaifaiftikhar
type: fixed

View File

@ -0,0 +1,5 @@
---
title: Fix EmptyLineAfterFinalLetItBe offenses in spec/mailers
merge_request: 58319
author: Huzaifa Iftikhar @huzaifaiftikhar
type: fixed

View File

@ -0,0 +1,5 @@
---
title: Update ruby-magic to v0.4.0
merge_request: 58947
author:
type: changed

View File

@ -66,6 +66,10 @@ Gitaly comes pre-configured with Omnibus GitLab, which is a configuration
GitLab installations for more than 2000 users should use Gitaly Cluster.
NOTE:
If not set in GitLab, feature flags are read as false from the console and Gitaly uses their
default value. The default value depends on the GitLab version.
## Gitaly Cluster
Gitaly, the service that provides storage for Git repositories, can

View File

@ -24,6 +24,10 @@ See the [design
document](https://gitlab.com/gitlab-org/gitaly/-/blob/master/doc/design_ha.md)
for implementation details.
NOTE:
If not set in GitLab, feature flags are read as false from the console and Praefect uses their
default value. The default value depends on the GitLab version.
## Setup Instructions
If you [installed](https://about.gitlab.com/install/) GitLab using the Omnibus
@ -978,9 +982,6 @@ Feature.enable(:gitaly_reference_transactions)
Feature.disable(:gitaly_reference_transactions_primary_wins)
```
NOTE:
If not set in GitLab, flags are read as false from the console and Praefect uses their default value, which depends on the GitLab version.
To monitor strong consistency, you can use the following Prometheus metrics:
- `gitaly_praefect_transactions_total`: Number of transactions created and
@ -1248,8 +1249,9 @@ affected repositories. Praefect provides tools for:
- [Automatic](#automatic-reconciliation) reconciliation, for GitLab 13.4 and later.
- [Manual](#manual-reconciliation) reconciliation, for:
- GitLab 13.3 and earlier.
- Repositories upgraded to GitLab 13.4 and later without entries in the `repositories` table.
A migration tool [is planned](https://gitlab.com/gitlab-org/gitaly/-/issues/3033).
- Repositories upgraded to GitLab 13.4 and later without entries in the `repositories` table. In
GitLab 13.6 and later, [a migration is run](https://gitlab.com/gitlab-org/gitaly/-/issues/3033)
when Praefect starts for these repositories.
These tools reconcile the outdated repositories to bring them fully up to date again.

View File

@ -156,6 +156,10 @@ Example response:
Get details of a runner.
[Maintainer access or higher](../user/permissions.md) is required to get runner details at the project and group level.
Instance-level runner details via this endpoint are available to all signed in users.
```plaintext
GET /runners/:id
```

View File

@ -5,7 +5,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
type: reference
---
# Predefined variables reference
# Predefined variables reference **(FREE)**
Predefined [CI/CD variables](README.md) are available in every GitLab CI/CD pipeline.

View File

@ -303,16 +303,19 @@ Here are the steps to gate a new feature in Gitaly behind a feature flag.
### GitLab Rails
1. Test in a Rails console by setting the feature flag:
Test in a Rails console by setting the feature flag:
NOTE:
Pay attention to the name of the flag and the one used in the Rails console.
There is a difference between them (dashes replaced by underscores and name
prefix is changed). Make sure to prefix all flags with `gitaly_`.
```ruby
Feature.enable('gitaly_go_find_all_tags')
```
```ruby
Feature.enable('gitaly_go_find_all_tags')
```
Pay attention to the name of the flag and the one used in the Rails console. There is a difference
between them (dashes replaced by underscores and name prefix is changed). Make sure to prefix all
flags with `gitaly_`.
NOTE:
If not set in GitLab, feature flags are read as false from the console and Gitaly uses their
default value. The default value depends on the GitLab version.
### Testing with GDK

View File

@ -588,7 +588,7 @@ include:
- template: DAST.gitlab-ci.yml
variables:
DAST_PATHS=/page1.html,/category1/page1.html,/page3.html
DAST_PATHS: "/page1.html,/category1/page1.html,/page3.html"
```
When using `DAST_PATHS` and `DAST_PATHS_FILE`, note the following:

View File

@ -343,10 +343,10 @@ As in other list types, click the trash icon to remove a list.
### Iteration lists **(PREMIUM)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/250479) in GitLab 13.10.
> - It's [deployed behind the `board_new_lists` feature flag](../feature_flags.md), disabled by default.
> - It's [deployed behind the `board_new_lists` and `iteration_board_lists` feature flags](../feature_flags.md), disabled by default.
> - It's disabled on GitLab.com.
> - It's recommended for production use.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-new-add-list-form).
> - To use it in GitLab self-managed instances, ask a GitLab administrator to enable the feature flags: [`board_new_lists`](#enable-or-disable-new-add-list-form) and [`iteration_board_lists`](#enable-or-disable-iteration-lists-in-boards).
WARNING:
This feature might not be available to you. Check the **version history** note above for details.
@ -662,3 +662,25 @@ To disable it:
```ruby
Feature.disable(:board_new_list)
```
### Enable or disable iteration lists in boards **(PREMIUM SELF)**
NOTE:
To enable iteration lists in boards, you also need to enable the [new add list form](#enable-or-disable-new-add-list-form).
The iteration list is under development and not ready for production use. It is
deployed behind a feature flag that is **disabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../administration/feature_flags.md)
can enable it.
To enable it:
```ruby
Feature.enable(:iteration_board_lists)
```
To disable it:
```ruby
Feature.disable(:iteration_board_lists)
```

View File

@ -77,7 +77,7 @@
"codesandbox-api": "0.0.23",
"compression-webpack-plugin": "^5.0.2",
"copy-webpack-plugin": "^5.1.2",
"core-js": "^3.9.1",
"core-js": "^3.10.1",
"cron-validator": "^1.1.1",
"cropper": "^2.3.0",
"css-loader": "^2.1.1",

View File

@ -184,6 +184,7 @@ RSpec.describe Banzai::Filter::ExternalIssueReferenceFilter do
context "jira project" do
let_it_be(:service) { create(:jira_service, project: project) }
let(:reference) { issue.to_reference }
context "with right markdown" do

View File

@ -6,6 +6,7 @@ RSpec.describe Banzai::Filter::InlineMetricsRedactorFilter do
include FilterSpecHelper
let_it_be(:project) { create(:project) }
let(:url) { urls.metrics_dashboard_project_environment_url(project, 1, embedded: true) }
let(:input) { %(<a href="#{url}">example</a>) }
let(:doc) { filter(input) }
@ -38,6 +39,7 @@ RSpec.describe Banzai::Filter::InlineMetricsRedactorFilter do
context 'for a cluster metric embed' do
let_it_be(:cluster) { create(:cluster, :provided_by_gcp, :project, projects: [project]) }
let(:params) { [project.namespace.path, project.path, cluster.id] }
let(:query_params) { { group: 'Cluster Health', title: 'CPU Usage', y_label: 'CPU (cores)' } }
let(:url) { urls.metrics_dashboard_namespace_project_cluster_url(*params, **query_params, format: :json) }
@ -84,6 +86,7 @@ RSpec.describe Banzai::Filter::InlineMetricsRedactorFilter do
context 'for an alert embed' do
let_it_be(:alert) { create(:prometheus_alert, project: project) }
let(:url) do
urls.metrics_dashboard_project_prometheus_alert_url(
project,

View File

@ -35,6 +35,7 @@ RSpec.describe Banzai::Filter::UploadLinkFilter do
let_it_be(:project) { create(:project, :public) }
let_it_be(:user) { create(:user) }
let(:group) { nil }
let(:project_path) { project.full_path }
let(:only_path) { true }
@ -114,6 +115,7 @@ RSpec.describe Banzai::Filter::UploadLinkFilter do
context 'to a group upload' do
let(:upload_link) { link('/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg') }
let_it_be(:group) { create(:group) }
let(:project) { nil }
let(:relative_path) { "/groups/#{group.full_path}/-/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg" }

View File

@ -145,6 +145,7 @@ RSpec.describe Banzai::Pipeline::GfmPipeline do
describe 'emoji in references' do
let_it_be(:project) { create(:project, :public) }
let(:emoji) { '💯' }
it 'renders a label reference with emoji inside' do

View File

@ -81,6 +81,7 @@ RSpec.describe Emails::Projects do
context 'with environment' do
let_it_be(:environment) { create(:environment, project: project) }
let(:payload) { { 'gitlab_environment_name' => environment.name } }
let(:metrics_url) { metrics_project_environment_url(project, environment) }

View File

@ -10,6 +10,7 @@ RSpec.describe Emails::Releases do
describe '#new_release_email' do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project) }
let(:release) { create(:release, project: project) }
subject { Notify.new_release_email(user.id, release) }

View File

@ -14,6 +14,7 @@ RSpec.describe Emails::ServiceDesk do
let_it_be(:project) { create(:project) }
let_it_be(:issue) { create(:issue, project: project) }
let_it_be(:email) { 'someone@gitlab.com' }
let(:template) { double(content: template_content) }
before_all do

View File

@ -3387,10 +3387,10 @@ core-js-pure@^3.0.0:
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.6.5.tgz#c79e75f5e38dbc85a662d91eea52b8256d53b813"
integrity sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA==
core-js@^3.1.3, core-js@^3.9.1:
version "3.9.1"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.9.1.tgz#cec8de593db8eb2a85ffb0dbdeb312cb6e5460ae"
integrity sha512-gSjRvzkxQc1zjM/5paAmL4idJBFzuJoo+jDjF1tStYFMV2ERfD02HhahhCGXUyHxQRG4yFKVSdO6g62eoRMcDg==
core-js@^3.1.3, core-js@^3.10.1:
version "3.10.1"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.10.1.tgz#e683963978b6806dcc6c0a4a8bd4ab0bdaf3f21a"
integrity sha512-pwCxEXnj27XG47mu7SXAwhLP3L5CrlvCB91ANUkIz40P27kUcvNfSdvyZJ9CLHiVoKSp+TTChMQMSKQEH/IQxA==
core-js@~2.3.0:
version "2.3.0"