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
In my last discussion, I talked about how the Pyinfra architecture is quite coupled with UI elements. I'd like to start a discussion about how the project's architecture could evolve to make its API surface more stable for the future
Well, first things first: My use-case
I currently utilize Pyinfra as the core execution API for my own system management project (akin to a platform, with secret management and such). That being said, when I utilized Pyinfra, I realized that it has a tight coupling with UI elements:
As per the code above, I have to capture Pyinfra's logging output in order to capture diffs, commands, and facts. These could be put in the OperationMeta object as well as the logger, in order to make API usage easier
This is a coupling that makes API usage more brittle and susceptible to unsuspecting breaking changes (e.g., different strings being passed to the logger)
I know this is already a known issue, and it started being worked on by @wowi42 in #1616, making an amazing step forward by removing all calls to click in the API
looking forward to V4
I've realized that @JakkuSakura is doing huge work on #1482 by dropping paramiko and using asyncio instead. This can be awesome for quite a few different reasons, but it still is a major breaking change that should be looked at closely.
I think we could use this breaking change window to discuss API decoupling and how to manage packaging for Pyinfra. Currently, it installs both the CLI and the API all in one, making packaging it with different interfaces harder (requiring additional dependencies such as click even when running purely headless).
As such, I'd like to make a few questions for the maintainers, in order to be as helpful as I can be with this project, and I believe can help other contributors to make the project grow:
What is the current architectural philosophy regarding Pyinfra as a programmatic API vs. a CLI tool?
What are the current doubts or blockers with V4's move to asyncio, so we can help find workarounds?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In my last discussion, I talked about how the Pyinfra architecture is quite coupled with UI elements. I'd like to start a discussion about how the project's architecture could evolve to make its API surface more stable for the future
Well, first things first: My use-case
I currently utilize Pyinfra as the core execution API for my own system management project (akin to a platform, with secret management and such). That being said, when I utilized Pyinfra, I realized that it has a tight coupling with UI elements:
As per the code above, I have to capture Pyinfra's logging output in order to capture diffs, commands, and facts. These could be put in the OperationMeta object as well as the logger, in order to make API usage easier
This is a coupling that makes API usage more brittle and susceptible to unsuspecting breaking changes (e.g., different strings being passed to the logger)
I know this is already a known issue, and it started being worked on by @wowi42 in #1616, making an amazing step forward by removing all calls to click in the API
looking forward to V4
I've realized that @JakkuSakura is doing huge work on #1482 by dropping paramiko and using asyncio instead. This can be awesome for quite a few different reasons, but it still is a major breaking change that should be looked at closely.
I think we could use this breaking change window to discuss API decoupling and how to manage packaging for Pyinfra. Currently, it installs both the CLI and the API all in one, making packaging it with different interfaces harder (requiring additional dependencies such as click even when running purely headless).
As such, I'd like to make a few questions for the maintainers, in order to be as helpful as I can be with this project, and I believe can help other contributors to make the project grow:
Beta Was this translation helpful? Give feedback.
All reactions