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
We might be able to use this instead of rolling our own diff output. As one example, koji_tag's ensure_inheritance() prints the "before" and "after" settings using describe_inheritance().
The text was updated successfully, but these errors were encountered:
I looked at this recently for a small module (koji_tag_packages.py).
In ktdreyer/errata-tool-ansible@720e943, we always had a single huge dict of the current state (eg. from get_product(), or get_release(), etc), and it's straightforward to diff that against the module's params.
In contrast, the modules in koji-ansible have many different "get" methods scattered throughout. It's difficult to build up a total "current state" dict to diff against.
This reminds me of #30 . I'm thinking of refactoring the koji-ansible modules to have two stages: a "gather" stage where we read all the information we're going to need from the hub (ideally in a single multicall RPC). Then the second stage would "apply" the changes the user requested.
Ansible has the ability to show the "diff" for a configuration:
https://blog.networktocode.com/post/generating-diff-with-ansible/
We might be able to use this instead of rolling our own diff output. As one example,
koji_tag
'sensure_inheritance()
prints the "before" and "after" settings usingdescribe_inheritance()
.The text was updated successfully, but these errors were encountered: