Visitar URL original
Don't run `GetRequiredPackages` on attached providers (#24604) · pulumi/pulumi@bbff193 · GitHub
Skip to content

Commit bbff193

Browse files
authored
Don't run GetRequiredPackages on attached providers (#24604)
Take 2 on #24572: making sure `pulumi install` works as expected on attached providers.
1 parent 1b991f9 commit bbff193

34 files changed

Lines changed: 320 additions & 173 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
component: cli
2+
kind: fix
3+
body: Fix `pulumi install` for a project that requires a resource provider attached
4+
through PULUMI_DEBUG_PROVIDERS
5+
time: 2026-09-09T00:00:00Z

‎pkg/cmd/pulumi/packageinstallation/invariant_test.go‎

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232
"github.com/stretchr/testify/assert"
3333

3434
"github.com/pulumi/pulumi/pkg/v3/cmd/pulumi/packageinstallation"
35+
"github.com/pulumi/pulumi/pkg/v3/pluginstorage"
3536
"github.com/pulumi/pulumi/pkg/v3/resource/plugin"
3637
pkgWorkspace "github.com/pulumi/pulumi/pkg/v3/workspace"
3738
"github.com/pulumi/pulumi/sdk/v3/go/common/workspace"
@@ -106,7 +107,7 @@ type invariantWorkDir struct{ linked []string }
106107
type invariantPlugin struct {
107108
d workspace.PluginDescriptor
108109
downloaded bool
109-
installed bool
110+
state pluginstorage.InstallState
110111
pathVisible bool
111112
hasBinary bool
112113
projectDetected bool
@@ -117,19 +118,22 @@ type invariantPlugin struct {
117118
linked []string
118119
}
119120

120-
func (w invariantWorkspace) HasPlugin(ctx context.Context, spec workspace.PluginDescriptor) bool {
121+
func (w invariantWorkspace) HasPlugin(
122+
ctx context.Context, spec workspace.PluginDescriptor,
123+
) pluginstorage.InstallState {
121124
w.rw.RLock()
122125
defer w.rw.RUnlock()
126+
state := pluginstorage.PluginNotInstalled
123127
for _, candidate := range w.plugins {
124-
if candidate.installed &&
125-
candidate.d.Name == spec.Name &&
128+
if candidate.d.Name == spec.Name &&
129+
candidate.state.Available() &&
126130
candidate.d.Kind == spec.Kind &&
127131
(candidate.d.Version == nil && spec.Version == nil ||
128132
(candidate.d.Version != nil && spec.Version != nil && candidate.d.Version.EQ(*spec.Version))) {
129-
return true
133+
return candidate.state
130134
}
131135
}
132-
return false
136+
return state
133137
}
134138

135139
func (w invariantWorkspace) HasPluginGTE(
@@ -139,7 +143,7 @@ func (w invariantWorkspace) HasPluginGTE(
139143

140144
var gte *workspace.PluginDescriptor
141145
for _, candidate := range w.plugins {
142-
if candidate.installed &&
146+
if candidate.state == pluginstorage.PluginInstalled &&
143147
candidate.d.Name == spec.Name &&
144148
candidate.d.Kind == spec.Kind && candidate.d.Version != nil {
145149
if gte == nil {
@@ -156,7 +160,7 @@ func (w invariantWorkspace) HasPluginGTE(
156160
if gte == nil {
157161
// We have found a version with no version
158162
spec.Version = nil
159-
if w.HasPlugin(ctx, spec) {
163+
if w.HasPlugin(ctx, spec).Available() {
160164
return true, nil, nil
161165
}
162166
return false, nil, nil
@@ -209,8 +213,9 @@ func (w invariantWorkspace) InstallPluginAt(
209213
assert.Failf(w.t, "", "InstallPluginAt(%q) called on non-revealed plugin dir", dirPath)
210214
return assert.AnError
211215
}
212-
assert.False(w.t, p.installed, "InstallPluginAt(%q) called in already installed dir", dirPath)
213-
p.installed = true
216+
assert.Equal(w.t, pluginstorage.PluginNotInstalled, p.state,
217+
"InstallPluginAt(%q) called in already installed dir", dirPath)
218+
p.state = pluginstorage.PluginInstalled
214219
return nil
215220
}
216221

@@ -367,9 +372,10 @@ func (w invariantWorkspace) GetRequiredPackages(
367372
assert.Failf(w.t, "", "GetRequiredPackages(%q) called on non-visible plugin", dirPath)
368373
return nil, nil, assert.AnError
369374
}
370-
// A runtime reads a plugin's dependencies from what its install produced,
371-
// so the plugin must be installed before it is asked for them.
372-
if !pl.installed {
375+
// A language runtime reads a plugin's dependencies from what its install produced, so the plugin must be
376+
// installed before it is asked for them. Attached providers cannot be read by the language runtime, and so
377+
// GetRequiredPackages must not be called on them.
378+
if pl.state != pluginstorage.PluginInstalled {
373379
assert.Failf(w.t, "", "GetRequiredPackages(%q) called on a plugin that is not installed", dirPath)
374380
return nil, nil, assert.AnError
375381
}
@@ -401,9 +407,9 @@ func (w invariantWorkspace) RunPackage(
401407
pluginPath, slices.Collect(maps.Keys(w.plugins)))
402408
return nil, assert.AnError
403409
}
404-
if !pl.installed && pl.project != nil {
405-
assert.Failf(w.t, "", "Missing setup for %q (installed=%t) (project=%t)",
406-
pluginPath, pl.installed, pl.project != nil)
410+
if pl.state != pluginstorage.PluginInstalled && pl.project != nil {
411+
assert.Failf(w.t, "", "Missing setup for %q (installed=%#v) (project=%t)",
412+
pluginPath, pl.state, pl.project != nil)
407413
return nil, assert.AnError
408414
}
409415
return invariantProvider{path: pluginPath, params: params}, nil

‎pkg/cmd/pulumi/packageinstallation/packageinstallation.go‎

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -196,16 +196,16 @@ func InstallPluginSet(
196196
continue
197197
}
198198

199-
installed, version, err := packageresolution.IsPluginInstalled(ctx,
199+
installState, version, err := packageresolution.GetInstallState(ctx,
200200
resolved.PluginDescriptor, ws, options.Options)
201201
if err != nil {
202202
return err
203203
}
204-
if installed && version != nil {
204+
if installState.Available() && version != nil {
205205
resolved.Version = version
206206
}
207207
err = enqueueResolvedProjectDescriptor(ctx, state,
208-
resolved.PluginDescriptor, new(runBundle), root, installed)
208+
resolved.PluginDescriptor, new(runBundle), root, installState)
209209
if err != nil {
210210
return err
211211
}
@@ -637,7 +637,8 @@ func ensureProjectDir(
637637

638638
func enqueueResolvedProjectDescriptor(
639639
ctx context.Context, p state,
640-
descriptor workspace.PluginDescriptor, runBundleOut *runBundle, parent pdag.Node, installed bool,
640+
descriptor workspace.PluginDescriptor, runBundleOut *runBundle, parent pdag.Node,
641+
installState pluginstorage.InstallState,
641642
) error {
642643
specFinished, specReady, isDuplicate, err := newSpecNode(
643644
hashPluginSpec(descriptor), descriptor, runBundleOut, p, parent)
@@ -648,7 +649,14 @@ func enqueueResolvedProjectDescriptor(
648649
return nil
649650
}
650651

651-
if installed {
652+
// An attached plugin already runs, so it has nothing to download and no directory in
653+
// the plugin cache to install from.
654+
if installState == pluginstorage.PluginAttached {
655+
specReady()
656+
return nil
657+
}
658+
659+
if installState == pluginstorage.PluginInstalled {
652660
defer specReady()
653661
pluginDir, err := p.ws.GetPluginPath(ctx, descriptor)
654662
if err != nil {
@@ -926,7 +934,7 @@ func (step resolveStep) run(ctx context.Context, p state) error {
926934
}
927935

928936
return enqueueResolvedProjectDescriptor(ctx, p, result.Pkg.PluginDescriptor,
929-
step.runBundleOut, step.parent, result.InstalledInWorkspace)
937+
step.runBundleOut, step.parent, result.InstallState)
930938

931939
case packageresolution.PluginResolution:
932940
*step.resolvedSpec = result.Spec
@@ -939,7 +947,7 @@ func (step resolveStep) run(ctx context.Context, p state) error {
939947
}
940948

941949
return enqueueResolvedProjectDescriptor(ctx, p, result.Pkg.PluginDescriptor,
942-
step.runBundleOut, step.parent, result.InstalledInWorkspace)
950+
step.runBundleOut, step.parent, result.InstallState)
943951
default:
944952
panic(fmt.Sprintf("unexpected package resolution result of type %T: %[1]s", result))
945953
}
@@ -1040,7 +1048,7 @@ func (step gatherPackageDependenciesStep) run(ctx context.Context, p state) erro
10401048
}
10411049
defer ready()
10421050

1043-
if p.ws.HasPlugin(ctx, pkg.PluginDescriptor) {
1051+
if p.ws.HasPlugin(ctx, pkg.PluginDescriptor).Available() {
10441052
continue
10451053
}
10461054

‎pkg/cmd/pulumi/packageinstallation/packageinstallation_test.go‎

Lines changed: 56 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
"github.com/pulumi/pulumi/pkg/v3/cmd/pulumi/packageinstallation"
2828
"github.com/pulumi/pulumi/pkg/v3/cmd/pulumi/packageresolution"
2929
"github.com/pulumi/pulumi/pkg/v3/cmd/pulumi/packageworkspace"
30+
"github.com/pulumi/pulumi/pkg/v3/pluginstorage"
3031
"github.com/pulumi/pulumi/pkg/v3/registry"
3132
"github.com/pulumi/pulumi/sdk/v3/go/common/apitype"
3233
"github.com/pulumi/pulumi/sdk/v3/go/common/workspace"
@@ -48,7 +49,7 @@ func TestInstallAlreadyInstalledPackage(t *testing.T) {
4849
Kind: apitype.ResourcePlugin,
4950
},
5051
downloaded: true,
51-
installed: true,
52+
state: pluginstorage.PluginInstalled,
5253
hasBinary: true,
5354
},
5455
})
@@ -83,7 +84,7 @@ func TestInstallAlreadyInstalledPlugin(t *testing.T) {
8384
Kind: apitype.ResourcePlugin,
8485
},
8586
downloaded: true,
86-
installed: true,
87+
state: pluginstorage.PluginInstalled,
8788
hasBinary: true,
8889
},
8990
})
@@ -115,7 +116,7 @@ func TestDoNotInstallDependenciesOfAlreadyInstalledPackage(t *testing.T) {
115116
Kind: apitype.ResourcePlugin,
116117
},
117118
downloaded: true,
118-
installed: true,
119+
state: pluginstorage.PluginInstalled,
119120
project: &workspace.PluginProject{
120121
Runtime: workspace.NewProjectRuntimeInfo("go", nil),
121122
Packages: map[string]workspace.PackageSpec{
@@ -910,9 +911,11 @@ func TestInstallPluginWithMultipleVersions(t *testing.T) {
910911
pluginBPath := "$HOME/.pulumi/plugins/resource-plugin-b"
911912

912913
require.True(t, ws.plugins[sharedV1Path].downloaded, "shared-plugin v1.0.0 should be downloaded")
913-
require.True(t, ws.plugins[sharedV1Path].installed, "shared-plugin v1.0.0 should be installed")
914+
require.Equal(t, pluginstorage.PluginInstalled, ws.plugins[sharedV1Path].state,
915+
"shared-plugin v1.0.0 should be installed")
914916
require.True(t, ws.plugins[sharedV2Path].downloaded, "shared-plugin v2.0.0 should be downloaded")
915-
require.True(t, ws.plugins[sharedV2Path].installed, "shared-plugin v2.0.0 should be installed")
917+
require.Equal(t, pluginstorage.PluginInstalled, ws.plugins[sharedV2Path].state,
918+
"shared-plugin v2.0.0 should be installed")
916919

917920
// Verify that plugin-a is linked to v1.0.0 and plugin-b is linked to v2.0.0
918921
require.Contains(t, ws.plugins[pluginAPath].linked, sharedV1Path+"/sdk-<nil>",
@@ -1333,9 +1336,10 @@ func TestInstallPluginWithRequiredPackages(t *testing.T) {
13331336
pluginBPath := "$HOME/.pulumi/plugins/resource-plugin-b-v2.0.0"
13341337

13351338
require.True(t, ws.plugins[pluginAPath].downloaded, "plugin-a should be downloaded")
1336-
require.True(t, ws.plugins[pluginAPath].installed, "plugin-a should be installed")
1339+
require.Equal(t, pluginstorage.PluginInstalled, ws.plugins[pluginAPath].state, "plugin-a should be installed")
13371340
require.True(t, ws.plugins[pluginBPath].downloaded, "plugin-b should be downloaded (as a required package)")
1338-
require.True(t, ws.plugins[pluginBPath].installed, "plugin-b should be installed (as a required package)")
1341+
require.Equal(t, pluginstorage.PluginInstalled, ws.plugins[pluginBPath].state,
1342+
"plugin-b should be installed (as a required package)")
13391343
}
13401344

13411345
// TestInstallPluginWithRequiredPackageSpecs tests that the package specs returned as the
@@ -1406,9 +1410,10 @@ func TestInstallPluginWithRequiredPackageSpecs(t *testing.T) {
14061410
pluginBPath := "$HOME/.pulumi/plugins/resource-plugin-b-v2.0.0"
14071411

14081412
require.True(t, ws.plugins[pluginAPath].downloaded, "plugin-a should be downloaded")
1409-
require.True(t, ws.plugins[pluginAPath].installed, "plugin-a should be installed")
1413+
require.Equal(t, pluginstorage.PluginInstalled, ws.plugins[pluginAPath].state, "plugin-a should be installed")
14101414
require.True(t, ws.plugins[pluginBPath].downloaded, "plugin-b should be downloaded (as a required spec)")
1411-
require.True(t, ws.plugins[pluginBPath].installed, "plugin-b should be installed (as a required spec)")
1415+
require.Equal(t, pluginstorage.PluginInstalled, ws.plugins[pluginBPath].state,
1416+
"plugin-b should be installed (as a required spec)")
14121417

14131418
require.Contains(t, ws.plugins[pluginAPath].linked, pluginBPath+"/sdk-<nil>",
14141419
"plugin-a should have a local SDK for plugin-b linked in (as a required spec)")
@@ -1726,9 +1731,9 @@ func TestInstallSharedDependencyInParallel(t *testing.T) {
17261731
pluginCSDK := "$HOME/.pulumi/plugins/resource-plugin-c/sdk-<nil>"
17271732
pluginDSDK := "$HOME/.pulumi/plugins/resource-plugin-d/sdk-<nil>"
17281733

1729-
require.True(t, baselineWs.plugins[componentAPath].installed,
1734+
require.Equal(t, pluginstorage.PluginInstalled, baselineWs.plugins[componentAPath].state,
17301735
"component-a should be installed in baseline")
1731-
require.True(t, baselineWs.plugins[componentBPath].installed,
1736+
require.Equal(t, pluginstorage.PluginInstalled, baselineWs.plugins[componentBPath].state,
17321737
"component-b should be installed in baseline")
17331738

17341739
require.Contains(t, baselineWs.plugins[componentAPath].linked, pluginCSDK,
@@ -1838,9 +1843,9 @@ func TestRequiredPackagesDeclaredInProjectPackagesNotDownloaded(t *testing.T) {
18381843
providerPath := "/work/provider"
18391844
providerNestedPath := "/work/provider-nested"
18401845

1841-
require.True(t, ws.plugins[providerPath].installed,
1846+
require.Equal(t, pluginstorage.PluginInstalled, ws.plugins[providerPath].state,
18421847
"provider should be installed")
1843-
require.True(t, ws.plugins[providerNestedPath].installed,
1848+
require.Equal(t, pluginstorage.PluginInstalled, ws.plugins[providerNestedPath].state,
18441849
"provider-nested should be installed (via provider's packages)")
18451850
}
18461851

@@ -1906,6 +1911,44 @@ func TestInstallPluginSet(t *testing.T) {
19061911
require.True(t, ws.plugins[specPath].downloaded, "spec plugin should be downloaded")
19071912
}
19081913

1914+
// A provider that is attached with PULUMI_DEBUG_PROVIDERS already runs. It has no
1915+
// directory in the plugin cache, so the install must not download it or look for its
1916+
// path on disk.
1917+
func TestInstallPluginSetAttachedProvider(t *testing.T) {
1918+
t.Parallel()
1919+
1920+
attached := workspace.PluginDescriptor{
1921+
Name: "attached-provider",
1922+
Kind: apitype.ResourcePlugin,
1923+
}
1924+
ws := newInvariantWorkspace(t, []string{"/project"}, nil, []invariantPlugin{
1925+
{d: attached, state: pluginstorage.PluginAttached},
1926+
})
1927+
1928+
rws := &recordingWorkspace{ws, nil}
1929+
defer rws.save(t)
1930+
1931+
_, err := packageinstallation.InstallPluginSet(t.Context(),
1932+
[]workspace.PackageDescriptor{{PluginDescriptor: attached}},
1933+
nil,
1934+
&workspace.Project{
1935+
Name: "test-project",
1936+
Runtime: workspace.NewProjectRuntimeInfo("go", nil),
1937+
}, "/project", packageinstallation.Options{
1938+
Options: packageresolution.Options{
1939+
ResolveVersionWithLocalWorkspace: true,
1940+
AllowNonInvertableLocalWorkspaceResolution: true,
1941+
},
1942+
Concurrency: 1,
1943+
}, nil, rws)
1944+
require.NoError(t, err)
1945+
1946+
assert.Equal(t, invariantPlugin{
1947+
d: attached,
1948+
state: pluginstorage.PluginAttached,
1949+
}, *ws.plugins["$HOME/.pulumi/plugins/resource-attached-provider"])
1950+
}
1951+
19091952
// TestInstallPluginSetRemotePackageOverride checks that a remote (registry)
19101953
// package in the project's `packages:` block - the kind written by `pulumi
19111954
// package add` - is installed via the normal descriptor download path rather

‎pkg/cmd/pulumi/packageinstallation/record_test.go‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232
"github.com/stretchr/testify/require"
3333

3434
"github.com/pulumi/pulumi/pkg/v3/cmd/pulumi/packageinstallation"
35+
"github.com/pulumi/pulumi/pkg/v3/pluginstorage"
3536
"github.com/pulumi/pulumi/pkg/v3/resource/plugin"
3637
pkgWorkspace "github.com/pulumi/pulumi/pkg/v3/workspace"
3738
"github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil"
@@ -93,7 +94,9 @@ func (w *recordingWorkspace) finish(args ...any) {
9394
w.steps[len(w.steps)-1] += formatArgs(args)
9495
}
9596

96-
func (w *recordingWorkspace) HasPlugin(ctx context.Context, spec workspace.PluginDescriptor) bool {
97+
func (w *recordingWorkspace) HasPlugin(
98+
ctx context.Context, spec workspace.PluginDescriptor,
99+
) pluginstorage.InstallState {
97100
w.start("HasPlugin", spec)
98101
result := w.w.HasPlugin(ctx, spec)
99102
w.finish(result)
@@ -251,13 +254,18 @@ func formatArgs(args []any) string {
251254
}
252255

253256
func formatValue(v reflect.Value) string {
254-
// Special case: context.Context - just show "ctx"
255257
if !v.IsValid() {
256258
return "nil"
257259
}
260+
// Special case: context.Context - just show "ctx"
258261
if v.Type().Implements(reflect.TypeFor[context.Context]()) {
259262
return "ctx"
260263
}
264+
if v.CanInterface() {
265+
if state, ok := reflect.TypeAssert[fmt.GoStringer](v); ok {
266+
return fmt.Sprintf("%#v", state)
267+
}
268+
}
261269

262270
// Handle pointers
263271
if v.Kind() == reflect.Pointer {

‎pkg/cmd/pulumi/packageinstallation/testdata/TestDeduplicateRegistryBasedPlugin/steps.txt‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
HasPlugin{PluginDescriptor{Name:"plugin-a", Kind:"resource", PluginDownloadURL:"https://example.com/plugin-a.tar.gz"}} -> {false}
1+
HasPlugin{PluginDescriptor{Name:"plugin-a", Kind:"resource", PluginDownloadURL:"https://example.com/plugin-a.tar.gz"}} -> {pluginstorage.PluginNotInstalled}
22
HasPluginGTE{PluginDescriptor{Name:"plugin-a", Kind:"resource", PluginDownloadURL:"https://example.com/plugin-a.tar.gz"}} -> {false, nil, nil}
3-
HasPlugin{PluginDescriptor{Name:"plugin-a", Kind:"resource", PluginDownloadURL:"https://example.com/plugin-a.tar.gz"}} -> {false}
3+
HasPlugin{PluginDescriptor{Name:"plugin-a", Kind:"resource", PluginDownloadURL:"https://example.com/plugin-a.tar.gz"}} -> {pluginstorage.PluginNotInstalled}
44
HasPluginGTE{PluginDescriptor{Name:"plugin-a", Kind:"resource", PluginDownloadURL:"https://example.com/plugin-a.tar.gz"}} -> {false, nil, nil}
55
GetLatestVersion{ctx, PluginDescriptor{Name:"plugin-a", Kind:"resource", PluginDownloadURL:"https://example.com/plugin-a.tar.gz"}} -> {nil, nil}
66
DownloadPlugin{ctx, PluginDescriptor{Name:"plugin-a", Kind:"resource", PluginDownloadURL:"https://example.com/plugin-a.tar.gz"}} -> {"$HOME/.pulumi/plugins/resource-plugin-a", <func(bool)>, nil}
77
LoadPluginProjectAt{ctx, "$HOME/.pulumi/plugins/resource-plugin-a"} -> {PluginProject{Runtime:ProjectRuntimeInfo{name:"go"}, Packages:map[2]{"plugin-b":PackageSpec{Source:"plugin-b", PluginDownloadURL:"https://example.com/plugin-b.tar.gz"}, "plugin-d":PackageSpec{Source:"plugin-d"}}}, "$HOME/.pulumi/plugins/resource-plugin-a/PulumiPlugin.yaml", nil}
8-
HasPlugin{PluginDescriptor{Name:"plugin-b", Kind:"resource", PluginDownloadURL:"https://example.com/plugin-b.tar.gz"}} -> {false}
8+
HasPlugin{PluginDescriptor{Name:"plugin-b", Kind:"resource", PluginDownloadURL:"https://example.com/plugin-b.tar.gz"}} -> {pluginstorage.PluginNotInstalled}
99
HasPluginGTE{PluginDescriptor{Name:"plugin-b", Kind:"resource", PluginDownloadURL:"https://example.com/plugin-b.tar.gz"}} -> {false, nil, nil}
10-
HasPlugin{PluginDescriptor{Name:"plugin-b", Kind:"resource", PluginDownloadURL:"https://example.com/plugin-b.tar.gz"}} -> {false}
10+
HasPlugin{PluginDescriptor{Name:"plugin-b", Kind:"resource", PluginDownloadURL:"https://example.com/plugin-b.tar.gz"}} -> {pluginstorage.PluginNotInstalled}
1111
HasPluginGTE{PluginDescriptor{Name:"plugin-b", Kind:"resource", PluginDownloadURL:"https://example.com/plugin-b.tar.gz"}} -> {false, nil, nil}
1212
GetLatestVersion{ctx, PluginDescriptor{Name:"plugin-b", Kind:"resource", PluginDownloadURL:"https://example.com/plugin-b.tar.gz"}} -> {nil, nil}
13-
HasPlugin{PluginDescriptor{Name:"plugin-d", Kind:"resource"}} -> {false}
13+
HasPlugin{PluginDescriptor{Name:"plugin-d", Kind:"resource"}} -> {pluginstorage.PluginNotInstalled}
1414
HasPluginGTE{PluginDescriptor{Name:"plugin-d", Kind:"resource"}} -> {false, nil, nil}
1515
HasPluginGTE{PluginDescriptor{Name:"shared-plugin", Kind:"resource", Version:Version{Major:1}, PluginDownloadURL:"https://registry.example.com/shared-plugin-1.0.0.tar.gz"}} -> {false, nil, nil}
1616
DownloadPlugin{ctx, PluginDescriptor{Name:"plugin-b", Kind:"resource", PluginDownloadURL:"https://example.com/plugin-b.tar.gz"}} -> {"$HOME/.pulumi/plugins/resource-plugin-b", <func(bool)>, nil}
1717
LoadPluginProjectAt{ctx, "$HOME/.pulumi/plugins/resource-plugin-b"} -> {PluginProject{Runtime:ProjectRuntimeInfo{name:"go"}, Packages:map[1]{"plugin-c":PackageSpec{Source:"plugin-c"}}}, "$HOME/.pulumi/plugins/resource-plugin-b/PulumiPlugin.yaml", nil}
1818
DownloadPlugin{ctx, PluginDescriptor{Name:"shared-plugin", Kind:"resource", Version:Version{Major:1}, PluginDownloadURL:"https://registry.example.com/shared-plugin-1.0.0.tar.gz"}} -> {"$HOME/.pulumi/plugins/resource-shared-plugin-v1.0.0", <func(bool)>, nil}
1919
LoadPluginProjectAt{ctx, "$HOME/.pulumi/plugins/resource-shared-plugin-v1.0.0"} -> {PluginProject{Runtime:ProjectRuntimeInfo{name:"go"}}, "$HOME/.pulumi/plugins/resource-shared-plugin-v1.0.0/PulumiPlugin.yaml", nil}
20-
HasPlugin{PluginDescriptor{Name:"plugin-c", Kind:"resource"}} -> {false}
20+
HasPlugin{PluginDescriptor{Name:"plugin-c", Kind:"resource"}} -> {pluginstorage.PluginNotInstalled}
2121
HasPluginGTE{PluginDescriptor{Name:"plugin-c", Kind:"resource"}} -> {false, nil, nil}
2222
HasPluginGTE{PluginDescriptor{Name:"shared-plugin", Kind:"resource", Version:Version{Major:1}, PluginDownloadURL:"https://registry.example.com/shared-plugin-1.0.0.tar.gz"}} -> {false, nil, nil}
2323
InstallPluginAt{ctx, "$HOME/.pulumi/plugins/resource-shared-plugin-v1.0.0", PluginProject{Runtime:ProjectRuntimeInfo{name:"go"}}} -> {nil}

0 commit comments

Comments
 (0)