Resolve "Enable pretty-printing output by default, create configuration option to disable pretty-printing"
General MR
Summary
Feature request from Ironbank:
When you print the values, it does it as a blob instead of pretty printing Can you pretty print?
By default, output is currently a giant blob. This is required for the parsers that power the Grafana dashboards as part of the Cron Job chart. This is a lesser user experience on the command line however. Traditionally, we've asked that users pipe that output to another tool like jq or yq for formatting, however this is less intuitive for new users and doesn't really enhance the user experience. Instead, we should enable pretty-printing by default and have it disabled in the helm chart where necessary.
Acceptance Criteria
- Implement pretty-printing for
YAML andJSON structured outputs - Create a configuration flag to enable pretty printing
- Set the flag to
Truein new configuration files by default. If the flag is not set,False. - Update the Helm charts to explicitly disable pretty printing (big-bang/product/packages/bbctl#329 (closed))
Detect if the output is being piped into another program and if so, disable pretty printing
Additional Changes
- Adjusted outputs and tests to accommodate
big-bang-skip-auto-updateandskip-update-checkconfig changes - Added
big-bang-skip-auto-update,skip-update-check, andpretty-printoptions to config wizard, with defaults - Refactored
cmd/config/init.goto utilize helper object to reduce cylcomatic complexity lints that were failing
Relevant logs/screenshots
pretty-print=false, both JSON raw output and output piped into jq:
pretty-print=true, JSON raw output only (no jq):
pretty-print=true, JSON output piped into jq:
Linked Issue
Upgrade Notices
(Include any relevant notes about upgrades here or write "N/A" if there are none)
Closes #74 (closed)


