pulumi/pkg/backend/httpstate
Thomas Gummerer 7e6bac5b48
improve display for policy packs (#15186)
Our display code sets up the terminal so it doesn't automatically do a
CR for every new line (amongst other modifications). However the policy
pack code just uses regular Println's for output, messing up the
formatting.

Fix this by manually adding the CR, improving this output.

Example output before:

```
$ pulumi preview
Previewing update (tgummerer-test/dev)

View in Browser (Ctrl+O): https://app.pulumi.com/tgummerer-test/pulumi-test-go/dev/previews/af23b7b8-6dd4-4e4e-b635-47eab4270b19

Installing policy pack aws-iso27001-compliance-ready-policies-typescript 0.0.1...
                                                                                 Loading policy packs...

Finished installing policy pack

                               Installing policy pack aws-python 0.0.1...
                                                                         Finished installing policy pack
[...]
```

and after this change:

```
$ pulumi preview
Previewing update (tgummerer-test/dev)

View in Browser (Ctrl+O): https://app.pulumi.com/tgummerer-test/pulumi-test-go/dev/previews/b972324a-5859-49b0-b0f1-edbc547d786a

Installing policy pack aws-typescript 0.0.1...
Loading policy packs...

Finished installing policy pack

Installing policy pack aws-iso27001-compliance-ready-policies-typescript 0.0.1...
Finished installing policy pack
```

There's an argument to be made that we shouldn't display the `Loading
policy packs...` message at all when we're installing the policy packs,
but that's probably a little more involved, so I'm tempted to just ship
this improvement first, and then maybe do that in the future.

Fixes #15183
2024-01-19 13:40:24 +00:00
..
client turn on the golangci-lint exhaustive linter (#15028) 2024-01-17 16:50:41 +00:00
testdata [snapshot] Use a newer diff package 2023-05-16 12:33:30 -07:00
backend.go turn on the golangci-lint exhaustive linter (#15028) 2024-01-17 16:50:41 +00:00
backend_test.go Add Base64SecretsProvider for testing (#15017) 2024-01-05 08:32:56 +00:00
console.go Add support for a PULUMI_CONSOLE_DOMAIN env var (#4410) 2020-04-17 11:50:00 -07:00
console_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
diffs.go Clean up uses of .Error() (#14965) 2023-12-20 15:54:06 +00:00
diffs_post_1.20.go Clean up uses of .Error() (#14965) 2023-12-20 15:54:06 +00:00
diffs_pre_1.20.go [snapshot] Use a newer diff package 2023-05-16 12:33:30 -07:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
environments.go [cli] Include config from ESC in `pulumi config` (#14560) 2023-11-21 10:44:45 +00:00
mock.go Adds Pulumi AI integrations with Pulumi New (#14685) 2023-12-20 22:08:09 +00:00
policypack.go improve display for policy packs (#15186) 2024-01-19 13:40:24 +00:00
snapshot.go Move SecretsManager from SnapshotPersister to SnapshotManager (#13976) 2023-09-19 18:31:56 +00:00
snapshot_test.go Add tokens.StackName (#14487) 2023-11-15 07:44:54 +00:00
stack.go Add --import-file to pulumi preview (#14548) 2023-12-05 08:32:40 +00:00
state.go Exclude internal events from those sent to the service (#14972) 2023-12-21 00:13:04 +00:00
token_source.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
token_source_test.go Use context.Background in tests (#14029) 2023-09-25 12:25:26 +00:00