]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commit
(CONT-242) Fix duplicate rule detection
authordavid22swan <david.swan@puppet.com>
Wed, 7 Jun 2023 16:47:59 +0000 (17:47 +0100)
committerdavid22swan <david.swan@puppet.com>
Wed, 7 Jun 2023 16:48:13 +0000 (17:48 +0100)
commit8b17271d9f31cb4e9bd3277f0bcafe2a2fc045c7
tree0a371c56711094c5edf799dc63b9b1f528da4f17
parente5835a8bb0cc25ed11d78c8c249128d8ee68923f
(CONT-242) Fix duplicate rule detection

This was previously accomplished b retrieving the full list of rules each time a rule was set in order to check it was unique. This was to allow the user to choose the response to a duplicate rule being found.

However this caused a massive slowdown within certain module runs and as such we have changed the the location of the check, so that it instead runs a check for any duplicates when retrieving the current rules prior to any updates being made.

As an effect of this the user is now unable to choose the response to a duplicate rule being found, however wee feel that this is a fair tradeoff for the increased speed and that the response that we have chosen is the correct one.
README.md
REFERENCE.md
lib/puppet/provider/firewall/iptables.rb
lib/puppet/type/firewall.rb
spec/acceptance/firewall_duplicate_comment_spec.rb