Repository navigation
Conversation
|
Idea: we could forbid calling subprocess via pylint. |
cb19121 to
5aa02e6
Compare
|
| self.runtime = Runtime(isolated=True) | ||
|
|
||
|
|
||
| app = App() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an attempt to make a mutable singleton? Why not initialize it during the startup sequence and then pass around DI-style?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Molecule multi-layered structure makes it extremely inconvenient to pass such an object. I considered that approach but it would be a total mess. We can aim to achieve that at some point but it would need several major version changes and existence of plugins is a major limiting factor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Affecting the import time is also messy. There's nothing wrong with multilayered bypasses, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will not do that as part of this PR. If you want you can lead this challenge but I warn you that you will unlikely to succeed as you will have to change API of plugins and 15+ plugins. I am also worried that this may add delays which may interfere with AAP inclusion goals.
d2fd1f5 to
72f6a1a
Compare
Instead of directly calling subprocess, ensure we use Runtime api methods for running various commands, most importantly ansible commands. This also removes subprocess-tee dependency as a desired action.
Instead of directly calling subprocess, ensure we use Runtime
api methods for running various commands, most importantly
ansible commands.
This also removes subprocess-tee dependency as a desired action.