From c9ba17d450f3717e006d7ce0be7736c4f0486447 Mon Sep 17 00:00:00 2001 From: Fraser Waters Date: Tue, 19 Apr 2022 12:41:18 +0100 Subject: [PATCH] Allow attaching to running providers (#8979) * Add Attach call * Regenerate grpc * Start plumbing in changes * Main doens't need a port * Split Attach into grpc interface * Change envvar format * Type test for attach * lint * Reformat python * Implement provider debug for nodejs * Fix plugin close * lint * Add to CHANGELOG * Set Kill Co-authored-by: Daniel Bradley --- CHANGELOG_PENDING.md | 3 + pkg/resource/provider/component_provider.go | 11 + pkg/resource/provider/main.go | 13 +- sdk/go/common/resource/plugin/plugin.go | 111 +++---- sdk/go/common/resource/plugin/provider.go | 9 + .../common/resource/plugin/provider_plugin.go | 93 ++++-- .../common/resource/plugin/provider_server.go | 14 + sdk/nodejs/proto/plugin_pb.js | 152 ++++++++++ sdk/nodejs/proto/provider_grpc_pb.js | 23 ++ sdk/nodejs/provider/server.ts | 31 +- sdk/proto/go/plugin.pb.go | 54 +++- sdk/proto/go/provider.pb.go | 285 ++++++++++-------- sdk/proto/plugin.proto | 9 + sdk/proto/provider.proto | 3 + .../lib/pulumi/runtime/proto/plugin_pb2.py | 53 +++- .../lib/pulumi/runtime/proto/provider_pb2.py | 13 +- .../pulumi/runtime/proto/provider_pb2_grpc.py | 16 + .../testcomponent-go/main.go | 4 + .../testcomponent-go/main.go | 4 + .../testcomponent-go/main.go | 4 + tests/testprovider/main.go | 4 + 21 files changed, 695 insertions(+), 214 deletions(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index d34802a51177..7c1e7d3aabba 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -3,6 +3,9 @@ - [cli] Split invoke request protobufs, as monitors and providers take different arguments. [#9323](https://github.com/pulumi/pulumi/pull/9323) +- [providers] - gRPC providers can now support an Attach method for debugging. The engine will attach to providers listed in the PULUMI_DEBUG_PROVIDERS environment variable. This should be of the form "providerName:port,otherProvider:port". + [#8979](https://github.com/pulumi/pulumi/pull/8979) + ### Bug Fixes - [cli/plugin] - Dynamic provider binaries will now be found even if pulumi/bin is not on $PATH. diff --git a/pkg/resource/provider/component_provider.go b/pkg/resource/provider/component_provider.go index 5bbe3575ce18..d1da060e578f 100644 --- a/pkg/resource/provider/component_provider.go +++ b/pkg/resource/provider/component_provider.go @@ -200,3 +200,14 @@ func (p *componentProvider) Call(ctx context.Context, func (p *componentProvider) Cancel(context.Context, *pbempty.Empty) (*pbempty.Empty, error) { return &pbempty.Empty{}, nil } + +// Attach attaches to the engine for an already running provider. +func (p *componentProvider) Attach(ctx context.Context, + req *pulumirpc.PluginAttach) (*pbempty.Empty, error) { + host, err := NewHostClient(req.GetAddress()) + if err != nil { + return nil, err + } + p.host = host + return &pbempty.Empty{}, nil +} diff --git a/pkg/resource/provider/main.go b/pkg/resource/provider/main.go index 1b8b7ba66e7c..ea8ece21bf2e 100644 --- a/pkg/resource/provider/main.go +++ b/pkg/resource/provider/main.go @@ -43,13 +43,18 @@ func Main(name string, provMaker func(*HostClient) (pulumirpc.ResourceProviderSe // Read the non-flags args and connect to the engine. args := flag.Args() + var host *HostClient if len(args) == 0 { + // Start the provider in Attach mode + } else if len(args) == 1 { + var err error + host, err = NewHostClient(args[0]) + if err != nil { + return fmt.Errorf("fatal: could not connect to host RPC: %v", err) + } + } else { return errors.New("fatal: could not connect to host RPC; missing argument") } - host, err := NewHostClient(args[0]) - if err != nil { - return fmt.Errorf("fatal: could not connect to host RPC: %v", err) - } // Fire up a gRPC server, letting the kernel choose a free port for us. port, done, err := rpcutil.Serve(0, nil, []func(*grpc.Server) error{ diff --git a/sdk/go/common/resource/plugin/plugin.go b/sdk/go/common/resource/plugin/plugin.go index fb787a5b6466..f36de307f4cc 100644 --- a/sdk/go/common/resource/plugin/plugin.go +++ b/sdk/go/common/resource/plugin/plugin.go @@ -115,6 +115,63 @@ var errRunPolicyModuleNotFound = errors.New("pulumi SDK does not support policy // errPluginNotFound is returned when we try to execute a plugin but it is not found on disk. var errPluginNotFound = errors.New("plugin not found") +func dialPlugin(port, bin, prefix string) (*grpc.ClientConn, error) { + // Now that we have the port, go ahead and create a gRPC client connection to it. + conn, err := grpc.Dial( + "127.0.0.1:"+port, + grpc.WithInsecure(), + grpc.WithUnaryInterceptor(rpcutil.OpenTracingClientInterceptor()), + rpcutil.GrpcChannelOptions(), + ) + if err != nil { + return nil, errors.Wrapf(err, "could not dial plugin [%v] over RPC", bin) + } + + // Now wait for the gRPC connection to the plugin to become ready. + // TODO[pulumi/pulumi#337]: in theory, this should be unnecessary. gRPC's default WaitForReady behavior + // should auto-retry appropriately. On Linux, however, we are observing different behavior. In the meantime + // while this bug exists, we'll simply do a bit of waiting of our own up front. + timeout, _ := context.WithTimeout(context.Background(), pluginRPCConnectionTimeout) + for { + s := conn.GetState() + if s == connectivity.Ready { + // The connection is supposedly ready; but we will make sure it is *actually* ready by sending a dummy + // method invocation to the server. Until it responds successfully, we can't safely proceed. + outer: + for { + err = grpc.Invoke(timeout, "", nil, nil, conn) + if err == nil { + break // successful connect + } else { + // We have an error; see if it's a known status and, if so, react appropriately. + status, ok := status.FromError(err) + if ok { + switch status.Code() { + case codes.Unavailable: + // The server is unavailable. This is the Linux bug. Wait a little and retry. + time.Sleep(time.Millisecond * 10) + continue // keep retrying + default: + // Since we sent "" as the method above, this is the expected response. Ready to go. + break outer + } + } + + // Unexpected error; get outta dodge. + return nil, errors.Wrapf(err, "%v plugin [%v] did not come alive", prefix, bin) + } + } + break + } + // Not ready yet; ask the gRPC client APIs to block until the state transitions again so we can retry. + if !conn.WaitForStateChange(timeout, s) { + return nil, errors.Errorf("%v plugin [%v] did not begin responding to RPC connections", prefix, bin) + } + } + + return conn, nil +} + func newPlugin(ctx *Context, pwd, bin, prefix string, args, env []string, options ...otgrpc.Option) (*plugin, error) { if logging.V(9) { var argstr string @@ -225,57 +282,9 @@ func newPlugin(ctx *Context, pwd, bin, prefix string, args, env []string, option plug.stdoutDone = stdoutDone go runtrace(plug.Stdout, false, stdoutDone) - // Now that we have the port, go ahead and create a gRPC client connection to it. - conn, err := grpc.Dial( - "127.0.0.1:"+port, - grpc.WithInsecure(), - grpc.WithUnaryInterceptor(rpcutil.OpenTracingClientInterceptor()), - rpcutil.GrpcChannelOptions(), - ) + conn, err := dialPlugin(port, bin, prefix) if err != nil { - return nil, errors.Wrapf(err, "could not dial plugin [%v] over RPC", bin) - } - - // Now wait for the gRPC connection to the plugin to become ready. - // TODO[pulumi/pulumi#337]: in theory, this should be unnecessary. gRPC's default WaitForReady behavior - // should auto-retry appropriately. On Linux, however, we are observing different behavior. In the meantime - // while this bug exists, we'll simply do a bit of waiting of our own up front. - timeout, _ := context.WithTimeout(context.Background(), pluginRPCConnectionTimeout) - for { - s := conn.GetState() - if s == connectivity.Ready { - // The connection is supposedly ready; but we will make sure it is *actually* ready by sending a dummy - // method invocation to the server. Until it responds successfully, we can't safely proceed. - outer: - for { - err = grpc.Invoke(timeout, "", nil, nil, conn) - if err == nil { - break // successful connect - } else { - // We have an error; see if it's a known status and, if so, react appropriately. - status, ok := status.FromError(err) - if ok { - switch status.Code() { - case codes.Unavailable: - // The server is unavailable. This is the Linux bug. Wait a little and retry. - time.Sleep(time.Millisecond * 10) - continue // keep retrying - default: - // Since we sent "" as the method above, this is the expected response. Ready to go. - break outer - } - } - - // Unexpected error; get outta dodge. - return nil, errors.Wrapf(err, "%v plugin [%v] did not come alive", prefix, bin) - } - } - break - } - // Not ready yet; ask the gRPC client APIs to block until the state transitions again so we can retry. - if !conn.WaitForStateChange(timeout, s) { - return nil, errors.Errorf("%v plugin [%v] did not begin responding to RPC connections", prefix, bin) - } + return nil, err } // Done; store the connection and return the plugin info. @@ -382,7 +391,7 @@ func (p *plugin) Close() error { result := p.Kill() - // Wait for stdout and stderr to drain. + // Wait for stdout and stderr to drain if we attached to the plugin we won't have a stdout/err if p.stdoutDone != nil { <-p.stdoutDone } diff --git a/sdk/go/common/resource/plugin/provider.go b/sdk/go/common/resource/plugin/provider.go index 3cd27bb2b36b..a2f272974f60 100644 --- a/sdk/go/common/resource/plugin/provider.go +++ b/sdk/go/common/resource/plugin/provider.go @@ -103,6 +103,15 @@ type Provider interface { SignalCancellation() error } +type GrpcProvider interface { + Provider + + // Attach triggers an attach for a currently running provider to the engine + // TODO It would be nice if this was a HostClient rather than the string address but due to dependency + // ordering we don't have access to declare that here. + Attach(address string) error +} + // CheckFailure indicates that a call to check failed; it contains the property and reason for the failure. type CheckFailure struct { Property resource.PropertyKey // the property that failed checking. diff --git a/sdk/go/common/resource/plugin/provider_plugin.go b/sdk/go/common/resource/plugin/provider_plugin.go index 48cb6e5ba2c8..ade2f83ba00a 100644 --- a/sdk/go/common/resource/plugin/provider_plugin.go +++ b/sdk/go/common/resource/plugin/provider_plugin.go @@ -76,31 +76,63 @@ type provider struct { // plugin could not be found, or an error occurs while creating the child process, an error is returned. func NewProvider(host Host, ctx *Context, pkg tokens.Package, version *semver.Version, options map[string]interface{}, disableProviderPreview bool) (Provider, error) { - // Load the plugin's path by using the standard workspace logic. - _, path, err := workspace.GetPluginPath( - workspace.ResourcePlugin, strings.Replace(string(pkg), tokens.QNameDelimiter, "_", -1), version) - if err != nil { - return nil, err - } - contract.Assert(path != "") + // See if this is a provider we just want to attach to + var plug *plugin + var optAttach string + if providersEnvVar, has := os.LookupEnv("PULUMI_DEBUG_PROVIDERS"); has { + for _, provider := range strings.Split(providersEnvVar, ",") { + parts := strings.SplitN(provider, ":", 2) - // Runtime options are passed as environment variables to the provider. - env := os.Environ() - for k, v := range options { - env = append(env, fmt.Sprintf("PULUMI_RUNTIME_%s=%v", strings.ToUpper(k), v)) + if parts[0] == pkg.String() { + optAttach = parts[1] + break + } + } } - plug, err := newPlugin(ctx, ctx.Pwd, path, fmt.Sprintf("%v (resource)", pkg), - []string{host.ServerAddr()}, env, otgrpc.SpanDecorator(decorateProviderSpans)) - if err != nil { - return nil, err + prefix := fmt.Sprintf("%v (resource)", pkg) + + if optAttach != "" { + conn, err := dialPlugin(optAttach, pkg.String(), prefix) + if err != nil { + return nil, err + } + + // Done; store the connection and return the plugin info. + plug = &plugin{ + Conn: conn, + // Nothing to kill + Kill: func() error { return nil }, + } + } else { + // Load the plugin's path by using the standard workspace logic. + _, path, err := workspace.GetPluginPath( + workspace.ResourcePlugin, strings.Replace(string(pkg), tokens.QNameDelimiter, "_", -1), version) + if err != nil { + return nil, err + } + + contract.Assert(path != "") + + // Runtime options are passed as environment variables to the provider. + env := os.Environ() + for k, v := range options { + env = append(env, fmt.Sprintf("PULUMI_RUNTIME_%s=%v", strings.ToUpper(k), v)) + } + + plug, err = newPlugin(ctx, ctx.Pwd, path, prefix, + []string{host.ServerAddr()}, env, otgrpc.SpanDecorator(decorateProviderSpans)) + if err != nil { + return nil, err + } } + contract.Assertf(plug != nil, "unexpected nil resource plugin for %s", pkg) legacyPreview := cmdutil.IsTruthy(os.Getenv("PULUMI_LEGACY_PROVIDER_PREVIEW")) - return &provider{ + p := &provider{ ctx: ctx, pkg: pkg, plug: plug, @@ -108,7 +140,17 @@ func NewProvider(host Host, ctx *Context, pkg tokens.Package, version *semver.Ve cfgdone: make(chan bool), disableProviderPreview: disableProviderPreview, legacyPreview: legacyPreview, - }, nil + } + + // If we just attached (i.e. plugin bin is nil) we need to call attach + if plug.Bin == "" { + err := p.Attach(host.ServerAddr()) + if err != nil { + return nil, err + } + } + + return p, nil } func NewProviderWithClient(ctx *Context, pkg tokens.Package, client pulumirpc.ResourceProviderClient, @@ -1462,6 +1504,23 @@ func (p *provider) GetPluginInfo() (workspace.PluginInfo, error) { }, nil } +// Attach attaches this plugin to the engine +func (p *provider) Attach(address string) error { + label := fmt.Sprintf("%s.Attach()", p.label()) + logging.V(7).Infof("%s executing", label) + + // Calling Attach happens immediately after loading, and does not require configuration to proceed. + // Thus, we access the clientRaw property, rather than calling getClient. + _, err := p.clientRaw.Attach(p.requestContext(), &pulumirpc.PluginAttach{Address: address}) + if err != nil { + rpcError := rpcerror.Convert(err) + logging.V(7).Infof("%s failed: err=%v", label, rpcError.Message()) + return rpcError + } + + return nil +} + func (p *provider) SignalCancellation() error { _, err := p.clientRaw.Cancel(p.requestContext(), &pbempty.Empty{}) if err != nil { diff --git a/sdk/go/common/resource/plugin/provider_server.go b/sdk/go/common/resource/plugin/provider_server.go index cae11853325a..78b9703be5fc 100644 --- a/sdk/go/common/resource/plugin/provider_server.go +++ b/sdk/go/common/resource/plugin/provider_server.go @@ -143,6 +143,20 @@ func (p *providerServer) GetPluginInfo(ctx context.Context, req *pbempty.Empty) return &pulumirpc.PluginInfo{Version: info.Version.String()}, nil } +func (p *providerServer) Attach(ctx context.Context, req *pulumirpc.PluginAttach) (*pbempty.Empty, error) { + // NewProviderServer should take a GrpcProvider instead of Provider, but that's a breaking change + // so for now we type test here + if grpcProvider, ok := p.provider.(GrpcProvider); ok { + err := grpcProvider.Attach(req.GetAddress()) + if err != nil { + return nil, err + } + return &pbempty.Empty{}, nil + } + // Else report this is unsupported + return nil, status.Error(codes.Unimplemented, "Attach is not yet implemented") +} + func (p *providerServer) Cancel(ctx context.Context, req *pbempty.Empty) (*pbempty.Empty, error) { if err := p.provider.SignalCancellation(); err != nil { return nil, err diff --git a/sdk/nodejs/proto/plugin_pb.js b/sdk/nodejs/proto/plugin_pb.js index 102c5f7a1068..05c1b2667c69 100644 --- a/sdk/nodejs/proto/plugin_pb.js +++ b/sdk/nodejs/proto/plugin_pb.js @@ -12,6 +12,7 @@ var jspb = require('google-protobuf'); var goog = jspb; var proto = { pulumirpc: {} }, global = proto; +goog.exportSymbol('proto.pulumirpc.PluginAttach', null, global); goog.exportSymbol('proto.pulumirpc.PluginDependency', null, global); goog.exportSymbol('proto.pulumirpc.PluginInfo', null, global); /** @@ -56,6 +57,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.pulumirpc.PluginDependency.displayName = 'proto.pulumirpc.PluginDependency'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pulumirpc.PluginAttach = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pulumirpc.PluginAttach, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pulumirpc.PluginAttach.displayName = 'proto.pulumirpc.PluginAttach'; +} @@ -406,4 +428,134 @@ proto.pulumirpc.PluginDependency.prototype.setServer = function(value) { }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pulumirpc.PluginAttach.prototype.toObject = function(opt_includeInstance) { + return proto.pulumirpc.PluginAttach.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pulumirpc.PluginAttach} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pulumirpc.PluginAttach.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pulumirpc.PluginAttach} + */ +proto.pulumirpc.PluginAttach.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pulumirpc.PluginAttach; + return proto.pulumirpc.PluginAttach.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pulumirpc.PluginAttach} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pulumirpc.PluginAttach} + */ +proto.pulumirpc.PluginAttach.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pulumirpc.PluginAttach.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pulumirpc.PluginAttach.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pulumirpc.PluginAttach} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pulumirpc.PluginAttach.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.pulumirpc.PluginAttach.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pulumirpc.PluginAttach} returns this + */ +proto.pulumirpc.PluginAttach.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + goog.object.extend(exports, proto.pulumirpc); diff --git a/sdk/nodejs/proto/provider_grpc_pb.js b/sdk/nodejs/proto/provider_grpc_pb.js index c399bcd9371b..7f4cb97b27ce 100644 --- a/sdk/nodejs/proto/provider_grpc_pb.js +++ b/sdk/nodejs/proto/provider_grpc_pb.js @@ -220,6 +220,17 @@ function deserialize_pulumirpc_InvokeResponse(buffer_arg) { return provider_pb.InvokeResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_pulumirpc_PluginAttach(arg) { + if (!(arg instanceof plugin_pb.PluginAttach)) { + throw new Error('Expected argument of type pulumirpc.PluginAttach'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pulumirpc_PluginAttach(buffer_arg) { + return plugin_pb.PluginAttach.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_pulumirpc_PluginInfo(arg) { if (!(arg instanceof plugin_pb.PluginInfo)) { throw new Error('Expected argument of type pulumirpc.PluginInfo'); @@ -478,6 +489,18 @@ getPluginInfo: { responseSerialize: serialize_pulumirpc_PluginInfo, responseDeserialize: deserialize_pulumirpc_PluginInfo, }, + // Attach sends the engine address to an already running plugin. +attach: { + path: '/pulumirpc.ResourceProvider/Attach', + requestStream: false, + responseStream: false, + requestType: plugin_pb.PluginAttach, + responseType: google_protobuf_empty_pb.Empty, + requestSerialize: serialize_pulumirpc_PluginAttach, + requestDeserialize: deserialize_pulumirpc_PluginAttach, + responseSerialize: serialize_google_protobuf_Empty, + responseDeserialize: deserialize_google_protobuf_Empty, + }, }; exports.ResourceProviderClient = grpc.makeGenericClientConstructor(ResourceProviderService); diff --git a/sdk/nodejs/provider/server.ts b/sdk/nodejs/provider/server.ts index 903adc1bb11c..a53facd58585 100644 --- a/sdk/nodejs/provider/server.ts +++ b/sdk/nodejs/provider/server.ts @@ -36,14 +36,14 @@ const plugproto = require("../proto/plugin_pb.js"); const statusproto = require("../proto/status_pb.js"); class Server implements grpc.UntypedServiceImplementation { - readonly engineAddr: string; + engineAddr: string | undefined; readonly provider: Provider; readonly uncaughtErrors: Set; /** Queue of construct calls. */ constructCallQueue = Promise.resolve(); - constructor(engineAddr: string, provider: Provider, uncaughtErrors: Set) { + constructor(engineAddr: string | undefined, provider: Provider, uncaughtErrors: Set) { this.engineAddr = engineAddr; this.provider = provider; this.uncaughtErrors = uncaughtErrors; @@ -58,6 +58,13 @@ class Server implements grpc.UntypedServiceImplementation { callback(undefined, new emptyproto.Empty()); } + public attach(call: any, callback: any): void { + const req = call.request; + const host = req.getAddress(); + this.engineAddr = host; + callback(undefined, new emptyproto.Empty()); + } + public getPluginInfo(call: any, callback: any): void { const resp: any = new plugproto.PluginInfo(); resp.setVersion(this.provider.version); @@ -469,9 +476,13 @@ class Server implements grpc.UntypedServiceImplementation { } } -function configureRuntime(req: any, engineAddr: string) { +function configureRuntime(req: any, engineAddr: string | undefined) { // NOTE: these are globals! We should ensure that all settings are identical between calls, and eventually // refactor so we can avoid the global state. + if (engineAddr === undefined) { + throw new Error("fatal: Missing address"); + } + runtime.resetOptions(req.getProject(), req.getStack(), req.getParallel(), engineAddr, req.getMonitorendpoint(), req.getDryrun()); @@ -622,19 +633,15 @@ export async function main(provider: Provider, args: string[]) { const parsedArgs = parseArgs(args); - // The program requires a single argument: the address of the RPC endpoint for the engine. It - // optionally also takes a second argument, a reference back to the engine, but this may be missing. - if (parsedArgs === undefined) { - console.error("fatal: Missing address"); - process.exit(-1); - return; - } - const engineAddr: string = parsedArgs.engineAddress; - // Finally connect up the gRPC client/server and listen for incoming requests. const server = new grpc.Server({ "grpc.max_receive_message_length": runtime.maxRPCMessageSize, }); + + // The program receives a single optional argument: the address of the RPC endpoint for the engine. It + // optionally also takes a second argument, a reference back to the engine, but this may be missing. + + const engineAddr = parsedArgs?.engineAddress; server.addService(provrpc.ResourceProviderService, new Server(engineAddr, provider, uncaughtErrors)); const port: number = await new Promise((resolve, reject) => { server.bindAsync(`0.0.0.0:0`, grpc.ServerCredentials.createInsecure(), (err, p) => { diff --git a/sdk/proto/go/plugin.pb.go b/sdk/proto/go/plugin.pb.go index a87f30c809b7..f84529086f59 100644 --- a/sdk/proto/go/plugin.pb.go +++ b/sdk/proto/go/plugin.pb.go @@ -124,15 +124,60 @@ func (m *PluginDependency) GetServer() string { return "" } +// PluginAttach is used to attach an already running plugin to the engine. +// +// Normally the engine starts the plugin process itself and passes the engine address as the first argumnent. +// But when debugging it can be useful to have an already running provider that the engine instead attaches +// to, this message is used so the provider can still be passed the engine address to communicate with. +type PluginAttach struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PluginAttach) Reset() { *m = PluginAttach{} } +func (m *PluginAttach) String() string { return proto.CompactTextString(m) } +func (*PluginAttach) ProtoMessage() {} +func (*PluginAttach) Descriptor() ([]byte, []int) { + return fileDescriptor_22a625af4bc1cc87, []int{2} +} + +func (m *PluginAttach) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PluginAttach.Unmarshal(m, b) +} +func (m *PluginAttach) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PluginAttach.Marshal(b, m, deterministic) +} +func (m *PluginAttach) XXX_Merge(src proto.Message) { + xxx_messageInfo_PluginAttach.Merge(m, src) +} +func (m *PluginAttach) XXX_Size() int { + return xxx_messageInfo_PluginAttach.Size(m) +} +func (m *PluginAttach) XXX_DiscardUnknown() { + xxx_messageInfo_PluginAttach.DiscardUnknown(m) +} + +var xxx_messageInfo_PluginAttach proto.InternalMessageInfo + +func (m *PluginAttach) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + func init() { proto.RegisterType((*PluginInfo)(nil), "pulumirpc.PluginInfo") proto.RegisterType((*PluginDependency)(nil), "pulumirpc.PluginDependency") + proto.RegisterType((*PluginAttach)(nil), "pulumirpc.PluginAttach") } func init() { proto.RegisterFile("plugin.proto", fileDescriptor_22a625af4bc1cc87) } var fileDescriptor_22a625af4bc1cc87 = []byte{ - // 145 bytes of a gzipped FileDescriptorProto + // 171 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 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, @@ -140,7 +185,8 @@ var fileDescriptor_22a625af4bc1cc87 = []byte{ 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, 0x51, 0x59, 0x6a, 0x91, 0x04, 0x0b, 0x58, 0x02, 0xca, 0x4b, 0x62, - 0x03, 0xbb, 0xd3, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x6a, 0x82, 0x41, 0xb7, 0x00, 0x00, - 0x00, + 0x18, 0x17, 0x5b, 0x71, 0x6a, 0x51, 0x59, 0x6a, 0x91, 0x04, 0x0b, 0x58, 0x02, 0xca, 0x53, 0xd2, + 0xe0, 0xe2, 0x81, 0xd8, 0xe6, 0x58, 0x52, 0x92, 0x98, 0x9c, 0x01, 0x32, 0x21, 0x31, 0x25, 0xa5, + 0x28, 0xb5, 0xb8, 0x18, 0xe6, 0x2e, 0x28, 0x37, 0x89, 0x0d, 0xec, 0x23, 0x63, 0x40, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x8d, 0x82, 0x2c, 0xaa, 0xe1, 0x00, 0x00, 0x00, } diff --git a/sdk/proto/go/provider.pb.go b/sdk/proto/go/provider.pb.go index 8b728d7f2d73..e79e37ff18e6 100644 --- a/sdk/proto/go/provider.pb.go +++ b/sdk/proto/go/provider.pb.go @@ -1963,129 +1963,130 @@ func init() { func init() { proto.RegisterFile("provider.proto", fileDescriptor_c6a9f3c02af3d1c8) } var fileDescriptor_c6a9f3c02af3d1c8 = []byte{ - // 1948 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x73, 0xdc, 0x48, - 0x15, 0xb7, 0xe6, 0xcb, 0x33, 0x6f, 0x3e, 0x32, 0x6e, 0x16, 0x5b, 0x3b, 0x9b, 0x83, 0x4b, 0x6c, - 0x81, 0x49, 0x76, 0x27, 0xc1, 0x39, 0x40, 0x52, 0xd9, 0xca, 0x3a, 0x9e, 0x71, 0xd6, 0x24, 0x71, - 0x8c, 0xbc, 0xe6, 0xe3, 0x94, 0x55, 0x34, 0x3d, 0x13, 0x61, 0x8d, 0xa4, 0x6d, 0xb5, 0x9c, 0xf2, - 0x9d, 0x03, 0x55, 0x54, 0x71, 0xa5, 0x38, 0x51, 0xc5, 0x19, 0x8a, 0x2a, 0xf8, 0x07, 0xf8, 0x27, - 0xb8, 0xc1, 0x91, 0x7f, 0x80, 0xbf, 0x80, 0xea, 0x0f, 0x69, 0xba, 0x25, 0x8d, 0x3d, 0x36, 0x29, - 0xf6, 0xd6, 0xaf, 0xfb, 0xf5, 0xeb, 0xf7, 0x7e, 0xef, 0xa3, 0x5f, 0x37, 0xf4, 0x22, 0x12, 0x9e, - 0x7b, 0x13, 0x4c, 0x86, 0x11, 0x09, 0x69, 0x88, 0x5a, 0x51, 0xe2, 0x27, 0x73, 0x8f, 0x44, 0xee, - 0xa0, 0x13, 0xf9, 0xc9, 0xcc, 0x0b, 0xc4, 0xc2, 0xe0, 0xa3, 0x59, 0x18, 0xce, 0x7c, 0x7c, 0x8f, - 0x53, 0x6f, 0x92, 0x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0xee, 0x49, 0x8a, 0x63, 0xe2, 0x10, 0xc7, 0xf7, 0xb1, 0x6f, 0xb6, 0x79, 0x31, - 0xce, 0x68, 0x96, 0xe0, 0xf3, 0x30, 0xf0, 0x68, 0x48, 0xc6, 0xc1, 0x24, 0x0a, 0xbd, 0x80, 0x9a, - 0x1d, 0xae, 0x7b, 0x7e, 0x7a, 0x70, 0x07, 0x3e, 0xd8, 0x23, 0xb3, 0x64, 0x8e, 0x03, 0xaa, 0x21, - 0x8e, 0xa0, 0x96, 0x90, 0x40, 0x64, 0x6b, 0xcb, 0xe6, 0xe3, 0x41, 0xc8, 0x79, 0x0b, 0xee, 0x2a, - 0x29, 0x70, 0x7b, 0x6a, 0x81, 0xbb, 0xd4, 0xf9, 0x85, 0x93, 0x95, 0x6a, 0x38, 0x78, 0x08, 0x6d, - 0x05, 0xbd, 0x6b, 0x15, 0xd2, 0xff, 0x54, 0xa0, 0x23, 0x8e, 0xba, 0x69, 0x3a, 0xbd, 0x06, 0x24, - 0x46, 0x5a, 0x34, 0x57, 0x8a, 0xd5, 0x4b, 0x39, 0x65, 0x68, 0x17, 0x76, 0x08, 0xc7, 0x97, 0x88, - 0xd2, 0xf2, 0xb5, 0xba, 0x62, 0xbe, 0x0e, 0x76, 0x00, 0x15, 0xcf, 0x28, 0xf5, 0xd6, 0xd7, 0xb0, - 0xb5, 0x44, 0x9b, 0x12, 0x20, 0x3f, 0xd7, 0x1d, 0x76, 0x67, 0x75, 0xfb, 0x54, 0xd0, 0xff, 0x68, - 0x40, 0x87, 0xeb, 0xad, 0x54, 0x93, 0x14, 0xf1, 0x96, 0xcd, 0x86, 0xac, 0x9a, 0x84, 0xfe, 0xe4, - 0xea, 0x6a, 0xc2, 0x98, 0x18, 0x73, 0x80, 0xdf, 0x89, 0xcb, 0xe9, 0x32, 0x66, 0xc6, 0x84, 0xbe, - 0x0b, 0xbd, 0x98, 0x1d, 0x1b, 0xb8, 0xf8, 0x28, 0x99, 0xbf, 0x91, 0x95,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0x49, 0xcc, 0x7d, 0x03, 0x3d, 0x84, 0xda, 0xbe, 0xe3, - 0xfb, 0x1a, 0x1c, 0xca, 0xd7, 0x8e, 0x06, 0x87, 0xfa, 0x83, 0x60, 0xad, 0xa1, 0xc7, 0x50, 0xe7, - 0x10, 0xdf, 0xcc, 0x1b, 0x0f, 0xa1, 0xc6, 0x5f, 0x1e, 0x37, 0xf0, 0xc3, 0x13, 0x68, 0x88, 0xc6, - 0x5a, 0x33, 0x5b, 0xeb, 0xfd, 0x35, 0xb3, 0xf5, 0x2e, 0x5c, 0x9c, 0xcd, 0x3a, 0x54, 0xed, 0x6c, - 0xa5, 0x9d, 0xd6, 0xce, 0x56, 0x5b, 0x59, 0x71, 0xb6, 0x68, 0xb5, 0xb4, 0xb3, 0xb5, 0x26, 0x53, - 0x3b, 0x5b, 0xef, 0xcb, 0x38, 0x6a, 0x0d, 0xd1, 0x5f, 0x69, 0x02, 0xb4, 0x96, 0x6b, 0xb0, 0x59, - 0xc8, 0xb6, 0xf1, 0x3c, 0xa2, 0x17, 0x59, 0x08, 0x8a, 0x5a, 0x92, 0x0f, 0x41, 0xad, 0xfa, 0xe7, - 0x43, 0x50, 0x2f, 0x3f, 0xd6, 0x1a, 0x7a, 0x04, 0x8d, 0x7d, 0x27, 0x70, 0x31, 0x73, 0x7d, 0xe9, - 0x69, 0x97, 0x68, 0xf1, 0x39, 0x74, 0x9f, 0x61, 0x7a, 0xcc, 0xbf, 0x5e, 0x0f, 0x83, 0x69, 0xb8, - 0x54, 0xc4, 0xb7, 0xd5, 0x67, 0x5f, 0xc6, 0x6e, 0xad, 0xbd, 0x69, 0x70, 0xc6, 0x07, 0xff, 0x0d, - 0x00, 0x00, 0xff, 0xff, 0xa1, 0xe6, 0xba, 0xa0, 0x01, 0x1b, 0x00, 0x00, + // 1964 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd,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, 0x70, 0xf9, 0x75, 0x7b, 0x71, 0xba, 0xc8, + 0x9b, 0x72, 0xa1, 0x37, 0x73, 0xcd, 0x6f, 0x12, 0x1a, 0x25, 0x34, 0xf5, 0x5a, 0x9f, 0xb4, 0xfe, + 0x6c, 0xc0, 0x87, 0x99, 0xd5, 0x43, 0x42, 0x42, 0xf2, 0xda, 0x8b, 0x63, 0x2f, 0x98, 0xbc, 0xc4, + 0x97, 0x31, 0xfa, 0x31, 0x34, 0xa7, 0x73, 0x52, 0x1e, 0xed, 0x83, 0xa2, 0xa3, 0x5d, 0xdc, 0xda, + 0x9f, 0x8f, 0x6d, 0x55, 0x46, 0xef, 0x39, 0xc0, 0x7c, 0x09, 0x21, 0xa8, 0x04, 0xce, 0x14, 0x4b, + 0x84, 0xf9, 0x18, 0x6d, 0x43, 0x73, 0x84, 0x63, 0x97, 0x78, 0x11, 0x65, 0xd1, 0x2a, 0x80, 0x56, + 0xa7, 0xac, 0x5f, 0x1b, 0xd0, 0x3e, 0x0c, 0x66, 0xe1, 0x79, 0x16, 0x81, 0x5d, 0x28, 0xd3, 0xf0, + 0x3c, 0x3d, 0x28, 0x1a, 0x9e, 0xdf, 0x28, 0x92, 0x7e, 0x54, 0xa9, 0x97, 0xbb, 0xeb, 0x76, 0x3d, + 0x4d, 0xcd, 0x2c, 0x37, 0x72, 0xa8, 0xda, 0x1b, 0x22, 0x47, 0x07, 0xe1, 0x45, 0xe0, 0x87, 0xce, + 0xe8, 0xd4, 0x7e, 0x65, 0xcd, 0xa0, 0x93, 0x1a, 0x23, 0x0f, 0xfd, 0x01, 0xd4, 0x08, 0xa6, 0x09, + 0x11, 0xa9, 0x76, 0x85, 0x76, 0xc9, 0x86, 0x1e, 0x41, 0x7d, 0xec, 0x78, 0x7e, 0x42, 0x30, 0x33, + 0xb8, 0xcc, 0xb7, 0x28, 0x20, 0x9f, 0x61, 0xf7, 0xfc, 0x40, 0xac, 0xdb, 0x19, 0xa3, 0xf5, 0xb7, + 0x2a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xa1, 0x9b, 0x75, 0xa8, 0x9a, 0x6e, + 0xa5, 0x9d, 0xd6, 0x74, 0xab, 0xad, 0xac, 0xd0, 0x2d, 0x5a, 0x2d, 0x4d, 0xb7, 0xd6, 0x64, 0x6a, + 0xba, 0xf5, 0xbe, 0x8c, 0xa3, 0x56, 0x13, 0xfd, 0x95, 0x26, 0x40, 0x6b, 0xb9, 0x7a, 0x9b, 0xb9, + 0x6c, 0x1b, 0x4e, 0x23, 0x7a, 0x99, 0x85, 0xa0, 0xa8, 0x25, 0x8b, 0x21, 0xa8, 0x55, 0xff, 0xc5, + 0x10, 0xd4, 0xcb, 0x8f, 0xb5, 0x86, 0x9e, 0x40, 0x6d, 0xdf, 0x09, 0x5c, 0xcc, 0x8e, 0xbe, 0x50, + 0xdb, 0x15, 0x56, 0x7c, 0x0e, 0xed, 0x17, 0x98, 0x1e, 0xf3, 0xaf, 0xd7, 0xc3, 0x60, 0x1c, 0x2e, + 0x15, 0xf1, 0x4d, 0xf5, 0xd9, 0x97, 0xb1, 0x5b, 0x6b, 0xe8, 0x87, 0x50, 0xdb, 0xa3, 0xd4, 0x71, + 0xcf, 0xb4, 0xe0, 0x11, 0x2c, 0x62, 0x61, 0xb9, 0xfa, 0x77, 0x35, 0x3e, 0xf3, 0xe8, 0x3f, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x29, 0xe8, 0x61, 0xe4, 0x3e, 0x1b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2139,6 +2140,8 @@ type ResourceProviderClient interface { Cancel(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) // GetPluginInfo returns generic information about this plugin, like its version. GetPluginInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginInfo, error) + // Attach sends the engine address to an already running plugin. + Attach(ctx context.Context, in *PluginAttach, opts ...grpc.CallOption) (*empty.Empty, error) } type resourceProviderClient struct { @@ -2316,6 +2319,15 @@ func (c *resourceProviderClient) GetPluginInfo(ctx context.Context, in *empty.Em return out, nil } +func (c *resourceProviderClient) Attach(ctx context.Context, in *PluginAttach, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Attach", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ResourceProviderServer is the server API for ResourceProvider service. type ResourceProviderServer interface { // GetSchema fetches the schema for this resource provider. @@ -2357,6 +2369,8 @@ type ResourceProviderServer interface { Cancel(context.Context, *empty.Empty) (*empty.Empty, error) // GetPluginInfo returns generic information about this plugin, like its version. GetPluginInfo(context.Context, *empty.Empty) (*PluginInfo, error) + // Attach sends the engine address to an already running plugin. + Attach(context.Context, *PluginAttach) (*empty.Empty, error) } // UnimplementedResourceProviderServer can be embedded to have forward compatible implementations. @@ -2411,6 +2425,9 @@ func (*UnimplementedResourceProviderServer) Cancel(ctx context.Context, req *emp func (*UnimplementedResourceProviderServer) GetPluginInfo(ctx context.Context, req *empty.Empty) (*PluginInfo, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPluginInfo not implemented") } +func (*UnimplementedResourceProviderServer) Attach(ctx context.Context, req *PluginAttach) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Attach not implemented") +} func RegisterResourceProviderServer(s *grpc.Server, srv ResourceProviderServer) { s.RegisterService(&_ResourceProvider_serviceDesc, srv) @@ -2707,6 +2724,24 @@ func _ResourceProvider_GetPluginInfo_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _ResourceProvider_Attach_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PluginAttach) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ResourceProviderServer).Attach(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pulumirpc.ResourceProvider/Attach", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourceProviderServer).Attach(ctx, req.(*PluginAttach)) + } + return interceptor(ctx, in, info, handler) +} + var _ResourceProvider_serviceDesc = grpc.ServiceDesc{ ServiceName: "pulumirpc.ResourceProvider", HandlerType: (*ResourceProviderServer)(nil), @@ -2771,6 +2806,10 @@ var _ResourceProvider_serviceDesc = grpc.ServiceDesc{ MethodName: "GetPluginInfo", Handler: _ResourceProvider_GetPluginInfo_Handler, }, + { + MethodName: "Attach", + Handler: _ResourceProvider_Attach_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/sdk/proto/plugin.proto b/sdk/proto/plugin.proto index f93adddb2d3d..eff58a603dcd 100644 --- a/sdk/proto/plugin.proto +++ b/sdk/proto/plugin.proto @@ -28,3 +28,12 @@ message PluginDependency { string version = 3; // the semver for this plugin. string server = 4; // the URL of a server that can be used to download this plugin, if needed. } + +// PluginAttach is used to attach an already running plugin to the engine. +// +// Normally the engine starts the plugin process itself and passes the engine address as the first argumnent. +// But when debugging it can be useful to have an already running provider that the engine instead attaches +// to, this message is used so the provider can still be passed the engine address to communicate with. +message PluginAttach { + string address = 1; // the grpc address for the engine +} \ No newline at end of file diff --git a/sdk/proto/provider.proto b/sdk/proto/provider.proto index 9ce591628510..2dfe832b6248 100644 --- a/sdk/proto/provider.proto +++ b/sdk/proto/provider.proto @@ -69,6 +69,9 @@ service ResourceProvider { rpc Cancel(google.protobuf.Empty) returns (google.protobuf.Empty) {} // GetPluginInfo returns generic information about this plugin, like its version. rpc GetPluginInfo(google.protobuf.Empty) returns (PluginInfo) {} + + // Attach sends the engine address to an already running plugin. + rpc Attach(PluginAttach) returns (google.protobuf.Empty) {} } message GetSchemaRequest { diff --git a/sdk/python/lib/pulumi/runtime/proto/plugin_pb2.py b/sdk/python/lib/pulumi/runtime/proto/plugin_pb2.py index 3c4ae81c6f82..a779f22868e9 100644 --- a/sdk/python/lib/pulumi/runtime/proto/plugin_pb2.py +++ b/sdk/python/lib/pulumi/runtime/proto/plugin_pb2.py @@ -17,7 +17,7 @@ package="pulumirpc", syntax="proto3", serialized_options=None, - serialized_pb=b'\n\x0cplugin.proto\x12\tpulumirpc"\x1d\n\nPluginInfo\x12\x0f\n\x07version\x18\x01 \x01(\t"O\n\x10PluginDependency\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04kind\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x0e\n\x06server\x18\x04 \x01(\tb\x06proto3', + serialized_pb=b'\n\x0cplugin.proto\x12\tpulumirpc"\x1d\n\nPluginInfo\x12\x0f\n\x07version\x18\x01 \x01(\t"O\n\x10PluginDependency\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04kind\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x0e\n\x06server\x18\x04 \x01(\t"\x1f\n\x0cPluginAttach\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\tb\x06proto3', ) @@ -152,8 +152,48 @@ serialized_end=137, ) + +_PLUGINATTACH = _descriptor.Descriptor( + name="PluginAttach", + full_name="pulumirpc.PluginAttach", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="address", + full_name="pulumirpc.PluginAttach.address", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=139, + serialized_end=170, +) + DESCRIPTOR.message_types_by_name["PluginInfo"] = _PLUGININFO DESCRIPTOR.message_types_by_name["PluginDependency"] = _PLUGINDEPENDENCY +DESCRIPTOR.message_types_by_name["PluginAttach"] = _PLUGINATTACH _sym_db.RegisterFileDescriptor(DESCRIPTOR) PluginInfo = _reflection.GeneratedProtocolMessageType( @@ -178,5 +218,16 @@ ) _sym_db.RegisterMessage(PluginDependency) +PluginAttach = _reflection.GeneratedProtocolMessageType( + "PluginAttach", + (_message.Message,), + { + "DESCRIPTOR": _PLUGINATTACH, + "__module__": "plugin_pb2" + # @@protoc_insertion_point(class_scope:pulumirpc.PluginAttach) + }, +) +_sym_db.RegisterMessage(PluginAttach) + # @@protoc_insertion_point(module_scope) diff --git a/sdk/python/lib/pulumi/runtime/proto/provider_pb2.py b/sdk/python/lib/pulumi/runtime/proto/provider_pb2.py index 3e458fb19bab..b9f7e9771b93 100644 --- a/sdk/python/lib/pulumi/runtime/proto/provider_pb2.py +++ b/sdk/python/lib/pulumi/runtime/proto/provider_pb2.py @@ -22,7 +22,7 @@ package="pulumirpc", syntax="proto3", serialized_options=None, - serialized_pb=b'\n\x0eprovider.proto\x12\tpulumirpc\x1a\x0cplugin.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto"#\n\x10GetSchemaRequest\x12\x0f\n\x07version\x18\x01 \x01(\x05"#\n\x11GetSchemaResponse\x12\x0e\n\x06schema\x18\x01 \x01(\t"\xda\x01\n\x10\x43onfigureRequest\x12=\n\tvariables\x18\x01 \x03(\x0b\x32*.pulumirpc.ConfigureRequest.VariablesEntry\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x15\n\racceptSecrets\x18\x03 \x01(\x08\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x04 \x01(\x08\x1a\x30\n\x0eVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"s\n\x11\x43onfigureResponse\x12\x15\n\racceptSecrets\x18\x01 \x01(\x08\x12\x17\n\x0fsupportsPreview\x18\x02 \x01(\x08\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x03 \x01(\x08\x12\x15\n\racceptOutputs\x18\x04 \x01(\x08"\x92\x01\n\x19\x43onfigureErrorMissingKeys\x12\x44\n\x0bmissingKeys\x18\x01 \x03(\x0b\x32/.pulumirpc.ConfigureErrorMissingKeys.MissingKey\x1a/\n\nMissingKey\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t"\x80\x01\n\rInvokeRequest\x12\x0b\n\x03tok\x18\x01 \x01(\t\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructJ\x04\x08\x03\x10\x07R\x08providerR\x07versionR\x0f\x61\x63\x63\x65ptResourcesR\x11pluginDownloadURL"d\n\x0eInvokeResponse\x12\'\n\x06return\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12)\n\x08\x66\x61ilures\x18\x02 \x03(\x0b\x32\x17.pulumirpc.CheckFailure"\xa8\x04\n\x0b\x43\x61llRequest\x12\x0b\n\x03tok\x18\x01 \x01(\t\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x44\n\x0f\x61rgDependencies\x18\x03 \x03(\x0b\x32+.pulumirpc.CallRequest.ArgDependenciesEntry\x12\x10\n\x08provider\x18\x04 \x01(\t\x12\x0f\n\x07version\x18\x05 \x01(\t\x12\x19\n\x11pluginDownloadURL\x18\r \x01(\t\x12\x0f\n\x07project\x18\x06 \x01(\t\x12\r\n\x05stack\x18\x07 \x01(\t\x12\x32\n\x06\x63onfig\x18\x08 \x03(\x0b\x32".pulumirpc.CallRequest.ConfigEntry\x12\x18\n\x10\x63onfigSecretKeys\x18\t \x03(\t\x12\x0e\n\x06\x64ryRun\x18\n \x01(\x08\x12\x10\n\x08parallel\x18\x0b \x01(\x05\x12\x17\n\x0fmonitorEndpoint\x18\x0c \x01(\t\x1a$\n\x14\x41rgumentDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1a\x63\n\x14\x41rgDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.pulumirpc.CallRequest.ArgumentDependencies:\x02\x38\x01\x1a-\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xba\x02\n\x0c\x43\x61llResponse\x12\'\n\x06return\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12K\n\x12returnDependencies\x18\x02 \x03(\x0b\x32/.pulumirpc.CallResponse.ReturnDependenciesEntry\x12)\n\x08\x66\x61ilures\x18\x03 \x03(\x0b\x32\x17.pulumirpc.CheckFailure\x1a"\n\x12ReturnDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1a\x65\n\x17ReturnDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x39\n\x05value\x18\x02 \x01(\x0b\x32*.pulumirpc.CallResponse.ReturnDependencies:\x02\x38\x01"\x81\x01\n\x0c\x43heckRequest\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12%\n\x04olds\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x04news\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x16\n\x0esequenceNumber\x18\x04 \x01(\x05"c\n\rCheckResponse\x12\'\n\x06inputs\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12)\n\x08\x66\x61ilures\x18\x02 \x03(\x0b\x32\x17.pulumirpc.CheckFailure"0\n\x0c\x43heckFailure\x12\x10\n\x08property\x18\x01 \x01(\t\x12\x0e\n\x06reason\x18\x02 \x01(\t"\x8b\x01\n\x0b\x44iffRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03urn\x18\x02 \x01(\t\x12%\n\x04olds\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x04news\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x15\n\rignoreChanges\x18\x05 \x03(\t"\xaf\x01\n\x0cPropertyDiff\x12*\n\x04kind\x18\x01 \x01(\x0e\x32\x1c.pulumirpc.PropertyDiff.Kind\x12\x11\n\tinputDiff\x18\x02 \x01(\x08"`\n\x04Kind\x12\x07\n\x03\x41\x44\x44\x10\x00\x12\x0f\n\x0b\x41\x44\x44_REPLACE\x10\x01\x12\n\n\x06\x44\x45LETE\x10\x02\x12\x12\n\x0e\x44\x45LETE_REPLACE\x10\x03\x12\n\n\x06UPDATE\x10\x04\x12\x12\n\x0eUPDATE_REPLACE\x10\x05"\xfa\x02\n\x0c\x44iffResponse\x12\x10\n\x08replaces\x18\x01 \x03(\t\x12\x0f\n\x07stables\x18\x02 \x03(\t\x12\x1b\n\x13\x64\x65leteBeforeReplace\x18\x03 \x01(\x08\x12\x34\n\x07\x63hanges\x18\x04 \x01(\x0e\x32#.pulumirpc.DiffResponse.DiffChanges\x12\r\n\x05\x64iffs\x18\x05 \x03(\t\x12?\n\x0c\x64\x65tailedDiff\x18\x06 \x03(\x0b\x32).pulumirpc.DiffResponse.DetailedDiffEntry\x12\x17\n\x0fhasDetailedDiff\x18\x07 \x01(\x08\x1aL\n\x11\x44\x65tailedDiffEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.pulumirpc.PropertyDiff:\x02\x38\x01"=\n\x0b\x44iffChanges\x12\x10\n\x0c\x44IFF_UNKNOWN\x10\x00\x12\r\n\tDIFF_NONE\x10\x01\x12\r\n\tDIFF_SOME\x10\x02"k\n\rCreateRequest\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07timeout\x18\x03 \x01(\x01\x12\x0f\n\x07preview\x18\x04 \x01(\x08"I\n\x0e\x43reateResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct"|\n\x0bReadRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03urn\x18\x02 \x01(\t\x12+\n\nproperties\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\'\n\x06inputs\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct"p\n\x0cReadResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\'\n\x06inputs\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct"\xaf\x01\n\rUpdateRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03urn\x18\x02 \x01(\t\x12%\n\x04olds\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x04news\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07timeout\x18\x05 \x01(\x01\x12\x15\n\rignoreChanges\x18\x06 \x03(\t\x12\x0f\n\x07preview\x18\x07 \x01(\x08"=\n\x0eUpdateResponse\x12+\n\nproperties\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct"f\n\rDeleteRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03urn\x18\x02 \x01(\t\x12+\n\nproperties\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07timeout\x18\x04 \x01(\x01"\xce\x05\n\x10\x43onstructRequest\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\r\n\x05stack\x18\x02 \x01(\t\x12\x37\n\x06\x63onfig\x18\x03 \x03(\x0b\x32\'.pulumirpc.ConstructRequest.ConfigEntry\x12\x0e\n\x06\x64ryRun\x18\x04 \x01(\x08\x12\x10\n\x08parallel\x18\x05 \x01(\x05\x12\x17\n\x0fmonitorEndpoint\x18\x06 \x01(\t\x12\x0c\n\x04type\x18\x07 \x01(\t\x12\x0c\n\x04name\x18\x08 \x01(\t\x12\x0e\n\x06parent\x18\t \x01(\t\x12\'\n\x06inputs\x18\n \x01(\x0b\x32\x17.google.protobuf.Struct\x12M\n\x11inputDependencies\x18\x0b \x03(\x0b\x32\x32.pulumirpc.ConstructRequest.InputDependenciesEntry\x12\x0f\n\x07protect\x18\x0c \x01(\x08\x12=\n\tproviders\x18\r \x03(\x0b\x32*.pulumirpc.ConstructRequest.ProvidersEntry\x12\x0f\n\x07\x61liases\x18\x0e \x03(\t\x12\x14\n\x0c\x64\x65pendencies\x18\x0f \x03(\t\x12\x18\n\x10\x63onfigSecretKeys\x18\x10 \x03(\t\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1a-\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aj\n\x16InputDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12?\n\x05value\x18\x02 \x01(\x0b\x32\x30.pulumirpc.ConstructRequest.PropertyDependencies:\x02\x38\x01\x1a\x30\n\x0eProvidersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xab\x02\n\x11\x43onstructResponse\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12&\n\x05state\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12N\n\x11stateDependencies\x18\x03 \x03(\x0b\x32\x33.pulumirpc.ConstructResponse.StateDependenciesEntry\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1ak\n\x16StateDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.pulumirpc.ConstructResponse.PropertyDependencies:\x02\x38\x01"\x8c\x01\n\x17\x45rrorResourceInitFailed\x12\n\n\x02id\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07reasons\x18\x03 \x03(\t\x12\'\n\x06inputs\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct2\xac\x08\n\x10ResourceProvider\x12H\n\tGetSchema\x12\x1b.pulumirpc.GetSchemaRequest\x1a\x1c.pulumirpc.GetSchemaResponse"\x00\x12\x42\n\x0b\x43heckConfig\x12\x17.pulumirpc.CheckRequest\x1a\x18.pulumirpc.CheckResponse"\x00\x12?\n\nDiffConfig\x12\x16.pulumirpc.DiffRequest\x1a\x17.pulumirpc.DiffResponse"\x00\x12H\n\tConfigure\x12\x1b.pulumirpc.ConfigureRequest\x1a\x1c.pulumirpc.ConfigureResponse"\x00\x12?\n\x06Invoke\x12\x18.pulumirpc.InvokeRequest\x1a\x19.pulumirpc.InvokeResponse"\x00\x12G\n\x0cStreamInvoke\x12\x18.pulumirpc.InvokeRequest\x1a\x19.pulumirpc.InvokeResponse"\x00\x30\x01\x12\x39\n\x04\x43\x61ll\x12\x16.pulumirpc.CallRequest\x1a\x17.pulumirpc.CallResponse"\x00\x12<\n\x05\x43heck\x12\x17.pulumirpc.CheckRequest\x1a\x18.pulumirpc.CheckResponse"\x00\x12\x39\n\x04\x44iff\x12\x16.pulumirpc.DiffRequest\x1a\x17.pulumirpc.DiffResponse"\x00\x12?\n\x06\x43reate\x12\x18.pulumirpc.CreateRequest\x1a\x19.pulumirpc.CreateResponse"\x00\x12\x39\n\x04Read\x12\x16.pulumirpc.ReadRequest\x1a\x17.pulumirpc.ReadResponse"\x00\x12?\n\x06Update\x12\x18.pulumirpc.UpdateRequest\x1a\x19.pulumirpc.UpdateResponse"\x00\x12<\n\x06\x44\x65lete\x12\x18.pulumirpc.DeleteRequest\x1a\x16.google.protobuf.Empty"\x00\x12H\n\tConstruct\x12\x1b.pulumirpc.ConstructRequest\x1a\x1c.pulumirpc.ConstructResponse"\x00\x12:\n\x06\x43\x61ncel\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty"\x00\x12@\n\rGetPluginInfo\x12\x16.google.protobuf.Empty\x1a\x15.pulumirpc.PluginInfo"\x00\x62\x06proto3', + serialized_pb=b'\n\x0eprovider.proto\x12\tpulumirpc\x1a\x0cplugin.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto"#\n\x10GetSchemaRequest\x12\x0f\n\x07version\x18\x01 \x01(\x05"#\n\x11GetSchemaResponse\x12\x0e\n\x06schema\x18\x01 \x01(\t"\xda\x01\n\x10\x43onfigureRequest\x12=\n\tvariables\x18\x01 \x03(\x0b\x32*.pulumirpc.ConfigureRequest.VariablesEntry\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x15\n\racceptSecrets\x18\x03 \x01(\x08\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x04 \x01(\x08\x1a\x30\n\x0eVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"s\n\x11\x43onfigureResponse\x12\x15\n\racceptSecrets\x18\x01 \x01(\x08\x12\x17\n\x0fsupportsPreview\x18\x02 \x01(\x08\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x03 \x01(\x08\x12\x15\n\racceptOutputs\x18\x04 \x01(\x08"\x92\x01\n\x19\x43onfigureErrorMissingKeys\x12\x44\n\x0bmissingKeys\x18\x01 \x03(\x0b\x32/.pulumirpc.ConfigureErrorMissingKeys.MissingKey\x1a/\n\nMissingKey\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t"\x80\x01\n\rInvokeRequest\x12\x0b\n\x03tok\x18\x01 \x01(\t\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructJ\x04\x08\x03\x10\x07R\x08providerR\x07versionR\x0f\x61\x63\x63\x65ptResourcesR\x11pluginDownloadURL"d\n\x0eInvokeResponse\x12\'\n\x06return\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12)\n\x08\x66\x61ilures\x18\x02 \x03(\x0b\x32\x17.pulumirpc.CheckFailure"\xa8\x04\n\x0b\x43\x61llRequest\x12\x0b\n\x03tok\x18\x01 \x01(\t\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x44\n\x0f\x61rgDependencies\x18\x03 \x03(\x0b\x32+.pulumirpc.CallRequest.ArgDependenciesEntry\x12\x10\n\x08provider\x18\x04 \x01(\t\x12\x0f\n\x07version\x18\x05 \x01(\t\x12\x19\n\x11pluginDownloadURL\x18\r \x01(\t\x12\x0f\n\x07project\x18\x06 \x01(\t\x12\r\n\x05stack\x18\x07 \x01(\t\x12\x32\n\x06\x63onfig\x18\x08 \x03(\x0b\x32".pulumirpc.CallRequest.ConfigEntry\x12\x18\n\x10\x63onfigSecretKeys\x18\t \x03(\t\x12\x0e\n\x06\x64ryRun\x18\n \x01(\x08\x12\x10\n\x08parallel\x18\x0b \x01(\x05\x12\x17\n\x0fmonitorEndpoint\x18\x0c \x01(\t\x1a$\n\x14\x41rgumentDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1a\x63\n\x14\x41rgDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.pulumirpc.CallRequest.ArgumentDependencies:\x02\x38\x01\x1a-\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xba\x02\n\x0c\x43\x61llResponse\x12\'\n\x06return\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12K\n\x12returnDependencies\x18\x02 \x03(\x0b\x32/.pulumirpc.CallResponse.ReturnDependenciesEntry\x12)\n\x08\x66\x61ilures\x18\x03 \x03(\x0b\x32\x17.pulumirpc.CheckFailure\x1a"\n\x12ReturnDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1a\x65\n\x17ReturnDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x39\n\x05value\x18\x02 \x01(\x0b\x32*.pulumirpc.CallResponse.ReturnDependencies:\x02\x38\x01"\x81\x01\n\x0c\x43heckRequest\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12%\n\x04olds\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x04news\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x16\n\x0esequenceNumber\x18\x04 \x01(\x05"c\n\rCheckResponse\x12\'\n\x06inputs\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12)\n\x08\x66\x61ilures\x18\x02 \x03(\x0b\x32\x17.pulumirpc.CheckFailure"0\n\x0c\x43heckFailure\x12\x10\n\x08property\x18\x01 \x01(\t\x12\x0e\n\x06reason\x18\x02 \x01(\t"\x8b\x01\n\x0b\x44iffRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03urn\x18\x02 \x01(\t\x12%\n\x04olds\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x04news\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x15\n\rignoreChanges\x18\x05 \x03(\t"\xaf\x01\n\x0cPropertyDiff\x12*\n\x04kind\x18\x01 \x01(\x0e\x32\x1c.pulumirpc.PropertyDiff.Kind\x12\x11\n\tinputDiff\x18\x02 \x01(\x08"`\n\x04Kind\x12\x07\n\x03\x41\x44\x44\x10\x00\x12\x0f\n\x0b\x41\x44\x44_REPLACE\x10\x01\x12\n\n\x06\x44\x45LETE\x10\x02\x12\x12\n\x0e\x44\x45LETE_REPLACE\x10\x03\x12\n\n\x06UPDATE\x10\x04\x12\x12\n\x0eUPDATE_REPLACE\x10\x05"\xfa\x02\n\x0c\x44iffResponse\x12\x10\n\x08replaces\x18\x01 \x03(\t\x12\x0f\n\x07stables\x18\x02 \x03(\t\x12\x1b\n\x13\x64\x65leteBeforeReplace\x18\x03 \x01(\x08\x12\x34\n\x07\x63hanges\x18\x04 \x01(\x0e\x32#.pulumirpc.DiffResponse.DiffChanges\x12\r\n\x05\x64iffs\x18\x05 \x03(\t\x12?\n\x0c\x64\x65tailedDiff\x18\x06 \x03(\x0b\x32).pulumirpc.DiffResponse.DetailedDiffEntry\x12\x17\n\x0fhasDetailedDiff\x18\x07 \x01(\x08\x1aL\n\x11\x44\x65tailedDiffEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.pulumirpc.PropertyDiff:\x02\x38\x01"=\n\x0b\x44iffChanges\x12\x10\n\x0c\x44IFF_UNKNOWN\x10\x00\x12\r\n\tDIFF_NONE\x10\x01\x12\r\n\tDIFF_SOME\x10\x02"k\n\rCreateRequest\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07timeout\x18\x03 \x01(\x01\x12\x0f\n\x07preview\x18\x04 \x01(\x08"I\n\x0e\x43reateResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct"|\n\x0bReadRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03urn\x18\x02 \x01(\t\x12+\n\nproperties\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\'\n\x06inputs\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct"p\n\x0cReadResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\'\n\x06inputs\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct"\xaf\x01\n\rUpdateRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03urn\x18\x02 \x01(\t\x12%\n\x04olds\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x04news\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07timeout\x18\x05 \x01(\x01\x12\x15\n\rignoreChanges\x18\x06 \x03(\t\x12\x0f\n\x07preview\x18\x07 \x01(\x08"=\n\x0eUpdateResponse\x12+\n\nproperties\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct"f\n\rDeleteRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03urn\x18\x02 \x01(\t\x12+\n\nproperties\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07timeout\x18\x04 \x01(\x01"\xce\x05\n\x10\x43onstructRequest\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\r\n\x05stack\x18\x02 \x01(\t\x12\x37\n\x06\x63onfig\x18\x03 \x03(\x0b\x32\'.pulumirpc.ConstructRequest.ConfigEntry\x12\x0e\n\x06\x64ryRun\x18\x04 \x01(\x08\x12\x10\n\x08parallel\x18\x05 \x01(\x05\x12\x17\n\x0fmonitorEndpoint\x18\x06 \x01(\t\x12\x0c\n\x04type\x18\x07 \x01(\t\x12\x0c\n\x04name\x18\x08 \x01(\t\x12\x0e\n\x06parent\x18\t \x01(\t\x12\'\n\x06inputs\x18\n \x01(\x0b\x32\x17.google.protobuf.Struct\x12M\n\x11inputDependencies\x18\x0b \x03(\x0b\x32\x32.pulumirpc.ConstructRequest.InputDependenciesEntry\x12\x0f\n\x07protect\x18\x0c \x01(\x08\x12=\n\tproviders\x18\r \x03(\x0b\x32*.pulumirpc.ConstructRequest.ProvidersEntry\x12\x0f\n\x07\x61liases\x18\x0e \x03(\t\x12\x14\n\x0c\x64\x65pendencies\x18\x0f \x03(\t\x12\x18\n\x10\x63onfigSecretKeys\x18\x10 \x03(\t\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1a-\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aj\n\x16InputDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12?\n\x05value\x18\x02 \x01(\x0b\x32\x30.pulumirpc.ConstructRequest.PropertyDependencies:\x02\x38\x01\x1a\x30\n\x0eProvidersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xab\x02\n\x11\x43onstructResponse\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12&\n\x05state\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12N\n\x11stateDependencies\x18\x03 \x03(\x0b\x32\x33.pulumirpc.ConstructResponse.StateDependenciesEntry\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1ak\n\x16StateDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.pulumirpc.ConstructResponse.PropertyDependencies:\x02\x38\x01"\x8c\x01\n\x17\x45rrorResourceInitFailed\x12\n\n\x02id\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07reasons\x18\x03 \x03(\t\x12\'\n\x06inputs\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct2\xe9\x08\n\x10ResourceProvider\x12H\n\tGetSchema\x12\x1b.pulumirpc.GetSchemaRequest\x1a\x1c.pulumirpc.GetSchemaResponse"\x00\x12\x42\n\x0b\x43heckConfig\x12\x17.pulumirpc.CheckRequest\x1a\x18.pulumirpc.CheckResponse"\x00\x12?\n\nDiffConfig\x12\x16.pulumirpc.DiffRequest\x1a\x17.pulumirpc.DiffResponse"\x00\x12H\n\tConfigure\x12\x1b.pulumirpc.ConfigureRequest\x1a\x1c.pulumirpc.ConfigureResponse"\x00\x12?\n\x06Invoke\x12\x18.pulumirpc.InvokeRequest\x1a\x19.pulumirpc.InvokeResponse"\x00\x12G\n\x0cStreamInvoke\x12\x18.pulumirpc.InvokeRequest\x1a\x19.pulumirpc.InvokeResponse"\x00\x30\x01\x12\x39\n\x04\x43\x61ll\x12\x16.pulumirpc.CallRequest\x1a\x17.pulumirpc.CallResponse"\x00\x12<\n\x05\x43heck\x12\x17.pulumirpc.CheckRequest\x1a\x18.pulumirpc.CheckResponse"\x00\x12\x39\n\x04\x44iff\x12\x16.pulumirpc.DiffRequest\x1a\x17.pulumirpc.DiffResponse"\x00\x12?\n\x06\x43reate\x12\x18.pulumirpc.CreateRequest\x1a\x19.pulumirpc.CreateResponse"\x00\x12\x39\n\x04Read\x12\x16.pulumirpc.ReadRequest\x1a\x17.pulumirpc.ReadResponse"\x00\x12?\n\x06Update\x12\x18.pulumirpc.UpdateRequest\x1a\x19.pulumirpc.UpdateResponse"\x00\x12<\n\x06\x44\x65lete\x12\x18.pulumirpc.DeleteRequest\x1a\x16.google.protobuf.Empty"\x00\x12H\n\tConstruct\x12\x1b.pulumirpc.ConstructRequest\x1a\x1c.pulumirpc.ConstructResponse"\x00\x12:\n\x06\x43\x61ncel\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty"\x00\x12@\n\rGetPluginInfo\x12\x16.google.protobuf.Empty\x1a\x15.pulumirpc.PluginInfo"\x00\x12;\n\x06\x41ttach\x12\x17.pulumirpc.PluginAttach\x1a\x16.google.protobuf.Empty"\x00\x62\x06proto3', dependencies=[ plugin__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, @@ -3760,7 +3760,7 @@ index=0, serialized_options=None, serialized_start=4688, - serialized_end=5756, + serialized_end=5817, methods=[ _descriptor.MethodDescriptor( name="GetSchema", @@ -3906,6 +3906,15 @@ output_type=plugin__pb2._PLUGININFO, serialized_options=None, ), + _descriptor.MethodDescriptor( + name="Attach", + full_name="pulumirpc.ResourceProvider.Attach", + index=16, + containing_service=None, + input_type=plugin__pb2._PLUGINATTACH, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + serialized_options=None, + ), ], ) _sym_db.RegisterServiceDescriptor(_RESOURCEPROVIDER) diff --git a/sdk/python/lib/pulumi/runtime/proto/provider_pb2_grpc.py b/sdk/python/lib/pulumi/runtime/proto/provider_pb2_grpc.py index 175a8cf147a4..a0e40ddfcf63 100644 --- a/sdk/python/lib/pulumi/runtime/proto/provider_pb2_grpc.py +++ b/sdk/python/lib/pulumi/runtime/proto/provider_pb2_grpc.py @@ -97,6 +97,11 @@ def __init__(self, channel): request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, response_deserializer=plugin__pb2.PluginInfo.FromString, ) + self.Attach = channel.unary_unary( + "/pulumirpc.ResourceProvider/Attach", + request_serializer=plugin__pb2.PluginAttach.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) class ResourceProviderServicer(object): @@ -211,6 +216,12 @@ def GetPluginInfo(self, request, context): context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") + def Attach(self, request, context): + """Attach sends the engine address to an already running plugin.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + def add_ResourceProviderServicer_to_server(servicer, server): rpc_method_handlers = { @@ -294,6 +305,11 @@ def add_ResourceProviderServicer_to_server(servicer, server): request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, response_serializer=plugin__pb2.PluginInfo.SerializeToString, ), + "Attach": grpc.unary_unary_rpc_method_handler( + servicer.Attach, + request_deserializer=plugin__pb2.PluginAttach.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( "pulumirpc.ResourceProvider", rpc_method_handlers diff --git a/tests/integration/construct_component/testcomponent-go/main.go b/tests/integration/construct_component/testcomponent-go/main.go index b1b2e69c377b..537235e1c2b4 100644 --- a/tests/integration/construct_component/testcomponent-go/main.go +++ b/tests/integration/construct_component/testcomponent-go/main.go @@ -233,6 +233,10 @@ func (p *testcomponentProvider) GetPluginInfo(context.Context, *pbempty.Empty) ( }, nil } +func (p *testcomponentProvider) Attach(ctx context.Context, req *pulumirpc.PluginAttach) (*pbempty.Empty, error) { + return &pbempty.Empty{}, nil +} + func (p *testcomponentProvider) GetSchema(ctx context.Context, req *pulumirpc.GetSchemaRequest) (*pulumirpc.GetSchemaResponse, error) { return &pulumirpc.GetSchemaResponse{}, nil diff --git a/tests/integration/construct_component_plain/testcomponent-go/main.go b/tests/integration/construct_component_plain/testcomponent-go/main.go index e83e8aea2877..fdb0da4ba239 100644 --- a/tests/integration/construct_component_plain/testcomponent-go/main.go +++ b/tests/integration/construct_component_plain/testcomponent-go/main.go @@ -199,6 +199,10 @@ func (p *testcomponentProvider) GetPluginInfo(context.Context, *pbempty.Empty) ( }, nil } +func (p *testcomponentProvider) Attach(ctx context.Context, req *pulumirpc.PluginAttach) (*pbempty.Empty, error) { + return &pbempty.Empty{}, nil +} + func (p *testcomponentProvider) GetSchema(ctx context.Context, req *pulumirpc.GetSchemaRequest) (*pulumirpc.GetSchemaResponse, error) { return &pulumirpc.GetSchemaResponse{}, nil diff --git a/tests/integration/construct_component_unknown/testcomponent-go/main.go b/tests/integration/construct_component_unknown/testcomponent-go/main.go index 6f1773f2b258..64a16ff62813 100644 --- a/tests/integration/construct_component_unknown/testcomponent-go/main.go +++ b/tests/integration/construct_component_unknown/testcomponent-go/main.go @@ -228,6 +228,10 @@ func (p *testcomponentProvider) GetPluginInfo(context.Context, *pbempty.Empty) ( }, nil } +func (p *testcomponentProvider) Attach(ctx context.Context, req *pulumirpc.PluginAttach) (*pbempty.Empty, error) { + return &pbempty.Empty{}, nil +} + func (p *testcomponentProvider) GetSchema(ctx context.Context, req *pulumirpc.GetSchemaRequest) (*pulumirpc.GetSchemaResponse, error) { return &pulumirpc.GetSchemaResponse{}, nil diff --git a/tests/testprovider/main.go b/tests/testprovider/main.go index f761174ad1a9..81d7402dd0a1 100644 --- a/tests/testprovider/main.go +++ b/tests/testprovider/main.go @@ -177,6 +177,10 @@ func (k *testproviderProvider) GetPluginInfo(context.Context, *pbempty.Empty) (* }, nil } +func (k *testproviderProvider) Attach(ctx context.Context, req *rpc.PluginAttach) (*pbempty.Empty, error) { + return &pbempty.Empty{}, nil +} + // GetSchema returns the JSON-serialized schema for the provider. func (k *testproviderProvider) GetSchema(ctx context.Context, req *rpc.GetSchemaRequest) (*rpc.GetSchemaResponse, error) {