pulumi/pkg/workspace
Matt Ellis 685b30b685 Ignore plugins which are being installed
When installing plugins, we download the plugin into a temporary
folder, unpack it and then move that folder into its final
location (as an atomic operation). We do this so that if the download
fails in some way, we would not "poision" our plugin cache.

In order to ensure the move into the final location happens
atomically, we download the plugin into a folder with a `.tmpXXXXXX`
suffix inside the plugin root itself.  However, we were not ignoring
this folder when enumarating plugins. This would cause some weird
behaviors:

- When a plugin was being installed `pulumi plugin ls` would show a
plugin with a version like `v1.0.0-rc.1.tmp123456`.

- For cases where the version of the plugin had applied
metadata (e.g. our alpha builds where we append the commit hash to the
version via `+gACBDEF123`) the `.tmpXXXXXX` suffix was considered part
of the build metadata. This would mean we could actually end up
selecting these plugins and trying to run them, which was not going to
work correctly (since they are in the process of being
downloaded). Because the way to hit this was using a dev release while
also trying to run a another program that used the same plugin, it was
unlikely that customers would hit this, but we would see this from
time to time in CI, where we run many pulumi programs at the same
time (the `examples` repo is one case where we'd often hit it).

Fixes: #1353
2019-09-06 13:49:57 -07:00
..
creds.go Guard against proj.Backend being nil 2019-06-13 16:26:31 -07:00
paths.go Run required policies as part of all updates 2019-07-16 00:58:33 -07:00
plugins.go Ignore plugins which are being installed 2019-09-06 13:49:57 -07:00
plugins_test.go Look for exact match when loading plugins (#2483) 2019-03-01 15:42:38 -08:00
project.go Filter the list of templates shown by default (#3147) 2019-08-27 17:56:49 -07:00
project_test.go Allow more types for runtimeOptions 2018-08-06 14:00:58 -07:00
settings.go Tidy up some data structures (#2135) 2018-11-01 08:28:11 -07:00
templates.go Filter the list of templates shown by default (#3147) 2019-08-27 17:56:49 -07:00
templates_test.go Fix 'pulumi new' to support creating stacks in an org (#2950) 2019-07-22 10:12:26 -07:00
workspace.go Improve error message when Pulumi.yaml can't be found 2018-12-06 14:04:01 -08:00