Skip to content

Commit

Permalink
Check for unexpected RPC ID and return an error (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
lblackstone committed Mar 7, 2019
1 parent 46400c6 commit 2d48760
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
## 0.21.1 (Unreleased)

### Major changes

- None

### Improvements

- None

### Bug fixes

- Check for unexpected RPC ID and return an error (https://github.com/pulumi/pulumi-kubernetes/pull/475)

## 0.21.0 (Released March 6, 2019)

### Important
Expand Down
3 changes: 3 additions & 0 deletions pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,9 @@ func (k *kubeProvider) Read(ctx context.Context, req *pulumirpc.ReadRequest) (*p
}

_, name := ParseFqName(req.GetId())
if name == "" {
return nil, fmt.Errorf("failed to parse resource name from request ID: %s", req.GetId())
}
if oldInputs.GetName() == "" {
oldInputs.SetName(name)
}
Expand Down

0 comments on commit 2d48760

Please sign in to comment.