Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(hack) Format PlanResult if it's a Bolt datatype #2941

Merged
merged 1 commit into from Jul 23, 2021

Conversation

lucywyman
Copy link
Contributor

Bolt will format a PlanResult as JSON when we don't have a handler for
the class of the result. Despite having functions for printing
Bolt::Result, Bolt::ApplyResult, and Bolt::Error types, the plan
result printer in the human outputter would not use these functions and
would format the types as JSON, which often makes them difficult to
read. Bolt will now correctly format the result types if returned from a
plan.

!feature

  • Format PlanResults if they are Bolt datatypes (hack)

    Bolt will now print a more human readable message for plan results
    that are Bolt datatypes when using the human output format, rather than
    printing JSON.

@lucywyman lucywyman marked this pull request as ready for review July 19, 2021 18:27
@lucywyman lucywyman requested a review from a team as a code owner July 19, 2021 18:27
@beechtom beechtom added this to 🚧 Reviewing in Bolt Kanban via automation Jul 20, 2021
@lucywyman lucywyman force-pushed the hack/better-output branch 2 times, most recently from 79c7ab1 to 5745408 Compare July 22, 2021 18:10
lib/bolt/outputter/human.rb Outdated Show resolved Hide resolved
Bolt will format a PlanResult as JSON when we don't have a handler for
the class of the result. Despite having functions for printing
`Bolt::Result`, `Bolt::ApplyResult`, and `Bolt::Error` types, the plan
result printer in the human outputter would not use these functions and
would format the types as JSON, which often makes them difficult to
read. Bolt will now correctly format the result types if returned from a
plan.

!feature

* **Format PlanResults if they are Bolt datatypes** (hack)

  Bolt will now print a more human readable message for plan results
  that are Bolt datatypes when using the human output format, rather than
  printing JSON.
@beechtom beechtom merged commit bd77738 into puppetlabs:main Jul 23, 2021
@lucywyman lucywyman removed this from 🚧 Reviewing in Bolt Kanban Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants