pulumi/pkg/resource
Sean Gillespie 679f55c355
Validate type tokens before using them (#1904)
* Validate type tokens before using them

When registering or reading a resource, we take the type token given to
us from the language host and assume that it's valid, which resulted in
assertion failures in various places in the engine. This commit
validates the format of type tokens given to us from the language host
and issues an appropriate error if it's not valid.

Along the way, this commit also improves the way that fatal exceptions
are rendered in the Node language host.

* Pre-allocate an exception for ReadResource

* Fix integration test

* CR Feedback

This commit is a lower-impact change that fixes the bugs associated with
invalid types on component resources and only checks that a type is
valid on custom resources.

* CR Take 2: Fix up IsProviderType instead of fixing call sites

* Please gometalinter
2018-09-07 15:19:18 -07:00
..
config Add license headers 2018-05-22 15:02:47 -07:00
deploy Validate type tokens before using them (#1904) 2018-09-07 15:19:18 -07:00
graph Implement first-class providers. (#1695) 2018-08-06 17:50:29 -07:00
plugin Implement status sinks 2018-08-31 15:56:53 -07:00
provider Implement status sinks 2018-08-31 15:56:53 -07:00
stack Add a list of in-flight operations to the deployment (#1759) 2018-08-10 21:39:59 -07:00
testdata Fix asset bugs; write more tests 2017-10-24 09:00:11 -07:00
asset.go Do not add the same file multiple times to a zip or tar file. (#1783) 2018-08-15 22:44:55 -07:00
asset_test.go Do not add the same file multiple times to a zip or tar file. (#1783) 2018-08-15 22:44:55 -07:00
errors.go Add license headers 2018-05-22 15:02:47 -07:00
properties.go Support Pulumi programs written in Go 2018-06-08 10:36:10 -07:00
properties_diff.go Add license headers 2018-05-22 15:02:47 -07:00
properties_diff_test.go Add license headers 2018-05-22 15:02:47 -07:00
properties_test.go Add license headers 2018-05-22 15:02:47 -07:00
resource_goal.go Implement partial Read 2018-08-10 15:10:14 -07:00
resource_id.go Add license headers 2018-05-22 15:02:47 -07:00
resource_id_test.go Add license headers 2018-05-22 15:02:47 -07:00
resource_operation.go Add a list of in-flight operations to the deployment (#1759) 2018-08-10 21:39:59 -07:00
resource_state.go Implement first-class providers. (#1695) 2018-08-06 17:50:29 -07:00
stack.go Add license headers 2018-05-22 15:02:47 -07:00
status.go Partial status for resource providers 2018-07-02 13:32:23 -07:00
urn.go Add license headers 2018-05-22 15:02:47 -07:00
urn_test.go Add license headers 2018-05-22 15:02:47 -07:00