Skip to content

Commit

Permalink
Fix panic condition in Job await logic (#929)
Browse files Browse the repository at this point in the history
For events received by the Job awaiter, explicitly
check that the event has a non-nil Object to avoid
a possible panic.
  • Loading branch information
lblackstone committed Dec 21, 2019
1 parent a89bdf6 commit f4663dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## HEAD (Unreleased)

### Bug fixes

- Fix deprecation warnings and docs. (https://github.com/pulumi/pulumi-kubernetes/pull/929).
- Fix projection of array-valued output properties in .NET. (https://github.com/pulumi/pulumi-kubernetes/pull/931)

## 1.4.1 (December 17, 2019)
Expand Down
4 changes: 4 additions & 0 deletions pkg/await/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ func (jia *jobInitAwaiter) Read() error {
}

func (jia *jobInitAwaiter) processJobEvent(event watch.Event) error {
if event.Object == nil {
glog.V(3).Infof("received event with nil Object: %#v", event)
return nil
}
job, err := clients.JobFromUnstructured(event.Object.(*unstructured.Unstructured))
if err != nil {
glog.V(3).Infof("Failed to unmarshal Job event: %v", err)
Expand Down

0 comments on commit f4663dd

Please sign in to comment.