Skip to content

feat!: remove PageSpeed and add resource cleanup - #967

Open
damacus wants to merge 2 commits into
mainfrom
codex/feat-apache2-resource-migration
Open

damacus wants to merge 2 commits into
mainfrom
codex/feat-apache2-resource-migration

Conversation

@damacus

@damacus damacus commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Summary

Add explicit removal actions to apache2's existing custom resources and remove the retired PageSpeed integration. The cookbook already used custom resources and a Policyfile; this PR does not convert recipes or attributes into resources.

Resource changes

  • Add :remove to apache2_install and apache2_mod_auth_cas, and :delete to configuration, site and module resources. Module deletion also invokes the cleanup for built-in module configuration resources.
  • Change apache2_service from Chef's service resource to systemd_unit, preserving delayed actions and using the distribution-provided unit.
  • Remove apache2_mod_pagespeed, its template, download URL helper and associated tests.
  • Move the Perl module-list helper from files/ to templates/ without changing its contents. Add missing frozen-string headers and property descriptions.

Tests, platforms and documentation

  • Add removal ChefSpecs, creation coverage for mod_info and mod_userdir, and a Kitchen removal suite that checks repeated removal is idempotent.
  • Replace Leap 15 with Leap 16, using the official Leap container with systemd installed. Add Ubuntu 26.04 and set the Fedora minimum to 43.
  • Add the existing custom_template suite to CI and align Kitchen/CI platforms, suites and exclusions.
  • Track the maintained Sous Chefs shared workflows and actions from main, and enable non-blocking OCI cookbook and SPDX publication to GHCR in the release workflow.
  • Rename resource documentation from resource_apache2_*.md to apache2_*.md, add action/removal documentation and missing properties, update links and upgrade guidance, and add migration.md.
  • Exclude local .bundle/ dependencies from Markdown lint.

Breaking changes and removal behaviour

PageSpeed resource declarations must be removed before upgrading. Existing PageSpeed installations are not automatically uninstalled.

apache2_install :remove explicitly uninstalls Apache and Perl packages and deletes Apache configuration, logs, cache and lock directories and management scripts. Document roots and shared accounts remain. CAS removal retains shared build dependencies. Removal tests ran only in disposable containers.

OCI publication uses the existing release secrets and repository permissions. It is delegated to the shared Sous Chefs publisher and remains non-blocking for the Supermarket release.

@damacus
damacus requested a review from a team as a code owner September 15, 2026 09:52
@damacus damacus changed the title feat!: migrate apache2 to custom resources feat!: remove PageSpeed and add resource cleanup Sep 15, 2026
@damacus
damacus force-pushed the codex/feat-apache2-resource-migration branch from 7681c14 to aa977d5 Compare September 15, 2026 13:11
@github-actions

Copy link
Copy Markdown

Slowest examples

Top 10 slowest examples (3.86 seconds, 12.25% of total time)
Example Description Time in seconds
spec/resources/removal_spec.rb:66 apache2_module removal is expected to delete file "/etc/apache2/mods-available/headers.load" 0.5519
spec/resources/removal_spec.rb:17 apache2_mod_mime_magic removal is expected to delete link "/etc/apache2/mods-enabled/mime_magic.conf" 0.48248
spec/resources/removal_spec.rb:17 apache2_mod_cgid removal is expected to delete link "/etc/apache2/mods-enabled/cgid.conf" 0.46278
spec/resources/mod_spec.rb:195 apache2_install mod_deflate outputs template correctly 0.44364
spec/resources/mod_spec.rb:87 apache2_install mod_proxy_ftp should not output empty value 0.40164
spec/resources/conf_spec.rb:43 apache2_install install an apache2_module with default properties Creates the charset template 0.39492
spec/resources/mod_auth_cas_spec.rb:30 apache2_mod_auth_cas ubuntu is expected to enable apache2_module "auth_cas" 0.36565
spec/libraries/package_helpers_spec.rb:70 #default_apache_pkg with amazon family is expected to write log "httpd" 0.25859
spec/libraries/default_modules_spec.rb:17 #default_modules systemd redhat is expected to write log "status, alias, auth_basic, authn_core, authn_file, authz_core, authz_groupfile, authz_host, authz_user, autoindex, deflate, dir, env, mime, negotiation, setenvif, log_config, logio, unixd, systemd" 0.25775
spec/resources/module_spec.rb:46 apache2_install mod_proxy with custom configuration Installs mod_proxy with custom configuration 0.2425

This branch has not been deployed

No deployments
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