Commit graph

70 commits

Author SHA1 Message Date
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
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
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
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
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 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
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 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
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 c53f697a6f
Fix deadlock when waiting for transitive dependencies (#2471) 2019-02-24 12:14:16 -08:00
CyrusNajmabadi 967c6407a0
Revert "Simplify how we export the .all operator (#2467)" (#2469)
This reverts commit 93c9464125.
2019-02-23 19:54:28 -08:00
CyrusNajmabadi 93c9464125
Simplify how we export the .all operator (#2467) 2019-02-22 12:02:52 -08:00
CyrusNajmabadi ee5b13cb10
Update changelog (#2466) 2019-02-22 01:00:00 -08:00
CyrusNajmabadi 27b04c4c62
Have child resources update their parent urn to include themselves in its dependencies. (#2299) 2019-02-21 20:18:29 -08:00
Justin Van Patten b064a03054
Return error from stack tag commands in local mode (#2457)
Instead of operating as no-ops, return an error to make it more clear
that these commands are not currently implemented when using --local
mode.
2019-02-19 16:07:57 -08:00
Sean Gillespie e0b516d0cc
Fix an issue with empty ID for CustomResource (#2449)
* Fix an issue with empty ID for CustomResource

The Python runtime was checking the ID field it receives from the engine
against None, assuming that the engine would not set the ID field if one
was not present. However, it does set the ID field; it is set to the
empty string when an ID is not known.

This commit fixes an issue that can cause certain IDs to be erroneously
considered to be known during previews, which can cause problems during
the Check phase of resources that directly reference IDs of other
resources.

* Add CHANGELOG
2019-02-15 09:55:19 -08:00
Sean Gillespie c720d1329f
Enable delete parallelism for Python (#2443)
* Enable delete parallelism for Python

* Add CHANGELOG.md entry

* Expand changelog message - upgrade to Python 3

* Rework stack rm test

The service now allows removing a stack if it just contains the top
level `pulumi:pulumi:Stack` resource, so we need to actually create
another resource before `stack rm` fails telling you to pass
`--force`.

Fixes #2444
2019-02-12 14:49:43 -08:00
Luke Hoban 06d3c7811f
Fix date text 2019-02-11 15:28:17 -08:00
Matt Ellis 687a780b20 Show a better error when --force needs to be passed to stack rm
When `pulumi stack rm` is run against a stack with resources, the
service will respond with an error if `--force` is not
passed. Previously we would just dump the contents of this error and
it looked something like:

`error: [400] Bad Request: Stack still has resources.`

We now handle this case more gracefully, showing our usual "this stack
still has resources" error like we would for the local backend.

Fixes #2431
2019-02-07 15:25:02 -08:00
Pat Gavlin 6e90ab0341
Add support for explicit delete-before-replace (#2415)
These changes add a new flag to the various `ResourceOptions` types that
indicates that a resource should be deleted before it is replaced, even
if the provider does not require this behavior. The usual
delete-before-replace cascade semantics apply.

Fixes #1620.
2019-01-31 14:27:53 -08:00
Matt Ellis a627cf817a Ensure InvokeRequest is defined
InvokeRequest is defined in provider_pb.js not resource_pb.js. Require
that module instead.
2019-01-31 12:00:32 -08:00
Matt Ellis 07130913df Prepare for v0.16.13 2019-01-30 21:17:34 -08:00
Matt Ellis 50c2ebbdd5 Improve StackReference error message
Because of the change to include a stack's project as part of its
identity in the service, the names passed to StackReference now
require the project name as well.

Improve the error message when they do not include them.
2019-01-30 15:57:44 -08:00
Matt Ellis e950ab1e51 Update CHANGELOG.md for 0.16.12 2019-01-25 15:26:01 -08:00
Matt Ellis f94e2e7bcc Update CHANGELOG.md 2019-01-25 12:52:33 -08:00
Matt Ellis 902be2b0b0 Use project name as part of stack identity with cloud backend
This change starts to use a stack's project name as part of it's
identity when talking to the cloud backend, which the Pulumi Service
now supports.

When displaying or parsing stack names for the cloud backend, we now
support the following schemes:

`<stack-name>`
`<owner-name>/<stack-name>`
`<owner-name>/<project-name>/<stack-name>`

When the owner is not specificed, we assume the currently logged in
user (as we did before). When the project name is not specificed, we
use the current project (and fail if we can't find a `Pulumi.yaml`)

Fixes #2039
2019-01-24 16:56:54 -08:00
Justin Van Patten dee2c37d9d
pulumi new improvements (#2379)
Some changes to `pulumi new` to improve the experience:

 - Color the default values for config differently to make them stand
   out better
 - Mention that `new` will also perform an initial deployment
 - Add more vertical whitespace between steps in the process
 - Print message indicating the "Installing dependencies" step is
   complete
 - After "project is ready to go", add a note about doing an initial
   deployment
 - Output follow-up command to run when an update fails
 - Go back to showing the `npm install` output as `npm` doesn't always
   return an error code when it runs into problems
2019-01-23 08:57:48 -08:00
Matt Ellis 9384102a93 Add --json to pulumi history 2019-01-22 15:42:29 -08:00
Matt Ellis 24e6158378 Add --json to pulumi plugin ls 2019-01-22 15:42:29 -08:00
Matt Ellis 5cfd44c73a Add --json to pulumi config get and pulumi config
This supports using `--json` to get configuration information in a
structured way.

The objects we return have the following schema:

```
{
    name: string;
    value: string?;
    secret: bool;
}
```

In the case of `pulumi config` when --show-secrets is not passed, and
there are secret values, the `value` property of the object for that
configuration value will not be set. This differs from the normal
rendering where we show `[secret]`.

Contributes To #496
2019-01-22 10:39:37 -08:00
Matt Ellis 378bae27d8 Update CHANGELOG.md for 0.16.11 2019-01-16 16:54:30 -08:00
Matt Ellis 96b464a4b9 Update CHANGELOG.md
The previous commit added a note in the wrong section. Simply move the
note and add some context that these new features only work in nodejs.
2019-01-16 11:59:41 -08:00
CyrusNajmabadi bfcb07a164
Add functions to help make strings from values that may include Outputs (#2359) 2019-01-16 11:03:25 -08:00
Luke Hoban 5ec78df73d Update CHANGELOG for 0.16.10 release 2019-01-11 15:18:34 -08:00
Justin Van Patten 5d3d8c01dd
Add commands for managing stack tags (#2333)
Adds `pulumi stack tag` commands for managing stack tags.
2019-01-04 13:23:47 -08:00
CyrusNajmabadi 87e5a441f5
Convert resource to pojo objects when used as stack outputs. (#2311) 2019-01-03 10:03:11 -08:00
Justin Van Patten ea3b681a54
Link directly to /account/tokens (#2328)
We're changing /account to redirect to /account/profile instead of
/account/tokens as the user profile settings are a more natural place
to land when going into account settings.

This commit changes the CLI to link
directly to /account/tokens, avoiding having to click on
"Access Tokens" to go to the tokens page to get an access token when
coming from the URL outputted by the CLI.
2018-12-28 18:06:03 -05:00
Matt Ellis fc14d50359 Update CHANGELOG.md for 0.16.9 release 2018-12-24 20:41:44 -08:00
Matt Ellis 3ef40c6ba6 Update CHANGELOG.md
Add in some fixes and features that were missing from `CHANGELOG.md`
2018-12-24 09:56:31 -08:00
Matt Ellis b03c48e852 Merge v0.16.8 into master 2018-12-14 15:32:48 -08:00
Matt Ellis d2bd696d15 Fix synchronization with the event renderer (#2290)
The event rendering goroutine in the remote backend was not properly
synchronizing with the goroutine that created it, and could continue
executing after its creator finished. I believe that this is the root
cause of #1850.

(cherry picked from commit ded3882afd)
2018-12-14 14:19:01 -08:00