puppetlabs-apache icon indicating copy to clipboard operation
puppetlabs-apache copied to clipboard

Added cache_disk

Open dploeger opened this issue 1 year ago • 14 comments

Summary

This deprecates apache::mod::disk_cache and instead adds support for apache::mod::cache_disk. Also adds parameters to both apache::mod::cache_disk and apache::mod::cache.

Additional Context

Since Apache 2.4 mod_disk_cache is named mod_cache_disk. This officially supports mod_cache_disk and additionally adds configuration options for it. To be backwards compatible, the old module is still available and simply uses the new module.

Checklist

  • [x] 🟢 Spec tests.
  • [x] 🟢 Acceptance tests.
  • [x] Manually verified. (For example puppet apply)

dploeger avatar Jan 12 '24 07:01 dploeger

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jan 12 '24 11:01 CLAassistant

@smortex Thanks. Done.

dploeger avatar Jan 30 '24 06:01 dploeger

@smortex Should I take a look at the other Rubocop findings?

dploeger avatar Jan 30 '24 06:01 dploeger

@smortex Should I take a look at the other Rubocop findings?

Yes please :smile: They are admittedly mostly gratuitous, but allow some consistency across the module which makes maintenance easier. Rubocop has to pass for the unit and integration tests to run.

As it is now, it looks quite good, CI will maybe help us spot some remaining issues. I am just wondering if the unit tests for the legacy class should be updated to check that it instantiate the new class with the right parameters and not more.

smortex avatar Jan 30 '24 07:01 smortex

Fixed Rubocop

dploeger avatar Jan 30 '24 08:01 dploeger

It seems the failures during acceptance testing do not relate to the changes in this PR. Any idea when these might get fixed? Can I offer some support here?

ThomasMinor avatar Feb 15 '24 14:02 ThomasMinor

Puppet 8 seems to add a check for duplicates that fail. I opened #2525 to address the issue.

smortex avatar Feb 15 '24 20:02 smortex

@dploeger can you please rebase your changes on top of the main branch? This should fix CI.

From your working directory:

git fetch origin       # Download the latest code we have here
git rebase origin/main # Move your commits on top of the main branch
git push -f            # Send the changes (-f is required because we re-wrote history)

smortex avatar Feb 17 '24 22:02 smortex

@smortex rebasing is done.

ThomasMinor avatar Feb 21 '24 19:02 ThomasMinor

Hi @smortex, I just merged the latest changes from main to this repo. Since the 2 failing tests do not seem to be related to the changes in this PR, how do we proceed from here?

ThomasMinor avatar Mar 04 '24 10:03 ThomasMinor

@ThomasMinor From my point of view this look okay. The repository require multiple approval before merging so the next move is probably to have some feedback from @puppetlabs maybe?

I re-approved the CI run (any change you do to your commit invalidate the test), I expect it to all pass except the 2 known-bad tests which I think we can ignore.

smortex avatar Mar 05 '24 01:03 smortex

Hi @smortex, it seems another test joined the club and failed with connection failures. Can I assist solving the problem?

ThomasMinor avatar Mar 06 '24 05:03 ThomasMinor

Seems I looked wrong, 2 fail, one test was skipped.

ThomasMinor avatar Mar 13 '24 11:03 ThomasMinor

@ThomasMinor the Ubuntu ARM tests are broken and mend seems to only run when the PR is from a branch in the repo itself.

spec/classes/mod/disk_cache_spec.rb is maybe testing too much things given the corresponding code is only a wrapper around apache::mod::cache_disk (it act as an integration test rather than a unit test).

Also there is a merge commit in the branch which is not nice. Rebasing on top of master would fix this.

These two annoyances are not stoppers for me.

smortex avatar Mar 14 '24 01:03 smortex

How about a final review, @ekohl & @bastelfreak? Then we might be able to close this one.

ThomasMinor avatar Apr 09 '24 11:04 ThomasMinor