Commit ff1caa45 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'revert-faac2d38' into 'master'

Revert "Merge branch 'mc/manual-job-retry-copy-variables' into 'master'"

See merge request gitlab-org/gitlab!75682
parents 6e17f84f 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!
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment