refactor: modernize apache2 custom resources#862
Merged
Conversation
- Add amazon platform family to apache_mod_wsgi_package and apache_mod_wsgi_filename helpers - Update mod_auth_cas devel packages from pcre to pcre2 for v1.2 compatibility - Add Debian 13 PHP 8.4 filename support (libphp8.4.so) - Add mod_php_spec.rb tests for PHP helper functions - Update mod_wsgi_spec.rb and mod_auth_cas_spec.rb tests - Remove CI exclusions for amazonlinux-2023/mod-wsgi, ubuntu-2404/php, opensuse-leap-15/mod-auth-cas, opensuse-leap-15/mod-wsgi, debian-13/php Fixes #815, #816, #817, #818, #819
- Create resources/_partial/_common.rb with root_group and template_cookbook - Update conf.rb, config.rb, default_site.rb, install.rb, mod.rb to use partial
…dir, mod_wsgi - conf.rb, mod_php.rb, mod_userdir.rb, mod_wsgi.rb were missing action_class do...end - Each now explicitly includes Apache2::Cookbook::Helpers
- spec/resources/service_spec.rb: covers start/stop/restart/reload/enable/disable actions - spec/resources/site_spec.rb: covers enable/disable with helper stubs
8c3ad53 to
cf8c832
Compare
Wrap bare URLs in angle brackets and use minimal table column widths to satisfy markdownlint rules.
Six test recipes were missing apt_update before apache2_install, causing apt-get failures in Dokken containers with stale package caches.
mvangoor
reviewed
Mar 16, 2026
c4bd6ee to
3bef534
Compare
RHEL 7 is EOL. Simplify helpers by removing version guards. Replace commented-out mod_ssl spec with a working test.
3bef534 to
2aca9d6
Compare
Slowest examplesTop 10 slowest examples (3.27 seconds, 14.37% of total time)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modernize apache2 cookbook resources to follow current Chef custom resource patterns.
Changes
Boilerplate (previous session)
# frozen_string_literal: trueto all 39 resource files, helpers, and spec filesprovides :apache2_<name>to all resourcesPhase 2 — Missing
action_classblocksaction_class do include Apache2::Cookbook::Helpers endtoconf.rb,mod_php.rb,mod_userdir.rb,mod_wsgi.rbPhase 3 — Resource partial
resources/_partial/_common.rbwith sharedroot_groupandtemplate_cookbookpropertiesconf.rb,config.rb,default_site.rb,install.rb,mod.rbtouse '_partial/_common'Phase 4 — Missing ChefSpec tests
spec/resources/service_spec.rb— covers start/stop/restart/reload/enable/disable actionsspec/resources/site_spec.rb— covers enable/disable with helper stubsPhase 5 — Documentation
Phase 6 — Lint
UnnecessaryPlatformCaseStatementinhelpers.rbVerification
chef exec rspec: 308 examples, 0 failurescookstyle: 106 files, no offenses