[test_display_callback.py] Use ANSIBLE_PYTHON_INTERPRETER var - #336
[test_display_callback.py] Use ANSIBLE_PYTHON_INTERPRETER var#336NickLaMuro wants to merge 1 commit into
Conversation
|
Build failed.
|
|
I can, indeed, replicate the failure locally. I see how it was probably caused by the insertion of another warning, creating an unexpected verbose event. I applied your patch and it seems to fix that particular issue, but the test still fails with I applied an additional diff: diff --git a/test/integration/test_display_callback.py b/test/integration/test_display_callback.py
index 9b651c9..ca130ad 100644
--- a/test/integration/test_display_callback.py
+++ b/test/integration/test_display_callback.py
@@ -177,7 +177,7 @@ def test_callback_plugin_no_log_filters(executor, playbook):
- shell: echo "PUBLIC"
- shell: echo "PRIVATE"
no_log: true
- - uri: url=https://example.org username="PUBLIC" password="PRIVATE"
+ - uri: url=https://example.org user="PUBLIC" password="PRIVATE"
- copy: content="PRIVATE" dest="/tmp/tmp_no_log"
'''}, # noqa
])With your diff + this diff, the test passes for me locally. I suspect this might related to a behavior change in Ansible core. The ansible-runner/test/integration/test_display_callback.py Lines 162 to 171 in 39644c6 |
|
@AlanCoding Thanks for looking into this. This was originally opened to address some failures I was seeing in #335 locally, but both seem to have CI failures that I am not able to reproduce, so I appreciate the assist. I will try make those changes today when time permits, but as we have already worked around this bug ourselves here: I hope you forgive me if I don't make this my first priority. 😅 |
78c22d6 to
029a9cb
Compare
|
Sorry for the delay on this, but it looks like I was getting the failures locally that are described here:
Which took me a while to track down. Didn't do anything as a result, but I now have a understanding of why that is happening better, and that I can pull a "Lando" and say "It's not my fault!". Regarding the issue @AlanCoding mentioned, I wasn't able to get that failure to replicate on my machine, but I did rebase in the suggested fix of ansible-runner/test/integration/test_display_callback.py Lines 292 to 305 in e1f0d86 So figured it wouldn't hurt. |
|
Build failed.
|
029a9cb to
3fb10f0
Compare
|
Build failed.
|
| '''}, # noqa | ||
| ]) | ||
| def test_callback_plugin_task_args_leak(executor, playbook): | ||
| def test_callback_plugin_task_args_leak(executor, playbook, default_envvars): |
There was a problem hiding this comment.
I don't think the fixture default_envvars is needed for this test? Might be good to clean that up.
There was a problem hiding this comment.
Yeah, still working out the ins and outs of pytest, so I think this was something I tried while trying to get things working. It works locally for me without it, so I will push up that change.
3fb10f0 to
79cd84a
Compare
|
Current failures on CI: Seem like they are a build server configuration issue, correct? |
|
Build failed.
|
|
@NickLaMuro any chance you're running w/ an environment variable set to an integer or float? I found another way to reproduce that expect bug recently, and wonder if that's what you've encountered: |
|
@ryanpetrello Sorry for missing this a few days ago, but I will check. That said, am seeing it in CI as well, so if that is the case does that mean that CI would also have that issue? |
Fixes test issues with new versions of ansible that have this patch: ansible/ansible#50163 Since there are tests that end up triggering this warning and mess with the event locations that are returned. Made a quick refactor to the fixture in this test file as well to break out the default env vars so it was a bit more DRY and re-usable.
79cd84a to
82e15eb
Compare
|
@ryanpetrello After testing this while doing other things today, I wasn't able to re-create the errors locally again... sigh... And this was testing all versions on both a VM (fedora-29) and my host OS (OSX), so unsure what I was doing a week ago that caused this to fail... Regardless, I just did a push that fixed some Oh well... ¯\(°_o)/¯ |
|
Build failed.
|
|
I'm relatively sure the stuff in this was covered by other PRs. If you manage to still hit failures that shouldn't be happening, we can return to it. |
Fixes test issues when using newer versions of
ansiblethat have this patch:ansible/ansible#50163
Since there are tests that end up triggering this warning and mess with the event locations that are returned.
Made a quick refactor to the fixture in this test file as well to break out the default env vars so it was a bit more DRY and re-usable. Related, and note worthy, I worked on these fixes while working on the following PR:
#335
And decided to make this an isolated patch instead of building of of that one (or vice versa). As a result, one of those PR is going to have merge conflicts once the other is merged, so I am prepared to rebase once that happens.