Bug 2086141
Summary: | Update python38-jinja2 to 2.11.x | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Maxwell G <maxwell> | ||||||||
Component: | python-jinja2 | Assignee: | Charalampos Stratakis <cstratak> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Lukáš Zachar <lzachar> | ||||||||
Severity: | unspecified | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | --- | CC: | lbalhar, pviktori, python-maint, rhel-cs-apps-subsystem-qe, torsava | ||||||||
Target Milestone: | rc | Keywords: | Rebase, Triaged | ||||||||
Target Release: | --- | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | python38-3.8-8070020220607122956.bd194b04 python-jinja2-2.11.3-1.module+el8.7.0+15575+d005caff | Doc Type: | No Doc Update | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2022-11-08 09:44:15 UTC | Type: | Component Upgrade | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Description
Maxwell G
2022-05-14 04:17:11 UTC
I am not sure if I did something wrong, but it appears nobody was added to the CC list. Hi Maxwell, what's the use case you need these updates for? And if you'd like us to prioritize this properly, consider filing a customer case for this request. Hi Tomas, (In reply to Tomas Orsava from comment #3) > what's the use case you need these updates for? There is certain functionality in ansible-core that does not work without a newer version of jinja2. Only the python38 version really needs to be updated for my usecase. I suppose ansible 2.9 which is still in the Ansible Engine channel could also make use of the python36 version. Created attachment 1881999 [details] [PATCH] Update to 2.11.3. Fixes rhbz#2086141. I wrote this patch against the c8s-stream-3.8 branch[1]. It can be applied to RHEL dist-git with "git am -p2". FWIW, this is the same version that's currently in c9s. I have confirmed that it fixes my issue. [1]: https://git.centos.org/rpms/python-jinja2/tree/c8s-stream-3.8 Interesting, and thanks for the patch. Can you expand on what ansible-core functionality does not work without a newer version of jinja2? Created attachment 1882537 [details]
Reproducer playbook
I have attached a (slightly contrived) reproducer Ansible playbook. These type of assert tasks are more commonly used to verify user modifiable variables in a role. Basically, the problem comes down to the missing boolean, integer, and float jinja2 tests.
With ansible-core and python38-jinja2-2.10.3-5.module+el8.5.0+10542+ba057329.noarch on RHEL 8:
```
$ ./missing_jinja_tests.yml
PLAY [missing_jinja_tests] *****************************************************************************************
TASK [ansible.builtin.assert] **************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "The conditional check 'test_boolean is boolean' failed. The error was: template error while templating string: no test named 'boolean'. String: {% if test_boolean is boolean %} True {% else %} False {% endif %}"}
...ignoring
TASK [ansible.builtin.assert] **************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "The conditional check 'test_int is integer' failed. The error was: template error while templating string: no test named 'integer'. String: {% if test_int is integer %} True {% else %} False {% endif %}"}
...ignoring
TASK [ansible.builtin.assert] **************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "The conditional check 'test_float is float' failed. The error was: template error while templating string: no test named 'float'. String: {% if test_float is float %} True {% else %} False {% endif %}"}
...ignoring
PLAY RECAP *********************************************************************************************************
localhost : ok=3 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=3
```
With ansible-core and `python38-jinja2-2.11.3-1.el8.noarch` (my patch built against python38 with `--define "python3_pkgversion 38"`):
```
PLAY [missing_jinja_tests] *****************************************************************************************
TASK [ansible.builtin.assert] **************************************************************************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [ansible.builtin.assert] **************************************************************************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [ansible.builtin.assert] **************************************************************************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
PLAY RECAP *********************************************************************************************************
localhost : ok=3 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
```
So, technically, backporting https://github.com/pallets/jinja/pull/824 would fix this for you? (In reply to Miro Hrončok from comment #8) > So, technically, backporting https://github.com/pallets/jinja/pull/824 would > fix this for you? Yes, that should work. I forgot that was an option. Created attachment 1883003 [details]
[PATCH] Backport missing jinja2 tests needed by ansible-core (rhbz#2086141).
A complete update would be preferable, but I suppose just backporting the missing tests would suffice if the former is not unpermissible. I have confirmed that this patch also fixes my issue.
> not unpermissible
s/not unpermissible/unpermissible/
We can rebase python38-jinja2 as it's in a module and there the rebase policy is less strict. For python3-jinja2 we would only consider a backport, but since the reporter explicitly says a fix for python3-jinja2 is not needed for their use case hence we won't be backporting the fix at this point. We'll do a rebase of the python38-jinja2. Thank you, Tomas! I've changed the Bugzilla summary accordingly. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: python38:3.8 and python38-devel:3.8 security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:7581 |