-
Notifications
You must be signed in to change notification settings - Fork 352
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
(CODEMGMT-1323) Prefer purge_allowlist #1144
Conversation
This is the necessary change for removing writing 'purge_whitelist' to disk in code-manager. If this looks good, there are some doc changes to put in and also I'd like to change one of the acceptance tests to use There's other work here to do to remove 'whitelist' in general, but this should enable better completion for our goals for Puppet. |
whitelist_has_content = !whitelist.empty? | ||
allowlist_has_content = !allowlist.empty? | ||
case | ||
when whitelist_has_content == false && allowlist_has_content == false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit) I believe it's conventional for the when
s to line up with case
.
raise R10K::Error "Values found for both purge_whitelist and purge_allowlist. Setting " << | ||
"purge_whitelist is deprecated, please move all values to purge-allowlist." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question as in the code-manager PR: are we sure it's preferable to disallow both keys, from an upgrading perspective?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've rejiggered the CM PR so this isn't an issue; it seems to me that if both are defined, than the upgrade hasn't been implemented correctly. I'm open to being more lax, but it seems more correct to error when two values are presented trying to configure the same thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm with Tony, I don't think there's a reason to allow both simultaneously. We need to still support both keys, but should only allow you to have one or the other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
lib/r10k/settings.rb
Outdated
:desc => "A list of filename patterns to be excluded from any purge operations. Patterns are matched relative to the root of each deployed environment, if you want a pattern to match recursively you need to use the '**' glob in your pattern. Basic shell style globs are supported.", | ||
:default => [], | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit) this indentation doesn't match what's done in the rest of this file
Your commit message says This will also ultimately need a changelog update as well. |
This change deprecates the setting `purge_whitelist` and prefers the setting `purge_allowlist`. The setting `purge_whitelist` will still work until a future change removes it entirely.
90c4db3
to
da2c636
Compare
Please add all notable changes to the "Unreleased" section of the CHANGELOG in the format: