-
Notifications
You must be signed in to change notification settings - Fork 363
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
fix ansible version check #1611
Conversation
Thanks for your PR. The following commands are available:
|
Codecov Report
@@ Coverage Diff @@
## master #1611 +/- ##
==========================================
- Coverage 63.31% 61.80% -1.52%
==========================================
Files 170 181 +11
Lines 14250 15351 +1101
==========================================
+ Hits 9023 9488 +465
- Misses 4292 4854 +562
- Partials 935 1009 +74
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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 - tested it locally and it works fine with my version of Ansible (2.9.13)
@@ -1,6 +1,6 @@ | |||
- name: "Checking that Ansible version >= '2.4.0'" | |||
assert: | |||
that: ansible_version.full >= "2.4.0" |
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 see the doc says version_compared was renamed to version in 2.5.0. So does it still work if using 2.5.0+?
https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html#comparing-versions
cc @antoninbas if he has any idea.
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.
Just saw @antoninbas has tested this with 2.9.13. Then was the doc wrong? or it keeps both version and version_compared?
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.
@tnqn the proposed change works for me with 2.9. It seems that as of today, even top-of-tree supports both: https://github.com/ansible/ansible/blob/221c50b57c347d6f8382523c48e869cb21b8c010/lib/ansible/plugins/test/core.py#L256-L257
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.
My local machine is ansible 2.10.3 and it seems ansible still support version_compared
at 2.10.3
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.
Thanks @antoninbas and @ceclinux for confirming. Then it's a doc thing, this patch added that statement but just added an alias "version", not renaming it.
https://github.com/ansible/ansible/pull/32361/files#diff-64ad78caca92056d49f0e3f1a0a3498ea24f9af508981cca7c7dfa21de4004b5R149
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
@@ -1,6 +1,6 @@ | |||
- name: "Checking that Ansible version >= '2.4.0'" | |||
assert: | |||
that: ansible_version.full >= "2.4.0" |
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.
Thanks @antoninbas and @ceclinux for confirming. Then it's a doc thing, this patch added that statement but just added an alias "version", not renaming it.
https://github.com/ansible/ansible/pull/32361/files#diff-64ad78caca92056d49f0e3f1a0a3498ea24f9af508981cca7c7dfa21de4004b5R149
/skip-all as it updates vagrant script only. |
@ceclinux are you a VMware employee or have you signed the CLA? |
…a-io#1606) 1. refactor parseMetricFlow to map format 2. add AntreaNetworkPolicyStats test with drop action 3. add extra ansible version check, forgotten by(antrea-io#1611) 4. change metric to stats in terms of NetworkPolicyStats
Using string comparsion may cause trouble in version check. For instance, I have
ansible 2.10.3
on my laptop and causedwhen runing
./infra/vagrant/provision.sh