From 2d48760aaaffcb00b6c5c7e43967c8731169ff2e Mon Sep 17 00:00:00 2001 From: Levi Blackstone Date: Wed, 6 Mar 2019 17:54:06 -0700 Subject: [PATCH] Check for unexpected RPC ID and return an error (#475) --- CHANGELOG.md | 12 ++++++++++++ pkg/provider/provider.go | 3 +++ 2 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5de89b56c7..4c01e6e52f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/pkg/provider/provider.go b/pkg/provider/provider.go index 05d6d745df..6e1490b8e6 100644 --- a/pkg/provider/provider.go +++ b/pkg/provider/provider.go @@ -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) }