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

Allow RewriteInherit with empty rewrites #2301

Merged
merged 3 commits into from
Sep 12, 2022

Conversation

martin-koerner
Copy link
Contributor

There are cases where you want to exclusively inherit RewriteRules from e.g. global scope without specifying vHost-specific rewrites - which is now allowed again.

There might be cases where you exclusively want to inherit RewriteRules from e.g. global scope without specifying vHost-specific rewrites - which is now allowed.
@martin-koerner martin-koerner requested a review from a team as a code owner September 6, 2022 13:07
@puppet-community-rangefinder
Copy link

apache::vhost is a type

Breaking changes to this file WILL impact these 128 modules (exact match):
Breaking changes to this file MAY impact these 36 modules (near match):

This module is declared in 174 of 579 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

Copy link
Collaborator

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test case for this?

@CLAassistant
Copy link

CLAassistant commented Sep 7, 2022

CLA assistant check
All committers have signed the CLA.

@martin-koerner
Copy link
Contributor Author

Could you add a test case for this?

Sure, I updated the existing one for empty rewrites with rewrite_inherit = false and added a second one - hope that's sufficient:

        empty rewrites
          is expected not to contain Concat::Fragment[rspec.example.com-rewrite]
        empty rewrites_with_rewrite_inherit
          is expected to contain Concat::Fragment[rspec.example.com-rewrite] with content =~ /^\s+RewriteOptions Inherit$/

Copy link
Member

@david22swan david22swan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@david22swan
Copy link
Member

@martin-koerner This change looks good to me and the test coverage seems sufficient. Thanks for putting in the work :)

@david22swan david22swan merged commit 648332c into puppetlabs:main Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants