Ensure policy events do not cause a panic when using preview --json (#5610)
This commit is contained in:
parent
ec9c02f578
commit
b75ca2602f
|
@ -4,6 +4,10 @@ CHANGELOG
|
|||
## HEAD (Unreleased)
|
||||
- [cli] Ensure that the CLI doesn't panic when using pulumi watch and policies are enabled
|
||||
[#5569](https://github.com/pulumi/pulumi/pull/5569)
|
||||
|
||||
- [cli] Ensure that the CLI doesn't panic when using the JSON output as part of previews
|
||||
and policies are enabled
|
||||
[#5610](https://github.com/pulumi/pulumi/pull/5610)
|
||||
|
||||
|
||||
## 2.12.0 (2020-10-14)
|
||||
|
|
|
@ -181,6 +181,9 @@ func ShowJSONEvents(op string, action apitype.UpdateKind, events <-chan engine.E
|
|||
// need to come up with a scheme for matching the failure to the associated step.
|
||||
|
||||
// Events ocurring late:
|
||||
case engine.PolicyViolationEvent:
|
||||
// At this point in time, we don't handle policy events in JSON serialization
|
||||
continue
|
||||
case engine.SummaryEvent:
|
||||
// At the end of the preview, a summary event indicates the final conclusions.
|
||||
p := e.Payload().(engine.SummaryEventPayload)
|
||||
|
|
Loading…
Reference in a new issue