pulumi/sdk/go/common/workspace
Will Jones b85a92cd5c
Have `Host.Provider` accept a `PackageDescriptor` (#17244)
Plugins are the core means by which Pulumi may be extended. Language
hosts, resource providers, analyzers, and converters, for instance, are
all kinds of plugin. Plugins are loaded by a plugin `Host`, which also
offers convenience methods for loading specific kinds of plugin such as
those mentioned above.

The `Provider` method on `Host` currently accepts a name and version.
This is not ideal, since there are several other parameters that may
affect the plugin to be loaded, as well as what operations may be run on
it when it is loaded:

* Custom download URLs and checksums may be desirable to control where a
plugin is retrieved from, and to verify a plugin's integrity.
* Parameterization means that while the `aws` provider is desired, it is
actually provided by a dynamically-bridging `terraform` plugin which is
to be supplied with a parameter such as
`{"name":"aws","version":"..."}`.

This PR begins reworking the `Host` interface so that its `Provider`
method accepts a more complete `PackageDescriptor`, consisting of a full
`PluginSpec` and an optional `Parameterization`. Presently this PR just
replicates existing call sites to use the new data structure -- if this
merges successfully then several of these call sites can likely be
cleaned up further by moving duplicated logic that handles things like
custom download URLs, etc. _into_ the newly capable `Provider`
implementation.
2024-09-12 13:17:30 +00:00
..
config.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
creds.go Recover from zero-byte `credentials.json` files (#17186) 2024-09-06 09:57:33 +00:00
creds_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
loaders.go New deployment settings wizards and environment variables management comands (#16564) 2024-07-03 20:24:26 +00:00
loaders_test.go ignore unexpected types instead of erroring out (#14149) 2023-10-11 16:39:16 +00:00
paths.go Switch back to `os/user` to get the current user (#17125) 2024-08-31 18:54:35 +00:00
paths_test.go Don't search upwards for policy packs when determining required plugins (#16865) 2024-08-02 11:49:16 +00:00
plugins.go Have `Host.Provider` accept a `PackageDescriptor` (#17244) 2024-09-12 13:17:30 +00:00
plugins_install_nodejs_test.go ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
plugins_install_python_test.go ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
plugins_install_test.go Refactor: move plugin kind to apitype (#15946) 2024-04-25 17:30:30 +00:00
plugins_test.go plugins: don't panic when the given path is not clean (#17141) 2024-09-04 10:08:44 +00:00
project.go Prepare golangci-lint upgrade (#17065) 2024-08-28 07:57:38 +00:00
project.json [sdk] add optional display name and tag fields to project templates (#14587) 2023-11-18 19:04:13 +00:00
project_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
settings.go move pkg/workspace -> sdk/go/common/workspace 2020-03-18 14:35:53 -07:00
templates.go Clean up uses of .Error() (#14965) 2023-12-20 15:54:06 +00:00
templates_test.go Use EqualError/ErrorContains instead of Error (#14737) 2023-12-08 06:40:14 +00:00
templates_zip.go Adds Pulumi AI integrations with Pulumi New (#14685) 2023-12-20 22:08:09 +00:00
templates_zip_test.go Adds Pulumi AI integrations with Pulumi New (#14685) 2023-12-20 22:08:09 +00:00
workspace.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00