2023-12-04 15:22:44 +00:00
|
|
|
// package: pulumirpc
|
|
|
|
// file: pulumi/resource.proto
|
|
|
|
|
|
|
|
/* tslint:disable */
|
|
|
|
/* eslint-disable */
|
|
|
|
|
|
|
|
import * as grpc from "@grpc/grpc-js";
|
|
|
|
import * as pulumi_resource_pb from "./resource_pb";
|
|
|
|
import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb";
|
|
|
|
import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb";
|
|
|
|
import * as pulumi_provider_pb from "./provider_pb";
|
|
|
|
import * as pulumi_alias_pb from "./alias_pb";
|
|
|
|
import * as pulumi_source_pb from "./source_pb";
|
Engine support for remote transforms (#15290)
<!---
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->
# Description
<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->
This adds support to the engine for "remote transformations".
A transform is "remote" because it is being invoked via the engine on
receiving a resource registration, rather than being ran locally in
process before sending a resource registration. These transforms can
also span multiple process boundaries, e.g. a transform function in a
user program, then a transform function in a component library, both
running for a resource registered by another component library.
The underlying new feature here is the idea of a `Callback`. The
expectation is we're going to use callbacks for multiple features so
these are _not_ defined in terms of transformations. A callback is an
untyped byte array (usually will be a protobuf message), plus an address
to define which server should be invoked to do the callback, and a token
to identify it.
A language sdk can start up and serve a `Callbacks` service, keep a
mapping of tokens to in-process functions (currently just using UUID's
for this), and then pass that service address and token to the engine to
be invoked later on.
The engine uses these callbacks to track transformations callbacks per
resource, and on a new resource registrations invokes each relevant
callback with the resource properties and options, having new properties
and options returned that are then passed to the next relevant transform
callback until all have been called and the engine has the final
resource state and options to use.
## Checklist
- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
- [x] I have formatted my code using `gofumpt`
<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [x] I have added tests that prove my fix is effective or that my
feature works
<!---
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2024-02-21 16:30:46 +00:00
|
|
|
import * as pulumi_callback_pb from "./callback_pb";
|
2023-12-04 15:22:44 +00:00
|
|
|
|
|
|
|
interface IResourceMonitorService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
|
|
|
|
supportsFeature: IResourceMonitorService_ISupportsFeature;
|
|
|
|
invoke: IResourceMonitorService_IInvoke;
|
|
|
|
streamInvoke: IResourceMonitorService_IStreamInvoke;
|
|
|
|
call: IResourceMonitorService_ICall;
|
|
|
|
readResource: IResourceMonitorService_IReadResource;
|
|
|
|
registerResource: IResourceMonitorService_IRegisterResource;
|
|
|
|
registerResourceOutputs: IResourceMonitorService_IRegisterResourceOutputs;
|
Engine support for remote transforms (#15290)
<!---
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->
# Description
<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->
This adds support to the engine for "remote transformations".
A transform is "remote" because it is being invoked via the engine on
receiving a resource registration, rather than being ran locally in
process before sending a resource registration. These transforms can
also span multiple process boundaries, e.g. a transform function in a
user program, then a transform function in a component library, both
running for a resource registered by another component library.
The underlying new feature here is the idea of a `Callback`. The
expectation is we're going to use callbacks for multiple features so
these are _not_ defined in terms of transformations. A callback is an
untyped byte array (usually will be a protobuf message), plus an address
to define which server should be invoked to do the callback, and a token
to identify it.
A language sdk can start up and serve a `Callbacks` service, keep a
mapping of tokens to in-process functions (currently just using UUID's
for this), and then pass that service address and token to the engine to
be invoked later on.
The engine uses these callbacks to track transformations callbacks per
resource, and on a new resource registrations invokes each relevant
callback with the resource properties and options, having new properties
and options returned that are then passed to the next relevant transform
callback until all have been called and the engine has the final
resource state and options to use.
## Checklist
- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
- [x] I have formatted my code using `gofumpt`
<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [x] I have added tests that prove my fix is effective or that my
feature works
<!---
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2024-02-21 16:30:46 +00:00
|
|
|
registerStackTransform: IResourceMonitorService_IRegisterStackTransform;
|
2024-07-11 16:01:44 +00:00
|
|
|
registerStackInvokeTransform: IResourceMonitorService_IRegisterStackInvokeTransform;
|
2024-06-24 14:59:18 +00:00
|
|
|
registerPackage: IResourceMonitorService_IRegisterPackage;
|
2023-12-04 15:22:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
interface IResourceMonitorService_ISupportsFeature extends grpc.MethodDefinition<pulumi_resource_pb.SupportsFeatureRequest, pulumi_resource_pb.SupportsFeatureResponse> {
|
|
|
|
path: "/pulumirpc.ResourceMonitor/SupportsFeature";
|
|
|
|
requestStream: false;
|
|
|
|
responseStream: false;
|
|
|
|
requestSerialize: grpc.serialize<pulumi_resource_pb.SupportsFeatureRequest>;
|
|
|
|
requestDeserialize: grpc.deserialize<pulumi_resource_pb.SupportsFeatureRequest>;
|
|
|
|
responseSerialize: grpc.serialize<pulumi_resource_pb.SupportsFeatureResponse>;
|
|
|
|
responseDeserialize: grpc.deserialize<pulumi_resource_pb.SupportsFeatureResponse>;
|
|
|
|
}
|
|
|
|
interface IResourceMonitorService_IInvoke extends grpc.MethodDefinition<pulumi_resource_pb.ResourceInvokeRequest, pulumi_provider_pb.InvokeResponse> {
|
|
|
|
path: "/pulumirpc.ResourceMonitor/Invoke";
|
|
|
|
requestStream: false;
|
|
|
|
responseStream: false;
|
|
|
|
requestSerialize: grpc.serialize<pulumi_resource_pb.ResourceInvokeRequest>;
|
|
|
|
requestDeserialize: grpc.deserialize<pulumi_resource_pb.ResourceInvokeRequest>;
|
|
|
|
responseSerialize: grpc.serialize<pulumi_provider_pb.InvokeResponse>;
|
|
|
|
responseDeserialize: grpc.deserialize<pulumi_provider_pb.InvokeResponse>;
|
|
|
|
}
|
|
|
|
interface IResourceMonitorService_IStreamInvoke extends grpc.MethodDefinition<pulumi_resource_pb.ResourceInvokeRequest, pulumi_provider_pb.InvokeResponse> {
|
|
|
|
path: "/pulumirpc.ResourceMonitor/StreamInvoke";
|
|
|
|
requestStream: false;
|
|
|
|
responseStream: true;
|
|
|
|
requestSerialize: grpc.serialize<pulumi_resource_pb.ResourceInvokeRequest>;
|
|
|
|
requestDeserialize: grpc.deserialize<pulumi_resource_pb.ResourceInvokeRequest>;
|
|
|
|
responseSerialize: grpc.serialize<pulumi_provider_pb.InvokeResponse>;
|
|
|
|
responseDeserialize: grpc.deserialize<pulumi_provider_pb.InvokeResponse>;
|
|
|
|
}
|
2024-02-08 13:16:23 +00:00
|
|
|
interface IResourceMonitorService_ICall extends grpc.MethodDefinition<pulumi_resource_pb.ResourceCallRequest, pulumi_provider_pb.CallResponse> {
|
2023-12-04 15:22:44 +00:00
|
|
|
path: "/pulumirpc.ResourceMonitor/Call";
|
|
|
|
requestStream: false;
|
|
|
|
responseStream: false;
|
2024-02-08 13:16:23 +00:00
|
|
|
requestSerialize: grpc.serialize<pulumi_resource_pb.ResourceCallRequest>;
|
|
|
|
requestDeserialize: grpc.deserialize<pulumi_resource_pb.ResourceCallRequest>;
|
2023-12-04 15:22:44 +00:00
|
|
|
responseSerialize: grpc.serialize<pulumi_provider_pb.CallResponse>;
|
|
|
|
responseDeserialize: grpc.deserialize<pulumi_provider_pb.CallResponse>;
|
|
|
|
}
|
|
|
|
interface IResourceMonitorService_IReadResource extends grpc.MethodDefinition<pulumi_resource_pb.ReadResourceRequest, pulumi_resource_pb.ReadResourceResponse> {
|
|
|
|
path: "/pulumirpc.ResourceMonitor/ReadResource";
|
|
|
|
requestStream: false;
|
|
|
|
responseStream: false;
|
|
|
|
requestSerialize: grpc.serialize<pulumi_resource_pb.ReadResourceRequest>;
|
|
|
|
requestDeserialize: grpc.deserialize<pulumi_resource_pb.ReadResourceRequest>;
|
|
|
|
responseSerialize: grpc.serialize<pulumi_resource_pb.ReadResourceResponse>;
|
|
|
|
responseDeserialize: grpc.deserialize<pulumi_resource_pb.ReadResourceResponse>;
|
|
|
|
}
|
|
|
|
interface IResourceMonitorService_IRegisterResource extends grpc.MethodDefinition<pulumi_resource_pb.RegisterResourceRequest, pulumi_resource_pb.RegisterResourceResponse> {
|
|
|
|
path: "/pulumirpc.ResourceMonitor/RegisterResource";
|
|
|
|
requestStream: false;
|
|
|
|
responseStream: false;
|
|
|
|
requestSerialize: grpc.serialize<pulumi_resource_pb.RegisterResourceRequest>;
|
|
|
|
requestDeserialize: grpc.deserialize<pulumi_resource_pb.RegisterResourceRequest>;
|
|
|
|
responseSerialize: grpc.serialize<pulumi_resource_pb.RegisterResourceResponse>;
|
|
|
|
responseDeserialize: grpc.deserialize<pulumi_resource_pb.RegisterResourceResponse>;
|
|
|
|
}
|
|
|
|
interface IResourceMonitorService_IRegisterResourceOutputs extends grpc.MethodDefinition<pulumi_resource_pb.RegisterResourceOutputsRequest, google_protobuf_empty_pb.Empty> {
|
|
|
|
path: "/pulumirpc.ResourceMonitor/RegisterResourceOutputs";
|
|
|
|
requestStream: false;
|
|
|
|
responseStream: false;
|
|
|
|
requestSerialize: grpc.serialize<pulumi_resource_pb.RegisterResourceOutputsRequest>;
|
|
|
|
requestDeserialize: grpc.deserialize<pulumi_resource_pb.RegisterResourceOutputsRequest>;
|
|
|
|
responseSerialize: grpc.serialize<google_protobuf_empty_pb.Empty>;
|
|
|
|
responseDeserialize: grpc.deserialize<google_protobuf_empty_pb.Empty>;
|
|
|
|
}
|
Engine support for remote transforms (#15290)
<!---
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->
# Description
<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->
This adds support to the engine for "remote transformations".
A transform is "remote" because it is being invoked via the engine on
receiving a resource registration, rather than being ran locally in
process before sending a resource registration. These transforms can
also span multiple process boundaries, e.g. a transform function in a
user program, then a transform function in a component library, both
running for a resource registered by another component library.
The underlying new feature here is the idea of a `Callback`. The
expectation is we're going to use callbacks for multiple features so
these are _not_ defined in terms of transformations. A callback is an
untyped byte array (usually will be a protobuf message), plus an address
to define which server should be invoked to do the callback, and a token
to identify it.
A language sdk can start up and serve a `Callbacks` service, keep a
mapping of tokens to in-process functions (currently just using UUID's
for this), and then pass that service address and token to the engine to
be invoked later on.
The engine uses these callbacks to track transformations callbacks per
resource, and on a new resource registrations invokes each relevant
callback with the resource properties and options, having new properties
and options returned that are then passed to the next relevant transform
callback until all have been called and the engine has the final
resource state and options to use.
## Checklist
- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
- [x] I have formatted my code using `gofumpt`
<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [x] I have added tests that prove my fix is effective or that my
feature works
<!---
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2024-02-21 16:30:46 +00:00
|
|
|
interface IResourceMonitorService_IRegisterStackTransform extends grpc.MethodDefinition<pulumi_callback_pb.Callback, google_protobuf_empty_pb.Empty> {
|
|
|
|
path: "/pulumirpc.ResourceMonitor/RegisterStackTransform";
|
|
|
|
requestStream: false;
|
|
|
|
responseStream: false;
|
|
|
|
requestSerialize: grpc.serialize<pulumi_callback_pb.Callback>;
|
|
|
|
requestDeserialize: grpc.deserialize<pulumi_callback_pb.Callback>;
|
|
|
|
responseSerialize: grpc.serialize<google_protobuf_empty_pb.Empty>;
|
|
|
|
responseDeserialize: grpc.deserialize<google_protobuf_empty_pb.Empty>;
|
|
|
|
}
|
2024-07-11 16:01:44 +00:00
|
|
|
interface IResourceMonitorService_IRegisterStackInvokeTransform extends grpc.MethodDefinition<pulumi_callback_pb.Callback, google_protobuf_empty_pb.Empty> {
|
|
|
|
path: "/pulumirpc.ResourceMonitor/RegisterStackInvokeTransform";
|
|
|
|
requestStream: false;
|
|
|
|
responseStream: false;
|
|
|
|
requestSerialize: grpc.serialize<pulumi_callback_pb.Callback>;
|
|
|
|
requestDeserialize: grpc.deserialize<pulumi_callback_pb.Callback>;
|
|
|
|
responseSerialize: grpc.serialize<google_protobuf_empty_pb.Empty>;
|
|
|
|
responseDeserialize: grpc.deserialize<google_protobuf_empty_pb.Empty>;
|
|
|
|
}
|
2024-06-24 14:59:18 +00:00
|
|
|
interface IResourceMonitorService_IRegisterPackage extends grpc.MethodDefinition<pulumi_resource_pb.RegisterPackageRequest, pulumi_resource_pb.RegisterPackageResponse> {
|
|
|
|
path: "/pulumirpc.ResourceMonitor/RegisterPackage";
|
RegisterProvider engine work (#16241)
<!---
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->
# Description
<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->
This adds support for a `RegisterProvider` method to the engine. This
allows an SDK process to send the information for a package (name,
version, url, etc, and parameter in the future) and get back a UUID for
that run of the engine that can be used to re-lookup that information.
That allows the SDK to just send the `provider` field in
`RegisterResourceRequest` instead of filling in `version`,
`pluginDownloadURL` etc (and importantly not having to fill in
`parameter` for parameterised providers, which could be a large amount
of data).
This doesn't update any of the SDKs to yet use this method. We can do
that piecemeal, but it will require core sdk and codegen changes for
each language.
## Checklist
- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
- [x] I have formatted my code using `gofumpt`
<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [x] I have added tests that prove my fix is effective or that my
feature works
<!---
User-facing changes require a CHANGELOG entry.
-->
- [ ] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2024-05-23 06:16:59 +00:00
|
|
|
requestStream: false;
|
|
|
|
responseStream: false;
|
2024-06-24 14:59:18 +00:00
|
|
|
requestSerialize: grpc.serialize<pulumi_resource_pb.RegisterPackageRequest>;
|
|
|
|
requestDeserialize: grpc.deserialize<pulumi_resource_pb.RegisterPackageRequest>;
|
|
|
|
responseSerialize: grpc.serialize<pulumi_resource_pb.RegisterPackageResponse>;
|
|
|
|
responseDeserialize: grpc.deserialize<pulumi_resource_pb.RegisterPackageResponse>;
|
RegisterProvider engine work (#16241)
<!---
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->
# Description
<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->
This adds support for a `RegisterProvider` method to the engine. This
allows an SDK process to send the information for a package (name,
version, url, etc, and parameter in the future) and get back a UUID for
that run of the engine that can be used to re-lookup that information.
That allows the SDK to just send the `provider` field in
`RegisterResourceRequest` instead of filling in `version`,
`pluginDownloadURL` etc (and importantly not having to fill in
`parameter` for parameterised providers, which could be a large amount
of data).
This doesn't update any of the SDKs to yet use this method. We can do
that piecemeal, but it will require core sdk and codegen changes for
each language.
## Checklist
- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
- [x] I have formatted my code using `gofumpt`
<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [x] I have added tests that prove my fix is effective or that my
feature works
<!---
User-facing changes require a CHANGELOG entry.
-->
- [ ] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2024-05-23 06:16:59 +00:00
|
|
|
}
|
2023-12-04 15:22:44 +00:00
|
|
|
|
|
|
|
export const ResourceMonitorService: IResourceMonitorService;
|
|
|
|
|
|
|
|
export interface IResourceMonitorServer extends grpc.UntypedServiceImplementation {
|
|
|
|
supportsFeature: grpc.handleUnaryCall<pulumi_resource_pb.SupportsFeatureRequest, pulumi_resource_pb.SupportsFeatureResponse>;
|
|
|
|
invoke: grpc.handleUnaryCall<pulumi_resource_pb.ResourceInvokeRequest, pulumi_provider_pb.InvokeResponse>;
|
|
|
|
streamInvoke: grpc.handleServerStreamingCall<pulumi_resource_pb.ResourceInvokeRequest, pulumi_provider_pb.InvokeResponse>;
|
2024-02-08 13:16:23 +00:00
|
|
|
call: grpc.handleUnaryCall<pulumi_resource_pb.ResourceCallRequest, pulumi_provider_pb.CallResponse>;
|
2023-12-04 15:22:44 +00:00
|
|
|
readResource: grpc.handleUnaryCall<pulumi_resource_pb.ReadResourceRequest, pulumi_resource_pb.ReadResourceResponse>;
|
|
|
|
registerResource: grpc.handleUnaryCall<pulumi_resource_pb.RegisterResourceRequest, pulumi_resource_pb.RegisterResourceResponse>;
|
|
|
|
registerResourceOutputs: grpc.handleUnaryCall<pulumi_resource_pb.RegisterResourceOutputsRequest, google_protobuf_empty_pb.Empty>;
|
Engine support for remote transforms (#15290)
<!---
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->
# Description
<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->
This adds support to the engine for "remote transformations".
A transform is "remote" because it is being invoked via the engine on
receiving a resource registration, rather than being ran locally in
process before sending a resource registration. These transforms can
also span multiple process boundaries, e.g. a transform function in a
user program, then a transform function in a component library, both
running for a resource registered by another component library.
The underlying new feature here is the idea of a `Callback`. The
expectation is we're going to use callbacks for multiple features so
these are _not_ defined in terms of transformations. A callback is an
untyped byte array (usually will be a protobuf message), plus an address
to define which server should be invoked to do the callback, and a token
to identify it.
A language sdk can start up and serve a `Callbacks` service, keep a
mapping of tokens to in-process functions (currently just using UUID's
for this), and then pass that service address and token to the engine to
be invoked later on.
The engine uses these callbacks to track transformations callbacks per
resource, and on a new resource registrations invokes each relevant
callback with the resource properties and options, having new properties
and options returned that are then passed to the next relevant transform
callback until all have been called and the engine has the final
resource state and options to use.
## Checklist
- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
- [x] I have formatted my code using `gofumpt`
<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [x] I have added tests that prove my fix is effective or that my
feature works
<!---
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2024-02-21 16:30:46 +00:00
|
|
|
registerStackTransform: grpc.handleUnaryCall<pulumi_callback_pb.Callback, google_protobuf_empty_pb.Empty>;
|
2024-07-11 16:01:44 +00:00
|
|
|
registerStackInvokeTransform: grpc.handleUnaryCall<pulumi_callback_pb.Callback, google_protobuf_empty_pb.Empty>;
|
2024-06-24 14:59:18 +00:00
|
|
|
registerPackage: grpc.handleUnaryCall<pulumi_resource_pb.RegisterPackageRequest, pulumi_resource_pb.RegisterPackageResponse>;
|
2023-12-04 15:22:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IResourceMonitorClient {
|
|
|
|
supportsFeature(request: pulumi_resource_pb.SupportsFeatureRequest, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.SupportsFeatureResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
supportsFeature(request: pulumi_resource_pb.SupportsFeatureRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.SupportsFeatureResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
supportsFeature(request: pulumi_resource_pb.SupportsFeatureRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.SupportsFeatureResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
invoke(request: pulumi_resource_pb.ResourceInvokeRequest, callback: (error: grpc.ServiceError | null, response: pulumi_provider_pb.InvokeResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
invoke(request: pulumi_resource_pb.ResourceInvokeRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: pulumi_provider_pb.InvokeResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
invoke(request: pulumi_resource_pb.ResourceInvokeRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: pulumi_provider_pb.InvokeResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
streamInvoke(request: pulumi_resource_pb.ResourceInvokeRequest, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<pulumi_provider_pb.InvokeResponse>;
|
|
|
|
streamInvoke(request: pulumi_resource_pb.ResourceInvokeRequest, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<pulumi_provider_pb.InvokeResponse>;
|
2024-02-08 13:16:23 +00:00
|
|
|
call(request: pulumi_resource_pb.ResourceCallRequest, callback: (error: grpc.ServiceError | null, response: pulumi_provider_pb.CallResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
call(request: pulumi_resource_pb.ResourceCallRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: pulumi_provider_pb.CallResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
call(request: pulumi_resource_pb.ResourceCallRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: pulumi_provider_pb.CallResponse) => void): grpc.ClientUnaryCall;
|
2023-12-04 15:22:44 +00:00
|
|
|
readResource(request: pulumi_resource_pb.ReadResourceRequest, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.ReadResourceResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
readResource(request: pulumi_resource_pb.ReadResourceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.ReadResourceResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
readResource(request: pulumi_resource_pb.ReadResourceRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.ReadResourceResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
registerResource(request: pulumi_resource_pb.RegisterResourceRequest, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.RegisterResourceResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
registerResource(request: pulumi_resource_pb.RegisterResourceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.RegisterResourceResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
registerResource(request: pulumi_resource_pb.RegisterResourceRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.RegisterResourceResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
registerResourceOutputs(request: pulumi_resource_pb.RegisterResourceOutputsRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
|
|
|
registerResourceOutputs(request: pulumi_resource_pb.RegisterResourceOutputsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
|
|
|
registerResourceOutputs(request: pulumi_resource_pb.RegisterResourceOutputsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
Engine support for remote transforms (#15290)
<!---
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->
# Description
<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->
This adds support to the engine for "remote transformations".
A transform is "remote" because it is being invoked via the engine on
receiving a resource registration, rather than being ran locally in
process before sending a resource registration. These transforms can
also span multiple process boundaries, e.g. a transform function in a
user program, then a transform function in a component library, both
running for a resource registered by another component library.
The underlying new feature here is the idea of a `Callback`. The
expectation is we're going to use callbacks for multiple features so
these are _not_ defined in terms of transformations. A callback is an
untyped byte array (usually will be a protobuf message), plus an address
to define which server should be invoked to do the callback, and a token
to identify it.
A language sdk can start up and serve a `Callbacks` service, keep a
mapping of tokens to in-process functions (currently just using UUID's
for this), and then pass that service address and token to the engine to
be invoked later on.
The engine uses these callbacks to track transformations callbacks per
resource, and on a new resource registrations invokes each relevant
callback with the resource properties and options, having new properties
and options returned that are then passed to the next relevant transform
callback until all have been called and the engine has the final
resource state and options to use.
## Checklist
- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
- [x] I have formatted my code using `gofumpt`
<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [x] I have added tests that prove my fix is effective or that my
feature works
<!---
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2024-02-21 16:30:46 +00:00
|
|
|
registerStackTransform(request: pulumi_callback_pb.Callback, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
|
|
|
registerStackTransform(request: pulumi_callback_pb.Callback, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
|
|
|
registerStackTransform(request: pulumi_callback_pb.Callback, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
2024-07-11 16:01:44 +00:00
|
|
|
registerStackInvokeTransform(request: pulumi_callback_pb.Callback, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
|
|
|
registerStackInvokeTransform(request: pulumi_callback_pb.Callback, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
|
|
|
registerStackInvokeTransform(request: pulumi_callback_pb.Callback, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
2024-06-24 14:59:18 +00:00
|
|
|
registerPackage(request: pulumi_resource_pb.RegisterPackageRequest, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.RegisterPackageResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
registerPackage(request: pulumi_resource_pb.RegisterPackageRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.RegisterPackageResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
registerPackage(request: pulumi_resource_pb.RegisterPackageRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.RegisterPackageResponse) => void): grpc.ClientUnaryCall;
|
2023-12-04 15:22:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export class ResourceMonitorClient extends grpc.Client implements IResourceMonitorClient {
|
|
|
|
constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial<grpc.ClientOptions>);
|
|
|
|
public supportsFeature(request: pulumi_resource_pb.SupportsFeatureRequest, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.SupportsFeatureResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
public supportsFeature(request: pulumi_resource_pb.SupportsFeatureRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.SupportsFeatureResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
public supportsFeature(request: pulumi_resource_pb.SupportsFeatureRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.SupportsFeatureResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
public invoke(request: pulumi_resource_pb.ResourceInvokeRequest, callback: (error: grpc.ServiceError | null, response: pulumi_provider_pb.InvokeResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
public invoke(request: pulumi_resource_pb.ResourceInvokeRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: pulumi_provider_pb.InvokeResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
public invoke(request: pulumi_resource_pb.ResourceInvokeRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: pulumi_provider_pb.InvokeResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
public streamInvoke(request: pulumi_resource_pb.ResourceInvokeRequest, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<pulumi_provider_pb.InvokeResponse>;
|
|
|
|
public streamInvoke(request: pulumi_resource_pb.ResourceInvokeRequest, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<pulumi_provider_pb.InvokeResponse>;
|
2024-02-08 13:16:23 +00:00
|
|
|
public call(request: pulumi_resource_pb.ResourceCallRequest, callback: (error: grpc.ServiceError | null, response: pulumi_provider_pb.CallResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
public call(request: pulumi_resource_pb.ResourceCallRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: pulumi_provider_pb.CallResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
public call(request: pulumi_resource_pb.ResourceCallRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: pulumi_provider_pb.CallResponse) => void): grpc.ClientUnaryCall;
|
2023-12-04 15:22:44 +00:00
|
|
|
public readResource(request: pulumi_resource_pb.ReadResourceRequest, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.ReadResourceResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
public readResource(request: pulumi_resource_pb.ReadResourceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.ReadResourceResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
public readResource(request: pulumi_resource_pb.ReadResourceRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.ReadResourceResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
public registerResource(request: pulumi_resource_pb.RegisterResourceRequest, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.RegisterResourceResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
public registerResource(request: pulumi_resource_pb.RegisterResourceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.RegisterResourceResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
public registerResource(request: pulumi_resource_pb.RegisterResourceRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.RegisterResourceResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
public registerResourceOutputs(request: pulumi_resource_pb.RegisterResourceOutputsRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
|
|
|
public registerResourceOutputs(request: pulumi_resource_pb.RegisterResourceOutputsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
|
|
|
public registerResourceOutputs(request: pulumi_resource_pb.RegisterResourceOutputsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
Engine support for remote transforms (#15290)
<!---
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->
# Description
<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->
This adds support to the engine for "remote transformations".
A transform is "remote" because it is being invoked via the engine on
receiving a resource registration, rather than being ran locally in
process before sending a resource registration. These transforms can
also span multiple process boundaries, e.g. a transform function in a
user program, then a transform function in a component library, both
running for a resource registered by another component library.
The underlying new feature here is the idea of a `Callback`. The
expectation is we're going to use callbacks for multiple features so
these are _not_ defined in terms of transformations. A callback is an
untyped byte array (usually will be a protobuf message), plus an address
to define which server should be invoked to do the callback, and a token
to identify it.
A language sdk can start up and serve a `Callbacks` service, keep a
mapping of tokens to in-process functions (currently just using UUID's
for this), and then pass that service address and token to the engine to
be invoked later on.
The engine uses these callbacks to track transformations callbacks per
resource, and on a new resource registrations invokes each relevant
callback with the resource properties and options, having new properties
and options returned that are then passed to the next relevant transform
callback until all have been called and the engine has the final
resource state and options to use.
## Checklist
- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
- [x] I have formatted my code using `gofumpt`
<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [x] I have added tests that prove my fix is effective or that my
feature works
<!---
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2024-02-21 16:30:46 +00:00
|
|
|
public registerStackTransform(request: pulumi_callback_pb.Callback, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
|
|
|
public registerStackTransform(request: pulumi_callback_pb.Callback, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
|
|
|
public registerStackTransform(request: pulumi_callback_pb.Callback, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
2024-07-11 16:01:44 +00:00
|
|
|
public registerStackInvokeTransform(request: pulumi_callback_pb.Callback, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
|
|
|
public registerStackInvokeTransform(request: pulumi_callback_pb.Callback, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
|
|
|
public registerStackInvokeTransform(request: pulumi_callback_pb.Callback, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
|
2024-06-24 14:59:18 +00:00
|
|
|
public registerPackage(request: pulumi_resource_pb.RegisterPackageRequest, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.RegisterPackageResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
public registerPackage(request: pulumi_resource_pb.RegisterPackageRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.RegisterPackageResponse) => void): grpc.ClientUnaryCall;
|
|
|
|
public registerPackage(request: pulumi_resource_pb.RegisterPackageRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: pulumi_resource_pb.RegisterPackageResponse) => void): grpc.ClientUnaryCall;
|
2023-12-04 15:22:44 +00:00
|
|
|
}
|