-
Notifications
You must be signed in to change notification settings - Fork 24k
now show plugin config runtime deprecations #77057
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
Conversation
It will be some time before I can test this (probably not until after it's merged, but I'll see), speaking of which should there be tests for this? Also any chance for backports? 🙏 I have a workaround in my code for displaying deprecations, I presume that if this feature is available, then it will run before my code, and so when I check for deprecations there won't be any to display. But is there something I could check for in my code? Conditionally import or whatever to skip my deprecation code altogether? If it helps, my code: https://github.com/ansible-collections/community.hashi_vault/blob/4a64d4cde1e8de16b91eee558d8d2d9ff3e3674f/plugins/plugin_utils/_hashi_vault_plugin.py#L50-L86 |
@briantist backports would also depend on #77056 ,I put this together in 5 mins once i saw that as it solved the major blocker for this, so my pr 'works' but not ready to merge. I would like to tweak presentation/msg a lot more. The issues with your code are the same as mine w/o the sivel's PR, you'll get the same message over and over every time the option is accessed (and normal flow for most plugins, man at least x2). |
Makes sense, thanks for the explanations!
Mine doesn't get called on every option access automatically; this gets called once toward the beginning of the plugin, after In any case, I look forward to an "official" fix and to get rid of this code.. that'll take a lot more time if it isn't backported, but that's ok I just have to make sure my little workaround doesn't get in the way in the versions where it's not needed. |
@briantist yes, that makes 'less' noise and lookups only get called explicitly once, but this 'once' is per task/host in different forks, which means you still get the message N times, other plugins get set_options called multiple times, why we could not use your implementation as is (nor mine) for all plugins. Why sivel's PR is crucial to avoid repetition as warnings get relayed to the main process and deduped there. |
04d87b0
to
6870222
Compare
The test
|
already works in 2.19 |
|
requires #77056 to avoid spamming duplicate messages
ISSUE TYPE
COMPONENT NAME
config