These changes restore a more-correct version of the behavior that was disabled with #3014. The original implementation of this behavior was done in the SDKs, which do not have access to the complete inputs for a resource (in particular, default values filled in by the provider during `Check` are not exposed to the SDK). This lack of information meant that the resolved output values could disagree with the typings present in a provider SDK. Exacerbating this problem was the fact that unknown values were dropped entirely, causing `undefined` values to appear in unexpected places. By doing this in the engine and allowing unknown values to be represented in a first-class manner in the SDK, we can attack both of these issues. Although this behavior is not _strictly_ consistent with respect to the resource model--in an update, a resource's output properties will come from its provider and may differ from its input properties--this behavior was present in the product for a fairly long time without significant issues. In the future, we may be able to improve the accuracy of resource outputs during a preview by allowing the provider to dry-run CRUD operations and return partially-known values where possible. These changes also introduce new APIs in the Node and Python SDKs that work with unknown values in a first-class fashion: - A new parameter to the `apply` function that indicates that the callback should be run even if the result of the apply contains unknown values - `containsUnknowns` and `isUnknown`, which return true if a value either contains nested unknown values or is exactly an unknown value - The `Unknown` type, which represents unknown values The primary use case for these APIs is to allow nested, properties with known values to be accessed via the lifted property accessor even when the containing property is not fully know. A common example of this pattern is the `metadata.name` property of a Kubernetes `Namespace` object: while other properties of the `metadata` bag may be unknown, `name` is often known. These APIs allow `ns.metadata.name` to return a known value in this case. In order to avoid exposing downlevel SDKs to unknown values--a change which could break user code by exposing it to unexpected values--a language SDK must indicate whether or not it supports first-class unknown values as part of each `RegisterResourceRequest`. These changes also allow us to avoid breaking user code with the new behavior introduced by the prior commit. Fixes #3190.
141 lines
5 KiB
Go
141 lines
5 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: plugin.proto
|
|
|
|
package pulumirpc
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
// PluginInfo is meta-information about a plugin that is used by the system.
|
|
type PluginInfo struct {
|
|
Version string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PluginInfo) Reset() { *m = PluginInfo{} }
|
|
func (m *PluginInfo) String() string { return proto.CompactTextString(m) }
|
|
func (*PluginInfo) ProtoMessage() {}
|
|
func (*PluginInfo) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_plugin_672c97695d141058, []int{0}
|
|
}
|
|
func (m *PluginInfo) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_PluginInfo.Unmarshal(m, b)
|
|
}
|
|
func (m *PluginInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_PluginInfo.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *PluginInfo) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PluginInfo.Merge(dst, src)
|
|
}
|
|
func (m *PluginInfo) XXX_Size() int {
|
|
return xxx_messageInfo_PluginInfo.Size(m)
|
|
}
|
|
func (m *PluginInfo) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PluginInfo.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PluginInfo proto.InternalMessageInfo
|
|
|
|
func (m *PluginInfo) GetVersion() string {
|
|
if m != nil {
|
|
return m.Version
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// PluginDependency is information about a plugin that a program may depend upon.
|
|
type PluginDependency struct {
|
|
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
|
|
Kind string `protobuf:"bytes,2,opt,name=kind" json:"kind,omitempty"`
|
|
Version string `protobuf:"bytes,3,opt,name=version" json:"version,omitempty"`
|
|
Server string `protobuf:"bytes,4,opt,name=server" json:"server,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PluginDependency) Reset() { *m = PluginDependency{} }
|
|
func (m *PluginDependency) String() string { return proto.CompactTextString(m) }
|
|
func (*PluginDependency) ProtoMessage() {}
|
|
func (*PluginDependency) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_plugin_672c97695d141058, []int{1}
|
|
}
|
|
func (m *PluginDependency) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_PluginDependency.Unmarshal(m, b)
|
|
}
|
|
func (m *PluginDependency) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_PluginDependency.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *PluginDependency) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PluginDependency.Merge(dst, src)
|
|
}
|
|
func (m *PluginDependency) XXX_Size() int {
|
|
return xxx_messageInfo_PluginDependency.Size(m)
|
|
}
|
|
func (m *PluginDependency) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PluginDependency.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PluginDependency proto.InternalMessageInfo
|
|
|
|
func (m *PluginDependency) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *PluginDependency) GetKind() string {
|
|
if m != nil {
|
|
return m.Kind
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *PluginDependency) GetVersion() string {
|
|
if m != nil {
|
|
return m.Version
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *PluginDependency) GetServer() string {
|
|
if m != nil {
|
|
return m.Server
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*PluginInfo)(nil), "pulumirpc.PluginInfo")
|
|
proto.RegisterType((*PluginDependency)(nil), "pulumirpc.PluginDependency")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("plugin.proto", fileDescriptor_plugin_672c97695d141058) }
|
|
|
|
var fileDescriptor_plugin_672c97695d141058 = []byte{
|
|
// 144 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0xc8, 0x29, 0x4d,
|
|
0xcf, 0xcc, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x2c, 0x28, 0xcd, 0x29, 0xcd, 0xcd,
|
|
0x2c, 0x2a, 0x48, 0x56, 0x52, 0xe3, 0xe2, 0x0a, 0x00, 0x4b, 0x79, 0xe6, 0xa5, 0xe5, 0x0b, 0x49,
|
|
0x70, 0xb1, 0x97, 0xa5, 0x16, 0x15, 0x67, 0xe6, 0xe7, 0x49, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06,
|
|
0xc1, 0xb8, 0x4a, 0x39, 0x5c, 0x02, 0x10, 0x75, 0x2e, 0xa9, 0x05, 0xa9, 0x79, 0x29, 0xa9, 0x79,
|
|
0xc9, 0x95, 0x42, 0x42, 0x5c, 0x2c, 0x79, 0x89, 0xb9, 0xa9, 0x50, 0xa5, 0x60, 0x36, 0x48, 0x2c,
|
|
0x3b, 0x33, 0x2f, 0x45, 0x82, 0x09, 0x22, 0x06, 0x62, 0x23, 0x9b, 0xca, 0x8c, 0x62, 0xaa, 0x90,
|
|
0x18, 0x17, 0x5b, 0x71, 0x6a, 0x11, 0x90, 0x27, 0xc1, 0x02, 0x96, 0x80, 0xf2, 0x92, 0xd8, 0xc0,
|
|
0xee, 0x34, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x6a, 0x82, 0x41, 0xb7, 0x00, 0x00, 0x00,
|
|
}
|