Commit graph

2310 commits

Author SHA1 Message Date
Joe Duffy
f841c96bf6
Merge pull request #955 from pulumi/swgillespie/fix-release
Fix the make_release.ps1 script
2018-02-17 14:51:01 -08:00
Sean Gillespie
01bb34e674
Fix the make_release.ps1 script
New-Item produces a new object on success, which ultimately gets
output by the make_release.ps1 cmdlet and consumed by the release.ps1
script. This messes up the release script that is expecting exactly
one object to come out of the pipeline from make_release.ps1.
2018-02-17 11:52:44 -08:00
Sean Gillespie
72f93b04ae
Merge pull request #948 from pulumi/swgillespie/sdk-node-module
Ship `nativeruntime.node` as part of the SDK
2018-02-16 20:15:48 -08:00
Sean Gillespie
d3fb639823 Ship nativeruntime.node as part of the SDK
Fixes #356. Instead of downloading a node binary with our closure
serialization code linked-in, this PR instead publishes the
`nativeruntime.node` produced by the NodeJS SDK build as part of the SDK.

This has a number of advantages. First, it is vastly more easy to
develop closure.cc in this configuration. Second, we have the ability
to ship different `nativeruntime.node`s side-by-side, paving the way
for enabling future versions of Node. Third, we don't have to stay
in the business of shipping custom builds of Node, although we do still
need to ship a version of Node with minor modifications in order for
Windows to still work.
2018-02-16 18:12:33 -08:00
Joe Duffy
776a76dffd
Make some stack-related CLI improvements (#947)
This change includes a handful of stack-related CLI formatting
improvements that I've been noodling on in the background for a while,
based on things that tend to trip up demos and the inner loop workflow.

This includes:

* If `pulumi stack select` is run by itself, use an interactive
  CLI menu to let the user select an existing stack, or choose to
  create a new one.  This looks as follows

      $ pulumi stack select
      Please choose a stack, or choose to create a new one:
        abcdef
        babblabblabble
      > currentlyselected
        defcon
        <create a new stack>

  and is navigated in the usual way (key up, down, enter).

* If a stack name is passed that does not exist, prompt the user
  to ask whether s/he wants to create one on-demand.  This hooks
  interesting moments in time, like `pulumi stack select foo`,
  and cuts down on the need to run additional commands.

* If a current stack is required, but none is currently selected,
  then pop the same interactive menu shown above to select one.
  Depending on the command being run, we may or may not show the
  option to create a new stack (e.g., that doesn't make much sense
  when you're running `pulumi destroy`, but might when you're
  running `pulumi stack`).  This again lets you do with a single
  command what would have otherwise entailed an error with multiple
  commands to recover from it.

* If you run `pulumi stack init` without any additional arguments,
  we interactively prompt for the stack name.  Before, we would
  error and you'd then need to run `pulumi stack init <name>`.

* Colorize some things nicely; for example, now all prompts will
  by default become bright white.
2018-02-16 15:03:54 -08:00
Matt Ellis
194ed8e2ad Adjust stack output formating in the CLI
Previously, we would just use normal go formatting when displaying
output values. This was fine for simple values like strings and ints,
but for arrays or objects, you'd end up with values that looked a
little stange.

We now run the objects through json.Marshal first, to get nicer string
values for more complex objects. However, when the top level value is
a single string, we elide the quotes. This is not true JSON, but it
displays much nicer.

When we add something like `--format=json` (see pulumi#496) it will
provide a way to treat output unfiormly as JSON.

Fixes #736
2018-02-16 12:25:25 -08:00
Matthew Riley
48824024ea
Merge pull request #945 from pulumi/tar-on-failure
Do a better job of uploading failed test artifacts to S3
2018-02-16 11:29:19 -08:00
Matt Ellis
78a2e39aab Exit when an error when confirmation is declined
Fixes #931
2018-02-16 00:32:24 -08:00
Matthew Riley
660e08b2f7 Do a better job of uploading failed test artifacts to S3
Uploading a bunch of tiny files is inefficient. Worse, it results in a ton of
paths printed to `stdout` -- enough that we could hit Travis' 4MB limit and
kill the job before we'd finished uploading.

Now we create a `.tar.gz` and upload that one, compressed file.

We also noticed that copied files might not be accessible from the `dev`
account, even though that account owns the `eng.pulumi.com` bucket. When
files are uploaded by one AWS account to a bucket owned by another, the
objects are, by default, only readable by the first account (the writer).
Change the ACL so the account that owns the bucket also has full access.
2018-02-15 22:01:25 -08:00
Joe Duffy
55e4dbe835
Update spinner to use modern ASCII/emoji art (#942) 2018-02-15 18:22:17 -08:00
Matt Ellis
2d0ca1992e Cleanup provider launch scripts and fix some windows build oddities
The windows build was still on the old plan from way back when where
we had binaries littered in the build tree and you had to add parts of
your build-tree to the `%PATH%` for the integration tests to work.

This cleans that up and moves all of our scripts that invoke
javascript to be on the same plan. They invoke our specially named
node with a relative path to the JS code we want to run.
2018-02-15 17:02:35 -08:00
Matt Ellis
b8f3bb24aa Yarn link pulumi in history tests 2018-02-14 17:55:48 -08:00
Matt Ellis
4b2441ac22 Use relative path in langhost launcher
We no longer have a node_modules folder in the SDK (since all
packages now come from NPM) so we need to adjust the shell script we
use to launch our runner to use a relative path.
2018-02-14 17:55:48 -08:00
Joe Duffy
902d646215
Rename package to project (#935)
This addresses pulumi/pulumi#446: what we used to call "package" is
now called "project".  This has gotten more confusing over time, now
that we're doing real package management.

Also fixes pulumi/pulumi#426, while in here.
2018-02-14 13:56:16 -08:00
Sean Gillespie
402a599fc7
Don't use shebangs to launch providers and correctly kill child process trees on Unix (#934)
* Don't use shebangs to launch providers and correctly kill child process trees on Unix

* Link to relevant documentation
2018-02-14 13:56:07 -08:00
Sean Gillespie
61a4d9f98b
Merge pull request #933 from pulumi/swgillespie/readme
Update the README
2018-02-14 13:15:16 -08:00
Sean Gillespie
c245b6ac6f
Update the README 2018-02-14 10:33:18 -08:00
Joe Duffy
444ebdd1b5
Improve failure messages (#932)
This improves the failure messages in two circumstances:

1) If the resource monitor RPC connection is missing.  This can happen
   two ways: either you run a Pulumi program using vanilla Node.js, instead
   of the CLI, or you've accidentally loaded the Pulumi SDK more than once.

2) Failure to load the custom Pulumi SDK Node.js extension.  This is a new
   addition and would happen if you tried running a Pulumi program using a
   vanilla Node.js, rather than using the Pulumi CLI.
2018-02-14 09:55:02 -08:00
Joe Duffy
5d2f21d527
Merge pull request #926 from pulumi/swgillespie/custom-node
Download and use a custom Node binary containing the closure serialization native module
2018-02-13 19:16:16 -08:00
Matt Ellis
993caf7693 Replace push with update in help text
At one point `pulumi update` was spelled `pulumi push` and we wrote
some help documentation about that. When we changed to `pulumi update`
we did not revise the documentation.

Fixes #925
2018-02-13 17:58:33 -08:00
Sean Gillespie
a09f3bf52c
Launch the dynamic provider provider with shebangs 2018-02-13 17:54:55 -08:00
Sean Gillespie
f1a0b1c925
Launch dynamic providers with our custom Node 2018-02-13 17:06:12 -08:00
Matt Ellis
7cd42df84e Fix paths to custom_node 2018-02-13 16:50:32 -08:00
Matt Ellis
80de7f9a83 Add missing download_node.cmd wrapper 2018-02-13 16:31:35 -08:00
Matt Ellis
4499b44355 Fix download_node.ps1; remove ensure_custom_v8
This gets the windows build a little further along. We actually get to
the point where we run the pulumi integration tests now, but they all
fail.
2018-02-13 16:00:02 -08:00
Sean Gillespie
1c2c10a19d Revert "Revert Windows changes to unblock npm ingestion"
This reverts commit d98dcaa79c.
2018-02-13 15:07:07 -08:00
Sean Gillespie
d98dcaa79c Revert Windows changes to unblock npm ingestion 2018-02-13 14:04:23 -08:00
Sean Gillespie
05cb5368a4
Download and use a custom Node binary instead of linking against
private V8 APIs from within our native Node module.
2018-02-13 14:04:01 -08:00
Joe Duffy
e0d3eae16f
Publish README and LICENSE in @pulumi/pulumi (#927) 2018-02-13 12:05:45 -08:00
Joe Duffy
0cb112b984
Publish the Go-based langhost in the SDK tgz's (#924) 2018-02-12 16:54:12 -08:00
Joe Duffy
6e5084218c
Use the scoped @pulumi name for linking layout (#920) 2018-02-12 16:16:16 -08:00
Matt Ellis
0fc10ec757 Only build master, release/* and tags
Our use of parens around the individual clauses of our if condition
seemed to cause Travis to ignore the condition and build
regardless. I've asked Travis about this, but for now, drop them (with
a comment) so we stop building pushes for topic branchs.
2018-02-12 15:13:55 -08:00
Matt Ellis
a3608e0c2a Retry a few times when running yarn during integration tests
We've seen yarn fail from time to time during our integration
tests (usually timeouts talking to the npm registry) so let's add a
few retries to all yarn commands.
2018-02-12 15:13:35 -08:00
Matt Ellis
5f23a9837a Permit setting multi line config from stdin
When reading a configuration value from standard in and standard in is
not connected to a terminal, read until EOF and then trim a trailing
newline (if present) to get the value

Fixes #822
2018-02-12 15:13:19 -08:00
Joe Duffy
a74aa51662
Rename pulumi package to @pulumi/pulumi (#917)
In order to begin publishing our core SDK package to NPM, we will
need it to be underneath the @pulumi scope so that it may remain
private.  Eventually, we can alias pulumi back to it.

This is part of pulumi/pulumi#915.
2018-02-12 13:13:13 -08:00
Luke Hoban
c7adaf107d
Don't include pending-delete resources in tree representation (#902)
Resources in the checkpoint file which are pending-delete represent old versions of resources which are no longer part of the active deployment.  For purposes of constructing the active resource tree, we should skip these resources.
2018-02-12 08:47:09 -08:00
Joe Duffy
e327dccad4
Merge pull request #911 from pulumi/swgillespie/langhost-2
Missed a pulumi-langhost-nodejs batch wrapper
2018-02-11 19:57:05 -05:00
Sean Gillespie
eda0e25241
Missed a pulumi-langhost-nodejs batch wrapper 2018-02-09 21:25:32 -08:00
Sean Gillespie
e87204d3e1
Move language host logic from Node to Go (#901)
* experimental: separate language host from node

* Remove langhost details from the NodeJS SDK runtime

* Cleanup

* Work around an issue where Node sometimes loads the same module twice in two different contexts, resulting in two distinct module objects. Some additional cleanup.

* Add some tests

* Fix up the Windows script

* Fix up the install scripts and Windows build

* Code review feedback

* Code review feedback: error capitalization
2018-02-10 02:15:04 +00:00
CyrusNajmabadi
296151e088
Support serializing methods to the inside layer. (#904) 2018-02-09 14:22:03 -08:00
Matt Ellis
60006f352a Build release branches in CI 2018-02-09 13:42:16 -08:00
Pat Gavlin
eb59d63dcb
Merge pull request #903 from pulumi/UpdateWaits
Reduce update event wait times.
2018-02-09 10:36:31 -08:00
Pat Gavlin
881393146b Remove update event waits. 2018-02-09 09:43:04 -08:00
Pat Gavlin
098e2091fa
Merge pull request #896 from pulumi/UpdateLogWaits
Wait between calls to fetch update logs.
2018-02-07 17:11:26 -08:00
pat@pulumi.com
e8e0ae9bb4 Wait between calls to fetch update logs.
As it stands, we currently hammer the service's update logs endpoint in
a tight loop while waiting for a deployment to complete. This is not
necessary, and can indeed be deletrious to the user experience: it
appears that this may be exacerbating some mysterious 500 responses from
API gateway.

These changes add a brief sleep in the relevant loop that waits for 5
seconds if the last call produced new log entries or 15 seconds if it
did not.

Fixes #844.
2018-02-07 16:57:05 -08:00
Justin Van Patten
1b6df5eddf
Fix spelling (#894) 2018-02-07 15:01:55 -08:00
CyrusNajmabadi
71beb2a51f
Rollback #882 (#888) 2018-02-06 11:22:10 -08:00
CyrusNajmabadi
1dbe4b7dfd
Await the promise of an Output, not the Output itself. (#885) 2018-02-05 19:38:16 -08:00
CyrusNajmabadi
b740c93c18
Remove 'Computed' type. (#883) 2018-02-05 18:37:10 -08:00
Pat Gavlin
5c0b62e1aa
Serialize resource registration after inputs resolve. (#882)
As it stands, we serialize more than is correct when registering
resources: in addition to serializing the RegisterResource RPC, we also
wait for input properties to resolve in the same context. Unfortunately,
this means that we can create cycles in the promise graph when a
resource A is constructed in an earlier turn than some resource B and
one of B's output properties is an input to resource A. These changes
fix this issue by allowing input properties to resolve *before*
serializing the RegisterResource RPC.

Some integration tests had taken a dependency on the ordering of resources in
either the output of the `pulumi` command or the checkpoint file. The
only test that took a dependency on command output was updated s.t. its
resources have exactly one legal topographical sort (and therefore their
ordering is deterministic). The other tests were updated s.t. their
validation did not depend on resource ordering.
2018-02-05 16:29:20 -08:00