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 custom_config to have a string priority again #2284

Merged
merged 1 commit into from
Aug 10, 2022

Conversation

martin-koerner
Copy link
Contributor

@martin-koerner martin-koerner commented Aug 9, 2022

cc: @ekohl

Same reason as c11ab1f for vhosts - reusing Apache::Vhost::Priority data type.

In f41251e the type was narrowed to no
longer allow strings, but this can cause problems.

Sorting is alphabetical and you need to format it for the correct
sorting. So to make sure 2 loads before 10 you need to format it as 02.
While the custom_config can do some printf style magic to change 2 to 02, it
must then also know what the highest number is. Otherwise 100 is sorted
before 20. By allowing strings, you allow the caller to fix this.

A type alias is introduced to reduce duplication and make it easier to
track.

Fixes: f41251e

In f41251e the type was narrowed to no
longer allow strings, but this can cause problems.

Sorting is alphabetical and you need to format it for the correct
sorting. So to make sure 2 loads before 10 you need to format it as 02.
While the vhost can do some printf style magic to change 2 to 02, it
must then also know what the highest number is. Otherwise 100 is sorted
before 20. By allowing strings, you allow the caller to fix this.

A type alias is introduced to reduce duplication and make it easier to
track.

Fixes: f41251e
@martin-koerner martin-koerner requested a review from a team as a code owner August 9, 2022 17:17
@CLAassistant
Copy link

CLAassistant commented Aug 9, 2022

CLA assistant check
All committers have signed the CLA.

@puppet-community-rangefinder
Copy link

apache::custom_config is a type

Breaking changes to this file WILL impact these 5 modules (exact match):
Breaking changes to this file MAY impact these 5 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.

@ekohl ekohl added the bugfix label Aug 10, 2022
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

Thank's for fixing this for us :)

@david22swan david22swan merged commit e1f9cae into puppetlabs:main Aug 10, 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