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
ae2d0864
Commit
ae2d0864
authored
May 11, 2020
by
Furkan Ayhan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove FF validate_scheduling_type_of_processables
parent
ff5ef5c6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
16 deletions
+4
-16
app/models/ci/processable.rb
app/models/ci/processable.rb
+1
-7
spec/models/ci/processable_spec.rb
spec/models/ci/processable_spec.rb
+3
-9
No files found.
app/models/ci/processable.rb
View file @
ae2d0864
...
@@ -49,7 +49,7 @@ module Ci
...
@@ -49,7 +49,7 @@ module Ci
end
end
validates
:type
,
presence:
true
validates
:type
,
presence:
true
validates
:scheduling_type
,
presence:
true
,
on: :create
,
if: :validate_scheduling_type
?
validates
:scheduling_type
,
presence:
true
,
on: :create
,
unless: :importing
?
delegate
:merge_request?
,
delegate
:merge_request?
,
:merge_request_ref?
,
:merge_request_ref?
,
...
@@ -99,11 +99,5 @@ module Ci
...
@@ -99,11 +99,5 @@ module Ci
needs
.
map
{
|
need
|
need
.
attributes
.
except
(
'id'
,
'build_id'
)
}
needs
.
map
{
|
need
|
need
.
attributes
.
except
(
'id'
,
'build_id'
)
}
end
end
end
end
private
def
validate_scheduling_type?
!
importing?
&&
Feature
.
enabled?
(
:validate_scheduling_type_of_processables
,
project
)
end
end
end
end
end
spec/models/ci/processable_spec.rb
View file @
ae2d0864
...
@@ -52,18 +52,12 @@ describe Ci::Processable do
...
@@ -52,18 +52,12 @@ describe Ci::Processable do
subject
{
build
(
:ci_build
,
project:
project
,
pipeline:
pipeline
,
importing:
importing
)
}
subject
{
build
(
:ci_build
,
project:
project
,
pipeline:
pipeline
,
importing:
importing
)
}
where
(
:importing
,
:validate_scheduling_type_flag
,
:should_validate
)
do
where
(
:importing
,
:should_validate
)
do
false
|
true
|
true
false
|
true
false
|
false
|
false
true
|
false
true
|
true
|
false
true
|
false
|
false
end
end
with_them
do
with_them
do
before
do
stub_feature_flags
(
validate_scheduling_type_of_processables:
validate_scheduling_type_flag
)
end
context
'on create'
do
context
'on create'
do
it
'validates presence'
do
it
'validates presence'
do
if
should_validate
if
should_validate
...
...
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