6e5c4a38d8
Thse changes make a subtle but critical adjustment to the process the Pulumi engine uses to determine whether or not a difference exists between a resource's actual and desired states, and adjusts the way this difference is calculated and displayed accordingly. Today, the Pulumi engine get the first chance to decide whether or not there is a difference between a resource's actual and desired states. It does this by comparing the current set of inputs for a resource (i.e. the inputs from the running Pulumi program) with the last set of inputs used to update the resource. If there is no difference between the old and new inputs, the engine decides that no change is necessary without consulting the resource's provider. Only if there are changes does the engine consult the resource's provider for more information about the difference. This can be problematic for a number of reasons: - Not all providers do input-input comparison; some do input-state comparison - Not all providers are able to update the last deployed set of inputs when performing a refresh - Some providers--either intentionally or due to bugs--may see changes in resources whose inputs have not changed All of these situations are confusing at the very least, and the first is problematic with respect to correctness. Furthermore, the display code only renders diffs it observes rather than rendering the diffs observed by the provider, which can obscure the actual changes detected at runtime. These changes address both of these issues: - Rather than comparing the current inputs against the last inputs before calling a resource provider's Diff function, the engine calls the Diff function in all cases. - Providers may now return a list of properties that differ between the requested and actual state and the way in which they differ. This information will then be used by the CLI to render the diff appropriately. A provider may also indicate that a particular diff is between old and new inputs rather than old state and new inputs. Fixes #2453.
369 lines
14 KiB
Go
369 lines
14 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: analyzer.proto
|
|
|
|
package pulumirpc
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
import empty "github.com/golang/protobuf/ptypes/empty"
|
|
import _struct "github.com/golang/protobuf/ptypes/struct"
|
|
|
|
import (
|
|
context "golang.org/x/net/context"
|
|
grpc "google.golang.org/grpc"
|
|
)
|
|
|
|
// 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
|
|
|
|
// EnforcementLevel indicates the severity of a policy violation.
|
|
type AnalyzeDiagnostic_LogSeverity int32
|
|
|
|
const (
|
|
AnalyzeDiagnostic_WARNING AnalyzeDiagnostic_LogSeverity = 0
|
|
AnalyzeDiagnostic_MANDATORY AnalyzeDiagnostic_LogSeverity = 2
|
|
)
|
|
|
|
var AnalyzeDiagnostic_LogSeverity_name = map[int32]string{
|
|
0: "WARNING",
|
|
2: "MANDATORY",
|
|
}
|
|
var AnalyzeDiagnostic_LogSeverity_value = map[string]int32{
|
|
"WARNING": 0,
|
|
"MANDATORY": 2,
|
|
}
|
|
|
|
func (x AnalyzeDiagnostic_LogSeverity) String() string {
|
|
return proto.EnumName(AnalyzeDiagnostic_LogSeverity_name, int32(x))
|
|
}
|
|
func (AnalyzeDiagnostic_LogSeverity) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_analyzer_77d426fa6070e0b3, []int{2, 0}
|
|
}
|
|
|
|
type AnalyzeRequest struct {
|
|
Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
|
|
Properties *_struct.Struct `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *AnalyzeRequest) Reset() { *m = AnalyzeRequest{} }
|
|
func (m *AnalyzeRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*AnalyzeRequest) ProtoMessage() {}
|
|
func (*AnalyzeRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_analyzer_77d426fa6070e0b3, []int{0}
|
|
}
|
|
func (m *AnalyzeRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_AnalyzeRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *AnalyzeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_AnalyzeRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *AnalyzeRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AnalyzeRequest.Merge(dst, src)
|
|
}
|
|
func (m *AnalyzeRequest) XXX_Size() int {
|
|
return xxx_messageInfo_AnalyzeRequest.Size(m)
|
|
}
|
|
func (m *AnalyzeRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AnalyzeRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AnalyzeRequest proto.InternalMessageInfo
|
|
|
|
func (m *AnalyzeRequest) GetType() string {
|
|
if m != nil {
|
|
return m.Type
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AnalyzeRequest) GetProperties() *_struct.Struct {
|
|
if m != nil {
|
|
return m.Properties
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type AnalyzeResponse struct {
|
|
Diagnostics []*AnalyzeDiagnostic `protobuf:"bytes,2,rep,name=diagnostics" json:"diagnostics,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *AnalyzeResponse) Reset() { *m = AnalyzeResponse{} }
|
|
func (m *AnalyzeResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*AnalyzeResponse) ProtoMessage() {}
|
|
func (*AnalyzeResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_analyzer_77d426fa6070e0b3, []int{1}
|
|
}
|
|
func (m *AnalyzeResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_AnalyzeResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *AnalyzeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_AnalyzeResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *AnalyzeResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AnalyzeResponse.Merge(dst, src)
|
|
}
|
|
func (m *AnalyzeResponse) XXX_Size() int {
|
|
return xxx_messageInfo_AnalyzeResponse.Size(m)
|
|
}
|
|
func (m *AnalyzeResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AnalyzeResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AnalyzeResponse proto.InternalMessageInfo
|
|
|
|
func (m *AnalyzeResponse) GetDiagnostics() []*AnalyzeDiagnostic {
|
|
if m != nil {
|
|
return m.Diagnostics
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type AnalyzeDiagnostic struct {
|
|
PolicyName string `protobuf:"bytes,1,opt,name=policyName" json:"policyName,omitempty"`
|
|
PolicyPackName string `protobuf:"bytes,2,opt,name=policyPackName" json:"policyPackName,omitempty"`
|
|
PolicyPackVersion string `protobuf:"bytes,3,opt,name=policyPackVersion" json:"policyPackVersion,omitempty"`
|
|
Description string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"`
|
|
Message string `protobuf:"bytes,5,opt,name=message" json:"message,omitempty"`
|
|
Tags []string `protobuf:"bytes,6,rep,name=tags" json:"tags,omitempty"`
|
|
EnforcementLevel AnalyzeDiagnostic_LogSeverity `protobuf:"varint,7,opt,name=enforcementLevel,enum=pulumirpc.AnalyzeDiagnostic_LogSeverity" json:"enforcementLevel,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *AnalyzeDiagnostic) Reset() { *m = AnalyzeDiagnostic{} }
|
|
func (m *AnalyzeDiagnostic) String() string { return proto.CompactTextString(m) }
|
|
func (*AnalyzeDiagnostic) ProtoMessage() {}
|
|
func (*AnalyzeDiagnostic) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_analyzer_77d426fa6070e0b3, []int{2}
|
|
}
|
|
func (m *AnalyzeDiagnostic) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_AnalyzeDiagnostic.Unmarshal(m, b)
|
|
}
|
|
func (m *AnalyzeDiagnostic) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_AnalyzeDiagnostic.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *AnalyzeDiagnostic) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AnalyzeDiagnostic.Merge(dst, src)
|
|
}
|
|
func (m *AnalyzeDiagnostic) XXX_Size() int {
|
|
return xxx_messageInfo_AnalyzeDiagnostic.Size(m)
|
|
}
|
|
func (m *AnalyzeDiagnostic) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AnalyzeDiagnostic.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AnalyzeDiagnostic proto.InternalMessageInfo
|
|
|
|
func (m *AnalyzeDiagnostic) GetPolicyName() string {
|
|
if m != nil {
|
|
return m.PolicyName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AnalyzeDiagnostic) GetPolicyPackName() string {
|
|
if m != nil {
|
|
return m.PolicyPackName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AnalyzeDiagnostic) GetPolicyPackVersion() string {
|
|
if m != nil {
|
|
return m.PolicyPackVersion
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AnalyzeDiagnostic) GetDescription() string {
|
|
if m != nil {
|
|
return m.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AnalyzeDiagnostic) GetMessage() string {
|
|
if m != nil {
|
|
return m.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AnalyzeDiagnostic) GetTags() []string {
|
|
if m != nil {
|
|
return m.Tags
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *AnalyzeDiagnostic) GetEnforcementLevel() AnalyzeDiagnostic_LogSeverity {
|
|
if m != nil {
|
|
return m.EnforcementLevel
|
|
}
|
|
return AnalyzeDiagnostic_WARNING
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*AnalyzeRequest)(nil), "pulumirpc.AnalyzeRequest")
|
|
proto.RegisterType((*AnalyzeResponse)(nil), "pulumirpc.AnalyzeResponse")
|
|
proto.RegisterType((*AnalyzeDiagnostic)(nil), "pulumirpc.AnalyzeDiagnostic")
|
|
proto.RegisterEnum("pulumirpc.AnalyzeDiagnostic_LogSeverity", AnalyzeDiagnostic_LogSeverity_name, AnalyzeDiagnostic_LogSeverity_value)
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// Client API for Analyzer service
|
|
|
|
type AnalyzerClient interface {
|
|
// Analyze analyzes a single resource object, and returns any errors that it finds.
|
|
Analyze(ctx context.Context, in *AnalyzeRequest, opts ...grpc.CallOption) (*AnalyzeResponse, error)
|
|
// GetPluginInfo returns generic information about this plugin, like its version.
|
|
GetPluginInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginInfo, error)
|
|
}
|
|
|
|
type analyzerClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewAnalyzerClient(cc *grpc.ClientConn) AnalyzerClient {
|
|
return &analyzerClient{cc}
|
|
}
|
|
|
|
func (c *analyzerClient) Analyze(ctx context.Context, in *AnalyzeRequest, opts ...grpc.CallOption) (*AnalyzeResponse, error) {
|
|
out := new(AnalyzeResponse)
|
|
err := grpc.Invoke(ctx, "/pulumirpc.Analyzer/Analyze", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *analyzerClient) GetPluginInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginInfo, error) {
|
|
out := new(PluginInfo)
|
|
err := grpc.Invoke(ctx, "/pulumirpc.Analyzer/GetPluginInfo", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// Server API for Analyzer service
|
|
|
|
type AnalyzerServer interface {
|
|
// Analyze analyzes a single resource object, and returns any errors that it finds.
|
|
Analyze(context.Context, *AnalyzeRequest) (*AnalyzeResponse, error)
|
|
// GetPluginInfo returns generic information about this plugin, like its version.
|
|
GetPluginInfo(context.Context, *empty.Empty) (*PluginInfo, error)
|
|
}
|
|
|
|
func RegisterAnalyzerServer(s *grpc.Server, srv AnalyzerServer) {
|
|
s.RegisterService(&_Analyzer_serviceDesc, srv)
|
|
}
|
|
|
|
func _Analyzer_Analyze_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AnalyzeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AnalyzerServer).Analyze(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.Analyzer/Analyze",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AnalyzerServer).Analyze(ctx, req.(*AnalyzeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Analyzer_GetPluginInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(empty.Empty)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AnalyzerServer).GetPluginInfo(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.Analyzer/GetPluginInfo",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AnalyzerServer).GetPluginInfo(ctx, req.(*empty.Empty))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _Analyzer_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "pulumirpc.Analyzer",
|
|
HandlerType: (*AnalyzerServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Analyze",
|
|
Handler: _Analyzer_Analyze_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetPluginInfo",
|
|
Handler: _Analyzer_GetPluginInfo_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "analyzer.proto",
|
|
}
|
|
|
|
func init() { proto.RegisterFile("analyzer.proto", fileDescriptor_analyzer_77d426fa6070e0b3) }
|
|
|
|
var fileDescriptor_analyzer_77d426fa6070e0b3 = []byte{
|
|
// 428 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x92, 0x51, 0x6b, 0xd4, 0x40,
|
|
0x10, 0xc7, 0xef, 0xae, 0xb5, 0xe7, 0x4d, 0x6c, 0xbc, 0x0e, 0xa8, 0x31, 0x16, 0x29, 0x79, 0x90,
|
|
0x0a, 0x92, 0xc2, 0xf9, 0xe0, 0x9b, 0x18, 0xa9, 0x94, 0x42, 0x8d, 0x35, 0x2d, 0x8a, 0x0f, 0x3e,
|
|
0xa4, 0x71, 0x1a, 0x16, 0x93, 0xec, 0xba, 0xbb, 0x11, 0xe2, 0xa7, 0xf0, 0xf3, 0xf9, 0x69, 0xdc,
|
|
0x6c, 0x72, 0xd7, 0xd0, 0x88, 0x6f, 0x33, 0xf3, 0xff, 0xcd, 0x3f, 0xb3, 0x93, 0x01, 0x37, 0xad,
|
|
0xd2, 0xa2, 0xf9, 0x45, 0x32, 0x14, 0x92, 0x6b, 0x8e, 0x0b, 0x51, 0x17, 0x75, 0xc9, 0xa4, 0xc8,
|
|
0xfc, 0x7b, 0xa2, 0xa8, 0x73, 0x56, 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