-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Type options of cache plugins #8624
Type options of cache plugins #8624
Conversation
f966755
to
2098089
Compare
plugins/cache/memcached.py
Outdated
@@ -37,13 +38,13 @@ | |||
section: defaults | |||
_timeout: | |||
default: 86400 | |||
type: float |
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.
Why did this change to float
here? And does it need to also change in ansible-core? - https://docs.ansible.com/ansible/latest/reference_appendices/config.html#cache-plugin-timeout
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.
The base class interprets this option as a float: https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/cache/__init__.py#L88
Since other users of that constant might assume it's an int it is probably better not to change the type of CACHE_PLUGIN_TIMEOUT
, but changing it here should be ok.
@s-hertel you touched that code last, WDYT about using type: float
here (and the type in general)?
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 changed it back to type: integer
for existing type
values in 46deac0, only keeping type: float
when the type wasn't specified before.
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 going to merge this PR in its current form, I can update it back to type: float
in a follow-up if this discussion resolves positively.
Backport to stable-9: 💚 backport PR created✅ Backport PR branch: Backported as #8686 🤖 @patchback |
* Type options of cache plugins. * Do not change type of _timeout for now. (cherry picked from commit 37c8560)
@samccann thanks for reviewing this! |
…8686) Type options of cache plugins (#8624) * Type options of cache plugins. * Do not change type of _timeout for now. (cherry picked from commit 37c8560) Co-authored-by: Felix Fontein <[email protected]>
* Type options of cache plugins. * Do not change type of _timeout for now.
* Type options of cache plugins. * Do not change type of _timeout for now.
* Type options of cache plugins. * Do not change type of _timeout for now.
SUMMARY
Some option types were missing.
ISSUE TYPE
COMPONENT NAME
cache plugins