Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #35870 - Ensure mod_expires is loaded #1101

Merged
merged 1 commit into from
Jan 12, 2023

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Dec 7, 2022

In case only minimal Apache modules are loaded then mod_expires may not be present. The result is that assets are sent without headers that allow browsers to cache it.

@evgeni
Copy link
Member

evgeni commented Dec 8, 2022

      # Puppet::Resource::Catalog::DuplicateResourceError:
      #   Duplicate declaration: Apache::Mod[expires] is already declared at (file: /home/runner/work/puppet-foreman/puppet-foreman/spec/fixtures/modules/apache/manifests/default_mods.pp, line: 73); cannot redeclare (file: /home/runner/work/puppet-foreman/puppet-foreman/spec/fixtures/modules/apache/manifests/mod/expires.pp, line: 23)

This somehow implies our tests don't run with apache::default_mods: false?

Edit: no, it's set?!

apache::default_mods: false

Edit2: oh no, that's just for acceptance!

@ekohl
Copy link
Member Author

ekohl commented Dec 8, 2022

I just noticed this yesterday on my own server, but I'll do some more digging next week.

And it does indicate an incompatibility, which is actually good to know about: we have to choose one or the other. Now I'm reminded about puppetlabs/puppetlabs-apache#2288, which I started but didn't have a discussion.

@ekohl ekohl marked this pull request as draft December 14, 2022 14:01
@ekohl
Copy link
Member Author

ekohl commented Dec 14, 2022

No code change, but I opened https://projects.theforeman.org/issues/35870 so we don't lose track of this.

@evgeni
Copy link
Member

evgeni commented Jan 11, 2023

FWIW, the regression is there also before #33956

The original "disable default modules" change triggered that and I see the headers missing on a 3.3 installation that does not yet have the "assets via apache" part.

In case only minimal Apache modules are loaded then mod_expires may not
be present. The result is that assets are sent without headers that
allow browsers to cache it.
@ekohl ekohl marked this pull request as ready for review January 11, 2023 16:56
@ekohl
Copy link
Member Author

ekohl commented Jan 11, 2023

I ended up working around apache::mod::expires including additional config so it can be cherry picked safely.

@ekohl ekohl merged commit a132b68 into theforeman:master Jan 12, 2023
@ekohl ekohl deleted the 33956-ensure-mod_expires branch January 12, 2023 12:41
@ekohl ekohl changed the title Refs #33956 - Ensure mod_expires is loaded Fixes #35870 - Ensure mod_expires is loaded Jan 24, 2023
@ekohl ekohl added Bug and removed Enhancement labels Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants