Skip to content

Conversation

@anusshukla
Copy link
Contributor

@anusshukla anusshukla commented Oct 22, 2025

Fixes jinja[invalid] false positives in ansible-lint. They happen because lint checks tasks separately and ansible-core 2.19+ wraps undefined variables (UndefinedMarker, AnsibleUndefined) which can trigger false errors.

Fix

  • Ignores internal types like UndefinedMarker and AnsibleUndefined
  • Keeps runtime errors intact
  • Adds tests to ensure false positives are ignored and real errors are still caught

Fix: #4702
Related: AAP-55775

- Add 'kdump' to dictionary.txt (fixes cspell errors)
- Reduce jinja.py to 991 lines (fixes C0302: too-many-lines)
  - Removed redundant test assertions
  - Comprehensive tests remain in test_jinja_ansible_tagged_str.py
@anusshukla anusshukla added fix and removed bug labels Oct 22, 2025
@alisonlhart alisonlhart requested a review from ssbarnea October 22, 2025 14:00
@alisonlhart alisonlhart marked this pull request as ready for review October 22, 2025 14:00
@alisonlhart alisonlhart requested a review from a team as a code owner October 22, 2025 14:00
@alisonlhart alisonlhart changed the title added test and resolve concatenation issue Ignore internal types false positives with jinja[invalid] Oct 22, 2025
@ssbarnea ssbarnea changed the title Ignore internal types false positives with jinja[invalid] fix: ignore internal types false positives with jinja[invalid] Oct 27, 2025
@ssbarnea ssbarnea merged commit e0ee1f1 into main Oct 27, 2025
20 of 21 checks passed
@ssbarnea ssbarnea deleted the fixing-issue-raised-in-4702 branch October 27, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Error rendering template: can only concatenate list (not "_AnsibleTaggedStr") to list

3 participants