Skip to content
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

action plugin helper: fix deprecation handling #572

Merged
merged 1 commit into from
Feb 9, 2023

Conversation

felixfontein
Copy link
Contributor

SUMMARY

This is a consequence of ansible/ansible#79681 and ansible/ansible#79740, which were backported to stable-2.14 and released in ansible-core 2.14.2. Without these, there will be a crash when deprecations appear with ansible-core 2.14.2+ in action plugins using this helper.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

plugins/plugin_utils/action_module.py

Copy link
Contributor

@kristianheljas kristianheljas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kinda hate that there's a path now where deprecations could in theory be ignored (if name and msg both get missing), previously any scenario would be caught..

But it is consistent with ansible-core, so .. LGTM!

@felixfontein
Copy link
Contributor Author

But it is consistent with ansible-core, so .. LGTM!

It's not anymore, ansible/ansible#79740 changed that code so that msg is always there.

I kinda hate that there's a path now where deprecations could in theory be ignored [...] previously any scenario would be caught..

Previously any scenario with ansible-core 2.14.2+ would result in a crash, I wouldn't exactly call that 'caught' ;-) But yeah, I'm not 100% happy with this. I think (hope) that ansible-core will stick to msg from now on, though, so I think it should be fine. (I guess, until it is not... but at least then it won't crash)

@felixfontein felixfontein merged commit 70c4585 into ansible-collections:main Feb 9, 2023
@patchback
Copy link

patchback bot commented Feb 9, 2023

Backport to stable-1: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-1/70c4585b88779a27861a60c55258cc47d5141f70/pr-572

Backported as #573

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein felixfontein deleted the action-module branch February 9, 2023 14:36
patchback bot pushed a commit that referenced this pull request Feb 9, 2023
(cherry picked from commit 70c4585)
@felixfontein
Copy link
Contributor Author

@kristianheljas thanks a lot for reviewing this!

felixfontein added a commit that referenced this pull request Feb 9, 2023
(cherry picked from commit 70c4585)

Co-authored-by: Felix Fontein <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants