Commit graph

2578 commits

Author SHA1 Message Date
Matt Ellis d7d939cfd3 Fix Preview against a PPC
Refactoring to support "preview" and "update" as part of the same
operation interacted poorly with deploying into a PPC via the service.

Per Pat, this is the quickest fix that gets us off the floor.

Part of #1301
2018-05-01 11:15:25 -07:00
Joe Duffy b22a28ed34
Add necessary refresh apitypes (#1299)
This change adds the apitypes required to make refresh-style updates
work in the PPC and in the service.
2018-04-30 17:42:24 -07:00
CyrusNajmabadi fd3ddda917
Disable interactive mode for a CI/CD server. (#1297) 2018-04-30 15:27:53 -07:00
Joe Duffy 088d6800d9
Improve two minor UX things in the CLI (#1293)
This changes three minor UX things in the CLI's update flow:

1. Use bright blue for column headers, since the dark blue is nearly
   invisible on a black background.

2. Move the operation symbol to the far left, as a sort of "bullet
   point" for each line of output.  This was how they initial symbols
   were designed and this helps to glance at the summary to see what's
   going on.

3. Shorten some of the column headers that didn't add extra clarity.
2018-04-30 12:31:57 -07:00
Matt Ellis e6d2854429 Remove pulumi history command
We already have a great history viewing experience on
Pulumi.com. `pulumi history` in the CLI today is basically unuseable,
and instead of working on trying to improve it, let's just remove it
for now.

Fixes #965
2018-04-30 12:12:27 -07:00
Sean Gillespie b48f230ce3
Fix an issue where errors outside of resource creation got dropped (#1285) 2018-04-30 10:27:04 -07:00
Matthew Riley 8ea6b24e21
Merge pull request #1282 from pulumi/etc-hosts
Add static entries for Pulumi backends to /etc/hosts
2018-04-29 14:54:46 -07:00
Joe Duffy 578f18831e
Add commands to generate goodies (#1288)
This change adds two new (hidden) CLI commands:

* `gen-bash-completion`: This command generates a bash completion
  script for the CLI, storing it in the file specified by the 1st arg.
  This fixes pulumi/pulumi#1172.

* `gen-markdown`: This command generates a directory of Markdown files,
  one per command, documenting the CLI commands and their usage.

I originally did these as separate scripts that we can use in our
build processes, but it was actually even easier to make `pulumi` able
to generate them for itself.  The nice part about this is that we don't
even need to bundle additional assets in order to distribute e.g. the
bash completion scripts, we can simply tell people to run

    $ pulumi gen-bash-completion /etc/bash_completion.d/pulumi

This can also be used in our upcoming Brew installer.
2018-04-28 11:18:21 -07:00
Matt Ellis b7b80f7ea1 Use glog instead of printf
When running `pulumi logs -f` we'd also see these messages printed to
standard out:

Getting more logs for /aws/lambda/urlshortenereeb67ce9-d8fa6fa...

This could be useful diagnostics information, but we should be
glog'ing it not unconditionally writing it to the terminal.
2018-04-27 18:27:37 -07:00
Luke Hoban 7dac925bcf
Fix handling of nested archives (#1283)
AssetArchives which include nested archives were not embedding content from the nested archive underneath the key of the nest archive.

Fixes #1272.
2018-04-27 17:10:50 -07:00
Sean Gillespie 5decc10cbb
Improve the error message if Pulumi runtime SDK isn't installed (#1286)
* Improve the error message when npm/yarn install hasn't been run

* Same thing, but for Python

* Use PULUMI_RUN in batch script

* Use -e, -f doesn't work for symlinked paths (e.g. yarn link)
2018-04-27 16:55:41 -07:00
Matt Ellis 94d11884f8 Fix login/logout issue against non api.pulumi.com clouds
Pat ran into a weird error when trying to do some development agains
the testing cloud:

```
$ pulumi logout
$ pulumi login --cloud-url [test-cloud-url]
Logged into [test-cloud-url]
$ pulumi stack ls
Enter your Pulumi access token from https://pulumi.com/account:
```

In his case, we did not have `current` set in our credentials.json
file (likely due to him calling `pulumi logout` at some point) but we
did have stored credentials for that cloud. When he logged in the CLI
noticed we could reuse the stored credentials but did not update the
the current setting to set the current cloud.

While investigating, I also noticed that `logout` did not always do
the right thing when you were logged into a different backend than
pulumi.com
2018-04-27 15:41:50 -07:00
Matt Ellis 943b8ff554
Merge pull request #1274 from pulumi/ellismg/minor-cli-improvements
Minor CLI improvements
2018-04-27 09:29:48 -07:00
Matthew Riley 088a06034e Add static entries for Pulumi backends to /etc/hosts 2018-04-26 22:54:39 -07:00
Matt Ellis e6488ac17e Only show emojis on macOS
While emojis often work in the console on many newer Linux distros,
follow yarn's lead and only enable them on macOS (see
https://github.com/yarnpkg/yarn/pull/415).
2018-04-26 18:28:07 -07:00
Pat Gavlin da89733a26
Merge pull request #1275 from pulumi/StackURLs
Add a URL column to `stack ls`.
2018-04-26 09:39:40 -07:00
Pat Gavlin d0135ea1bb Add a URL column to stack ls.
Just what it says on the tin.
2018-04-25 21:17:46 -07:00
Sean Gillespie 14baf866f6
Snapshot management overhaul and refactor (#1273)
* Refactor the SnapshotManager interface

Lift snapshot management out of the engine by delegating it to the
SnapshotManager implementation in pkg/backend.

* Add a event interface for plugin loads and use that interface to record plugins in the snapshot

* Remove dead code

* Add comments to Events

* Add a number of tests for SnapshotManager

* CR feedback: use a successful bit on 'End' instead of having a separate 'Abort' API

* CR feedback

* CR feedback: register plugins one-at-a-time instead of the entire state at once
2018-04-25 17:20:08 -07:00
Matt Ellis 8f0dff3220 Minor CLI improvements
- Show Emojis on non-Windows platforms, instead of just macOS

- Change help text for `pulumi logs` to clarify the logs are specific
  to a stack, not a project

- Display stack name when showing logs

- Have preamble text show to users for engine operations read a little
  nicer
2018-04-25 16:52:31 -07:00
Matt Ellis 1994c94b8b Remove some obsolete flags from pulumi config rm
These flags were a hold-over from earlier iterations of the config
model and are not needed anymore.
2018-04-25 14:25:11 -07:00
CyrusNajmabadi 11f1e444f4
Require a resource's parent to actually be a resource. (#1266) 2018-04-24 17:23:18 -07:00
Matt Ellis 5f4189555a Fix update permalink for stacks on new identity model
We were generating incorrect URLs for stacks on the new identity
model. When we don't have a repository in our ProjectIdentifier, the
URL's in the service use "-" for the repository and project names.
2018-04-24 16:20:43 -07:00
CyrusNajmabadi 3b13803c71
Add a hidden --no-interactive flag so that we can reduce interactive noise when running jenkins. (#1262) 2018-04-24 14:23:08 -07:00
Pat Gavlin 1894e6e5af
Merge pull request #1261 from pulumi/Workaround1251
Work around issue #1251.
2018-04-24 13:07:35 -07:00
CyrusNajmabadi 42d7174c70
Add a new tree-view form for the progress view. (#1260) 2018-04-24 11:13:22 -07:00
pat@pulumi.com ca2e996428 Work around issue #1251.
This issue arises becuase the behavior we're currently getting from Diff
for TF-based providers differs from the behavior we expect. We are
presenting the provider with the old state and new inputs. If the old
state contains output properties that differ from the new inputs, the
provider will detect a diff where we may expect no changes.

Rather than deferring to the provider for all diffs, these changes only
defer to the provider if a legacy diff was detected (i.e. there is some
difference between the old and new provider-calculated inputs).
2018-04-24 10:35:27 -07:00
Sean Gillespie fba87909a0
Re-introduce interface for snapshot management (#1254)
* Re-introduce interface for snapshot management

Snapshot management was done through the Update interface; this commit
splits it into a separate interface

* Put the SnapshotManager instance onto the engine context

* Remove SnapshotManager from planContext and updateActions now that it can be accessed by engine Context
2018-04-23 14:12:13 -07:00
Chris Smith 6a0718bcff
Revert adding HEAD commit info to update env (#1257) 2018-04-23 14:01:28 -07:00
Matt Ellis fe8bad70d1 Don't mention PPC unless needed in the CLI
PPCs are no longer a central concept to our model, but instead a
feature that that pulumi.com provides to some organizations. Let's
remove most mentions of PPCs except for cases where we really need to
talk about them (e.g. when a stack is actually hosted in a PPC instead
of just via the normal pulumi.com service)

Also remove some "in the Pulumi Cloud" messages from the CLI, as using
the Pulumi Cloud is now the only real way to use pulumi.

Fixes pulumi/pulumi-service#1117
2018-04-23 16:50:48 -04:00
Matt Ellis cbb7e8e862 Fix "interactive" stack creation
The cloud backend would fail if `nil` was passed in as the options to
use when creating a stack. However, we passed nil in places where we
allow the user to create stacks interacively. I noticed this while
dogfooding.

In the cloud backend, treat a `nil` opts as if the default set of
options was passed.
2018-04-23 16:26:16 -04:00
Chris Smith 4651419f7f
Add Commit message, committer, and author to update env (#1249)
* Add Commit message, committer, and author to update env

* Remove low value comments
2018-04-23 11:39:14 -07:00
Pat Gavlin fa97af772a
Merge pull request #1250 from pulumi/MoreDeploymentVersions
Add deployment version fields to more types.
2018-04-23 09:52:53 -07:00
CyrusNajmabadi 7807edc166
Simplifying progress code (#1253) 2018-04-22 18:10:19 -07:00
Chris Smith fe3d854bc5
Use ContinuationToken (#1220)
* Use ContinuationToken

* Rename 'afterIndex' to 'continuationToken' for clarity
2018-04-20 15:48:23 -07:00
pat@pulumi.com 5ed6f8b9e3 Add deployment version fields to more types.
This completes the rollout of deployment version fields in the API
types.
2018-04-20 14:36:15 -07:00
Pat Gavlin f61998ea99
Merge pull request #1248 from pulumi/NoOutputsComponents
Fix issue #1135.
2018-04-20 13:46:35 -07:00
Pat Gavlin d42bc346c5
Merge pull request #1246 from pulumi/FixTypos
Fix a couple of typos.
2018-04-20 11:54:55 -07:00
pat@pulumi.com 864d70968b Improve a comment. 2018-04-20 11:52:33 -07:00
pat@pulumi.com 7866e1d561 Fix issue #1135.
Do not fire a "resource outputs" display event for component resources
after their initial registration. Instead, defer this event until the
component's `RegisterResourceOutputs` call arrives.
2018-04-20 11:44:28 -07:00
pat@pulumi.com 42b67a4dbc Fix a couple of typos.
- Restore a dropped "update"
- %s/Resouce/Resource/g
2018-04-20 11:09:54 -07:00
Matt Ellis 17faae5517
Merge pull request #1226 from pulumi/ellismg/identity
New Identity Model in the CLI
2018-04-19 23:48:32 -07:00
Matt Ellis 15e2ad27fe Address code review feedback 2018-04-20 02:34:10 -04:00
Matt Ellis cc938a3bc8 Merge remote-tracking branch 'origin/master' into ellismg/identity 2018-04-20 01:56:41 -04:00
Matt Ellis 04e5dfde5f Address code review feedback 2018-04-20 01:31:14 -04:00
Sean Gillespie 4724f91e82
Fix wording in nodejs readme (#1239) 2018-04-19 21:42:26 -07:00
Pat Gavlin 4fa69bfd72
Plumb basic cancellation through the engine. (#1231)
hese changes plumb basic support for cancellation through the engine.
Two types of cancellation are supported for all engine operations:
- Cancellation, which waits for the operation to drive itself to a safe
  point before the operation returns, and
- Termination, which does not wait for the operation to drive itself
  to a safe opint for the operation returns.

When updating local or managed stacks, a single ^C triggers cancellation
of any running operation; a second ^C will trigger termination.

Fixes #513, #1077.
2018-04-19 18:59:14 -07:00
CyrusNajmabadi e8485c2388
Lighten our dependency on the docker cli (#1238) 2018-04-19 15:55:24 -07:00
CyrusNajmabadi ffcd9fde7b
Show stdout events at hte bottom of the progress view. (#1236) 2018-04-19 14:44:53 -07:00
Pat Gavlin e2b023af9e
Merge pull request #1235 from pulumi/RemoveConvUtil
Remove the convutil package.
2018-04-19 14:25:08 -07:00
Sean Gillespie 9e3500d181
CI cleanup for various Node versions (#1233)
* Run Windows CI against node v8.10

* Update READMEs
2018-04-19 13:44:47 -07:00