Skip to content

Commit fbc2abd

Browse files
committed
Remove vendored plugin server
As part of #2148, this PR removes the duplicate implementation of `pulumigrpc.ResourceProviderServer` copied over from pulumi/pulumi and then modified. This is a post #2258 version of #2195, and is much less invasive. Addressing previous edits in response to #2195 (comment): - #1716: This change accommodated for a previous edit (`ProviderWithContext`) and is no longer necessary. That said, the tests it introduced are still present (and continue to pass), so we are sure this commit did not break the functionality. - #1683: Simply brings DiffConfig into line with pu/pu, which we get for free by not vendoring. - #1047: This is still handled in `provider_server.go`, and is still under test. - #1065: This has already been moved out of this area in #2258, so it is no longer relevant here.
1 parent 7864bb0 commit fbc2abd

File tree

3 files changed

+46
-702
lines changed

3 files changed

+46
-702
lines changed

pf/internal/plugin/package.go

Lines changed: 0 additions & 24 deletions
This file was deleted.

pf/internal/plugin/provider_context.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,11 @@ type ProviderWithContext interface {
8585
GetMappingsWithContext(ctx context.Context, key string) ([]string, error)
8686

8787
ParameterizeWithContext(context.Context, plugin.ParameterizeRequest) (plugin.ParameterizeResponse, error)
88+
89+
Attach(address string) error
8890
}
8991

90-
func NewProvider(p ProviderWithContext) plugin.Provider {
92+
func NewProvider(p ProviderWithContext) plugin.GrpcProvider {
9193
return &provider{ProviderWithContext: p}
9294
}
9395

@@ -98,6 +100,10 @@ type provider struct {
98100

99101
var _ plugin.Provider = (*provider)(nil)
100102

103+
func (prov *provider) Attach(address string) error {
104+
return prov.ProviderWithContext.Attach(address)
105+
}
106+
101107
func (prov *provider) Pkg() tokens.Package { return prov.ProviderWithContext.Pkg() }
102108

103109
func (prov *provider) Parameterize(

0 commit comments

Comments
 (0)