Skip to content

Commit

Permalink
Merge pull request #370 from sap-contributions/legacy-md5-buildpack-p…
Browse files Browse the repository at this point in the history
…aths-enabled-param

Add legacy_md5_buildpack_paths_enabled param
  • Loading branch information
philippthun authored Jan 10, 2024
2 parents 558cf28 + 2dbadf4 commit 6a57162
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
4 changes: 4 additions & 0 deletions jobs/cloud_controller_ng/spec
Original file line number Diff line number Diff line change
Expand Up @@ -1212,3 +1212,7 @@ properties:
cc.update_metric_tags_on_rename:
description: "Enable sending a Desired LRP update when an app is renamed"
default: true

cc.legacy_md5_buildpack_paths_enabled:
description: "Enable legacy MD5 buildpack paths. If disabled, xxhash64 is used for calculating paths in buildpack image layers."
default: true
Original file line number Diff line number Diff line change
Expand Up @@ -522,3 +522,5 @@ threadpool_size: <%= p("cc.experimental.thin_server.thread_pool_size") %>
default_app_lifecycle: buildpack
custom_metric_tag_prefix_list: <%= p("cc.custom_metric_tag_prefix_list") %>
update_metric_tags_on_rename: <%= p("cc.update_metric_tags_on_rename") %>

legacy_md5_buildpack_paths_enabled: <%= p("cc.legacy_md5_buildpack_paths_enabled") %>
26 changes: 25 additions & 1 deletion spec/cloud_controller_ng/cloud_controller_ng_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ module Test
end
end

describe 'max_total_results' do
describe 'max_total_results' do
context "when 'cc.renderer.max_total_results' is set" do
it 'renders max_total_results into the ccng config' do
merged_manifest_properties['cc'].store('renderer', { 'max_total_results' => 1000 })
Expand All @@ -608,6 +608,30 @@ module Test
end
end
end

describe 'legacy_md5_buildpack_paths_enabled' do
context 'when legacy md5 buildpack paths are enabled' do
before do
merged_manifest_properties['cc']['legacy_md5_buildpack_paths_enabled'] = true
end

it 'renders the correct value into the ccng config' do
template_hash = YAML.safe_load(template.render(merged_manifest_properties, consumes: links))
expect(template_hash['legacy_md5_buildpack_paths_enabled']).to be(true)
end
end

context 'when legacy md5 buildpack paths are disabled' do
before do
merged_manifest_properties['cc']['legacy_md5_buildpack_paths_enabled'] = false
end

it 'renders the correct value into the ccng config' do
template_hash = YAML.safe_load(template.render(merged_manifest_properties, consumes: links))
expect(template_hash['legacy_md5_buildpack_paths_enabled']).to be(false)
end
end
end
end
end
end
Expand Down

0 comments on commit 6a57162

Please sign in to comment.