puppet-nginx
puppet-nginx copied to clipboard
Add stream log changes
Pull Request (PR) description
Following on work from previous PRs to add stream log changes.
Trying to fix the tests and the file conflicts again.
Explanation of the variables: https://github.com/voxpupuli/puppet-nginx/pull/1439#issuecomment-875198474
This Pull Request (PR) fixes the following issu
Closes: https://github.com/voxpupuli/puppet-nginx/pull/1439
nginx::config is a class
Breaking changes to this file MAY impact these 2 modules (near match):
nginx is a class
Breaking changes to this file WILL impact these 15 modules (exact match):
- dhollinger-devopsdays
- eelcomaljaars-friendica
- kalfa-sites
- samuelson-custom_webapp
- akisakye-matomo
- othalla-nextcloud
- jonhallettuob-existdb
- puppet-hyperglass
- pgassmann-letsencrypt_nginx
- stackstorm-st2
- cristifalcas-kibana
- geoffwilliams-r_profile
- covata-safeshare
- ploperations-webhook_proxy
- landcareresearch-ckan
Breaking changes to this file MAY impact these 34 modules (near match):
- jmkeyes-netbox
- klynton-testing
- lboynton-gitlab
- nicopaez-dockerserver
- pltraining-selfpaced
- jbussdieker-graphite_web
- dmexe-deploy
- firm1-zds
- aursu-grayloginstall
- 4n0m4l0u5-configure_nginx
- ramiel-owncloud
- danieldreier-puppet_installer
- qroac-isp3node
- adcade-statsd
- compass-learninglocker
- compass-examdb
- vormetriclabs-meteor
- chedi-django
- nicopaez-alfred
- nicopaez-triage
- tracywebtech-appdeploy
- puppetfinland-patchwork
- ploperations-puppet
- mightp-librenms
- vshn-uhosting
- qtechnologies-psgi
- maestrodev-maestro_nodes
- puppetfinland-freight
- oris-appserver
- SchnWalter-happydev
- groupbuddies-gb
- halyard-boxen
- mtulio-profiles
- braiins-wordpressnginx
nginx::params is a class
Breaking changes to this file MAY impact these 1 modules (near match):
This module is declared in 9 of 578 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.
I am working on making updates to fix this PR. I need to check it works with what we have deployed.
I think the tests are failing because they are in the wrong location in the test file. I think the test lines might be better in a context for stream specifically.
Would it work adding a "dynamic module" test similar to geoip module, checking the stream content lines for the access_log and log_format values?
geoip test example: https://github.com/voxpupuli/puppet-nginx/blob/fffe7a3463e005944799f55f8782e9ba798375a8/spec/classes/nginx_spec.rb#L1162
Updated with suggested changes
From a quick look this looks good, but the tests fail. The CentOS 7 tests failing looks unrelated to me, but the unit tests do.
I am working on making updates to fix this PR. I need to check it works with what we have deployed.
I think the tests are failing because they are in the wrong location in the test file. I think the test lines might be better in a context for
streamspecifically.
Still the same issue with the unit tests. Which isn't surprising since I did a quick copy & paste to get started.
I don't see anything that tests
<% if @stream -%>
And without that being set, it's not expected the lines get written to the config file, and the unit tests correctly fail.
These tests might not cleanly fit within the existing template iterator. I will have another look
@ekohl I have added a basic set of tests to cover the main use case for the stream access log.
Appreciate if you could give another review