Skip to content

refactor: migrate apt to custom resources#646

Open
damacus wants to merge 3 commits intomainfrom
codex/apt-custom-resources
Open

refactor: migrate apt to custom resources#646
damacus wants to merge 3 commits intomainfrom
codex/apt-custom-resources

Conversation

@damacus
Copy link
Member

@damacus damacus commented Mar 15, 2026

Summary

  • replace the legacy recipe and attributes entrypoints with custom resources for base apt config, apt-cacher client, apt-cacher-ng, and unattended upgrades
  • move cookbook usage into test cookbooks, add resource docs, and convert the unit and integration coverage to the new resource layout
  • modernize the supported platform metadata and Kitchen configuration around the Debian and Ubuntu test matrix

Testing

  • cookstyle .
  • chef exec rspec --format documentation
  • KITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen test default-debian-12 --destroy=always

@damacus damacus requested a review from a team as a code owner March 15, 2026 22:48
damacus added 2 commits March 15, 2026 22:58
The response_file property on package looks in the cookbook files/

directory, not the filesystem. Use execute with debconf-set-selections

to preseed from the rendered template instead.
@github-actions
Copy link

Slowest examples

Top 10 slowest examples (0.74 seconds, 62.32% of total time)
Example Description Time in seconds
spec/unit/resources/config_spec.rb:18 apt_config is expected to create file "/var/lib/apt/periodic/update-success-stamp" 0.1573
spec/unit/resources/config_spec.rb:17 apt_config is expected to periodic apt_update "periodic" 0.07851
spec/unit/resources/unattended_upgrades_spec.rb:20 apt_unattended_upgrades is expected to render file "/etc/apt/apt.conf.d/20auto-upgrades" 0.07775
spec/unit/resources/cacher_client_spec.rb:18 apt_cacher_client without a cache server is expected to delete file "/etc/apt/apt.conf.d/01proxy" 0.07634
spec/unit/resources/config_spec.rb:22 apt_config is expected to render file "/etc/apt/apt.conf.d/10recommends" 0.07063
spec/unit/resources/cacher_ng_spec.rb:21 apt_cacher_ng is expected to enable service "apt-cacher-ng" 0.06349
spec/unit/resources/unattended_upgrades_spec.rb:21 apt_unattended_upgrades is expected to render file "/etc/apt/apt.conf.d/50unattended-upgrades" 0.05883
spec/unit/resources/cacher_ng_spec.rb:17 apt_cacher_ng is expected to install package "apt-cacher-ng" 0.05624
spec/unit/resources/cacher_ng_spec.rb:18 apt_cacher_ng is expected to create directory "/tmp/apt-cacher" 0.05424
spec/unit/resources/config_spec.rb:20 apt_config is expected to create directory "/var/cache/local/preseeding" 0.05347

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant