Commit graph

3435 commits

Author SHA1 Message Date
Cameron Stokes 0a4bf7b991 Link to 'Supported Clouds' page rather than listing clouds in README. (#2546)
Also, update Python Runtime version.
2019-03-18 20:41:43 -07:00
CyrusNajmabadi 718a0c293b
Better present interpolated strings during preview. (#2564) 2019-03-18 17:09:12 -07:00
Matt Ellis b774917e57 Prepare CHANGELOG.md for release 2019-03-15 15:21:34 -07:00
Sean Gillespie 26cc1085b1
Install missing plugins on startup (#2560)
* Install missing plugins on startup

This commit addresses the problem of missing plugins by scanning the
snapshot and language host on startup for the list of required plugins
and, if there are any plugins that are required but not installed,
installs them. The mechanism by which plugins are installed is exactly
the same as 'pulumi plugin install'.

The installation of missing plugins is best-effort and, if it fails,
will not fail the update.

This commit addresses pulumi/pulumi-azure#200, where users using Pulumi
in CI often found themselves missing plugins.

* Add CHANGELOG

* Skip downloading plugins if no client provided

* Reduce excessive test output

* Update Gopkg.lock

* Update pkg/engine/destroy.go

Co-Authored-By: swgillespie <sean@pulumi.com>

* CR: make pluginSet a newtype

* CR: Assign loop induction var to local var
2019-03-15 15:01:37 -07:00
CyrusNajmabadi 5d66bea92a
Add in some top-down usage of result.Result (#2556) 2019-03-13 18:00:49 -07:00
CyrusNajmabadi 2a6bbf2a14
Cleaner style (#2557) 2019-03-13 17:52:50 -07:00
CyrusNajmabadi aa7f493974
Add checks for common mistake of swapping component/custom resource options. (#2555) 2019-03-13 17:02:17 -07:00
CyrusNajmabadi 55360737c1
Rename some variables that would conflict with the desire to use 'res' or 'result' (#2553) 2019-03-13 14:00:01 -07:00
CyrusNajmabadi fb38fb9ecb
Panic if passing a nil error to Result.FromError. 2019-03-13 13:43:44 -07:00
CyrusNajmabadi 8fe0912956
Add a way to 'merge' to Result instances into one Result. (#2551) 2019-03-13 13:43:13 -07:00
CyrusNajmabadi e3f47308b1
Throw proper error (#2550) 2019-03-13 12:21:33 -07:00
CyrusNajmabadi 9e48fe3126
Add comment explaining structure of error handling code. (#2549) 2019-03-12 15:56:43 -07:00
CyrusNajmabadi 3ba4d1104e
Fix issue causing config errors to be printed twice. (#2547) 2019-03-12 13:35:30 -07:00
Pat Gavlin d14f47b162
Elide diffs in internal properties (#2543)
Various providers use properties that begin with "__" to represent
internal metadata that should not be presented to the user. These
changes look for such properties and elide them when displaying diffs.
2019-03-11 18:01:48 -07:00
Sean Gillespie 06d4268137
Improve error message when failing to load plugins (#2542)
This commit re-uses an error reporting mechanism previously used when
the plugin loader fails to locate a plugin that is compatible with the
requested plugin version. In addition to specifying what version we
attempted to load, it also outputs a command that will install the
missing plugin.
2019-03-11 22:17:01 +00:00
Matt Ellis d1f8af249d Add apitype for stack rename request 2019-03-11 14:44:15 -07:00
Matt Ellis 8042adafe5 Add edit.RenameStack
`edit.RenameStack` walks a Snapshot and rewrites all of the parts
where a stack name is present (URNs, the ID of the top level Stack
resource, providers)
2019-03-11 14:44:15 -07:00
Pat Gavlin 7ebd70a3e6
Refresh inputs (#2531)
These changes take advantage of the newly-added support for returning
inputs from Read to update a resource's inputs as part of a refresh.
As a consequence, the Pulumi engine will now properly detect drift
between the actual state of a resource and the desired state described
by the program and generate appropriate update or replace steps.

As part of these changes, a resource's old inputs are now passed to the
provider when performing a refresh. The provider can take advantage of
this to maintain the accuracy of any additional data or metadata in the
resource's inputs that may need to be updated during the refresh.

This is required for the complete implementation of
https://github.com/pulumi/pulumi-terraform/pull/349. Without access to
the old inputs for a resource, TF-based providers would lose all
information about default population during a refresh.
2019-03-11 13:50:00 -07:00
Justin Van Patten 7d7e104ee3
Stop running up as part of pulumi new (#2539)
Originally, `pulumi new` did not run `up` after generating a project. To
help users get a deployed stack as quickly as possible, we changed
`pulumi new` to run an initial deployment at the end of its operation.
Users would first see a preview and get to decide whether to proceed
with an initial deployment, and then continue to iterate from there.

Note that this would only happen for nodejs projects
(TypeScript/JavaScript). We would not run `up` for Python projects as we
require the user to run `pip install` in a virtualenv, so we'd print
instructions with the necessary commands the user must run instead.

Running `up` as part of `pulumi new` for nodejs projects has ended up
being more confusing than helpful for new users, and annoying for
experienced users. New users aren't expecting `pulumi new` to run an
initial deployment after generating the project (they haven't even
looked at the project source yet). Experienced users find it frustrating
as you typically want to just generate the project, and don't want to
have to wait for the preview just to decline running the update.

This change reverts `pulumi new` back to not running `up` automatically
for nodejs projects. Instead, like with Python projects, at the end of
the operation, we print instructions to the user to run `pulumi up` to
deploy the project.
2019-03-11 12:32:40 -07:00
CyrusNajmabadi 680f7bf84e
Update changelog (#2532) 2019-03-07 12:47:23 -08:00
Justin Van Patten 2e60ba0305 Hook up stderr when running brew command
Noticed that I'd missed this right after merging.
2019-03-06 22:45:55 -08:00
Pat Gavlin 4b33a45561
Filter diff keys based on provider info (#2526)
If a provider returns information about the top-level properties that
differ, use those keys to filter the diffs that are rendered to the
user.

Fixes #2453.
2019-03-06 16:41:19 -08:00
CyrusNajmabadi 82c4df84e5
Make test resilient to different node loading orders (#2525) 2019-03-06 12:17:24 -08:00
Justin Van Patten 7784c94c88
Show brew upgrade when installed with Homebrew (#2519)
Show `brew upgrade pulumi` as the upgrade message when the currently
running pulumi executable is on macOS and running from the brew install
directory.
2019-03-06 10:56:44 -08:00
CyrusNajmabadi 62b6f1c3b2
Spelling (#2521) 2019-03-06 02:58:08 -08:00
CyrusNajmabadi d6d839608b
Tweak signature of .apply to help TS infer things better. (#2520) 2019-03-06 01:53:58 -08:00
CyrusNajmabadi f0d8cd89cd
Consistent dependencies (#2517) 2019-03-05 20:34:51 -08:00
CyrusNajmabadi d06c0af32f
Update changelog (#2516) 2019-03-05 17:29:53 -08:00
CyrusNajmabadi 7f5e089f04
Update @pulumi/pulumi to version 0.17.0 (#2510)
This update includes several changes to core `@pulumi/pulumi` constructs that will not play nicely
in side-by-side applications that pull in prior versions of this package.  As such, we are rev'ing
the minor version of the package from 0.16 to 0.17.  Recent version of `pulumi` will now detect,
and warn, if different versions of `@pulumi/pulumi` are loaded into the same application.  If you
encounter this warning, it is recommended you move to versions of the `@pulumi/...` packages that
are compatible.  i.e. keep everything on 0.16.x until you are ready to move everything to 0.17.x.

### Improvements

- `Output<T>` now 'lifts' property members from the value it wraps, simplifying common coding patterns.  Note: this wrapping only happens for POJO values, not `Output<Resource>`s. 

- Depending on a **Component** Resource will now depend on all other Resources parented by that
  Resource. This will help out the programming model for Component Resources as your consumers can
  just depend on a Component and have that automatically depend on all the child Resources created
  by that Component.  Note: this does not apply to a **Custom** resource.  Depending on a
  CustomResource will still only wait on that single resource being created, not any other Resources
  that consider that CustomResource to be a parent.
2019-03-05 17:06:57 -08:00
Pat Gavlin 905e7353e4
Update the provider RPC interface (#2512)
These changes add two new methods to the provider interface and extend
the results of three others.

The new methods are `CheckConfig` and `DiffConfig`, which fill out the
set of methods required for a complete implementation of the
first-class provider design. Though these methods are optional for
backwards compatibility, they should be implemented by all future
providers for the best possible user experience.

The adjusted result types are `DiffResponse`, `ReadResponse`, and
`ErrorResourceInitFailed`. The first has been updated to include a list
of the properties that changed (if any). The latter two now include
an estimated set of inputs for the resource as well as the resource's
state. Together, these three changes enable the engine to determine the
set of inputs that should be specified by a user in order to match those
that describe the resource's current state.

This contributes to #2453, #1662, #1635, and #1718.
2019-03-05 10:49:24 -08:00
CyrusNajmabadi 0117c1c01d
Turn off warning for toString/toJSON on an Output (#2507) 2019-03-04 12:03:18 -08:00
Luke Hoban 3402bc8b4c
Doc edits to cmd (#2505) 2019-03-02 11:04:09 -08:00
CyrusNajmabadi 5a08bf5daa
Update changelog. (#2504) 2019-03-01 18:56:12 -08:00
CyrusNajmabadi 66ada50ccf
Do a version check and emit a warning if major/minor versions of @pulumi/pulumi do not match. (#2503) 2019-03-01 17:43:26 -08:00
Sean Gillespie 1b6fe6271f
Look for exact match when loading plugins (#2483)
* Look for exact match when loading plugins

Pulumi's current behavior when loading plugins is surprising in that it
will attempt to load the "latest" provider binary instead of exactly the
version that was requested. Since provider binaries and provider
packages are tied together and versioned together, this is going to be
problematic if a provider makes a breaking change.

Although there are other issues in this area, this commit fixes the
arguably bug-like behavior of loading the latest plugin and instead opts
to load the plugin that exactly the requested semver range. Today, the
engine will never ask for anything other than an exact version match.

Since this is a breaking change, this commit also includes an
environment variable that allows users to return back to the "old"
plugin loading behavior if they are broken. The intention is that this
escape hatch can be removed in a future release once we are confident
that this change does not break people.

* CR feedback

* Use SelectCompatiblePlugin for HasPluginGTE check
2019-03-01 15:42:38 -08:00
CyrusNajmabadi 4cb6475dc4
Can't change this name as SxS versions of pulumi may expect the old name. (#2500) 2019-02-28 16:18:01 -08:00
CyrusNajmabadi df743178bd
Missed this case. (#2499) 2019-02-28 15:29:28 -08:00
CyrusNajmabadi 3bb8759b23
Implement rtti checks more consistently (#2498) 2019-02-28 14:56:35 -08:00
CyrusNajmabadi 3d1df982de
Incorrect closure serialization when object referenced through different functions. (#2497) 2019-02-28 11:11:43 -08:00
CyrusNajmabadi aa3c6d0ba6
Converting an Output to a string or JSON now produces a warning . (#2496) 2019-02-27 16:00:54 -08:00
CyrusNajmabadi 0d2d1eb61a
Rolling back toString/toJSON change (#2495)
* Revert "Make toString and toJSON internal (#2489)"

This reverts commit 7579b84f73.

* Revert "Update error message to point at docs. (#2488)"

This reverts commit 9156c26a2e.

* Revert "Throw on Output.toString and toJSON (#2486)"

This reverts commit c33b4505c0.
2019-02-27 14:53:56 -08:00
CyrusNajmabadi 1cd90c5c9d
Merge pull request #2493 from pulumi/cyrus/hot-fix-for-0.16.16
Rollback waiting on children of a component when waiting on the component
2019-02-27 12:59:37 -08:00
CyrusNajmabadi 0c5988c5f0
Merge branch 'master' into cyrus/hot-fix-for-0.16.16 2019-02-27 12:43:36 -08:00
CyrusNajmabadi 93defd4b90
Rollback waiting on children of a component when waiting on the component. (#2492) 2019-02-27 12:41:44 -08:00
Cyrus Najmabadi 34f83de210 Rollback waiting on children of a component when waiting on the component.
(cherry picked from commit d1ecc5a250)
2019-02-27 12:31:57 -08:00
CyrusNajmabadi 7579b84f73
Make toString and toJSON internal (#2489) 2019-02-27 02:15:36 -08:00
CyrusNajmabadi 9156c26a2e
Update error message to point at docs. (#2488) 2019-02-27 01:45:26 -08:00
CyrusNajmabadi c33b4505c0
Throw on Output.toString and toJSON (#2486) 2019-02-26 19:24:21 -08:00
CyrusNajmabadi 0beab1bc37
test_all for the sdk should run test_fast tests. (#2485) 2019-02-26 14:12:43 -08:00
CyrusNajmabadi 37912b1e57
Make it simpler to run go tests consistently (#2479) 2019-02-26 13:39:33 -08:00