-
Notifications
You must be signed in to change notification settings - Fork 115
ipaddr migration to utils #359
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
ipaddr migration to utils #359
Conversation
dacc233
to
63f6867
Compare
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.
If we've moved all the ipaddr filters now, this should allow us to delete the ipaddr filter from netcommon now as well, unless there is something special about filter plugins that prevents this.
If you can remove ipaddr.py and verify that calling In that case, this PR will need to depends-on all the open ipaddr filter PRs so we don't merge this before the redirect is in place. It will probably need a newer ansible.utils minimum version in |
@Qalthos Tested it for one plugin its working as expected.
|
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.
Looks great. My only concern is whether we need to hold this off until the major release in a few months, as this needs to depend on a minimum ansible.utils version that is not released yet.
recheck |
Build succeeded.
|
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.
Looks like we need to remove the ipaddr unit tests as well. I assume those have moved to utils already?
Recheck |
Build succeeded.
|
Merge Failed. This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. |
recheck |
Merge Failed. This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. |
Merge Failed. This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. |
….netcommon into ipaddr_migration_to_utils
Build succeeded.
|
recheck |
Build succeeded.
|
recheck |
Build succeeded.
|
recheck |
Build succeeded.
|
Recheck |
Build succeeded.
|
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.
LGTM!
FYI folks: it seems like this change breaks the non-namespaced usage of |
Also wanted to chime in and say this is a breaking change (and affected us), because the old Easy to verify by running the following task with both netcommon 2.5.1 and netcommon 2.6.0: - name: DEBUG NEW IPADDR FILTER
debug:
msg:
- 'SUBNET VAR : {{ item.subnet }}'
- 'OLD NETCOMMON FILTER : {{ item.subnet | ansible.netcommon.ipaddr("network/prefix") }}'
- 'NEW UTILS FILTER : {{ item.subnet | ansible.utils.ipaddr("network/prefix") }}'
loop:
- subnet: 1.1.1.1/32
- subnet: 10.10.10.0/24
- subnet: 192.168.0.0/23 Output looks like this:
|
Was it intentional to make |
@dtantsur @bluikko @jantari The list of string return and the non-namespace breaking was not intentional. It is a bug. |
We have released utils 2.5.2 and netcommon 2.6.1 which fixed #375 and ansible-collections/ansible.utils#148 issues. For FQDN issue ansible-core team already merged ansible/ansible#77210. This fix will be available in 28th march release. which means, |
Do you folks honestly expect everyone to rewrite the thousands of existing playbooks that use the ipaddr() filter? |
SUMMARY
Add deprecation warning in netcommon for ipaddr filters plugins
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION