expand facilities for inspecting the active config #2641
-
Feature Overview
Why is the feature needed?Querying the state of the system, without making modifications, can be useful in diagnostic contexts. My immediate interest is in diagnosing why some teammate's install isn't working as intended. Do they need to create symlinks with WorkaroundI've considered replicating Aqua's config-file search process and evaluation semantics in my own tools, but these seem just intricate enough for me to have doubts that a reimplementation would faithfully reproduce the exact same behaviour as the original. Example CodeI don't have a strong opinion on what the exact commands to get this should look like, nor the format of their output. I think the solution here could probably take a few different forms. So long as the information is made available, I'm happy. Maybe it could look something like # List the policies relevant to the config. Include allow/deny information.
# Action attribution from allow-/deny-file mtime and perms to help remind forgetful users that they in fact did take certain actions.
$ aqua policy list
/Users/peter/repo/.aqua/aqua-policy.yaml allowed by peter at 2023-11-12 12:43:00Z
$ cd ../another-repo; aqua policy list
/Users/peter/another-repo/.aqua/policy.yaml denied by peter at 2023-12-01 08:24:33Z
$ cd ../brand-new-repo; aqua policy list
/Users/peter/brand-new-repo/.aqua/my-policy.yaml new
# Only list packages requested by local config. Include provenance for each package.
$ aqua list --local
standard,99designs/aws-vault from /Users/peter/repo/.aqua/aqua-policy.yaml
standard,fluxcd/flux2 from /Users/peter/repo/.aqua/imports/flux.yaml via /Users/peter/repo/.aqua/aqua-policy.yaml
# Dump the definition of a single package (in JSON format to mirror existing aqua info output).
# Filtering to extract parts I need (what executables get installed).
$ aqua info package standard,fluxcd/flux2 | jq --raw-output '.files[]'
flux NoteNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thank you for your feedback. Regarding |
Beta Was this translation helpful? Give feedback.
Thank you for your feedback.
It makes sense.
Regarding
aqua policy list
, I think we can also add the list of policies to the output ofaqua info
command.