-
Notifications
You must be signed in to change notification settings - Fork 664
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
False positive load-failure when using import_tasks / include_tasks #1446
Comments
Could you please just include the important bits in one place instead of referring to explanations in other places that have too much unrelated context that people would just get lost in what you're trying to communicate? We need to know what's happening, what's expected, why this is expected, separately from some other references to similar issues that may have been fixed by now. Sending people to follow a chain of redirects is not helpful because you put the cognitive load of trying to understand what's going on on every reader who tries to follow what you're talking about. |
fixed |
is that ansible-base or the one with a bunch collections bundled? |
You may feel like this is not important but it is. You couldn't possibly have tested this on every possible OS+env combo that exists in the world. I've seen a lot of cases of people saying "reproducible in any env, there's nothing special about mine" and being surprised to hear "works for me" from the maintainers just because they didn't think to tell about the quirks their env has or some special setting in Urgh... This is getting long but it's something I wanted to get out there because humans seem to operate on assumptions. |
Regression tests for ansible#1446
Regression tests for ansible#1446
@ssbarnea could you help Adrián figure out where to stick the breakpoints? |
I also have this issue. And it seems that adding |
can confirm that this issue still exists in ansible-lint 5.0.8 |
Considering that the 2 tests |
No need to comment with "me too", it's not productive. For as long as Sorin's comment (#1446 (comment)) is not addressed, we know that it's still an issue. |
FWIW I'm going to put this into the triage queue to see if it's something that we need to schedule for fixing sooner. But bear in mind that the triage calls are unlikely to get to this during the next month anyway. |
adding it to warn_list does the trick
|
I had troubles with this errors as well. |
Analysis Possible Solution Workaround Why I might be wrong I hope this helps to narrow the issue down, for someone with more python/project experience. |
ansible-lint 5.4.0 using ansible 2.9.15 While checking roles I found another variant of this issue, when having a role like this:
with tasks/f1/f1.yaml like:
This produces an error for the include_tasks within the block but not for the once above. The above mentioned problem, that the error is reported at line 1 of the "non existing" file also means inline disable via # noqa is not working. Even starting ansible-lint with |
Since not even -x load-failure works, is this the only way to get ansible-lint 5.4.0 to "work" with project scope taskbooks in some kind?
|
@relrod Did you had any chance to work on this one? Maybe someone else can attempt to make a pull request to fix it? |
Confirmed with ansible-lint 5.4.0 and Ansible 2.9.27. None of the workarounds actually work here. Please let me know if you need any help reproducing this issue. |
Sorry but unless you can reproduce it with latest release 6.2.1, i will have to close it. It should also be noted that use of imports that use |
Repo using the original zip file
This is on a Debian 11 vm
|
Summary
Internal logic for file path evaluation seems to be broken in ansible-lint.
Related: #540
Reproducer: #1445
Issue Type
Ansible and Ansible Lint details
OS / ENVIRONMENT
STEPS TO REPRODUCE
The example below includes only
import_tasks
while the same bug applies to theinclude_tasks
as well.Project layout example: ansible-lint-bug.zip
Project files and content:
Command (ansible):
Command (ansible-lint):
Desired Behaviour
Ansible-lint should not report any failure at all for the above defined project, which includes valid
import_tasks
orinclude_tasks
.Actual Behaviour
Ansible-lint reports a false positive failure -
load-failure
due to incorrectly evaluated file path(s).The text was updated successfully, but these errors were encountered: