Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
fe8c2962
Commit
fe8c2962
authored
Apr 26, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
6ba5573a
5781efdb
Changes
38
Show whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
114 additions
and
67 deletions
+114
-67
.gitlab/CODEOWNERS
.gitlab/CODEOWNERS
+34
-26
.rubocop_manual_todo.yml
.rubocop_manual_todo.yml
+0
-17
.rubocop_todo.yml
.rubocop_todo.yml
+0
-14
GITLAB_SHELL_VERSION
GITLAB_SHELL_VERSION
+1
-1
app/models/concerns/taskable.rb
app/models/concerns/taskable.rb
+1
-1
changelogs/unreleased/328393_enable_destroy_webhooks_before_the_project_by_default.yml
...enable_destroy_webhooks_before_the_project_by_default.yml
+5
-0
changelogs/unreleased/gitlab-shell-13-18-0.yml
changelogs/unreleased/gitlab-shell-13-18-0.yml
+5
-0
changelogs/unreleased/pl-rubocop-todo-redundant-regexp-character-class.yml
...ased/pl-rubocop-todo-redundant-regexp-character-class.yml
+5
-0
config/feature_flags/development/destroy_webhooks_before_the_project.yml
...flags/development/destroy_webhooks_before_the_project.yml
+1
-1
ee/app/models/saml_provider.rb
ee/app/models/saml_provider.rb
+1
-1
ee/changelogs/unreleased/rspec-empty-lines-after-letitbe-ee-spec-graphql-mutations.yml
...c-empty-lines-after-letitbe-ee-spec-graphql-mutations.yml
+5
-0
ee/spec/graphql/ee/mutations/concerns/mutations/resolves_issuable_spec.rb
...ee/mutations/concerns/mutations/resolves_issuable_spec.rb
+1
-0
ee/spec/graphql/mutations/boards/update_epic_user_preferences_spec.rb
...hql/mutations/boards/update_epic_user_preferences_spec.rb
+1
-0
ee/spec/graphql/mutations/clusters/agent_tokens/create_spec.rb
...ec/graphql/mutations/clusters/agent_tokens/create_spec.rb
+1
-0
ee/spec/graphql/mutations/compliance_management/frameworks/create_spec.rb
...mutations/compliance_management/frameworks/create_spec.rb
+1
-0
ee/spec/graphql/mutations/compliance_management/frameworks/destroy_spec.rb
...utations/compliance_management/frameworks/destroy_spec.rb
+1
-0
ee/spec/graphql/mutations/compliance_management/frameworks/update_spec.rb
...mutations/compliance_management/frameworks/update_spec.rb
+1
-0
ee/spec/graphql/mutations/dast_scanner_profiles/delete_spec.rb
...ec/graphql/mutations/dast_scanner_profiles/delete_spec.rb
+1
-0
ee/spec/graphql/mutations/epics/add_issue_spec.rb
ee/spec/graphql/mutations/epics/add_issue_spec.rb
+1
-0
ee/spec/graphql/mutations/gitlab_subscriptions/activate_spec.rb
...c/graphql/mutations/gitlab_subscriptions/activate_spec.rb
+1
-0
ee/spec/graphql/mutations/incident_management/oncall_rotation/create_spec.rb
...ations/incident_management/oncall_rotation/create_spec.rb
+1
-0
ee/spec/graphql/mutations/incident_management/oncall_rotation/destroy_spec.rb
...tions/incident_management/oncall_rotation/destroy_spec.rb
+1
-0
ee/spec/graphql/mutations/incident_management/oncall_schedule/create_spec.rb
...ations/incident_management/oncall_schedule/create_spec.rb
+1
-0
ee/spec/graphql/mutations/incident_management/oncall_schedule/destroy_spec.rb
...tions/incident_management/oncall_schedule/destroy_spec.rb
+1
-0
ee/spec/graphql/mutations/incident_management/oncall_schedule/update_spec.rb
...ations/incident_management/oncall_schedule/update_spec.rb
+1
-0
ee/spec/graphql/mutations/issues/set_epic_spec.rb
ee/spec/graphql/mutations/issues/set_epic_spec.rb
+1
-0
ee/spec/graphql/mutations/requirements_management/export_requirements_spec.rb
...tions/requirements_management/export_requirements_spec.rb
+1
-0
ee/spec/graphql/mutations/vulnerabilities/create_external_issue_link_spec.rb
...ations/vulnerabilities/create_external_issue_link_spec.rb
+1
-0
lib/banzai/filter/markdown_pre_escape_filter.rb
lib/banzai/filter/markdown_pre_escape_filter.rb
+1
-1
lib/gitlab/authorized_keys.rb
lib/gitlab/authorized_keys.rb
+1
-1
lib/gitlab/database/background_migration/batched_migration.rb
...gitlab/database/background_migration/batched_migration.rb
+4
-0
lib/gitlab/database/background_migration/batched_migration_wrapper.rb
...atabase/background_migration/batched_migration_wrapper.rb
+5
-0
lib/gitlab/fogbugz_import/repository.rb
lib/gitlab/fogbugz_import/repository.rb
+1
-1
lib/gitlab/quick_actions/substitution_definition.rb
lib/gitlab/quick_actions/substitution_definition.rb
+1
-1
lib/gitlab/regex.rb
lib/gitlab/regex.rb
+1
-1
spec/features/merge_request/user_views_open_merge_request_spec.rb
...tures/merge_request/user_views_open_merge_request_spec.rb
+1
-1
spec/lib/gitlab/database/background_migration/batched_migration_spec.rb
...b/database/background_migration/batched_migration_spec.rb
+16
-0
spec/lib/gitlab/database/background_migration/batched_migration_wrapper_spec.rb
...se/background_migration/batched_migration_wrapper_spec.rb
+8
-0
No files found.
.gitlab/CODEOWNERS
View file @
fe8c2962
...
...
@@ -223,33 +223,41 @@ Dangerfile @gl-quality/eng-prod
/ee/lib/gitlab/ci/reports/security/ @gitlab-org/secure/composition-analysis-be @gitlab-org/secure/dynamic-analysis-be @gitlab-org/secure/static-analysis-be @gitlab-org/secure/fuzzing-be
[Container Security]
/ee/app/views/projects/threat_monitoring/** @gitlab-org/threat-management/defend/container-security/frontend
/ee/app/assets/javascripts/pages/projects/threat_monitoring/** @gitlab-org/threat-management/defend/container-security/frontend
/ee/app/assets/javascripts/threat_monitoring/** @gitlab-org/threat-management/defend/container-security/frontend
/ee/spec/frontend/threat_monitoring/** @gitlab-org/threat-management/defend/container-security/frontend
/ee/app/views/projects/threat_monitoring/** @gitlab-org/protect/container-security-frontend
/ee/app/views/projects/security/policies/** @gitlab-org/protect/container-security-frontend
/ee/spec/views/projects/security/policies/** @gitlab-org/protect/container-security-frontend
/ee/app/assets/javascripts/pages/projects/threat_monitoring/** @gitlab-org/protect/container-security-frontend
/ee/app/assets/javascripts/threat_monitoring/** @gitlab-org/protect/container-security-frontend
/ee/spec/frontend/threat_monitoring/** @gitlab-org/protect/container-security-frontend
/ee/app/controllers/projects/threat_monitoring_controller.rb @gitlab-org/threat-management/defend/container-security/backend
/ee/spec/controllers/projects/threat_monitoring_controller_spec.rb @gitlab-org/threat-management/defend/container-security/backend
/lib/gitlab/kubernetes/cilium_network_policy.rb @gitlab-org/threat-management/defend/container-security/backend
/spec/lib/gitlab/kubernetes/cilium_network_policy_spec.rb @gitlab-org/threat-management/defend/container-security/backend
/lib/gitlab/kubernetes/network_policy_common.rb @gitlab-org/threat-management/defend/container-security/backend
/spec/support/shared_examples/lib/gitlab/kubernetes/network_policy_common_shared_examples.rb @gitlab-org/threat-management/defend/container-security/backend
/lib/gitlab/kubernetes/network_policy.rb @gitlab-org/threat-management/defend/container-security/backend
/spec/lib/gitlab/kubernetes/network_policy_spec.rb @gitlab-org/threat-management/defend/container-security/backend
/ee/app/services/network_policies/** @gitlab-org/threat-management/defend/container-security/backend
/ee/spec/services/network_policies/** @gitlab-org/threat-management/defend/container-security/backend
/ee/app/controllers/projects/security/waf_anomalies_controller.rb @gitlab-org/threat-management/defend/container-security/backend
/ee/spec/controllers/projects/security/waf_anomalies_controller_spec.rb @gitlab-org/threat-management/defend/container-security/backend
/app/models/clusters/applications/cilium.rb @gitlab-org/threat-management/defend/container-security/backend
/spec/models/clusters/applications/cilium_spec.rb @gitlab-org/threat-management/defend/container-security/backend
/ee/app/controllers/projects/security/network_policies_controller.rb @gitlab-org/threat-management/defend/container-security/backend
/ee/spec/controllers/projects/security/network_policies_controller_spec.rb @gitlab-org/threat-management/defend/container-security/backend
/ee/app/workers/network_policy_metrics_worker.rb @gitlab-org/threat-management/defend/container-security/backend
/ee/spec/workers/network_policy_metrics_worker_spec.rb @gitlab-org/threat-management/defend/container-security/backend
/ee/app/services/network_policies/** @gitlab-org/threat-management/defend/container-security/backend
/ee/spec/services/network_policies/** @gitlab-org/threat-management/defend/container-security/backend
/ee/lib/gitlab/usage_data_counters/network_policy_counter.rb @gitlab-org/threat-management/defend/container-security/backend
/ee/spec/lib/gitlab/usage_data_counters/network_policy_counter_spec.rb @gitlab-org/threat-management/defend/container-security/backend
/ee/app/controllers/projects/threat_monitoring_controller.rb @gitlab-org/protect/container-security-backend
/ee/spec/controllers/projects/threat_monitoring_controller_spec.rb @gitlab-org/protect/container-security-backend
/ee/app/controllers/projects/security/policies_controller.rb @gitlab-org/protect/container-security-backend
/ee/spec/requests/projects/security/policies_controller_spec.rb @gitlab-org/protect/container-security-backend
/ee/app/models/security/orchestration_policy_configuration.rb @gitlab-org/protect/container-security-backend
/ee/spec/models/security/orchestration_policy_configuration_spec.rb @gitlab-org/protect/container-security-backend
/lib/gitlab/kubernetes/cilium_network_policy.rb @gitlab-org/protect/container-security-backend
/spec/lib/gitlab/kubernetes/cilium_network_policy_spec.rb @gitlab-org/protect/container-security-backend
/lib/gitlab/kubernetes/network_policy_common.rb @gitlab-org/protect/container-security-backend
/spec/support/shared_examples/lib/gitlab/kubernetes/network_policy_common_shared_examples.rb @gitlab-org/protect/container-security-backend
/lib/gitlab/kubernetes/network_policy.rb @gitlab-org/protect/container-security-backend
/spec/lib/gitlab/kubernetes/network_policy_spec.rb @gitlab-org/protect/container-security-backend
/ee/app/services/network_policies/** @gitlab-org/protect/container-security-backend
/ee/spec/services/network_policies/** @gitlab-org/protect/container-security-backend
/ee/app/controllers/projects/security/waf_anomalies_controller.rb @gitlab-org/protect/container-security-backend
/ee/spec/controllers/projects/security/waf_anomalies_controller_spec.rb @gitlab-org/protect/container-security-backend
/app/models/clusters/applications/cilium.rb @gitlab-org/protect/container-security-backend
/spec/models/clusters/applications/cilium_spec.rb @gitlab-org/protect/container-security-backend
/ee/app/controllers/projects/security/network_policies_controller.rb @gitlab-org/protect/container-security-backend
/ee/spec/controllers/projects/security/network_policies_controller_spec.rb @gitlab-org/protect/container-security-backend
/ee/app/workers/network_policy_metrics_worker.rb @gitlab-org/protect/container-security-backend
/ee/spec/workers/network_policy_metrics_worker_spec.rb @gitlab-org/protect/container-security-backend
/ee/app/services/network_policies/** @gitlab-org/protect/container-security-backend
/ee/spec/services/network_policies/** @gitlab-org/protect/container-security-backend
/ee/app/services/security/orchestration/** @gitlab-org/protect/container-security-backend
/ee/spec/services/security/orchestration/** @gitlab-org/protect/container-security-backend
/ee/lib/gitlab/usage_data_counters/network_policy_counter.rb @gitlab-org/protect/container-security-backend
/ee/spec/lib/gitlab/usage_data_counters/network_policy_counter_spec.rb @gitlab-org/protect/container-security-backend
[Code Owners]
/ee/lib/gitlab/code_owners.rb @reprazent @kerrizor @garyh
...
...
.rubocop_manual_todo.yml
View file @
fe8c2962
...
...
@@ -398,23 +398,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
-
ee/spec/features/markdown/metrics_spec.rb
-
ee/spec/features/registrations/group_invites_during_signup_flow_spec.rb
-
ee/spec/features/subscriptions_spec.rb
-
ee/spec/graphql/ee/mutations/concerns/mutations/resolves_issuable_spec.rb
-
ee/spec/graphql/mutations/boards/update_epic_user_preferences_spec.rb
-
ee/spec/graphql/mutations/clusters/agent_tokens/create_spec.rb
-
ee/spec/graphql/mutations/compliance_management/frameworks/create_spec.rb
-
ee/spec/graphql/mutations/compliance_management/frameworks/destroy_spec.rb
-
ee/spec/graphql/mutations/compliance_management/frameworks/update_spec.rb
-
ee/spec/graphql/mutations/dast_scanner_profiles/delete_spec.rb
-
ee/spec/graphql/mutations/epics/add_issue_spec.rb
-
ee/spec/graphql/mutations/gitlab_subscriptions/activate_spec.rb
-
ee/spec/graphql/mutations/incident_management/oncall_rotation/create_spec.rb
-
ee/spec/graphql/mutations/incident_management/oncall_rotation/destroy_spec.rb
-
ee/spec/graphql/mutations/incident_management/oncall_schedule/create_spec.rb
-
ee/spec/graphql/mutations/incident_management/oncall_schedule/destroy_spec.rb
-
ee/spec/graphql/mutations/incident_management/oncall_schedule/update_spec.rb
-
ee/spec/graphql/mutations/issues/set_epic_spec.rb
-
ee/spec/graphql/mutations/requirements_management/export_requirements_spec.rb
-
ee/spec/graphql/mutations/vulnerabilities/create_external_issue_link_spec.rb
-
ee/spec/graphql/types/issue_type_spec.rb
-
ee/spec/helpers/ee/graph_helper_spec.rb
-
ee/spec/helpers/ee/issues_helper_spec.rb
...
...
.rubocop_todo.yml
View file @
fe8c2962
...
...
@@ -859,20 +859,6 @@ Style/RedundantFetchBlock:
Style/RedundantInterpolation
:
Enabled
:
false
# Offense count: 10
# Cop supports --auto-correct.
Style/RedundantRegexpCharacterClass
:
Exclude
:
-
'
app/models/concerns/taskable.rb'
-
'
ee/app/models/saml_provider.rb'
-
'
lib/banzai/filter/markdown_pre_escape_filter.rb'
-
'
lib/gitlab/authorized_keys.rb'
-
'
lib/gitlab/fogbugz_import/repository.rb'
-
'
lib/gitlab/quick_actions/substitution_definition.rb'
-
'
lib/gitlab/regex.rb'
-
'
spec/features/merge_request/user_views_open_merge_request_spec.rb'
-
'
spec/tasks/gitlab/usage_data_rake_spec.rb'
# Offense count: 279
# Cop supports --auto-correct.
Style/RedundantRegexpEscape
:
...
...
GITLAB_SHELL_VERSION
View file @
fe8c2962
13.1
7
.0
13.1
8
.0
app/models/concerns/taskable.rb
View file @
fe8c2962
...
...
@@ -12,7 +12,7 @@ module Taskable
COMPLETED
=
'completed'
INCOMPLETE
=
'incomplete'
COMPLETE_PATTERN
=
/(\[[xX]\])/
.
freeze
INCOMPLETE_PATTERN
=
/(\[
[\s]
\])/
.
freeze
INCOMPLETE_PATTERN
=
/(\[
\s
\])/
.
freeze
ITEM_PATTERN
=
%r{
^
(?:(?:>
\s
{0,4})*) # optional blockquote characters
...
...
changelogs/unreleased/328393_enable_destroy_webhooks_before_the_project_by_default.yml
0 → 100644
View file @
fe8c2962
---
title
:
Explicitly destroy webhooks and logs before the project deletion
merge_request
:
60122
author
:
type
:
fixed
changelogs/unreleased/gitlab-shell-13-18-0.yml
0 → 100644
View file @
fe8c2962
---
title
:
Update GitLab Shell to v13.18.0
merge_request
:
60288
author
:
type
:
other
changelogs/unreleased/pl-rubocop-todo-redundant-regexp-character-class.yml
0 → 100644
View file @
fe8c2962
---
title
:
Resolve RuboCop offenses for Style/RedundantRegexpCharacterClass
merge_request
:
57914
author
:
Shubham Kumar @imskr
type
:
fixed
config/feature_flags/development/destroy_webhooks_before_the_project.yml
View file @
fe8c2962
...
...
@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/328393
milestone
:
'
13.12'
type
:
development
group
:
group::source code
default_enabled
:
fals
e
default_enabled
:
tru
e
ee/app/models/saml_provider.rb
View file @
fe8c2962
...
...
@@ -109,6 +109,6 @@ class SamlProvider < ApplicationRecord
end
def
strip_left_to_right_chars
(
input
)
input
&
.
gsub
(
/
[\u200E]
/
,
''
)
input
&
.
gsub
(
/
\u200E
/
,
''
)
end
end
ee/changelogs/unreleased/rspec-empty-lines-after-letitbe-ee-spec-graphql-mutations.yml
0 → 100644
View file @
fe8c2962
---
title
:
Fix RSpec/EmptyLineAfterFinalLetItBe rubocop offenses in ee/spec/graphsql/mutations
merge_request
:
58390
author
:
Abdul Wadood @abdulwd
type
:
fixed
ee/spec/graphql/ee/mutations/concerns/mutations/resolves_issuable_spec.rb
View file @
fe8c2962
...
...
@@ -13,6 +13,7 @@ RSpec.describe Mutations::ResolvesIssuable do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:context
)
{
{
current_user:
user
}
}
let_it_be
(
:epic
)
{
create
(
:epic
,
group:
group
)
}
let
(
:mutation
)
{
mutation_class
.
new
(
object:
nil
,
context:
context
,
field:
nil
)
}
context
'with epics'
do
...
...
ee/spec/graphql/mutations/boards/update_epic_user_preferences_spec.rb
View file @
fe8c2962
...
...
@@ -8,6 +8,7 @@ RSpec.describe Mutations::Boards::UpdateEpicUserPreferences do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:board
)
{
create
(
:board
,
project:
project
)
}
let_it_be
(
:epic
)
{
create
(
:epic
,
group:
group
)
}
let
(
:context
)
{
{
current_user:
user
}
}
subject
(
:mutation
)
{
described_class
.
new
(
object:
nil
,
context:
context
,
field:
nil
).
resolve
(
**
mutation_params
)
}
...
...
ee/spec/graphql/mutations/clusters/agent_tokens/create_spec.rb
View file @
fe8c2962
...
...
@@ -7,6 +7,7 @@ RSpec.describe Mutations::Clusters::AgentTokens::Create do
let_it_be
(
:cluster_agent
)
{
create
(
:cluster_agent
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:context
)
do
GraphQL
::
Query
::
Context
.
new
(
query:
OpenStruct
.
new
(
schema:
nil
),
...
...
ee/spec/graphql/mutations/compliance_management/frameworks/create_spec.rb
View file @
fe8c2962
...
...
@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Mutations
::
ComplianceManagement
::
Frameworks
::
Create
do
let_it_be
(
:current_user
)
{
create
(
:user
)
}
let_it_be
(
:namespace
)
{
create
(
:namespace
)
}
let
(
:params
)
{
valid_params
}
let
(
:mutation
)
{
described_class
.
new
(
object:
nil
,
context:
{
current_user:
current_user
},
field:
nil
)
}
...
...
ee/spec/graphql/mutations/compliance_management/frameworks/destroy_spec.rb
View file @
fe8c2962
...
...
@@ -6,6 +6,7 @@ RSpec.describe Mutations::ComplianceManagement::Frameworks::Destroy do
include
GraphqlHelpers
let_it_be
(
:framework
)
{
create
(
:compliance_framework
)
}
let
(
:user
)
{
framework
.
namespace
.
owner
}
let
(
:mutation
)
{
described_class
.
new
(
object:
nil
,
context:
{
current_user:
user
},
field:
nil
)
}
...
...
ee/spec/graphql/mutations/compliance_management/frameworks/update_spec.rb
View file @
fe8c2962
...
...
@@ -6,6 +6,7 @@ RSpec.describe Mutations::ComplianceManagement::Frameworks::Update do
include
GraphqlHelpers
let_it_be
(
:framework
)
{
create
(
:compliance_framework
)
}
let
(
:user
)
{
framework
.
namespace
.
owner
}
let
(
:mutation
)
{
described_class
.
new
(
object:
nil
,
context:
{
current_user:
user
},
field:
nil
)
}
let
(
:params
)
do
...
...
ee/spec/graphql/mutations/dast_scanner_profiles/delete_spec.rb
View file @
fe8c2962
...
...
@@ -7,6 +7,7 @@ RSpec.describe Mutations::DastScannerProfiles::Delete do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:full_path
)
{
project
.
full_path
}
let_it_be
(
:dast_scanner_profile
)
{
create
(
:dast_scanner_profile
,
project:
project
)
}
let
(
:dast_scanner_profile_id
)
{
dast_scanner_profile
.
to_global_id
}
subject
(
:mutation
)
{
described_class
.
new
(
object:
nil
,
context:
{
current_user:
user
},
field:
nil
)
}
...
...
ee/spec/graphql/mutations/epics/add_issue_spec.rb
View file @
fe8c2962
...
...
@@ -6,6 +6,7 @@ RSpec.describe Mutations::Epics::AddIssue do
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
let_it_be
(
:epic
)
{
create
(
:epic
,
group:
group
)
}
let
(
:user
)
{
issue
.
author
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
...
...
ee/spec/graphql/mutations/gitlab_subscriptions/activate_spec.rb
View file @
fe8c2962
...
...
@@ -9,6 +9,7 @@ RSpec.describe Mutations::GitlabSubscriptions::Activate do
let_it_be
(
:user
)
{
create
(
:admin
)
}
let_it_be
(
:created_license
)
{
License
.
last
}
let
(
:activation_code
)
{
'activation_code'
}
let
(
:result
)
{
{
success:
true
,
license:
created_license
}
}
...
...
ee/spec/graphql/mutations/incident_management/oncall_rotation/create_spec.rb
View file @
fe8c2962
...
...
@@ -6,6 +6,7 @@ RSpec.describe Mutations::IncidentManagement::OncallRotation::Create do
let_it_be
(
:current_user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:schedule
)
{
create
(
:incident_management_oncall_schedule
,
project:
project
)
}
let
(
:args
)
do
{
project_path:
project
.
full_path
,
...
...
ee/spec/graphql/mutations/incident_management/oncall_rotation/destroy_spec.rb
View file @
fe8c2962
...
...
@@ -7,6 +7,7 @@ RSpec.describe Mutations::IncidentManagement::OncallRotation::Destroy do
let_it_be_with_refind
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:schedule
)
{
create
(
:incident_management_oncall_schedule
,
project:
project
)
}
let_it_be
(
:rotation
)
{
create
(
:incident_management_oncall_rotation
,
schedule:
schedule
)
}
let
(
:args
)
do
{
project_path:
project
.
full_path
,
...
...
ee/spec/graphql/mutations/incident_management/oncall_schedule/create_spec.rb
View file @
fe8c2962
...
...
@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Mutations
::
IncidentManagement
::
OncallSchedule
::
Create
do
let_it_be
(
:current_user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:args
)
do
{
project_path:
project
.
full_path
,
...
...
ee/spec/graphql/mutations/incident_management/oncall_schedule/destroy_spec.rb
View file @
fe8c2962
...
...
@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Mutations
::
IncidentManagement
::
OncallSchedule
::
Destroy
do
let_it_be
(
:current_user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:oncall_schedule
)
{
create
(
:incident_management_oncall_schedule
,
project:
project
)
}
let
(
:args
)
{
{
project_path:
project
.
full_path
,
iid:
oncall_schedule
.
iid
.
to_s
}
}
...
...
ee/spec/graphql/mutations/incident_management/oncall_schedule/update_spec.rb
View file @
fe8c2962
...
...
@@ -6,6 +6,7 @@ RSpec.describe Mutations::IncidentManagement::OncallSchedule::Update do
let_it_be
(
:current_user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:oncall_schedule
)
{
create
(
:incident_management_oncall_schedule
,
project:
project
)
}
let
(
:args
)
do
{
project_path:
project
.
full_path
,
...
...
ee/spec/graphql/mutations/issues/set_epic_spec.rb
View file @
fe8c2962
...
...
@@ -12,6 +12,7 @@ RSpec.describe Mutations::Issues::SetEpic do
describe
'#resolve'
do
let_it_be_with_reload
(
:epic
)
{
create
(
:epic
,
group:
group
)
}
let
(
:mutated_issue
)
{
subject
[
:issue
]
}
subject
{
mutation
.
resolve
(
project_path:
issue
.
project
.
full_path
,
iid:
issue
.
iid
,
epic:
epic
)
}
...
...
ee/spec/graphql/mutations/requirements_management/export_requirements_spec.rb
View file @
fe8c2962
...
...
@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Mutations
::
RequirementsManagement
::
ExportRequirements
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:fields
)
{
[]
}
let
(
:args
)
do
{
...
...
ee/spec/graphql/mutations/vulnerabilities/create_external_issue_link_spec.rb
View file @
fe8c2962
...
...
@@ -44,6 +44,7 @@ RSpec.describe Mutations::Vulnerabilities::CreateExternalIssueLink do
context
'when issue creation succeeds'
do
let_it_be
(
:external_issue_link
)
{
build
(
:vulnerabilities_external_issue_link
)
}
let
(
:result
)
{
double
(
success?:
true
,
payload:
{
record:
external_issue_link
},
errors:
[])
}
it
'returns empty external issue link'
do
...
...
lib/banzai/filter/markdown_pre_escape_filter.rb
View file @
fe8c2962
...
...
@@ -26,7 +26,7 @@ module Banzai
class
MarkdownPreEscapeFilter
<
HTML
::
Pipeline
::
TextFilter
# We just need to target those that are special GitLab references
REFERENCE_CHARACTERS
=
'@#!$&~%^'
ASCII_PUNCTUATION
=
%r{(
[
\\
]
[
#{
REFERENCE_CHARACTERS
}
])}
.
freeze
ASCII_PUNCTUATION
=
%r{(
\\
[
#{
REFERENCE_CHARACTERS
}
])}
.
freeze
LITERAL_KEYWORD
=
'cmliteral'
def
call
...
...
lib/gitlab/authorized_keys.rb
View file @
fe8c2962
...
...
@@ -161,7 +161,7 @@ module Gitlab
end
def
strip
(
key
)
key
.
split
(
/
[ ]
+/
)[
0
,
2
].
join
(
' '
)
key
.
split
(
/
+/
)[
0
,
2
].
join
(
' '
)
end
end
end
lib/gitlab/database/background_migration/batched_migration.rb
View file @
fe8c2962
...
...
@@ -64,6 +64,10 @@ module Gitlab
write_attribute
(
:batch_class_name
,
class_name
.
demodulize
)
end
def
migrated_tuple_count
batched_jobs
.
succeeded
.
sum
(
:batch_size
)
end
def
prometheus_labels
@prometheus_labels
||=
{
migration_id:
id
,
...
...
lib/gitlab/database/background_migration/batched_migration_wrapper.rb
View file @
fe8c2962
...
...
@@ -65,6 +65,7 @@ module Gitlab
metric_for
(
:gauge_interval
).
set
(
base_labels
,
tracking_record
.
batched_migration
.
interval
)
metric_for
(
:gauge_job_duration
).
set
(
base_labels
,
(
tracking_record
.
finished_at
-
tracking_record
.
started_at
).
to_i
)
metric_for
(
:counter_updated_tuples
).
increment
(
base_labels
,
tracking_record
.
batch_size
)
metric_for
(
:gauge_migrated_tuples
).
set
(
base_labels
,
tracking_record
.
batched_migration
.
migrated_tuple_count
)
metric_for
(
:gauge_total_tuple_count
).
set
(
base_labels
,
tracking_record
.
batched_migration
.
total_tuple_count
)
if
metrics
=
tracking_record
.
metrics
...
...
@@ -106,6 +107,10 @@ module Gitlab
:batched_migration_job_updated_tuples_total
,
'Number of tuples updated by batched migration job'
),
gauge_migrated_tuples:
Gitlab
::
Metrics
.
gauge
(
:batched_migration_migrated_tuples_total
,
'Total number of tuples migrated by a batched migration'
),
histogram_timings:
Gitlab
::
Metrics
.
histogram
(
:batched_migration_job_query_duration_seconds
,
'Query timings for a batched migration job'
,
...
...
lib/gitlab/fogbugz_import/repository.rb
View file @
fe8c2962
...
...
@@ -26,7 +26,7 @@ module Gitlab
end
def
path
safe_name
.
gsub
(
/
[\s]
/
,
'_'
)
safe_name
.
gsub
(
/
\s
/
,
'_'
)
end
end
end
...
...
lib/gitlab/quick_actions/substitution_definition.rb
View file @
fe8c2962
...
...
@@ -13,7 +13,7 @@ module Gitlab
return
unless
content
all_names
.
each
do
|
a_name
|
content
=
content
.
sub
(
%r{/
#{
a_name
}
(?!
[
\S
]
) ?(.*)$}i
,
execute_block
(
action_block
,
context
,
'\1'
))
content
=
content
.
sub
(
%r{/
#{
a_name
}
(?!
\S
) ?(.*)$}i
,
execute_block
(
action_block
,
context
,
'\1'
))
end
content
...
...
lib/gitlab/regex.rb
View file @
fe8c2962
...
...
@@ -237,7 +237,7 @@ module Gitlab
# used as a routing constraint.
#
def
container_registry_tag_regex
@container_registry_tag_regex
||=
/
[\w]
[\w.-]{0,127}/
@container_registry_tag_regex
||=
/
\w
[\w.-]{0,127}/
end
def
environment_name_regex_chars
...
...
spec/features/merge_request/user_views_open_merge_request_spec.rb
View file @
fe8c2962
...
...
@@ -76,7 +76,7 @@ RSpec.describe 'User views an open merge request' do
it
'does not show diverged commits count'
do
page
.
within
(
'.mr-source-target'
)
do
expect
(
page
).
not_to
have_content
(
/([0-9]+ commit
[s]
? behind)/
)
expect
(
page
).
not_to
have_content
(
/([0-9]+ commit
s
? behind)/
)
end
end
end
...
...
spec/lib/gitlab/database/background_migration/batched_migration_spec.rb
View file @
fe8c2962
...
...
@@ -204,6 +204,22 @@ RSpec.describe Gitlab::Database::BackgroundMigration::BatchedMigration, type: :m
it_behaves_like
'an attr_writer that demodulizes assigned class names'
,
:batch_class_name
end
describe
'#migrated_tuple_count'
do
subject
{
batched_migration
.
migrated_tuple_count
}
let
(
:batched_migration
)
{
create
(
:batched_background_migration
)
}
before
do
create_list
(
:batched_background_migration_job
,
5
,
status: :succeeded
,
batch_size:
1_000
,
batched_migration:
batched_migration
)
create_list
(
:batched_background_migration_job
,
1
,
status: :running
,
batch_size:
1_000
,
batched_migration:
batched_migration
)
create_list
(
:batched_background_migration_job
,
1
,
status: :failed
,
batch_size:
1_000
,
batched_migration:
batched_migration
)
end
it
'sums the batch_size of succeeded jobs'
do
expect
(
subject
).
to
eq
(
5_000
)
end
end
describe
'#prometheus_labels'
do
let
(
:batched_migration
)
{
create
(
:batched_background_migration
,
job_class_name:
'TestMigration'
,
table_name:
'foo'
,
column_name:
'bar'
)
}
...
...
spec/lib/gitlab/database/background_migration/batched_migration_wrapper_spec.rb
View file @
fe8c2962
...
...
@@ -80,6 +80,14 @@ RSpec.describe Gitlab::Database::BackgroundMigration::BatchedMigrationWrapper, '
subject
end
it
'reports migrated tuples'
do
count
=
double
expect
(
job_record
.
batched_migration
).
to
receive
(
:migrated_tuple_count
).
and_return
(
count
)
expect
(
described_class
.
metrics
[
:gauge_migrated_tuples
]).
to
receive
(
:set
).
with
(
labels
,
count
)
subject
end
it
'reports summary of query timings'
do
metrics
=
{
'timings'
=>
{
'update_all'
=>
[
1
,
2
,
3
,
4
,
5
]
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment