Commit Graph

3219 Commits (5b56f9a33aa464b4defdd45378b94c932296c10c)
 

Author SHA1 Message Date
David Wilson b243da087c issue #121: fix call_function_test by not raising the dead
A first small mea culpa to all my testing sins of late :)
7 years ago
David Wilson f1009b7502 issue #121: fix breakage caused by a9c6c13
This actually addresses multiple problems:

* Single-file programs were broken, since the fix introduced in
  6931cc10c4 caused builtin_find_module()
  to start indicating __main__ can always be loaded locally. That's
  broken, and there might be more cases where the same problem will crop
  up.

  Since it was indicated __main__ could be loaded locally, the built-in
  import machinery was allowed to attempt that (since we remove __main__
  from sys.modules during bootstrap), which caused a safety check to
  fire in the bowels of Python:

      "Cannot re-init internal module %.200s"

* The check for presence of the whitelist was totally broken, since the
  whitelist is never an empty list. Therefore 'self' was being returned
  for every module, including extension modules like 'termios'.

I have hand-verified this does not break the fix for issue #113. I
looked at writing a test for that, but it requires a Docker container
(or similar) with an ancient version of Ansible installed. Will open a
separate ticket tracking this.
7 years ago
David Wilson f8c85b549f docs: typo 7 years ago
David Wilson dc9dda08e1 Add link to IRC; closes #116 7 years ago
David Wilson 5dddee62ea Revert "issue #121: minimal fix for nested_test."
Mega broken.

This reverts commit a7dbbd96aa.
7 years ago
David Wilson a0c4df72b0 issue #121: minimal fix for nested_test. 7 years ago
David Wilson b2a433dcc4 ssh: CompressionLevel is a v1-only option.
It's ignored by newer SSHes, which only pay attention to Compression.
7 years ago
Alex Willmer b433645d11 tests: Fix import error 7 years ago
Alex Willmer c6f3bfd93a tests: Correct path to apply_mode_spec() 7 years ago
Alex Willmer bbd8b6253b tests: Find all *_test.py scripts and run them
Don't rely on maintaining a list of test files, it's too easy to forget
one and silently fail to run it.
7 years ago
Alex Willmer c34a12369e tests: Rely on unittest2 to print failure messages 7 years ago
Alex Willmer 2c05958ecc docs: Replace google.com as target of get_url()
Probably best to avoid angering the 800 lb gorilla with access to killer
robots.

https://example.org works, this is why it exists.
7 years ago
Alex Willmer 1c20c61605 docs: Convert all URLs that support https://
Excluded: graphml XML namespaces, links to e.g. Fabric homepage

Fixes #128
7 years ago
David Wilson f8738f1c52 issue #122: helper to print environment 7 years ago
David Wilson 7d12154a92 ansible: fix formatting 7 years ago
David Wilson 089f39716e docs: beginnings of testimonials section 7 years ago
David Wilson 8329bee889 parent: log discard_until() input when IOLOG is enabled
Trying to diagnose a Reddit user's problem.
7 years ago
David Wilson 12c6e574fb ansible: disable host key checking for now
Need a better story (perhaps a callback function?) for handling this.
7 years ago
David Wilson 037bed895b issue #110: _transfer_data() must handle dicts and Unicode(!) 7 years ago
David Wilson e36c1763bd issue #110: split process state out of strategy state
The strategy is reconstructed for every playbook that is included or
specified on the command line, therefore we can't store the global
Router there without losing all our SSH connections across playbooks.
7 years ago
David Wilson d34025fae9 ansible: _transfer_data() must return remote_path.
Fixes DebOps bug.
7 years ago
David Wilson a9db27d424 ansible: instrument every ActionMixin override. 7 years ago
David Wilson 500c4f419c docs: update limitations list for Ansible. 7 years ago
David Wilson 9b7991cd45 issue #118: log exceptions for emulated commands, fix AttributeError in helpers.py
Turns out Ansible can't be trusted to actually check the result
dictionary everywhere it expects one, so put the real exception text
into -vvv output too.
7 years ago
David Wilson 6106c27707 ansible: repro for issue #118. 7 years ago
David Wilson 59dab72e29 ansible: log ansible_mitogen.* to -v too. 7 years ago
David Wilson 537a263261 docs: So many typos 7 years ago
David Wilson 6bd4c5ead5 docs: Ansible logging update (#111) 7 years ago
David Wilson 016d47aa91 Log and track PIDs everywhere for Ansible. 7 years ago
David Wilson 28afa955a3 importer: take priority over system packages when whitelisting is enabled
Might want to de-overload the meaning of whitelist in future, but in
the meantime it works fine for Ansible and I can't think of a
whitelisting use case that would break because of it.

Closes #114.
7 years ago
David Wilson b63af1de85 ansible: implement _transfer_data for <2.4 template action 7 years ago
David Wilson 7aca02c2c7 importer: don't include related modules that are blacklisted
Cuts down on even more spam
7 years ago
David Wilson 37d38f8d9f importer: _is_stdlib_name() needed to handle relative paths
Was causing tons of log spam due to 'skipping absent related name'
7 years ago
David Wilson 6ed731c088 Minor cleanup. 7 years ago
David Wilson cf01c6b710 importer: avoid duplicate module load(!); closes #113.
Amazed this one managed to scrape through for so long. Calling
__import__ from within find_module() was causing the target module, in
this case cookielib, to be loaded *then overwritten* by a subsequent
duplicate load higher in the stack.

The result is that cookielib was loaded twice, and, per usual Python
import semantics, a reference to the partially initialized first
cookielib was installed in sys.modules while its code executed.

At the end of cookielib on 2.x, it imports _LWPCookieJar, which in turn
imports the partially built cookielib from sys.modules, then subclasses
the CookieJar from /that/ module.

Everything is wonderful. Then the call returns back up into the import
mechanism which restarts the entire process -- only this time,
_LWPCookieJar is /not/ reinitialized, so the copy in sys.modules is
still left with types pointing at the old module!

So the duplicate import creates a new CookieJar which is not the base
class of LWPCookieJar. Tada! 3 hours debugging.

This is probably a performance fix in disguise, didn't realize things
were so broken. It may also be a regression elsewhere. Urgently need to
finish the tests.
7 years ago
David Wilson 316eebbe29 examples: enable the strategy by default 7 years ago
David Wilson 7ab1af043e ansible: redirect logging into display 'framework'. closes #111 7 years ago
David Wilson 5b0b973dba importer: quieten one more warning 7 years ago
David Wilson 4f352d7d4b Pin Sphinx version 7 years ago
David Wilson 57b9d59e90 issue #113: import crash reproduction 7 years ago
David Wilson b527628b17 issue #109: do exactly what Ansible does
Could it be that some empty dict magically gets populated from somewhere
invisible?
7 years ago
David Wilson 23d104f73b examples: beginnings of repro for issue #109 7 years ago
David Wilson 6ec349b386 importer: quieten 'cannot find source' warning, closes #110 7 years ago
David Wilson 53e51c4af8 docs: update Python 3 support to match reality. 7 years ago
David Wilson 0ef23d8644 parent: Add hack for OS X /usr/bin/python
It's a magical switcher that needs argv[0], which we don't provide.
7 years ago
David Wilson 88508fcb61 sudo: accept -n too (issue #108) 7 years ago
David Wilson 9cfcf79f43 sudo: accept but discard -S option. fixes #108 7 years ago
David Wilson ce9a1fef26 docs: fix float 7 years ago
David Wilson 23f78ca5a2 README: move testing bits into tests directory. 7 years ago
David Wilson 04bb5881b6 ansible: doc updates 7 years ago