You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe
As somebody with years of experience with IaC tooling (mostly Terraform, occasional Ansible) I had trouble finding any resources on how to interact with and debug the pyinfra code.
After failing to use PyCharm debugger and searching through docs I came up with this frankenstein (which nobody should use) to print out databases in MySQL:
# DO NOT USEdatabases=host.get_fact(MysqlDatabases, **mysql_args)
server.shell(commands=[f"echo 'Hello World!' {databases}"])
It would be great to have a debugging instructions page dedicated to new users. Some stuff it could include, which I learned after brief talk on Matrix chat/through issues:
make it obvious that re-running operations it currently the only sensible way to learn/reason about and debug the code.
point out that from pyinfra import logger can aid this model with "print driven debugging".
Is your feature request related to a problem? Please describe
As somebody with years of experience with IaC tooling (mostly Terraform, occasional Ansible) I had trouble finding any resources on how to interact with and debug the
pyinfra
code.After failing to use PyCharm debugger and searching through docs I came up with this frankenstein (which nobody should use) to print out databases in MySQL:
what I later learned it could look like:
Describe the solution you'd like
It would be great to have a debugging instructions page dedicated to new users. Some stuff it could include, which I learned after brief talk on Matrix chat/through issues:
from pyinfra import logger
can aid this model with "print driven debugging".pyinfra
doesn't really work with Jetbrains/PyCharm debugger, remove the compatibility docs saying otherwise.pyinfra
execution model doesn't allow retrieving outputs from operations (only facts).The text was updated successfully, but these errors were encountered: