Data type validation in fpm::pool breaks ability to use environment variables as values
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
Research direction
Start with the fpm::pool data type validation added in issue #634 and reproduce the reported Puppet resource using environment-variable placeholders for the PM settings. Done means integer values and supported environment-variable references pass validation, the configuration is written to the PHP-FPM file, and Puppet reports no errors.
Written by the indexing model from the issue text.
Description
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: Any
- Ruby: Any
- Distribution: Any
- Module version: 8.0+
How to reproduce (e.g Puppet code you use)
php::fpm::pool { 'www':
..
pm_max_children => '${FPM_MAX_CHILDREN}',
}
What are you seeing
The validation added in #634 appears to have broken the ability to configure the PM settings via environment variables (interpreted at runtime), which is something we do to allow our environment to determine the PHP runtime settings.
Per the PHP docs, this is a supported configuration: https://www.php.net/manual/en/configuration.file.php#example-1
Suggestion would be to make these either Variant[String, Integer[..]] or for a more strict approach something like, Variant[Pattern[/\$\{[\w]+\}/], Integer[..]].
What behaviour did you expect instead
No Puppet errors, environment variable based configuration written out to file.
Output log
Error: Evaluation Error: Error while evaluating a Resource Statement, Php::Fpm::Pool[www]:
parameter 'pm_max_children' expects an Integer value, got String
parameter 'pm_start_servers' expects an Integer value, got String
parameter 'pm_min_spare_servers' expects an Integer value, got String
parameter 'pm_max_spare_servers' expects an Integer value, got String
parameter 'pm_max_requests' expects an Integer value, got String
- Dominant language
- Puppet
- Stars
- 86
- Forks
- 264
- Avg merge
- 29m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from voxpupuli/puppet-php
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
voxpupuli/puppet-php#769 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
voxpupuli/puppet-php#763 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
voxpupuli/puppet-php#758 ·
-
docs good first issue
Difficulty 3/5 1-2 days Newbie friendliness 35/100
voxpupuli/puppet-php#741 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
voxpupuli/puppet-php#737 · 2 comments ·
All issues in voxpupuli/puppet-php
Similar issues
-
kind/bug Ubuntu 24
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
kubernetes-sigs/kubespray#13532 ·
-
Needs Design Priority: Wishlist
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
elementary/flatpak-platform#253 ·
-
tagbot-manual
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100