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
7bac8a32
Commit
7bac8a32
authored
Dec 01, 2021
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'mc/manual-job-retry-copy-variables' into 'master'"
This reverts merge request !75042
parent
9df890af
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
20 deletions
+2
-20
app/models/ci/build.rb
app/models/ci/build.rb
+0
-10
app/services/ci/retry_build_service.rb
app/services/ci/retry_build_service.rb
+1
-1
spec/services/ci/retry_build_service_spec.rb
spec/services/ci/retry_build_service_spec.rb
+1
-9
No files found.
app/models/ci/build.rb
View file @
7bac8a32
...
...
@@ -1084,16 +1084,6 @@ module Ci
runner
&
.
instance_type?
end
def
job_variables_attributes
strong_memoize
(
:job_variables_attributes
)
do
job_variables
.
map
do
|
variable
|
variable
.
attributes
.
except
(
'id'
,
'job_id'
,
'encrypted_value'
,
'encrypted_value_iv'
).
tap
do
|
attrs
|
attrs
[
:value
]
=
variable
.
value
end
end
end
end
protected
def
run_status_commit_hooks!
...
...
app/services/ci/retry_build_service.rb
View file @
7bac8a32
...
...
@@ -7,7 +7,7 @@ module Ci
allow_failure stage stage_id stage_idx trigger_request
yaml_variables when environment coverage_regex
description tag_list protected needs_attributes
resource_group scheduling_type
job_variables_attributes
]
.
freeze
resource_group scheduling_type]
.
freeze
end
def
self
.
extra_accessors
...
...
spec/services/ci/retry_build_service_spec.rb
View file @
7bac8a32
...
...
@@ -125,14 +125,6 @@ RSpec.describe Ci::RetryBuildService do
expect
(
new_build
.
needs_attributes
).
to
match
(
build
.
needs_attributes
)
expect
(
new_build
.
needs
).
not_to
match
(
build
.
needs
)
end
it
'clones only the job variables attributes'
do
expect
(
new_build
.
job_variables
.
exists?
).
to
be_truthy
expect
(
build
.
job_variables
.
exists?
).
to
be_truthy
expect
(
new_build
.
job_variables_attributes
).
to
match
(
build
.
job_variables_attributes
)
expect
(
new_build
.
job_variables
).
not_to
match
(
build
.
job_variables
)
end
end
describe
'reject accessors'
do
...
...
@@ -155,7 +147,7 @@ RSpec.describe Ci::RetryBuildService do
Ci
::
Build
.
attribute_names
.
map
(
&
:to_sym
)
+
Ci
::
Build
.
attribute_aliases
.
keys
.
map
(
&
:to_sym
)
+
Ci
::
Build
.
reflect_on_all_associations
.
map
(
&
:name
)
+
[
:tag_list
,
:needs_attributes
,
:job_variables_attributes
]
-
[
:tag_list
,
:needs_attributes
]
-
# ee-specific accessors should be tested in ee/spec/services/ci/retry_build_service_spec.rb instead
described_class
.
extra_accessors
-
[
:dast_site_profiles_build
,
:dast_scanner_profiles_build
]
# join tables
...
...
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