Alter the way unknown properties are serialized

This change serializes unknown properties anywhere in the entire
property structure, including deeply embedded inside object maps, etc.

This is now done in such a way that we can recover both the computed
nature of the serialized property, along with its expected eventual
type, on the other side of the RPC boundary.

This will let us have perfect fidelity with the new bridge's view on
computed properties, rather than special casing them on "one side".
This commit is contained in:
joeduffy 2017-07-20 09:06:39 -07:00
parent b8be7fa5e6
commit 00442b73b4
12 changed files with 194 additions and 331 deletions

View file

@ -48,14 +48,9 @@ func (a *analyzer) Name() tokens.QName { return a.name }
// Analyze analyzes a single resource object, and returns any errors that it finds.
func (a *analyzer) Analyze(t tokens.Type, props resource.PropertyMap) ([]AnalyzeFailure, error) {
glog.V(7).Infof("analyzer[%v].Analyze(t=%v,#props=%v) executing", a.name, t, len(props))
pstr, unks := MarshalPropertiesWithUnknowns(props, MarshalOptions{
OldURNs: true, // permit old URNs, since this is pre-update.
RawResources: true, // often used during URN creation; IDs won't be ready.
})
req := &lumirpc.AnalyzeRequest{
Type: string(t),
Properties: pstr,
Unknowns: unks,
Properties: MarshalProperties(props, MarshalOptions{}),
}
resp, err := a.client.Analyze(a.ctx.Request(), req)

View file

@ -91,11 +91,7 @@ func (eng *hostServer) ReadLocation(ctx context.Context,
if err != nil {
return nil, err
}
m, known := MarshalPropertyValue(v, MarshalOptions{})
if !known {
return nil, errors.Errorf("Location %v contained an unknown computed value", tok)
}
return m, nil
return MarshalPropertyValue(v, MarshalOptions{}), nil
}
// ReadLocations reads takes a class or module token and reads all (static) properties belonging to it.
@ -106,9 +102,6 @@ func (eng *hostServer) ReadLocations(ctx context.Context,
if err != nil {
return nil, err
}
props, unks := MarshalPropertiesWithUnknowns(locs, MarshalOptions{})
if len(unks) > 0 {
return nil, errors.Errorf("Location %v contained %v unknown computed value(s)", tok, len(unks))
}
props := MarshalProperties(locs, MarshalOptions{})
return &lumirpc.ReadLocationsResponse{Properties: props}, nil
}

View file

@ -57,14 +57,9 @@ func (p *provider) Pkg() tokens.Package { return p.pkg }
// Check validates that the given property bag is valid for a resource of the given type.
func (p *provider) Check(t tokens.Type, props resource.PropertyMap) ([]CheckFailure, error) {
glog.V(7).Infof("resource[%v].Check(t=%v,#props=%v) executing", p.pkg, t, len(props))
pstr, unks := MarshalPropertiesWithUnknowns(props, MarshalOptions{
OldURNs: true, // permit old URNs, since this is pre-update.
RawResources: true, // pre-create, resource.IDs won't be ready, just ship over the URNs.
})
req := &lumirpc.CheckRequest{
Type: string(t),
Properties: pstr,
Unknowns: unks,
Properties: MarshalProperties(props, MarshalOptions{}),
}
resp, err := p.client.Check(p.ctx.Request(), req)
@ -86,14 +81,9 @@ func (p *provider) Name(t tokens.Type, props resource.PropertyMap) (tokens.QName
contract.Assert(t != "")
contract.Assert(props != nil)
glog.V(7).Infof("resource[%v].Name(t=%v,#props=%v) executing", p.pkg, t, len(props))
pstr, unks := MarshalPropertiesWithUnknowns(props, MarshalOptions{
OldURNs: true, // permit old URNs, since this is pre-update.
RawResources: true, // pre-create, resource.IDs won't be ready, just ship over the URNs.
})
req := &lumirpc.NameRequest{
Type: string(t),
Properties: pstr,
Unknowns: unks,
Properties: MarshalProperties(props, MarshalOptions{}),
}
resp, err := p.client.Name(p.ctx.Request(), req)
@ -115,7 +105,7 @@ func (p *provider) Create(t tokens.Type, props resource.PropertyMap) (resource.I
glog.V(7).Infof("resource[%v].Create(t=%v,#props=%v) executing", p.pkg, t, len(props))
req := &lumirpc.CreateRequest{
Type: string(t),
Properties: MarshalProperties(props, MarshalOptions{}),
Properties: MarshalProperties(props, MarshalOptions{DisallowUnknowns: true}),
}
resp, err := p.client.Create(p.ctx.Request(), req)
@ -166,19 +156,12 @@ func (p *provider) InspectChange(t tokens.Type, id resource.ID,
glog.V(7).Infof("resource[%v].InspectChange(id=%v,t=%v,#olds=%v,#news=%v) executing",
p.pkg, id, t, len(olds), len(news))
newpstr, newunks := MarshalPropertiesWithUnknowns(news, MarshalOptions{
RawResources: true, // pre-change, resource.IDs won't be ready, ship over URNs.
})
req := &lumirpc.InspectChangeRequest{
Id: string(id),
Type: string(t),
Olds: MarshalProperties(olds, MarshalOptions{
RawResources: true, // just leave these as-is, so they match the news.
}),
News: newpstr,
Unknowns: newunks,
Olds: MarshalProperties(olds, MarshalOptions{DisallowUnknowns: true}),
News: MarshalProperties(news, MarshalOptions{}),
}
resp, err := p.client.InspectChange(p.ctx.Request(), req)
if err != nil {
glog.V(7).Infof("resource[%v].InspectChange(id=%v,t=%v,...) failed: %v", p.pkg, id, t, err)
@ -189,8 +172,7 @@ func (p *provider) InspectChange(t tokens.Type, id resource.ID,
for _, replace := range resp.GetReplaces() {
replaces = append(replaces, resource.PropertyKey(replace))
}
changes := UnmarshalProperties(resp.GetChanges(), MarshalOptions{RawResources: true})
changes := UnmarshalProperties(resp.GetChanges(), MarshalOptions{})
glog.V(7).Infof("resource[%v].Update(id=%v,t=%v,...) success: #replaces=%v #changes=%v",
p.pkg, id, t, len(replaces), len(changes))
@ -216,10 +198,8 @@ func (p *provider) Update(t tokens.Type, id resource.ID,
req := &lumirpc.UpdateRequest{
Id: string(id),
Type: string(t),
Olds: MarshalProperties(olds, MarshalOptions{
OldURNs: true, // permit old URNs since these are the old values.
}),
News: MarshalProperties(news, MarshalOptions{}),
Olds: MarshalProperties(olds, MarshalOptions{DisallowUnknowns: true}),
News: MarshalProperties(news, MarshalOptions{DisallowUnknowns: true}),
}
resp, err := p.client.Update(p.ctx.Request(), req)
@ -242,7 +222,7 @@ func (p *provider) Delete(t tokens.Type, id resource.ID, props resource.Property
req := &lumirpc.DeleteRequest{
Id: string(id),
Type: string(t),
Properties: MarshalProperties(props, MarshalOptions{}),
Properties: MarshalProperties(props, MarshalOptions{DisallowUnknowns: true}),
}
if _, err := p.client.Delete(p.ctx.Request(), req); err != nil {

View file

@ -15,109 +15,134 @@ import (
// MarshalOptions controls the marshaling of RPC structures.
type MarshalOptions struct {
SkipNulls bool // true to skip nulls altogether in the resulting map.
OldURNs bool // true to permit old URNs in the properties (e.g., for pre-update).
RawResources bool // true to marshal resources "as-is"; often used when ID mappings aren't known yet.
SkipNulls bool // true to skip nulls altogether in the resulting map.
DisallowUnknowns bool // true if we are disallowing unknown values (results in assertion failures).
}
// MarshalPropertiesWithUnknowns marshals a resource's property map as a "JSON-like" protobuf structure. Any URNs are
// replaced with their resource IDs during marshaling; it is an error to marshal a URN for a resource without an ID. A
// map of any unknown properties encountered during marshaling (latent values) is returned on the side; these values are
// marshaled using the default value in the returned structure and so this map is essential for interpreting results.
func MarshalPropertiesWithUnknowns(
props resource.PropertyMap, opts MarshalOptions) (*structpb.Struct, map[string]bool) {
var unk map[string]bool
result := &structpb.Struct{
Fields: make(map[string]*structpb.Value),
}
const (
// UnknownBoolValue is a sentinel indicating that a bool property's value is not known, because it depends on
// a computation with values whose values themselves are not yet known (e.g., dependent upon an output property).
UnknownBoolValue = "1c4a061d-8072-4f0a-a4cb-0ff528b18fe7"
// UnknownNumberValue is a sentinel indicating that a number property's value is not known, because it depends on
// a computation with values whose values themselves are not yet known (e.g., dependent upon an output property).
UnknownNumberValue = "3eeb2bf0-c639-47a8-9e75-3b44932eb421"
// UnknownStringValue is a sentinel indicating that a string property's value is not known, because it depends on
// a computation with values whose values themselves are not yet known (e.g., dependent upon an output property).
UnknownStringValue = "04da6b54-80e4-46f7-96ec-b56ff0331ba9"
// UnknownArrayValue is a sentinel indicating that an array property's value is not known, because it depends on
// a computation with values whose values themselves are not yet known (e.g., dependent upon an output property).
UnknownArrayValue = "6a19a0b0-7e62-4c92-b797-7f8e31da9cc2"
// UnknownAssetValue is a sentinel indicating that an asset property's value is not known, because it depends on
// a computation with values whose values themselves are not yet known (e.g., dependent upon an output property).
UnknownAssetValue = "030794c1-ac77-496b-92df-f27374a8bd58"
// UnknownArchiveValue is a sentinel indicating that an archive property's value is not known, because it depends
// on a computation with values whose values themselves are not yet known (e.g., dependent upon an output property).
UnknownArchiveValue = "e48ece36-62e2-4504-bad9-02848725956a"
// UnknownObjectValue is a sentinel indicating that an archive property's value is not known, because it depends
// on a computation with values whose values themselves are not yet known (e.g., dependent upon an output property).
UnknownObjectValue = "dd056dcd-154b-4c76-9bd3-c8f88648b5ff"
)
// MarshalProperties marshals a resource's property map as a "JSON-like" protobuf structure.
func MarshalProperties(props resource.PropertyMap, opts MarshalOptions) *structpb.Struct {
fields := make(map[string]*structpb.Value)
for _, key := range props.StableKeys() {
v := props[key]
glog.V(9).Infof("Marshaling property for RPC: %v=%v", key, v)
if v.IsOutput() {
glog.V(9).Infof("Skipping output property %v", key)
continue // skip output properties.
} else if opts.SkipNulls && v.IsNull() {
glog.V(9).Infof("Skipping null property %v (as requested)", key)
continue // skip nulls if requested.
}
mv, known := MarshalPropertyValue(v, opts)
result.Fields[string(key)] = mv
// If the property was unknown, note it, so that we may tell the provider.
if !known {
if unk == nil {
unk = make(map[string]bool)
}
unk[string(key)] = true
} else {
fields[string(key)] = MarshalPropertyValue(v, opts)
}
}
return result, unk
return &structpb.Struct{
Fields: fields,
}
}
// MarshalProperties performs ordinary marshaling of a resource's properties but then validates afterwards that all
// fields were known (in other words, no latent properties were encountered).
func MarshalProperties(props resource.PropertyMap, opts MarshalOptions) *structpb.Struct {
pstr, unks := MarshalPropertiesWithUnknowns(props, opts)
contract.Assertf(unks == nil, "Unexpected unknown properties during final marshaling")
return pstr
}
// MarshalPropertyValue marshals a single resource property value into its "JSON-like" value representation. The
// boolean return value indicates whether the value was known (true) or unknown (false).
func MarshalPropertyValue(v resource.PropertyValue, opts MarshalOptions) (*structpb.Value, bool) {
// MarshalPropertyValue marshals a single resource property value into its "JSON-like" value representation.
func MarshalPropertyValue(v resource.PropertyValue, opts MarshalOptions) *structpb.Value {
if v.IsNull() {
return MarshalNull(opts), true
return MarshalNull(opts)
} else if v.IsBool() {
return &structpb.Value{
Kind: &structpb.Value_BoolValue{
BoolValue: v.BoolValue(),
},
}, true
}
} else if v.IsNumber() {
return &structpb.Value{
Kind: &structpb.Value_NumberValue{
NumberValue: v.NumberValue(),
},
}, true
}
} else if v.IsString() {
return MarshalString(v.StringValue(), opts), true
return MarshalString(v.StringValue(), opts)
} else if v.IsArray() {
outcome := true
var elems []*structpb.Value
for _, elem := range v.ArrayValue() {
elemv, known := MarshalPropertyValue(elem, opts)
outcome = outcome && known
elems = append(elems, elemv)
elems = append(elems, MarshalPropertyValue(elem, opts))
}
return &structpb.Value{
Kind: &structpb.Value_ListValue{
ListValue: &structpb.ListValue{Values: elems},
},
}, outcome
}
} else if v.IsAsset() {
return MarshalAsset(v.AssetValue(), opts)
} else if v.IsArchive() {
return MarshalArchive(v.ArchiveValue(), opts)
} else if v.IsObject() {
obj, unks := MarshalPropertiesWithUnknowns(v.ObjectValue(), opts)
return MarshalStruct(obj, opts), unks == nil
obj := MarshalProperties(v.ObjectValue(), opts)
return MarshalStruct(obj, opts)
} else if v.IsComputed() {
e := v.ComputedValue().Element
contract.Assert(!e.IsComputed())
w, known := MarshalPropertyValue(e, opts)
contract.Assert(known)
return w, false
return marshalUnknownProperty(v.ComputedValue().Element, opts)
} else if v.IsOutput() {
e := v.OutputValue().Element
contract.Assert(!e.IsComputed())
w, known := MarshalPropertyValue(e, opts)
contract.Assert(known)
return w, false
// Note that at the moment we don't differentiate between computed and output properties on the wire. As
// a result, they will show up as computed on the other end. This distinction isn't currently interesting.
return marshalUnknownProperty(v.OutputValue().Element, opts)
}
contract.Failf("Unrecognized property value: %v (type=%v)", v.V, reflect.TypeOf(v.V))
return nil, true
return nil
}
// marshalUnknownProperty marshals an unknown property in a way that lets us recover its type on the other end.
func marshalUnknownProperty(elem resource.PropertyValue, opts MarshalOptions) *structpb.Value {
contract.Assertf(!opts.DisallowUnknowns, "Unexpected unknown value when opts.DisallowUnknowns")
// Normal cases, these get sentinels.
if elem.IsBool() {
return MarshalString(UnknownBoolValue, opts)
} else if elem.IsNumber() {
return MarshalString(UnknownNumberValue, opts)
} else if elem.IsString() {
return MarshalString(UnknownStringValue, opts)
} else if elem.IsArray() {
return MarshalString(UnknownArrayValue, opts)
} else if elem.IsAsset() {
return MarshalString(UnknownAssetValue, opts)
} else if elem.IsArchive() {
return MarshalString(UnknownArchiveValue, opts)
} else if elem.IsObject() {
return MarshalString(UnknownObjectValue, opts)
}
// If for some reason we end up with a recursive computed/output, just keep digging.
if elem.IsComputed() {
return marshalUnknownProperty(elem.ComputedValue().Element, opts)
} else if elem.IsOutput() {
return marshalUnknownProperty(elem.OutputValue().Element, opts)
}
// Finally, if a null, we can guess its value! (the one and only...)
if elem.IsNull() {
return MarshalNull(opts)
}
contract.Failf("Unexpected output/computed property element: %v", elem)
return nil
}
// UnmarshalProperties unmarshals a "JSON-like" protobuf structure into a new resource property map.
@ -161,7 +186,12 @@ func UnmarshalPropertyValue(v *structpb.Value, opts MarshalOptions) resource.Pro
case *structpb.Value_NumberValue:
return resource.NewNumberProperty(v.GetNumberValue())
case *structpb.Value_StringValue:
return resource.NewStringProperty(v.GetStringValue())
// If it's a string, it could be an unknown property, or just a regular string.
s := v.GetStringValue()
if unk, isunk := unmarshalUnknownPropertyValue(s, opts); isunk {
return unk
}
return resource.NewStringProperty(s)
case *structpb.Value_ListValue:
// If there's already an array, prefer to swap elements within it.
var elems []resource.PropertyValue
@ -194,6 +224,32 @@ func UnmarshalPropertyValue(v *structpb.Value, opts MarshalOptions) resource.Pro
}
}
func unmarshalUnknownPropertyValue(s string, opts MarshalOptions) (resource.PropertyValue, bool) {
var elem resource.PropertyValue
var unknown bool
switch s {
case UnknownBoolValue:
elem, unknown = resource.NewBoolProperty(false), true
case UnknownNumberValue:
elem, unknown = resource.NewNumberProperty(0), true
case UnknownStringValue:
elem, unknown = resource.NewStringProperty(""), true
case UnknownArrayValue:
elem, unknown = resource.NewArrayProperty([]resource.PropertyValue{}), true
case UnknownAssetValue:
elem, unknown = resource.NewAssetProperty(resource.Asset{}), true
case UnknownArchiveValue:
elem, unknown = resource.NewArchiveProperty(resource.Archive{}), true
case UnknownObjectValue:
elem, unknown = resource.NewObjectProperty(make(resource.PropertyMap)), true
}
if unknown {
comp := resource.Computed{Element: elem}
return resource.NewComputedProperty(comp), true
}
return resource.PropertyValue{}, false
}
// MarshalNull marshals a nil to its protobuf form.
func MarshalNull(opts MarshalOptions) *structpb.Value {
return &structpb.Value{
@ -222,7 +278,7 @@ func MarshalStruct(obj *structpb.Struct, opts MarshalOptions) *structpb.Value {
}
// MarshalAsset marshals an asset into its wire form for resource provider plugins.
func MarshalAsset(v resource.Asset, opts MarshalOptions) (*structpb.Value, bool) {
func MarshalAsset(v resource.Asset, opts MarshalOptions) *structpb.Value {
// To marshal an asset, we need to first serialize it, and then marshal that.
sera := v.Serialize()
serap := resource.NewPropertyMapFromMap(sera)
@ -230,7 +286,7 @@ func MarshalAsset(v resource.Asset, opts MarshalOptions) (*structpb.Value, bool)
}
// MarshalArchive marshals an archive into its wire form for resource provider plugins.
func MarshalArchive(v resource.Archive, opts MarshalOptions) (*structpb.Value, bool) {
func MarshalArchive(v resource.Archive, opts MarshalOptions) *structpb.Value {
// To marshal an archive, we need to first serialize it, and then marshal that.
sera := v.Serialize()
serap := resource.NewPropertyMapFromMap(sera)

View file

@ -14,7 +14,7 @@ func TestAssetSerialize(t *testing.T) {
// Ensure that asset and archive serialization round trips.
text := "a test asset"
asset := resource.NewTextAsset(text)
assetProps, _ := MarshalPropertyValue(resource.NewAssetProperty(asset), MarshalOptions{})
assetProps := MarshalPropertyValue(resource.NewAssetProperty(asset), MarshalOptions{})
assetValue := UnmarshalPropertyValue(assetProps, MarshalOptions{})
assert.True(t, assetValue.IsAsset())
assetDes := assetValue.AssetValue()
@ -22,7 +22,7 @@ func TestAssetSerialize(t *testing.T) {
assert.Equal(t, text, assetDes.Text)
arch := resource.NewAssetArchive(map[string]resource.Asset{"foo": asset})
archProps, _ := MarshalPropertyValue(resource.NewArchiveProperty(arch), MarshalOptions{})
archProps := MarshalPropertyValue(resource.NewArchiveProperty(arch), MarshalOptions{})
archValue := UnmarshalPropertyValue(archProps, MarshalOptions{})
assert.True(t, archValue.IsArchive())
archDes := archValue.ArchiveValue()

View file

@ -417,7 +417,7 @@ func (g *RPCGenerator) EmitResource(w *tools.GenWriter, module tokens.Module, pk
w.Writefmtln("func (p *%vProvider) Unmarshal(", name)
w.Writefmtln(" v *pbstruct.Struct) (*%v, resource.PropertyMap, error) {", name)
w.Writefmtln(" var obj %v", name)
w.Writefmtln(" props := plugin.UnmarshalProperties(v, plugin.MarshalOptions{RawResources: true})")
w.Writefmtln(" props := plugin.UnmarshalProperties(v, plugin.MarshalOptions{})")
w.Writefmtln(" return &obj, props, mapper.MapIU(props.Mappable(), &obj)")
w.Writefmtln("}")
w.Writefmtln("")

View file

@ -59,7 +59,6 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type AnalyzeRequest struct {
Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
Properties *google_protobuf.Struct `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"`
Unknowns map[string]bool `protobuf:"bytes,3,rep,name=unknowns" json:"unknowns,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
}
func (m *AnalyzeRequest) Reset() { *m = AnalyzeRequest{} }
@ -81,13 +80,6 @@ func (m *AnalyzeRequest) GetProperties() *google_protobuf.Struct {
return nil
}
func (m *AnalyzeRequest) GetUnknowns() map[string]bool {
if m != nil {
return m.Unknowns
}
return nil
}
type AnalyzeResponse struct {
Failures []*AnalyzeFailure `protobuf:"bytes,1,rep,name=failures" json:"failures,omitempty"`
}
@ -211,24 +203,20 @@ var _Analyzer_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("analyzer.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 301 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x90, 0xcf, 0x4a, 0xc3, 0x40,
0x10, 0xc6, 0x4d, 0xab, 0x6d, 0x3a, 0xc5, 0x2a, 0x83, 0xd8, 0x10, 0x3c, 0x94, 0x80, 0xd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c6, 0xe8, 0x4a, 0x0a, 0x4d, 0x38, 0x83, 0x78, 0x9d, 0x17,
0xa5, 0x55, 0xa4, 0x93, 0xc8, 0x21, 0x0d, 0x7f, 0x23, 0x2d, 0xbc, 0xce, 0x1b, 0x63, 0x76, 0xdf,
0x9c, 0x29, 0x68, 0x98, 0x42, 0x1c, 0xf6, 0xdc, 0xa1, 0x34, 0x3d, 0x9e, 0x43, 0x47, 0x51, 0xae,
0xa5, 0x70, 0x40, 0x3d, 0x1e, 0xba, 0xe9, 0x23, 0xc4, 0x21, 0x45, 0xe1, 0x1d, 0x74, 0x43, 0x8d,
0xc3, 0x7f, 0x4e, 0x92, 0x26, 0x7f, 0x05, 0xbf, 0x44, 0x76, 0xb0, 0xec, 0xb8, 0xb3, 0xcf, 0xbe,
0x02, 0x00, 0x00, 0xff, 0xff, 0x79, 0x53, 0x93, 0x15, 0xf9, 0x01, 0x00, 0x00,
// 238 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x64, 0x90, 0x31, 0x6b, 0xc3, 0x30,
0x10, 0x85, 0xeb, 0xb6, 0x24, 0xce, 0x15, 0x52, 0xb8, 0xa1, 0x35, 0xa6, 0x83, 0xf1, 0x94, 0x49,
0x81, 0x64, 0xe8, 0x56, 0x28, 0x94, 0x0c, 0x1d, 0xd5, 0xb9, 0x83, 0x13, 0x2e, 0xc1, 0xe0, 0x5a,
0xea, 0x49, 0x1a, 0xdc, 0x5f, 0x5f, 0x90, 0xae, 0xa2, 0xe0, 0xed, 0x4e, 0xef, 0xe9, 0xbb, 0x77,
0x07, 0xeb, 0x6e, 0xec, 0x86, 0xe9, 0x87, 0x58, 0x59, 0x36, 0xde, 0xe0, 0x72, 0x08, 0x5f, 0x3d,
0xdb, 0x53, 0xfd, 0x74, 0x31, 0xe6, 0x32, 0xd0, 0x36, 0x3e, 0x1f, 0xc3, 0x79, 0xeb, 0x3c, 0x87,
0x93, 0x4f, 0xb6, 0xf6, 0x13, 0xd6, 0xaf, 0xe9, 0xa3, 0xa6, 0xef, 0x40, 0xce, 0x23, 0xc2, 0xad,
0x9f, 0x2c, 0x55, 0x45, 0x53, 0x6c, 0x56, 0x3a, 0xd6, 0xf8, 0x0c, 0x60, 0xd9, 0x58, 0x62, 0xdf,
0x93, 0xab, 0xae, 0x9b, 0x62, 0x73, 0xb7, 0x7b, 0x54, 0x09, 0xac, 0xfe, 0xc0, 0xea, 0x23, 0x82,
0xf5, 0x3f, 0x6b, 0x7b, 0x80, 0xfb, 0x8c, 0x77, 0xd6, 0x8c, 0x8e, 0x70, 0x0f, 0xe5, 0xb9, 0xeb,
0x87, 0xc0, 0xe4, 0xaa, 0xa2, 0xb9, 0x89, 0x24, 0xc9, 0xaa, 0xc4, 0x7b, 0x48, 0xba, 0xce, 0xc6,
0xf6, 0x2d, 0xc7, 0x14, 0x0d, 0x6b, 0x28, 0x65, 0xce, 0x24, 0x51, 0x73, 0x8f, 0x0f, 0xb0, 0x60,
0xea, 0x9c, 0x19, 0x63, 0xd4, 0x95, 0x96, 0x6e, 0xf7, 0x0e, 0xa5, 0x50, 0x18, 0x5f, 0x60, 0x29,
0x35, 0xce, 0xe6, 0xcb, 0x29, 0xea, 0x6a, 0x2e, 0xa4, 0x25, 0xda, 0xab, 0xe3, 0x22, 0xae, 0xbd,
0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xab, 0xff, 0x20, 0x89, 0x78, 0x01, 0x00, 0x00,
}

View file

@ -23,7 +23,6 @@ var _ = math.Inf
type CheckRequest struct {
Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
Properties *google_protobuf.Struct `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"`
Unknowns map[string]bool `protobuf:"bytes,3,rep,name=unknowns" json:"unknowns,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
}
func (m *CheckRequest) Reset() { *m = CheckRequest{} }
@ -45,13 +44,6 @@ func (m *CheckRequest) GetProperties() *google_protobuf.Struct {
return nil
}
func (m *CheckRequest) GetUnknowns() map[string]bool {
if m != nil {
return m.Unknowns
}
return nil
}
type CheckResponse struct {
Failures []*CheckFailure `protobuf:"bytes,1,rep,name=failures" json:"failures,omitempty"`
}
@ -95,7 +87,6 @@ func (m *CheckFailure) GetReason() string {
type NameRequest struct {
Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
Properties *google_protobuf.Struct `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"`
Unknowns map[string]bool `protobuf:"bytes,3,rep,name=unknowns" json:"unknowns,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
}
func (m *NameRequest) Reset() { *m = NameRequest{} }
@ -117,13 +108,6 @@ func (m *NameRequest) GetProperties() *google_protobuf.Struct {
return nil
}
func (m *NameRequest) GetUnknowns() map[string]bool {
if m != nil {
return m.Unknowns
}
return nil
}
type NameResponse struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
@ -229,11 +213,10 @@ func (m *GetResponse) GetProperties() *google_protobuf.Struct {
}
type InspectChangeRequest struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"`
Olds *google_protobuf.Struct `protobuf:"bytes,3,opt,name=olds" json:"olds,omitempty"`
News *google_protobuf.Struct `protobuf:"bytes,4,opt,name=news" json:"news,omitempty"`
Unknowns map[string]bool `protobuf:"bytes,5,rep,name=unknowns" json:"unknowns,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"`
Olds *google_protobuf.Struct `protobuf:"bytes,3,opt,name=olds" json:"olds,omitempty"`
News *google_protobuf.Struct `protobuf:"bytes,4,opt,name=news" json:"news,omitempty"`
}
func (m *InspectChangeRequest) Reset() { *m = InspectChangeRequest{} }
@ -269,13 +252,6 @@ func (m *InspectChangeRequest) GetNews() *google_protobuf.Struct {
return nil
}
func (m *InspectChangeRequest) GetUnknowns() map[string]bool {
if m != nil {
return m.Unknowns
}
return nil
}
type InspectChangeResponse struct {
Replaces []string `protobuf:"bytes,1,rep,name=replaces" json:"replaces,omitempty"`
Changes *google_protobuf.Struct `protobuf:"bytes,2,opt,name=changes" json:"changes,omitempty"`
@ -698,45 +674,40 @@ var _ResourceProvider_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("provider.proto", fileDescriptor2) }
var fileDescriptor2 = []byte{
// 638 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xc4, 0x56, 0x5b, 0x6a, 0xdb, 0x40,
0x14, 0x8d, 0x24, 0xc7, 0x71, 0xae, 0x23, 0x13, 0xa6, 0x76, 0x62, 0xd4, 0x07, 0x61, 0xfa, 0x63,
0x08, 0x28, 0x8d, 0x4b, 0x69, 0x48, 0xa0, 0x85, 0xb8, 0x89, 0xc9, 0x4f, 0x09, 0x2a, 0xf9, 0x28,
0xf4, 0x47, 0x91, 0xaf, 0x1d, 0x61, 0x59, 0x52, 0x47, 0xa3, 0x04, 0x2f, 0xa2, 0x1b, 0xe8, 0x66,
0xba, 0x8c, 0xd2, 0xdd, 0x14, 0x8d, 0x46, 0x8a, 0x64, 0xbb, 0x79, 0xb4, 0x98, 0xfe, 0xcd, 0xdc,
0xe7, 0x39, 0x57, 0x47, 0x57, 0x82, 0x46, 0xc8, 0x82, 0x6b, 0x77, 0x80, 0xcc, 0x0c, 0x59, 0xc0,
0x03, 0xb2, 0xe6, 0xc5, 0x13, 0x97, 0x85, 0x8e, 0xf1, 0x74, 0x14, 0x04, 0x23, 0x0f, 0xf7, 0x84,
0xf9, 0x32, 0x1e, 0xee, 0xe1, 0x24, 0xe4, 0xd3, 0x34, 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x37, 0xed, 0xc1,
0xdd, 0xba, 0x3f, 0x34, 0xd8, 0xb4, 0x30, 0x0a, 0x62, 0xe6, 0xe0, 0xb9, 0xfc, 0x82, 0x91, 0x03,
0x58, 0x15, 0x7b, 0x95, 0xb4, 0x16, 0x7e, 0x10, 0x8c, 0xad, 0x59, 0x73, 0xca, 0x99, 0xae, 0x90,
0x37, 0x50, 0x49, 0x76, 0x0e, 0x69, 0x2e, 0x5a, 0x73, 0x46, 0x6b, 0xc6, 0x9a, 0xa7, 0x1d, 0x41,
0x35, 0x5d, 0x14, 0xa4, 0x50, 0xba, 0xb8, 0x97, 0x8c, 0xed, 0x39, 0x7b, 0x9e, 0xdc, 0x05, 0xad,
0x8f, 0x9c, 0x3c, 0xc9, 0x23, 0x6e, 0x17, 0x83, 0xd1, 0x2c, 0x1b, 0xf3, 0x9c, 0x73, 0xd0, 0x4b,
0x3a, 0x25, 0xcf, 0xef, 0x7c, 0x59, 0x8c, 0x17, 0x7f, 0x72, 0x17, 0x29, 0xa4, 0x0a, 0x28, 0x50,
0x28, 0x29, 0xb4, 0x40, 0xa1, 0x2c, 0x15, 0xba, 0x42, 0x0e, 0xa1, 0x9a, 0x3e, 0xf3, 0x42, 0x72,
0x49, 0x04, 0xc6, 0xd6, 0xdc, 0xc3, 0x3c, 0x49, 0x7e, 0x23, 0xe8, 0xca, 0x65, 0x55, 0x58, 0x5e,
0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x55, 0x4c, 0x3a, 0x81, 0x08, 0x00, 0x00,
// 551 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xc4, 0x55, 0x4d, 0x6f, 0xd3, 0x40,
0x10, 0xad, 0x93, 0x90, 0x26, 0x93, 0x26, 0x42, 0x4b, 0x92, 0x46, 0xe6, 0x43, 0xd1, 0x9e, 0x22,
0x21, 0xb9, 0x34, 0x08, 0x81, 0xe0, 0xd6, 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 0xdb, 0x3e, 0x4a, 0x96, 0x8a, 0x10,
0x4f, 0xcc, 0xfa, 0x24, 0xcf, 0xe0, 0x96, 0xde, 0x29, 0xa4, 0xb2, 0x7d, 0x8c, 0x22, 0x77, 0x58,
0x0d, 0x67, 0x9e, 0xe9, 0x16, 0x79, 0x02, 0x8d, 0xcd, 0x6b, 0x27, 0x7d, 0x8b, 0x28, 0x2c, 0x16,
0x77, 0x50, 0x89, 0xda, 0xb2, 0x17, 0xd0, 0xcc, 0x9e, 0x28, 0x29, 0x50, 0x17, 0x37, 0x82, 0xbb,
0x7b, 0x21, 0x6e, 0x8b, 0xa7, 0x50, 0x3f, 0x42, 0x45, 0xee, 0x58, 0xc4, 0xf9, 0x93, 0x74, 0xfb,
0xe5, 0xa0, 0xad, 0x39, 0x81, 0x6e, 0x69, 0x4e, 0xc9, 0x7d, 0x0b, 0xfc, 0xd5, 0xab, 0x72, 0x1f,
0xfc, 0x2e, 0x5d, 0xb4, 0x90, 0x4d, 0x40, 0xc1, 0x42, 0x69, 0x42, 0x0b, 0x16, 0xca, 0xa3, 0x42,
0xb7, 0xc8, 0x73, 0x68, 0x66, 0x77, 0x5e, 0x28, 0x2e, 0x0d, 0x81, 0x3b, 0xbc, 0x70, 0x99, 0xaf,
0x36, 0xff, 0x61, 0x74, 0xeb, 0xb4, 0xa9, 0x23, 0x8f, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0x06,
0xa6, 0xdc, 0x71, 0xfe, 0x06, 0x00, 0x00,
}

View file

@ -60,8 +60,7 @@ proto.lumirpc.AnalyzeRequest.prototype.toObject = function(opt_includeInstance)
proto.lumirpc.AnalyzeRequest.toObject = function(includeInstance, msg) {
var f, obj = {
type: jspb.Message.getFieldWithDefault(msg, 1, ""),
properties: (f = msg.getProperties()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
unknownsMap: (f = msg.getUnknownsMap()) ? f.toObject(includeInstance, undefined) : []
properties: (f = msg.getProperties()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f)
};
if (includeInstance) {
@ -107,12 +106,6 @@ proto.lumirpc.AnalyzeRequest.deserializeBinaryFromReader = function(msg, reader)
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
msg.setProperties(value);
break;
case 3:
var value = msg.getUnknownsMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBool);
});
break;
default:
reader.skipField();
break;
@ -156,10 +149,6 @@ proto.lumirpc.AnalyzeRequest.serializeBinaryToWriter = function(message, writer)
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
);
}
f = message.getUnknownsMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeBool);
}
};
@ -208,24 +197,6 @@ proto.lumirpc.AnalyzeRequest.prototype.hasProperties = function() {
};
/**
* map<string, bool> unknowns = 3;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,boolean>}
*/
proto.lumirpc.AnalyzeRequest.prototype.getUnknownsMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,boolean>} */ (
jspb.Message.getMapField(this, 3, opt_noLazyCreate,
null));
};
proto.lumirpc.AnalyzeRequest.prototype.clearUnknownsMap = function() {
this.getUnknownsMap().clear();
};
/**
* Generated by JsPbCodeGenerator.

View file

@ -72,8 +72,7 @@ proto.lumirpc.CheckRequest.prototype.toObject = function(opt_includeInstance) {
proto.lumirpc.CheckRequest.toObject = function(includeInstance, msg) {
var f, obj = {
type: jspb.Message.getFieldWithDefault(msg, 1, ""),
properties: (f = msg.getProperties()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
unknownsMap: (f = msg.getUnknownsMap()) ? f.toObject(includeInstance, undefined) : []
properties: (f = msg.getProperties()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f)
};
if (includeInstance) {
@ -119,12 +118,6 @@ proto.lumirpc.CheckRequest.deserializeBinaryFromReader = function(msg, reader) {
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
msg.setProperties(value);
break;
case 3:
var value = msg.getUnknownsMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBool);
});
break;
default:
reader.skipField();
break;
@ -168,10 +161,6 @@ proto.lumirpc.CheckRequest.serializeBinaryToWriter = function(message, writer) {
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
);
}
f = message.getUnknownsMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeBool);
}
};
@ -220,24 +209,6 @@ proto.lumirpc.CheckRequest.prototype.hasProperties = function() {
};
/**
* map<string, bool> unknowns = 3;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,boolean>}
*/
proto.lumirpc.CheckRequest.prototype.getUnknownsMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,boolean>} */ (
jspb.Message.getMapField(this, 3, opt_noLazyCreate,
null));
};
proto.lumirpc.CheckRequest.prototype.clearUnknownsMap = function() {
this.getUnknownsMap().clear();
};
/**
* Generated by JsPbCodeGenerator.
@ -620,8 +591,7 @@ proto.lumirpc.NameRequest.prototype.toObject = function(opt_includeInstance) {
proto.lumirpc.NameRequest.toObject = function(includeInstance, msg) {
var f, obj = {
type: jspb.Message.getFieldWithDefault(msg, 1, ""),
properties: (f = msg.getProperties()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
unknownsMap: (f = msg.getUnknownsMap()) ? f.toObject(includeInstance, undefined) : []
properties: (f = msg.getProperties()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f)
};
if (includeInstance) {
@ -667,12 +637,6 @@ proto.lumirpc.NameRequest.deserializeBinaryFromReader = function(msg, reader) {
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
msg.setProperties(value);
break;
case 3:
var value = msg.getUnknownsMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBool);
});
break;
default:
reader.skipField();
break;
@ -716,10 +680,6 @@ proto.lumirpc.NameRequest.serializeBinaryToWriter = function(message, writer) {
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
);
}
f = message.getUnknownsMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeBool);
}
};
@ -768,24 +728,6 @@ proto.lumirpc.NameRequest.prototype.hasProperties = function() {
};
/**
* map<string, bool> unknowns = 3;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,boolean>}
*/
proto.lumirpc.NameRequest.prototype.getUnknownsMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,boolean>} */ (
jspb.Message.getMapField(this, 3, opt_noLazyCreate,
null));
};
proto.lumirpc.NameRequest.prototype.clearUnknownsMap = function() {
this.getUnknownsMap().clear();
};
/**
* Generated by JsPbCodeGenerator.
@ -1667,8 +1609,7 @@ proto.lumirpc.InspectChangeRequest.toObject = function(includeInstance, msg) {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
type: jspb.Message.getFieldWithDefault(msg, 2, ""),
olds: (f = msg.getOlds()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
news: (f = msg.getNews()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
unknownsMap: (f = msg.getUnknownsMap()) ? f.toObject(includeInstance, undefined) : []
news: (f = msg.getNews()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f)
};
if (includeInstance) {
@ -1723,12 +1664,6 @@ proto.lumirpc.InspectChangeRequest.deserializeBinaryFromReader = function(msg, r
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
msg.setNews(value);
break;
case 5:
var value = msg.getUnknownsMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBool);
});
break;
default:
reader.skipField();
break;
@ -1787,10 +1722,6 @@ proto.lumirpc.InspectChangeRequest.serializeBinaryToWriter = function(message, w
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
);
}
f = message.getUnknownsMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeBool);
}
};
@ -1884,24 +1815,6 @@ proto.lumirpc.InspectChangeRequest.prototype.hasNews = function() {
};
/**
* map<string, bool> unknowns = 5;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,boolean>}
*/
proto.lumirpc.InspectChangeRequest.prototype.getUnknownsMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,boolean>} */ (
jspb.Message.getMapField(this, 5, opt_noLazyCreate,
null));
};
proto.lumirpc.InspectChangeRequest.prototype.clearUnknownsMap = function() {
this.getUnknownsMap().clear();
};
/**
* Generated by JsPbCodeGenerator.

View file

@ -16,7 +16,6 @@ service Analyzer {
message AnalyzeRequest {
string type = 1; // the type token of the resource.
google.protobuf.Struct properties = 2; // the full properties to use for validation.
map<string, bool> unknowns = 3; // the optional set of properties whose values are unknown.
}
message AnalyzeResponse {

View file

@ -32,7 +32,6 @@ service ResourceProvider {
message CheckRequest {
string type = 1; // the type token of the resource.
google.protobuf.Struct properties = 2; // the full properties to use for validation.
map<string, bool> unknowns = 3; // the optional set of properties whose values are unknown.
}
message CheckResponse {
@ -47,7 +46,6 @@ message CheckFailure {
message NameRequest {
string type = 1; // the type token of the resource.
google.protobuf.Struct properties = 2; // the full properties to use for name creation.
map<string, bool> unknowns = 3; // the optional set of properties whose values are unknown.
}
message NameResponse {
@ -78,7 +76,6 @@ message InspectChangeRequest {
string type = 2; // the type token of the resource to inspect.
google.protobuf.Struct olds = 3; // the old values of properties to inspect.
google.protobuf.Struct news = 4; // the new values of properties to inspect.
map<string, bool> unknowns = 5; // the optional set of properties whose values are unknown.
}
message InspectChangeResponse {