Fix jinja2 error from newer ansible versions#16356
Conversation
📝 WalkthroughWalkthroughThis PR introduces two minor modifications: enabling caching for a facts-gathering task in test data by adding a Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
still failing dev-env a lot of facts related errors |
|
versions 2.20.3 is still maybe a month old... |
|
Confirmed this is due to ansible-core version
but this is difficult to change, due to being in the awx-ee Here we go, this is the change ansible/awx-ee#271 @adrisala |
| b: | ||
| - "c" | ||
| - "d" | ||
| args: |
There was a problem hiding this comment.
Missing cacheable fix in gather_slow.yml causes test failures
Medium Severity
The cacheable: true parameter was moved under args: in gather.yml to fix compatibility with newer Ansible versions, but the identical file gather_slow.yml still has cacheable: true nested directly under set_fact:. gather_slow.yml is used by the concurrent fact cache tests (test_concurrent_limit_does_not_clear_facts, test_concurrent_limit_does_not_revert_facts), which are among the tests reported as still failing. The same args: fix needs to be applied there as well.
|
The awx-ee pushed a new image that should have ansible-core 2.18.z However, this isn't out-of-date technically. So I just restarted the dev-env check, which should pick up the updated awx-ee, because I think that just comes from a ghcr pull (from inside the container). On that theory, I restarted and we will see. |
|
Well shoot, same tests were still failing. pulled latest and confirming version: Will try one more time here. |
This reverts commit 477293c.
|
* Fix error from newer ansible versions * Include fix for setting cachable * Revert "Include fix for setting cachable" This reverts commit 477293c. Signed-off-by: TheDevCodingKen <93670654+TheDevCodingKen@users.noreply.github.com>





SUMMARY
Attempts to fix failure
ISSUE TYPE
COMPONENT NAME
Note
Low Risk
Low risk change that only tightens Ansible
whenconditions to skip galaxy installs when no requirements file is found, preventing failures on newer Ansible versions.Overview
Prevents project updates from failing on newer Ansible by changing the galaxy install tasks in
project_update.ymlto only run when a requirements file is actually found.The
whenclauses now explicitly checkreq_file | length > 0for role, collection, and combined installs, avoiding non-boolean conditional evaluation errors whenfirst_foundreturns an empty value.Written by Cursor Bugbot for commit 88d35d3. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
Bug Fixes
Chores